CN111209345B - Online teaching consensus system based on block chain and learning recording method - Google Patents
Online teaching consensus system based on block chain and learning recording method Download PDFInfo
- Publication number
- CN111209345B CN111209345B CN202010314254.6A CN202010314254A CN111209345B CN 111209345 B CN111209345 B CN 111209345B CN 202010314254 A CN202010314254 A CN 202010314254A CN 111209345 B CN111209345 B CN 111209345B
- Authority
- CN
- China
- Prior art keywords
- consensus
- node
- block chain
- data
- online teaching
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000007726 management method Methods 0.000 claims description 59
- 230000004044 response Effects 0.000 claims description 19
- 238000012545 processing Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 11
- 238000004891 communication Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 9
- 230000006399 behavior Effects 0.000 claims description 8
- 230000007246 mechanism Effects 0.000 claims description 8
- 230000007423 decrease Effects 0.000 claims description 4
- 238000013500 data storage Methods 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 4
- 210000001503 joint Anatomy 0.000 abstract description 2
- 238000013480 data collection Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000002688 persistence Effects 0.000 description 1
- 238000012913 prioritisation Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/20—Education
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Tourism & Hospitality (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- General Health & Medical Sciences (AREA)
- General Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Educational Technology (AREA)
- Computing Systems (AREA)
- Educational Administration (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to an online teaching consensus system and a learning recording method based on a block chain, which comprises an online teaching consensus system 10, an online teaching information specification interface 20 and a plurality of online teaching platforms 30, wherein the online teaching consensus system 10 runs a learning recording method based on the block chain, and forms the block chain system together with the online teaching platforms 30, the online teaching consensus system 10 and the online teaching platforms 30 are physically interconnected through a network, and the online teaching consensus system 10 and the online teaching platforms 30 realize data intercommunication through the online teaching information specification interface 20. The online teaching consensus system technology based on the block chain is adopted, the online teaching consensus system technology can be in butt joint with any online teaching platform conforming to the interface specification, and the problems that the online learning experience of individuals or the same learning group cannot be uniformly managed, and the achievement assessment of online teaching cannot easily obtain the uniform authentication of intercommunication consensus under the cross-platform condition are solved.
Description
Technical Field
The application relates to the field of computers, in particular to an online teaching consensus system and a learning recording method based on a block chain.
Background
In recent years, the open educational resources provide abundant and open learning resources for broad learners and educators, online teaching will be combined with offline teaching in the near future, and the proportion of online teaching will be greater and greater. However, the online teaching platforms selected by everyone at different stages are different, and the online teaching tools selected by the same learning group are also different, so that the online learning experience of the individual or the same learning group cannot be uniformly managed, and the achievement assessment of online teaching is difficult to obtain the uniform authentication of intercommunication consensus under the cross-platform condition. This creates a gap that is difficult to overcome for the resource integration and overall development of online teaching, and further restricts the development of online education.
Therefore, a technical means that various online teaching platforms can be flexibly accessed and a cross-platform mutual-recognition mechanism with a consensus ability is provided for online teaching is urgently needed.
Disclosure of Invention
The application provides an online teaching consensus system and a learning recording method based on a block chain, which are used for solving the technical problems that the online learning experience of learning individuals or the same learning group cannot be uniformly managed due to the fact that the existing online education platforms are numerous, and the achievement assessment of online teaching is difficult to obtain the unified authentication of intercommunication consensus under the cross-platform condition, so that the development of online education is greatly restricted, so that the online teaching consensus system can be flexibly accessed to various online teaching platforms, and the beneficial effect of a cross-platform mutual-recognition mechanism with the consensus capability is provided for online teaching.
The specific technical scheme of the invention is as follows:
the on-line teaching consensus system based on the block chain comprises an on-line teaching consensus system, an on-line teaching information standard interface and a plurality of on-line teaching platforms, wherein a learning record program based on the block chain runs on the on-line teaching consensus system, and the on-line teaching consensus system and the on-line teaching platforms jointly form the block chain system, the on-line teaching consensus system and the on-line teaching platforms realize physical interconnection through a network, and the on-line teaching consensus system and the on-line teaching platforms realize data intercommunication through the on-line teaching information standard interface.
Further, the online teaching consensus system comprises:
the user service module is used for providing registration and operation record data storage for users of the online teaching platform;
the data acquisition module is in data connection with the user service module and is used for collecting the learning records of the user according to the time sequence;
the credit management module is in data connection with the data acquisition module and is used for calculating, storing and dynamically managing a credit value table of each node;
and the block service module is in data connection with the credit management module and is used for managing the consensus strategy of the block chain system, receiving the information transmitted by the data acquisition module and processing block service data.
Further, the network comprises an Internet, a local area network and an ad hoc network of a custom protocol.
Further, the block service module comprises a consensus management module, a distributed computing module and a distributed storage module;
the consensus management module is used for managing a consensus strategy of the blockchain system and automatically switching an optimal consensus strategy according to the network state of the blockchain system;
the distributed computing module is used for distributed processing of the learning record of each node in the block chain system and dividing the learning record into a plurality of subdata with sequence numbers;
the distributed storage module broadcasts the subdata and the split list to the block chain network, is used for storing the learning record and realizing the protocol, and distributes the generated new data block to all nodes.
A consensus learning recording method based on the block chain-based online teaching consensus system comprises the following steps:
s1, taking an online teaching consensus system and all online teaching platforms accessed to the system as nodes, deploying a block chain system, collecting online learning records of all the nodes, and dynamically managing credit values of all the nodes of the block chain system;
s101: the user service module manages user data of each online learning platform and sends the data to the data acquisition module in real time;
s102: the credit management module calculates the credit value condition of each node in the block chain system;
s103: the credit management module dynamically manages the credit value of each node;
s2, a consensus management module manages a consensus strategy of the block chain system, and the system is guaranteed to have an efficient consensus mechanism and response instantaneity at any stage;
s3, the distributed computation module splits the learning record transmitted by the data acquisition module into a plurality of subdata with sequence numbers, a split list of unique identification codes of nodes corresponding to the subdata sequence numbers is formed through the distributed storage module, and the subdata and the split list are broadcasted to other nodes of the block chain, so that the system safety is further improved;
s301: splitting the learning record into a plurality of subdata with sequence numbers through a distributed computing module;
s302: the distributed storage module forms a split list of the unique identification codes of the nodes corresponding to the subdata sequence numbers, and broadcasts the subdata and the split list to other nodes of the block chain.
Further, in the step S101, after various online teaching platforms package information such as user information, learning and operation records of their own platforms to form a data packet, the data packet is sent to a user service module of the online teaching consensus system through an online teaching information specification interface, and the user service module analyzes the data packet to obtain user information, learning and operation record information of the teaching platform, and then sends the information to a data acquisition module in real time; the data acquisition module collects learning records and operation behavior data of learners in real time, and when the collected business data reaches a preset number or reaches a certain time interval from the last collection of business data, the data acquisition module sends the collected business data information to the credit management module.
Further, in step S102, the credit management module calculates a credit value condition of each node in the blockchain system; in the block chain system, when a block of a node A is connected to a block of a node B through a hash pointer, the node B is an adjacent node of the node A, when the current credit value of the node A is calculated, a credit management module initiates a data request to the node B, inquires the data packet transceiving success rate in the historical communication between the node A and the node B, and calculates the credit value F of the node A after receiving the data reply of the node B, wherein the calculation method comprises the following steps:
wherein,is the success rate of transceiving between the node B and the node a, M is the number of data packets from the node a successfully transmitted by the node B in a certain time period, N is the number of data packets from the node a received by the node B in a certain time period,n-1 is the number of neighbor nodes of node A,,is the number of time periods;
by adopting the calculation method of the credit value F, the credit management module calculates the credit value of each node in the blockchain system.
Further, in step S103, the credit management module dynamically manages the credit value of each node, and the specific processing procedure for implementing dynamic management of the credit value is as follows:
by adopting a credit consumption mechanism, the credit value of the node changes along with time, the credit consumption means that the credit value decreases along with time, and the latest credit value calculation method of the node is as follows:whereinis the latest value of the credit to be given,is the credit value of the last state,is the time interval between two previous and subsequent receptions of information;taking the system heartbeat period as a time constant;is a credit consumption rate, is a constant, and can be combined with a specific case pairAnd (6) adjusting.
Further, in step S2, the consensus management module manages multiple consensus strategies, and may automatically select an optimal consensus strategy according to the system operating status, where the specific consensus strategy is set as follows:
reliability priority policy: the reliability priority strategy adopts a 51% principle, namely when any node in a block chain initiates a data request, the consensus result of more than 51% of all nodes in the block chain system is adopted as a final request result, so that the reliability of the data can be ensured to the maximum extent; but the reliability priority strategy will affect the response real-time performance of the system;
and (3) balancing strategy: in order to take reliability and response efficiency into consideration when a block chain system is influenced by network quality or impact of communication wave crests and wave troughs, a balance strategy is set, and the balance strategy is set as follows:
according to the step of S1, the credit management module manages the credit value of each node in the blockchain system, and the latest credit value corresponding to the node k in the system of n nodes is recorded asThe latest credit value set of n nodes is recorded asSorting the sets in order of credit from high to low,
In a balanced strategy, consensus results are generated to be aggregatedTaking the first 51% of nodes as consensus participating nodes, wherein more than 51% of consensus results of the consensus participating nodes are final request results, and the most reliable consensus results are obtained by a balance strategy on the premise of ensuring response efficiency;
speed priority strategy:
under the condition that the communication environment of the block chain system is extremely severe, in order to obtain the optimal response efficiency, a speed priority strategy is set, and the specific processing procedures are as follows:
sorting collections from recent credit valuesAlpha (0) before selection<Alpha < 1) as a consensus participating node, and under the speed-first strategy, alpha is set to be less than 51% of the balance strategy, and the node with the largest credit value is selected as the consensus participating node at least.
Further, in step S2, the automatic switching method of the three strategies includes:
in the operation process of the block chain system, the data request timeout events of all the nodes are recorded, and for a system with n nodes, unit time is set(In seconds) while setting two thresholds: threshold number of timeout events per unit time(An integer greater than 0), a timeout node area threshold per unit time(0<<1) Area of overtime node per unit time= number of nodes overtime per n unit time, block chaining based on data request overtime event during system operationThe system will automatically switch the best consensus strategyThe number of timeout events in time isThe handover strategy is as follows:
the invention has at least the following beneficial effects:
(1) the online teaching consensus system technology based on the block chain is adopted, the online teaching consensus system technology can be in butt joint with any online teaching platform conforming to the interface specification, and the problems that the online learning experience of individuals or the same learning group cannot be uniformly managed, and the uniform authentication of the intercommunication consensus cannot be easily obtained under the cross-platform condition in the online teaching score assessment are solved.
(2) The invention designs a special credit management module which is responsible for calculating and dynamically maintaining the node credit in the block chain system, thereby solving the problem of quickly selecting the nodes participating in consensus decision under different consensus strategy requirements.
(3) The invention designs a special consensus management module which can preset a plurality of consensus strategies to deal with the optimal consensus strategy of comprehensive reliability and efficiency under different network conditions.
(4) The invention adopts the method of splitting the service data into the subdata and the split list to store the blocks, thereby greatly enhancing the safety of the system.
Drawings
FIG. 1 is a logic diagram of an application of the block chain-based online teaching consensus system according to the present invention;
FIG. 2 is a block diagram of an online teaching consensus system according to the present invention;
fig. 3 is a flowchart of the block chain-based online teaching consensus learning recording method of the present invention.
Detailed Description
The technical solutions of the present invention will be described in detail below with reference to the drawings and specific embodiments of the specification, and it should be noted that, as long as there is no conflict, various features in the embodiments of the present invention may be combined with each other, and the formed technical solutions are within the scope of the present invention.
Referring to fig. 1, an application logic diagram of an online teaching consensus system based on a blockchain, which is applied to the whole system, mainly includes three parts from the aspect of logic: the online teaching consensus system 10, the online teaching information specification interface 20 and a plurality of online teaching platforms 30. The learning record program based on the block chain of the present invention is operated on the online teaching consensus system 10, and forms a block chain system together with the plurality of online teaching platforms 30, and the online teaching consensus system 10 and the plurality of online teaching platforms 30 are physically interconnected through a network, which includes but is not limited to the forms of internet, local area network, ad hoc network with custom protocol, and the like.
The online teaching consensus system 10 and the online teaching platform 30 realize data intercommunication through the online teaching information specification interface 20, the online teaching information specification interface 20 is a manually agreed standard protocol capable of realizing intercommunication consensus data between the online teaching consensus system 10 and the online teaching platform 30, and all nodes complying with the standard protocol can participate in consensus data intercommunication.
Referring to fig. 2, the block chain-based online teaching consensus system of the present invention is composed of the following parts: a user service module 101, a data acquisition module 102, a credit management module 103, and a block service module 104.
The user service module 101 is used for providing functions of registration, operation record data storage and the like for users of the online teaching platform; the user service module 101 and the data acquisition module 102 have data connection and can communicate data with each other.
The data acquisition module 102 is configured to collect learning records of a user in a time sequence; the data collection module 102 has a data connection with the credit management module 103, and can communicate data with each other. The data acquisition module is also in data connection with the block service module 104, and can communicate data with each other.
The credit management module 103 is used for calculating, storing and dynamically managing a credit value table of each node; the credit management module 103 and the block service module 104 have data connection therebetween, and can communicate data with each other.
The block service module 104 is configured to manage a consensus policy of the block chain system, receive information sent by the data acquisition module, and process block service data, and includes a consensus management module 1041, a distributed computation module 1042, and a distributed storage module 1043;
the consensus management module 1041 is configured to manage a consensus policy of the blockchain system, and automatically switch an optimal consensus policy according to a network state of the blockchain system;
the distributed computing module 1042 is used for distributed processing of the learning record of each node in the block chain system, and divides the learning record into a plurality of subdata with sequence numbers;
the distributed storage module 1043 broadcasts the subdata and the split list to the block chain network, for the storage of the learning record and the realization of the protocol, and distributes the generated new data block to all nodes.
As an example of the present invention, a,
online learners register as users of the online teaching platform through various online teaching platforms 30, and perform online learning in the online teaching platform, and the online teaching platform records learning records of the users and operation behaviors in the learning process. Packaging the user registration information, the learning record and the operation behavior data, and then sending the data to the online teaching consensus system 10 through the online teaching information specification interface 20 according to the data interface standard; the user service module 101 in the online education consensus system 10 receives the packaged data from the online education information specification interface 20, analyzes and stores the user registration information and the learning record and operation behavior data of the user, and sends the analyzed data to the data acquisition module 102, the data acquisition module 102 collects the learning record and operation behavior data of the learner in real time, when the collected service data reaches a preset amount or reaches a certain time interval from the last collected service data, the data acquisition module 102 sends the collected information to the credit management module 103, the preset amount of service data is a manually set quantity strategy for measuring the persistence and quality of each online learning by the online education consensus system, and includes but is not limited to the number of hours completed by the learner, the number of continuously completed learning tasks by the learner, the number of learning tasks by the learner, the learning tasks, and the learning tasks, The number of answers to questions, etc. The time interval from the last collection of the business data is a time strategy artificially set for the convenience of the online teaching consensus system to measure the learning continuity and quality of each online learner. In this embodiment, a comprehensive strategy method is adopted for a preset amount of business data, the preset amount of business data is set to be 15 for the number of learning tasks continuously completed by the online learner, and meanwhile, the time interval from the last collection of business data is set to be 8 hours, and the quantity strategy and the time strategy can be specified according to the calculation resource level of the server to which the online teaching consensus system belongs.
After receiving the information sent by the data acquisition module 102, the credit management module 103 first calculates credit values of the relevant nodes in the information sent by the data acquisition module, and dynamically maintains the credit values of all the nodes in the block chain.
The consensus management module 1041 receives the latest node credit from the credit management module 103, manages the consensus strategy of the blockchain system, and automatically selects the best consensus strategy according to the network status to ensure the reliability and efficiency of the system.
On the other hand, the data acquisition module further sends the acquired data to the block service module 104, the distributed computation module 1042 in the block service module splits the learning record into a plurality of subdata with sequence numbers, the distributed storage module 1043 forms a split list of unique identification codes of nodes corresponding to the subdata sequence numbers, broadcasts the subdata and the split list to other nodes of the block chain, when a node initiates a data request, synthesizes new data according to the split list indexes, and generates a hash value of the new data through a hash algorithm. Judging whether the original data hash value is the same as the new data hash value, if so, converting the new data into the original data and outputting the original data; otherwise, the node storing the subdata with the same sequence number is replaced, new data is synthesized again, and whether the hash value of the new data is the same as the hash value of the original data is judged, so that the system safety is ensured.
Based on the online teaching consensus system, the invention also provides a consensus learning recording method, and the method comprises the following specific processing steps with reference to fig. 3:
s1, taking an online teaching consensus system and all online teaching platforms accessed to the system as nodes, deploying a block chain system, collecting online learning records of all the nodes, and dynamically managing credit values of all the nodes of the block chain system.
S101: the user service module 101 manages user data of each online learning platform and sends the data to the data acquisition module 102 in real time;
after various online teaching platforms 30 package the user information, learning and operation records and other information of their own platforms to form a data packet, the data packet is sent to the user service module 101 of the online teaching consensus system through the online teaching information specification interface 20, and after the user service module 101 analyzes the data packet, the user information, the learning and operation record information of the teaching platform where the user service module is located and the like are obtained, and then the information is sent to the data acquisition module 102 in real time. The data collection module 102 collects learning records and operation behavior data of learners in real time, and when the collection of the business data reaches a preset amount or reaches a certain time interval from the last collection of the business data, the data collection module 102 sends the collected business data information to the credit management module 103.
It should be noted that the preset amount of service data is an artificially set amount strategy for the convenience of the online teaching consensus system to measure the continuity and quality of learning of each online learner, and includes, but is not limited to, the number of lessons completed by the learner, the number of continuously completed learning tasks, the number of answering questions, and the like. The time interval from the last collection of the business data is a time strategy artificially set for the convenience of the online teaching consensus system to measure the learning continuity and quality of each online learner. In this embodiment, a comprehensive strategy method is adopted for a preset amount of business data, the preset amount of business data is set to be 15 for the number of learning tasks continuously completed by the online learner, and meanwhile, the time interval from the last collection of business data is set to be 8 hours, and the quantity strategy and the time strategy can be specified according to the calculation resource level of the server to which the online teaching consensus system belongs.
The quantity and time metering strategy has the advantages that on the premise of ensuring accurate and real-time metering of the learning quality of each online learner, the reading and writing frequency of the block chain system is greatly reduced, and the resource utilization efficiency of the block chain system is improved.
S102 the credit management module 103 calculates the credit value of each node in the blockchain system.
In the blockchain system, the specific process of the credit management module 103 calculating the current credit value of the node a in the system is as follows:
the credit management module calculates the credit value of the node in the system by adopting a 'neighboring trust' principle, wherein the 'neighboring trust' principle means that the block chain neighboring node of the node of which the credit management module defaults to calculate the credit value is trusted. Assuming that the block of the node a is connected to the block of the node B through the hash pointer in the blockchain system of the present invention, the node B is a neighboring node of the node a, and it should be noted that there may be multiple blocks in one node, and thus there may be multiple neighboring nodes in one node. When calculating the current credit value of the node a, the credit management module 103 sends a data request to the node B, inquires the success rate of receiving and sending data packets in the historical communication between the node a and the node B, and calculates the credit value F of the node a after receiving the data reply of the node B, and the calculation method comprises the following steps:
wherein,is the success rate of the node B and the node A, M is the number of data packets from the node A successfully sent by the node B in a certain time period, N is the timeThe number of packets received by node B from node a during the interval,n-1 is the number of neighbor nodes of node A,,is the number of time periods.
By using the method of calculating the credit value F, the credit management module 103 calculates the credit value of each node in the blockchain system.
After the credit management module 103 calculates the credit value of a certain node, it broadcasts the node credit value to all other nodes in the blockchain system, and the format of the credit value information is:
the MESSAGE _ Q represents an inquiry request sent by one node to another node to inquire the credit value of the neighbor node; MESSAGE _ R indicates that the MESSAGE issued is a response to the inquiry request by the node; MESSAGE _ B indicates that the sent MESSAGE is used for broadcasting NODE credit value information, NODE _ ID indicates an IP address of a NODE with malicious behavior or a new NODE which wants to join the network for communication, and REU _ VAL is a specific value used for indicating the size of the NODE credit and stored in each NODE credit value table.
S103: the credit management module 103 dynamically manages the credit value of each node.
In order to reduce the frequent data requests required in the process of calculating the credit value, in the time policy interval set in step S101, the credit management module 103 will not repeatedly calculate the credit value of a certain node by requesting data, but implement dynamic management of the credit value by using a credit value consumption policy, and the specific processing procedure is as follows:
using credit consumption mechanisms, nodesThe use value changes along with the time, the credit consumption means that the credit value decreases along with the time, and the latest credit value calculation method of the node is as follows:whereinis the latest value of the credit to be given,is the credit value of the last state,is the time interval between two previous and subsequent receptions of information;taking the system heartbeat period as a time constant;is a credit consumption rate, is a constant, and can be combined with a specific case pairAnd (6) adjusting. When the time interval between two times of information transmission of the node exceedsThe credit value will decrease. Otherwise, the credit value does not change.
The S2 consensus management module 1041 manages the consensus strategy of the blockchain system of the present invention, and ensures that the system has an efficient consensus mechanism and real-time response at any stage.
The consensus management module 1041 stores the consensus strategy of the blockchain system, the credit management module 103 sends the latest credit value of the node to the block service module 104, and the consensus management module 1041 in the block service module automatically switches the appropriate consensus strategy according to the system response efficiency. To achieve an optimal balance of consensus reliability and system response efficiency.
The consensus management module 1041 manages a plurality of consensus strategies, and can automatically select an optimal consensus strategy according to the system running state, and the specific consensus strategy is set as follows:
(1) a reliability prioritization policy.
The reliability priority strategy adopts a 51% principle, namely when any node in a block chain initiates a data request, the consensus result of more than 51% of all nodes in the block chain system is adopted as a final request result, so that the reliability of the data can be ensured to the maximum extent; but the reliability override policy will affect the response real-time of the system.
(2) Balancing strategy
In order to take reliability and response efficiency into consideration when a block chain system is influenced by network quality or impact of communication wave crests and wave troughs, the invention is provided with a balance strategy. The balancing strategy is set as follows:
according to the step of S1, the credit management module 103 manages the credit value of each node in the blockchain system, and for the system of n nodes, the latest credit value corresponding to the node k is recorded asThe latest credit value set of n nodes is recorded asSorting the sets in order of credit from high to low
In a balanced strategy, consensus results are generated to be aggregatedAnd taking the first 51% of nodes as consensus participating nodes, wherein the consensus results of more than 51% of the consensus participating nodes are the final request results, and the most reliable consensus results are obtained by the balance strategy on the premise of ensuring the response efficiency.
(3) Speed priority policy
Under the condition that the communication environment of the block chain system is extremely severe, in order to obtain the optimal response efficiency, the method is provided with a speed priority strategy, and the specific processing procedures are as follows:
sorting collections from recent credit valuesAlpha (0) before selection<Alpha < 1) as a consensus participating node, and under the speed-first strategy, alpha is set to be less than 51% of the balance strategy, and the node with the largest credit value is selected as the consensus participating node at least.
As an embodiment of the invention, during the operation of the blockchain system, the data request timeout events of all nodes are recorded, and for a system with n nodes, the unit time is set(In seconds) while setting two thresholds: threshold number of timeout events per unit time(An integer greater than 0), a timeout node area threshold per unit time(0<<1) Area of overtime node per unit time= number of nodes/n that have a timeout per unit time. According to the data request overtime event condition in the system operation process, the blockThe chain system automatically switches the optimal consensus strategy to improve the response efficiency of the system. In this embodiment, let us noteThe number of timeout events in time isThe handover strategy is as follows:
s3, the distributed computation module 1042 splits the learning record transmitted by the data acquisition module 102 into a plurality of subdata with sequence numbers, forms a split list of unique identification codes of nodes corresponding to the subdata sequence numbers through the distributed storage module 1043, and broadcasts the subdata and the split list to other nodes of the block chain, thereby further improving the system security.
S301: splitting the learning record into a plurality of subdata with sequence numbers through a distributed computing module 1042;
the data acquisition module 102 acquires the learning record data according to the time strategy to form a data packet according to the step S101, wherein the data packet includes the learning data of b nodes, and the average number of characters of each node isRecording the upper limit coefficient of the node set contained in a data packet,Is a control parameter, and the calculation method comprises the following steps:
wherein m is an integerThe total number of characters of the learning record data of all learners in the data packet,indicating the number of characters of the ith node. And (4) rounding the upper limit coefficient c to obtain an upper limit number d, dividing each d node into a node group, storing a complete learning record data, namely the subdata, in each node group, and sequencing the subdata according to the time sequence.
S302: the distributed storage module 1043 forms a splitting list of the unique identification code of the node corresponding to the subdata sequence number, and broadcasts the subdata and the splitting list to other nodes of the block chain.
The d-dimensional node group is obtained after the processing of the distributed computing module, and the distributed storage module 1043 forms a split list of unique identification codes of nodes corresponding to the sub data serial numbers of the d nodes, and broadcasts the sub data and the split list to other nodes of the block chain. And acquiring the storage upper limit p of each node and the total storage upper limit q of all nodes, randomly configuring subdata with a first sequence number on the nodes according to the probability of p/q of each node for storage, and sequentially storing the subdata to each node according to the sequence number sequence of the subdata.
And when the node initiates a data request, synthesizing new data according to the split list index, and generating a hash value of the new data through a hash algorithm. Judging whether the original data hash value is the same as the new data hash value, if so, converting the new data into the original data and outputting the original data; otherwise, the node storing the subdata with the same sequence number is replaced, new data is synthesized again, and whether the hash value of the new data is the same as the hash value of the original data is judged, so that the system safety is ensured.
Claims (6)
1. A consensus learning recording method of an online teaching consensus system based on a block chain comprises the online teaching consensus system (10), an online teaching information specification interface (20) and a plurality of online teaching platforms (30), wherein a learning recording program based on the block chain runs on the online teaching consensus system (10) and forms the block chain system together with the online teaching platforms (30), the online teaching consensus system (10) and the online teaching platforms (30) are physically interconnected through a network, and the online teaching consensus system (10) and the online teaching platforms (30) realize data intercommunication through the online teaching information specification interface (20);
wherein the online teaching consensus system (10) comprises:
the user service module (101) is used for providing registration and operation record data storage for users of the online teaching platform;
the data acquisition module (102) is in data connection with the user service module (101) and is used for collecting the learning records of the user according to the time sequence;
the credit management module (103) is in data connection with the data acquisition module (102) and is used for calculating, storing and dynamically managing a credit value table of each node;
the block service module (104) is in data connection with the credit management module (103) and is used for managing the consensus strategy of the block chain system, receiving information transmitted by the data acquisition module and processing block service data;
the block service module (104) comprises a consensus management module (1041), a distributed computing module (1042) and a distributed storage module (1043);
the consensus management module (1041) is used for managing a consensus strategy of the blockchain system and automatically switching an optimal consensus strategy according to a network state of the blockchain system;
the distributed computing module (1042) is used for distributed processing of the learning record of each node in the block chain system, and dividing the learning record into a plurality of subdata with sequence numbers;
the distributed storage module (1043) broadcasts subdata and a split list to the block chain network, is used for storing learning records and realizing protocols, and distributes the generated new data blocks to all nodes;
the consensus learning recording method of the online teaching consensus system based on the block chain comprises the following steps:
s1, taking an online teaching consensus system (10) and all online teaching platforms (30) accessed to the system as nodes, deploying a block chain system, collecting online learning records of all the nodes, and dynamically managing credit values of all the nodes of the block chain system;
s101: the user service module (101) manages user data of each online learning platform and sends the data to the data acquisition module (102) in real time;
s102: the credit management module (103) calculates the credit value condition of each node in the block chain system; in the step S102, a credit management module (103) calculates the credit value condition of each node in the block chain system; in the block chain system, when a block of a node A is connected to a block of a node B through a hash pointer, the node B is an adjacent node of the node A, when the current credit value of the node A is calculated, a credit management module (103) initiates a data request to the node B, inquires the data packet transceiving success rate in the historical communication between the node A and the node B, and calculates the credit value F of the node A after receiving the data reply of the node B, wherein the calculation method comprises the following steps:
wherein,is the success rate of transceiving between the node B and the node a, M is the number of data packets from the node a successfully transmitted by the node B in a certain time period, N is the number of data packets from the node a received by the node B in a certain time period,n-1 is the number of neighbors of node A,,is the number of time periods;
adopting a credit value F calculation method, a credit management module (103) calculates the credit value of each node in the block chain system;
s103: a credit management module (103) dynamically manages the credit value of each node;
s2, a consensus management module (1041) manages a consensus strategy of the block chain system, and the system is ensured to have an efficient consensus mechanism and response instantaneity at any stage;
s3, the distributed computation module (1042) splits the learning record transmitted by the data acquisition module (102) into a plurality of subdata with sequence numbers, a split list of unique identification codes of nodes corresponding to the subdata sequence numbers is formed through the distributed storage module (1043), the subdata and the split list are broadcasted to other nodes of the block chain, and the system safety is further improved;
s301: splitting the learning record into a plurality of subdata with sequence numbers through a distributed computing module (1042);
s302: the distributed storage module (1043) forms a split list of the unique identification code of the node corresponding to the subdata sequence number, and broadcasts the subdata and the split list to other nodes of the block chain.
2. The consensus learning recording method of block chain based online education consensus system as claimed in claim 1, wherein the network comprises the internet, a local area network or an ad hoc network of custom protocols.
3. The consensus learning recording method of the block chain-based online teaching consensus system according to claim 1, wherein in step S101, each online teaching platform (30) packages user information, learning and operation recording information of its own platform into a data packet, and sends the data packet to a user service module (101) of the online teaching consensus system through an online teaching information specification interface (20), and the user service module (101) analyzes the data packet to obtain the user information and the learning and operation recording information of the teaching platform, and then sends the information to a data acquisition module (102) in real time; the data acquisition module (102) collects learning records and operation behavior data of learners in real time, and when the collection of the business data reaches a preset number or reaches a certain time interval from the last collection of the business data, the data acquisition module (102) sends the collected business data information to the credit management module (103).
4. The consensus learning recording method of block chain-based online education consensus system as claimed in claim 1, wherein in step S103, the credit management module (103) dynamically manages the credit value of each node, and the specific process for implementing dynamic management of the credit value comprises:
by adopting a credit consumption mechanism, the credit value of the node changes along with time, the credit consumption means that the credit value decreases along with time, and the latest credit value calculation method of the node is as follows:whereinis the latest value of the credit to be given,is the credit value of the last state,is the time interval between two previous and subsequent receptions of information;taking the system heartbeat period as a time constant;is the consumption rate of credit, is a constant value, and combines with the specific case pairAnd (6) adjusting.
5. The consensus learning recording method of block chain-based online education consensus system as claimed in claim 1, wherein in step S2, the consensus management module (1041) manages multiple consensus strategies, and automatically selects the best consensus strategy according to the system operation status, and the specific consensus strategy is set as follows:
reliability priority policy: the reliability priority strategy adopts a 51% principle, namely when any node in a block chain initiates a data request, the consensus result of more than 51% of all nodes in the block chain system is adopted as a final request result, so that the reliability of the data can be ensured to the maximum extent; but the reliability priority strategy will affect the response real-time performance of the system;
and (3) balancing strategy: in order to take reliability and response efficiency into consideration when a block chain system is influenced by network quality or impact of communication wave crests and wave troughs, a balance strategy is set, and the balance strategy is set as follows:
according to the step of S1, the credit management module (103) manages the credit value of each node in the blockchain system, and for the system of n nodes, the latest credit value corresponding to the node k is recorded asThe latest credit value set of n nodes is recorded asSorting the sets in order of credit from high to low,
In a balanced strategy, consensus results are generated to be aggregatedTaking the first 51% of nodes as consensus participating nodes, wherein more than 51% of consensus results of the consensus participating nodes are final request results, and the most reliable consensus results are obtained by a balance strategy on the premise of ensuring response efficiency;
speed priority strategy:
under the condition that the communication environment of the block chain system is extremely severe, in order to obtain the optimal response efficiency, a speed priority strategy is set, and the specific processing procedures are as follows:
sorting collections from recent credit valuesAlpha, 0 before selection<And the nodes with alpha less than 1 are used as consensus participating nodes, under the speed priority strategy, the alpha is set to be less than 51% of the balance strategy, and the node with the largest credit value is selected as the consensus participating node at least.
6. The consensus learning recording method of the block chain-based online education consensus system as claimed in claim 5, wherein in step S2, the automatic switching method of the three strategies is:
in the operation process of the blockchain system, data request timeout events of all nodes are recorded, for a system with n nodes, a unit time T ', T' 0 and a unit of second are set, and two thresholds are set simultaneously: threshold number of timeout events per unit time,Is an integer greater than 0; overtime node area threshold per unit time,0<< 1, overtime node area per unit time= node number/n with timeout in unit time, according to the situation of data request timeout event in the system operation process, the block chain system will automatically switch the optimal consensus strategy, and let the number of timeout events in T' time beThe handover strategy is as follows:
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010314254.6A CN111209345B (en) | 2020-04-21 | 2020-04-21 | Online teaching consensus system based on block chain and learning recording method |
CN202011469198.XA CN112487099A (en) | 2020-04-21 | 2020-04-21 | Online teaching consensus system based on block chain and learning recording method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010314254.6A CN111209345B (en) | 2020-04-21 | 2020-04-21 | Online teaching consensus system based on block chain and learning recording method |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011469198.XA Division CN112487099A (en) | 2020-04-21 | 2020-04-21 | Online teaching consensus system based on block chain and learning recording method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111209345A CN111209345A (en) | 2020-05-29 |
CN111209345B true CN111209345B (en) | 2021-01-05 |
Family
ID=70787287
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010314254.6A Active CN111209345B (en) | 2020-04-21 | 2020-04-21 | Online teaching consensus system based on block chain and learning recording method |
CN202011469198.XA Pending CN112487099A (en) | 2020-04-21 | 2020-04-21 | Online teaching consensus system based on block chain and learning recording method |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011469198.XA Pending CN112487099A (en) | 2020-04-21 | 2020-04-21 | Online teaching consensus system based on block chain and learning recording method |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN111209345B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111818605B (en) * | 2020-06-30 | 2022-07-15 | 中国科学技术大学 | Ad hoc network dynamic route learning method based on block chain security attribute |
CN112527647B (en) * | 2020-12-15 | 2022-06-14 | 浙江大学 | NS-3-based Raft consensus algorithm test system |
CN112750056A (en) * | 2020-12-31 | 2021-05-04 | 山东劳动职业技术学院(山东劳动技师学院) | High-employment mathematic information sharing system based on block chain |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108734576B (en) * | 2018-04-04 | 2022-04-19 | 深圳大学 | Block chain-based educational resource sharing method and system |
US11281796B2 (en) * | 2018-06-13 | 2022-03-22 | At&T Intellectual Property I, L.P. | Blockchain based information management |
CN109447858B (en) * | 2018-09-21 | 2021-07-30 | 牛雨丝 | Ubiquitous learning environment construction method based on block chain |
CN110415008B (en) * | 2018-10-23 | 2021-08-10 | 腾讯科技(深圳)有限公司 | Credit data management method, device, node equipment, storage medium and system |
-
2020
- 2020-04-21 CN CN202010314254.6A patent/CN111209345B/en active Active
- 2020-04-21 CN CN202011469198.XA patent/CN112487099A/en active Pending
Non-Patent Citations (1)
Title |
---|
基于区块链的P2P节点信任评价模型;张方等;《山东理工大学学报( 自然科学版)》;20190308;第33卷(第3期);第13-18页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112487099A (en) | 2021-03-12 |
CN111209345A (en) | 2020-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111209345B (en) | Online teaching consensus system based on block chain and learning recording method | |
Yun et al. | DQN-based optimization framework for secure sharded blockchain systems | |
Chen et al. | TRM-IoT: A trust management model based on fuzzy reputation for internet of things | |
US20200059369A1 (en) | Determining consensus by parallel proof of voting in consortium blockchain | |
Can et al. | Sort: A self-organizing trust model for peer-to-peer systems | |
Yu et al. | A survey of multi-agent trust management systems | |
Pei et al. | Blockchain-enabled dynamic spectrum access: cooperative spectrum sensing, access and mining | |
Su et al. | Incentive mechanisms in p2p media streaming systems | |
CN111246586A (en) | Method and system for distributing smart grid resources based on genetic algorithm | |
Fu et al. | Performance optimization for blockchain-enabled distributed network function virtualization management and orchestration | |
CN112532676A (en) | Vehicle calculation task unloading method based on block chain data sharing | |
WO2023168886A1 (en) | Cooperative spectrum sensing method based on highest node degree clustering | |
CN114301935B (en) | Reputation-based internet of things edge cloud collaborative federal learning node selection method | |
CN115473894A (en) | Calculation force security sensing and cooperation method based on block chain in calculation network | |
Antoniou | Game theory, the internet of things and 5G networks | |
Zhang et al. | Graph theory-based QoE-driven cooperation stimulation for content dissemination in device-to-device communication | |
EP1527564B1 (en) | Point coodinator delegation in a wireless network | |
CN112631777B (en) | Searching and resource allocation method based on block chain and edge calculation | |
Wang et al. | Resisting free-riding behavior in BitTorrent | |
Ramani et al. | Rapid establishment of transient trust for ndn-based vehicular networks | |
CN112396892A (en) | Interactive education system and method based on Internet | |
Tajeddine et al. | PATROL: a comprehensive reputation-based trust model | |
Gan et al. | EIoT-PBFT: A multi-stage consensus algorithm for IoT edge computing based on PBFT | |
Oliveira et al. | Improving peer neighborhood on P2P video distribution networks using Push/Pull protocol | |
CN111542074B (en) | Intelligent heterogeneous wireless access method for mobile cloud computing learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220615 Address after: Room 1110, 11th floor, building 1, yard 59, gaoliangqiaoxie street, Haidian District, Beijing 100089 zcy094 Patentee after: Road to success (Beijing) Education Technology Co.,Ltd. Address before: 318000 room 1215, building 1, peninsula garden, Tengda Road, Lubei street, Luqiao District, Taizhou City, Zhejiang Province Patentee before: Taizhou Xiangwen Information Technology Co.,Ltd. |