CN113362067A - Asynchronous consensus-based electric power transaction matching method and system - Google Patents

Asynchronous consensus-based electric power transaction matching method and system Download PDF

Info

Publication number
CN113362067A
CN113362067A CN202110911000.7A CN202110911000A CN113362067A CN 113362067 A CN113362067 A CN 113362067A CN 202110911000 A CN202110911000 A CN 202110911000A CN 113362067 A CN113362067 A CN 113362067A
Authority
CN
China
Prior art keywords
user
identity
transaction
matching
quotation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110911000.7A
Other languages
Chinese (zh)
Other versions
CN113362067B (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.)
Beijing Power Exchange Center Co ltd
State Grid Blockchain Technology Beijing Co ltd
State Grid Digital Technology Holdings Co ltd
State Grid Corp of China SGCC
Marketing Service Center of State Grid Shanxi Electric Power Co Ltd
Original Assignee
Beijing Power Exchange Center Co ltd
State Grid Blockchain Technology Beijing Co ltd
State Grid Corp of China SGCC
Marketing Service Center of State Grid Shanxi Electric Power Co Ltd
State Grid E Commerce Co Ltd
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 Beijing Power Exchange Center Co ltd, State Grid Blockchain Technology Beijing Co ltd, State Grid Corp of China SGCC, Marketing Service Center of State Grid Shanxi Electric Power Co Ltd, State Grid E Commerce Co Ltd filed Critical Beijing Power Exchange Center Co ltd
Priority to CN202110911000.7A priority Critical patent/CN113362067B/en
Publication of CN113362067A publication Critical patent/CN113362067A/en
Application granted granted Critical
Publication of CN113362067B publication Critical patent/CN113362067B/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/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • 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/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • 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
    • G06Q20/40145Biometric identity checks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The invention discloses an electric power transaction matching method and system based on asynchronous consensus, wherein the method comprises the following steps: carrying out identity registration on a user and generating an identity block; when the business is handled, the identity authentication is carried out on the registered user; after the user passes the identity authentication, the encrypted reporting of the electric energy supply/demand declaration quantity and the supply/demand electric energy price is carried out; matching the transaction based on a preset transaction mode; acquiring actual electricity generation/consumption data of a user and a user declared amount range; the transaction data is subjected to network fragmentation and transaction fragmentation through an administrator node, a consensus node and a verification node, and efficient and credible sharing of the data is completed through a cross-fragment asynchronous consensus mechanism; and carrying out transaction settlement based on the deviation between the actual electricity consumption of the user and the electricity winning amount in the previous transaction period. The invention can realize real-time matching of electric power transaction by constructing an information asynchronous consensus mechanism based on network fragmentation and transaction fragmentation technologies of block chains.

Description

Asynchronous consensus-based electric power transaction matching method and system
Technical Field
The invention relates to the technical field of data processing, in particular to an electric power transaction matching method and system based on asynchronous consensus.
Background
At present, the innovation of the electric power market in China is deepened continuously, the electric power trading varieties are increasingly abundant, and the traditional electric power market is gradually converted from a planning mode to a new mode of market trading. Subsequently, the distributed energy resources are further promoted to actively participate in market trading. The diversification of transaction main bodies, the diversification of transaction types and the randomness and the fluctuation of the electric energy supply demand presented by the distributed energy exchange bring new challenges to the existing transaction system and the dispatching security check. The production and consumption structure of the distributed energy is in a non-center and multi-node point shape. The existing transaction system centralized management mode has high operation cost and information leakage risk, and cannot meet the requirements of high-frequency and high-performance storage and access of multi-dimensional mass data of multiple periods, multiple types and the like in transaction.
Therefore, how to effectively implement real-time matching of power transactions is a problem to be solved urgently.
Disclosure of Invention
In view of the above, the invention provides an electric power transaction matching method based on asynchronous consensus, which can implement real-time matching of electric power transactions by constructing an information asynchronous consensus mechanism based on network fragmentation and transaction fragmentation technologies of a block chain.
The invention provides an electric power transaction matching method based on asynchronous consensus, which comprises the following steps:
carrying out identity registration on a user and generating an identity block;
when the business is handled, the identity authentication is carried out on the registered user;
after the user passes the identity authentication, the encrypted reporting of the electric energy supply/demand declaration quantity and the supply/demand electric energy price is carried out;
matching the transaction based on a preset transaction mode;
acquiring actual electricity generation/consumption data of a user and a user declared amount range;
the transaction data is subjected to network fragmentation and transaction fragmentation through an administrator node, a consensus node and a verification node, and efficient and credible sharing of the data is completed through a cross-fragment asynchronous consensus mechanism;
and carrying out transaction settlement based on the deviation between the actual electricity consumption of the user and the electricity winning amount in the previous transaction period.
Preferably, the identity registration and identity block generation for the user include:
after the mobile phone number verification is completed, acquiring basic identity information and biological characteristic information of a user;
carrying out Hash operation on the basic identity information and the biological characteristic information by using an encryption algorithm, and transmitting a Hash operation result to an identity authentication service system;
when the identity authentication service system passes the verification of the identity information based on the Hash operation result, user identity registration is completed and an initial reputation value of a user is set;
and after the user finishes identity registration, calculating a public key generated based on the identity of the user to generate a block address.
Preferably, the authenticating the identity of the user who has completed registration when transacting the service includes:
acquiring a user login name, a hash value of a private key used by a user mobile terminal for identity, timestamp information and a real-time identity signature value;
generating a real-time identity two-dimensional code based on the user login name, the identity hash value of the user mobile terminal using a private key, the timestamp information and the real-time identity signature value;
and reading the real-time identity two-dimensional code of the user, and performing identity authentication based on the real-time identity two-dimensional code.
Preferably, after the user passes the identity authentication, the encrypted reporting of the electric energy supply/demand declaration amount and the supply/demand electric energy price includes:
acquiring the declaration amount and sealing quotation of purchasing/selling electricity input by a user;
judging whether the reporting quantity exceeds the limit, if not, then:
broadcasting and sealing quotation in the whole network;
acquiring a user public quotation;
judging whether the public quotation is equal to the sealed quotation, if so:
and entering transaction matching.
Preferably, the matching of the transaction based on the preset transaction mode includes:
placing the user into an electricity purchasing/selling queue;
and judging whether the matching can be carried out according to the transaction rule, if so, completing the transaction matching.
An asynchronous consensus-based power transaction matching system, comprising:
the user registration module is used for carrying out identity registration on the user and generating an identity block;
the identity authentication module is used for authenticating the identity of the registered user when the service is transacted;
the main body quotation module is used for carrying out encrypted submission of the electric energy supply/demand declaration quantity and the supply/demand electric energy price after the user passes the identity authentication;
the transaction matching module is used for matching transactions based on a preset transaction mode;
the data integration module is used for acquiring actual electricity generation/consumption data of a user and a user declared amount range;
the data processing module is used for carrying out network fragmentation and transaction fragmentation on transaction data through the administrator node, the consensus node and the verification node, and completing efficient and credible sharing of the data through a cross-fragment asynchronous consensus mechanism;
and the allowance balancing module is used for carrying out transaction settlement based on the deviation between the actual electricity consumption of the user and the bid amount in the previous transaction period.
Preferably, the user registration module is specifically configured to:
after the mobile phone number verification is completed, acquiring basic identity information and biological characteristic information of a user;
carrying out Hash operation on the basic identity information and the biological characteristic information by using an encryption algorithm, and transmitting a Hash operation result to an identity authentication service system;
when the identity authentication service system passes the verification of the identity information based on the Hash operation result, user identity registration is completed and an initial reputation value of a user is set;
and after the user finishes identity registration, calculating a public key generated based on the identity of the user to generate a block address.
Preferably, the identity authentication module is specifically configured to:
acquiring a user login name, a hash value of a private key used by a user mobile terminal for identity, timestamp information and a real-time identity signature value;
generating a real-time identity two-dimensional code based on the user login name, the identity hash value of the user mobile terminal using a private key, the timestamp information and the real-time identity signature value;
and reading the real-time identity two-dimensional code of the user, and performing identity authentication based on the real-time identity two-dimensional code.
Preferably, the subject quotation module is specifically configured to:
acquiring the declaration amount and sealing quotation of purchasing/selling electricity input by a user;
judging whether the reporting quantity exceeds the limit, if not, then:
broadcasting and sealing quotation in the whole network;
acquiring a user public quotation;
judging whether the public quotation is equal to the sealed quotation, if so:
and entering transaction matching.
Preferably, the transaction matching module is specifically configured to:
placing the user into an electricity purchasing/selling queue;
and judging whether the matching can be carried out according to the transaction rule, if so, completing the transaction matching.
In summary, the invention discloses an electric power transaction matching method based on asynchronous consensus, which includes firstly performing identity registration and generating an identity block for a user, and then performing identity authentication for the registered user during service transaction; after the user passes the identity authentication, the encrypted reporting of the electric energy supply/demand declaration quantity and the supply/demand electric energy price is carried out; matching transactions based on a preset transaction mode, and acquiring actual electricity generation/consumption data of a user and a user declared amount range; the transaction data is subjected to network fragmentation and transaction fragmentation through an administrator node, a consensus node and a verification node, and efficient and credible sharing of the data is completed through a cross-fragment asynchronous consensus mechanism; and carrying out transaction settlement based on the deviation between the actual electricity consumption of the user and the electricity winning amount in the previous transaction period. The invention can realize real-time matching of electric power transaction by constructing an information asynchronous consensus mechanism based on network fragmentation and transaction fragmentation technologies of block chains.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of an embodiment of a method for matching an electric power transaction based on asynchronous consensus according to the present disclosure;
FIG. 2 is a schematic diagram of a user identity registration process disclosed in the present invention;
FIG. 3 is a schematic diagram illustrating a process for creating a user identity block according to the present invention;
FIG. 4 is a schematic diagram of a user identity authentication process disclosed in the present invention;
FIG. 5 is a schematic diagram of a main quotation process according to the present disclosure;
FIG. 6 is a schematic diagram of a transaction matching process disclosed in the present invention;
FIG. 7 is a schematic diagram of a data integration network architecture according to the present disclosure;
FIG. 8 is a schematic diagram of a cross-slice asynchronous consensus mechanism disclosed in the present invention;
fig. 9 is a schematic structural diagram of an embodiment of an asynchronous consensus-based power transaction matching system according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, which is a flowchart of a method of embodiment 1 of the asynchronous consensus-based power transaction matching method disclosed in the present invention, the method may include the following steps:
s101, identity registration is carried out on a user and an identity block is generated;
when the electric power transaction matching needs to be completed, firstly, the system acquires the identity information of the user through the user registration module, evaluates the market access condition of the user, and generates the identity voucher and the initial credit value of the user for the user meeting the access condition.
Specifically, as shown in fig. 2, when the user registers at the mobile client or the PC, the user adopts the mobile phone dynamic password to verify the authenticity of the mobile phone number. After the mobile phone number verification is completed, the user fills in basic identity informationID t (including name, enterprise name, identity information, enterprise license information, etc.), and at the same time, finishing the user biological characteristic informationID f (such as human face, fingerprint, etc.) and setting user login nameID 0 And login passwordP 0 . The system background utilizes an encryption algorithm to carry out Hash operation on the text information and the picture information, and the Hash operation is carried out on the text information and the picture informationH(ID t || ID f )And transmitting the information to an identity authentication service system (comprising authentication of a public security system on identity information and authentication of an enterprise and commercial institution on enterprise information), checking the identity information by the identity authentication system, completing system registration by the user after the check is passed, and setting an initial credit value of the user by the system.
As shown in the figure3, after the user finishes the registration, the public security authentication service system issues the identity of the usertID(e.g. usingeIDCTIDAnd the system is uniformly named according to the difference of specific authentication service systems in system dockingtID). The user generates the public key by using the ECDSA algorithm (in the ECDSA algorithm, several parameters are important: G-the base point of the elliptic curve; n-is equivalent to the dotting times of the G base point)P A And a private key d A . Wherein the content of the first and second substances,P A =[d A ]G=(x A ,y A ) D is mixingAThe encryption is stored locally in the user, and the short-sending is performed to the user through SM3tIDThe identity information, the biological characteristic information and the like are subjected to Hash operation to obtain the Hash value of the user identityH ID =H(tID|| ID t || ID f ). Signature algorithm pair by SM2H ID And a registration timestampT r Carry out signature and setM 0 ={H ID ,T r Get the registered identity signature valueSIG r =r,s)。
Block chain based distributed power transaction system for converting message M = &P A, M 0, SIG r Sending it to the public security authentication service system, which calculates the userH ID By passingP A ComputingSIG r . If the verification is passed, the system pairP A Calculating to generate block addressAddrAs the identity authentication block ID of the user, and simultaneously recording the user's ID in the blockH ID T r AndSIG r . The internal computing resource of the public security authentication service system completes the generation of the block through a consensus mechanism.
S102, when the business is processed, the identity authentication is carried out on the registered user;
when a user needs to perform system behaviors such as power transaction quotation and the like, the system starts the identity authentication module, decrypts information through the digital abstract and the public key of user information, compares the existing information of the user with historical information, realizes the identity authentication of the user and guarantees the safe and reliable access of the power transaction.
Specifically, as shown in fig. 4, when the user logs in, the user login name needs to be inputID 0 And a login passwordP 0 And uploading biometricsID f At the same time, the mobile terminal of the user can use the private key d A Hashing identityH ID Time stamp information TuiCarry out real-time signature and placementM i ={H ID ,T ui }, generating a real-time identity signature value
Figure 305094DEST_PATH_IMAGE001
=(r i ,s i ). The system is based onID 0 H ID 、TuiAnd
Figure 95196DEST_PATH_IMAGE002
generating a real-time identity two-dimensional codeR i The two-dimension code refresh time set by the system ist 0 (t 0 Is a constant value, such as 1min, 2min, 5min, etc.).
The identity authentication module reads the real-time identity two-dimensional code of the userR i Obtaining a message
Figure 396995DEST_PATH_IMAGE003
. First, it is judgedR i If the current time ist c With time stamp information TuiDifference less thant 0 Then, thenR i The timeliness is verified, and the system is further usedP A Computing verification signatures
Figure 665166DEST_PATH_IMAGE004
. After the signature verification is passed, calculatingAddrAccessing the user identity block and comparingH ID If they are consistent, calculating verificationSIG r And if the verification is passed, the user identity authentication is successful.
S103, after the user passes the identity authentication, carrying out encrypted reporting on the electric energy supply/demand declaration quantity and the supply/demand electric energy price;
after the user passes the identity authentication, the encrypted reporting of the electric energy supply/demand declaration quantity and the supply/demand electric energy price can be carried out on a system platform, the system firstly judges whether the declaration quantity of the user is in compliance, and if the compliance is met and the declaration time of the system is cut off, the system automatically enters a transaction matching stage.
Specifically, as shown in fig. 5, after the user passes the identity authentication, the user needs to input the self declaration amount of purchasing/selling electricity and the sealing quotation, wherein the sealing quotation has the user real quotation v and generates P through hash encryption, that is, the user real quotation v is generated into P
Figure 719709DEST_PATH_IMAGE005
. Meanwhile, the system checks the declaration amount of the user, if the declaration amount of the user exceeds the constraint condition, the requirement needs to be declared again in the effective time, the transaction stage is skipped, and after the transaction of the period is finished, the system directly enters the allowance balance module. And for the user declaration information meeting the declaration quantity constraint condition, the system can carry out network broadcast on the sealed quotation and the corresponding declaration quantity. And when the declaration time is expired, the system can require the user to submit the public offer again when the user finishes the main offer, if the public offer is equal to the sealed offer of the previous network broadcast, the system can enter a transaction matching module, otherwise, the system directly enters a margin balancing module after the current period of transaction is finished.
S104, matching of transactions is carried out based on a preset transaction mode;
in the transaction matching stage, the system arranges a buyer and a seller into two sequences according to rules, and then carries out transaction matching through a Marshall algorithm, meanwhile, the system sets various transaction modes including margin unified clearing, high-low matching clearing and the like, and each provincial level transaction center can select a corresponding transaction mode in an intelligent contract module according to clearing regulations of the province to start electric intelligent transaction.
Specifically, as shown in fig. 6, the system first distinguishes between the electricity sale/purchase types of the users, and preferably green electricity. The system arranges the green electricity selling demands into a green electricity selling queue according to the sequence of quotations from low to high, and arranges the green electricity purchasing demands into a green electricity purchasing queue according to the sequence of quotations from high to low; meanwhile, the users with the non-green electricity transaction requirements are sorted according to the rule and placed into a non-green electricity selling/purchasing queue. And when the prices are the same, comprehensively sequencing according to the time of submitting the quoted price and the credit value of the user. After the sequencing is finished, the system finishes the transaction matching of the electricity purchasing and selling parties according to the Marshall algorithm. On the premise that the price quoted by the buyer is higher than that quoted by the seller, the buyer with the highest price and the seller with the lowest price are matched, and the buyer with the next highest price and the seller with the next lowest price are matched. And repeating the steps until all the rest buyer quotations are lower than the seller quotations, and ending the matching in the round. The matching of the green power consumers is preferably carried out, the rest consumers are put into the non-green power selling/purchasing queue, and then a round of transaction is carried out according to the above rules. And calculating the matched transaction price in each time according to the clearing mode, wherein if the matched clearing mode is high or low, the transaction price is the average price of both parties of the transaction, and if the matched clearing mode is the marginal unified clearing mode, the transaction price is the marginal transaction price.
S105, acquiring actual electricity generation/consumption data of a user and a user declared amount range;
in order to realize accurate settlement, the system is connected with an intranet service system through a data integration module, and firstly, the collection of actual electricity generation/consumption data of a user is completed; and secondly, acquiring a reasonable range of the user declaration quantity. Wherein, the input data is: the reasonable range of the user declaration quantity provided by the power grid model and the actual power generation/power consumption data of the user; the output data is: the actual power generation/power consumption data is output to the allowance balance module, and the reasonable user declaration amount range is output to the main quotation module.
The system uses the technologies of a Web front end, a Js back end and a Python back end, and meanwhile, in order to ensure the safety of network information, a firewall and an isolation device are arranged in a network link, so that the reading and the transmission of electric energy information and declared quantity information are realized, and market trading is participated. The network architecture is shown in fig. 7.
S106, performing network fragmentation and transaction fragmentation on transaction data through an administrator node, a consensus node and a verification node, and completing efficient and trusted sharing of the data through a cross-fragment asynchronous consensus mechanism;
and then, the data processing module is used for processing system data and processing consensus data among the nodes of the alliance chain where the system is located. (input data comprises user identity information, electric power transaction information related information, service system and model information acquired by a data integration module, and output data comprises data needing to be identified with other nodes on a alliance chain, and comprises identity blocks, declaration information, transaction matching result information, and the like.) wherein:
the administrator node: the node mainly serves for communication between the fragments and is used for message transmission. A voting mechanism based on credit is introduced into the model, credit values and credit levels are set for the nodes, and the nodes with high final ticket number are selected from all the fragments to serve as fragment manager nodes. Meanwhile, the fragment manager node is updated regularly.
And (3) consensus nodes: fragmented administrator node random selection
Figure 883974DEST_PATH_IMAGE006
And (3) constructing a fragment node-by-node set by adding the main nodes of the fragment, wherein the nodes except the administrator node in the set are called as consensus nodes.
Verifying the node: the voting selection performance is excellent when each segment is initially operated
Figure 391179DEST_PATH_IMAGE007
And each node is used as a verification node, and the verification node verifies whether the transaction in the fragments meets the fragment consistency through a PBFT consensus algorithm.
The system carries out network fragmentation and transaction fragmentation on transaction data to be processed, and establishes an asynchronous consensus mechanism between the fragments for preventing double-flower transaction risks. And a fragment manager node is established to coordinate the communication of the cross fragments, meanwhile, the manager node is dynamically elected in combination with the node credit, the safety credibility of the system is ensured, and the asynchronous consensus of the information between the fragments is completed through the manager node and the consensus node, so that the reliability, the safety and the consensus efficiency of the system consensus are improved. The principle is shown in fig. 8.
Specifically, the system sets two asynchronous consensus mechanisms according to different transaction processing data, one is time asynchronization: the method comprises the steps that an administrator node forms a dynamic strategy by analyzing data processing flow pressure, generates a corresponding consensus sequence list of consensus nodes, sends data needing consensus to a cache queue according to the sequence of the list, and finally sends the consensus data in the cache queue to the corresponding consensus nodes; the other is asynchronous event processing, different nodes are respectively set to process partial contents in the whole transaction data according to different authorities of the nodes and different administration data, then the results processed by the relevant nodes are collected to an administrator node, and the administrator node completes the processing of results of a higher layer. Asynchronous consensus processing can significantly reduce thread waiting, thereby greatly improving the overall performance of the system, significantly reducing time delay and improving user experience in a high-throughput power transaction scenario.
And S107, transaction settlement is carried out based on the deviation between the actual electricity consumption/power consumption of the user and the electricity winning amount in the previous transaction period.
And then, transaction settlement is carried out through the allowance balance module according to the deviation between the actual electric quantity of the electric meter acquired by the data integration module and the standard electric quantity of the user in the last transaction period. (input data: data of actual power generation/power consumption of user and bid winning amount of user; output data: data of settlement of deviation of actual power generation/power consumption of user and bid winning amount of user.)
For a consumer, when the actual consumption electric quantity of the consumer is less than the transaction electric quantity, the consumer is not refunded; when the actual consumption power of the consumer is more than the transaction power, the consumer needs to purchase power from the power grid to meet the power consumption requirement. When considering the prediction error, the individual consumer balance cost H is:
Figure 977887DEST_PATH_IMAGE008
(1)
wherein: cbBuying the electricity price for the power grid; Δ W is the predicted deviation of the consumer, Δ W<0 means that the actual power consumption is less than the predicted value, otherwise, the actual power consumption is greater than the predicted value.
For a producer, when the actually generated electric quantity of the producer is more than the transaction electric quantity, the producer trades the surplus electric quantity with the power grid; and when the actually generated electric quantity of the producer is smaller than the transaction electric quantity, the producer needs to purchase the electric quantity from the power grid to make up for the insufficient self-output. The equilibrium payout F for a single producer is:
Figure 152517DEST_PATH_IMAGE009
(2)
wherein: csSelling electricity prices for the power grid; delta Q is the predicted deviation of the producer<0 means that the actual power generation amount is smaller than the predicted value, and otherwise, the actual power generation amount is larger than the predicted value.
Specifically, the evaluation method can further evaluate the behaviors of the participating nodes/users through the evaluation reward and punishment module, and comprehensively considers the behaviors according to the accuracy of the user declaration amount, the user operation behavior and the performance condition. (input data: node/user verification result and final verification result of transaction in the last round of transaction verification; output data: node/user reputation value).
For the users with higher accuracy of reporting quantity and good user performance, a certain quantity of credit values can be awarded, the highest credit value is 100, and the initial credit value of the users is 60; for users who report quantity with low accuracy or have poor performance, the system deducts a certain quantity of credit values. When the user reputation value is lower than 50, the system will reclaim the user's operating rights. After each round of transaction verification is finished, the system broadcasts the credit value of each node through the whole network.
The calculation formula of the reputation value of each node is as follows:
V i =V 0 + Vr i ×T i (3)
wherein:V i representing the current reputation value of the ith node,V 0 representing the initial reputation value of the ith node,Vr i indicating the reward or penalty gained by the verification of the transaction by the ith node,T i indicating the corresponding penalty or number of awards.
In summary, the invention uses the electronic signature technology to realize the registration authentication of the system user; secondly, through the digital abstract, the privacy, the credibility and the safety of the quotation of a trading subject are ensured, a distributed storage technology is provided, the requirements of high-frequency and high-performance storage access of mass data are met, and a technical support is provided for efficient and orderly operation of a distributed power trading market; thirdly, a Marshall algorithm is combined, two mechanisms of high-low matching clearing and marginal unified clearing are designed, a multi-provincial electric power transaction clearing mode is compatible, point-to-point transaction matching of two transaction parties is realized, transaction matching efficiency is improved, meanwhile, by means of safety assessment operation of a power grid model, market transaction results are normalized, and the power grid runs safely; secondly, by utilizing an intelligent contract mechanism, a transaction triggering condition and an execution flow are designed, the defect of manual execution operation is reduced, and the credibility and the high efficiency of transaction settlement are ensured; and finally, by establishing a reasonable reward and punishment mechanism, the power consumption of renewable energy sources can be promoted, a competitive and orderly market transaction mode is established, credible transaction information is provided for the outside, and the transparent supervision is facilitated.
As shown in fig. 9, which is a schematic structural diagram of an embodiment of an asynchronous consensus-based power transaction matching system disclosed in the present invention, the system may include:
a user registration module 901, configured to perform identity registration on a user and generate an identity block;
an identity authentication module 902, configured to perform identity authentication on a user who has completed registration when performing service handling;
the main body quotation module 903 is used for carrying out encrypted submission of the electric energy supply/demand declaration quantity and the supply/demand electric energy price after the user passes the identity authentication;
a transaction matching module 904, configured to match transactions based on a preset transaction manner;
the data integration module 905 is used for acquiring actual electricity generation/consumption data of a user and a user declared amount range;
the data processing module 906 is configured to perform network fragmentation and transaction fragmentation on transaction data through an administrator node, a consensus node and a verification node, and complete efficient and trusted sharing of data through a cross-fragment asynchronous consensus mechanism;
and a balance module 907 for performing transaction settlement based on the deviation between the actual electricity consumption of the user and the electricity winning amount in the previous transaction period.
The working principle of the asynchronous consensus-based power transaction matching system disclosed in this embodiment is the same as that of the asynchronous consensus-based power transaction matching method embodiment, and is not described herein again.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An electric power transaction matching method based on asynchronous consensus is characterized by comprising the following steps:
carrying out identity registration on a user and generating an identity block;
when the business is handled, the identity authentication is carried out on the registered user;
after the user passes the identity authentication, the encrypted reporting of the electric energy supply/demand declaration quantity and the supply/demand electric energy price is carried out;
matching the transaction based on a preset transaction mode;
acquiring actual electricity generation/consumption data of a user and a user declared amount range;
the transaction data is subjected to network fragmentation and transaction fragmentation through an administrator node, a consensus node and a verification node, and efficient and credible sharing of the data is completed through a cross-fragment asynchronous consensus mechanism;
and carrying out transaction settlement based on the deviation between the actual electricity consumption of the user and the electricity winning amount in the previous transaction period.
2. The method of claim 1, wherein the identity registration of the user and the generation of the identity block comprise:
after the mobile phone number verification is completed, acquiring basic identity information and biological characteristic information of a user;
carrying out Hash operation on the basic identity information and the biological characteristic information by using an encryption algorithm, and transmitting a Hash operation result to an identity authentication service system;
when the identity authentication service system passes the verification of the identity information based on the Hash operation result, user identity registration is completed and an initial reputation value of a user is set;
and after the user finishes identity registration, calculating a public key generated based on the identity of the user to generate a block address.
3. The method of claim 2, wherein authenticating the registered user at the time of transaction comprises:
acquiring a user login name, a hash value of a private key used by a user mobile terminal for identity, timestamp information and a real-time identity signature value;
generating a real-time identity two-dimensional code based on the user login name, the identity hash value of the user mobile terminal using a private key, the timestamp information and the real-time identity signature value;
and reading the real-time identity two-dimensional code of the user, and performing identity authentication based on the real-time identity two-dimensional code.
4. The method according to claim 3, wherein the user performs encrypted reporting of the electric energy supply/demand declaration amount and the supply/demand electric energy price after identity authentication, and the method comprises the following steps:
acquiring the declaration amount and sealing quotation of purchasing/selling electricity input by a user;
judging whether the reporting quantity exceeds the limit, if not, then:
broadcasting and sealing quotation in the whole network;
acquiring a user public quotation;
judging whether the public quotation is equal to the sealed quotation, if so:
and entering transaction matching.
5. The method of claim 4, wherein the matching of the transaction based on the preset transaction mode comprises:
placing the user into an electricity purchasing/selling queue;
and judging whether the matching can be carried out according to the transaction rule, if so, completing the transaction matching.
6. An asynchronous consensus-based power transaction matching system, comprising:
the user registration module is used for carrying out identity registration on the user and generating an identity block;
the identity authentication module is used for authenticating the identity of the registered user when the service is transacted;
the main body quotation module is used for carrying out encrypted submission of the electric energy supply/demand declaration quantity and the supply/demand electric energy price after the user passes the identity authentication;
the transaction matching module is used for matching transactions based on a preset transaction mode;
the data integration module is used for acquiring actual electricity generation/consumption data of a user and a user declared amount range;
the data processing module is used for carrying out network fragmentation and transaction fragmentation on transaction data through the administrator node, the consensus node and the verification node, and completing efficient and credible sharing of the data through a cross-fragment asynchronous consensus mechanism;
and the allowance balancing module is used for carrying out transaction settlement based on the deviation between the actual electricity consumption of the user and the bid amount in the previous transaction period.
7. The system of claim 6, wherein the user registration module is specifically configured to:
after the mobile phone number verification is completed, acquiring basic identity information and biological characteristic information of a user;
carrying out Hash operation on the basic identity information and the biological characteristic information by using an encryption algorithm, and transmitting a Hash operation result to an identity authentication service system;
when the identity authentication service system passes the verification of the identity information based on the Hash operation result, user identity registration is completed and an initial reputation value of a user is set;
and after the user finishes identity registration, calculating a public key generated based on the identity of the user to generate a block address.
8. The system of claim 7, wherein the identity authentication module is specifically configured to:
acquiring a user login name, a hash value of a private key used by a user mobile terminal for identity, timestamp information and a real-time identity signature value;
generating a real-time identity two-dimensional code based on the user login name, the identity hash value of the user mobile terminal using a private key, the timestamp information and the real-time identity signature value;
and reading the real-time identity two-dimensional code of the user, and performing identity authentication based on the real-time identity two-dimensional code.
9. The system of claim 8, wherein the subject offer module is specifically configured to:
acquiring the declaration amount and sealing quotation of purchasing/selling electricity input by a user;
judging whether the reporting quantity exceeds the limit, if not, then:
broadcasting and sealing quotation in the whole network;
acquiring a user public quotation;
judging whether the public quotation is equal to the sealed quotation, if so:
and entering transaction matching.
10. The system of claim 9, wherein the transaction matching module is specifically configured to:
placing the user into an electricity purchasing/selling queue;
and judging whether the matching can be carried out according to the transaction rule, if so, completing the transaction matching.
CN202110911000.7A 2021-08-10 2021-08-10 Asynchronous consensus-based electric power transaction matching method and system Active CN113362067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110911000.7A CN113362067B (en) 2021-08-10 2021-08-10 Asynchronous consensus-based electric power transaction matching method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110911000.7A CN113362067B (en) 2021-08-10 2021-08-10 Asynchronous consensus-based electric power transaction matching method and system

Publications (2)

Publication Number Publication Date
CN113362067A true CN113362067A (en) 2021-09-07
CN113362067B CN113362067B (en) 2022-03-11

Family

ID=77540857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110911000.7A Active CN113362067B (en) 2021-08-10 2021-08-10 Asynchronous consensus-based electric power transaction matching method and system

Country Status (1)

Country Link
CN (1) CN113362067B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113554359A (en) * 2021-09-22 2021-10-26 国网区块链科技(北京)有限公司 Green power authentication method, device and system based on block chain
CN114140250A (en) * 2022-01-27 2022-03-04 深圳江行联加智能科技有限公司 Block chain-based power transaction method and device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110223062A (en) * 2019-04-24 2019-09-10 中国南方电网有限责任公司 Distributed power transaction system and method based on block chain
CN110808838A (en) * 2019-10-24 2020-02-18 华东师范大学 Alliance chain-oriented fragmentation method
US20200193432A1 (en) * 2017-04-24 2020-06-18 Blocksettle Ab Method and system for settling a blockchain transaction
CN112102033A (en) * 2020-09-03 2020-12-18 西安电子科技大学 Electric power distributed transaction nested consensus method, system and application based on block chain
CN112634055A (en) * 2021-01-20 2021-04-09 复旦大学 Enterprise power utilization capacity equity transaction method based on block chain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200193432A1 (en) * 2017-04-24 2020-06-18 Blocksettle Ab Method and system for settling a blockchain transaction
CN110223062A (en) * 2019-04-24 2019-09-10 中国南方电网有限责任公司 Distributed power transaction system and method based on block chain
CN110808838A (en) * 2019-10-24 2020-02-18 华东师范大学 Alliance chain-oriented fragmentation method
CN112102033A (en) * 2020-09-03 2020-12-18 西安电子科技大学 Electric power distributed transaction nested consensus method, system and application based on block chain
CN112634055A (en) * 2021-01-20 2021-04-09 复旦大学 Enterprise power utilization capacity equity transaction method based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘吉飞等: "基于跳跃Hash和异步共识组的区块链动态分片模型", 《计算机科学》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113554359A (en) * 2021-09-22 2021-10-26 国网区块链科技(北京)有限公司 Green power authentication method, device and system based on block chain
CN114140250A (en) * 2022-01-27 2022-03-04 深圳江行联加智能科技有限公司 Block chain-based power transaction method and device, electronic equipment and medium

Also Published As

Publication number Publication date
CN113362067B (en) 2022-03-11

Similar Documents

Publication Publication Date Title
Liu et al. Electric vehicle power trading mechanism based on blockchain and smart contract in V2G network
CN112434343B (en) Virtual power plant safety scheduling and trading method based on dual block chain technology
US10554407B1 (en) Protocols for decentralized networks
CN113222752A (en) Data processing system, method, computing device and storage medium based on block chain
CN113362067B (en) Asynchronous consensus-based electric power transaction matching method and system
CN111583039B (en) Secure interaction method, incentive method and transaction system for manager-free blockchain transaction
CN112651830B (en) Block chain consensus method applied to power resource sharing network
CN111090890B (en) New energy power utilization data processing method and device based on block chain and participating node
CN113987080A (en) Block chain excitation method and device based on reputation consensus and related products
CN111414434B (en) Block chain-based data transaction management network, transaction device and storage medium
CN116561789A (en) Processing method and device of privacy data, electronic equipment and readable storage medium
CN114329619A (en) Block chain-based spectrum resource sharing method, device and storage medium
Kumar et al. Blockchain-based Cloud Resource Allocation Mechanisms for Privacy Preservation
CN111612600A (en) Block chain auction method, equipment, storage medium and block chain system
CN112288213A (en) High-reliability demand response system and method based on block chain
CN111489164A (en) Electric power transaction method and device based on Internet of things identification and block chain and electronic equipment
CN110990790B (en) Data processing method and equipment
CN113962714A (en) Auction tracing method based on Etheng privacy protection and implementation system
CN114913013A (en) House renting transaction system and house renting transaction method based on block chain
Xi et al. CrowdLBM: A lightweight blockchain-based model for mobile crowdsensing in the Internet of Things
CN113689295A (en) Distributed energy trading method and system among multiple participating main bodies
CN112995167A (en) Kafka mechanism-based power utilization information acquisition method, block chain network and user side
Huang et al. Incentive assignment in hybrid consensus blockchain systems in pervasive edge environments
US11245528B1 (en) Protocols for decentralized networks
CN114781940B (en) Carbon transaction management method and device

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 5016, 5 / F, building 7, Guangyi street, Xicheng District, Beijing 100053

Patentee after: State Grid blockchain Technology (Beijing) Co.,Ltd.

Patentee after: State Grid Digital Technology Holdings Co.,Ltd.

Patentee after: BEIJING POWER EXCHANGE CENTER Co.,Ltd.

Patentee after: State Grid Shanxi Electric Power Company Marketing Service Center

Patentee after: STATE GRID CORPORATION OF CHINA

Address before: 5016, 5 / F, building 7, Guangyi street, Xicheng District, Beijing 100053

Patentee before: State Grid blockchain Technology (Beijing) Co.,Ltd.

Patentee before: STATE GRID ELECTRONIC COMMERCE Co.,Ltd.

Patentee before: BEIJING POWER EXCHANGE CENTER Co.,Ltd.

Patentee before: State Grid Shanxi Electric Power Company Marketing Service Center

Patentee before: STATE GRID CORPORATION OF CHINA