CN116384988A - Block chain-based electric charge settlement method and system - Google Patents

Block chain-based electric charge settlement method and system Download PDF

Info

Publication number
CN116384988A
CN116384988A CN202310663484.7A CN202310663484A CN116384988A CN 116384988 A CN116384988 A CN 116384988A CN 202310663484 A CN202310663484 A CN 202310663484A CN 116384988 A CN116384988 A CN 116384988A
Authority
CN
China
Prior art keywords
node
verification
electricity
green
blockchain
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
CN202310663484.7A
Other languages
Chinese (zh)
Other versions
CN116384988B (en
Inventor
吴伟玲
林洋佳
王哲萍
季小雨
程叙鹏
陈奕汝
林少娃
庄志画
何妍妍
杨林华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Zhejiang Electric Power Co Ltd
Marketing Service Center of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
State Grid Zhejiang Electric Power Co Ltd
Marketing Service Center of State Grid Zhejiang Electric Power 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 State Grid Zhejiang Electric Power Co Ltd, Marketing Service Center of State Grid Zhejiang Electric Power Co Ltd filed Critical State Grid Zhejiang Electric Power Co Ltd
Priority to CN202310663484.7A priority Critical patent/CN116384988B/en
Publication of CN116384988A publication Critical patent/CN116384988A/en
Application granted granted Critical
Publication of CN116384988B publication Critical patent/CN116384988B/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/08Payment architectures
    • G06Q20/14Payment architectures specially adapted for billing systems
    • 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
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The invention provides an electric charge settlement method and system based on a block chain, comprising the following steps: establishing a trusted cross-chain channel between the first blockchain and the second blockchain; generating a purchase permission relation of the trusted cross-chain channel according to the first level structure relation and the second level structure relation; generating first verification policy information corresponding to the first node according to the purchase permission relationship; transmitting a green electricity purchase request to a corresponding second node in a second blockchain; if the second node sends a green electricity selling request corresponding to the green electricity purchasing request to the trusted cross-link channel, the trusted cross-link channel generates second verification policy information corresponding to the second node according to the purchasing authority relation; and after judging that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, generating electricity charge settlement data for the green certificate and feeding back the electricity charge settlement data to the first block chain and the second block chain respectively so as to update the first block account book and the second block account book by the first block chain and the second block chain.

Description

Block chain-based electric charge settlement method and system
Technical Field
The invention relates to a data processing technology, in particular to an electric charge settlement method and system based on a blockchain.
Background
Currently, the power industry has revolutionized the trade of electrical energy. In the process of marketing, when both power generation and power buying are carried out, electric charge settlement is required, and in order to realize smooth progress of both transaction sides, a reliable settlement system is very necessary.
The existing settlement system is still in a traditional state, and many links need to be manually carried out, for example, when one company needs to carry out transactions, the related superior company needs to carry out auditing, if offline auditing is adopted, the flow is longer, and the reliability and the safety are lower while the efficiency is lower.
Therefore, how to provide an online settlement system by combining the types of the transaction parties and improving the settlement efficiency and the reliability becomes an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides an electric charge settlement method and system based on a blockchain, which can provide an online settlement system by combining the types of both transaction parties and improve the settlement efficiency and reliability by utilizing the attribute of the blockchain.
In a first aspect of the embodiment of the present invention, there is provided a method for settling an electric charge based on a blockchain, including:
generating a first blockchain according to a first node corresponding to a green electricity purchaser, generating a second blockchain according to a second node corresponding to a green electricity producer, and establishing a trusted cross-chain channel between the first blockchain and the second blockchain;
Acquiring a first level structure relation of all first nodes in a first block chain and a second level structure relation of all second nodes in a second block chain, and generating a purchase permission relation of the trusted cross-chain channel according to the first level structure relation and the second level structure relation;
after judging that any one first node in the first blockchain uploads a green electricity purchase request, the trusted cross-chain channel generates first verification policy information corresponding to the first node according to the purchase permission relation and the green electricity purchase attribute corresponding to the green electricity purchase request;
after judging that the first verification information uploaded by a third node corresponding to the first node meets the first verification policy information, the trusted cross-chain channel sends the green electricity purchase request to a corresponding second node in a second blockchain;
if the second node sends a green electricity selling request corresponding to the green electricity purchasing request to the trusted cross-link channel, the trusted cross-link channel generates second verification policy information corresponding to the second node according to the purchasing authority relation and the green electricity selling attribute corresponding to the green electricity selling request;
after judging that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, the trusted cross-chain channel generates electricity charge settlement data for the green certificate and feeds the electricity charge settlement data back to the first block chain and the second block chain respectively, so that the first block chain and the second block chain update the first block account book and the second block account book.
Optionally, in the first aspect, the generating a first blockchain according to a first node corresponding to a green electricity buyer, generating a second blockchain according to a second node corresponding to a green electricity manufacturer, and establishing a trusted cross-chain channel between the first blockchain and the second blockchain includes:
connecting first nodes corresponding to all green electric buyers to generate a first blockchain, wherein the first blockchain is configured with a first blockbook so that any one first node can record when finishing transaction or verification;
connecting second nodes corresponding to all green electricity manufacturers to generate a second blockchain, wherein the second blockchain is configured with a second block account book so that any one second node can record when finishing transaction or verification;
the method comprises the steps of generating a first cross-link component, a second cross-link component and a management component, wherein the first cross-link component, the second cross-link component and the second block chain are included in a trusted cross-link channel, and the management component is connected with the first cross-link component and the second cross-link component respectively.
Optionally, in the first aspect, the obtaining a first level structural relationship of all first nodes in the first blockchain and a second level structural relationship of all second nodes in the second blockchain, and generating the purchase permission relationship of the trusted cross-chain channel according to the first level structural relationship and the second level structural relationship includes:
Determining the corresponding upper node according to the node label corresponding to each first node, and if the determined node label of the upper node does not have other corresponding upper nodes, obtaining the substructure relation of the corresponding first nodes;
if the determined node labels of the upper nodes are judged to have other corresponding upper nodes, counting all the upper nodes to obtain all the upper nodes corresponding to the first nodes, and obtaining the substructure relation of the corresponding first nodes;
determining the corresponding upper node according to the node label corresponding to each second node, and if the determined node label of the upper node does not have other corresponding upper nodes, obtaining the substructure relation of the corresponding second nodes;
if the determined node labels of the upper nodes are judged to have other corresponding upper nodes, counting all the upper nodes to obtain all the upper nodes corresponding to the second nodes, and obtaining the substructure relation of the corresponding second nodes;
and obtaining a first level structural relationship according to the substructure relationship of all the first nodes, obtaining a second level structural relationship according to the substructure relationship of all the second nodes, and obtaining the purchase permission relationship of the management component according to the first level structural relationship and the second level structural relationship.
Optionally, in the first aspect, the obtaining a first level structural relationship according to the sub-structural relationships of all the first nodes, obtaining a second level structural relationship according to the sub-structural relationships of all the second nodes, and obtaining the purchase permission relationship of the management component according to the first level structural relationship and the second level structural relationship includes:
initializing and generating a corresponding first structure table according to the number of the first nodes, wherein the first structure table comprises corresponding unit groups corresponding to each first node, and the corresponding unit groups comprise a node grid of the current stage and a node grid of the upper stage;
filling the node identity information of each first node into the corresponding node grid of the current level, and filling the identity information of the upper level node into the upper level node grid to obtain a first structure table with a first level structure relation;
initializing and generating a corresponding second structure table according to the number of the second nodes, wherein the second structure table comprises corresponding unit groups corresponding to each second node, and the corresponding unit groups comprise a node grid of the current stage and a node grid of the upper stage;
filling the node identity information of each second node into the corresponding node grid of the level, and filling the identity information of the upper node into the node grid of the level to obtain a second structure table with a second level structure relation;
And respectively configuring the first structure table and the second structure table to a management component to generate a purchase permission relation.
Optionally, in the first aspect, after the trusted cross-chain channel determines that any one of the first nodes in the first blockchain uploads the green electricity purchase request, generating, according to the purchase permission relationship and a green electricity purchase attribute corresponding to the green electricity purchase request, first verification policy information corresponding to the first node, including:
after the first cross-chain component receives a green electricity purchase request uploaded by any one first node in a first blockchain, identity information corresponding to the first node is used as first target identity information to be sent to a management component, and the management component traverses a first structure table to determine a corresponding unit group;
determining green electricity purchase attributes of multiple dimensions in the green electricity purchase request, wherein the green electricity purchase attributes at least comprise green electricity quantity attributes, green electricity selling enterprise attributes and green electricity category attributes;
comparing the green electricity purchasing attributes of each dimension with preset dimension attributes respectively to obtain minimum required verification levels corresponding to the green electricity purchasing attributes of the corresponding dimension, and taking the maximum verification level in the minimum required verification levels of all the dimensions as a verification level;
Extracting the upper node identity information in the upper node grid corresponding to the unit group from bottom to top based on the verification level, stopping extracting after judging that the extracted upper node identity information is greater than or equal to the verification level, taking the extracted upper node identity information as first target identity information, wherein each node has a preset level;
and generating a first verification acquisition plug-in according to the first target identity information and all the upper node identity information, and monitoring the first cross-chain component based on the first verification acquisition plug-in.
Optionally, in the first aspect, after determining that the first verification information uploaded by the third node corresponding to the first node meets the first verification policy information, the trusted cross-link channel sends the green electricity purchase request to a corresponding second node in the second blockchain, where the sending includes:
the first verification acquisition plug-in monitors all requests received by the first cross-link component, and records identity information of a third node corresponding to the first node after judging that the first verification information is uploaded by the third node in a first preset time period, wherein the first verification information is a green electricity purchasing behavior allowed by the first node;
After the first verification acquisition plug-in judges that the identity information of all the third nodes corresponds to the identity information of the upper node one by one, the first verification acquisition plug-in judges that the first verification information uploaded by the third nodes meets the first verification policy information;
the first verification acquisition plug-in sends first confirmation information to the management component, and the management component sends a green electricity purchase request corresponding to the first node to the second cross-chain component;
the second cross-chain component extracts identity information in the green electricity purchase request to determine a corresponding second node, and sends the green electricity purchase request to the corresponding second node in the second blockchain.
Optionally, in the first aspect, if the second node sends a green electricity vending request corresponding to the green electricity purchase request to the trusted cross-link channel, the trusted cross-link channel generates second verification policy information corresponding to the second node according to the purchase permission relationship and a green electricity vending attribute corresponding to the green electricity vending request, including:
after receiving a green electricity selling request uploaded by a corresponding second node in a second block chain, the second cross-chain component sends identity information corresponding to the second node as second target identity information to the management component, and the management component traverses a second structure table to determine a corresponding unit group;
Determining green electricity sales attributes of multiple dimensions in the green electricity sales request, wherein the green electricity sales attributes at least comprise green electricity quantity attributes, green electricity purchasing enterprise attributes and green electricity category attributes;
comparing the green electricity purchasing attributes of each dimension with preset dimension attributes respectively to obtain minimum required verification levels corresponding to the green electricity purchasing attributes of the corresponding dimension, and taking the maximum verification level in the minimum required verification levels of all the dimensions as a verification level;
extracting the upper node identity information in the upper node grid corresponding to the unit group from bottom to top based on the verification level, stopping extracting after judging that the extracted upper node identity information is greater than or equal to the verification level, taking the extracted upper node identity information as second target identity information, wherein each node has a preset level;
and generating a second verification acquisition plug-in according to the second target identity information and all the upper node identity information, and monitoring the second cross-chain component based on the second verification acquisition plug-in.
Optionally, in the first aspect, after the trusted cross-link channel determines that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, generating electricity fee settlement data for the green certificate and feeding the electricity fee settlement data back to the first blockchain and the second blockchain respectively, so that the first blockchain and the second blockchain update the first blockbook and the second blockbook, including:
The second verification acquisition plug-in monitors all requests received by the second cross-link group, and records the identity information of a fourth node after judging that the fourth node corresponding to the second node uploads second verification information in a second preset time period, wherein the second verification information is used for allowing the second node to sell green electricity;
after the second verification acquisition plug-in judges that the identity information of all the fourth nodes corresponds to the identity information of the upper node one by one, the second verification acquisition plug-in judges that the second verification information uploaded by the fourth nodes meets second verification policy information;
the second verification acquisition plug-in sends second confirmation information to the management component, and the management component generates electricity charge settlement data for green certificates according to the second confirmation information, the green electricity purchase request and the green electricity sale request;
and feeding back the electric charge settlement data to the first blockchain and the second blockchain respectively and broadcasting the electric charge settlement data so that the first blockchain and the second blockchain update the first blockbook and the second blockbook.
Optionally, in the first aspect, the second verification collecting plug-in sends second confirmation information to the management component, and the management component generates the electricity fee settlement data for the green certificate according to the second confirmation information, the green electricity purchase request and the green electricity sale request, and the method includes:
After receiving the second confirmation information, the management component extracts the identity information of the first node and the identity information of the second node;
if the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is traversed, respectively filling the green card number in the green electricity purchase request, the electricity charge in the green electricity sale request and the green card generating equipment into the first electricity charge settlement table to obtain electricity charge settlement data;
if the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is not traversed, generating the electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node, and respectively filling the green card number in the green electricity purchase request, the electricity charge in the green electricity sale request and the green card generating equipment into the electricity charge settlement table to obtain electricity charge settlement data.
Optionally, in the first aspect, the method further includes:
the management component determines an acquisition plug-in unit group corresponding to each electric charge settlement data, wherein the acquisition plug-in unit group comprises a first verification acquisition plug-in unit and a second verification acquisition plug-in unit corresponding to the first verification acquisition plug-in unit;
the management component obtains a first generation time of a first verification acquisition plug-in and a first receiving time of receiving first confirmation information, and obtains first processing time consumption according to the first generation time, the first receiving time and the number of upper nodes of a first node;
The management component obtains a second generation time of a second verification acquisition plug-in and a second receiving time of receiving second confirmation information, and obtains second processing time consumption according to the second generation time, the second receiving time and the number of upper nodes of a second node;
the management component obtains fusion processing time consumption according to the first processing time consumption and the second processing time consumption, and if the fusion processing time consumption is higher than the preset processing time consumption, the management component carries out extension adjustment on a first preset time period and a second preset time period according to the fusion processing time consumption and the preset processing time consumption.
In a second aspect of the embodiment of the present invention, an electric charge settlement system based on a blockchain is provided, which specifically includes:
the block generation module is used for generating a first block chain according to a first node corresponding to the green electricity purchaser, generating a second block chain according to a second node corresponding to the green electricity producer, and establishing a trusted cross-chain channel between the first block chain and the second block chain;
the acquisition module is used for acquiring a first level structural relationship of all first nodes in the first block chain and a second level structural relationship of all second nodes in the second block chain, and generating a purchase permission relationship of the trusted cross-chain channel according to the first level structural relationship and the second level structural relationship;
The first strategy generation module is used for enabling the trusted cross-chain channel to generate first verification strategy information corresponding to a first node according to the purchase permission relation after judging that any one first node in the first blockchain uploads a green electricity purchase request;
the sending module is used for enabling the trusted cross-chain channel to send the green electricity purchase request to a corresponding second node in the second block chain after judging that the first verification information uploaded by a third node corresponding to the first node meets the first verification strategy information;
the second policy generation module is used for generating second verification policy information corresponding to the second node according to the purchase permission relationship if the second node sends a green electricity selling request corresponding to the green electricity purchase request to the trusted cross-link channel;
and the feedback updating module is used for enabling the trusted cross-chain channel to generate electricity charge settlement data for the green certificate after judging that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, and feeding the electricity charge settlement data back to the first block chain and the second block chain respectively so as to enable the first block chain and the second block chain to update the first block account book and the second block account book.
The beneficial effects are that: 1. the scheme can generate corresponding independent blockchains by combining the types of the two transaction parties, and then uses the independent blockchains to independently account and store corresponding data, so that the safety of the data is improved. Meanwhile, the scheme can obtain a corresponding purchase permission relation by combining the level structure relation of the nodes, combine and screen the nodes by combining multidimensional data in the green electricity purchase request and the green electricity sale request, and configure the final result into a blockchain for subsequent data verification. It is worth mentioning that, this scheme through above-mentioned mode, can combine multidimensional data to verify the node and carry out the combination screening, obtain assorted verification node, when satisfying the verification requirement for the node quantity control is in certain within range, improves verification efficiency. In addition, in order to realize the transaction of both transaction sides, the scheme is provided with the trusted cross-link channel to link both the block chains, the trusted cross-link channel is utilized to crawl and verify the data of the block chains, an online settlement system is provided by combining the types of both transaction sides, and the settlement efficiency and reliability are improved by utilizing the attribute of the block chains.
2. In the process of generating the blockchain, the method and the system comb the associated upper nodes by combining the nodes, wherein a corresponding structure table is generated by combining the number of the nodes, and node information is filled according to the node grids of the current stage and the upper node grids in the structure table, so that the corresponding level structure relationship is obtained, and the configuration of the purchase permission relationship is realized. In the verification process, the scheme can be divided into two steps for verification, the first step is to verify the transaction behavior of the purchaser, the second step is to verify after all identity information in the purchase authority relationship is verified, the transaction of the two sides is established after the verification of the transaction behavior of the seller is also passed, and the uplink storage is carried out on the electric charge data after the transaction to prevent the data from being tampered. In the transaction process, online quick auditing and verification can be realized, and settlement efficiency and reliability are improved by using the attribute of the blockchain.
3. According to the scheme, a corresponding waiting time period is set in the transaction behavior, after the corresponding waiting time period is exceeded, if relevant confirmation information is not received, the transaction is considered to be failed, the processing time consumption can be calculated by combining the historical transaction behavior and the time dimension and the node number dimension, then the fusion efficiency of the transaction behavior is obtained by combining the processing time consumption of two links, and finally the processing time length in the transaction process is adjusted by utilizing the fusion efficiency, so that the processing time length meets the requirement of being attached to the corresponding node.
Drawings
Fig. 1 is a schematic flow chart of a block chain-based electricity fee settlement method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of the present invention for embodying trusted cross-chain channels.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein.
It should be understood that, in various embodiments of the present invention, the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
It should be understood that in the present invention, "comprising" and "having" and any variations thereof are intended to cover 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 that are expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present invention, "plurality" means two or more. "and/or" is merely an association relationship describing an association object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. "comprising A, B and C", "comprising A, B, C" means that all three of A, B, C comprise, "comprising A, B or C" means that one of the three comprises A, B, C, and "comprising A, B and/or C" means that any 1 or any 2 or 3 of the three comprises A, B, C.
It should be understood that in the present invention, "B corresponding to a", "a corresponding to B", or "B corresponding to a" means that B is associated with a, from which B can be determined. Determining B from a does not mean determining B from a alone, but may also determine B from a and/or other information. The matching of A and B is that the similarity of A and B is larger than or equal to a preset threshold value.
As used herein, "if" may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to detection" depending on the context.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Referring to fig. 1, a flow chart of a block chain-based electricity fee settlement method according to an embodiment of the present invention includes S1-S6:
s1, generating a first blockchain according to a first node corresponding to a green electricity purchaser, generating a second blockchain according to a second node corresponding to a green electricity producer, and establishing a trusted cross-chain channel between the first blockchain and the second blockchain.
It is worth mentioning that when the transaction electricity fee data settlement is carried out between the green electricity purchasers and the green electricity manufacturers, data interaction is needed. The scheme can generate a first blockchain corresponding to the green electricity purchaser and a second blockchain corresponding to the green electricity producer, and then a trusted cross-chain channel is established between the first blockchain and the second blockchain, so that data interaction and verification are realized.
In some embodiments, S1 (generating a first blockchain from a first node corresponding to the green electricity purchaser, generating a second blockchain from a second node corresponding to the green electricity producer, establishing a trusted cross-chain channel between the first and second blockchains) comprises S11-S13:
And S11, connecting the first nodes corresponding to all the green electricity purchasers to generate a first blockchain, wherein the first blockchain is configured with a first blockbook so that any one first node can record when finishing transaction or verification.
It can be understood that the first blockchain is composed of a plurality of first nodes corresponding to green electricity buyers, wherein the first blockchain is configured with a first blockbook, so that any one first node can record when finishing transaction or verification. It is understood that the first blockchain can realize the true record of the transaction behavior data of the green electricity purchasers and prevent the tampering.
And S12, connecting second nodes corresponding to all green electricity manufacturers to generate a second blockchain, wherein the second blockchain is configured with a second blockbook so that any one second node can record when finishing transaction or verification.
And the same as the step S11, the scheme connects the second nodes corresponding to all green electricity manufacturers to generate a second blockchain, wherein the second blockchain is configured with a second blockbook so that any one of the second nodes can record when finishing transaction or verification. It will be appreciated that the actual recording of green electricity generator transaction data may be achieved through the second blockchain, preventing tampering.
S13, a first cross-chain component, a second cross-chain component and a management component which are included in the trusted cross-chain channel are generated, the first block chain, the first cross-chain component, the second cross-chain component and the second block chain are sequentially connected, and the management component is respectively connected with the first cross-chain component and the second cross-chain component.
Referring to fig. 2, in order to enable data interaction between the first blockchain and the second blockchain and achieve electricity fee settlement between the green electricity producer and the green electricity purchaser, the scheme is provided with a trusted cross-chain channel to communicate the first blockchain and the second blockchain.
The trusted cross-chain channel comprises a first cross-chain component, a second cross-chain component and a management component, wherein the first block chain, the first cross-chain component, the second cross-chain component and the second block chain are sequentially connected, and the management component is respectively connected with the first cross-chain component and the second cross-chain component.
It is understood that the first cross-chain component is connected with the first blockchain, the second cross-chain component is connected with the second blockchain, and a management component is arranged between the first cross-chain component and the second cross-chain component and is used for managing and verifying corresponding data.
S2, acquiring a first level structural relationship of all first nodes in a first block chain and a second level structural relationship of all second nodes in a second block chain, and generating a purchase permission relationship of the trusted cross-chain channel according to the first level structural relationship and the second level structural relationship.
It should be noted that, when a node performs a transaction, an upper node is generally required to perform verification. For example, a group company includes a parent company, a subsidiary company and a grandchild company, and when the grandchild company makes a transaction, the subsidiary company and/or the parent company need to agree to make the transaction, otherwise the transaction cannot be made.
The first level structural relationship may be a structural relationship corresponding to the first node. Similarly, the second level structural relationship is a structural relationship corresponding to the second node.
The scheme can generate the purchase permission relation of the trusted cross-chain channel by utilizing the first level structural relation and the second level structural relation.
In some embodiments, S2 (obtaining a first level structural relationship of all first nodes in a first blockchain and a second level structural relationship of all second nodes in a second blockchain, generating a purchase permission relationship of the trusted cross-chain channel according to the first level structural relationship and the second level structural relationship) includes S21-S25:
s21, determining the corresponding upper node according to the node label corresponding to each first node, and if the determined node label of the upper node does not have other corresponding upper nodes, obtaining the substructure relation of the corresponding first node.
For example, the first node is a child of the parent, child and grandchild, and when the node label (parent) of the determined upper node does not have the corresponding other upper node, the child structure relationship of the corresponding first node is obtained. It will be appreciated that in this case the first node has only one superordinate node. At this time, the child structure relationship may be a parent company-child company.
And S22, if the node labels of the determined upper nodes are judged to have other corresponding upper nodes, counting all the upper nodes to obtain all the upper nodes corresponding to the first nodes, and obtaining the substructure relation of the corresponding first nodes.
For example, the first node is a grandchild company of the parent company, the child company, and the grandchild company, and when the node label (child company) of the determined superior node has the corresponding other superior node (parent company), the child structure relationship of the corresponding first node is obtained. It will be appreciated that in this case the first node has a plurality of superordinate nodes. At this time, the child structure relationship may be parent-child-grandchild.
S23, determining the corresponding upper node according to the node label corresponding to each second node, and if the determined node label of the upper node does not have other corresponding upper nodes, obtaining the substructure relation of the corresponding second node. The step is the same as step S21, and will not be described again here.
And S24, if the node labels of the determined upper nodes are judged to have other corresponding upper nodes, counting all the upper nodes to obtain all the upper nodes corresponding to the second nodes, and obtaining the substructure relation of the corresponding second nodes. The step is the same as step S22, and will not be described again here.
S25, obtaining a first level structure relation according to the sub-structure relations of all the first nodes, obtaining a second level structure relation according to the sub-structure relations of all the second nodes, and obtaining the purchase permission relation of the management component according to the first level structure relation and the second level structure relation.
After the sub-structural relationship is obtained, the scheme can obtain a first level structural relationship by utilizing the sub-structural relationships of all the first nodes, obtain a second level structural relationship according to the sub-structural relationships of all the second nodes, and finally obtain the purchase permission relationship of the management component by combining the first level structural relationship and the second level structural relationship.
In some embodiments, S25 (obtaining a first level structural relationship according to the sub-structural relationships of all the first nodes, obtaining a second level structural relationship according to the sub-structural relationships of all the second nodes, and obtaining the purchase permission relationship of the management component according to the first level structural relationship and the second level structural relationship) includes S251-S255:
S251, initializing and generating a corresponding first structure table according to the number of the first nodes, wherein the first structure table comprises corresponding unit groups corresponding to each first node, and the corresponding unit groups comprise a node grid of the current stage and a node grid of the upper stage.
The method and the device can generate a corresponding first structure table by combining the number of the first nodes, wherein the first structure table comprises corresponding unit groups corresponding to each first node, and the corresponding unit groups comprise node grids of the current level and node grids of the upper level. It should be noted that when the corresponding node does not have a superior node, the superior node grid may not be constructed.
And S252, filling the node identity information of each first node into the corresponding node grid of the current level, and filling the identity information of the upper node into the upper node grid to obtain a first structure table with a first level structure relationship.
It can be understood that the node grid of the present stage is used for filling the node identity information of the first node, and the node grid of the upper stage is used for filling the identity information of the upper stage corresponding to the first node. Through the mode, the first structure table can be obtained.
When determining the upper node, the corresponding sub-structure relationship can be utilized for determination.
S253, initializing and generating a corresponding second structure table according to the number of the second nodes, wherein the second structure table comprises corresponding unit groups corresponding to each second node, and the corresponding unit groups comprise a node grid of the current stage and a node grid of the upper stage. The step is the same as S251, and will not be described here again.
And S254, filling the node identity information of each second node into the corresponding node grid of the current level, and filling the identity information of the upper node into the upper node grid to obtain a second structure table with a second level structure relation. This step is the same as S252 and will not be described here again.
S255, the first structure table and the second structure table are respectively configured to the management component to generate a purchase permission relation.
After the first structure table and the second structure table are obtained, the first structure table and the second structure table are respectively configured to the management component to generate a purchase permission relationship.
And S3, after the trusted cross-chain channel judges that any one first node in the first blockchain uploads the green electricity purchase request, generating first verification policy information corresponding to the first node according to the purchase permission relation and the green electricity purchase attribute corresponding to the green electricity purchase request.
After the complete data configuration in steps S1 and S2, the transaction data may be verified using the configured data. After the trusted cross-chain channel judges that any one of the first nodes in the first blockchain uploads the green electricity purchase request, the configured purchase permission relationship and the green electricity purchase attribute corresponding to the green electricity purchase request can be utilized for combined verification, and the specific reference is below.
In some embodiments, S3 (the trusted cross-chain channel generates the first verification policy information corresponding to the first node according to the purchase permission relationship and the green electricity purchase attribute corresponding to the green electricity purchase request after determining that any one of the first nodes in the first blockchain uploads the green electricity purchase request) includes S31-S35:
s31, after the first cross-chain component receives a green electricity purchase request uploaded by any one first node in the first blockchain, identity information corresponding to the first node is used as first target identity information to be sent to the management component, and the management component traverses the first structure table to determine a corresponding unit group.
When the green electricity purchaser needs to purchase the electric energy data, a green electricity purchase request can be sent out, and the first cross-chain component can receive any one of the first nodes in the first blockchain to upload the green electricity purchase request.
After receiving the green electricity purchase request, the scheme can send the identity information corresponding to the first node to the management component as first target identity information, and then the management component can traverse the first structure table to determine the corresponding unit group.
And S32, determining green electricity purchase attributes of multiple dimensions in the green electricity purchase request, wherein the green electricity purchase attributes at least comprise green electricity quantity attributes, green electricity selling enterprise attributes and green electricity category attributes.
In order to verify, the scheme also determines green electricity purchase attributes of multiple dimensions in the green electricity purchase request, wherein the green electricity purchase attributes at least comprise green electricity quantity attributes, green electricity selling enterprise attributes and green electricity category attributes.
It can be understood that the scheme can combine the purchase permission relationship with the green electricity quantity attribute, the green electricity selling enterprise attribute and the green electricity category attribute for combined verification. Wherein, the green electricity quantity attribute can be that several green certificates need to be purchased; the green electricity business attribute can be the attribute of the seller, such as national enterprise attribute or private enterprise attribute; the green electricity type attribute may be a source of green electricity production, such as solar energy type, wind energy type, etc.
And S33, comparing the green electricity purchase attribute of each dimension with the preset dimension attribute respectively to obtain the minimum required verification level corresponding to the green electricity purchase attribute of the corresponding dimension, and taking the maximum verification level in the minimum required verification levels of all dimensions as the verification level.
It should be noted that, in the scheme, the green electricity purchasing attributes of each dimension have preset dimension attributes respectively, and after the green electricity purchasing attributes are obtained, the green electricity purchasing attributes are compared with the corresponding preset dimension attributes, so that the minimum required verification level corresponding to the green electricity purchasing attributes of the corresponding dimension is obtained.
For the attribute dimension of the green electricity quantity, the minimum required verification level corresponding to 0-2 green certificates is 1, the minimum required verification level corresponding to 3-4 green certificates is 2, and the minimum required verification level corresponding to more than 5 green certificates is 3; aiming at the attribute dimension of the green electricity enterprise, the minimum required verification level corresponding to national enterprises is 1, and the minimum required verification level corresponding to private enterprises is 2. Other dimension principles are similar, and data can be preset, and are not repeated.
After obtaining the plurality of minimum required verification levels, the scheme takes the maximum verification level in the minimum required verification levels of all dimensions as the verification level. For example, the resulting parity grade is 2.
S34, extracting the upper node identity information in the upper node grid corresponding to the unit group from bottom to top based on the verification level, stopping extracting after judging that the extracted upper node identity information is greater than or equal to the verification level, taking the extracted upper node identity information as first target identity information, and enabling each node to have a preset level.
After the verification level is obtained, the scheme can extract the upper node identity information in the upper node grid corresponding to the unit group from bottom to top based on the verification level, and the extraction is stopped after the extracted upper node identity information is judged to be greater than or equal to the verification level, so that screening of verification nodes is realized.
And finally, taking the extracted upper node identity information as first target identity information, wherein each node has a preset grade.
And S35, generating a first verification acquisition plug-in according to the first target identity information and all the upper node identity information, and monitoring the first cross-chain component based on the first verification acquisition plug-in.
The scheme can combine the first target identity information and all the upper node identity information to generate a first verification acquisition plug-in, and the first verification acquisition plug-in is utilized to carry out combined verification monitoring on the first cross-chain component. It is worth mentioning that, this scheme through above-mentioned mode, can combine multidimensional data to verify the node and carry out the combination screening, obtain assorted verification node, when satisfying the verification requirement for the node quantity control is in certain within range, improves verification efficiency.
And S4, after the trusted cross-chain channel judges that the first verification information uploaded by the third node corresponding to the first node meets the first verification policy information, the green electricity purchase request is sent to the corresponding second node in the second blockchain.
The third node corresponding to the first node may be an upper node corresponding to the first node, and if the upper nodes agree to trade, it may be determined that the first verification information uploaded by the third node corresponding to the first node satisfies the first verification policy information, that is, the purchase behavior is allowed, and then the green electricity purchase request is sent to the corresponding second node in the second blockchain to perform green electricity purchase.
In some embodiments, S4 (the trusted cross-chain channel sending the green electricity purchase request to the corresponding second node in the second blockchain after determining that the first verification information uploaded by the third node corresponding to the first node satisfies the first verification policy information) includes S41-S44:
s41, the first verification acquisition plug-in monitors all requests received by the first cross-link component, and records identity information of a third node corresponding to the first node after judging that the third node uploads first verification information in a first preset time period, wherein the first verification information is used for allowing the first node to purchase green electricity.
The first verification collecting plug-in monitors all requests received by the first cross-link component, and records identity information of a third node corresponding to the first node after judging that the third node uploads the first verification information in a first preset time period, wherein the first verification information is for allowing the first node to purchase green electricity.
S42, after the first verification collecting plug-in judges that the identity information of all the third nodes corresponds to the identity information of the upper node one by one, the first verification collecting plug-in judges that the first verification information uploaded by the third nodes meets the first verification policy information.
It can be understood that the scheme can pass the verification only after all the upper nodes are allowed, that is, the first verification collecting plug-in can judge that the first verification information uploaded by the third node meets the first verification policy information.
S43, the first verification acquisition plug-in sends first confirmation information to the management component, and the management component sends a green electricity purchase request corresponding to the first node to the second cross-chain component.
After the first verification collection plug-in passes the verification, first confirmation information is sent to the management component, and the management component sends a green electricity purchase request corresponding to the first node to the second cross-link component for further verification.
And S44, the second cross-chain component extracts the identity information in the green electricity purchase request to determine a corresponding second node, and sends the green electricity purchase request to the corresponding second node in the second blockchain.
It will be appreciated that the present solution extracts the identity information in the green electricity purchase request to determine the corresponding second node, and then sends the green electricity purchase request to the corresponding second node in the second blockchain.
And S5, if the second node sends a green electricity selling request corresponding to the green electricity purchasing request to the trusted cross-link channel, the trusted cross-link channel generates second verification strategy information corresponding to the second node according to the purchasing authority relation.
If the second node sends a green electricity selling request corresponding to the green electricity purchasing request to the trusted cross-link channel, the trusted cross-link channel generates second verification policy information corresponding to the second node according to the purchasing authority relationship, and verifies the selling behavior.
It should be noted that, if the second node does not send the green electricity selling request corresponding to the green electricity purchasing request to the trusted cross-link channel, the subsequent verification process is not needed, and the fact that the transaction cannot be performed is directly judged.
In some embodiments, S5 (if the second node sends a green electricity vending request corresponding to the green electricity purchase request to the trusted cross-link channel, the trusted cross-link channel generates second verification policy information corresponding to the second node according to the purchase permission relationship and the green electricity vending attribute corresponding to the green electricity vending request) includes S51-S55:
s51, after receiving a green electricity selling request uploaded by a corresponding second node in a second block chain, the second cross-chain component sends identity information corresponding to the second node as second target identity information to the management component, and the management component traverses a second structure table to determine a corresponding unit group;
S52, determining green electricity sales attributes of multiple dimensions in the green electricity sales request, wherein the green electricity sales attributes at least comprise green electricity quantity attributes, green electricity purchasing enterprise attributes and green electricity category attributes;
s53, comparing the green electricity purchasing attributes of each dimension with preset dimension attributes respectively to obtain minimum required verification levels corresponding to the green electricity purchasing attributes of the corresponding dimension, and taking the maximum verification level in the minimum required verification levels of all dimensions as a verification level;
s54, extracting the upper node identity information in the upper node grid corresponding to the unit group from bottom to top based on the verification level, stopping extracting after judging that the extracted upper node identity information is greater than or equal to the verification level, taking the extracted upper node identity information as second target identity information, wherein each node has a preset level;
and S55, generating a second verification acquisition plug-in according to the second target identity information and all the upper node identity information, and monitoring the second cross-chain component based on the second verification acquisition plug-in.
The above manner is similar to the principle of step S3, and will not be described again here.
And S6, after the trusted cross-chain channel judges that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, generating electricity charge settlement data for the green certificate and feeding the electricity charge settlement data back to the first block chain and the second block chain respectively so that the first block chain and the second block chain update the first block account book and the second block account book.
It can be understood that the trusted cross-link channel indicates that all verification passes after judging that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, and can conduct transaction. At this time, the scheme may generate electricity fee settlement data for the green license and feed back to the first blockchain and the second blockchain, respectively, so that the first blockchain and the second blockchain update the first blockbook and the second blockbook.
In some embodiments, S6 (after the trusted cross-link channel determines that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, generating electricity fee settlement data for the green license and feeding back the electricity fee settlement data to the first blockchain and the second blockchain respectively, so that the first blockchain and the second blockchain update the first blockbook and the second blockbook) includes S61-S64:
and S61, the second verification acquisition plug-in monitors all requests received by the second cross-link group, and records the identity information of a fourth node after judging that the fourth node corresponding to the second node uploads second verification information in a second preset time period, wherein the second verification information is for allowing the second node to sell green electricity.
The second verification collection plug-in monitors all requests received by the second cross-link group, and records identity information of a fourth node after judging that the fourth node corresponding to the second node uploads second verification information in a second preset time period.
And S62, after the second verification acquisition plug-in judges that the identity information of all the fourth nodes corresponds to the identity information of the upper node one by one, the second verification acquisition plug-in judges that the second verification information uploaded by the fourth nodes meets the second verification policy information.
It can be understood that the scheme can only pass the verification after all the upper nodes are allowed, that is, the second verification collecting plug-in can judge that the second verification information uploaded by the fourth node meets the second verification policy information.
And S63, the second verification acquisition plug-in transmits second confirmation information to the management component, and the management component generates green-evidence-based electricity charge settlement data according to the second confirmation information, the green electricity purchase request and the green electricity sale request.
After the verification is passed, the second verification acquisition plug-in unit can send second confirmation information to the management component, and the management component generates electricity charge settlement data for green certificates according to the second confirmation information, the green electricity purchase request and the green electricity sale request.
In some embodiments, S63 (the second verification collecting plug-in sends the second confirmation information to the management component, and the management component generates the electricity fee settlement data for the green certificate according to the second confirmation information, the green electricity purchase request and the green electricity sale request) includes S631-S633:
s631, the management component extracts the identity information of the first node and the identity information of the second node after receiving the second confirmation information.
It can be understood that the management component, after receiving the second confirmation information, indicates that the transaction can be performed, and at this time, the management component extracts the identity information of the first node and the identity information of the second node and records the extracted identity information.
S632, if the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is traversed, the number of green certificates in the green electricity purchase request, the electricity charge in the green electricity sale request and the green certificate generation equipment are respectively filled into the first electricity charge settlement table to obtain electricity charge settlement data.
It can be understood that the first node and the second node may possibly perform historical transactions, and the scheme may first determine whether the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node can be traversed.
If the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is traversed, the first electricity charge settlement table can be directly utilized for data filling, and at the moment, the scheme can respectively fill the green card number in the green electricity purchase request, the electricity charge in the green electricity sale request and the green card generating equipment into the first electricity charge settlement table to obtain electricity charge settlement data.
S633, if the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is not traversed, generating an electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node, and respectively filling the green card number in the green electricity purchase request, the electricity charge in the green electricity sale request and the green card generating equipment into the electricity charge settlement table to obtain electricity charge settlement data.
It can be understood that if the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is not traversed, the electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is generated, and then the number of green certificates in the green electricity purchase request, the electricity charge in the green electricity sale request and the green certificate generation equipment are respectively filled into the electricity charge settlement table to obtain the electricity charge settlement data.
S64, feeding the electricity charge settlement data back to the first block chain and the second block chain respectively and broadcasting the electricity charge settlement data so that the first block chain and the second block chain update the first block account book and the second block account book.
Finally, the scheme feeds back the electric charge settlement data to the first block chain and the second block chain respectively and broadcasts the electric charge settlement data so that the first block chain and the second block chain update the first block account book and the second block account book.
In order to combine the historical transaction behavior, adjust the processing duration in the transaction process, on the basis of the above embodiment, further include S71-S74:
s71, the management component determines an acquisition plug-in unit group corresponding to each electric charge settlement data, wherein the acquisition plug-in unit group comprises a first verification acquisition plug-in unit and a second verification acquisition plug-in unit corresponding to the first verification acquisition plug-in unit.
Firstly, the management component firstly determines a collection plug-in unit group corresponding to each electric charge settlement data, namely a first verification collection plug-in unit and a second verification collection plug-in unit corresponding to a transaction behavior.
S72, the management component obtains a first generation time of the first verification acquisition plug-in and a first receiving time of receiving first confirmation information, and obtains first processing time consumption according to the first generation time, the first receiving time and the number of upper nodes of the first node.
The method and the device can obtain the first generation time of the first verification acquisition plug-in, namely the starting time of the transaction behavior, obtain the first receiving time for receiving the first confirmation information, namely the expiration time for verification passing in the first-step transaction behavior, and obtain the first processing time consumption by combining the first generation time, the first receiving time and the number of the upper nodes of the first node. It will be appreciated that the first processing time may be obtained by the above manner.
And S73, the management component acquires a second generation time of the second verification acquisition plug-in and a second receiving time of receiving the second confirmation information, and obtains second processing time consumption according to the second generation time, the second receiving time and the number of upper nodes of the second node. This step is similar to the S72 principle and will not be described in detail here. By this step the second process time consuming can be obtained.
S74, the management component obtains fusion processing time consumption according to the first processing time consumption and the second processing time consumption, and if the fusion processing time consumption is higher than the preset processing time consumption, the management component carries out extension adjustment on the first preset time period and the second preset time period according to the fusion processing time consumption and the preset processing time consumption.
After the first processing time consuming and the second processing time consuming are obtained, the first processing time consuming and the second processing time consuming are fused, and the fusion processing time consuming is obtained. It will be understood that the fusion time represents the corresponding processing time of a transaction, and the higher the fusion time, the longer the corresponding processing time. If the fusion processing time consumption is higher than the preset processing time consumption, the scheme can utilize the fusion processing time consumption and the preset processing time consumption to carry out extension adjustment on the first preset time period and the second preset time period.
Wherein S74 (the management component obtains a fusion processing time consumption according to the first processing time consumption and the second processing time consumption, and if the fusion processing time consumption is lower than a preset processing time consumption, performs extension adjustment on the first preset time period and the second preset time period according to the fusion processing time consumption and the preset processing time consumption) includes:
the fusion process is time consuming to calculate by the following formula,
Figure SMS_1
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_4
time consuming for fusion process, +.>
Figure SMS_9
For the first weight value, +.>
Figure SMS_11
Time consuming for the first treatment, +.>
Figure SMS_5
For the second weight value, +.>
Figure SMS_8
Time consuming for the second treatment, +.>
Figure SMS_12
For the first reception time, < >>
Figure SMS_13
For the first time of production, +.>
Figure SMS_2
For the number of upper nodes of the first node, +. >
Figure SMS_6
For normalized value->
Figure SMS_7
For the second reception time, +.>
Figure SMS_10
For the second generation moment, +.>
Figure SMS_3
The number of upper nodes that are the second node.
In the above-mentioned formula(s),
Figure SMS_14
representing the processing duration of the first step in the transaction, +.>
Figure SMS_15
Representing the processing time length of the second step in the transaction, normalized value +.>
Figure SMS_16
First weight value->
Figure SMS_17
Second weight value +.>
Figure SMS_18
May be preset by a worker.
Calculating the difference between the fusion processing time consumption and the preset processing time consumption to obtain an efficiency difference value, respectively adjusting the first preset time period and the second preset time period according to the efficiency difference value to obtain an extended first preset time period and a prolonged second preset time period, calculating the extended first preset time period and the extended second preset time period through the following formulas,
Figure SMS_19
,
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_20
for a first predetermined period of time after extension, +.>
Figure SMS_21
For a second predetermined period of time after extension, +.>
Figure SMS_22
Is a constant value +.>
Figure SMS_23
Time consuming for preset treatment->
Figure SMS_24
For a first preset period of time before extension, < > j->
Figure SMS_25
For a second preset period of time before extension.
In the above-mentioned formula(s),
Figure SMS_26
representing the difference in efficiency, the larger the difference, the larger the amplitude that needs to be adjusted, and by the above manner, the extension of the first preset time period and the second preset time period can be realized.
The embodiment of the invention provides an electric charge settlement system based on a block chain, which specifically comprises the following steps:
the block generation module is used for generating a first block chain according to a first node corresponding to the green electricity purchaser, generating a second block chain according to a second node corresponding to the green electricity producer, and establishing a trusted cross-chain channel between the first block chain and the second block chain;
the acquisition module is used for acquiring a first level structural relationship of all first nodes in the first block chain and a second level structural relationship of all second nodes in the second block chain, and generating a purchase permission relationship of the trusted cross-chain channel according to the first level structural relationship and the second level structural relationship;
the first strategy generation module is used for enabling the trusted cross-chain channel to generate first verification strategy information corresponding to a first node according to the purchase permission relation after judging that any one first node in the first blockchain uploads a green electricity purchase request;
the sending module is used for enabling the trusted cross-chain channel to send the green electricity purchase request to a corresponding second node in the second block chain after judging that the first verification information uploaded by a third node corresponding to the first node meets the first verification strategy information;
The second policy generation module is used for generating second verification policy information corresponding to the second node according to the purchase permission relationship if the second node sends a green electricity selling request corresponding to the green electricity purchase request to the trusted cross-link channel;
and the feedback updating module is used for enabling the trusted cross-chain channel to generate electricity charge settlement data for the green certificate after judging that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, and feeding the electricity charge settlement data back to the first block chain and the second block chain respectively so as to enable the first block chain and the second block chain to update the first block account book and the second block account book.
The present invention also provides a storage medium having stored therein a computer program for implementing the methods provided by the various embodiments described above when executed by a processor.
The storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media can be any available media that can be accessed by a general purpose or special purpose computer. For example, a storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). In addition, the ASIC may reside in a user device. The processor and the storage medium may reside as discrete components in a communication device. The storage medium may be read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tape, floppy disk, optical data storage device, etc.
The present invention also provides a program product comprising execution instructions stored in a storage medium. The at least one processor of the device may read the execution instructions from the storage medium, the execution instructions being executed by the at least one processor to cause the device to implement the methods provided by the various embodiments described above.
In the above embodiments of the terminal or the server, it should be understood that the processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (11)

1. The electric charge settlement method based on the block chain is characterized by comprising the following steps of:
generating a first blockchain according to a first node corresponding to a green electricity purchaser, generating a second blockchain according to a second node corresponding to a green electricity producer, and establishing a trusted cross-chain channel between the first blockchain and the second blockchain;
acquiring a first level structure relation of all first nodes in a first block chain and a second level structure relation of all second nodes in a second block chain, and generating a purchase permission relation of the trusted cross-chain channel according to the first level structure relation and the second level structure relation;
after judging that any one first node in the first blockchain uploads a green electricity purchase request, the trusted cross-chain channel generates first verification policy information corresponding to the first node according to the purchase permission relation and the green electricity purchase attribute corresponding to the green electricity purchase request;
after judging that the first verification information uploaded by a third node corresponding to the first node meets the first verification policy information, the trusted cross-chain channel sends the green electricity purchase request to a corresponding second node in a second blockchain;
if the second node sends a green electricity selling request corresponding to the green electricity purchasing request to the trusted cross-link channel, the trusted cross-link channel generates second verification policy information corresponding to the second node according to the purchasing authority relation and the green electricity selling attribute corresponding to the green electricity selling request;
After judging that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, the trusted cross-chain channel generates electricity charge settlement data for the green certificate and feeds the electricity charge settlement data back to the first block chain and the second block chain respectively, so that the first block chain and the second block chain update the first block account book and the second block account book.
2. The blockchain-based electricity fee settlement method of claim 1, wherein,
the generating a first blockchain according to a first node corresponding to a green electricity purchaser, generating a second blockchain according to a second node corresponding to a green electricity producer, and establishing a trusted cross-chain channel between the first blockchain and the second blockchain comprises:
connecting first nodes corresponding to all green electric buyers to generate a first blockchain, wherein the first blockchain is configured with a first blockbook so that any one first node can record when finishing transaction or verification;
connecting second nodes corresponding to all green electricity manufacturers to generate a second blockchain, wherein the second blockchain is configured with a second block account book so that any one second node can record when finishing transaction or verification;
The method comprises the steps of generating a first cross-link component, a second cross-link component and a management component, wherein the first cross-link component, the second cross-link component and the second block chain are included in a trusted cross-link channel, and the management component is connected with the first cross-link component and the second cross-link component respectively.
3. The blockchain-based electricity fee settlement method according to claim 2, wherein,
the obtaining the first level structure relationship of all the first nodes in the first blockchain and the second level structure relationship of all the second nodes in the second blockchain, and generating the purchase permission relationship of the trusted cross-chain channel according to the first level structure relationship and the second level structure relationship comprises the following steps:
determining the corresponding upper node according to the node label corresponding to each first node, and if the determined node label of the upper node does not have other corresponding upper nodes, obtaining the substructure relation of the corresponding first nodes;
if the determined node labels of the upper nodes are judged to have other corresponding upper nodes, counting all the upper nodes to obtain all the upper nodes corresponding to the first nodes, and obtaining the substructure relation of the corresponding first nodes;
Determining the corresponding upper node according to the node label corresponding to each second node, and if the determined node label of the upper node does not have other corresponding upper nodes, obtaining the substructure relation of the corresponding second nodes;
if the determined node labels of the upper nodes are judged to have other corresponding upper nodes, counting all the upper nodes to obtain all the upper nodes corresponding to the second nodes, and obtaining the substructure relation of the corresponding second nodes;
and obtaining a first level structural relationship according to the substructure relationship of all the first nodes, obtaining a second level structural relationship according to the substructure relationship of all the second nodes, and obtaining the purchase permission relationship of the management component according to the first level structural relationship and the second level structural relationship.
4. The electric charge settlement method based on the blockchain as set forth in claim 3, characterized in that,
the obtaining a first level structure relationship according to the sub-structure relationships of all the first nodes, obtaining a second level structure relationship according to the sub-structure relationships of all the second nodes, and obtaining the purchase permission relationship of the management component according to the first level structure relationship and the second level structure relationship comprises the following steps:
Initializing and generating a corresponding first structure table according to the number of the first nodes, wherein the first structure table comprises corresponding unit groups corresponding to each first node, and the corresponding unit groups comprise a node grid of the current stage and a node grid of the upper stage;
filling the node identity information of each first node into the corresponding node grid of the current level, and filling the identity information of the upper level node into the upper level node grid to obtain a first structure table with a first level structure relation;
initializing and generating a corresponding second structure table according to the number of the second nodes, wherein the second structure table comprises corresponding unit groups corresponding to each second node, and the corresponding unit groups comprise a node grid of the current stage and a node grid of the upper stage;
filling the node identity information of each second node into the corresponding node grid of the level, and filling the identity information of the upper node into the node grid of the level to obtain a second structure table with a second level structure relation;
and respectively configuring the first structure table and the second structure table to a management component to generate a purchase permission relation.
5. The electric charge settlement method based on the blockchain as set forth in claim 4, wherein,
After the trusted cross-chain channel judges that any one first node in the first blockchain uploads a green electricity purchase request, first verification policy information corresponding to the first node is generated according to the purchase permission relation and green electricity purchase attributes corresponding to the green electricity purchase request, and the method comprises the following steps:
after the first cross-chain component receives a green electricity purchase request uploaded by any one first node in a first blockchain, identity information corresponding to the first node is used as first target identity information to be sent to a management component, and the management component traverses a first structure table to determine a corresponding unit group;
determining green electricity purchase attributes of multiple dimensions in the green electricity purchase request, wherein the green electricity purchase attributes at least comprise green electricity quantity attributes, green electricity selling enterprise attributes and green electricity category attributes;
comparing the green electricity purchasing attributes of each dimension with preset dimension attributes respectively to obtain minimum required verification levels corresponding to the green electricity purchasing attributes of the corresponding dimension, and taking the maximum verification level in the minimum required verification levels of all the dimensions as a verification level;
extracting the upper node identity information in the upper node grid corresponding to the unit group from bottom to top based on the verification level, stopping extracting after judging that the extracted upper node identity information is greater than or equal to the verification level, taking the extracted upper node identity information as first target identity information, wherein each node has a preset level;
And generating a first verification acquisition plug-in according to the first target identity information and all the upper node identity information, and monitoring the first cross-chain component based on the first verification acquisition plug-in.
6. The electric charge settlement method based on the blockchain as set forth in claim 5, wherein,
after the trusted cross-chain channel judges that the first verification information uploaded by the third node corresponding to the first node meets the first verification policy information, the trusted cross-chain channel sends the green electricity purchase request to the corresponding second node in the second blockchain, and the trusted cross-chain channel comprises the following steps:
the first verification acquisition plug-in monitors all requests received by the first cross-link component, and records identity information of a third node corresponding to the first node after judging that the first verification information is uploaded by the third node in a first preset time period, wherein the first verification information is a green electricity purchasing behavior allowed by the first node;
after the first verification acquisition plug-in judges that the identity information of all the third nodes corresponds to the identity information of the upper node one by one, the first verification acquisition plug-in judges that the first verification information uploaded by the third nodes meets the first verification policy information;
the first verification acquisition plug-in sends first confirmation information to the management component, and the management component sends a green electricity purchase request corresponding to the first node to the second cross-chain component;
The second cross-chain component extracts identity information in the green electricity purchase request to determine a corresponding second node, and sends the green electricity purchase request to the corresponding second node in the second blockchain.
7. The blockchain-based electricity fee settlement method of claim 6, wherein,
if the second node sends a green electricity selling request corresponding to the green electricity purchasing request to the trusted cross-link channel, the trusted cross-link channel generates second verification policy information corresponding to the second node according to the purchasing authority relation and the green electricity selling attribute corresponding to the green electricity selling request, and the second verification policy information comprises:
after receiving a green electricity selling request uploaded by a corresponding second node in a second block chain, the second cross-chain component sends identity information corresponding to the second node as second target identity information to the management component, and the management component traverses a second structure table to determine a corresponding unit group;
determining green electricity sales attributes of multiple dimensions in the green electricity sales request, wherein the green electricity sales attributes at least comprise green electricity quantity attributes, green electricity purchasing enterprise attributes and green electricity category attributes;
comparing the green electricity purchasing attributes of each dimension with preset dimension attributes respectively to obtain minimum required verification levels corresponding to the green electricity purchasing attributes of the corresponding dimension, and taking the maximum verification level in the minimum required verification levels of all the dimensions as a verification level;
Extracting the upper node identity information in the upper node grid corresponding to the unit group from bottom to top based on the verification level, stopping extracting after judging that the extracted upper node identity information is greater than or equal to the verification level, taking the extracted upper node identity information as second target identity information, wherein each node has a preset level;
and generating a second verification acquisition plug-in according to the second target identity information and all the upper node identity information, and monitoring the second cross-chain component based on the second verification acquisition plug-in.
8. The blockchain-based electricity fee settlement method of claim 7, wherein,
after the trusted cross-link channel judges that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, generating electricity charge settlement data for the green certificate and feeding the electricity charge settlement data back to the first blockchain and the second blockchain respectively so that the first blockchain and the second blockchain update the first blockbook and the second blockbook, the trusted cross-link channel comprises the following steps:
the second verification acquisition plug-in monitors all requests received by the second cross-link group, and records the identity information of a fourth node after judging that the fourth node corresponding to the second node uploads second verification information in a second preset time period, wherein the second verification information is used for allowing the second node to sell green electricity;
After the second verification acquisition plug-in judges that the identity information of all the fourth nodes corresponds to the identity information of the upper node one by one, the second verification acquisition plug-in judges that the second verification information uploaded by the fourth nodes meets second verification policy information;
the second verification acquisition plug-in sends second confirmation information to the management component, and the management component generates electricity charge settlement data for green certificates according to the second confirmation information, the green electricity purchase request and the green electricity sale request;
and feeding back the electric charge settlement data to the first blockchain and the second blockchain respectively and broadcasting the electric charge settlement data so that the first blockchain and the second blockchain update the first blockbook and the second blockbook.
9. The blockchain-based electricity fee settlement method of claim 8, wherein,
the second verification collection plug-in sends second confirmation information to the management component, and the management component generates green-evidence-based electricity charge settlement data according to the second confirmation information, the green electricity purchase request and the green electricity sale request, and the second verification collection plug-in comprises the following steps:
after receiving the second confirmation information, the management component extracts the identity information of the first node and the identity information of the second node;
if the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is traversed, respectively filling the green card number in the green electricity purchase request, the electricity charge in the green electricity sale request and the green card generating equipment into the first electricity charge settlement table to obtain electricity charge settlement data;
If the first electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node is not traversed, generating the electricity charge settlement table corresponding to the identity information of the first node and the identity information of the second node, and respectively filling the green card number in the green electricity purchase request, the electricity charge in the green electricity sale request and the green card generating equipment into the electricity charge settlement table to obtain electricity charge settlement data.
10. The blockchain-based electricity fee settlement method of claim 9, further comprising:
the management component determines an acquisition plug-in unit group corresponding to each electric charge settlement data, wherein the acquisition plug-in unit group comprises a first verification acquisition plug-in unit and a second verification acquisition plug-in unit corresponding to the first verification acquisition plug-in unit;
the management component obtains a first generation time of a first verification acquisition plug-in and a first receiving time of receiving first confirmation information, and obtains first processing time consumption according to the first generation time, the first receiving time and the number of upper nodes of a first node;
the management component obtains a second generation time of a second verification acquisition plug-in and a second receiving time of receiving second confirmation information, and obtains second processing time consumption according to the second generation time, the second receiving time and the number of upper nodes of a second node;
The management component obtains fusion processing time consumption according to the first processing time consumption and the second processing time consumption, and if the fusion processing time consumption is higher than the preset processing time consumption, the management component carries out extension adjustment on a first preset time period and a second preset time period according to the fusion processing time consumption and the preset processing time consumption.
11. Block chain-based electricity fee settlement system, which is characterized by comprising the following specific components:
the block generation module is used for generating a first block chain according to a first node corresponding to the green electricity purchaser, generating a second block chain according to a second node corresponding to the green electricity producer, and establishing a trusted cross-chain channel between the first block chain and the second block chain;
the acquisition module is used for acquiring a first level structural relationship of all first nodes in the first block chain and a second level structural relationship of all second nodes in the second block chain, and generating a purchase permission relationship of the trusted cross-chain channel according to the first level structural relationship and the second level structural relationship;
the first strategy generation module is used for enabling the trusted cross-chain channel to generate first verification strategy information corresponding to a first node according to the purchase permission relation after judging that any one first node in the first blockchain uploads a green electricity purchase request;
The sending module is used for enabling the trusted cross-chain channel to send the green electricity purchase request to a corresponding second node in the second block chain after judging that the first verification information uploaded by a third node corresponding to the first node meets the first verification strategy information;
the second policy generation module is used for generating second verification policy information corresponding to the second node according to the purchase permission relationship if the second node sends a green electricity selling request corresponding to the green electricity purchase request to the trusted cross-link channel;
and the feedback updating module is used for enabling the trusted cross-chain channel to generate electricity charge settlement data for the green certificate after judging that the second verification information uploaded by the fourth node corresponding to the second node meets the second verification policy information, and feeding the electricity charge settlement data back to the first block chain and the second block chain respectively so as to enable the first block chain and the second block chain to update the first block account book and the second block account book.
CN202310663484.7A 2023-06-06 2023-06-06 Block chain-based electric charge settlement method and system Active CN116384988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310663484.7A CN116384988B (en) 2023-06-06 2023-06-06 Block chain-based electric charge settlement method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310663484.7A CN116384988B (en) 2023-06-06 2023-06-06 Block chain-based electric charge settlement method and system

Publications (2)

Publication Number Publication Date
CN116384988A true CN116384988A (en) 2023-07-04
CN116384988B CN116384988B (en) 2023-08-18

Family

ID=86979162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310663484.7A Active CN116384988B (en) 2023-06-06 2023-06-06 Block chain-based electric charge settlement method and system

Country Status (1)

Country Link
CN (1) CN116384988B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111489154A (en) * 2019-01-29 2020-08-04 北京天德科技有限公司 Cross-chain transaction method based on multiple signatures
CN112637127A (en) * 2020-11-23 2021-04-09 北京邮电大学 Cross-block-chain communication method and device
CN112712420A (en) * 2021-03-29 2021-04-27 国网电子商务有限公司 Green certificate transaction system based on block chain
KR20210107478A (en) * 2020-02-24 2021-09-01 조선대학교산학협력단 Blockchain-based DC power trading system in public community
CN113554359A (en) * 2021-09-22 2021-10-26 国网区块链科技(北京)有限公司 Green power authentication method, device and system based on block chain
CN113706312A (en) * 2021-09-08 2021-11-26 北京中电普华信息技术有限公司 Photovoltaic electricity transaction method and device based on block chain
CN113947484A (en) * 2021-10-18 2022-01-18 甘肃同兴智能科技发展有限责任公司 Green certificate and carbon right combined transaction system for cross-chain transaction
CN114358766A (en) * 2021-11-24 2022-04-15 远光软件股份有限公司 Method, equipment and blockchain system for trading green electric certificates
CN114401268A (en) * 2021-11-24 2022-04-26 远光软件股份有限公司 Cross-link data sharing method, system, equipment and readable storage medium
CN114663091A (en) * 2022-03-25 2022-06-24 上海电力大学 Power transaction method based on multi-chain block chain architecture

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111489154A (en) * 2019-01-29 2020-08-04 北京天德科技有限公司 Cross-chain transaction method based on multiple signatures
KR20210107478A (en) * 2020-02-24 2021-09-01 조선대학교산학협력단 Blockchain-based DC power trading system in public community
CN112637127A (en) * 2020-11-23 2021-04-09 北京邮电大学 Cross-block-chain communication method and device
CN112712420A (en) * 2021-03-29 2021-04-27 国网电子商务有限公司 Green certificate transaction system based on block chain
CN113706312A (en) * 2021-09-08 2021-11-26 北京中电普华信息技术有限公司 Photovoltaic electricity transaction method and device based on block chain
CN113554359A (en) * 2021-09-22 2021-10-26 国网区块链科技(北京)有限公司 Green power authentication method, device and system based on block chain
WO2023045654A1 (en) * 2021-09-22 2023-03-30 国网区块链科技(北京)有限公司 Blockchain-based green power authentication method, apparatus and system
CN113947484A (en) * 2021-10-18 2022-01-18 甘肃同兴智能科技发展有限责任公司 Green certificate and carbon right combined transaction system for cross-chain transaction
CN114358766A (en) * 2021-11-24 2022-04-15 远光软件股份有限公司 Method, equipment and blockchain system for trading green electric certificates
CN114401268A (en) * 2021-11-24 2022-04-26 远光软件股份有限公司 Cross-link data sharing method, system, equipment and readable storage medium
CN114663091A (en) * 2022-03-25 2022-06-24 上海电力大学 Power transaction method based on multi-chain block chain architecture

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
徐有蕊;范越;董凌;万威;: "区块链在电力交易中的应用", 电力信息与通信技术, no. 06 *
陈爱林;田伟;耿建;杨争林;冯树海;: "跨国电力交易的区块链存证技术", 全球能源互联网, no. 01 *

Also Published As

Publication number Publication date
CN116384988B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN111047318B (en) Transaction record storage method and device and computer equipment
US11469913B2 (en) Data collection server, data utilization server and equipment based on use frequency among a plurality of storage corresponding to different levels of use
CN109274667A (en) A kind of copyright issue based on block chain deposits card method and system
CN112712420B (en) Green certificate transaction system based on block chain
CN111047440A (en) Distributed shared charging pile transaction system and method based on block chain
KR20140033209A (en) Facilitating billing of embedded applications
CN112053152B (en) Distributed energy grid-connected authentication and transaction method based on green rights and interests consensus mechanism
JP2011164900A (en) Green power generating device, portable equipment, electric storage apparatus, and method for managing green power information
CN111178887B (en) Distributed photovoltaic power generation and selling system and method based on block chain
CN111177758A (en) Distributed photovoltaic settlement method and system based on block chain
CN113672637A (en) Block chain-based product supply chain green electricity consumption accounting method, device and platform
US20100306083A1 (en) Systems and methods for the confirmation of download delivery and its use within a clearinghouse service
CN116205293B (en) Data processing method and device based on multi-party green electricity polymerization transaction system
CN112488777A (en) Bill processing method and related device
CN116384988B (en) Block chain-based electric charge settlement method and system
KR100491645B1 (en) Method and System for Automatically Verifying Traded Utility Power
JP7347488B2 (en) Nodes, trading systems, processing methods, and programs
CN110288425B (en) Agricultural product production and marketing butt joint system
US20170169525A1 (en) Systems to electronically catalog and generate documentation for retail-level power
JP7265737B2 (en) RESALE SUPPORT SYSTEM, RESALE SUPPORT DEVICE AND CONTROL METHOD THEREOF, COMPUTER PROGRAM
KR20220037581A (en) Apparatus and method for authenticating power consumption details based on blockchain
CN110648164A (en) Method and device for determining marginal electricity price interval of node
US20230306534A1 (en) Power trading system and power trading method
Dong et al. A distributed integrated energy trading solution
Calvagna et al. Providing Trust in a Dynamic Distributed Energy Production Scenario by means of a Blockchain

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