CN114663091B - Power transaction method based on multi-chain block chain architecture - Google Patents

Power transaction method based on multi-chain block chain architecture Download PDF

Info

Publication number
CN114663091B
CN114663091B CN202210305350.3A CN202210305350A CN114663091B CN 114663091 B CN114663091 B CN 114663091B CN 202210305350 A CN202210305350 A CN 202210305350A CN 114663091 B CN114663091 B CN 114663091B
Authority
CN
China
Prior art keywords
chain
transaction
node
information
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
CN202210305350.3A
Other languages
Chinese (zh)
Other versions
CN114663091A (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.)
Shanghai Electric Power University
Original Assignee
Shanghai Electric Power University
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 Shanghai Electric Power University filed Critical Shanghai Electric Power University
Priority to CN202210305350.3A priority Critical patent/CN114663091B/en
Publication of CN114663091A publication Critical patent/CN114663091A/en
Application granted granted Critical
Publication of CN114663091B publication Critical patent/CN114663091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Human Resources & Organizations (AREA)
  • General Health & Medical Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a power transaction method based on a multi-chain block chain architecture, which comprises the following steps: a multi-chain block chain structure is constructed in advance, a plurality of block chains are coupled through a plurality of common nodes, and a transaction objective function and constraint conditions are set; when a transaction demand is generated, each node conducts transaction in a mode of signing an intelligent contract according to a preset transaction target function and a constraint condition, the node competes for the bookkeeping right according to a bookkeeping right consensus algorithm based on an honest value, and the shared node conducts cross-link processing on information between different block chains in the transaction process. According to the invention, by adopting the multi-chain block chain and coupling through the common nodes, various information related to transaction can be selectively shared and verified in the multi-chain architecture, so that the safety is improved; the node user can be guided to obey the intelligent contract by competing the bookkeeping right through the bookkeeping right consensus algorithm based on the integrity value, the priority of the integrity node is improved, the occurrence of malicious behaviors is avoided, and the transaction efficiency and quality are improved.

Description

Power transaction method based on multi-chain block chain architecture
Technical Field
The invention relates to the field of data security, in particular to a power transaction method based on a multi-chain block chain architecture.
Background
With the development of distributed energy technology and strong support of policy level, distributed energy equipment (DER) will be more and more widely applied. Traditional power consumers are transformed into production and consumption users with dual attributes of power production and consumption. The micro-grid is used as a relatively independent grid structure, can directly meet the transaction requirements of production and consumption users, realizes high-efficiency utilization of clean energy, and is a main practical scene for distributed electric energy to participate in electric power transaction. The traditional micro-grid power transaction strategy has the phenomena of trust loss and information opaqueness of both transaction parties, so that transaction data in a micro-grid system is easy to tamper, and the transaction efficiency cannot be effectively guaranteed. Therefore, the key point of the current power system innovation lies in establishing a safe, efficient and transparent transaction scheme.
The block chain is a distributed database for deeply applying novel computer technologies such as cryptographic algorithm, distributed data storage, point-to-point transmission, consensus mechanism and intelligent contract. The information in the database is shared by all network nodes, the manager of the data is in full charge of data updating, and meanwhile, the data updating process is also disclosed to all network nodes. Therefore, the blockchain has the characteristics of decentralization, non-tampering and public transparency, which are perfectly matched with the requirement of microgrid distributed power trading. Therefore, the block chain technology provides a research direction and a reference basis for solving the problems in the field of microgrid power transaction.
At present, scholars at home and abroad study and introduce the block chain technology into the field of microgrid power trading from multiple aspects. In the prior art, documents provide a reputation value incentive method based on a block chain technology, which effectively solves the problem of low transaction efficiency between production and consumption users. In the prior art, aiming at the safety problem of distributed energy transaction, an electricity distribution and sale transaction platform is designed, so that the transaction process of distributed energy among nodes is safer and more efficient. In some documents, the factor of 'time-front market' is considered, a random matching market trading mechanism among a plurality of main bodies is constructed, and the trading problem among a plurality of operating main bodies in a trading market is effectively solved. Documents propose a high-performance blockchain management platform capable of realizing decentralized autonomy of intelligent devices, and realize a decentralized autonomy management system. Documents propose an electric power transaction mechanism capable of guaranteeing rights and interests of both transaction parties, and data security of both transaction parties is realized by using a block chain technology and a multiple signature method. The distributed energy market architecture of the power distribution system based on the block chain is designed in literature, and the purpose of deeply fusing the advantages of the block chain and the transaction characteristics of the distributed energy is achieved. The documents have positive effects on realizing safety and high efficiency of power transaction in the microgrid and also provide reference and reference for further optimizing a distributed energy transaction mechanism in a power system. However, there are two problems: (1) the research mainly considers the problem of open transparency of the transaction and does not relate to the research on the aspect of network security constraint to be complied with in the distributed energy transaction, so that the transaction scheme is separated from the actual requirement of safe operation of the power system; (2) the integrity of the node still exists in the process of electric power transaction, and the current research lacks a supervision mechanism for regulating the transaction behavior of the node, which may cause the node to be driven by benefits, so that behaviors such as contract violation and malicious consensus occur.
Disclosure of Invention
Aiming at the problem of poor security of a transaction system in the prior art, the invention provides the electric power transaction method based on the multi-chain block chain architecture, and in order to take the dual characteristics of system security constraint and node integrity guarantee into consideration, the multi-chain block chain architecture is constructed for providing different functions, so that the security and the high efficiency of transactions among nodes of production and consumption users are effectively guaranteed.
The technical scheme of the invention is as follows.
The electric power transaction method based on the multi-chain block chain architecture comprises the following steps:
a multi-chain block chain structure is constructed in advance, a plurality of block chains are coupled through a plurality of common nodes, and a transaction objective function and constraint conditions are set;
when a transaction demand is generated, each node conducts transaction in a mode of signing an intelligent contract according to a preset transaction target function and a constraint condition, the node competes for the bookkeeping right according to a bookkeeping right consensus algorithm based on an honest value, and the shared node conducts cross-link processing on information between different block chains in the transaction process.
The invention adopts the multi-chain block chain, different block chains can be configured with different processing modes to realize different functions, and various information related to transaction can be selectively shared and verified in the multi-chain architecture through common node coupling, thereby improving the safety; the node user can be guided to obey the intelligent contract by competing the bookkeeping right through the bookkeeping right consensus algorithm based on the integrity value, the priority of the integrity node is improved, the occurrence of malicious behaviors is avoided, and the transaction efficiency and quality are improved.
Preferably, the pre-constructed multi-chain blockchain architecture includes: and constructing a transaction chain, a supervision chain, an information chain and an electric energy chain, wherein a scheduling center node is set as a common node of the transaction chain, the supervision chain and the electric energy chain, a transaction center node is set as a common node of the transaction chain, the information chain and the supervision chain, and the rest nodes are production and consumption users.
Preferably, the transaction objective function includes:
Figure BDA0003564828220000021
in the formula S t Representing the total income function of the electricity selling user at the time t; omega A Representing a set of electricity vendors;
Figure BDA0003564828220000022
the selling electricity unit price of the electricity selling user m at the time t is represented;
Figure BDA0003564828220000023
the selling power of the electricity selling user m at the time t is represented;
Figure BDA0003564828220000024
represents a cost function relative to the amount of electricity sold, expressed as:
Figure BDA0003564828220000025
wherein a, b and c represent corresponding electric quantities respectively
Figure BDA0003564828220000026
The cost factor of (c);
there is a balance of electricity between the electricity selling party and the electricity purchasing party, expressed as:
Figure BDA0003564828220000027
in the formula of omega B Representing a collection of electricity purchasing parties;
Figure BDA0003564828220000031
representing the required electric quantity of the nth power purchasing party in the t period;
the range of the electricity selling quantity which can be selected by the electricity selling party is as follows:
Figure BDA0003564828220000032
in the formula
Figure BDA0003564828220000033
Respectively representing the upper limit and the lower limit of the electric quantity sold by the mth electricity seller in the time period t.
Preferably, the constraint condition includes:
the balance constraint of point-to-point transactions in the microgrid is as follows:
Figure BDA0003564828220000034
in the formula: delta P i The adjustment amount of the power selling node i; Δ L j The adjustment quantity of the power purchase node j is obtained; { G P The electricity selling set of all point-to-point transactions is defined; { L P The electricity purchasing set of all point-to-point transactions is used;
line flow constraints for thermal and dynamic stability are considered:
Figure BDA0003564828220000035
in the formula: p l,max Taking the minimum value of thermal stability and dynamic stability constraint for the current limit of the branch I; p l,0 Is the initial power flow of branch l; delta P l Is the flow variation of branch l; { L } is the set of all lines;
and (3) considering dynamic and stable connecting line cut set flow constraint:
Figure BDA0003564828220000036
in the formula: p C,max Taking the current limit of the cut set C as dynamic stability constraint;
Figure BDA0003564828220000037
the initial current sum of the cut set C;
Figure BDA0003564828220000038
the tidal current variation of the cut set C; { C cut And the cutting set of all the connecting lines is collected.
Preferably, the integrity value is calculated based on a completion condition of the intelligent contract, and the calculation process includes:
is provided with
Figure BDA0003564828220000039
Indicating that the generation and consumption user j is the electricity selling user in the period t,
Figure BDA00035648282200000310
representing that the production and consumption user j is a power purchasing user in the time period t, since the production and consumption user j cannot be in two states of power selling and power purchasing at the same time, the state constraint of the production and consumption user can be represented as:
Figure BDA00035648282200000311
the calculation standard of the integrity value of the production and consumption user node is as follows:
Figure BDA0003564828220000041
in the formula:
Figure BDA0003564828220000042
representing the integrity value before t time period of the production and consumption user j; q ij Representing the electric quantity of the business of the production and consumption user j and the production and consumption user i in the intelligent contract;
Figure BDA0003564828220000043
representing the actual electric quantity generated when the production and consumption user j is in the electricity selling state;
Figure BDA0003564828220000044
representing the actual amount of power consumed by the generating and consuming user j in the power purchasing state.
Preferably, in the multi-chain blockchain architecture, credit point calculation and authority classification are performed between nodes through a consensus mechanism based on a multi-centralized alliance chain, and the method includes:
credit point change mode of the node:
Figure BDA0003564828220000045
in the formula: r j Accumulating credit points for the nodes; alpha is the weight occupied by the consensus integrity; beta is the weight occupied by the transaction integrity; s j For the node consensus contribution value, when the node completes the effective consensus in the period t, then s j Is 1, otherwise is 0;
Figure BDA0003564828220000046
the specific calculation method is as follows:
Figure BDA0003564828220000047
in the formula:
Figure BDA0003564828220000048
respectively representing the maximum value and the minimum value of the transaction integrity value in all nodes in the period t;
dividing the nodes into three levels based on the node credit point change mode: the first-level node is an authoritative node on the alliance chain; the secondary node is a verification node; the third-level node is a common node; in the initial stage of system construction, mechanisms with the top 30% of ranks are taken as first-level nodes, and the first-level nodes are responsible for creating and broadcasting blocks by using private key signatures of the first-level nodes in turn; the rest nodes are secondary nodes, and whether the signed blocks are legal or not is checked in turn; after entering the operation stage, the newly added node is defaulted to be a third-level node and does not have the right of creating a block and verifying the block; all nodes have the right to share data; the running result of each node is added or subtracted according to preset conditions, and grading is automatically adjusted when credit points cross preset authority grading boundary lines.
Preferably, the credit right consensus algorithm based on honest values includes:
Figure BDA0003564828220000049
in the formula: h is a hash function; d j Generating and deleting a root hash value of the user j; k j Representing the random number calculated by the production and consumption user j; c j Representing the honest value of the producing and disappearing users j; n is a radical of differ Representing a calculation difficulty coefficient; the integrity value of the node is positively correlated with the probability that the node acquires the accounting right, and the node with the higher integrity value is easier to acquire the accounting right;
when competing accounting right, the generation and elimination user j packs all transaction data in the time slot and carries out recursive hashing to obtain a root hash value D j And the production and consumption user j exhales a large amount of time and finds K based on the formula j Is a reaction of K j Packing into blocks, broadcasting to other users who are in production and consumption, and receiving by other usersAfter the corresponding block, according to C corresponding to the above formula j And verifying the blocks, if the blocks pass the verification, adding the corresponding blocks to the microgrid information chain, and if the blocks pass the verification, generating and consuming the user j to obtain the accounting reward, otherwise, deleting the blocks.
Preferably, the information chain adopts a decentralized public chain and is used for registering and registering production and consumption user nodes which want to participate in the microgrid power retail transaction; the electric energy chain adopts a centralized private chain, a dispatching center node is used as a center node to generate a new block, other nodes do not have the right of changing information in the new block, and each block on the electric energy chain is used for storing physical information of a system; the transaction chain is used as a main chain, a multicenter alliance chain is adopted, only transaction information of nodes is stored, and information coupling with other three side chains is achieved by means of the transaction center node and the dispatching center node; the monitoring chain adopts a multi-centralized alliance chain and is used for evaluating the integrity value of the transaction behavior of the production consumer, and each block is used for storing the integrity value information of the transaction node.
Preferably, the process of registering includes: the information chain generates a pair of secret keys P according to the identity information of the user a And P b When the user is a production and consumption user, the user needs to provide information of the distributed power generation device, on the basis, the information chain can generate a public key and a private key of the distributed power generation device, the block chain system can complete reliable verification of the node identity according to the public key corresponding to the production and consumption user, the system can generate a digital certificate according to the public key of the node and the user information, active nodes in the network collect and pack information in the network to form a new block, and the new block is written into the block chain after being verified by other nodes.
Preferably, the cross-chain processing includes:
and (3) cross-chain processing of a transaction chain and a power chain: after generating a new transaction block at the accounting right node of the transaction chain, the scheduling center node acquires a real-time market transaction record to be checked, and issues the record to the electric energy chain after passing the safety check; verifying other nodes on the power chain, issuing the formed transaction adjustment amount information delta M to the transaction chain by the scheduling center node after the verification is passed, verifying the validity of the adjustment scheme by the initial accounting right node, and updating the initial transaction scheme and issuing the transaction scheme in the whole network after the verification is passed;
and (3) cross-link processing of transaction chains and information chains: the trading center node issues the block information on the information chain to the trading chain to provide reference for predicting the trading electric quantity between the nodes in the next period;
and (3) cross-link processing of a transaction chain and a supervision chain: the transaction center node issues the transaction settlement information after the safety check adjustment to a supervision chain, the nodes on the supervision chain selectively calculate the integrity value of the transaction nodes, then the whole network consensus is achieved by means of a consensus mechanism, new blocks are formed and written into a supervision chain system, the transaction nodes acquire block information and issue the block information to the transaction chain, and the integrity value information is used as an evaluation index for the preferential selection of the next transaction.
The multi-chain block chain structure of the invention has the following characteristics:
design of multicenter transaction chain for point-to-point transactions. The maximum income of the production and consumption users in the micro-grid is used as an objective function, a transaction optimization model is established, and the probability of transaction between the production and consumption users and the large grid is reduced as much as possible while the electric energy requirements of the production and consumption nodes are met. The transaction chain adopts a multi-centralized alliance chain, and the admission mechanism of the node depends on basic information of the node on the information chain and the historical integrity value, so that the transaction between the production and consumption users can run more safely and efficiently. All nodes in the transaction chain agree through a proof of authority (PoA) algorithm.
And (4) designing a centralized electric energy chain for network security check. The central node of the power chain is a scheduling node which is used as a third party of transaction, and the problem of economic benefit is not involved. Meanwhile, the checking information of the dispatching center can be issued to the private chain and verified by other nodes, so that the reliability of the checking information is guaranteed. Therefore, the node is set as a central node of the private chain, so that the high efficiency of electric energy safety check can be ensured, and the opacity and the unpublished property generated by single-node check are avoided.
Design of a multicenter supervisory chain that constrains yielding user behavior. In the supervision chain system, a transaction center node is used as a node for coupling a transaction chain and a supervision chain, final settlement information of the transaction chain is released to a supervision chain network, and active nodes in the network can apply for calculating the integrity value of the node in the transaction period. On the basis, consensus is achieved in the whole network according to the improved PoA consensus algorithm. And finally, the verified node integrity value is written into the block chain to be used as a priority reference basis for the next transaction.
Based on the design of decentralized information chains. Each node on the information chain is provided with complete block information for storing information such as addresses of producers and consumers, self electricity generation and utilization conditions, daily load curves and the like. Because the number of nodes on the information chain is huge and the variety is various, the public chain can be adopted to ensure the public transparency of the user node information. All nodes on the information chain compete with each other to generate the node of the bookkeeping right through a consensus mechanism based on integrity value, and the integrity value depends on the node of the trading center to realize the coupling between the supervision chain and the information chain. Meanwhile, the user information of all nodes of the information chain can be traced, and the information chain cannot be artificially tampered, so that the self-decision and self-management of the transaction electric quantity can be realized.
The substantial effects of the invention include: establishing a multi-chain block chain architecture which takes the transaction chain as a central chain and takes the power chain, the information chain and the supervision chain as auxiliary chains by utilizing the characteristic that the multi-chain block chain can store the transaction information in a chain division manner; the multi-chain block chain architecture is combined to give consideration to the functions of economy, safety and supervision attributes, and the aim of improving the transaction performance and safety is fulfilled; by improving an authority certification consensus mechanism, the consensus efficiency among nodes in a alliance chain is greatly improved; the reliability and the high efficiency of the transaction between the nodes are ensured; when network security check is carried out on the transaction, the transaction and consensus behaviors of the generation and elimination user nodes are restrained, and decision support and theoretical support are provided for solving the problems of low performance and the like of the power transaction method based on the single-chain block chain architecture.
Drawings
FIG. 1 is a flow chart of an embodiment of the present invention;
FIG. 2 is a diagram of a multi-chain block chain architecture of an embodiment of the present invention;
FIG. 3 is a power chain and transaction chain coupled operational diagram of an embodiment of the present invention;
FIG. 4 is a flow chart of node contention accounting rights in an embodiment of the present invention;
FIG. 5 is a schematic diagram of a production and consumption user equipment electrical wiring topology of an embodiment of the present invention;
FIG. 6 is a diagram of a result of a transaction between production and consumption users before security check, in accordance with an embodiment of the present invention;
FIG. 7 is a diagram illustrating the results of transactions between production and consumption users after security checks in accordance with an embodiment of the present invention;
fig. 8 is a graph showing the change of the integrity value of a user node after 100 services according to an embodiment of the present invention;
FIG. 9 is a diagram of node transactions between yielding and consuming users based on loyalty values, in accordance with an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions will be clearly and completely described below with reference to the embodiments, 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 obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
It should be understood that, in the various embodiments of the present invention, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
It should be understood that in the present application, "comprising" and "having" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that, in the present invention, "a plurality" means two or more. "and/or" is merely an association describing an associated object, meaning that three relationships may exist, for example, and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "comprising a, B and C", "comprising a, B, C" means that all three of a, B, C are comprised, "comprising a, B or C" means comprising one of three of a, B, C, "comprising a, B and/or C" means comprising any 1 or any 2 or 3 of three of a, B, C.
The technical solution of the present invention will be described in detail below with specific examples. Embodiments may be combined with each other and descriptions of the same or similar concepts or processes may be omitted in some embodiments.
The embodiment is as follows:
the power transaction method based on the multi-chain blockchain architecture includes the following steps as shown in fig. 1:
a multi-chain block chain structure is constructed in advance, a plurality of block chains are coupled through a plurality of common nodes, and a transaction objective function and constraint conditions are set;
when a transaction demand is generated, each node conducts transaction in a mode of signing an intelligent contract according to a preset transaction target function and a constraint condition, the node competes for the bookkeeping right according to a bookkeeping right consensus algorithm based on an honest value, and the shared node conducts cross-link processing on information between different block chains in the transaction process.
As shown in fig. 2, the pre-constructed multi-chain blockchain structure includes: and constructing a transaction chain, a supervision chain, an information chain and an electric energy chain, wherein a scheduling center node is set as a common node of the transaction chain, the supervision chain and the electric energy chain, a transaction center node is set as a common node of the transaction chain, the information chain and the supervision chain, and the other nodes are production and consumption users.
The information chain adopts a decentralized public chain and is used for registering and registering production and consumption user nodes which want to participate in the microgrid power retail transaction; the electric energy chain adopts a centralized private chain, a dispatching center node is used as a center node to generate a new block, other nodes do not have the right of changing information in the new block, and each block on the electric energy chain is used for storing physical information of the system; the transaction chain is used as a main chain, a multi-centralized alliance chain is adopted, only the transaction information of the nodes is stored, and the transaction chain is coupled with the information of other three side chains by virtue of the transaction center node and the dispatching center node; the supervision chain adopts a multicentralized alliance chain and is used for evaluating the integrity value of the transaction behavior of the production and consumption user, and each block is used for storing integrity value information of the transaction node.
Compared with the existing single-chain block chain, the multi-chain block chain structure provided by the embodiment has the following characteristics: the transaction information, the user information, the physical information and the supervision information are separately deployed, and the transaction chain is respectively coupled with the information chain, the power chain and the supervision chain and operates independently. The existing single-chain block chain not only needs to store transaction information, but also needs to contain electric energy transmission information in order to meet physical constraints, so that the problems of block chain capacity increase, performance reduction and the like are caused. In addition, the single-chain block chain lacks supervision information, and effective constraint on transaction behaviors of production and consumption users cannot be realized. In the multi-chain blockchain system provided by this embodiment, the transaction chain as a main chain depends on the transaction center node and the scheduling center to realize information coupling with other three side chains. The transaction chain adopts a multi-centralized alliance chain, only stores the transaction information of the nodes, and realizes the efficient storage and implementation of the transaction scheme between the nodes of the production and consumption users; the power chain adopts a centralized private chain, the dispatching center is used as a central node to generate a new block, and other nodes do not have the right of changing information in the new block. Physical information of each block storage system on the power chain is stored, and quick and safe checking of the transaction scheme is realized; the monitoring chain adopts a multi-centralized alliance chain, and each block stores integrity value information of transaction nodes, so that the transaction behaviors of the production and consumption users are effectively evaluated; the information chain adopts a decentralized public chain, and the production and consumption user nodes want to participate in the electric power retail transaction of the microgrid and have to be registered in the chain. The production and consumption user inputs the information of the self power generation power, the load power and the like into the system, and the behavior that the information is maliciously tampered by the transaction node is effectively avoided.
The multi-chain block chain structure of the invention has the following characteristics:
design of multicenter transaction chain for point-to-point transactions. The maximum income of the production and consumption users in the micro-grid is used as an objective function, a transaction optimization model is established, and the probability of transaction between the production and consumption users and the large grid is reduced as much as possible while the electric energy requirements of the production and consumption nodes are met. The transaction chain adopts a multicentralized alliance chain, and the admission mechanism of the nodes depends on basic information of the nodes on the information chain and historical integrity values, so that the transactions among the production and consumption users can run more safely and efficiently. All nodes in the transaction chain agree through a proof of authority (PoA) algorithm.
And (4) designing a centralized electric energy chain for network security check. The central node of the power chain is a scheduling node which is used as a third party of transaction, and the problem of economic benefit is not involved. Meanwhile, the checking information of the dispatching center can be issued to the private chain and verified by other nodes, so that the reliability of the checking information is guaranteed. Therefore, the node is set as a central node of the private chain, so that the high efficiency of electric energy safety check can be ensured, and the opacity and the unpublished property generated by single-node check are avoided.
Design of a multicenter supervisory chain that constrains yielding user behavior. In the supervision chain system, a trading center node is used as a node for coupling a trading chain and a supervision chain, final settlement information of the trading chain is issued to a supervision chain network, and active nodes in the network can apply for calculating the integrity value of the node in the trading period. On the basis, consensus is achieved in the whole network according to an improved PoA consensus algorithm. And finally, the verified node integrity value is written into the block chain to be used as a priority reference basis for the next transaction.
Based on the design of decentralized information chains. Each node on the information chain is provided with complete block information for storing information such as addresses of producers and consumers, self electricity generation and utilization conditions, daily load curves and the like. Because the number of nodes on the information chain is huge and the variety is various, the public chain can be adopted to ensure the public transparency of the user node information. All nodes on the information chain compete with each other to generate the node of the bookkeeping right through a consensus mechanism based on integrity value, and the integrity value depends on the node of the trading center to realize the coupling between the supervision chain and the information chain. Meanwhile, the user information of all nodes of the information chain can be traced, and the information chain cannot be artificially tampered, so that the self-decision and self-management of the transaction electric quantity can be realized.
The coupling operation mechanism of the transaction chain and the power chain of the embodiment is shown in fig. 3: and after the scheduling center node on the transaction chain generates a new transaction block at the accounting right node, acquiring a real-time market transaction record to be checked, and issuing the record to the power chain. And after the dispatching center node performs safety check on the transaction initial scheme, other nodes on the power chain verify the transaction initial scheme. And after the verification is passed, the formed transaction adjustment amount information delta M is issued to a transaction chain by the scheduling center node. The validity of the adjustment scheme is verified by the initial billing authority node. And after the verification is passed, updating the initial transaction scheme and then issuing the transaction scheme through the whole network.
The coupling operation mechanism of the transaction chain and the information chain of the embodiment is as follows: the transaction chain and the information chain are coupled by virtue of a transaction center, and the transaction center is responsible for issuing block information on the information chain to the transaction chain and providing reference for predicting the transaction electric quantity between nodes in the next period.
The coupling operation mechanism of the transaction chain and the supervision chain of the embodiment is as follows: and the transaction center node on the transaction chain issues the transaction settlement information after the safety check adjustment to the supervision chain. On the supervision chain, the active node can apply for calculating the integrity value of the transaction node, and then the improved PoA consensus mechanism is used for achieving the whole network consensus and forming a new block to be written into the supervision chain system. And the trading node acquires block information and issues the block information to a trading chain, and the integrity value information is used as an evaluation index for preferential election of the next trade.
In the process of chain crossing, block header information submitted by the coupling node needs to be checked, wherein the block header information comprises a digital signature encrypted by public-private key technology and a merkle tree root. The digital signature can guarantee the legality of the data source, and the merkle tree root is used for verifying the integrity of transaction content, so that the authenticity of the data source in the chain crossing process is effectively guaranteed.
Inside the microgrid, each production and consumption user carries out quantitative prediction on the amount of tradable electricity in the period according to the generated power of the distributed power supply and the own power consumption power collected by the intelligent ammeter. Meanwhile, the maximum economic benefit of users is used as the target, the respective electricity purchasing or electricity selling power is optimized and decided, and the part of the electricity shortage or the surplus electricity inside the microgrid is purchased by the external grid. In multilateral trading, the electricity purchasing party and the electricity selling party need to initiate a buying/selling deviation electricity quantity trading demand so as to eliminate the deviation of actual electricity consumption and a planned value. When in the seller market environment, the transaction objective function is the highest benefit of the electricity selling users. When in the market environment of the buyer, the transaction goal is to require the electricity purchasing user to purchase the lowest price of electricity. In this embodiment, taking the seller market as an example, the objective function of the transaction is as follows:
Figure BDA0003564828220000101
in the formula S t Representing the total income function of the electricity selling user at the time t; omega A Representing a set of electricity vendors;
Figure BDA0003564828220000102
the selling electricity unit price of the electricity selling user m at the time t is represented;
Figure BDA0003564828220000103
the selling power of the electricity selling user m at the time t is represented;
Figure BDA0003564828220000104
the cost function relative to the amount of electricity sold is expressed as:
Figure BDA0003564828220000105
in which a, b and c represent the corresponding electric quantities respectively
Figure BDA0003564828220000106
The cost factor of (c).
There is a balance of electricity between the electricity selling party and the electricity purchasing party, which can be expressed as:
Figure BDA0003564828220000107
formula mid omega B Representing a collection of electricity purchasing parties;
Figure BDA0003564828220000108
and the required electric quantity of the nth power buyer in the t period is represented.
The range of the electricity selling quantity which can be selected by the electricity selling party is as follows:
Figure BDA0003564828220000109
in the formula
Figure BDA00035648282200001010
Respectively representing the upper limit and the lower limit of the electric quantity sold by the mth electricity seller in the time period t.
The transaction chain is a multicenter alliance chain, and all node blocks store transaction information of a power distribution system where point-to-point transactions are located. The transaction center node is used as a supervision node, transaction information of the production and consumption users on the alliance chain is issued to the supervision chain, active nodes in the supervision chain apply for calculating integrity values of the production and consumption user nodes, and the integrity values are issued to all the supervision chains. Since the authority of authority (PoA) generates blocks faster, scalability is strong.
The power chain is a private block chain self-built in the microgrid, and the chain only provides service for production and consumption users of the same voltage level in the area. Based on a multi-centralized transaction chain, transaction schemes agreed by all the producer and consumer markets have to be checked through network security before being implemented specifically, so that the security constraint of a power system is met. Therefore, a coupled operation mode of the transaction chain and the electric energy chain is designed, a centralized electric energy chain-based network security check method is provided, and fair check and reasonable adjustment of the transaction settlement scheme D are achieved.
The electric energy chain selects a centralized private chain, and all node blocks store physical data of a power distribution system where point-to-point transactions are located, such as transaction electric quantity, energy types and the like. The dispatching center is used as a center node in the private chain network and is responsible for conducting node electric energy safety analysis and generating a final block, and other nodes in the electric energy chain only have the function of monitoring the accuracy of block information. Therefore, the efficiency of electric energy safety check can be improved, and the fairness of electric energy safety check can be guaranteed.
The electric energy safety check is divided into 2 aspects of a non-free state and a free state, the non-free state safety check of the line transmission power balance constraint is mainly considered in the embodiment, and the free state safety check is reflected on the line power flow constraint and the tie line cutting set power flow constraint.
The balance constraint of point-to-point transactions in the microgrid is as follows:
Figure BDA0003564828220000111
in the formula: delta P i Adjusting the amount for point-to-point transaction (adjusting amount of electricity selling node i); Δ L j Adjusting the quantity for point-to-point transaction (the adjustment quantity of the electricity purchasing node j); { G P The electricity selling set of all point-to-point transactions is defined; { L P The electricity purchase set of all point-to-point transactions.
Consider thermally and kinetically stable line flow constraints:
Figure BDA0003564828220000112
in the formula: p is l,max The median of thermal stability and dynamic stability constraint can be taken as the load flow limit of the branch I; p l,0 Is the initial power flow of branch l; delta P l Is the flow variation of branch l; { L } is the set of all lines.
Considering dynamic and stable junctor cut set flow constraint:
Figure BDA0003564828220000113
in the formula: p is C,max To cut set CThe power flow limitation can be taken as dynamic stability constraint;
Figure BDA0003564828220000114
the initial power flow sum of the cut set C;
Figure BDA0003564828220000115
the tidal current variable quantity of the cut set C is obtained; { C cut And } is the set of all tie cut sets.
In the actual market trading process based on the block chain, the victims on the trading chain achieve Nash equilibrium after dynamic game, a final trading scheme is obtained, then the safety check of the trading electric quantity of the node is completed by utilizing the electric energy chain coupled with the final trading scheme, and block adjustment information is formed.
Based on a multi-centralized supervision chain, the trading center issues trading information to the supervision chain after trading settlement. And (3) calculating the integrity values of the nodes of the transaction chain by all the nodes on the supervision chain and achieving consensus, and on the basis, sequencing the integrity values from large to small by the transaction center and releasing the integrity values of the nodes to the transaction chain. The higher the trustworthiness value the higher the node has priority recommendations in the next cycle of transactions. Therefore, the coupled operation mode of the transaction chain and the supervision chain designed by the embodiment effectively realizes the information intercommunication of the transaction chain and the supervision chain.
The supervision chain selects a multicenter alliance chain, and all node blocks store settlement information of point-to-point transactions so as to verify and calculate the integrity value of the transaction nodes. Both the trading center node (third party profit enterprise outside of the power distribution system) and the producer and consumer may act as supervisory chain nodes. And voting and selecting the supervision link nodes by all the production and consumption user nodes, and comprehensively drawing up according to the historical accumulated honesty values. And after the supervision chain node group is confirmed, the active nodes in the system apply for executing the calculation of the integrity value of the transaction node.
In the electric power transaction process, default problems can occur to both transaction parties. The actual power generation amount of the electricity seller is not equal to the transaction power amount, so that the electricity buyer needs to purchase the external grid power amount at a retail price higher than the electric power price inside the microgrid, the economic benefit of the electricity buyer is damaged, and the environmental protection benefit advantage of distributed photovoltaic power generation is not brought into full play; after the electricity buyer signs the intelligent contract, the electricity consumption exceeds the predetermined value, which will result in the loss of the benefits of the electricity seller. Meanwhile, the behavior that the electricity is not saved as the electricity purchasing party lacks environmental protection awareness. Therefore, in the present embodiment, the completion condition of the intelligent contract is used as the calculation basis for the integrity value of the yield user, and the calculation method is as follows:
suppose that
Figure BDA0003564828220000121
Indicating that the user j is the electricity selling user in the period t,
Figure BDA0003564828220000122
and indicating that the generating and consuming user j is the electricity purchasing user in the period t. Since the production and consumption user j cannot be in the two states of selling electricity and purchasing electricity at the same time, the state constraint of the production and consumption user can be expressed as follows:
Figure BDA0003564828220000123
combining the state constraints of the producers and the consumers, the calculation standard for obtaining the integrity value of the producer and the consumer nodes is as follows:
Figure BDA0003564828220000124
in the formula:
Figure BDA0003564828220000125
representing the integrity value before t time period of the production and consumption user j; q ij Representing the electric quantity of the contract between the production and consumption user j and the production and consumption user i in the intelligent contract;
Figure BDA0003564828220000126
representing the actual electric quantity generated when the generation and consumption user j is in the electricity selling state;
Figure BDA0003564828220000127
representing users of birth or deathj actual amount of power consumed when in a power purchase state.
When a production and consumption user wants to participate in electric power retail transaction inside a microgrid, the identity information of the user needs to be registered as necessary. Because the number of users who produce and consume is huge, the real-time performance of the information is stronger, and the information density is higher. Therefore, the information chain adopts a decentralized public chain construction mode, so that the basic information of the production and consumption users is public and transparent and has higher verifiability. All nodes in the information chain can automatically select whether to participate in accounting right competition or not without presetting. The large nodes such as the trading center and the like with the server cluster have the highest computational power and storage capacity, generally operate as full nodes and are responsible for various kinds of work such as output computational power and the like. Most of the users who are produced and consumed are light nodes and only participate in checking and the like. In addition, the transaction center has specificity, and not only needs to participate in the formation of the information chain, but also needs to form a transaction chain with a production and consumption user and a scheduling center of the transaction chain. The information chain not only has the function of collecting and sorting the basic information of the electric power transaction user, but also can prevent the information from being maliciously tampered, so that the data information on the information chain becomes a reliable reference basis of a transaction scheme.
The information chain generates a pair of secret keys P according to the identity information of the user a And P b When the user is a prosumer, the user needs to provide information of the distributed power generation apparatus. On the basis, the information chain can generate a public key and a private key of the distributed power generation device, and the block chain system can complete reliable verification of the node identity according to the public key corresponding to the production and consumption user. The system generates a digital certificate according to the public key of the node and the user information, the active node in the network collects and packs the information in the network and forms a new block, and the new block is written into a block chain after being verified by other nodes.
The digital certificate is introduced to better manage users joining the system, and when the digital certificate is written into the blockchain system, the users sign an intelligent contract with the information chain, and the purpose of the intelligent contract is to guarantee the rights and interests of the users. When some users conduct malicious transactions in the transaction chain, the digital certificate status of the user node is deducted. When the user is deducted a certain score, the intelligent contract closing date releases the contract with the related user and abolishes the digital certificate of the user in the information chain according to the contract content, so that the user cannot conduct electric energy transaction.
In the traditional PoA consensus algorithm, a group of authorized nodes which have the accounting authority of the alliance chain need to be specified in advance. Therefore, the accounting right does not need to be competed by calculation, the resource waste is effectively reduced, and the block generation speed is improved. However, the system may have problems such as malicious nodes or lack of integrity of transactions between nodes. In the embodiment, the authorized node selection mode in the PoA consensus algorithm is improved, and a credit point and grading mechanism is introduced, so that the improved PoA consensus algorithm not only retains the original advantages, but also effectively supervises the transaction and consensus behaviors of the nodes.
In the embodiment, credit points are adopted to represent the credibility of the nodes in the microgrid, and the credit points of the nodes of the productive and distressed users are increased or reduced according to the consensus working performance and the historical transaction honesty. On the basis, the control on the node authority is realized through a grading mechanism, so that the enthusiasm of each node for actively participating in management of the alliance chain is fully mobilized, and the system is ensured to operate safely and efficiently. The credit point change method of the node is as follows.
Figure BDA0003564828220000131
In the formula: r j Accumulating credit points for the nodes; alpha is the weight occupied by the consensus integrity; beta is the weight occupied by transaction integrity; s j For node consensus contribution, when a node completes valid consensus during time t, then s j Is 1, otherwise is 0;
Figure BDA0003564828220000132
the specific calculation method is that the value of the node transaction integrity value after benefit type standardization is carried out is as follows:
Figure BDA0003564828220000133
in the formula:
Figure BDA0003564828220000134
representing the maximum and minimum values of the transaction integrity value in all nodes of the time period t, respectively.
Dividing the nodes into three levels based on the node credit point change mode: the first-level node can become an authoritative node on the alliance chain; the secondary node is a verification node; the third-level node is a common node.
In the initial stage of system construction, the first 30% ranked mechanisms are taken as first-level nodes, and the first-level nodes are responsible for creating and broadcasting blocks by using private key signatures of the first-level nodes in turn. The rest nodes are secondary nodes, and whether the signed blocks are legal or not is checked in turn. After the operation stage is entered, the newly added node defaults to a three-level node and does not have the right of creating a block and verifying the block. All nodes have the right to share data. And after the third-level node is added, the second-level node is formed under the condition that the data synchronization on the block chain is completed and the normal operation is carried out for three months. The first level node signs to create a legal block and adds a certain credit score, the creation of an invalid or false block is deducted from the credit score, and when the credit score is lower than a set threshold value, the block is reduced to the second level, and the position of the block is filled by the node with the highest credit score in the second level nodes. Similarly, the secondary node verifies that a valid block adds credit points, and the credit points are deducted due to audit errors or intentional cheating, and the credit points are reduced to three levels when the credit points are lower than the threshold value. The data sharing behaviors of the nodes at all levels are not differentiated.
In the multi-chain blockchain system proposed in the present embodiment, the transaction chain and the supervision chain are designed as a federation chain. Therefore, by adopting the improved PoA algorithm as a consensus mechanism of the two chains, not only can efficient consensus be ensured, but also the transaction behaviors of the production and consumption user nodes can be restrained.
In order to achieve the purpose of influencing the economic benefit of the node by the integrity value, the embodiment provides an accounting weight consensus algorithm based on the integrity value:
Figure BDA0003564828220000141
in the formula: h is a hash function; d j Generating and eliminating a root hash value of the user j; k j Representing the random number calculated by the production and consumption user j; c j Representing the honesty values of the producing and disappearing users j; n is a radical of hydrogen differ Representing the calculation difficulty factor.
From the above equation, the integrity value of the node is positively correlated with the probability that the node acquires the accounting right, and the node with the higher integrity value is easier to acquire the accounting right. Therefore, the consensus algorithm can form a virtuous circle, so that the production and consumption user nodes are willing to follow an intelligent contract, the benefits of the production and consumption user nodes are maximized, and meanwhile, the mutual coupling of the two chains is realized by the aid of information transmission between the supervision chain and the information chain by the aid of the trading center nodes. The flow of the provision of canceling the user's competition for billing rights is shown in fig. 4.
In consideration of the fact that the integrity value of the node is a mark for evaluating the completion condition of the intelligent contract of the node, the transaction method between the nodes of the productive and destructive users provided by the embodiment not only considers the problem of security check, but also effectively ensures that the node with the highest integrity value has priority transaction right. The specific trading algorithm is shown in table 1 below.
TABLE 1 trading algorithm based on network security check and integrity values
Figure BDA0003564828220000142
Figure BDA0003564828220000151
The method and the system of the embodiment have the following practical effects:
in order to verify the feasibility of the electric power transaction method based on the multi-chain block chain, the intelligent contract is written by using the solidity language, and the microgrid transaction platform is developed by using JavaScript, metamask plug-in, atom, the Ethernet platform and web3. Js. Assuming that the number of the users participating in the power transaction is 0 to 5, the electrical wiring of the user devices is as shown in fig. 5. The simulation trading scene comprises 5 production and consumption users and 1 large power grid, and the six users correspond to a trading chain node. The number of electric energy chain links is set to be 3, wherein the dispatching center node is used as a coupling node of the electric energy chain and the transaction chain, and the rest 2 nodes are served by a production and consumption user 1 and a production and consumption user 2. The number of the supervision chain links is set to be 2, wherein the trading center node is used as a center node of the supervision chain, and the rest node is served by the dispatching center node. The number of points of the information chain links is the same as that of the transaction chain links, and the information chain links and the transaction chain links are composed of similar users. The price of selling electricity to the power grid company by the producer and the consumer is 0.5 yuan/(kWh.h), and the price of purchasing electricity to the power grid company is 1.0 yuan/(kWh.h). Assume that the consensus integrity is weighted to 0.4 and the transaction integrity is weighted to 0.6.
And the production and consumption users can send state information to the blockchain system according to the self power generation amount and the power consumption amount in each period. Suppose that three users who produce or consume are in a power shortage state (hereinafter, referred to as power purchasing users) in a certain period, and the rest users are in a power selling state (hereinafter, referred to as power selling users) in the period. Since the address of the main flow block chain of the ethernet works and the like is 42 bits, the embodiment adopts a simplified 8-bit address description, for example, the address of the generation and consumption user 1 is 0xx00x01, and the address of the power grid company is 0xx00x00. The initial quote information of the prenatal and xiao before the start of the trade is shown in table 2.
Table 2 initial quotation for producer and consumer nodes
Obstetric and abortive user Address of birth and death user Initial quote/(yuan (kW. H) -1 ) Required power/kW
1 0xx00x01 0.74 30
2 0xx00x02 0.75 110
3 0xx00x03 0.77 -80
4 0xx00x04 0.79 -40
5 0xx00x05 0.72 60
Fig. 6 and 7 show the transaction scheme between the production and consumption users before and after the electric energy chain check, respectively. It can be seen from the figure that after the safety check of the power chain, the production and consumption user 2 totally cuts 18.5kW of power, and the power is distributed in proportion, and the cut is 3.5kW of transaction power with the production and consumption person 3, 6.2kW of transaction power with the production and consumption person 4 and 8.8 of transaction power with a large power grid. However, the power cutting between the production and consumption user 2 and the power grid company cannot meet the free constraint of the unit, and the security check cannot pass, so that the point-to-point transaction fails.
At this time, the dispatch center node gives the point-to-point transaction range of the productive user 2, that is, the power purchased by the node must not be more than 87.5kW. On this basis, the prosumer 2, after re-optimizing the decision, reaches a new trading plan. As can be seen from the comparative deviation of fig. 6 and 7, the trading power between the large grid and the producer and the consumer is reduced by 18.5kW. Therefore, the new transaction scheme after the safety check meets the free and non-free constraints, the transaction power does not need to be cut, and the point-to-point transaction is smoothly completed.
If the behavior pattern of the node is not changed, the integrity value of the node is gradually stabilized after all nodes in the system participate in about 100 transactions. Therefore, the network node integrity value change condition of fig. 8 can be obtained by simulating 100 randomly generated services based on the node integrity value evaluation method. It is obvious from the figure that some nodes have higher integrity value, which shows that the node has higher transaction integrity and consensus integrity. According to the design of the algorithm mechanism, the transaction priority of the yielding user depends on the integrity value of the node.
And simulating the trading of the nodes based on the integrity value, wherein the node with the highest integrity value has priority trading selection. Thus, the transaction volume for each node is shown in fig. 9, where node 6 represents a large grid. As can be seen from the integrity value change graph of the node, the integrity value of the node 2 is 0.7, the integrity value in all the nodes is the lowest, and the transaction preference is not given. After the round of transaction cycle is finished, partial requirements are not met, and the node can only trade with a large power grid at a retail price higher than the electric power price inside the micro power grid to finish the balance of the deviation electric quantity.
In summary, the electric power transaction method based on the multi-chain blockchain system provided by the embodiment can not only realize network security check of transactions, but also effectively restrict transaction behaviors of nodes, so that the transaction process between the nodes is safer and more efficient.
In the multi-chain blockchain system, transaction data, physical data, node integrity value calculation data and node identity information data are deployed in a split chain manner, the transaction number per second of the transaction chain can be 12, and the transaction number per second of the single-chain blockchain is 6. The block confirmation time on the single-chain block chain comprises confirmation processes of node identity registration information, transaction information and check adjustment information, and the total confirmation time is 29.64s. Confirming the transaction information in the multi-chain block chain in the transaction chain, wherein the confirming time is 10.32s; the verification of the checking and adjusting information is carried out in the power chain, and the power chain adopts a private chain and the number of nodes is small, so that the verification time is shorter to be 3.47s; the confirmation of the node identity information is carried out in an information chain, and the confirmation time is 3.14s because the node identity information only contains data such as login information and the like; the supervision chain plays a role in supervising the transaction behavior of the node, and although the block confirmation average time is increased, the reliable implementation of the transaction is effectively guaranteed. Therefore, the integrity value calculation information of the nodes is confirmed in the supervision chain, and the confirmation time is 2.35s because the number of the nodes is small. The total validation time for a multi-stranded blockchain is shorter than for a single-stranded blockchain. Therefore, under the point-to-point transaction scene, the multi-chain blockchain system has higher transaction processing efficiency and performance.
In this embodiment, a multi-chain blockchain architecture is established, in which the transaction chain is used as a central chain and the power chain, the information chain, and the supervisory chain are used as auxiliary chains, by using the characteristic that the multi-chain blockchain system can store transaction information in a chain-divided manner. And combining the multi-chain block chain architecture with the functions of economy, safety and supervision attributes, constructing a transaction optimization model between the production and consumption user nodes, and achieving the purpose of improving transaction performance and safety. By improving the authority certification consensus mechanism, the consensus efficiency among nodes in the alliance chain is greatly improved. On the basis, an electric power transaction method based on a multi-chain block chain architecture is provided, so that the reliability and the high efficiency of the transaction between the nodes are guaranteed. Example analysis shows that the electric power transaction method based on the multi-chain blockchain architecture can guarantee the security and the high efficiency of transactions, and restricts the transactions and consensus behaviors of the generation and elimination user nodes while performing network security check on the transactions.
Through the description of the foregoing embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the functional modules is used for illustration, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of a specific device is divided into different functional modules, so as to complete all or part of the functions described above.
In the embodiments provided in the present application, it should be understood that the disclosed structures and methods may be implemented in other ways. For example, the above-described embodiments with respect to structures are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may have another division manner in actual implementation, for example, a plurality of units or components may be combined or may be integrated into another structure, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, structures or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented as a software functional unit and sold or used as a separate product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, or portions of the technical solutions that substantially contribute to the prior art, or all or portions of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (4)

1. The electric power transaction method based on the multi-chain block chain architecture is characterized by comprising the following steps:
a multi-chain block chain structure is constructed in advance, a plurality of block chains are coupled through a plurality of common nodes, and a transaction objective function and constraint conditions are set;
when a transaction demand is generated, each node conducts transaction in a mode of signing an intelligent contract according to a preset transaction target function and a constraint condition, the node competes for a bookkeeping right according to a bookkeeping right consensus algorithm based on an honest value, and information among different block chains is subjected to cross-link processing by a shared node in the transaction process;
the pre-constructed multi-chain blockchain architecture comprises: constructing a transaction chain, a supervision chain, an information chain and an electric energy chain, wherein a scheduling center node is set as a common node of the transaction chain, the supervision chain and the electric energy chain, a transaction center node is set as a common node of the transaction chain, the information chain and the supervision chain, and the rest nodes are production and consumption users;
the information chain adopts a decentralized public chain and is used for registering and registering production and consumption user nodes which want to participate in the microgrid power retail transaction; the electric energy chain adopts a centralized private chain, a dispatching center node is used as a center node to generate a new block, other nodes do not have the right of changing information in the new block, and each block on the electric energy chain is used for storing physical information of the system; the transaction chain is used as a main chain, a multi-centralized alliance chain is adopted, only the transaction information of the nodes is stored, and the transaction chain is coupled with the information of other three side chains by virtue of the transaction center node and the dispatching center node; the monitoring chain adopts a multi-centralized alliance chain and is used for evaluating the integrity value of the transaction behavior of the production consumer, and each block is used for storing the integrity value information of the transaction node;
the transaction objective function includes:
Figure FDA0003914341690000011
in the formula S t Representing the total income function of the electricity selling user at the time t; omega A Representing a set of electricity vendors;
Figure FDA0003914341690000012
the selling electricity unit price of the electricity selling user m at the time t is represented;
Figure FDA0003914341690000013
the selling power of the electricity selling user m at the time t is represented;
Figure FDA0003914341690000014
represents a cost function relative to the amount of electricity sold, expressed as:
Figure FDA0003914341690000015
in which a, b and c represent the corresponding electric quantities respectively
Figure FDA0003914341690000016
The cost factor of (2);
there is a balance of electricity between the electricity selling party and the electricity purchasing party, which is expressed as:
Figure FDA0003914341690000017
in the formula of omega B Representing a set of electricity purchasers;
Figure FDA0003914341690000018
representing the required electric quantity of the nth power purchaser in a t period;
the range of the electricity selling quantity selected by the electricity selling party is as follows:
Figure FDA0003914341690000021
in the formula
Figure FDA0003914341690000022
Respectively representing the upper limit and the lower limit of the sold electric quantity of the mth power seller in the time period t;
the constraint conditions comprise:
the balance constraint of point-to-point transactions in the microgrid is as follows:
Figure FDA0003914341690000023
in the formula: delta P i The adjustment amount of the power selling node i; Δ L j The adjustment quantity of the power purchase node j is obtained; { G P The electricity selling set is the electricity selling set of all point-to-point transactions; { L P The electricity purchasing set of all point-to-point transactions is defined;
consider thermally and kinetically stable line flow constraints:
Figure FDA0003914341690000024
in the formula: p is l,max Taking the minimum value of the thermal stability and dynamic stability constraints as the current limit of the branch I; p l,0 Is the initial power flow of branch l; delta P l The current variation of the branch l; { L } is the set of all lines;
considering dynamic and stable junctor cut set flow constraint:
Figure FDA0003914341690000025
in the formula: p C,max Taking the current limit of the cut set C as dynamic stability constraint;
Figure FDA0003914341690000026
the initial power flow sum of the cut set C;
Figure FDA0003914341690000027
the tidal current variation of the cut set C; { C cut The cutting set of all the connecting lines is defined;
the credit right consensus algorithm based on the integrity value comprises the following steps:
Figure FDA0003914341690000028
in the formula: h is a hash function; d j Generating and deleting a root hash value of the user j; k j Representing the random number calculated by the production and consumption user j; c j Representing the honesty values of the producing and disappearing users j; n is a radical of hydrogen differ Representing a calculation difficulty coefficient; the integrity value of the node is positively correlated with the probability that the node acquires the accounting right, and the node with the higher integrity value is easier to acquire the accounting right;
when competing accounting right, the generation and elimination user j packs all transaction data in the time slot and carries out recursive hashing to obtain a root hash value D j The productive and consumption users j perform a large amount of exhaustion and K is found based on the formula j Is a reaction of K j Packing into blocks, broadcasting to other users in the network, and receiving the corresponding blocks by other users according to C corresponding to the formula j Verifying the blocks, if the blocks pass the verification, adding the corresponding blocks to the microgrid information chain, and if the blocks pass the verification, generating and consuming a user j to obtain an accounting reward, otherwise, deleting the blocks; the cross-chain processing comprises the following steps:
and (3) cross-chain processing of a transaction chain and a power chain: after generating a new transaction block at the accounting right node of the transaction chain, the scheduling center node acquires a real-time market transaction record to be checked, and issues the record to the electric energy chain after passing the safety check; verifying other nodes on the power chain, issuing the formed transaction adjustment amount information delta M to the transaction chain by the scheduling center node after the verification is passed, verifying the validity of the adjustment scheme by the initial accounting right node, and updating the initial transaction scheme and issuing the transaction scheme through the whole network after the verification is passed;
and (3) cross-link processing of transaction chains and information chains: the trading center node issues the block information on the information chain to the trading chain to provide reference for predicting the trading electric quantity between nodes in the next period;
and (3) cross-link processing of a transaction chain and a supervision chain: the transaction center node issues the transaction settlement information after the safety check adjustment to a supervision chain, the nodes on the supervision chain selectively calculate the integrity value of the transaction nodes, then the whole network consensus is achieved by means of a consensus mechanism, new blocks are formed and written into a supervision chain system, the transaction nodes acquire block information and issue the block information to the transaction chain, and the integrity value information is used as an evaluation index for the preferential selection of the next transaction.
2. The power transaction method based on the multi-chain blockchain architecture as claimed in claim 1, wherein the integrity value is calculated based on a completion of an intelligent contract, and the calculation process includes:
is provided with
Figure FDA0003914341690000031
Indicating that the generation and consumption user j is the electricity selling user in the period t,
Figure FDA0003914341690000032
the production and consumption user j is represented as a power purchasing user in the period t, and the production and consumption user j cannot be in two states of power selling and power purchasing at the same time, so that the state constraint of the production and consumption user is represented as follows:
Figure FDA0003914341690000033
the calculation standard of the integrity value of the production and consumption user node is as follows:
Figure FDA0003914341690000034
in the formula:
Figure FDA0003914341690000035
representing the integrity value before t time period of the production and consumption user j; q ij Representing the electric quantity of the contract between the production and consumption user j and the production and consumption user i in the intelligent contract;
Figure FDA0003914341690000036
representing the actual electric quantity generated when the generation and consumption user j is in the electricity selling state;
Figure FDA0003914341690000037
representing the actual amount of power consumed by the generating and consuming user j in the power purchasing state.
3. The method for electric power transaction based on multi-chain blockchain architecture of claim 2, wherein the credit point calculation and authority classification between nodes in the multi-chain blockchain architecture through a consensus mechanism based on a multi-centralized alliance chain comprises:
credit point change mode of the node:
Figure FDA0003914341690000041
in the formula: r is j Accumulating credit points for the nodes; alpha is the weight occupied by the consensus integrity; beta is the weight occupied by transaction integrity; s is j For node consensus contribution, when a node completes valid consensus during time t, then s j Is 1, otherwise is 0;
Figure FDA0003914341690000042
the specific calculation method is as follows:
Figure FDA0003914341690000043
in the formula:
Figure FDA0003914341690000044
respectively representing the maximum value and the minimum value of the transaction integrity value in all nodes in the period t;
dividing the nodes into three levels based on the node credit point change mode: the first-level node is an authoritative node on the alliance chain; the secondary node is a verification node; the third-level node is a common node; in the initial stage of system construction, mechanisms with the top 30% of ranks are taken as first-level nodes, and the first-level nodes are responsible for creating and broadcasting blocks by using private key signatures of the first-level nodes in turn; the rest nodes are secondary nodes, and whether the signed blocks are legal or not is checked in turn; after entering the operation stage, the newly added node is defaulted to be a third-level node and does not have the right of creating a block and verifying the block; all nodes have the right to share data; and the operation result of each node is added or subtracted according to preset conditions, and the grading is automatically adjusted when the credit score crosses the preset authority grading boundary line.
4. The method of claim 1, wherein the registering comprises: the information chain generates a pair of secret keys P according to the identity information of the user a And P b When the user is a production and consumption user, the user needs to provide information of the distributed power generation device, on the basis, the information chain can generate a public key and a private key of the distributed power generation device, the block chain system can complete reliable verification of the node identity according to the public key corresponding to the production and consumption user, the system can generate a digital certificate according to the public key of the node and the user information, and active nodes in the network can communicate information in the networkAnd collecting and packaging the information and forming a new block, and writing the new block into the block chain after the new block is verified by other nodes.
CN202210305350.3A 2022-03-25 2022-03-25 Power transaction method based on multi-chain block chain architecture Active CN114663091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210305350.3A CN114663091B (en) 2022-03-25 2022-03-25 Power transaction method based on multi-chain block chain architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210305350.3A CN114663091B (en) 2022-03-25 2022-03-25 Power transaction method based on multi-chain block chain architecture

Publications (2)

Publication Number Publication Date
CN114663091A CN114663091A (en) 2022-06-24
CN114663091B true CN114663091B (en) 2023-01-31

Family

ID=82031284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210305350.3A Active CN114663091B (en) 2022-03-25 2022-03-25 Power transaction method based on multi-chain block chain architecture

Country Status (1)

Country Link
CN (1) CN114663091B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115577985B (en) * 2022-12-06 2023-04-07 国网浙江省电力有限公司金华供电公司 Multi-equipment consensus method for power block chain
CN116384988B (en) * 2023-06-06 2023-08-18 国网浙江省电力有限公司营销服务中心 Block chain-based electric charge settlement method and system
CN116668987B (en) * 2023-06-07 2024-02-02 湖北工业大学 Side chain-based internet of vehicles data sharing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636113A (en) * 2019-08-23 2019-12-31 上海电力大学 Byzantine fault-tolerant consensus method, system, device and storage medium for blockchains
CN112055002A (en) * 2020-08-24 2020-12-08 杭州云象网络技术有限公司 Cross-link network supervision method based on public governance link
CN113095940A (en) * 2021-04-29 2021-07-09 平安科技(深圳)有限公司 Isomorphic multilink-based transaction processing method, blockchain system, device and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11146380B2 (en) * 2017-08-03 2021-10-12 Parity Technologies Ltd. Methods and systems for a heterogeneous multi-chain framework
CN110415093A (en) * 2019-07-11 2019-11-05 上海电器科学研究所(集团)有限公司 A kind of intelligent energy gateway of user oriented side micro-capacitance sensor electricity transaction
CN111932253A (en) * 2020-08-11 2020-11-13 华北电力大学(保定) Electric energy transaction method based on credit consensus mechanism
CN112419055A (en) * 2020-11-11 2021-02-26 华北电力大学 Day-ahead energy scheduling platform established by market operation with participation of multiple producers and consumers
CN113626876B (en) * 2021-07-22 2023-12-19 三峡大学 Consensus method based on power grid block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636113A (en) * 2019-08-23 2019-12-31 上海电力大学 Byzantine fault-tolerant consensus method, system, device and storage medium for blockchains
CN112055002A (en) * 2020-08-24 2020-12-08 杭州云象网络技术有限公司 Cross-link network supervision method based on public governance link
CN113095940A (en) * 2021-04-29 2021-07-09 平安科技(深圳)有限公司 Isomorphic multilink-based transaction processing method, blockchain system, device and medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A blockchain-based secure transaction model for distributed energy in Industrial Internet of Things;Wei Hu;《Alexandria Engineering Journal》;20201031;第1-10页 *
Cloud- Edge Integrated State Identification;Wei Hu 等;《power on》;20211208;第1094-1909页 *
Model-driven approach for the design of Multi-Chain Smart Contracts;Ankica Barisic 等;《(BRAINS》;20211227;第1-12页 *
微网电力交易的多链式区块链动态分区方法设计与实现;周强等;《电子器件》;20200820(第04期);第771-777页 *

Also Published As

Publication number Publication date
CN114663091A (en) 2022-06-24

Similar Documents

Publication Publication Date Title
AlSkaif et al. Blockchain-based fully peer-to-peer energy trading strategies for residential energy systems
Liu et al. Electric vehicle power trading mechanism based on blockchain and smart contract in V2G network
CN114663091B (en) Power transaction method based on multi-chain block chain architecture
Hassija et al. A blockchain-based framework for lightweight data sharing and energy trading in V2G network
Hasankhani et al. Blockchain technology in the future smart grids: A comprehensive review and frameworks
CN112434343B (en) Virtual power plant safety scheduling and trading method based on dual block chain technology
Gazijahani et al. Game theory based profit maximization model for microgrid aggregators with presence of EDRP using information gap decision theory
Said A decentralized electricity trading framework (DETF) for connected EVs: A blockchain and machine learning for profit margin optimization
Moniruzzaman et al. Blockchain and cooperative game theory for peer-to-peer energy trading in smart grids
CN111461890A (en) Distributed power generation transaction system and method based on multiple prediction and block chain technologies
Lin et al. Blockchain power trading and energy management platform
Barnawi et al. Path planning for energy management of smart maritime electric vehicles: A blockchain-based solution
Wang et al. A multiblockchain-oriented decentralized market framework for frequency regulation service
Kumar et al. Blockchain based optimized energy trading for e-mobility using quantum reinforcement learning
Huang et al. A solution for bilayer energy-trading management in microgrids using multiblockchain
Ge et al. Blockchain and green certificates based market structure and transaction mechanism of direct power-purchase for industrial users
Yang et al. A double-chain blockchain with economic attributes and network constraints of prosumer transactions
Menniti et al. A local market model involving prosumers taking into account distribution network congestions in Smart Cities
Zhao et al. Emission trading innovation mechanism based on blockchain
Al-Madani et al. Implications of blockchain deployment in energy supply chain management: report integrity
Tao et al. Research on multi-microgrids scheduling strategy considering dynamic electricity price based on blockchain
Bompard et al. Modeling bilateral electricity markets: A complex network approach
CN116452334B (en) Multi-carbon transaction method and system for industrial park based on blockchain
Fu et al. A ring signature trust model for project review based on blockchain smart contract
Chopra et al. A review of methodical decentralisation of energy and energy transactions utilising distributed ledger via transition architecture based framework

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