CN112651830B - Block chain consensus method applied to power resource sharing network - Google Patents

Block chain consensus method applied to power resource sharing network Download PDF

Info

Publication number
CN112651830B
CN112651830B CN202011393625.0A CN202011393625A CN112651830B CN 112651830 B CN112651830 B CN 112651830B CN 202011393625 A CN202011393625 A CN 202011393625A CN 112651830 B CN112651830 B CN 112651830B
Authority
CN
China
Prior art keywords
node
verifier
nodes
leader
transaction
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
Application number
CN202011393625.0A
Other languages
Chinese (zh)
Other versions
CN112651830A (en
Inventor
禹继国
张玉姣
闫碧薇
韩玉冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qilu University of Technology
Original Assignee
Qilu University of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Qilu University of Technology filed Critical Qilu University of Technology
Priority to CN202011393625.0A priority Critical patent/CN112651830B/en
Publication of CN112651830A publication Critical patent/CN112651830A/en
Application granted granted Critical
Publication of CN112651830B publication Critical patent/CN112651830B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S50/00Market activities related to the operation of systems integrating technologies related to power network operation or related to communication or information technologies
    • Y04S50/12Billing, invoicing, buying or selling transactions or other related activities, e.g. cost or usage evaluation

Abstract

The invention discloses a block chain consensus method applied to a power resource sharing network, belongs to the technical field of block chain consensus, and aims to provide a lightweight block chain consensus method to realize the reliability and safety of the power resource sharing network. The method comprises the following steps: all the alliance committee nodes vote to select a leader of the current round; selecting the verifier nodes of the current round, forming a verifier node list, and broadcasting the verifier node list and the block chain height value after signature to each electric energy distribution node; each verifier node collects and verifies transactions from a public network, and broadcasts encrypted transaction messages to corresponding electric energy distribution nodes; each electric energy distribution node decrypts the corresponding encrypted transaction message and broadcasts the transaction message to the corresponding alliance committee node; all the alliance committee nodes vote to verify the transaction and broadcast voting messages to the alliance network; punishing the corresponding verifier nodes, and rewarding the corresponding leaders and verifier nodes.

Description

Block chain consensus method applied to power resource sharing network
Technical Field
The invention relates to the technical field of block chain consensus, in particular to a block chain consensus method applied to a power resource sharing network.
Background
With the development of society, the traditional power grid gradually develops towards the smart power grid, and the development of the smart power grid causes uncertain power demand, which causes unpredictable fluctuation of the power generation amount of the traditional power generator and the flow of the power grid system. In order to reduce the load fluctuation level of the power grid, progress optimization strategies for sharing electric energy by various power grid users are diversified, and due to the fact that various problems such as trade orders, trade users and management accounts are involved in the electric power resource trading process, the trading process between the users and the power grid is time-consuming, and the trading lacks flexibility. Therefore, in order to encourage grid users to achieve demand responses in their own interest, blockchain techniques are combined with distributed energy trading networks.
Blockchain technology was originally used in cryptocurrency "bitcoins" without third parties as a ledger with distributed and immutable features, above which transactions were transparently traceable. The consensus protocol is a key part of the blockchain technology, and achieves the purpose that the non-falsifiable and non-repudiatable ledger records are completed without a third party. Due to the decentralization and high safety of the block chain, the block chain technology is applied to reliably and credibly manage data in the information sharing and resource transaction processes in the power grid scene. The consensus algorithm as a key technology of the block chain plays a crucial role in the efficiency and safety of the power grid system. With conventional consensus algorithms, for example, workloads prove difficult to compute when mining, so that transaction speeds are slow; the equity certificate utilizes the equity held by the participants to replace the mining operation, but easily causes the power to be held in the hands of a few fixed participants; most BFT type consensus algorithm has poor expandability, and the increase of a large number of users is difficult to realize. Therefore, the traditional consensus algorithm cannot meet the requirements of the power grid on efficiency and safety, and a new lightweight consensus mechanism suitable for the power grid system is needed.
For power resource sharing networks applying block chain technology, efficiency and security are important challenges that now need to be addressed. As trading users of the power resource sharing network have limited resources, a lightweight consensus algorithm is required to improve the efficiency of the power resource sharing network. Meanwhile, the accurate implementation of transactions in the power resource sharing network and the requirement of non-tampering require a consensus algorithm capable of preventing power concentration.
Based on the above, how to provide a lightweight block chain consensus processing method for a power resource sharing network to achieve reliability and security of the power resource sharing network is a technical problem to be solved.
Disclosure of Invention
The technical task of the present invention is to provide a block chain consensus method, a terminal and a medium applied to a power resource sharing network to solve the technical problem of how to provide a lightweight block chain consensus method to achieve reliability and security of the power resource sharing network.
In a first aspect, the present invention provides a block chain consensus method applied to a power resource sharing network, where a alliance network of the power resource sharing network is configured with a reward and punishment mechanism and is configured with a plurality of alliance committee nodes and power distribution nodes in one-to-one correspondence, a public network of the power resource sharing network is configured with user nodes, and the consensus in each round includes the following steps:
voting by all the coalition committee nodes to select a leader of the current round according to the random trust values of the coalition committee nodes participating in the election;
according to the random trust value of the user node, the leader selects the verifier nodes of the current round and forms a verifier node list, and the verifier node list and the block chain height value are signed and then broadcast to each electric energy distribution node;
the electric energy distribution node encrypts the block chain height value according to the public key of the verifier node to obtain an encrypted verification message, the encrypted verification message is signed and then sent to each user node, and the user node confirms the identity of the verifier node through decrypting the signed verification message;
each verifier node collects and verifies transactions from a public network, divides the transactions and deposit into a plurality of shares and corresponds to the electric energy distribution nodes one by one for the verified transactions, and broadcasts the encrypted transaction messages to the corresponding electric energy distribution nodes after each share is used as a transaction message and encrypted by the public key of the corresponding electric energy distribution node;
each electric energy distribution node decrypts the corresponding encrypted transaction message and broadcasts the transaction message to the corresponding alliance committee node;
the federation committee nodes recover the transactions and the deposit corresponding to each verifier node, and for each transaction, all the federation committee nodes vote to verify the transaction and broadcast voting messages to the federation network based on the deposit and the trust value of the corresponding verifier node;
based on voting information, taking the transaction which does not pass verification as a malicious transaction, collecting verifier nodes corresponding to the malicious transaction of the current round by a leader and broadcasting the verifier nodes to a alliance network, triggering a reward and punishment mechanism to punish the corresponding verifier nodes, taking the transaction which passes verification as a legal transaction, collecting the legal transaction of the current round by the leader and packaging the legal transaction as blocks to be broadcast to the alliance network, and triggering the reward and punishment mechanism to award the corresponding leader and verifier nodes.
Preferably, the random trust value of each federation committee node is derived based on the random trust value of the federation committee node of the previous round and the number of times the federation committee node was selected as the leader, and the calculation formula is:
Figure GDA0003982718840000031
Figure GDA0003982718840000032
wherein, T i r Representing the random trust value of the node i of the alliance committee in the r-th round of consensus and the T corresponding to the first round of consensus i r Is an initial value;
r represents a random value corresponding to the R-th round consensus;
n represents the total number of federation-committee nodes in the federation network;
N i representing the number of times a federation committee node i was selected as the leader.
Preferably, the league committee node selects the leader of the current round according to the random trust values of the league committee nodes participating in the election, and the method comprises the following steps:
the alliance-committee nodes participating in the election act as elections, each of which transmits a voting request message (i, voteRequest) pri
For each contestant, each alliance committee node in the alliance network sends a voting response message to vote based on the random trust value of the contestant;
and selecting the competitor with the maximum random trust value as a leader.
Preferably, the random trust value of each user node is obtained based on the random trust value of the user node in the previous round and the number of times that the user node is selected as the verification node, and the calculation formula is as follows:
Figure GDA0003982718840000041
Figure GDA0003982718840000042
wherein, the first and the second end of the pipe are connected with each other,
Figure GDA0003982718840000043
representing the random trust value of the user v in the r-th round of consensus, corresponding to the first round of consensus
Figure GDA0003982718840000044
Is an initial value;
r represents a random value corresponding to the R-th round consensus;
n represents the total number of users in the public network;
N v representing the number of times the federation committee node v was selected as the verifier.
Preferably, according to the random trust value of the user node, the leader selects the verifier nodes of the current round and forms a verifier node list, and the verifier node list and the block chain height value are signed and then broadcasted to each electric energy distribution node, wherein the method comprises the following steps:
the leader selects the user nodes with the random trust values larger than or equal to the threshold value as verifier candidates according to the information of the user nodes, and forms a verifier candidate list validatedisted;
leader message verifier candidate
Figure GDA0003982718840000045
Sending to each alliance-committee node;
voting on the verifier candidates by each alliance committee node according to the random trust value of the user node, voting on the trusted verifier candidate and the untrusted verifier candidate to be not, and voting information
Figure GDA0003982718840000046
Broadcasting into the alliance network;
the leader selects the first v members with votes being positive to form a verification group, if the number of verification group members reaches a preset value, a candidate of a verifier in the verification group is used as a verifier node to form a verifier node list, and if the number of verification group members does not meet the preset value, a threshold value is changed and the members are selected again to form the verification group;
the verifier node list and the height value of the current block chain
Figure GDA0003982718840000047
And broadcasting to the electric energy distribution node after signing.
Preferably, the electric energy distribution nodes cooperate with each other, the block chain height values are encrypted respectively according to the public keys of the verifier nodes to form verification arrays, the electric energy distribution node corresponding to the leader sends the verification arrays signed by the private key of the electric energy distribution node to each user node, and the user nodes confirm the identity of the verifier nodes of the user nodes by decrypting the verification arrays signed by the user nodes.
Preferably, each verifier node collects and verifies transactions from the public network, comprising the steps of:
the method comprises the steps that a verifier node collects transactions from a public network, and the transactions are sent to the public network after being subjected to hash calculation and signature by a corresponding user node;
verifying the signature of the transaction by the verifier node, and confirming that the transaction is from a real user node;
and verifying the hash of the transaction by the verifier node and confirming the correctness of the transaction.
Preferably, the encrypted transaction message is broadcast to the corresponding electric energy distribution node through an SSSS algorithm;
the federation committee nodes recover the transactions and deposit corresponding to each verifier node through the SSSS algorithm.
Preferably, the leader collects the legal transactions in the round and packs the legal transactions into blocks to be broadcast to the alliance network, and a reward and punishment mechanism is triggered to reward the corresponding leader and verifier nodes, and the method comprises the following steps:
(1) The leader selects the deals meeting the preset voting number as legal deals according to the voting information, the legal deals are packaged into blocks, and the blocks are used as preselected blocks to be broadcast to the alliance network;
(2) The other nodes of the alliance committee except the leader verify the preselected block, if the verification is passed, the leader connects the preselected block as a final block into the block chain and performs the step (3), and if the verification is not passed, the leader broadcasts a verification failure message into the alliance network and performs the step (5);
(3) The electric energy distribution node receives the final block, broadcasts the final block to a public network, completes the consensus of the round and triggers a reward and punishment mechanism and a reward and punishment mechanism;
(4) Based on a reward mechanism, fund rewards are conducted on verifier nodes, leaders and voting alliance committee nodes corresponding to the current round of legal transaction, and random trust values of the corresponding verifier nodes and the leaders are improved;
(5) And punishing the leader of the current round based on a punishment mechanism in the reward and punishment mechanism, sending out a leader replacement application by the alliance committee node, reducing the random trust value of the leader of the current round to an initial random trust value, and canceling the opportunity that the leader of the current round participates in the leader of the next round as a contestant.
Preferably, the leader collects verifier nodes corresponding to the malicious transaction of the current round and broadcasts the verifier nodes to the alliance network, and a reward punishment mechanism is triggered to punish the corresponding verifier nodes, and the method comprises the following steps:
the leader selects the transaction which does not meet the preset voting number as a malicious transaction according to the voting information, and the verifier node corresponding to the malicious transaction is used as a malicious verifier node;
collecting the malicious verifier nodes of the round to form a malicious verifier node list, broadcasting the malicious verifier node list to the alliance network, and triggering a reward punishment mechanism;
punishment is carried out on the malicious verifier node based on a punishment mechanism in the reward punishment mechanism, verifier deposit contained in the transaction is deducted to be used as capital punishment, the deducted verifier deposit is stored in a reward amount wallet, the malicious verifier node is broadcasted in the alliance network, and the random trust value of the malicious verifier node is reduced to be an initial random trust value.
In a second aspect, the present invention provides a terminal comprising a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory being interconnected, the memory being configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method according to any of the first aspects.
In a third aspect, the invention provides a medium, being a computer readable storage medium, having stored thereon a computer program comprising program instructions which, when executed by a processor, the processor performs the method according to any of the first aspect.
The block chain consensus method, the terminal and the medium applied to the power resource sharing network have the following advantages:
1. the alliance committee node elects the leader according to the random trust value of the contestant, and due to the superiority of the random trust value, the leader can be guaranteed not to be fixed in partial nodes, so that the power is dispersed, and the leader elects the verifier node according to the random trust value of the user node, so that the power is dispersed;
2. the verifier node list and the block chain height value are signed by the leader and then broadcast to each electric energy distribution node, the electric energy distribution nodes are matched with each other, the block chain height value is encrypted by a public key of the verifier node to form a verification array, the electric energy distribution node corresponding to the leader sends the verification array signed by a private key of the electric energy distribution node to each user node, and the user nodes confirm the identity of the verifier node by decrypting the verification array signed by the user node, so that encryption transmission is realized, and the accuracy and the safety of the verifier node are guaranteed;
3. the transaction verification and the block verification are separated, so that the efficiency of the consensus algorithm is improved;
4. the privacy of the transaction is ensured by the encrypted transmission of the transaction;
5. the second verification of the node on the transaction by the alliance committee prevents malicious transactions provided by an incorrect verifier and prevents Sybil attacks;
6. the application of an excitation mechanism improves the activity of the consensus algorithm.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
The invention is further described below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a block chain consensus method applied to a power resource sharing network according to an embodiment.
Detailed Description
The present invention is further described in the following with reference to the drawings and the specific embodiments so that those skilled in the art can better understand the present invention and can implement the present invention, but the embodiments are not to be construed as limiting the present invention, and the embodiments and the technical features of the embodiments can be combined with each other without conflict.
The embodiment of the invention provides a block chain consensus method applied to a power resource sharing network, which is used for solving the technical problem of how to provide a lightweight block chain consensus method to realize the reliability and safety of the power resource sharing network.
Example (b):
the block chain consensus method applied to the power resource sharing network is characterized in that a reward and punishment mechanism is configured in a alliance network of the power resource sharing network, a plurality of alliance committee nodes and electric energy distribution nodes which correspond to each other one by one are configured in the alliance network, and user nodes are configured in a public network of the power resource sharing network.
The consensus of each round comprises the following steps:
s100, voting by all the alliance committee nodes to select a leader of the current round according to the random trust values of the alliance committee nodes participating in the election;
s200, according to the random trust value of the user nodes, a leader selects the verifier nodes of the current round and forms a verifier node list, and the verifier node list and the block chain height value are signed and then broadcasted to each electric energy distribution node;
s300, the electric energy distribution node encrypts the block chain height value according to the public key of the verifier node to obtain an encrypted verification message, the encrypted verification message is signed and then sent to each user node, and the user node confirms the identity of the verifier node through decrypting the signed verification message;
s400, each verifier node collects and verifies transactions from a public network, divides the transactions and deposit into multiple shares and corresponds to the electric energy distribution nodes one by one for the verified transactions, and broadcasts encrypted transaction messages to the corresponding electric energy distribution nodes after each share is used as a transaction message and encrypted by a public key of the corresponding electric energy distribution node;
s500, each electric energy distribution node decrypts the corresponding encrypted transaction message and broadcasts the transaction message to the corresponding alliance committee node;
s600, recovering the transaction and deposit corresponding to each verifier node by the alliance committee nodes, and voting and verifying the transaction and broadcasting voting information to an alliance network by all the alliance committee nodes based on the deposit and the trust value of the corresponding verifier node for each transaction;
s700, based on voting messages, taking the transaction which does not pass verification as malicious transaction, collecting verifier nodes corresponding to the malicious transaction of the current round by a leader and broadcasting the verifier nodes to a alliance network, triggering a reward and punishment mechanism to punish the corresponding verifier nodes, taking the transaction which passes verification as legal transaction, collecting the legal transaction of the current round by the leader and packaging the legal transaction as blocks to be broadcast to the alliance network, and triggering the reward and punishment mechanism to award the corresponding leader and verifier nodes.
In this embodiment, the random trust value of each federation committee node is obtained based on the random trust value of the previous round of federation committee nodes and the number of times the federation committee node is selected as the leader, and the calculation formula is as follows:
Figure GDA0003982718840000081
Figure GDA0003982718840000091
wherein, T i r Representing the random trust value of the node i of the alliance committee in the r-th round of consensus and the T corresponding to the first round of consensus i r Is an initial value;
r represents a random value corresponding to the R-th round consensus;
n represents the total number of federation-committee nodes in the federation network;
N i representing the number of times a federation committee node i was selected as the leader.
The alliance committee nodes select the leader of the current round according to the random trust values of the alliance committee nodes participating in the election, and the method comprises the following steps:
S110、the joint committee nodes participating in the election are used as the elections, and each election transmits a voting request message
Figure GDA0003982718840000092
S120, for each contestant, each alliance committee node in the alliance network sends a voting response message to vote based on the random trust value of the contestant;
and S130, selecting the competitor with the maximum random trust value as a leader.
The random trust value of each user node is obtained based on the random trust value of the user node in the previous round and the times of selecting the user node as a verification node, and the calculation formula is as follows:
Figure GDA0003982718840000093
Figure GDA0003982718840000094
wherein the content of the first and second substances,
Figure GDA0003982718840000095
representing the random trust value of the user v in the r-th round of consensus and corresponding to the first round of consensus
Figure GDA0003982718840000096
Is an initial value;
r represents a random value corresponding to the R-th round consensus;
n represents the total number of users in the public network;
N v representing the number of times the federation committee node v was selected as the verifier.
According to the random trust value of the user node, the leader selects the verifier nodes of the current round and forms a verifier node list, and the verifier node list and the block chain height value are signed and then broadcast to each electric energy distribution node, and the method comprises the following steps:
s210, the leader selects the user nodes with the random trust values larger than or equal to the threshold value as verifier candidates according to the information of the user nodes, and forms a verifier candidate list validatedEdandideletList;
s220, the leader sends a verifier candidate message
Figure GDA0003982718840000101
Sending to each alliance-committee node;
s230, voting on the verifier candidates by each alliance committee node according to the random trust value of the user node, voting yes on the trusted verifier candidates and voting no on the untrusted verifier candidates, and voting information
Figure GDA0003982718840000102
Broadcasting into the alliance network;
s240, the leader selects the first v members voted to be positive to form a verification group, if the number of verification group members reaches a preset value, a verifier candidate in the verification group serves as a verifier node to form a verifier node list, and if the number of verification group members does not meet the preset value, a threshold value is changed and the members are selected again to form the verification group;
s250, verifier node list and current block chain height value
Figure GDA0003982718840000103
And broadcasting to the electric energy distribution node after signing.
In step S300, the electric energy distribution nodes cooperate with each other, the block chain height values are encrypted respectively according to the public key of each verifier node to form a verification array, the electric energy distribution node corresponding to the leader sends the verification array signed by its private key to each user node, and the user node confirms the identity of its verifier node by decrypting the verification array signed by its private key.
In concrete implementation, all the electric energy distribution nodes are coordinated, and the block chain height value h is encrypted in turn based on the public key of the verifier node in the verifier node list to obtain hpk v To be higher than hpk v Combined into an array EncryptediLst [ v ]]Later, an array EncryptedLst [ v ] is generated by the private key pair of the electric energy distribution node corresponding to the leader]Signing is carried out, and the signed verification message is obtained
Figure GDA0003982718840000104
Verifying the message after signing
Figure GDA0003982718840000105
To a user node of the public network.
The user node in the public network receives the verification message encrypted by the power distribution node
Figure GDA0003982718840000106
The user node capable of decrypting the block chain height value confirms that the user node becomes the verifier node.
And the verifier collects and verifies the transaction in the public network, and the transaction is sent to the public network after being subjected to hash calculation and signature by the corresponding user node. Determining that a source belongs to a real user node by verifying a transaction signature, determining the correctness of the transaction by verifying the Hash of the transaction, then dividing the verified transaction into m transaction messages by combining a certain amount of deposit, wherein m corresponds to the number of electric energy distribution nodes, namely the m transaction messages correspond to the electric energy distribution nodes one by one, and respectively using a public key pk of the corresponding electric energy distribution node to the transaction messages of each share by using a (k, m) SSSS scheme g Encrypting, and then encrypting m encrypted transaction messages
Figure GDA0003982718840000111
Respectively broadcasting to the corresponding electric energy distribution nodes.
The electric energy distribution node receives the encrypted transaction message
Figure GDA0003982718840000112
Then decrypted and broadcast
Figure GDA0003982718840000113
Corresponding federation committee node.
Federation committee nodes recover the transaction and deposit transactionist for each verifier node using the SSSS algorithm&Deposit and broadcast to the federation network, and for each transaction, all federation committee nodes vote to validate the transaction and broadcast a voting message to the federation network based on the Deposit and the trust value of the corresponding verifier node
Figure GDA0003982718840000114
The leader selects the transaction which does not meet the preset voting number as a malicious transaction according to the voting information, and the verifier node corresponding to the malicious transaction is used as a malicious verifier node; the leader collects the malicious verifier nodes of the current round to form a malicious verifier node list, broadcasts the malicious verifier node list to the alliance network, and triggers a reward and punishment mechanism; punishing a malicious verifier node based on a punishment mechanism in a reward punishment mechanism, deducting verifier deposit contained in transaction as capital punishment, storing the deducted verifier deposit into a reward amount wallet, broadcasting the malicious verifier node in a alliance network, and reducing the random trust value of the malicious verifier node to an initial random trust value, namely the initial random trust value
Figure GDA0003982718840000115
The leader selects the deals meeting the preset voting number as legal deals according to the voting information, the legal deals are packaged into blocks, and the blocks are used as preselected blocks to be broadcast to the alliance network; other coalition committee nodes except the leader authenticate the preselected block.
If the verification is passed, the leader connects the preselected block as a final block to the block chain, the electric energy distribution node receives the final block and broadcasts the final block to the public network, the common recognition of the round is completed, and a reward and punishment mechanism is triggered to win the reward and punishment mechanism; awarding the verifier nodes, the leaders and the voting alliance committee nodes corresponding to the current round of legal transaction based on an awarding mechanism, and particularly, improving the initial results of the corresponding verifier nodesRandom trust values, i.e.
Figure GDA0003982718840000116
Making a certain fund award to the leader and increasing its random trust value, i.e. T i r =T i r +T i r X 10%, giving a certain monetary reward to the verifier node that votes positively.
If the verification fails, because the new block generated by the leader is not agreed by most of the joint committee nodes, the leader is punished, the joint committee members receive the block agreement information, send a leader replacement application and reduce the trust value of the current leader to be the initial trust value T i r =T i 0 And simultaneously, the chance that the member of the alliance is used as a leader in the next election is cancelled.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that many more embodiments of the invention are possible that combine the features of the different embodiments described above and still fall within the scope of the invention.

Claims (8)

1. The block chain consensus method applied to the power resource sharing network is characterized in that a reward and punishment mechanism is configured in a alliance network of the power resource sharing network, a plurality of alliance committee nodes and electric energy distribution nodes which correspond to each other one by one are configured in the alliance network, a user node is configured in a public network of the power resource sharing network, and each round of consensus comprises the following steps:
voting by all the coalition committee nodes to select a leader of the current round according to the random trust values of the coalition committee nodes participating in the election;
according to the random trust value of the user node, the leader selects the verifier nodes of the current round and forms a verifier node list, and the verifier node list and the block chain height value are signed and then broadcast to each electric energy distribution node;
the electric energy distribution node encrypts the block chain height value according to the public key of the verifier node to obtain an encrypted verification message, the encrypted verification message is signed and then sent to each user node, and the user node confirms the identity of the verifier node through decrypting the signed verification message;
each verifier node collects and verifies transactions from a public network, divides the transactions and deposit into a plurality of shares and corresponds to the electric energy distribution nodes one by one for the verified transactions, and broadcasts the encrypted transaction messages to the corresponding electric energy distribution nodes after each share is used as a transaction message and encrypted by the public key of the corresponding electric energy distribution node;
each electric energy distribution node decrypts the corresponding encrypted transaction message and broadcasts the transaction message to the corresponding alliance committee node;
the alliance committee nodes recover the transactions and the deposit corresponding to each verifier node, and for each transaction, all the alliance committee nodes vote and verify the transactions and broadcast voting messages to the alliance network on the basis of the deposit and the trust value of the corresponding verifier node;
based on voting information, taking the transaction which does not pass verification as malicious transaction, collecting verifier nodes corresponding to the malicious transaction of the current round by a leader and broadcasting the verifier nodes to a alliance network, triggering a reward and punishment mechanism to punish the corresponding verifier nodes, taking the transaction which passes verification as legal transaction, collecting the legal transaction of the current round by the leader and packaging the legal transaction into blocks to be broadcast to the alliance network, and triggering the reward and punishment mechanism to award the corresponding leader and verifier nodes;
the random trust value of each federation committee node is obtained based on the random trust value of the previous round of the federation committee nodes and the number of times the federation committee node was selected as the leader, and the calculation formula is as follows:
Figure FDA0003982718830000021
Figure FDA0003982718830000022
wherein, T i r Representing the random trust value of the node i of the alliance committee in the r-th round of consensus and the T corresponding to the first round of consensus i r Is an initial value of initialization;
r represents a random value corresponding to the R-th round consensus;
n represents the total number of federation-committee nodes in the federation network;
N i representing the number of times a federation committee node i is selected as a leader;
the random trust value of each user node is obtained based on the random trust value of the user node in the previous round and the times of selecting the user node as a verification node, and the calculation formula is as follows:
Figure FDA0003982718830000023
Figure FDA0003982718830000024
wherein the content of the first and second substances,
Figure FDA0003982718830000025
representing the random trust value of the user v in the r-th round of consensus, corresponding to the first round of consensus
Figure FDA0003982718830000026
Is an initial value;
r represents a random value corresponding to the R-th round consensus;
n represents the total number of users in the public network;
N v representing the number of times the federation committee node v was selected as the verifier.
2. The method of claim 1, wherein the league committee node selects the leader of the current round according to the random trust value of the league committee nodes participating in the election, comprising:
the joint committee nodes participating in the election are used as the elections, and each election transmits a voting request message
Figure FDA0003982718830000031
For each contestant, each alliance committee node in the alliance network sends a voting response message to vote based on the random trust value of the contestant;
and selecting the election with the maximum random trust value as a leader.
3. The method of claim 1, wherein the leader selects the verifier nodes of the current round and forms a verifier node list according to the random trust values of the user nodes, and broadcasts the verifier node list and the block chain height value to each power distribution node after signing, comprising the following steps:
the leader selects the user nodes with the random trust values larger than or equal to the threshold value as verifier candidates according to the information of the user nodes, and forms a verifier candidate list validatedisted;
leader message of verifier candidate
Figure FDA0003982718830000032
Sending to each alliance-committee node;
voting on the verifier candidates by each alliance committee node according to the random trust value of the user node, voting on the trusted verifier candidate and the untrusted verifier candidate to be not, and voting information
Figure FDA0003982718830000033
Broadcasting into the alliance network;
the leader selects the first v members voted for yes to form a verification group, if the number of verification group members reaches a preset value, a candidate of a verifier in the verification group serves as a verifier node to form a verifier node list, and if the number of verification group members does not meet the preset value, a threshold value is changed and the members are reselected to form the verification group;
the verifier node list and the height value of the current block chain
Figure FDA0003982718830000034
And broadcasting to the electric energy distribution node after signing.
4. The method according to claim 1, wherein the power distribution nodes cooperate with each other to encrypt the height values of the blockchains according to the public keys of the verifier nodes to form a verification array, the power distribution node corresponding to the leader sends the verification array signed by its private key to each user node, and the user node confirms the identity of the verifier node by decrypting the verification array signed by its private key.
5. The blockchain consensus method applied to the power resource sharing network according to claim 1, wherein each verifier node collects and verifies transactions from the public network, comprising the steps of:
the method comprises the steps that a verifier node collects transactions from a public network, and the transactions are sent to the public network after being subjected to hash calculation and signature by a corresponding user node;
verifying the signature of the transaction by the verifier node, and confirming that the transaction is from a real user node;
and verifying the hash of the transaction by the verifier node and confirming the correctness of the transaction.
6. The blockchain consensus method as claimed in claim 1, wherein the encrypted transaction message is broadcasted to the corresponding power distribution node through SSSS algorithm;
the federation committee nodes recover the transactions and deposit corresponding to each verifier node through the SSSS algorithm.
7. The block chain consensus method applied to the power resource sharing network of claim 1, wherein a leader collects a legal transaction of a current round and packages the legal transaction into a block to be broadcast to the alliance network, and triggers a reward and punishment mechanism to reward the corresponding leader and verifier nodes, comprising:
(1) The leader selects the deals meeting the preset voting number as legal deals according to the voting information, the legal deals are packaged into blocks, and the blocks are used as preselected blocks to be broadcast to the alliance network;
(2) The other nodes of the alliance committee except the leader verify the preselected block, if the verification is passed, the leader connects the preselected block as a final block into the block chain and performs the step (3), and if the verification is not passed, the leader broadcasts a verification failure message into the alliance network and performs the step (5);
(3) The electric energy distribution node receives the final block, broadcasts the final block to a public network, completes the consensus of the round and triggers a reward and punishment mechanism and a reward mechanism;
(4) Based on a reward mechanism, fund rewards are conducted on verifier nodes, leaders and voting alliance committee nodes corresponding to the current round of legal transaction, and random trust values of the corresponding verifier nodes and the leaders are improved;
(5) And punishing the leader of the current round based on a punishment mechanism in the reward and punishment mechanism, sending out a leader replacement application by the alliance committee node, reducing the random trust value of the leader of the current round to an initial random trust value, and canceling the opportunity that the leader of the current round participates in the leader of the next round as a contestant.
8. The block chain consensus method applied to the power resource sharing network of claim 1, wherein the leader collects verifier nodes corresponding to the current round of malicious transaction and broadcasts the verifier nodes to the alliance network, and the trigger reward and punishment mechanism punishs the corresponding verifier nodes, comprising the steps of:
the leader selects the transaction which does not meet the preset voting number as a malicious transaction according to the voting information, and the verifier node corresponding to the malicious transaction is used as a malicious verifier node;
collecting malicious verifier nodes of the current round to form a malicious verifier node list, broadcasting the malicious verifier node list to the alliance network, and triggering a reward punishment mechanism;
punishment is carried out on the malicious verifier node based on a punishment mechanism in the reward punishment mechanism, verifier deposit contained in the transaction is deducted to be used as capital punishment, the deducted verifier deposit is stored in a reward amount wallet, the malicious verifier node is broadcasted in the alliance network, and the random trust value of the malicious verifier node is reduced to be an initial random trust value.
CN202011393625.0A 2020-12-03 2020-12-03 Block chain consensus method applied to power resource sharing network Active CN112651830B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011393625.0A CN112651830B (en) 2020-12-03 2020-12-03 Block chain consensus method applied to power resource sharing network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011393625.0A CN112651830B (en) 2020-12-03 2020-12-03 Block chain consensus method applied to power resource sharing network

Publications (2)

Publication Number Publication Date
CN112651830A CN112651830A (en) 2021-04-13
CN112651830B true CN112651830B (en) 2023-01-24

Family

ID=75351088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011393625.0A Active CN112651830B (en) 2020-12-03 2020-12-03 Block chain consensus method applied to power resource sharing network

Country Status (1)

Country Link
CN (1) CN112651830B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297310B (en) * 2021-06-15 2023-03-21 广东工业大学 Method for selecting block chain fragmentation verifier in Internet of things
CN114499952B (en) * 2021-12-23 2024-04-09 中电科大数据研究院有限公司 Alliance chain consensus identity authentication method
CN114463009B (en) * 2022-04-13 2022-06-28 成都理工大学 Method for improving transaction security of large-scale energy nodes
CN115689760B (en) * 2022-12-30 2023-03-03 国网区块链科技(北京)有限公司 Block chain fragmentation consensus method, device and equipment for high concurrent power transaction
CN116996521B (en) * 2023-09-28 2023-12-15 江西农业大学 Relay committee cross-chain interaction system and method based on trust evaluation model

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105611600A (en) * 2016-02-02 2016-05-25 中国科学院上海微系统与信息技术研究所 QoE (Quality of Experience) requirement oriented secure routing method for Internet of Things
CN107395403A (en) * 2017-07-07 2017-11-24 北京区块链云科技有限公司 A kind of fiduciary block chain common recognition method suitable for extensive ecommerce
CN109360100A (en) * 2018-11-13 2019-02-19 北京航空航天大学 Transaction rapid acknowledgment method and device based on block chain technology
CN109949034A (en) * 2019-03-06 2019-06-28 北京工业大学 Block chain common recognition method based on Credibility Assessment
CN109964242A (en) * 2018-05-25 2019-07-02 北京大学深圳研究生院 A kind of block chain common recognition method based on trusting relationship
CN110189128A (en) * 2019-06-06 2019-08-30 西安安盟智能科技股份有限公司 A kind of algorithm and device of the distributed common recognition quickly generated for block
AU2018347187A1 (en) * 2018-11-07 2020-05-21 Advanced New Technologies Co., Ltd. Facilitating practical byzantine fault tolerance blockchain consensus and node synchronization
CN111241114A (en) * 2020-01-07 2020-06-05 中国科学院信息工程研究所 Intelligent service transaction block chain credit management method and system combining transaction and consensus
CN112017051A (en) * 2020-10-29 2020-12-01 北京易真学思教育科技有限公司 Block chain system, related method, user node and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105611600A (en) * 2016-02-02 2016-05-25 中国科学院上海微系统与信息技术研究所 QoE (Quality of Experience) requirement oriented secure routing method for Internet of Things
CN107395403A (en) * 2017-07-07 2017-11-24 北京区块链云科技有限公司 A kind of fiduciary block chain common recognition method suitable for extensive ecommerce
CN109964242A (en) * 2018-05-25 2019-07-02 北京大学深圳研究生院 A kind of block chain common recognition method based on trusting relationship
AU2018347187A1 (en) * 2018-11-07 2020-05-21 Advanced New Technologies Co., Ltd. Facilitating practical byzantine fault tolerance blockchain consensus and node synchronization
CN109360100A (en) * 2018-11-13 2019-02-19 北京航空航天大学 Transaction rapid acknowledgment method and device based on block chain technology
CN109949034A (en) * 2019-03-06 2019-06-28 北京工业大学 Block chain common recognition method based on Credibility Assessment
CN110189128A (en) * 2019-06-06 2019-08-30 西安安盟智能科技股份有限公司 A kind of algorithm and device of the distributed common recognition quickly generated for block
CN111241114A (en) * 2020-01-07 2020-06-05 中国科学院信息工程研究所 Intelligent service transaction block chain credit management method and system combining transaction and consensus
CN112017051A (en) * 2020-10-29 2020-12-01 北京易真学思教育科技有限公司 Block chain system, related method, user node and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Proof-of-Trust Consensus Protocol for Enhancing Accountability in Crowdsourcing Services;Jun Zou et al.;《IEEE Transactions on Services Computing》;20190601;全文 *
基于可信性评估的区块链共识机制的研究;王冠,张文月;《郑州大学学报(理学版)》;20200930;全文 *

Also Published As

Publication number Publication date
CN112651830A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN112651830B (en) Block chain consensus method applied to power resource sharing network
CN109360100B (en) Transaction rapid confirmation method and device based on block chain technology
CN109842606B (en) Block chain consensus algorithm and system based on consistent Hash algorithm
Ruffing et al. P2P mixing and unlinkable bitcoin transactions
CN109447795B (en) Byzantine consensus method supporting rapid achievement of final confirmation
US20200082126A1 (en) Methods and system for collecting statistics against distributed private data
CN110198213B (en) System based on secret shared random number consensus algorithm
US20190147438A1 (en) Distributed transaction propagation and verification system
US8010782B2 (en) Method and system for mediated secure computation
CN110855432B (en) Asynchronous BFT & DPOS consensus mechanism for assigning verifier rewards based on verifiable random functions
US11503036B2 (en) Methods of electing leader nodes in a blockchain network using a role-based consensus protocol
Zhang et al. Cycledger: A scalable and secure parallel protocol for distributed ledger via sharding
CN111767569A (en) Access authorization method and node of block chain
Xue et al. STBC: A novel blockchain-based spectrum trading solution
CN113422805B (en) Fragment consensus method based on verifiable random function
CN110830244A (en) Anti-quantum computing vehicle networking method and system based on identity secret sharing and alliance chain
CN115801260B (en) Block chain-assisted collaborative attack and defense game method in untrusted network environment
CN110990790B (en) Data processing method and equipment
CN113612604A (en) Asynchronous network-oriented safe distributed random number generation method and device
Wang et al. Blockchain-based dynamic energy management mode for distributed energy system with high penetration of renewable energy
Kilari et al. Robust revocable anonymous authentication for vehicle to grid communications
CN116595094A (en) Federal learning incentive method, device, equipment and storage medium based on block chain
Aluko et al. Proof-of-reputation: an alternative consensus mechanism for blockchain systems
CN114143021B (en) News information credit score system based on block chain
Hu et al. Privacy-preserving combinatorial auction without an auctioneer

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