Distributed power transaction method combined with blockchain
By building an oracle network and using blockchain smart contracts to manage electricity trading, the problems of non-standardized distributed electricity trading processes and easy data tampering have been solved, achieving full-process management and data security for electricity trading.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FUSHUN POWER SUPPLY CO OF STATE GRID LIAONING ELECTRIC POWER CO LTD
- Filing Date
- 2025-09-28
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies suffer from problems such as non-standardized process management in distributed power trading and easy tampering or loss of transaction data, especially in traditional power trading where information asymmetry, high transaction costs, and a lack of reliable traceability exist.
An oracle network is constructed, key power grid nodes are used for physical state proof, and power transactions are managed through blockchain smart contracts. This includes the first transaction stage of guarantee quota storage and secondary chain intention transactions, the second transaction stage of multi-consensus node processing, the generation of transaction execution certificates, and finally storage on the blockchain main chain.
It enables full-process management of distributed power trading, improves the standardization and data security of power trading, and ensures the immutability and traceability of transaction data.
Smart Images

Figure CN121190053B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power trading technology, and more specifically to a distributed power trading method incorporating blockchain. Background Technology
[0002] With the rapid development of the new energy industry, my country's installed capacity of distributed energy sources such as wind power and solar power has achieved a historic breakthrough. However, the inherent intermittency and volatility of these energy sources not only exacerbate the difficulty of real-time grid balancing and the pressure on grid absorption, but also make it difficult for distributed power sources to participate in market transactions on a large scale due to their dispersed projects and unstable operation, resulting in problems such as weak pricing power and large prediction deviations. At the same time, traditional power trading mostly adopts a centralized model, which suffers from drawbacks such as information asymmetry, redundant intermediate links, and high transaction costs. Moreover, transaction data is easily tampered with and lacks reliable traceability, making it difficult to meet the transparency requirements of distributed power trading. In addition, power trading involves complex processes such as physical network status verification, risk assessment of trading parties, and multi-stage settlement. The existing model lacks accurate verification methods for key physical parameters such as grid power flow margin, and fails to achieve secure storage and dynamic traceability of data throughout the entire transaction process, leading to difficulties in ensuring transaction compliance and frequent disputes.
[0003] Existing technologies suffer from technical problems such as non-standard management of distributed power trading processes and the ease with which trading data can be tampered with or lost. Summary of the Invention
[0004] This application provides a distributed power trading method that incorporates blockchain technology to address the technical problems of non-standardized process control and easy tampering or loss of transaction data in existing distributed power trading technologies.
[0005] In view of the above problems, this application provides a distributed power trading method that incorporates blockchain.
[0006] The first aspect of this application provides a distributed electricity trading method incorporating blockchain, the method comprising:
[0007] For the target power network, an oracle network is constructed, with key power grid nodes as the construction targets. Power trading tasks are received, and the first transaction phase is managed according to the smart protocol deployed on the blockchain. This first transaction phase consists of guarantee amount storage based on transaction intention and secondary chain intention trading. The second transaction phase is then managed using power network physical state proof based on the oracle network, settlement from the first transaction phase, and risk proof from the task trading party. This is followed by multi-consensus node processing based on the main blockchain to generate a transaction execution certificate. The power trading tasks are then managed according to the transaction execution certificate, with the transaction data chain stored on the main blockchain.
[0008] A second aspect of this application provides a distributed power trading system incorporating blockchain, the system comprising:
[0009] The oracle network construction module is used to build an oracle network for a target power network, with key power grid nodes as the construction targets. The first transaction phase management module receives power trading tasks and manages the first transaction phase according to the smart protocol deployed on the blockchain. This first transaction phase consists of guarantee amount storage based on trading intention and secondary chain intention trading. The second transaction phase management module manages the second transaction phase by executing multi-consensus node processing based on the main blockchain, using power network physical state proof based on the oracle network, settlement from the first transaction phase, and risk proof from the task trading party. The transaction task management module manages the power trading tasks according to the transaction execution certificate, including storing the transaction data chain on the main blockchain.
[0010] A third aspect of this application provides an electronic device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the distributed power trading method incorporating blockchain provided in this application.
[0011] A fourth aspect of this application provides a computer-readable storage medium storing a computer program for executing the distributed power trading method combined with blockchain provided in this application.
[0012] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0013] For a target power network, an oracle network is constructed, with key power grid nodes as the construction targets. It receives power trading tasks and manages the first trading phase according to a smart protocol deployed on the blockchain. Then, using power network physical state proof based on the oracle network and risk proof from the first trading phase settlement and task trading parties, it executes multi-consensus node processing based on the blockchain main chain to generate a transaction execution certificate for the second trading phase management. Finally, it manages the power trading tasks based on the transaction execution certificate. This achieves the technical effect of realizing full-process management of distributed power trading, improving the standardization of the power trading process and data security. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram of a distributed power trading method incorporating blockchain, provided as an embodiment of this application.
[0016] Figure 2 This is a schematic diagram of a distributed power trading system structure incorporating blockchain, provided as an embodiment of this application.
[0017] Figure 3 This is a schematic diagram of the structure of an electronic device provided in this application.
[0018] Figure labeling: Oracle network construction module 10, first transaction phase management module 20, second transaction phase management module 30, transaction task management module 40. Detailed Implementation
[0019] This application provides a distributed power trading method that incorporates blockchain technology to address the technical problems of non-standardized process control and easy tampering or loss of transaction data in existing distributed power trading technologies.
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0021] Example 1, as Figure 1 As shown, this application provides a distributed power trading method incorporating blockchain, the method comprising:
[0022] Step S100: For the target power network, construct an oracle network, with key power grid nodes as the construction targets.
[0023] Specifically, the key grid nodes in the target power network are first identified and used as oracle network nodes. Then, physical state proofs are set with key physical parameters, including at least the power flow direction, power magnitude, and voltage frequency, as the oracle guide. Finally, based on the determined oracle network nodes and physical state proofs, the construction of the oracle network is completed. This network can be used to provide off-chain state proofs of key physical parameters for power trading-related stages. For example, when generating the first zero-knowledge proof, the corresponding target oracle node can be activated by matching key grid nodes. The target oracle node reads the node physical state under the key physical parameters and determines the node proof, thereby integrating to form the first zero-knowledge proof.
[0024] Step S200: Receive electricity trading tasks and manage the first transaction stage according to the smart protocol deployed on the blockchain. The first transaction stage consists of the guarantee amount notarization based on the transaction intention and the secondary chain intention transaction.
[0025] Specifically, when receiving electricity trading tasks, since the main chain of the blockchain is deployed with smart contracts containing a first protocol part based on micro-distribution of trading intentions and a second protocol part based on oracle network proof and settlement of trading intentions, this stage will carry out the first trading phase management according to the first protocol part in the smart contract. The core of this stage is the guarantee amount notarization based on trading intentions and the secondary chain intention trading. In specific operation, the electricity trading task is first read, the trading intention is determined according to the first protocol part, and the guarantee amount notarization is completed on the secondary chain of the blockchain. After notarization is completed, the secondary chain of the blockchain executes high-frequency, micro-amount instantaneous trading based on the guarantee amount, thereby realizing the effective management of the first trading phase and laying the foundation for the settlement and on-chain notarization of secondary chain intention trading in the subsequent second trading phase.
[0026] Step S300: Using the physical state proof of the power network based on the oracle network, and the risk proof of the first transaction stage settlement and task transaction party, execute the multi-consensus node processing based on the blockchain main chain to generate transaction execution certificates and conduct the second transaction stage management.
[0027] Specifically, as the second phase of transaction management, it relies on the physical state proof of the power network based on the oracle network, the settlement results of the first phase of the transaction, and the risk proof of the transaction party as the core basis. It operates through the second protocol part of the smart contract deployed on the blockchain main chain, which is based on oracle network proof and transaction intention settlement. After the second protocol part is triggered, on the one hand, based on the power network part corresponding to the transaction party, the oracle network is used to perform off-chain state proof of key physical parameters, such as power flow direction, power magnitude, voltage frequency, etc., to generate the first zero-knowledge proof. Specifically, this involves locating the local power network of the transaction party, matching key grid nodes, and activating the target oracle node. Each target oracle node reads the physical state of the node to determine the node proof and integrates it. At the same time, through the intermediate state channel between the secondary chain and the main chain, the secondary chain's intended transaction in the first transaction phase is settled to the main chain for notarization. It also reads the time zone accumulation record of the transacting parties to generate a second zero-knowledge proof. All three items are submitted to the main chain for notarization. Afterwards, the blockchain main chain encapsulates the transaction proof based on the first zero-knowledge proof, the second zero-knowledge proof, and the settlement result of the intended transaction. It locates the task consensus node of the main chain and distributes the transaction proof to each node for parallel processing to obtain the node processing data. Finally, it integrates the processing data of all nodes to generate a transaction execution certificate, thereby completing the management of the second transaction phase.
[0028] Step S400: Manage the power trading task according to the transaction execution certificate, wherein the transaction data chain is stored on the main chain of the blockchain.
[0029] Specifically, firstly, with the issuance of the transaction execution certificate, the transaction response status of the power trading task is tracked in real time, key information in the transaction process is recorded, and a complete transaction data chain is formed. Then, in accordance with blockchain storage specifications, the transaction data chain is uploaded to the blockchain main chain for on-chain storage. The decentralized and tamper-proof characteristics of the main chain ensure the security and traceability of the transaction data. At the same time, based on the latest transaction dynamics reflected in the on-chain transaction data chain, the second zero-knowledge proof generated locally by the trading party, namely the risk proof of the task trading party, is updated synchronously to ensure that the risk status of the trading party can match the actual transaction situation in real time. This achieves closed-loop management of the entire power trading task process and provides accurate data support for subsequent possible transaction traceability or risk assessment.
[0030] In one possible implementation, step S100 further includes:
[0031] Step S110: Identify the key power grid nodes of the target power network and make them predictive network nodes.
[0032] Step S120: Using key physical parameters as the prediction guide, set up physical state proof, wherein the key physical parameters include at least power flow direction, power magnitude, and voltage frequency.
[0033] Step S130: Construct the oracle network based on the oracle network nodes and the physical state proof.
[0034] Specifically, the foundational preparatory steps for building an oracle network revolve around key grid nodes of the target power network. First, based on the overall architecture and operational functions of the target power network where distributed power trading is to be conducted, grid nodes that play a core supporting role in power transmission efficiency, trading stability, and physical state monitoring are selected and identified. These nodes are typically hubs for power flow convergence and distribution, nodes containing critical equipment, or nodes where important users access the network. After accurately identifying these key grid nodes, they are directly designated as oracle network nodes, becoming the core hardware carrier for the oracle network to obtain power network physical state data and generate physical state proofs. This establishes the initial node foundation for the oracle network to connect the power network's physical layer with the blockchain's digital layer.
[0035] This paper explicitly uses key physical parameters that directly affect the feasibility and security of electricity transactions as the core basis for setting physical state proofs. These key physical parameters are clearly defined to include at least three core indicators: power flow direction, power magnitude, and voltage frequency. Power flow direction determines the transmission path of electrical energy in the target power network and is the basis for judging whether the power transmission link between the trading parties is unobstructed. Power magnitude directly relates to the matching degree between the volume of electricity being traded and the current carrying capacity of the power grid, avoiding grid operation risks caused by power overload. Voltage frequency is a core benchmark for measuring the stability of power grid operation; whether its values are within the normal range directly affects the power supply quality and grid safety during electricity transactions. Based on this, and combined with the operating characteristics of the target power network and the trading requirements, the collection standards, verification logic, and threshold ranges of the above-mentioned key physical parameters are integrated into the setting of the physical state proof, forming a quantifiable and verifiable physical state proof system. This ensures that the subsequent oracle network can accurately obtain and verify the physical state of the power grid according to this standard, providing reliable off-chain physical data support for blockchain electricity transactions.
[0036] The core functional positioning of oracle network nodes is clearly defined, namely, assigning the responsibility of collecting and verifying physical state data to designated key power grid nodes. These nodes must read key physical parameters such as power flow direction, power magnitude, and voltage frequency in real time, according to the standards defined in the physical state proof, such as the collection range and accuracy requirements of key physical parameters. They must also perform preliminary verification of the collected data to ensure it meets the validity requirements of the physical state proof. Subsequently, by establishing a data collaboration and information transmission mechanism between nodes, the logical rules of each oracle network node and the physical state proof are systematically integrated, forming a complete link of node collection – data verification – proof generation. This enables oracle network nodes to transform compliant physical state data into standardized proof information recognizable by the blockchain, ultimately constructing an oracle network capable of connecting the physical layer of the power grid and the digital layer of the blockchain.
[0037] In one possible implementation, step S200 further includes:
[0038] Step S210: The main chain of the blockchain is deployed with smart contracts, wherein the smart contracts include a first protocol part based on micro-distribution of transaction intentions and a second protocol part based on oracle network proof and transaction intention settlement.
[0039] Specifically, the deployment of smart contracts on the main blockchain ensures that the contracts possess the characteristics of immutability and automatic execution to meet the trust requirements of distributed power trading. Simultaneously, the core components of the smart contract are defined as two main protocol parts: The first part is a protocol based on the micro-distribution of transaction intentions. This part is mainly used in the first transaction stage, providing rules for confirming the transaction intentions of both parties and ensuring the micro-value notarization of the guaranteed amount, thus ensuring the standardization and automation of transaction intention-related operations. The second part is a protocol based on oracle network proofs and transaction intention settlement. This part serves the second transaction stage, specifying the verification and notarization rules of the power network physical state proof generated by the oracle network in the main blockchain, such as the first zero-knowledge proof. It also clarifies the settlement logic and process of secondary chain intention transactions in the first transaction stage, providing protocol support for the migration of secondary chain transaction data to the main chain and the generation and verification of risk proofs for the transacting parties, such as the second zero-knowledge proof. Through the synergy of these two protocol parts, the smart contract can comprehensively cover the entire process of power trading from intention confirmation to execution and settlement, ensuring the compliance and efficiency of each stage of the transaction.
[0040] In one possible implementation, step S200 further includes:
[0041] Step S220: Read the power trading task, determine the trading intention according to the first protocol part, and store the guarantee amount on the secondary chain of the blockchain.
[0042] Step S230: The secondary chain of the blockchain executes high-frequency, micro-amount instantaneous transactions based on the guaranteed amount.
[0043] Specifically, the system reads the received electricity trading task, obtaining key information such as the identities of both parties, the trading volume, the trading time period, and the trading price. Then, based on the first agreement section of the smart contract regarding micro-distribution of trading intentions, it matches and verifies the needs of both parties, clarifying whether they have reached an agreement on the core terms of the transaction, thereby confirming a valid trading intention. To ensure transaction performance and reduce default risk, after the trading intention is confirmed, both parties are guided to complete the guarantee amount notarization operation on a secondary blockchain according to the amount standards and notarization process stipulated in the first agreement section. The lightweight nature of the secondary blockchain ensures that the notarization process is efficient and does not consume main chain resources. Simultaneously, the notarized records have immutable attributes, providing a trust foundation for subsequent transaction execution.
[0044] The secondary blockchain will execute high-frequency, micro-amount instantaneous transactions based on the already stored guarantee amount and the real-time, small-amount electricity demand that may exist in electricity trading. The secondary blockchain will automatically match the qualified transaction requests according to the preset transaction trigger conditions and amount limits, and quickly complete the transaction order generation, amount transfer record and other operations. It can not only meet the transaction needs of multiple parties and high frequency in distributed electricity trading, but also ensure the security and traceability of transaction data through the collaboration mechanism with the main chain, and prepare data for the secondary blockchain transaction settlement and main chain on-chain notarization in the subsequent second transaction stage.
[0045] In one possible implementation, step S300 further includes:
[0046] Step S310: According to the second protocol section, the settlement of the intended transaction based on the first zero-knowledge proof based on the oracle network, the second zero-knowledge proof based on the risk of the transacting parties, and the settlement of the intention transaction based on the secondary blockchain are stored on the main blockchain.
[0047] Step S320: Through multi-node consensus on the main chain, generate a transaction execution certificate based on the consensus results of the first zero-knowledge proof, the second zero-knowledge proof, and the settlement of the intended transaction.
[0048] Specifically, for the first zero-knowledge proof based on the oracle network, the trading parties in the power trading task are first read, including at least the first and second trading parties. The local power networks corresponding to each trading party are located in the target power network. The target oracle nodes in the oracle network are activated by matching key power grid nodes. Each target oracle node reads the node physical state under key physical parameters such as power flow direction, power magnitude, voltage frequency, etc., and determines the node proof. After integrating these node proofs to form the first zero-knowledge proof, it is submitted to the main blockchain for on-chain storage. Next, the second zero-knowledge proof based on the trading party's risk is processed. According to the triggering instructions in the second protocol, the time zone accumulation record of the trading party is read, and the second zero-knowledge proof is generated based on this. It is also submitted to the main blockchain for on-chain storage. Finally, for the settlement of intended transactions based on the secondary blockchain, the high-frequency and micro-amount instantaneous transactions based on the guaranteed amount are settled by using the intermediate state channel between the secondary blockchain and the main blockchain. After the settlement is completed, the results are migrated to the main blockchain to realize the on-chain storage of intended transaction settlement information, ensuring that all three types of information form an immutable record in the main blockchain.
[0049] Based on the first and second zero-knowledge proofs stored on the blockchain and the settlement data of the intended transaction, a transaction execution certificate is generated through multi-consensus nodes on the main blockchain. First, the main blockchain integrates the first and second zero-knowledge proofs and the settlement data of the intended transaction, encapsulating them into a complete transaction proof. Then, the task consensus node responsible for the power transaction task is located on the main chain, and the encapsulated transaction proof is distributed to each task consensus node. Each node performs parallel verification and processing of the authenticity and compliance of the data in the transaction proof according to preset consensus rules. During this process, each node independently generates node processing data. After all task consensus nodes have completed processing, the node processing data generated by each node is comprehensively analyzed. If the processing results of all nodes reach a consensus, a transaction execution certificate containing key content such as information of both parties to the transaction, transaction parameters, and verification results is generated based on this consensus result, providing a core basis for the management and execution of subsequent power transaction tasks.
[0050] In one possible implementation, step S310 further includes:
[0051] Step S311: Upon triggering of the second protocol portion, based on the power network portion of the transacting party, the state proof of key physical parameters is performed off-chain using the oracle network, generating a first zero-knowledge proof, which is then submitted to the main chain of the blockchain for on-chain storage.
[0052] Specifically, after the second protocol is triggered, the core process involves relying on the oracle network to complete the off-chain state proof of key physical parameters and generate the first zero-knowledge proof, ultimately achieving on-chain notarization on the main chain. First, the trading parties in the current power trading task are identified, including at least the first and second trading parties, and the local power networks directly associated with each trading party are precisely located within the target power network. Next, through matching key grid nodes, target oracle nodes corresponding to these local power networks are activated from the constructed oracle network. Then, each target oracle node performs a node physical state reading operation for key physical parameters, including at least power flow direction, power magnitude, and voltage frequency, determining its corresponding node proof based on the read parameter data. Then, the node proofs generated by all target oracle nodes are integrated to form the first zero-knowledge proof that fully reflects the physical state of the corresponding power network for each trading party. Finally, according to the blockchain main chain's data interaction specifications, the generated first zero-knowledge proof is submitted to the blockchain main chain to complete the on-chain notarization operation, ensuring that the proof information has the characteristics of being immutable and traceable on the main chain, providing a true and valid basis for the physical state of the power network for the subsequent generation of transaction execution credentials.
[0053] In one possible implementation, step S310 further includes:
[0054] Step S312: Upon triggering of the second protocol section, the executed secondary chain intention transaction is settled to the main chain of the blockchain according to the intermediate state channel between the secondary chain and the main chain of the blockchain, and the on-chain evidence is stored.
[0055] Specifically, the process begins by leveraging the established intermediate state channel between the secondary and main blockchains. This channel serves as a dedicated data interaction link connecting the secondary and main chains, ensuring the security and efficiency of data transmission. Next, it reads high-frequency, micro-amount instantaneous transaction data executed by the secondary blockchain during the first transaction phase, based on guaranteed limits. This data includes key intention transaction information such as the identities of the transacting parties, transaction amounts, transaction times, and electricity transmission volumes. Following this, the secondary chain's intention transaction data undergoes standardized processing and compliance verification according to the settlement rules set in the second protocol section, ensuring that the data format meets the main chain's storage requirements and that the transaction logic is correct. After settlement, the processed secondary chain intention transaction data is transmitted to the main blockchain via the intermediate state channel. Finally, the on-chain notarization of this batch of transaction data is completed on the main chain. Utilizing the decentralized and immutable characteristics of the main chain, the integrity and traceability of the secondary chain's intention transaction data are ensured, providing accurate transaction settlement basis for subsequent multi-node consensus and transaction execution certificate generation on the main chain.
[0056] In one possible implementation, step S310 further includes:
[0057] Step S313: Based on the trigger of the second protocol section, read the time zone accumulation record of the transacting party, generate the second zero-knowledge proof, and submit it to the main chain of the blockchain for on-chain storage.
[0058] Specifically, according to the triggering instructions in the second part of the protocol, all trading parties in the current power trading task are located, including at least the first and second trading parties. Then, according to the time zone division rules set in the protocol, such as by calendar day, peak electricity consumption period, or other preset time zone units, the historical transaction data of each trading party within the corresponding time zone range is read. This data covers key information such as the performance of past transactions, guarantee quota usage records, and transaction anomaly feedback, which together constitute the trading party's time zone cumulative record. Subsequently, based on the risk proof algorithm built into the second part of the protocol, the read time zone cumulative record is processed and risk features are extracted to generate a second zero-knowledge proof that can prove the credit risk status of the trading party without disclosing specific historical transaction details. Finally, in accordance with the data submission specifications of the blockchain main chain, the generated second zero-knowledge proof is uploaded to the main chain and stored on the chain. The immutability of the main chain ensures the authenticity and validity of the risk proof, providing a reliable basis for the risk assessment of the trading party for subsequent multi-node consensus verification of the main chain and the generation of transaction execution certificates.
[0059] In one possible implementation, step S311 further includes:
[0060] Step S3111: Read the trading parties of the power trading task, wherein the trading parties include at least a first trading party and a second trading party.
[0061] Step S3112: In the target power network, locate the local power network based on the trading parties, and activate the target oracle node based on the oracle network through matching based on key power grid nodes.
[0062] Step S3113: Generate the first zero-knowledge proof based on the target oracle node.
[0063] Specifically, the process begins by reading the complete information contained in the received power trading task and extracting key information related to the trading participants from the task data, such as the identity of the transaction initiator and the transaction recipient, and the node information connected to the target power network. According to the design requirements of this power trading method, the trading parties in this transaction are clearly defined to include at least a first trading party and a second trading party. These two parties typically correspond to the power seller and the power buyer, respectively. For example, a distributed photovoltaic power station is the first trading party, and residential or industrial and commercial users are the second trading party. By determining the specific identities and associated information of the trading parties, it is ensured that subsequent operations such as local power network positioning and physical parameter collection for the trading parties can accurately correspond to the actual participating entities, laying the foundation for generating a first zero-knowledge proof that reflects the physical state of the real trading scenario.
[0064] In defining the trading parties in the power transaction task, which includes at least a first trading party and a second trading party, the first step is to accurately locate the local power network directly associated with these trading parties within the overall architecture of the target power network. This local power network is the core network scope that directly affects the physical feasibility and security of this power transaction, encompassing the lines connecting the trading parties to the grid and surrounding supporting power transmission and distribution facilities. Next, key grid nodes within this local power network are extracted. These nodes, previously identified during the construction of the oracle network, play a crucial role in monitoring the physical state of the power grid. By matching the extracted key grid nodes of the local power network with the pre-defined oracle network nodes, oracle network nodes that can cover the local power network and possess the capability to collect key physical parameters are selected. These successfully matched nodes are activated as target oracle nodes, providing precise node support for subsequent reading of key physical parameters and generation of the first zero-knowledge proof, ensuring that the collected physical state data directly reflects the network operation status corresponding to this power transaction.
[0065] After activating the target oracle nodes, each node reads key physical parameters of the local power network within its coverage area in real time according to preset collection rules. These parameters include at least power flow direction, power magnitude, and voltage frequency. These parameters are the core basis for determining whether a power transaction is physically feasible and can be executed safely. Taking a scenario where party A sells 10MW of electricity to party B as an example, the target oracle nodes will focus on collecting the real-time power flow margin of the lines connecting A and B. If the power flow margin is greater than 10MW, it indicates that the lines have the capacity to carry the electricity in this transaction, meeting the physical prerequisites for the transaction. If the power flow margin is insufficient, it indicates that the current physical conditions cannot support the transaction, and the transaction plan needs to be suspended or adjusted. After completing the reading of key physical parameters, each target oracle node determines its corresponding node proof based on the parameter data. Then, all node proofs are integrated and verified to ensure data consistency and compliance with the standards of physical state proofs. Finally, they are integrated to form a first zero-knowledge proof that can prove the physical feasibility and safe execution conditions of the power transaction. This proof accurately reflects the actual physical state of the power network without revealing redundant network operation details, preparing for subsequent submission to the blockchain main chain for on-chain notarization.
[0066] In one possible implementation, step S311 further includes:
[0067] Each target oracle node performs a node physical state reading under key physical parameters to determine the node proof.
[0068] The node proof is integrated and used as the first zero-knowledge proof, then submitted to the main chain of the blockchain for on-chain storage.
[0069] Specifically, in the distributed power trading method combined with blockchain, each target oracle node focuses on key physical parameters to read the node's physical state and determine the node's proof, based on a preset physical state proof standard. These key physical parameters include at least power flow direction, power magnitude, and voltage frequency, which are the core basis for judging the physical state of the power network and ensuring the feasibility of the transaction. Each target oracle node collects power flow direction data in real time for the grid nodes within its coverage area to clarify the power transmission path, reads power magnitude to understand the node's power carrying capacity and transmission volume, and monitors voltage frequency to confirm the stability of the grid operation. Subsequently, each target oracle node compares and verifies the collected parameter data with preset normal thresholds and transaction requirement standards. If the data meets the requirements, a node proof is generated that can independently prove the compliance and authenticity of the node's physical state, ensuring that each node proof accurately reflects the actual operation of the corresponding grid node, laying the foundation for subsequent integration to form the first zero-knowledge proof.
[0070] After generating node proofs for each target oracle node, the node proof integration process is initiated. First, consistency verification is performed on all node proofs output by the target oracle nodes. This verifies the consistency of records regarding the same key physical parameters, such as power flow direction, power magnitude, and voltage frequency, across different node proofs. Invalid node proofs with data contradictions or anomalies are eliminated, ensuring that the retained node proofs accurately reflect the physical state of the corresponding power grid nodes. Subsequently, according to pre-defined integration rules, all valid node proofs that have passed verification are aggregated and integrated to form a proof document that comprehensively covers the relevant local power network and fully presents the overall physical state. This document is designated as the first zero-knowledge proof, containing both the verification results of key physical parameters for each node and avoiding the leakage of redundant network operation details. Finally, in accordance with the blockchain main chain's data interaction protocol and secure transmission standards, the integrated first zero-knowledge proof is submitted to the blockchain main chain, triggering the main chain's on-chain notarization process. This ensures that the proof forms an immutable and traceable record on the main chain, providing a reliable physical state basis for the consensus verification and transaction execution certificate generation in the subsequent second transaction stage.
[0071] In one possible implementation, step S300 further includes:
[0072] Step S330: The main chain of the blockchain encapsulates the transaction proof based on the first zero-knowledge proof, the second zero-knowledge proof, and the intended transaction settlement.
[0073] Step S340: Locate the task consensus nodes of the main chain, distribute and process the transaction proofs in parallel across task consensus nodes, and determine the data to be processed by each node.
[0074] Step S350: Generate the transaction execution certificate by integrating the data processed by the nodes.
[0075] Specifically, the main blockchain retrieves previously stored first and second zero-knowledge proofs, along with intended transaction settlement data from the secondary blockchain, from its on-chain storage. The first zero-knowledge proof originates from an oracle network's verification of the physical state of the power grid, including compliance proofs of key physical parameters such as power flow direction, power output, and voltage frequency. The second zero-knowledge proof is generated based on the transaction parties' accumulated time zone records, reflecting their credit risk level. The intended transaction settlement data is settled through a central state channel between the secondary and main chains, recording the summary results of high-frequency, micro-amount instantaneous transactions on the secondary chain during the first transaction phase. Subsequently, the main chain, following pre-defined encapsulation rules and data format standards, structurally integrates these three types of data, removing redundant information and ensuring data logical consistency. This results in a complete transaction proof covering transaction physical feasibility verification, transaction party risk assessment, and transaction settlement details. This proof fully supports subsequent multi-node consensus verification and meets the data storage and interaction requirements of the main blockchain, laying the foundation for generating transaction execution certificates.
[0076] Based on the node management rules of the blockchain main chain and the specific attributes of the power trading task, the task consensus nodes responsible for verifying the consensus of this transaction are precisely located among the distributed nodes of the main chain. These nodes must complete identity authentication and permission configuration in advance to ensure that they have the qualifications and capabilities to process power trading-related data. Next, through the secure data transmission mechanism built into the main chain, the previously packaged transaction proof is synchronously distributed to each located task consensus node. During the distribution process, the integrity and security of data transmission must be ensured to prevent the transaction proof from being tampered with or lost during transmission. Subsequently, each task consensus node initiates a parallel processing flow, independently verifying the first zero-knowledge proof, the second zero-knowledge proof, and the intended transaction settlement data contained in the transaction proof according to a unified verification standard. Specifically, this includes verifying whether the key physical parameters of the power network corresponding to the first zero-knowledge proof meet the security standards, checking whether the second zero-knowledge proof is consistent with the time zone cumulative records of the trading parties, and checking whether the intended transaction settlement data matches the settlement results of the secondary chain. After completing their respective verification processing, each task consensus node generates a processing result containing the verification conclusion, key data verification details, and node identity identifier. This result is the node processing data, which prepares for the subsequent generation of transaction execution certificates by integrating the data from various nodes.
[0077] The system collects node processing data submitted by all task consensus nodes from the node data interaction module of the main chain. This data includes each node's verification conclusion on the transaction proof, key parameter verification logs, and node signature information. Subsequently, according to the preset consensus result judgment rules, the collected node processing data is subjected to consistency verification, and the percentage of each node's verification conclusion (pass / fail) is counted. If the number of nodes with a "pass" conclusion reaches a preset consensus threshold, such as exceeding two-thirds of the total number of nodes, the transaction proof is determined to have passed multi-node consensus. If the threshold is not reached, the transaction proof data needs to be backtracked for verification or the nodes need to be required to reprocess until a valid consensus is reached. After the consensus is confirmed, key information consistent with each node's data is extracted, such as the physical compliance conclusion of the first zero-knowledge proof, the risk assessment result of the second zero-knowledge proof, and the final amount of the intended transaction settlement. In accordance with the certificate format stipulated by the main chain smart contract, a transaction execution certificate is generated, which includes the identity information of both parties to the transaction, the transaction electricity and price, the physical status verification result, the risk level, the settlement details, and the signature of the main chain consensus node. This certificate will serve as the core basis for the subsequent implementation of power trading tasks and the on-chain data, ensuring the compliance and traceability of the transaction process.
[0078] In one possible implementation, step S400 further includes:
[0079] Step S410: Following the issuance of the transaction execution certificate, track the transaction response of the power transaction task and determine the transaction data chain.
[0080] Step S420: Store the transaction data chain on the chain and update the second zero-knowledge proof generated locally by the transacting party based on the transaction data chain.
[0081] Specifically, firstly, relying on the credential issuance and notification mechanism of the blockchain main chain, once the transaction execution credential is issued to the trading party and the associated power grid monitoring nodes through the main chain smart contract, a pre-set transaction response tracking program is triggered. This program, by connecting to real-time monitoring devices in the target power network, such as smart meters, line power sensors, voltage and frequency monitoring terminals, and the trading party's performance feedback interface, acquires key data at a second-level collection frequency. This includes feedback signals indicating whether the trading party has confirmed receipt of the credential, the real-time power flow direction and power value of the transmission lines (i.e., matching the power transmission requirements agreed upon in the transaction), the actual power generation / consumption recorded by the smart meters, and the status information of the bank or payment platform where the transaction funds were transferred. Simultaneously, using timestamps and transaction stage tags, such as "credential received," "power transmission started," "power metering completed," and "settlement completed," the collected scattered response data is structured, classified, and sequentially arranged, outliers such as invalid data generated by momentary sensor malfunctions are removed, and data integrity is verified through a hash algorithm. Ultimately, the verified and orchestrated end-to-end response data is linked together into a logically coherent and data-complete transaction data chain, ensuring that each piece of data in the chain corresponds to a specific stage of transaction execution, providing a standardized data source for subsequent on-chain storage and risk proof updates.
[0082] Following the blockchain main chain's on-chain data specifications, the determined transaction data chain undergoes format standardization processing to ensure that the transaction response information contained in the data chain, such as power transmission parameters, metering results, and settlement status, conforms to the main chain's storage structure requirements. Subsequently, the processed transaction data chain is uploaded to the blockchain main chain through the main chain's secure data submission interface, triggering the main chain's block packaging and consensus verification process. Leveraging the main chain's decentralized and tamper-proof characteristics, the on-chain storage of the transaction data chain is completed, ensuring data traceability and preventing malicious tampering. Simultaneously, key performance information of the transacting parties in this transaction is extracted from the on-chain transaction data chain, such as whether the power transaction was completed on time, the actual transaction deviation rate, and settlement timeliness. This latest information is integrated with the transacting parties' previous accumulated time zone records, and the risk assessment result is recalculated according to the generation rules of the second zero-knowledge proof. This recalculates the transacting parties' original local second zero-knowledge proof, ensuring that the transacting parties' risk proofs reflect their latest transaction performance in real time, providing an accurate basis for risk verification in subsequent power transactions.
[0083] Example 2, based on the same inventive concept as the distributed power trading method incorporating blockchain in the foregoing examples, such as... Figure 2 As shown, this application provides a distributed power trading system incorporating blockchain. The system and method embodiments in this application are based on the same inventive concept. The system includes:
[0084] Oracle network construction module 10 is used to build an oracle network for a target power grid network, with key power grid nodes as the construction targets.
[0085] The first transaction stage management module 20 is used to receive electricity trading tasks and manage the first transaction stage according to the smart protocol deployed on the blockchain. The first transaction stage consists of the guarantee amount notarization based on the transaction intention and the secondary chain intention transaction.
[0086] The second transaction phase management module 30 is used to perform multi-consensus node processing based on the blockchain main chain, generate transaction execution certificates, and manage the second transaction phase by using the power network physical state proof based on the oracle network and the risk proof of the first transaction phase settlement and task transaction parties.
[0087] The transaction task management module 40 is used to manage the power transaction task according to the transaction execution certificate, wherein the transaction data chain is stored on the main chain of the blockchain.
[0088] Furthermore, the system is also used to implement the following functions:
[0089] The key power grid nodes of the target power network are identified and designated as oracle network nodes; physical state proofs are set based on key physical parameters as oracle guides, wherein the key physical parameters include at least power flow direction, power magnitude, and voltage frequency; the oracle network is constructed based on the oracle network nodes and the physical state proofs.
[0090] Furthermore, the system is also used to implement the following functions:
[0091] The main chain of the blockchain is deployed with smart contracts, which include a first protocol part based on micro-distribution of transaction intentions and a second protocol part based on oracle network proof and transaction intention settlement.
[0092] Furthermore, the system is also used to implement the following functions:
[0093] The power trading task is read, and the trading intention is determined according to the first protocol section. The guarantee amount is stored on the secondary chain of the blockchain. The secondary chain of the blockchain executes high-frequency, micro-amount instantaneous transactions based on the guarantee amount.
[0094] Furthermore, the system is also used to implement the following functions:
[0095] According to the second protocol, a first zero-knowledge proof based on an oracle network, a second zero-knowledge proof based on the risk of the transacting parties, and an intention transaction settlement based on a secondary blockchain are stored on the main blockchain. Through multi-node consensus on the main blockchain, a transaction execution certificate is generated based on the consensus result of the first zero-knowledge proof, the second zero-knowledge proof, and the intention transaction settlement.
[0096] Furthermore, the system is also used to implement the following functions:
[0097] Upon triggering of the second protocol section, based on the power network portion of the transacting party, the state proof of key physical parameters is performed off-chain using the oracle network, generating a first zero-knowledge proof, which is then submitted to the main chain of the blockchain for on-chain storage.
[0098] Furthermore, the system is also used to implement the following functions:
[0099] Upon triggering of the second protocol section, the executed secondary chain intention transaction is settled to the main chain of the blockchain according to the intermediate state channel between the secondary chain and the main chain of the blockchain, and then stored on the chain for evidence preservation.
[0100] Furthermore, the system is also used to implement the following functions:
[0101] Triggered according to the second part of the protocol, the time zone accumulation record of the transacting parties is read, a second zero-knowledge proof is generated, and submitted to the main chain of the blockchain for on-chain storage.
[0102] Furthermore, the system is also used to implement the following functions:
[0103] The parties to the power trading task are read, wherein the parties include at least a first party and a second party; in the target power network, the local power network based on the parties is located, and the target oracle node based on the oracle network is activated by matching based on key power grid nodes; the first zero-knowledge proof is generated based on the target oracle node.
[0104] Furthermore, the system is also used to implement the following functions:
[0105] Each target oracle node performs a node physical state reading under key physical parameters to determine the node proof; the node proof is integrated and used as the first zero-knowledge proof, and submitted to the main chain of the blockchain for on-chain storage.
[0106] Furthermore, the system is also used to implement the following functions:
[0107] The main chain of the blockchain encapsulates a transaction proof based on the first zero-knowledge proof, the second zero-knowledge proof, and the intended transaction settlement; it locates the task consensus nodes of the main chain, distributes and processes the transaction proof in parallel across the task consensus nodes, and determines the data processed by each node; and it generates the transaction execution certificate by integrating the data processed by the nodes.
[0108] Furthermore, the system is also used to implement the following functions:
[0109] With the issuance of the transaction execution certificate, the transaction response of the power transaction task is tracked to determine the transaction data chain; the transaction data chain is stored on the chain, and the second zero-knowledge proof generated locally by the transacting party is updated based on the transaction data chain.
[0110] Example 3, Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention, showing a block diagram of an exemplary electronic device suitable for implementing the embodiments of the present invention. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the present invention. Figure 3 As shown, the electronic device includes a processor 21, a memory 22, an input device 23, and an output device 24; the number of processors 21 in the electronic device can be one or more. Figure 3 Taking a processor 21 as an example, the processor 21, memory 22, input device 23, and output device 24 in an electronic device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.
[0111] In embodiment four, the memory 22, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the blockchain-integrated distributed power trading method in this application embodiment. The processor 21 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 22, thereby realizing the aforementioned blockchain-integrated distributed power trading method.
[0112] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.
[0113] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0114] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and modifications fall within the scope of this application and its equivalents, this application intends to include such modifications and modifications.
Claims
1. A distributed power trading method incorporating blockchain, characterized in that: The method includes: For the target power network, an oracle network is constructed, with key power grid nodes as the construction targets; Receive electricity trading tasks and manage the first trading phase according to the smart protocol deployed on the blockchain. The first trading phase consists of the guarantee amount notarization based on the trading intention and the secondary chain intention trading. The system uses the physical state proof of the power network based on the oracle network, the settlement of the first transaction stage and the risk proof of the task transaction party, to execute the multi-consensus node processing based on the blockchain main chain, generate transaction execution certificates, and manage the second transaction stage. The power trading task is managed according to the transaction execution certificate, wherein the transaction data chain is stored on the main chain of the blockchain. The main chain of the blockchain is deployed with smart contracts, wherein the smart contracts include a first protocol part based on micro-distribution of transaction intentions and a second protocol part based on oracle network proof and transaction intention settlement. The second phase of the transaction includes: According to the second protocol section, the settlement of the intended transaction is based on the first zero-knowledge proof based on the oracle network, the second zero-knowledge proof based on the risk of the transacting party, and the blockchain secondary chain, and the evidence is stored on the blockchain main chain. Through multi-node consensus on the main chain, a transaction execution certificate is generated based on the consensus results of the first zero-knowledge proof, the second zero-knowledge proof, and the settlement of intended transactions. Upon triggering of the second protocol section, based on the power network section of the transacting party, the state proof of key physical parameters off-chain is performed based on the oracle network, generating the first zero-knowledge proof, which is then submitted to the main chain of the blockchain for on-chain storage. Upon triggering of the second protocol section, the executed secondary chain intention transaction is settled to the main chain of the blockchain according to the intermediate state channel between the secondary chain and the main chain of the blockchain, and then stored on the chain for evidence preservation.
2. The distributed power trading method combined with blockchain as described in claim 1, characterized in that, Building an oracle network includes: Identify the key power grid nodes of the target power network and use them as oracle network nodes; Using key physical parameters as the predictive guide, a physical state proof is set, wherein the key physical parameters include at least the power flow direction, power magnitude, and voltage frequency; The oracle network is constructed based on the oracle network nodes and the physical state proof.
3. The distributed power trading method combined with blockchain as described in claim 1, characterized in that, The first phase of transaction management includes: Read the power trading task, determine the trading intention according to the first protocol part, and store the guarantee amount on the secondary chain of the blockchain; The execution of secondary chains in blockchain is based on high-frequency, micro-amount instantaneous transactions with guaranteed limits.
4. The distributed power trading method combined with blockchain as described in claim 1, characterized in that, Triggered according to the second part of the protocol, the time zone accumulation record of the transacting party is read, a second zero-knowledge proof is generated, and submitted to the main chain of the blockchain for on-chain storage.
5. The distributed power trading method combined with blockchain as described in claim 1, characterized in that, Based on the oracle network, state proofs of key physical parameters are performed off-chain, generating first zero-knowledge proofs, including: Read the trading parties of the power trading task, wherein the trading parties include at least a first trading party and a second trading party; In the target power network, the local power network based on the transaction parties is located, and the target oracle node based on the oracle network is activated by matching based on key power grid nodes. The first zero-knowledge proof is generated based on the target oracle node.
6. The distributed power trading method incorporating blockchain as described in claim 5, characterized in that, Each target oracle node performs a node physical state reading under key physical parameters to determine the node proof; The node proof is integrated and used as the first zero-knowledge proof, then submitted to the main chain of the blockchain for on-chain storage.
7. The distributed power trading method incorporating blockchain as described in claim 1, characterized in that, Execute multi-consensus node processing based on the blockchain main chain to generate transaction execution certificates, including: The main chain of the blockchain encapsulates the transaction proof based on the first zero-knowledge proof, the second zero-knowledge proof, and the intended transaction settlement. Locate the task consensus nodes of the main chain, distribute and process the transaction proofs in parallel across the task consensus nodes, and determine the data to be processed by each node. The transaction execution certificate is generated by combining the data processed by the nodes.
8. The distributed power trading method incorporating blockchain as described in claim 1, characterized in that, Managing the aforementioned power trading tasks includes: With the issuance of the transaction execution certificate, the transaction response of the power transaction task is tracked to determine the transaction data chain; The transaction data chain is stored on the chain, and the second zero-knowledge proof generated locally by the transacting party is updated based on the transaction data chain.
9. A distributed power trading system incorporating blockchain, characterized in that: The system is used to implement the distributed power trading method combined with blockchain as described in any one of claims 1-8, the system comprising: The Oracle Network Building Module is used to build an oracle network for a target power grid, with key power grid nodes as the building targets. The first transaction phase management module is used to receive electricity trading tasks and manage the first transaction phase according to the smart protocol deployed on the blockchain. The first transaction phase consists of the guarantee amount notarization based on the transaction intention and the secondary chain intention transaction. The second transaction phase management module is used to perform multi-consensus node processing based on the blockchain main chain, generate transaction execution certificates, and manage the second transaction phase by using the power network physical state proof based on the oracle network, the settlement of the first transaction phase and the risk proof of the task transaction party, and to execute the multi-consensus node processing based on the blockchain main chain. The transaction task management module is used to manage the power transaction task according to the transaction execution certificate, wherein the transaction data chain is stored on the main chain of the blockchain.
10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is used to execute the distributed power trading method incorporating blockchain as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the distributed power trading method incorporating blockchain as described in any one of claims 1 to 8.