Electric power bilateral direct transaction system based on block chain
Through a blockchain-based bilateral direct power trading system, power generation terminals and power consumption terminals trade directly. By utilizing SHA256 and ECC encryption technologies, the system solves the problems of multiple participants and unclear accounting in power trading, achieving safe, reliable, and transparent power trading and reducing operation and management costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-20
- Publication Date
- 2026-03-20
AI Technical Summary
In electricity trading, especially in the settlement of electricity bills for distributed energy and microgrids, there are problems such as multiple participants, different peak and off-peak electricity prices, unclear accounting, unclear accounting, and long payment periods. These problems restrict the market-oriented development of electricity trading. Furthermore, the existing centralized model has high trust dependence, high downtime risk, and lack of effective competition.
A blockchain-based bilateral direct power trading system is adopted to realize direct transactions between power generation terminals and power consumption terminals through the interaction of DAPP layer, smart meter layer, blockchain layer and power distribution equipment layer. Secure transactions are carried out using SHA256 and ECC encryption technology, and power transmission and settlement are carried out by combining smart contracts and the immutability of blockchain.
It enables peer-to-peer free trading, improves transaction security and transparency, reduces operational and management costs, reduces risks associated with human control, and makes transaction data more secure through distributed storage.
Smart Images

Figure CN121707776A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power transaction, in particular to a power bilateral direct transaction system based on block chain. BACKGROUND
[0002] Electricity is an important energy source in China and has a great influence on social and economic development. At present, in the power transaction, especially in the distributed energy, micro-grid and other electricity settlement, due to the existence of many participants, different peak and valley electricity prices, unclear accounting, unclear account, long account period and other problems, the marketization development of power transaction is restricted to a certain extent.
[0003] The conventional mode of power bilateral transaction is grid-connected sales, that is, selling to the power company, uniformly connecting to the high-voltage power line, unified pricing and unified procurement. This mode is a typical centralized model, and the power generation terminal and the power consumption terminal take the power bureau or the power transaction center terminal as the core node, and the fund flow, information flow and energy flow are converged in the transaction center terminal. This mode has high trust dependence, high downtime risk, lacks market mechanism, cannot form effective competition, and has no obvious incentive effect on market participants. Therefore, it has become an important issue for relevant practitioners to establish a settlement system that is recognized by all parties to the transaction, convenient and safe. SUMMARY
[0004] Therefore, the present application provides a power bilateral direct transaction system based on block chain, so that each distributed system (power generation terminal) and the surrounding general industry and large industry (power consumption terminal) directly participate in it, and provides a safe, reliable, transparent and open transaction system for participants in power transaction.
[0005] In order to achieve the above purpose, the present application adopts the following technical solutions: A power bilateral direct transaction system based on block chain, comprising: a transaction terminal completing the whole process of power selling and purchasing, settlement and power transmission through the interaction of each functional level; Wherein, the transaction terminal is a power generation terminal, a power consumption terminal and a power transaction center terminal; The functional level includes: DAPP layer, smart meter layer, block chain layer and power distribution equipment layer; The DAPP layer is used for the power generation terminal to initiate power generation adjustment, power generation right on-chain, power selling application and power selling query application, and the power consumption terminal to initiate power purchasing, power purchasing right on-chain and power quantity query application; The smart meter layer is connected with the DAPP layer and includes maximum power generation capacity adjustment, power generation right on-chain audit, available power generation capacity query and prediction, available power consumption capacity query and prediction, and power generation right on-chain audit; The blockchain layer receives the power selling application and the power purchasing application of the DAPP layer, calls the sellable power of the smart meter layer, and performs an encrypted transaction in combination with a transaction mechanism, a physical constraint, and a token exchange mechanism of a power transaction center terminal. The power distribution device layer performs transaction power distribution based on the transaction result of the blockchain layer through a grid grid-connected scheduling mechanism and infrastructure.
[0006] Preferably, the DAPP layer comprises: The power generation adjustment unit initiates an increase or decrease application, performs an audit, and adjusts the maximum power generation capacity in the smart meter layer after the audit is passed; The power generation right chaining unit initiates a power generation right chaining application, performs a qualification and power generation capacity audit, and performs power generation right chaining through the smart meter layer after the audit is passed; The power selling query application unit realizes sellable power query and prediction through the smart meter layer; The power selling application unit performs an on-chain power generation right audit, and initiates a power selling application in the blockchain layer after being qualified based on the sellable power; The power purchasing right chaining unit performs a qualification audit and a credit audit of the smart meter layer, and performs power purchasing right chaining through the smart meter layer after the audit is passed; The power query application unit realizes available power query and power consumption prediction through the smart meter layer; The power purchasing application unit performs an on-chain power purchasing right audit, and initiates a power purchasing application in the blockchain layer after being qualified.
[0007] Preferably, the transaction mechanism of the blockchain layer comprises: The bidding matching unit: the power generation terminal hangs the sellable power on the network, presents a Peer to Peer price to the power purchasing terminal, the power purchasing terminal performs bidirectional bidding matching according to the power purchasing demand, the power purchasing terminal proposes a transaction application to the power generation terminal after the matching is successful, and submits an Ethereum token transfer, the power generation terminal verifies through digital signature, the transaction is propagated to each network node for network verification after the verification is passed, and the power generation terminal realizes token increase and smart meter data decrease; the power purchasing terminal realizes token decrease and smart meter data increase; The bilateral free matching unit: after submitting a free transaction matching, a token transfer is performed, a digital signature verification is performed, a network node verification is performed, and a transaction is realized.
[0008] Preferably, it further comprises: The digital signature unit converts plaintext m Hash encryption, hash value conversion to integer h , random private key k Related random number rk Private key k ECC is used to solve the public keyK , using a digital signature algorithm to solve s , finally generating a digital signature and sending it to the digital verification unit; The digital verification unit parses the public key from the digital signature K , address matching, matching through plaintext and signature information analysis, plaintext analysis is consistent with the digital signature process, m The integer is calculated by SHA h , using the s , known information public key K , and the information plaintext SHA Integer value h , inverse random number corresponding to the random amount of private key k , r’ , r’ Compared with the signature information in r , if consistent, it proves that the check is passed, and the transaction is completed.
[0009] Preferably, the encryption technology used in the encryption transaction is SHA256 and elliptic curve encryption algorithm ECC; wherein SHA256 is an encryption means for all plaintexts, and ECC is an encryption technology cooperating with SHA256 in digital signature.
[0010] Preferably, the physical constraint includes: The amount of electricity that can be sold is constrained by the smart meter, and the smart meter realizes the difference between the existing electricity statistics CA, the power generation prediction PP and the self-use electricity prediction SS, which is the amount of electricity that can be sold. The amount of electricity that can be sold is as follows: ; Among them, P is the power generation power, W is the weather condition, Ii is the light intensity, E is the environment, W is the weather, B is the usage habit, is the amount of electricity that can be sold, is other influencing factors; The amount of electricity that can be purchased is only constrained by the amount of currency held.
[0011] According to the above technical solution, compared with the prior art, the present application provides a power bilateral direct transaction system based on block chain, which has the following beneficial effects: (1) The power bilateral direct transaction method based on block chain of the present application can carry out point-to-point free transaction without frequent detection by a third party institution.
[0012] (2) The power bilateral direct transaction method based on the blockchain has transaction data stored in each user node on the blockchain, and the distributed storage is safer.
[0013] (3) The power bilateral direct transaction method based on the blockchain can use the tamper resistance of the smart contract, greatly reduce the operation and management cost, and reduce the risk of human control. BRIEF DESCRIPTION OF DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.
[0015] Figure 1 The application provides a power bilateral direct transaction application architecture based on a blockchain. Figure 2 The application provides a logic relationship diagram of digital signature and digital verification. Figure 3 The application provides a 2-type mechanism diagram of power bilateral direct transaction. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0017] The embodiments of the present application disclose a power bilateral direct transaction system based on a blockchain, and the system comprises Figure 1 The application is an application architecture diagram of the method, and the system comprises the following levels: Level 1, DAPP layer: the layer mainly comprises business functions of a power generation terminal and a power consumption terminal. The power generation terminal can apply for increasing power generation / reducing power generation, apply for power generation right on-chain, apply for query, and apply for power selling. The power consumption terminal can apply for power purchase, apply for query, and apply for power purchase right on-chain.
[0018] Level 2, smart meter layer: the layer mainly comprises maximum power generation capacity change, query of sellable power capacity, and query of available power capacity.
[0019] Level 3, blockchain layer: the layer mainly comprises power generation right / power purchase right on-chain, transaction matching, transaction authentication, transaction broadcast, and transaction settlement. The involved technical contents are: Content 1, encryption technology: the main encryption technology used is SHA256 (Secure Hash Algorithm 256, SHA256) and elliptic curve encryption algorithm (Elliptic Curve Cryptography, ECC). Among them, SHA256 is the encryption means of all plaintexts, and ECC is the encryption technology cooperating with SHA256 in digital signature.
[0020] Content 2, digital signature and digital verification: attached Figure 2 The logical relationship diagram for digital signature and digital verification, and the related logic are as follows: (1) The logic of the digital signature unit is: first, the plaintext m Hash encryption, the hash value is converted into an integer h , a random number k Related random number rk , private key k Solve the public key by using ECC K , solve s , s is an encryption parameter related to the plaintext integer h , private key k , random number r . Finally, the digital signature is generated r, s ) and sent to the receiver.
[0021] (2) The logic of the digital verification unit is: the public key K Is parsed from the accepted information, address matching is performed, and the plaintext and signature information are parsed after the matching is passed. The plaintext parsing is consistent with the digital signature process, m The integer h is generated by SHA calculation, the s in the signature information is used, the information public key K Is known, and the information plaintext SHA Integer value h , the random number corresponding to the private key k In the random number r’ , r’ Compare with r in the signature information. If they are consistent, it proves that the verification is passed, and the transaction is completed.
[0022] Content 3, Token Value Model: The value model of the token in the direct transaction of electricity is that the token represents a digital currency (weak center mode), which realizes the fixed exchange transaction with cash. The power purchase terminal purchases the transaction center token through the recharge function, and uses the token for transaction settlement. The blockchain interacts with the smart meter, and for every 1 token reduced in the blockchain, the available power is generated in the meter according to the cash conversion ratio. The power generation terminal generates available power, which is recorded in the smart meter. For every token received, the meter power is reduced by a fixed amount of electricity, and finally the token is exchanged with the power transaction center terminal. The transaction subject of cash is that the power purchase terminal purchases the token from the power transaction center terminal, and the power transaction center terminal exchanges the token with the power generation terminal.
[0023] Content 4, Electricity Price Function and Trading Mechanism: The electricity price function is shown in the formula:
[0024] In the formula, DP is the deal price (Deal Price); BP is the transaction pricing (Bidding Price); GS is the government subsidies (Government Subsidies); WCs is the wheeling cost (Wheeling Costs); k is the characteristic coefficient; SP is the standard pricing of government procurement electricity (Standard Price); d is the transportation distance, A is the transaction electricity, n is the number of substations that should be crossed in theory in power distribution, t is the substation conversion rate.
[0025] The Figure 3 is the 2-type mechanism of the direct transaction of electricity, which is the bidding matching and the free matching respectively: (1) Bidding matching unit, the power generation terminal will be sold to the network, in the purchase of electricity terminal Peer to Peer electricity price, the price function, the composition of the price is mainly divided into power generation terminal offer, government subsidies and over the network fees, etc. Among them, the offer is determined by the power generation terminal (on the basis of government procurement guide price floating), the government subsidy is a fixed value, and the over the network fee is determined by the infrastructure and distribution distance. The purchase of electricity terminal carries out two-way bidding matching according to the purchase of electricity demand, and the purchase of electricity terminal puts forward a transaction application to the power generation terminal and submits Ethereum token transfer after the matching is successful. The power generation terminal verifies through digital signature (r, s), and the transaction is propagated to each network node for network verification after the verification is passed. The power generation terminal realizes token increase and smart meter data decrease; the purchase of electricity terminal token decreases and smart meter data increases.
[0026] (2) Free matching unit, generally occurs in the neighborhood or the same community, the same substation, the transaction between each other due to private transactions, and the token transfer is submitted after the free transaction matching, digital signature verification, network node verification, and the transaction process is realized.
[0027] Content 5, token flow, cash flow, and electricity flow mechanism and purchase of currency exchange function: the token flow, cash flow, and electricity flow involved in bilateral transactions are accompanied by each transaction, including: (1) The mechanism of cash flow is that the purchase of electricity terminal initiates the purchase of currency application to the transaction center terminal (or any currency holding unit, even to the power generation terminal), and realizes the token purchase in the form of cash. The transaction center holds cash and provides exchange services for the power generation terminal.
[0028] (2) The mechanism of token flow is that the purchase of electricity terminal applies for the purchase of currency, and the token flows from the transaction center to the purchase of electricity terminal. The purchase of electricity terminal realizes the token flow from the purchase of electricity terminal to the power generation terminal through on-chain transaction, and the power generation terminal realizes the token flow from the power generation terminal to the transaction center by using exchange services.
[0029] (3) The mechanism of electricity flow is that the electricity flow directly flows from the power generation terminal to the purchase of electricity terminal through the power network.
[0030] (4) The purchase of currency and exchange services generated in the transaction settlement process form the following formula: Purchase of currency function:
[0031] Exchange function:
[0032] In the formula, represents the amount of currency held, is cash, and are transaction fees, and Respectively represent the purchase and exchange ratio.
[0033] Content 6, physical constraints: physical constraints include the amount of electricity available for sale constraints and the amount of electricity available for purchase constraints.
[0034] (1) the amount of electricity available for sale constraints: the amount of electricity available for sale is constrained by the smart meter, which can realize the current amount (CA), production prediction (PP) and self-supply (SS), the difference between the two is the amount of electricity available for sale. The production prediction is constrained by the power generation power P , weather conditions W , illumination intensity (Ii) and duration, etc. The self-supply is constrained by the environment E , weather W , usage habits B , etc. The amount of electricity available for sale is shown in the formula:
[0035] wherein, is the amount of electricity available for sale, is other influencing factors.
[0036] (2) the amount of electricity available for purchase constraints: only by the amount of holding coins constraints.
[0037] Content 7, transaction center terminal profit mechanism and profit function: as the traditional center of the power bureau, power trading center and other institutions, in the system, mainly responsible for the token and cash exchange settlement center, power dispatching command center and power distribution infrastructure protection and other responsibilities.
[0038] Profit function of power trading center in the transaction process E As shown in the formula:
[0039] Level 4, power distribution equipment layer: this layer mainly includes grid grid scheduling mechanism and infrastructure.
[0040] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts between each embodiment can be referred to each other. For the method disclosed by the embodiment, since it corresponds to the method disclosed by the embodiment, the description is relatively simple, and the relevant part can be referred to the method part.
[0041] The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the appended claims are intended to cover all such modifications that do not depart from the true spirit and scope of the application. Therefore, the application is not limited to the embodiments shown but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A blockchain-based bilateral direct electricity trading system, characterized in that, include: The trading terminal completes the entire process of electricity purchase and sale, settlement, and power transmission through interaction at various functional levels; The trading terminals include power generation terminals, power consumption terminals, and power trading center terminals. The functional layers include: DAPP layer, smart meter layer, blockchain layer, and power distribution equipment layer; The DAPP layer is used by power generation terminals to initiate power generation adjustments, on-chain power generation rights, electricity sales applications, and electricity sales query applications, and by electricity consumption terminals to initiate electricity purchase applications, on-chain electricity purchase rights, and electricity volume query applications. The smart meter layer, which is connected to the DAPP layer, includes adjustment of maximum power generation, on-chain verification of power generation rights, query and prediction of available power volume, query and prediction of available power volume, and on-chain verification of power generation rights. The blockchain layer receives electricity sales and purchase applications from the DAPP layer, calls upon the available electricity volume from the smart meter layer, and conducts encrypted transactions by combining the transaction mechanism, physical constraints, and the token exchange mechanism of the power trading center terminal. At the power distribution equipment layer, based on the transaction results of the blockchain layer, power is traded and distributed through the power grid connection and dispatch mechanism and infrastructure.
2. The blockchain-based bilateral direct power trading system according to claim 1, characterized in that, The DAPP layer includes: The power generation adjustment unit initiates an application for increasing or decreasing power generation, reviews it, and adjusts the maximum power generation at the smart meter layer after the review is approved. The power generation rights on-chain unit initiates an application for power generation rights on-chain, conducts qualification and power generation capacity verification, and after the verification is approved, the power generation rights are on-chain through the smart meter layer; The electricity sales inquiry application unit realizes the inquiry and prediction of available electricity volume through the smart meter layer; The electricity sales application unit conducts on-chain power generation rights review, and if qualified, initiates an electricity sales application on the blockchain layer based on the available electricity volume. The electricity purchase right on-chain unit conducts qualification verification and credit verification at the smart meter layer. After the verification is passed, the electricity purchase right is uploaded to the blockchain through the smart meter layer. The power consumption query application unit realizes the query of available power and power consumption prediction through the smart meter layer; The electricity purchase application unit conducts on-chain review of electricity purchase rights, and if qualified, initiates an electricity purchase application at the blockchain layer.
3. The blockchain-based bilateral direct power trading system according to claim 1, characterized in that, The transaction mechanism of the blockchain layer specifically includes: Bidding and Matching Unit: The power generation terminal lists its saleable electricity on the grid, and the power purchase terminal presents the peer-to-peer electricity price. The power purchase terminal conducts two-way bidding and matching based on its electricity purchase demand. After a successful match, the power purchase terminal submits a transaction application to the power generation terminal and submits Ethereum token transfers. The power generation terminal verifies the transaction through digital signature. After successful verification, the transaction is propagated to various network nodes for network verification. After the transaction is completed, the power generation terminal increases its tokens and decreases the smart meter data; the power purchase terminal decreases its tokens and increases the smart meter data. Bilateral free matching unit: After submitting a free transaction for matching, token transfer, digital signature verification, and network node verification are carried out to realize the transaction process.
4. A blockchain-based bilateral direct power trading system according to claim 3, characterized in that, Also includes: Digital signature unit, which will store plaintext m Hash encryption, converting hash values to integers h Randomized by private key k Related random numbers rk private key k Solving public keys using ECC K Solving using digital signature algorithms s This process ultimately generates a digital signature and sends it to the digital verification unit. Digital verification unit, the public key is deciphered from the digital signature. K Address matching is performed, which involves parsing the plaintext and signature information. The plaintext parsing process is the same as the digital signature process. m Integers are generated by SHA calculation h Using the signature information s Known information public key K and the plaintext of the solution information SHA Integer value h Inverse random number generation and private key k Corresponding random quantities r’ , r’ With the signature information r If the comparisons are consistent, the verification is successful and the transaction is completed.
5. A blockchain-based bilateral direct power trading system according to claim 1, characterized in that, The encrypted transactions employ SHA256 and Elliptic Curve Cryptography (ECC) as encryption technologies; SHA256 is the encryption method for all plaintext, and ECC is the encryption technology used in conjunction with SHA256 in digital signatures.
6. A blockchain-based bilateral direct power trading system according to claim 1, characterized in that, The physical constraints include: Available electricity volume is constrained by smart meters. Smart meters calculate the current electricity volume (CA), and the difference between the generation forecast (PP) and the self-consumption forecast (SS) is the available electricity volume. The available electricity volume is shown below: ; in, P For power generation, W For weather conditions, Ii Light intensity, E For the environment, W For the weather, B For the sake of usage habits, Available electricity volume Other influencing factors; The available electricity volume is constrained only by the amount of cash held.