CN112333251B - Block chain consensus distributed power transaction proxy node selection method and system - Google Patents

Block chain consensus distributed power transaction proxy node selection method and system Download PDF

Info

Publication number
CN112333251B
CN112333251B CN202011159674.8A CN202011159674A CN112333251B CN 112333251 B CN112333251 B CN 112333251B CN 202011159674 A CN202011159674 A CN 202011159674A CN 112333251 B CN112333251 B CN 112333251B
Authority
CN
China
Prior art keywords
value
node
credit
transaction
nodes
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
CN202011159674.8A
Other languages
Chinese (zh)
Other versions
CN112333251A (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.)
State Grid Corp of China SGCC
State Grid Zhejiang Electric Power Co Ltd
China Electric Power Research Institute Co Ltd CEPRI
Original Assignee
State Grid Corp of China SGCC
State Grid Zhejiang Electric Power Co Ltd
China Electric Power Research Institute Co Ltd CEPRI
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 State Grid Corp of China SGCC, State Grid Zhejiang Electric Power Co Ltd, China Electric Power Research Institute Co Ltd CEPRI filed Critical State Grid Corp of China SGCC
Priority to CN202011159674.8A priority Critical patent/CN112333251B/en
Publication of CN112333251A publication Critical patent/CN112333251A/en
Application granted granted Critical
Publication of CN112333251B publication Critical patent/CN112333251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention relates to a block chain consensus distributed power transaction proxy node selection method and a block chain consensus distributed power transaction proxy node selection system, which can meet the distributed processing requirements during distributed photovoltaic power generation transaction, and are high in processing speed and efficiency. The method comprises the following steps: s1, counting first parameter values of all nodes of a block chain, and determining credit values of all nodes based on the first parameter values; s2, obtaining second parameter values of all nodes according to interoperation results among all nodes of the block chain; s3, determining a consensus value of each node based on the credit value of each node and the second parameter value; and S4, determining an optimal proxy node and a candidate proxy node based on the common value of each node.

Description

Block chain consensus distributed power transaction proxy node selection method and system
Technical Field
The invention belongs to the technical field of blockchain, and particularly relates to a blockchain consensus distributed power transaction proxy node selection method and system.
Background
The blockchain consensus mechanism can ensure the consistency and correctness of each transaction on all nodes. In addition to cryptography, the consensus mechanism is the core part of the blockchain and is the key to ensure that the blockchain system is continuously operated. Currently, the main consensus algorithms of the blockchain system are POW, proof of equity (POS), DPOS, and the like.
As shown in Table 1, the DPOS consensus mechanism has the highest efficiency and the lowest resource consumption, and omits the process of mining, and the selected agent nodes directly pack transaction blocks and broadcast the transaction blocks into a P2P (Peer-to-Peer) network, so that the transaction time can reach the second level, the transaction number per second can be greatly improved, and the transaction number per second can be represented by the following formula
Wherein N is TPS For each second of transaction, deltaT is the time required from initiation of transaction broadcast to final secure validation, N trans Indicating the number of transactions for that time period.
Table 1 comparison of three consensus mechanisms
During distributed photovoltaic transaction, the existing consensus mechanism cannot meet the distributed processing requirement due to the fact that the randomness and intermittence of photovoltaic power generation are large, the processing speed is low, and the efficiency is low.
Disclosure of Invention
The invention mainly aims to overcome the defects and shortcomings of the prior art, and provides a distributed power transaction proxy node selection method and system for block chain consensus, which can meet the distributed processing requirements during distributed photovoltaic power generation transaction, and has the advantages of high processing speed and high efficiency.
According to one aspect of the present invention, there is provided a distributed power transaction proxy node selection method for blockchain consensus, the method comprising the steps of:
s1, counting first parameter values of all nodes of a block chain, and determining credit values of all nodes based on the first parameter values;
s2, obtaining second parameter values of all nodes according to interoperation results among all nodes of the block chain;
s3, determining a consensus value of each node based on the credit value of each node and the second parameter value;
and S4, determining an optimal proxy node and a candidate proxy node based on the common value of each node.
Preferably, the first parameter value includes a transaction period value, a transaction bias value, a transaction capacity value, a credit loss value, and a credit gain value; the determining the credit value of each node based on the first parameter value includes:
combining the credit loss value and the credit gain value to obtain a combined result, setting a first weight coefficient, and calculating the transaction period value, the transaction deviation value, the transaction capacity value and the combined result by using the first weight coefficient in a weighted mode to obtain the credit value of each node; the method comprises the following steps: c (C) cre =αt+βp+γd+Δc, where α, β, γ represent the first weight coefficient, T, P, D, Δc are the transaction period value, the transaction capacity value, the transaction offset value, and the credit loss and gain combination result, C cre Is the credit value of the node.
Preferably, the interoperation between the nodes of the blockchain is a mutual voting operation, and the second parameter value of each node is a voting value between the nodes.
Preferably, the determining the consensus value of each node based on the credit value of each node and the second parameter value includes:
setting a second weight coefficient, and weighting the credit value and the voting value among the nodes by using the second weight coefficientCarrying out row weight calculation to obtain a consensus value of each node; the method comprises the following steps: g=μc cre +ζV, wherein μ, ζ are second weight coefficients, V is voting value between each node, C cre And G is a consensus value for the credit value of the node.
Preferably, the determining the optimal proxy node and the candidate proxy node based on the consensus value of each node includes:
and selecting the nodes with the consensus values meeting the first preset condition as proxy nodes, taking the nodes with the consensus values meeting the second preset condition in the rest nodes as candidate proxy nodes, and broadcasting the candidate proxy nodes into the P2P network.
Preferably, the proxy node records transaction information and packages the transaction information into chunks, which are broadcast into the P2P network by the proxy node for verification by other nodes;
after verification is passed, the proxy node adds a chunk containing transaction information to the blockchain backbone.
According to another aspect of the present invention, there is also provided a distributed power transaction proxy node selection system for blockchain consensus, the system comprising:
the first determining module is used for counting first parameter values of all nodes of the block chain and determining credit values of all nodes based on the first parameter values;
the acquisition module is used for acquiring a second parameter value of each node according to the interoperation result among the nodes of the blockchain;
a second determining module, configured to determine a consensus value of each node based on the credit value of each node and the second parameter value;
and the third determining module is used for determining the optimal proxy node and the candidate proxy node based on the consensus value of each node.
Preferably, the first parameter value includes a transaction period value, a transaction bias value, a transaction capacity value, a credit loss value, and a credit gain value; the determining the credit value of each node based on the first parameter value includes:
combining the credit loss value and the credit gain valueCombining to obtain a combined result, setting a first weight coefficient, and calculating the transaction period value, the transaction deviation value, the transaction capacity value and the combined result by using the first weight coefficient in a weighted mode to obtain the credit value of each node; the method comprises the following steps: c (C) cre =αt+βp+γd+Δc, where α, β, γ represent the first weight coefficient, T, P, D, Δc are the transaction period value, the transaction capacity value, the transaction offset value, and the credit loss and gain combination result, C cre Is the credit value of the node.
Preferably, the interoperation between the nodes of the blockchain is a mutual voting operation, and the second parameter value of each node is a voting value between the nodes; the determining the consensus value of each node based on the credit value of each node and the second parameter value includes:
setting a second weight coefficient, and carrying out weighted calculation on the credit value and the voting value among the nodes in a weighted mode by utilizing the second weight coefficient to obtain a consensus value of each node; the method comprises the following steps: g=μc cre +ζV, wherein μ, ζ are second weight coefficients, V is voting value between each node, C cre And G is a consensus value for the credit value of the node.
Preferably, the determining the optimal proxy node and the candidate proxy node based on the consensus value of each node includes:
selecting nodes with the consensus values meeting the first preset conditions as proxy nodes, taking the nodes with the consensus values meeting the second preset conditions in other nodes as candidate proxy nodes, and broadcasting the candidate proxy nodes into the P2P network;
the proxy node records transaction information and packages the transaction information into blocks, and the proxy node broadcasts the blocks into a P2P network for verification by other nodes;
after verification is passed, the proxy node adds a chunk containing transaction information to the blockchain backbone.
The beneficial effects are that: according to the invention, the credit value of each node is counted and calculated, so that the consensus value of each node is determined, and the optimal agent node and the candidate agent node are determined based on the consensus value of each node, so that the distributed processing requirement during distributed photovoltaic power generation transaction can be met, the processing speed is high, and the efficiency is high.
The invention is suitable for being applied to a distributed photovoltaic power generation marketization transaction scene, considers the characteristics of strong autonomy of users, small and scattered transaction volume, larger randomness and intermittence of photovoltaic power generation and the like, combines the characteristics of distributed photovoltaic power generation transaction and a rights and interests authorization proving mechanism (Delegated Proof of Stake, DPOS), provides a consensus mechanism suitable for the distributed photovoltaic power generation transaction, provides a reference for the distributed photovoltaic power generation transaction by using a blockchain technology, and promotes blockchain projects of the distributed power generation transaction to accelerate to land.
Features and advantages of the present invention will become apparent by reference to the following drawings and detailed description of embodiments of the invention.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention. In the drawings:
FIG. 1 is a block chain consensus distributed power transaction proxy node selection method flow diagram;
FIG. 2 is a schematic diagram of an implementation of proxy node selection;
FIG. 3 is a schematic diagram of a distributed power transaction proxy node selection system architecture for blockchain consensus.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The DPOS consensus mechanism is essentially a process of selecting proxy nodes, i.e., several trusted nodes are selected in the entire blockchain system, and the transaction information of all nodes during this period is packaged, thereby generating a new block. A user does not necessarily represent a node in a blockchain system, which needs to be equipped with a server, and a user as a node would result in a significant increase in the cost of the overall system, but for a large capacity, conditional photovoltaic generator may itself be a node. For small-capacity users, a small area can be divided into a node, such as a street and village, and the whole street and village users purchase electricity and sell electricity uniformly in a specified transaction date. For electricity purchasing users, the users are considered to not participate in competition to become agent nodes, and the competing agent rights need to increase the work difficulty and burden because the users only want to purchase electricity and use electricity in a specified time. Therefore, the selection objects of the agent nodes are all the three large, medium and small capacity distributed photovoltaic generators or supervision and operation institutions.
Example 1
FIG. 1 is a flow chart of a distributed power transaction proxy node selection method for blockchain consensus. As shown in fig. 1, the present invention provides a distributed power transaction proxy node selection method for blockchain consensus, the method comprising the steps of:
s1, counting first parameter values of all nodes of a block chain, and determining credit values of all nodes based on the first parameter values;
in this step, a dynamically updated node credit attribute table is maintained in the system. The table contains five elements, namely credit value C cre Mainly comprises five parts: transaction period value T, transaction capacity value P, transaction bias value D, credit loss ΔC - And gain DeltaC + All five elements are taking intervals [0, 10]And has no unit dimension.
Wherein the deviation value is defined as formula (1).
In E real The electric energy for real transaction is obtained through a user side electric energy meter; e (E) plan The electric energy for planning the trade, namely the electric energy reported to the trade platform; k is a scaling factor. The formula illustrates that the closer the electric energy of the actual transaction is to the electric energy of the planned transaction, the smaller the deviation of the transaction is, and the larger the deviation value is.
Credit loss ac-means that the credit value decreases over time. In a specific transaction process, if a certain user does not become a proxy node for a long time, the credit value of the certain user is automatically reduced, so that the certain user is unwilling, does not actively serve the whole transaction system or deprives the system of the authority of becoming the proxy node due to the bad behavior of the certain user. Credit gain value deltac + In one stage transaction, if one node actively participates in competition of a system agent node and is selected, and meanwhile, the node can normally finish the task of packing all transaction information, the system gives a certain substance reward to the node and improves the credit value of the node, so that the node can have more advantages in the next stage of competitive process. ΔC - And DeltaC + The following formulas are shown as formula (2) and formula (3).
Where T represents the time interval from the last vote to the next vote of the node, T represents the transaction period constant, and both units are days. When the time interval of the twice voting of the node is less than or equal to T, namely T is less than or equal to T, the credit loss value of the node is unchanged and is 0; when the twice voting time of the node is greater than the credit value, i.e., T > T, the credit loss value is a positive value. m represents the rate at which credit is consumed and is a constant, which can be adjusted according to the specific transaction situation.
Where N is the number of transactions packed by the proxy node during the period of time, N tra For all the number of transactions in that period. a is a credit gain value, which may be given by the system as the case may be.
Preferably, the determining the credit value of each node based on the first parameter value includes:
and combining the credit loss value and the credit gain value to obtain a combined result, setting a weight coefficient, and calculating the transaction period value, the transaction deviation value, the transaction capacity value and the combined result in a weighted mode to obtain the credit value of each node.
Specifically, the credit loss and gain of a node for each round may be combined to Δc as in equation (4).
ΔC=ΔC + -ΔC - (4)
C cre =C′ cre +ΔC (5)
Wherein C' cre For credit values where delta C is not taken into account by a node in a certain stage of transaction, C cre To account for the credit value of the node after deltac.
To sum up, the node credit value may be represented by equation (6).
C cre =αT+βP+γD+ΔC (6)
Wherein alpha, beta and gamma represent weight coefficients and can be determined according to specific situations. The smaller the deviation, the larger the D value; the shorter the transaction period, the greater the T value; the greater the transaction capacity, the greater the P value. The three quantities are taken into consideration, and when the transaction period of the node is shorter and the transaction capacity is larger, the deviation between the planned quantity and the actual value of the transaction is smaller, the credit value of the transaction is higher. ΔC + And deltac-is given by the transaction system according to the behavior of each node of the previous stage.
S2, obtaining second parameter values of all nodes according to interoperation results among all nodes of the block chain;
in this step, the interoperation between the nodes of the blockchain is a mutual voting operation, and the second parameter value of each node is a voting value between the nodes.
S3, determining a consensus value of each node based on the credit value of each node and the second parameter value;
in the step, a weight coefficient is set, and the credit value and the voting value among the nodes are weighted and calculated in a weighted mode, so that the consensus value of each node is obtained.
In particular, in order to give more nodes in the transaction system the opportunity to participate in accounting, accounting for the value of V votes between nodes is taken into account when designing the consensus mechanism. Let the consensus value be G
G=μC cre +ξV (7)
Wherein mu and xi are weight coefficients and can be determined according to specific conditions.
And is obtained by the formula (6):
G=μ(αT+βP+γD+ΔC)+ξV (8)
and S4, determining an optimal proxy node and a candidate proxy node based on the common value of each node.
Preferably, the determining the optimal proxy node and the candidate proxy node based on the consensus value of each node includes:
and selecting the nodes with the consensus values meeting the first preset condition as proxy nodes, taking the nodes with the consensus values meeting the second preset condition in the rest nodes as candidate proxy nodes, and broadcasting the candidate proxy nodes into the P2P network.
The first predetermined condition may refer to that the consensus value is maximum, and the second predetermined condition may refer to that the consensus value exceeds a predetermined threshold, that is, a node with the maximum consensus value is taken as a proxy node, and a node with the maximum consensus value exceeding the predetermined threshold is taken as a candidate proxy node.
Preferably, the proxy node records transaction information and packages the transaction information into chunks, which are broadcast into the P2P network by the proxy node for verification by other nodes; after verification is passed, the proxy node adds a chunk containing transaction information to the blockchain backbone.
Fig. 2 is a schematic diagram of a specific implementation of proxy node selection. The process includes a select proxy node stage and a proxy node work stage.
In the stage of selecting proxy nodes, firstly counting the number of nodes of a system, determining the number of the proxy nodes according to a certain proportion, and then counting the transaction period, transaction capacity, transaction deviation, credit loss and required gain of each node; nodes then vote for each other, each node may vote for 10. And calculating the consensus value of each node according to the weight coefficient, automatically forming proxy nodes by a plurality of nodes with the maximum consensus value, selecting a plurality of candidate proxy nodes, and broadcasting to the P2P network.
In the working stage of the proxy node, the proxy node records a period of transaction and packages the transaction into blocks; broadcasting the block to a P2P network, and verifying the transaction by each node to obtain 51% of node verification in the network; if the verification is successful, the block containing the transaction information is added to the blockchain main chain, the agency nodes obtain rewards given by the transaction system, and the rest agency nodes account in turn. If the verification fails, the flow ends.
Example 2
FIG. 3 is a schematic diagram of a distributed power transaction proxy node selection system architecture for blockchain consensus. As shown in fig. 3, the present invention further provides a distributed power transaction proxy node selection system for blockchain consensus, the system comprising:
the first determining module is used for counting first parameter values of all nodes of the block chain and determining credit values of all nodes based on the first parameter values;
the acquisition module is used for acquiring a second parameter value of each node according to the interoperation result among the nodes of the blockchain;
a second determining module, configured to determine a consensus value of each node based on the credit value of each node and the second parameter value;
and the third determining module is used for determining the optimal proxy node and the candidate proxy node based on the consensus value of each node.
Preferably, the first parameter value includes a transaction period value, a transaction bias value, a transaction capacity value, a credit loss value, and a credit gain value; the determining the credit value of each node based on the first parameter value includes:
and combining the credit loss value and the credit gain value to obtain a combined result, setting a weight coefficient, and calculating the transaction period value, the transaction deviation value, the transaction capacity value and the combined result in a weighted mode to obtain the credit value of each node.
Preferably, the interoperation between the nodes of the blockchain is a mutual voting operation, and the second parameter value of each node is a voting value between the nodes; the determining the consensus value of each node based on the credit value of each node and the second parameter value includes:
and setting a weight coefficient, and carrying out weighted calculation on the credit value and the voting value among the nodes in a weighted mode to obtain the consensus value of each node.
Preferably, the determining the optimal proxy node and the candidate proxy node based on the consensus value of each node includes:
selecting nodes with the consensus values meeting the first preset conditions as proxy nodes, taking the nodes with the consensus values meeting the second preset conditions in other nodes as candidate proxy nodes, and broadcasting the candidate proxy nodes into the P2P network;
the proxy node records transaction information and packages the transaction information into blocks, and the proxy node broadcasts the blocks into a P2P network for verification by other nodes;
after verification is passed, the proxy node adds a chunk containing transaction information to the blockchain backbone.
The implementation process of the functions of each module in this embodiment is similar to that of the method flow in embodiment 1, and will not be described here again.
According to the invention, the credit value of each node is counted and calculated, so that the consensus value of each node is determined, and the optimal agent node and the candidate agent node are determined based on the consensus value of each node, so that the distributed processing requirement during distributed photovoltaic power generation transaction can be met, the processing speed is high, and the efficiency is high.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical aspects of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those of ordinary skill in the art that: modifications and equivalents may be made to the specific embodiments of the invention without departing from the spirit and scope of the invention, which is intended to be covered by the claims.

Claims (5)

1. A distributed power transaction proxy node selection method for blockchain consensus, comprising:
s1, counting first parameter values of all nodes of a block chain, and determining credit values of all nodes based on the first parameter values;
s2, obtaining a second parameter value of each node according to the interoperation result among the nodes of the block chain;
s3, determining a consensus value of each node based on the credit value of each node and the second parameter value;
s4, determining an optimal proxy node and a candidate proxy node based on the consensus value of each node;
the first parameter value comprises a transaction period value, a transaction deviation value, a transaction capacity value and a credit loss value delta C - And credit gain value ΔC + The method comprises the steps of carrying out a first treatment on the surface of the The determining the credit value of each node based on the first parameter value includes:
combining the credit loss value and the credit gain value to obtain a combined result, setting a first weight coefficient, and calculating the transaction period value, the transaction deviation value, the transaction capacity value and the combined result by using the first weight coefficient in a weighted mode to obtain the credit value of each node; the method comprises the following steps: c (C) cre =αt+βp+γd+Δc, wherein α, β, γ represent the first weight coefficient, T, P, D, Δc are the trading period value, trading, respectivelyCapacity value, transaction bias value, and credit loss and gain combination result, C cre Credit value for a node;
wherein, the transaction deviation value D is:
wherein E is real The electric energy is the electric energy of real transaction; e (E) plan Electrical energy for a planned transaction; k is a proportionality coefficient;
credit loss value deltac - The finger credit value may decrease over time; credit gain value deltac + In the one-stage transaction, if one node actively participates in competition of a system agent node and is selected, and meanwhile, when the task of packaging all transaction information can be normally completed, the system gives material rewards to the selected node, so that the credit value is improved;
credit loss value deltac - And credit gain value ΔC + Following formulas (2) and (3);
wherein T represents the interval time from the last vote to the next vote of the node, and T represents the transaction period constant; when the time interval of voting twice by one node is less than or equal to T, the credit loss value is unchanged and is 0; when the twice voting time of one node is larger than the credit value, the credit loss value is a positive value; m represents the rate at which credit is consumed;
where N is the number of transactions packed by the proxy node over a period of time, N tra The transaction number is all the transaction numbers in the corresponding time; a is a credit gain value;
and combining the credit loss value and the credit gain value to obtain a combined result, specifically:
ΔC=ΔC + -ΔC - (4)
interoperation among nodes of the block chain is mutual voting operation, and a second parameter value of each node is a voting value among the nodes;
the determining the consensus value of each node based on the credit value of each node and the second parameter value includes:
setting a second weight coefficient, and carrying out weighted calculation on the credit value and the voting value among the nodes in a weighted mode by utilizing the second weight coefficient to obtain a consensus value of each node; the method comprises the following steps: g=μc cre +ζV, wherein μ, ζ are second weight coefficients, V is voting value between each node, C cre And G is a consensus value for the credit value of the node.
2. The method of claim 1, wherein the determining optimal and candidate proxy nodes based on the consensus value for each node comprises:
and selecting the nodes with the consensus values meeting the first preset condition as proxy nodes, taking the nodes with the consensus values meeting the second preset condition in the rest nodes as candidate proxy nodes, and broadcasting the candidate proxy nodes into the P2P network.
3. The method of claim 1, wherein the proxy node records transaction information and packages the transaction information into chunks, the proxy node broadcasting the chunks into a P2P network for verification by other nodes;
after verification is passed, the proxy node adds a chunk containing transaction information to the blockchain backbone.
4. A distributed power transaction proxy node selection system for blockchain consensus, the system comprising:
the first determining module is used for counting first parameter values of all nodes of the block chain and determining credit values of all nodes based on the first parameter values;
the acquisition module is used for acquiring a second parameter value of each node according to the interoperation result among the nodes of the blockchain;
a second determining module, configured to determine a consensus value of each node based on the credit value of each node and the second parameter value;
the third determining module is used for determining an optimal proxy node and a candidate proxy node based on the consensus value of each node;
the first parameter value comprises a transaction period value, a transaction deviation value, a transaction capacity value, a credit loss value and a credit gain value; the determining the credit value of each node based on the first parameter value includes:
combining the credit loss value and the credit gain value to obtain a combined result, setting a first weight coefficient, and calculating the transaction period value, the transaction deviation value, the transaction capacity value and the combined result by using the first weight coefficient in a weighted mode to obtain the credit value of each node; the method comprises the following steps: c (C) cre =αt+βp+γd+Δc, where α, β, γ represent the first weight coefficient, T, P, D, Δc are the transaction period value, the transaction capacity value, the transaction offset value, and the credit loss and gain combination result, C cre Credit value for a node;
wherein, the transaction deviation value D is:
wherein E is real The electric energy is the electric energy of real transaction; e (E) plan Electrical energy for a planned transaction; k is a proportionality coefficient;
credit loss value deltac - The finger credit value may decrease over time; credit gain value deltac + In the one-stage transaction, if one node actively participates in competition of a system agent node and is selected, and meanwhile, when the task of packaging all transaction information can be normally completed, the system gives material rewards to the selected node, so that the credit value is improved;
credit loss value deltac - And credit gain value ΔC + Following formulas (2) and (3);
wherein T represents the interval time from the last vote to the next vote of the node, and T represents the transaction period constant; when the time interval of voting twice by one node is less than or equal to T, the credit loss value is unchanged and is 0; when the twice voting time of one node is larger than the credit value, the credit loss value is a positive value; m represents the rate at which credit is consumed;
where N is the number of transactions packed by the proxy node over a period of time, N tra The transaction number is all the transaction numbers in the corresponding time; a is a credit gain value;
and combining the credit loss value and the credit gain value to obtain a combined result, specifically:
ΔC=ΔC + -ΔC - (4)
interoperation among nodes of the block chain is mutual voting operation, and a second parameter value of each node is a voting value among the nodes; the determining the consensus value of each node based on the credit value of each node and the second parameter value includes:
setting a second weight coefficient, and carrying out weighted calculation on the credit value and the voting value among the nodes in a weighted mode by utilizing the second weight coefficient to obtain a consensus value of each node; the method comprises the following steps: g=μc cre +ζV, wherein μ, ζ are second weight coefficients, V is voting value between each node, C cre And G is a consensus value for the credit value of the node.
5. The system of claim 4, wherein the determining optimal and candidate proxy nodes based on the consensus value for each node comprises:
selecting nodes with the consensus values meeting the first preset conditions as proxy nodes, taking the nodes with the consensus values meeting the second preset conditions in other nodes as candidate proxy nodes, and broadcasting the candidate proxy nodes into the P2P network;
the proxy node records transaction information and packages the transaction information into blocks, and the proxy node broadcasts the blocks into a P2P network for verification by other nodes;
after verification is passed, the proxy node adds a chunk containing transaction information to the blockchain backbone.
CN202011159674.8A 2020-10-26 2020-10-26 Block chain consensus distributed power transaction proxy node selection method and system Active CN112333251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011159674.8A CN112333251B (en) 2020-10-26 2020-10-26 Block chain consensus distributed power transaction proxy node selection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011159674.8A CN112333251B (en) 2020-10-26 2020-10-26 Block chain consensus distributed power transaction proxy node selection method and system

Publications (2)

Publication Number Publication Date
CN112333251A CN112333251A (en) 2021-02-05
CN112333251B true CN112333251B (en) 2023-07-28

Family

ID=74312195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011159674.8A Active CN112333251B (en) 2020-10-26 2020-10-26 Block chain consensus distributed power transaction proxy node selection method and system

Country Status (1)

Country Link
CN (1) CN112333251B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256149A (en) * 2021-06-11 2021-08-13 武汉龙津科技有限公司 Block chain node reputation adjusting method and device, electronic equipment and storage medium
CN113486118B (en) * 2021-07-21 2023-09-22 银清科技有限公司 Consensus node selection method and device
CN114025012B (en) * 2022-01-10 2022-03-22 国网电子商务有限公司 Node selection method, device, storage medium and equipment based on credit grouping
CN114140250A (en) * 2022-01-27 2022-03-04 深圳江行联加智能科技有限公司 Block chain-based power transaction method and device, electronic equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848125B (en) * 2018-05-22 2021-08-17 北京京东尚科信息技术有限公司 Method and apparatus for providing consensus service in block chain and storage medium
AU2019354735A1 (en) * 2018-10-02 2021-06-03 Mutualink, Inc. Consensus-based voting for network member identification employing blockchain-based identity signature mechanisms
CN110138597B (en) * 2019-04-17 2021-11-05 上海大学 Block chain DPOS (distributed DPOS) consensus mechanism improvement method based on credit integration and node clustering

Also Published As

Publication number Publication date
CN112333251A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
CN112333251B (en) Block chain consensus distributed power transaction proxy node selection method and system
CN110580653B (en) Block chain consensus mechanism based on transaction
Guo et al. A blockchain-enabled ecosystem for distributed electricity trading in smart city
KR20210008111A (en) Blockchain system with consensus algorithm based on proof-of -transaction and method there of
CN106452884B (en) Data distributing method and device in block catenary system
Groeger A study of participation in dynamic auctions
CN110445616B (en) Block packing node packing sequence determining method, equipment and storage medium
CN113822672B (en) Block chain consensus method based on zero knowledge proof
Moniruzzaman et al. Blockchain and cooperative game theory for peer-to-peer energy trading in smart grids
CN113037504B (en) Node excitation method and system under fragment-based unauthorized block chain architecture
CN111078787A (en) Block chain consensus method based on random number mapping
CN111598719A (en) New energy seller transaction method and system for spot power market
CN116366669A (en) Consensus method based on reputation value weight balance suitable for crowdsourcing system
CN108665229A (en) A kind of method, apparatus, system and the storage medium of performance appraisal reward
Oprea et al. A motivational local trading framework with 2-round auctioning and settlement rules embedded in smart contracts for a small citizen energy community
Liu et al. A storage sustainability mechanism with heterogeneous miners in blockchain
CN112967148B (en) Block chain consensus mechanism for intelligent Internet of things computing service
CN109118359B (en) Block chain-based available resource quota pre-exchange method and device
Lin Analysis of blockchain-based smart contracts for peer-to-peer solar electricity transactive markets
CN117078347A (en) Electric-carbon integrated transaction method based on alliance chain
CN112529703B (en) Method and device for selecting accounting node of blockchain
CN116028978A (en) Group learning excitation method based on block chain
CN114819779A (en) Multi-agent cross-domain cooperative operation system and method
CN114399345A (en) Financial power transmission right price prediction method and device
Zhang et al. Modeling and computation of mean field game with compound carbon abatement mechanisms.

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