CN112333251A - Block chain consensus distributed power transaction agent node selection method and system - Google Patents

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

Info

Publication number
CN112333251A
CN112333251A CN202011159674.8A CN202011159674A CN112333251A CN 112333251 A CN112333251 A CN 112333251A CN 202011159674 A CN202011159674 A CN 202011159674A CN 112333251 A CN112333251 A CN 112333251A
Authority
CN
China
Prior art keywords
value
node
nodes
credit
consensus
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.)
Granted
Application number
CN202011159674.8A
Other languages
Chinese (zh)
Other versions
CN112333251B (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

Images

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 agent node selection method and system, which can meet distributed processing requirements during distributed photovoltaic power generation transaction, and are high in processing speed and high in efficiency. The method comprises the following steps: s1, counting the first parameter values of each node of the block chain, and determining the credit value of each node based on the first parameter values; s2, acquiring 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; and S4, determining the optimal proxy node and the candidate proxy node based on the consensus values of the nodes.

Description

Block chain consensus distributed power transaction agent node selection method and system
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a block chain consensus distributed power transaction agent node selection method and system.
Background
The consensus mechanism of the blockchain 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 the continuous operation of the blockchain system. Currently, the main consensus algorithms of the blockchain system include POW, Proof of rights mechanism (POS), DPOS, etc.
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 transaction blocks are directly packaged by the pre-selected agent nodes and broadcast to the P2P (Peer-to-Peer) network, so that the transaction time can reach the second level, the transaction number per second is greatly increased, and the transaction number per second can be represented by the following formula
Figure BDA0002743187370000011
In the formula, NTPSFor transactions per second, Δ T is the time required from the initiation of the transaction broadcast to the final security confirmation, NtransIndicating the number of transactions for that time period.
TABLE 1 comparison of three consensus mechanisms
Figure BDA0002743187370000012
During distributed photovoltaic transaction, due to the reasons of high randomness and intermittence of photovoltaic power generation and the like, the existing consensus mechanism cannot meet the distributed processing requirements, 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 block chain consensus distributed power transaction agent node selection method and system, which can meet the distributed processing requirements during distributed photovoltaic power generation transaction, and are high in processing speed and high in efficiency.
According to one aspect of the invention, the invention provides a method for selecting a distributed power transaction agent node with block chain consensus, which comprises the following steps:
s1, counting the first parameter values of each node of the block chain, and determining the credit value of each node based on the first parameter values;
s2, acquiring 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;
and S4, determining the optimal proxy node and the candidate proxy node based on the consensus values of the nodes.
Preferably, the first parameter values include a trading period value, a trading offset value, a trading volume value, a credit loss value and a credit gain value; the determining a credit value for each node based on the first parameter value comprises:
merging the credit loss value and the credit gain value to obtain a merged result, setting a first weight coefficient, and calculating the transaction period value, the transaction deviation value, the transaction capacity value and the merged result by using the first weight coefficient in a weighting mannerCalculating the credit value of each node; the method specifically comprises the following steps: ccreWhere α T + β P + γ D + Δ C, where α, β, and γ represent first weighting coefficients, T, P, D and Δ C are trade period values, trade capacity values, trade offset values, and credit loss and gain combination results, respectively, CcreIs the credit value of the node.
Preferably, the interoperation between the nodes of the block chain is mutual voting operation, and the second parameter value of each node is a voting value between the nodes.
Preferably, the determining a consensus value of each node based on the credit value of each node and the second parameter value comprises:
setting a second weight coefficient, and performing weighted calculation on the credit value and the voting value between the nodes in a weighting mode by using the second weight coefficient to obtain a consensus value of each node; the method specifically comprises the following steps: g ═ μ Ccre+ xi V, where μ and xi are the second weight coefficients, V is the vote value between nodes, CcreIs the credit value of the node, and G is the consensus value.
Preferably, the determining an optimal proxy node and a candidate proxy node based on the consensus values of the nodes includes:
and selecting the node with the consensus value meeting the first preset condition as a proxy node, and selecting the node with the consensus value meeting the second preset condition in the rest nodes as a candidate proxy node to broadcast to the P2P network.
Preferably, the proxy node records transaction information and packages the transaction information into blocks, and the proxy node broadcasts the blocks into the P2P network for verification by other nodes;
after the verification is passed, the agent node adds the block containing the transaction information to the blockchain main chain.
According to another aspect of the present invention, the present invention further provides a distributed power transaction agent node selection system for blockchain consensus, the system comprising:
the first determining module is used for counting first parameter values of all nodes of a 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 result of the interoperation between each node of the block chain;
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 agent node and the candidate agent node based on the consensus values of the nodes.
Preferably, the first parameter values include a trading period value, a trading offset value, a trading volume value, a credit loss value and a credit gain value; the determining a credit value for each node based on the first parameter value comprises:
combining the credit loss value and the credit gain value to obtain a combined result, setting a first weight coefficient, and calculating the trading period value, the trading deviation value, the trading capacity value and the combined result by using the first weight coefficient in a weighting manner to obtain a credit value of each node; the method specifically comprises the following steps: ccreWhere α T + β P + γ D + Δ C, where α, β, and γ represent first weighting coefficients, T, P, D and Δ C are trade period values, trade capacity values, trade offset values, and credit loss and gain combination results, respectively, CcreIs the credit value of the node.
Preferably, the interoperation between the nodes of the block chain is mutual voting operation, and the second parameter value of each node is a voting value between the nodes; determining a consensus value for each node based on the credit value and the second parameter value for each node comprises:
setting a second weight coefficient, and performing weighted calculation on the credit value and the voting value between the nodes in a weighting mode by using the second weight coefficient to obtain a consensus value of each node; the method specifically comprises the following steps: g ═ μ Ccre+ xi V, where μ and xi are the second weight coefficients, V is the vote value between nodes, CcreIs the credit value of the node, and G is the consensus value.
Preferably, the determining an optimal proxy node and a candidate proxy node based on the consensus values of the nodes includes:
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 to 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 the verification is passed, the agent node adds the block containing the transaction information to the blockchain main chain.
Has the advantages that: according to the distributed photovoltaic power generation processing method, the credit value of each node is counted and calculated, the consensus value of each node is further determined, the optimal proxy node and the candidate proxy node are determined based on the consensus value of each node, the distributed processing requirements 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 trading scene, considers the characteristics of strong user autonomy, small and dispersed trading volume, randomness of photovoltaic power generation, large intermittence and the like, combines the characteristics of distributed photovoltaic power generation trading and a rights and interests (DPOS) authorization certification mechanism, provides a consensus mechanism suitable for the distributed photovoltaic power generation trading, provides reference for the distributed photovoltaic power generation trading by applying a block chain technology, and promotes the block chain item of the distributed power generation trading to land quickly.
The features and advantages of the present invention will become apparent by reference to the following drawings and detailed description of specific embodiments of the invention.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of a method for selecting a node of a distributed power transaction agent for blockchain consensus;
FIG. 2 is a diagram illustrating an exemplary implementation of proxy node selection;
fig. 3 is a block chain consensus distributed power transaction agent node selection system.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present 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 in the description of the invention herein 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., selecting several reliable nodes in the whole blockchain system, and packaging transaction information of all nodes in the period of time, thereby generating a new block. It is not necessary that one user represents one node in the blockchain system, the node needs to be provided with a server, and one user as one node would cause a great increase in the cost of the whole system, but for a large capacity, conditional photovoltaic generator can itself act as one node. For a small-capacity user, a small area may be divided into one node, for example, a street and a village are divided into one node, and users in the whole street and village can purchase and sell electricity uniformly in a specified transaction date. For the electricity purchasing users, the users are considered not to participate in competition to become agent nodes, and the competition of agent rights needs to increase the work difficulty and burden because the users only want to purchase electricity within a specified time. Therefore, the selection objects of the agent nodes are all three large, medium and small-capacity distributed photovoltaic power generators or supervision and operation organizations.
Example 1
Fig. 1 is a flow chart of a method for selecting a node of a distributed power transaction agent with block chain consensus. As shown in fig. 1, the present invention provides a method for selecting a distributed power transaction proxy node with block chain consensus, the method comprising the following steps:
s1, counting the first parameter values of each node of the block chain, and determining the credit value of each node based on the first parameter values;
in this step, a dynamically updated attribute table of node credit values is maintained in the system. The table contains five elements, i.e. credit values CcreMainly comprises five parts: transaction period value T, transaction capacity value P, transaction deviation value D, credit loss Delta C-And a gain Δ C+All five elements are interval [0, 10 ]]And no unit dimension.
Wherein the deviation value is defined as formula (1).
Figure BDA0002743187370000061
In the formula ErealThe electric energy for real transaction is obtained by a user side electric energy meter; eplanThe electric energy for planning transaction, namely the electric energy reported to a transaction platform; k is a scaling factor. The formula shows that the closer the electric energy of the real 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.
The credit loss ac-means that the credit value decreases with time. In a specific transaction process, if a user does not become a proxy node for a long time, the credit value of the user is automatically reduced, which indicates that the user is unwilling to, does not actively serve the whole transaction system or deprives the system of the right to become a proxy node due to bad behavior. Credit gain value Δ C+In one stage transaction, if a node actively participates in competition of a system agent node and is selected, and the node can normally complete the task of packaging all transaction information, the system gives a certain material reward to the node,and the credit value is improved, so that the credit value can be more advantageous in the election process of the next stage. Delta C-And Δ C+The following formulas are as in formula (2) and formula (3).
Figure BDA0002743187370000062
Wherein T represents the interval time from the last voting to the next voting of the node, and T represents a transaction cycle constant, and the units of the T and the T are days. When the time interval of two times of voting by 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 node voting time twice is larger than the credit value, namely T > T, the credit loss value is a positive value. m represents the rate at which credit is consumed and is a constant that can be adjusted to account for a particular transaction.
Figure BDA0002743187370000071
Wherein N is the number of transactions packed by the agent node in the period, NtraThe total number of transactions in the period. a is a credit gain value, which may be given by the system as the case may be.
Preferably, the determining a credit value for each node based on the first parameter value comprises:
and combining the credit loss value and the credit gain value to obtain a combined result, setting a weight coefficient, and calculating the trading period value, the trading deviation value, the trading capacity value and the combined result in a weighting mode to obtain the credit value of each node.
Specifically, the credit loss and gain for a certain node per round may be combined into Δ C, as in equation (4).
ΔC=ΔC+-ΔC- (4)
Ccre=C′cre+ΔC (5)
Of formula (II) to C'creFor nodes in a phase of the transaction not taking into account Δ CCredit value, CcreTo account for the credit value of the node after Δ C.
In summary, the node credit value can be represented by equation (6).
Ccre=αT+βP+γD+ΔC (6)
In the formula, α, β, and γ each represent a weight coefficient, and may be determined in accordance with specific circumstances. The smaller the deviation, the larger the value of D; the shorter the transaction period, the larger the value of T; the larger the transaction capacity, the larger the P value. Considering the combination of the three quantities, the smaller the transaction period of the node is, the larger the transaction capacity is, and the smaller the deviation of the planned quantity of the transaction from the actual value is, the higher the credit value of the transaction is. Delta C+And ac-is given by the trading system according to the behaviour of the respective node of the previous stage.
S2, acquiring a second parameter value of each node according to the interoperation result among the nodes of the block chain;
in this step, the interoperation between the nodes of the block chain is 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 this step, a weighting coefficient is set, and the credit value and the voting value between the nodes are weighted and calculated in a weighting mode to obtain a consensus value of each node.
Specifically, in order to make more nodes in the transaction system have an opportunity to participate in accounting, the vote value V between the nodes is considered when designing the consensus mechanism. Let the consensus value be G, then
G=μCcre+ξV (7)
In the formula, μ and ξ are weight coefficients, and can be determined according to specific situations.
And is obtained by the formula (6):
G=μ(αT+βP+γD+ΔC)+ξV (8)
and S4, determining the optimal proxy node and the candidate proxy node based on the consensus values of the nodes.
Preferably, the determining an optimal proxy node and a candidate proxy node based on the consensus values of the nodes includes:
and selecting the node with the consensus value meeting the first preset condition as a proxy node, and selecting the node with the consensus value meeting the second preset condition in the rest nodes as a candidate proxy node to broadcast to the P2P network.
The first predetermined condition may be that the consensus value is maximum, and the second predetermined condition may be that the consensus value exceeds a predetermined threshold, that is, the node with the maximum consensus value is used as the proxy node, and the node with the consensus value exceeding the predetermined threshold is used as the candidate proxy node.
Preferably, the proxy node records transaction information and packages the transaction information into blocks, and the proxy node broadcasts the blocks into the P2P network for verification by other nodes; after the verification is passed, the agent node adds the block containing the transaction information to the blockchain main chain.
Fig. 2 is a schematic diagram of a specific implementation process of proxy node selection. The process comprises a proxy node selecting stage and a proxy node working stage.
In the stage of selecting the agent nodes, firstly counting the number of each node of the system, determining the number of the agent nodes according to a certain proportion, and then counting the transaction period, the transaction capacity, the transaction deviation, the credit loss and the required gain of each node; after that, the nodes vote each other, and each node can cast 10 votes. And calculating consensus values of the nodes according to the weight coefficients, wherein the nodes with the maximum consensus values automatically become proxy nodes, and selecting candidate proxy nodes to broadcast to the P2P network.
In the working stage of the agent node, the agent node records the transaction for a period of time and packs the transaction into blocks; the block is broadcasted to a P2P network, and each node verifies the transaction to obtain 51% node verification in the network; if the verification is successful, a block containing transaction information is added to the block chain main chain, the agent nodes obtain the reward given by the transaction system, and the rest agent nodes are billed in turn. If the verification fails, the flow ends.
Example 2
Fig. 3 is a block chain consensus distributed power transaction agent node selection system. As shown in fig. 3, the present invention further provides a system for selecting a node of a distributed power transaction agent with block chain consensus, the system comprising:
the first determining module is used for counting first parameter values of all nodes of a 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 result of the interoperation between each node of the block chain;
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 agent node and the candidate agent node based on the consensus values of the nodes.
Preferably, the first parameter values include a trading period value, a trading offset value, a trading volume value, a credit loss value and a credit gain value; the determining a credit value for each node based on the first parameter value comprises:
and combining the credit loss value and the credit gain value to obtain a combined result, setting a weight coefficient, and calculating the trading period value, the trading deviation value, the trading capacity value and the combined result in a weighting mode to obtain the credit value of each node.
Preferably, the interoperation between the nodes of the block chain is mutual voting operation, and the second parameter value of each node is a voting value between the nodes; determining a consensus value for each node based on the credit value and the second parameter value for each node comprises:
and setting a weight coefficient, and carrying out weighted calculation on the credit value and the voting value among the nodes in a weighting mode to obtain a consensus value of each node.
Preferably, the determining an optimal proxy node and a candidate proxy node based on the consensus values of the nodes includes:
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 to 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 the verification is passed, the agent node adds the block containing the transaction information to the blockchain main chain.
The implementation process of each module function in this embodiment is similar to the implementation process of the method flow in embodiment 1, and is not described herein again.
According to the distributed photovoltaic power generation processing method, the credit value of each node is counted and calculated, the consensus value of each node is further determined, the optimal proxy node and the candidate proxy node are determined based on the consensus value of each node, the distributed processing requirements during distributed photovoltaic power generation transaction can be met, the processing speed is high, and the efficiency is high.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.

Claims (10)

1. A method for selecting a distributed power transaction agent node with block chain consensus is characterized by comprising the following steps:
s1, counting first parameter values of each node of the block chain, and determining credit values of the nodes based on the first parameter values;
s2, acquiring a second parameter value of each node according to the result of interoperation 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;
and S4, determining an optimal proxy node and a candidate proxy node based on the consensus values of the nodes.
2. The method of claim 1, wherein the first parameter values include a transaction period value, a transaction deviation value, a transaction capacity value, a credit loss value, and a credit gain value; the determining a credit value for each node based on the first parameter value comprises:
combining the credit loss value and the credit gain value to obtain a combined result, setting a first weight coefficient, and calculating the trading period value, the trading deviation value, the trading capacity value and the combined result by using the first weight coefficient in a weighting manner to obtain a credit value of each node; the method specifically comprises the following steps: ccreWhere α T + β P + γ D + Δ C, where α, β, and γ represent first weighting coefficients, T, P, D and Δ C are trade period values, trade capacity values, trade offset values, and credit loss and gain combination results, respectively, CcreIs the credit value of the node.
3. The method of claim 1, wherein the interoperation between nodes of the block chain is a mutual voting operation, and the second parameter value of each node is a voting value between nodes.
4. The method of claim 3, wherein determining the consensus value for each node based on the credit value for each node and the second parameter value comprises:
setting a second weight coefficient, and performing weighted calculation on the credit value and the voting value between the nodes in a weighting mode by using the second weight coefficient to obtain a consensus value of each node; the method specifically comprises the following steps: g ═ μ Ccre+ xi V, where μ and xi are the second weight coefficients, V is the vote value between nodes, CcreIs the credit value of the node, and G is the consensus value.
5. The method of claim 1, wherein determining an optimal proxy node and candidate proxy nodes based on the consensus values of the nodes comprises:
and selecting the node with the consensus value meeting the first preset condition as a proxy node, and selecting the node with the consensus value meeting the second preset condition in the rest nodes as a candidate proxy node to broadcast to the P2P network.
6. The method of claim 1, wherein the proxy node records transaction information and packages the transaction information into tiles, the proxy node broadcasting the tiles into a P2P network for verification by other nodes;
after the verification is passed, the agent node adds the block containing the transaction information to the blockchain main chain.
7. A system for selecting a node of a distributed power transaction agent for blockchain consensus, the system comprising:
the first determining module is used for counting first parameter values of all nodes of a 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 result of the interoperation between each node of the block chain;
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 agent node and the candidate agent node based on the consensus values of the nodes.
8. The system of claim 7, wherein the first parameter values include a transaction period value, a transaction deviation value, a transaction capacity value, a credit loss value, and a credit gain value; the determining a credit value for each node based on the first parameter value comprises:
combining the credit loss value and the credit gain value to obtain a combined result, setting a first weight coefficient, and using the first weight coefficientCalculating the transaction period value, the transaction deviation value, the transaction capacity value and the combination result by a weight coefficient to obtain a credit value of each node; the method specifically comprises the following steps: ccreWhere α T + β P + γ D + Δ C, where α, β, and γ represent first weighting coefficients, T, P, D and Δ C are trade period values, trade capacity values, trade offset values, and credit loss and gain combination results, respectively, CcreIs the credit value of the node.
9. The system of claim 7, wherein the interoperation between the nodes of the block chain is a mutual voting operation, and the second parameter value of each node is a voting value between the nodes; determining a consensus value for each node based on the credit value and the second parameter value for each node comprises:
setting a second weight coefficient, and performing weighted calculation on the credit value and the voting value between the nodes in a weighting mode by using the second weight coefficient to obtain a consensus value of each node; the method specifically comprises the following steps: g ═ μ Ccre+ xi V, where μ and xi are the second weight coefficients, V is the vote value between nodes, CcreIs the credit value of the node, and G is the consensus value.
10. The system of claim 7, wherein determining an optimal proxy node and candidate proxy nodes based on the consensus values of the nodes comprises:
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 to 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 the verification is passed, the agent node adds the block containing the transaction information to the blockchain main chain.
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 true CN112333251A (en) 2021-02-05
CN112333251B 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)

Cited By (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
CN113486118A (en) * 2021-07-21 2021-10-08 银清科技有限公司 Consensus node selection method and device
CN114025012A (en) * 2022-01-10 2022-02-08 国网电子商务有限公司 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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848125A (en) * 2018-05-22 2018-11-20 北京京东尚科信息技术有限公司 The method and apparatus and storage medium of common recognition service are provided in block chain
CN110138597A (en) * 2019-04-17 2019-08-16 上海大学 Based on the block chain DPOS of credit score and node clustering common recognition mechanism improved method
US20200213087A1 (en) * 2018-10-02 2020-07-02 Mutualink, Inc. Consensus-based voting for network member identification employing blockchain-based identity signature mechanisms

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848125A (en) * 2018-05-22 2018-11-20 北京京东尚科信息技术有限公司 The method and apparatus and storage medium of common recognition service are provided in block chain
US20200213087A1 (en) * 2018-10-02 2020-07-02 Mutualink, Inc. Consensus-based voting for network member identification employing blockchain-based identity signature mechanisms
CN110138597A (en) * 2019-04-17 2019-08-16 上海大学 Based on the block chain DPOS of credit score and node clustering common recognition mechanism improved method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHENG YUAN等: "An Improved Scheme of proof-of-stake Consensus Mechanism", 《2019 4TH INTERNATIONAL CONFERENCE ON MECHANICAL, CONTROL AND COMPUTER ENGINEERING》, pages 1 - 4 *
徐剑利等: "基于区块链的分布式电能交易系统技术研究", 《电气技术》, no. 10, pages 7 - 14 *

Cited By (6)

* 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
CN113486118A (en) * 2021-07-21 2021-10-08 银清科技有限公司 Consensus node selection method and device
CN113486118B (en) * 2021-07-21 2023-09-22 银清科技有限公司 Consensus node selection method and device
CN114025012A (en) * 2022-01-10 2022-02-08 国网电子商务有限公司 Node selection method, device, storage medium and equipment based on credit grouping
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

Also Published As

Publication number Publication date
CN112333251B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN112333251A (en) Block chain consensus distributed power transaction agent 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
CN111563786B (en) Virtual power plant regulation and control platform based on block chain and operation method
Yang et al. A proof-of-stake public blockchain based pricing scheme for peer-to-peer energy trading
Wang et al. A game-theoretic approach to energy trading in the smart grid
CN112434343B (en) Virtual power plant safety scheduling and trading method based on dual block chain technology
Faqiry et al. Double auction with hidden user information: Application to energy transaction in microgrid
Moradi-Dalvand et al. Self-scheduling of a wind producer based on information gap decision theory
Moniruzzaman et al. Blockchain and cooperative game theory for peer-to-peer energy trading in smart grids
CN112465208B (en) Virtual power plant random self-adaptive robust optimization scheduling method considering block chain technology
Geetha et al. Design of economic dispatch model for Gencos with thermal and wind powered generators
CN113393227A (en) Decentralized frequency modulation auxiliary transaction method based on multi-block chain
CN112993974A (en) Method, device, terminal and medium for calculating market discharge price of electric power spot goods day ahead
CN115271438B (en) Multi-main-body game collaborative scheduling method capable of considering carbon emission and electronic equipment
Wang et al. A multiblockchain-oriented decentralized market framework for frequency regulation service
Hajizadeh et al. Blockchain in decentralized demand-side control of microgrids
Karandikar et al. RenewLedger: Renewable energy management powered by Hyperledger Fabric
CN114971183A (en) V2G electric vehicle energy processing method and system based on block chain
Choobineh et al. Game-theoretic peer-to-peer solar energy trading on blockchain-based transaction infrastructure
Lin Analysis of blockchain-based smart contracts for peer-to-peer solar electricity transactive markets
CN116452334B (en) Multi-carbon transaction method and system for industrial park based on blockchain
CN112734238A (en) Weak-centralized production and consumption user electric quantity coordination method and system based on block chain
Khodabakhsh et al. Designing a bi-level flexibility market for transmission system congestion management considering distribution system performance improvement
CN116433373A (en) Block chain-based CCER and green certificate authentication matching method

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