Block chain-based power transaction method
By adopting blockchain technology and non-cooperative game model in power transactions, the problems of low transaction matching efficiency and single credit management in distributed energy transactions are solved, and an efficient and stable power transaction processing and credit incentive mechanism are achieved.
Patent Information
- Application Number
- CN202411773253.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
AI Technical Summary
The existing technology has problems in distributed energy transactions with low transaction matching efficiency, insufficient transaction flexibility and autonomy, single credit management and difficulty in incentivizing performance behavior.
The blockchain-based power trading method is adopted, and by building alliance chain modules, network layer modules, regulatory layer modules and physical layer modules, the transaction is divided into pre-quotation, circular listing, system matching and power grid trading stages, the non-cooperative game model is used to optimize node matching, and the node credit value and liquidated damages are calculated based on the credit incentive mechanism.
It improves the efficiency of power transaction processing, promotes fulfillment transactions, enhances the trading efficiency and stability of the system, and promotes the sustainable development of new energy technology.
Smart Images

Figure CN119722311A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power trading, and in particular to a method for power trading based on blockchain. Background Art
[0002] Electricity market demand response refers to the use of economic incentives and price signals in the electricity market to guide electricity consumers to adjust their electricity demand during a specific period of time to optimize the balance of electricity supply and demand, thereby achieving demand-side technical means for electricity optimization and system resource allocation, effectively solving the problem of local electricity supply and demand tensions, and providing new regulatory means for the economic, safe and stable operation of the power system.
[0003] With the optimization and adjustment of new energy and the increasing maturity of renewable energy power generation technology, the power system is developing in the direction of low carbonization and distribution. This trend has led to significant changes in the power supply structure, and traditional power users have gradually transformed into nodes with dual functions of power generation and power consumption. These nodes generate electricity through distributed energy devices such as photovoltaics and wind power, and have an increasing demand for autonomous power peer-to-peer P2P transactions.
[0004] At present, as a key technical means to optimize the balance between supply and demand, power market demand response uses economic incentives and price signals to guide users to adjust their electricity demand. However, existing technologies still face the following technical problems in distributed energy transactions: existing technologies lack effective management of the behavior of transaction nodes, making it difficult to cope with the low efficiency of transaction matching caused by the dispersion of nodes; current power P2P transactions are mostly based on fixed matching rules or centralized platform management, which cannot meet the node's demand for transaction flexibility and autonomy; the existing credit management mechanism is relatively simple, lacking incentives and constraints on the node's performance behavior, resulting in low transaction trust and system stability.
[0005] In response to the above technical problems, blockchain technology provides a new solution for distributed energy transactions with its decentralization, immutability and smart contract characteristics. However, the application of traditional blockchain technology in power trading scenarios still has performance bottlenecks, such as low transaction processing efficiency and limited smart contract functions, which makes it difficult to adapt to the large-scale transaction needs of multi-node collaboration.
[0006] The low efficiency of electricity trading processing has become a technical problem that needs to be solved urgently. Summary of the invention
[0007] The present invention provides a method for power trading based on blockchain to solve the technical problem of low power trading processing efficiency.
[0008] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows:
[0009] A method for power trading based on blockchain, comprising the following steps:
[0010] Step S1: constructing a power trading platform system, which includes a consortium chain module, a network layer module, a regulatory layer module and an external physical layer module;
[0011] Step S2: Divide the transaction into the pre-quotation stage, the circular listing stage, the system matching stage and the grid transaction stage, apply the non-cooperative game model to quantify the node interests and decision-making behaviors, optimize the node matching, and complete the power transaction;
[0012] Step S3: Calculate the node credit value and penalty based on the credit incentive mechanism, allocate the penalty, and settle the transaction amount according to the current transaction electricity volume.
[0013] A further technical solution is: in step S1, the alliance chain module includes a support module, a contract module and a consensus module. The support module is used to store the underlying data supporting the operation of the blockchain, the data propagation mechanism, P2P networking and data verification; the contract module is used to store the smart contract information of the blockchain; the consensus module is used to store the consensus mechanism for the operation of the alliance chain.
[0014] A further technical solution is that in step S1, the network layer module includes a basic module, a data module and a transaction management module, the basic module includes a network system, a computer, a storage device and a security device; the data module is used to store system data, the system data includes a database and data backup, and user information and transaction information related to the user; the transaction management module is used to process and integrate applications required for related node transactions, and the applications include account registration, information release, contract generation, transmission management and financial calculations.
[0015] A further technical solution is that: in the step S1, the physical layer module includes power generation nodes and power consumption nodes, the power generation nodes include bus nodes, photovoltaic nodes and wind power nodes, and the power consumption nodes include residential power consumption nodes, commercial power consumption nodes and agricultural power consumption nodes;
[0016] The regulatory layer module includes a credit management module, which is used to store the user's credit evaluation function model and credit incentive mechanism, and complete transaction review, credit calculation, credit review and credit evaluation, as well as verification rewards for ordinary nodes; the nodes include central nodes, verification nodes and ordinary nodes. The computer of the power trading center is the central node in the credit incentive mechanism, and the power generation node or the power consumption node is the ordinary node. The central node allocates the regulatory rights to the ordinary nodes participating in the transaction. The ordinary node becomes the verification node through credit election. The verification node supervises the transactions of other ordinary nodes, and the central node rewards the verification node.
[0017] A further technical solution is that the step S2 is specifically divided into the following steps:
[0018] Step S201: pre-quotation stage, node pre-quotation;
[0019] Step S202: During the cyclic listing phase, the node adjusts the quotation, cyclically lists and completes the transaction until the listing transaction phase ends;
[0020] Step S203: In the system matching stage, the computer of the power trading center conducts system negotiation and matching transactions based on the untraded electricity and the quotation, returns the system negotiation and matching transaction intention to the remaining nodes, and asks for transaction opinions. If the two parties reach an agreement, the transaction is completed; at the end of the system matching stage, the unfinished transaction demand is regarded as the remaining supply and demand electricity;
[0021] Step S204: During the power grid transaction phase, the power grid receives the remaining supply and demand electricity during the system matching phase and completes the transaction closed loop.
[0022] A further technical solution is that the step S3 is specifically divided into the following steps:
[0023] Step S301: When the transaction time is reached, the verification work is initiated and the verification node starts the verification;
[0024] Step S302: The verification node determines whether there is a breach of contract;
[0025] Step S3021: When both parties to the transaction do not breach the contract, that is, the power generation node generates the specified amount of electricity in accordance with the contract and the power consumption node uses the specified amount of electricity in accordance with the contract, the transaction funds specified in the contract are transferred to the power generation node account, and both parties settle the transaction in accordance with the contract;
[0026] Step S3022: When any party to the transaction breaches the contract, that is, the power generation node fails to generate the specified amount of electricity as agreed in the contract or the power consumption node fails to use the specified amount of electricity as agreed in the contract, the transaction will be treated as a breach of contract, and the corresponding credit deduction value of the breaching node will be calculated, the credit value will be deducted and updated to obtain the current credit value, and the penalty payable for settlement will be calculated based on the current credit value; after the penalty allocation is completed, the transaction amount will be settled according to the current transaction electricity.
[0027] A further technical solution is that in step S3022, the credit deduction value U corresponding to the default node is calculated based on equations (2) and (3): z ,
[0028] Set the initial performance credit value of all on-chain nodes to C i j nitial , take C i jnitial =100;
[0029] If a power generation node or a power consumption node defaults in the zth transaction, its credit deduction value U z Determined according to the number of defaults i, if there is no transaction default, the credit deduction value is 0.
[0030]
[0031] In formula (2), Q treaty is the transaction volume agreed upon by both parties in the smart contract, Q deal is the actual transaction power of the node, U i is the credit deduction value of the node in the i-th default transaction,
[0032]
[0033] Formula (3) uses the Fibonacci sequence, that is, when a node defaults for the first and second time, 1 credit point is deducted; when the number of defaults i>2, the deducted credit value is the sum of the i-1st and i-2nd credit deduction values.
[0034] A further technical solution is that in step S3022, the penalty payable for settlement is calculated based on equations (4) to (8) and the current credit value.
[0035] For nodes participating in the transaction, the node fulfillment credit value is:
[0036]
[0037] In formula (4), are the node fulfillment credit values generated by node j after the zth and z-1th transactions respectively;
[0038]
[0039] In formula (5), is the verification reward credit value of node j, n is the number of consecutive successful verifications of the verification node; k1 is the control coefficient of node j, generally speaking, k1∈[0,5]. When the value is small, the growth rate will slow down, and when it is large, the reward will increase rapidly. The larger the value, the greater the verification reward credit value, and the lower the credit penalty electricity price;
[0040] If a breach of contract occurs, the penalty electricity price P is calculated:
[0041]
[0042] In formula (6), P treaty The contract price for trading; is the initial value of the performance credit of all nodes on the chain, k2 is the credit recovery coefficient, k2∈[0,5], k2=0 means that credit recovery is completely stopped and the node cannot recover its credit value; k2=5 means that the credit value of the node can be completely restored to its original state after each fulfillment;
[0043]
[0044] In formula (7), β is the credit cost influencing factor, β∈[0,1]. Too high β may lead to unnecessary electricity price fluctuations, while too low β may reduce the incentive effect of credit recovery. g is the credit supplement constant, which is usually set to g∈[1,3] so that the node can obtain sufficient incentives when fulfilling the contract, but will not excessively increase the system burden.
[0045] When the node fulfills its contract credit C z j When it is less than 100, the node needs to punish the electricity consumption that it has not fulfilled. The method of determining and allocating the penalty T is as follows:
[0046]
[0047] In formula (8), P is the penalty electricity price, Q treaty is the transaction volume agreed upon by both parties in the smart contract, Q deal It is the actual transaction power of the node.
[0048] A further technical solution is: in step S3022, the penalty allocation is completed according to formula (9),
[0049]
[0050] In formula (9), T a is the liquidated damages paid by the breached party; μ is the compensation control coefficient, μ∈[0,1); N is the total number of nodes participating in the transaction on the blockchain; The penalty for the N-2 nodes participating in the allocation is allocated according to their credits; C z k It is the fulfillment credit value of each node participating in the allocation.
[0051] A further technical solution is: in the step S3022, if one party breaches the contract in the transaction, the liquidated damages T will be divided according to the ratio μ and compensated to the non-breaching party; the remaining liquidated damages T after the division will be weighted and distributed to the remaining nodes on the chain according to the credit value, so that all nodes involved in blockchain security maintenance and transaction work can obtain incentive compensation therefrom; if both parties in the transaction breach the contract, μ=0, and the liquidated damages will be distributed to the remaining nodes on the chain, and the breaching parties will not participate in the distribution.
[0052] The beneficial effects of adopting the above technical solution are:
[0053] A method for power trading based on blockchain includes the following steps: Step S1: constructing a power trading platform system, which includes a consortium chain module, a network layer module, a regulatory layer module, and an external physical layer module; Step S2: dividing the transaction into a pre-quotation stage, a circular listing stage, a system matching stage, and a power grid transaction stage, applying a non-cooperative game model to quantify node interests and decision-making behaviors, optimizing node matching, and completing power trading; Step S3: calculating the node credit value and liquidated damages based on a credit incentive mechanism, allocating liquidated damages, and settling the transaction amount according to the current transaction volume. Through steps S1 to S3, it actively promotes contract performance transactions, thereby improving the efficiency of power trading processing.
[0054] Please refer to the detailed description of the specific implementation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a flow chart of step S2 of the present invention for power P2P trading;
[0056] Figure 2 This is a flow chart of step S3 of the present invention for calculating and obtaining the node credit value based on the credit incentive mechanism;
[0057] Figure 3 It is an architecture diagram of the power P2P trading platform system based on the alliance chain of the present invention. DETAILED DESCRIPTION
[0058] The purpose of this application is to solve the problems existing in the existing technology by combining alliance chain technology and non-cooperative game model, such as the dispersion of transaction nodes and insufficient credit management. While promoting the consumption of distributed energy, it improves the transaction efficiency and stability of the system and promotes the sustainable development of new energy technology.
[0059] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present application and its application or use. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0061] like Figure 1 to Figure 3 As shown, the present invention discloses a method for power trading based on blockchain, comprising the following steps:
[0062] Step S1: Construct an electricity P2P trading platform system based on the alliance chain.
[0063] Construct an electricity trading platform system, which includes a consortium chain module, a network layer module, a regulatory layer module and an external physical layer module.
[0064] The alliance chain module includes a support module, a contract module and a consensus module. The support module is used to store the underlying data that supports the operation of the blockchain, the data propagation mechanism, P2P networking and data verification; the contract module is used to store the smart contract information of the blockchain; the consensus module is used to store the consensus mechanism for the operation of the alliance chain.
[0065] The network layer module includes a basic module, a data module and a transaction management module. The basic module includes a network system, a computer, a storage device and a security device; the data module is used to store system data, which includes databases and data backups as well as user information and transaction information related to users; the transaction management module is used to process and integrate the applications required for related node transactions, including account registration, information publishing, contract generation, transmission management and financial calculations.
[0066] The physical layer module includes power generation nodes and power consumption nodes. The power generation nodes include bus nodes, photovoltaic nodes and wind power nodes, and the power consumption nodes include residential power nodes, commercial power nodes and agricultural power nodes.
[0067] The regulatory layer module includes a credit management module, which is used to store the user's credit evaluation function model and credit incentive mechanism, and complete the transaction review, credit calculation, credit review and credit evaluation of ordinary nodes, as well as verification rewards; the nodes include central nodes, verification nodes and ordinary nodes. The computer of the power trading center is the central node in the credit incentive mechanism, and the power generation node or the power consumption node is the ordinary node. The central node allocates the regulatory rights to the ordinary nodes participating in the transaction. The ordinary nodes become verification nodes through credit elections. The verification nodes supervise the transactions of other ordinary nodes, and the central node rewards the verification nodes.
[0068] Details are as follows:
[0069] According to the technical classification of blockchain, alliance chain technology is selected as the technical core of the power trading model to build a multi-level power trading framework with three functional levels: network layer, regulatory layer and physical layer.
[0070] like Figure 3 As shown in the figure, the system architecture of the power trading platform based on the alliance chain is mainly divided into the alliance chain module, the network layer module, the supervision layer module and the external physical layer module.
[0071] (1) The alliance chain is the core technology of the entire platform. The alliance chain module includes the support module, the contract module and the consensus module. The support module stores the underlying technology that supports the operation of the blockchain, including P2P networking technology, data transmission mechanism and data verification, etc. The contract module stores the smart contract information of the blockchain, and the consensus module stores the consensus mechanism for the operation of the alliance chain.
[0072] (2) The network layer is the foundation of the platform operation. The network layer modules are mainly divided into basic modules, data modules and transaction management modules. Among them, the basic module mainly includes network systems, computers, storage devices, and security devices to ensure the smooth operation of the system; the data module stores various data in the system, including databases, data backups, user information, transaction information and other user-related information; the transaction management module processes and integrates the applications required for related node transactions, mainly including account registration, publishing information to generate contracts, transmission management, financial calculations and other functions.
[0073] (3) The regulatory layer mainly provides technical support for node credit evaluation. The regulatory layer module stores the user's credit evaluation function model and credit incentive mechanism. This module mainly completes the review of ordinary node transactions, the review of node credit, and the reward of verification node verification work.
[0074] (4) The physical layer module mainly includes power generation nodes and power consumption nodes. The power generation nodes are mainly bus nodes, photovoltaic nodes and wind power nodes, while the power consumption nodes are mainly residential, commercial and agricultural power consumption.
[0075] The essential physical feature of the blockchain technology in step S1 is the chain structure of the blockchain. The blockchain is composed of N blocks connected together, and each block participates in the operation and transaction of the blockchain as an independent unit.
[0076] The consortium chain is a partially decentralized blockchain system. In scenarios with large transaction scales and a large number of nodes, the consortium chain achieves efficient data processing and transaction management through a fast consensus mechanism and an operating mode with clear division of labor, thereby greatly improving the overall system efficiency.
[0077] The network layer module is the core of the multi-level power trading model based on the alliance chain. Its main function is to realize the transaction data processing and transaction contract storage between nodes. In this model, the network layer provides an efficient and transparent data interaction platform through the alliance chain technology to ensure the credibility of transaction data and the automation of contract execution.
[0078] The regulatory layer module plays an important role in the multi-level power trading model of the alliance chain. By dividing the nodes into central nodes, verification nodes and ordinary nodes, an efficient division of labor and cooperation and credit management mechanism are realized. The power trading center is the central node in the credit incentive mechanism. In the power P2P transaction, if the central node adopts the overall credit supervision method, it can promote the nodes to reduce default behavior to avoid punishment to a certain extent, but it cannot encourage the nodes to actively perform the contract through incentives. Therefore, the central node should allocate part of the regulatory rights to the nodes participating in the transaction, become a verification node through credit election, supervise the transactions of other nodes, and give certain rewards to the verification nodes.
[0079] The physical layer module contains different nodes participating in platform transactions, such as photovoltaic nodes, wind power nodes and user nodes with different needs, that is, power generation nodes with different power generation capacities and power consumption nodes in different regions for electricity trading.
[0080] Step S2: Power P2P transaction.
[0081] The transaction is divided into the pre-quotation stage, the circular listing stage, the system matching stage and the grid transaction stage. The non-cooperative game model is applied to quantify the node interests and decision-making behaviors, optimize the node matching, and complete the power transaction.
[0082] Details are as follows:
[0083] The power P2P trading model is designed based on the network layer, and the transaction is divided into pre-quotation, circular listing, system matching and final grid transaction stages. The non-cooperative game model is applied to quantify node interests and decision-making behaviors and optimize node matching.
[0084] The transaction cycle in step S2 is divided into four stages: pre-quotation stage, cyclic listing stage, system matching stage and power grid transaction stage.
[0085] The pre-quotation stage and the circular listing stage are the stages for bargaining among trading nodes, while the system matching stage and the power grid trading stage are the stages for clearing surpluses.
[0086] In the game process of the pre-quotation stage and the circular listing stage, each node has no constraints on each other when participating in the transaction, and the quotation strategy of each node is based on its own needs and interests. Therefore, the price game is closer to a non-cooperative game.
[0087] In the process of game, the principle of price priority and credit priority should be followed. That is, the electricity user with the highest bid will be matched with the power generator with the lowest bid. When there are multiple nodes of the same type with the same price, the node with the highest credit will enjoy the transaction priority.
[0088] like Figure 1 As shown, the electricity P2P transaction process:
[0089] Step S201: Pre-quotation stage, nodes pre-quote.
[0090] During the pre-quotation stage, the computer of the power trading center will publish the electricity sales price and power generation of the power generation node and the electricity purchase price and power demand of the power consumption node for reference by the trading nodes. The two parties to the transaction will modify their quotations based on the published transaction information and submit them to the computer of the power trading center.
[0091] The profit function of node j is:
[0092] R j =P j Q j -C j (Q j ) (1)
[0093] Where P j For quotation, Q j is the power, the strategy set of node j is S j = {P j ,Q j}, the strategy set of all nodes is S = S1 × S2 × … × S n ,C j (Q j ) is the cost function of node j.
[0094] Step S202: During the cyclic listing phase, the node adjusts the quotation, cyclically lists and completes the transaction until the listing transaction phase ends.
[0095] In the cyclic listing stage, the node adjusts its quotation according to the transaction information of the previous round, and reports it to the power trading center, which publishes it. The node selects the appropriate trading object to complete the transaction based on the latest published transaction information. When a round of listing ends: if all transaction demands in the market have been met, the transaction stage is completed, and the market remains open to accept new transaction demands; if there are still nodes that have not completed transactions, these nodes adjust their own quotations according to the current quotation situation and enter the next round of listing transactions. Listing transactions continue to cycle before the preset time deadline until the listing transaction stage ends.
[0096] Step S203: During the system matching stage, the computer of the power trading center conducts system negotiation and matching transactions based on the untraded electricity and quotations, returns the system negotiation and matching transaction intentions to the remaining nodes, and inquires about the transaction opinions. If the two parties reach an agreement, the transaction is completed; at the end of the system matching stage, the unfinished transaction demand is regarded as the remaining supply and demand electricity.
[0097] After the node listing phase ends, if some nodes still fail to complete the transaction after the cycle listing phase ends, the system matching phase will begin. At this time, the power trading center conducts system game and matching transactions based on the untraded electricity and quotations. The power trading center returns the system game and matching transaction intention to the remaining nodes and asks for transaction opinions. If the two parties reach an agreement, the transaction is completed. If no agreement is reached, the unmet transaction demand will be turned to the power grid for resolution.
[0098] The goal of the system matching is to maximize the total profit of the non-trading nodes: max∑ j∈N R j
[0099] The constraints are: P min ≤P j ≤P max Q min ≤Q j ≤Q max
[0100] Step S204: During the power grid transaction phase, the power grid receives the remaining supply and demand electricity during the system matching phase and completes the transaction closed loop.
[0101] The transaction demands that are not completed in the system matching stage enter the power grid transaction link. The power grid receives the remaining supply and demand electricity and completes the transaction closed loop, thereby ensuring the basic needs of the node.
[0102] In the process of game, the principle of price priority and credit priority should be followed. That is, the electricity user with the highest bid will be matched with the power generator with the lowest bid. When there are multiple nodes of the same type with the same price, the node with the highest credit will enjoy the transaction priority.
[0103] Step S3: Calculate the node credit value and penalty based on the credit incentive mechanism, allocate the penalty, and settle the transaction amount according to the current transaction electricity volume.
[0104] like Figure 2 As shown, the specific division of step S3 includes the following steps:
[0105] Step S301: When the transaction parties reach the transaction time, the computer at the power trading center initiates the verification work and the verification node starts the verification.
[0106] Step S302: The verification node determines whether there is a breach of contract.
[0107] Step S3021: When both parties to the transaction do not breach the contract, that is, the power generation node generates the specified amount of electricity in accordance with the contract and the power consumption node uses the specified amount of electricity in accordance with the contract, the computer of the power trading center transfers the transaction funds specified in the contract to the power generation node account, and the two parties deliver according to the contract.
[0108] Step S3022: When any party to the transaction breaches the contract, that is, the power generation node fails to generate the specified amount of electricity as agreed in the contract or the power consumption node fails to use the specified amount of electricity as agreed in the contract, the transaction is treated as a breach of contract, and the corresponding credit deduction value U of the breaching node is calculated based on formula (2) and formula (3): z , deduct and update the credit value and obtain the current credit value, and calculate the penalty payable for settlement based on equations (4) to (8) and the current credit value; after the computer of the power trading center completes the allocation of penalty according to equation (9), the transaction amount is settled according to the current transaction electricity volume.
[0109] Details are as follows:
[0110] A node credit incentive mechanism is established based on the regulatory layer module. By constructing a performance credit function and a verification reward function, the credit level of the node is dynamically evaluated to reduce default behavior.
[0111] The performance credit in step S3 refers to the credit reflected by the two parties in fulfilling the contractual agreement during the power transaction process. As a power generation node, if the power generation is not completed in accordance with the power consumption specified in the contract within the specified time, the power consumption node needs to purchase power from the power grid to fill the gap in the power consumption of the power generation node, thereby causing losses to the power consumption node. As a power consumption node, if the power consumption is not purchased in accordance with the power consumption specified in the contract within the specified time, the power generation node needs to sell the remaining power to the power grid or other nodes, thereby causing losses to the power generation node.
[0112] Set the initial performance credit value of all on-chain nodes to For the convenience of calculation, take
[0113] If a power generation node or a power consumption node defaults in the zth transaction, its credit deduction value U z Determined according to the number of defaults i, if there is no transaction default, the credit deduction value is 0, the formula is:
[0114]
[0115] In formula (2), Q treaty is the transaction volume agreed upon by both parties in the smart contract, Q deal is the actual transaction power of the node, where U iis the credit deduction value of the node in the i-th default transaction, and its calculation formula is:
[0116]
[0117] Formula (3) uses the Fibonacci sequence, that is, when a node defaults for the first and second time, 1 credit point is deducted; when the number of defaults i>2, the deducted credit value is the sum of the i-1st and i-2nd credit deduction values.
[0118] For nodes participating in the transaction, the node fulfillment credit value is:
[0119]
[0120] In formula (4), are the node fulfillment credit values generated by node j after the zth and z-1th transactions respectively.
[0121] Verification reward credit refers to the credit generated when the central node allocates part of the regulatory rights to the nodes participating in the transaction, and the nodes participating in the verification complete the verification work in compliance with the credit election. The nodes that perform verification work may have certain illegal verification behaviors, that is, verifying unreasonable transaction behaviors or incorrectly verifying the performance of the node. In order to reduce illegal verification behaviors, the verification work is linked to the penalty electricity price to incentivize the nodes to complete the verification work. The verification reward credit function improved by the Sigmoid function is as follows:
[0122]
[0123] In formula (5), C j verification is the verification reward credit value of node j, n is the number of consecutive successful verifications of the verification node; k1 is the control coefficient of node j. Generally speaking, k1∈[0,5]. When the value is small, the growth rate will slow down, and when it is large, the reward will increase rapidly. The larger the value, the greater the verification reward credit value, and the lower the credit penalty electricity price.
[0124] If a breach of contract occurs, the penalty electricity price P is calculated:
[0125]
[0126] In formula (6), P treaty The contract price for trading; is the initial value of the performance credit of all nodes on the chain. For the convenience of calculation, k2 is the credit recovery coefficient, k2∈[0,5], k2=0 means that credit recovery is completely stopped and the node cannot restore its credit value; k2=5 means that the credit value of the node can be completely restored to its original state after each fulfillment.
[0127]
[0128] In formula (7), β is the credit cost influencing factor, β∈[0,1]. Too high β may lead to unnecessary electricity price fluctuations, while too low β may reduce the incentive effect of credit recovery. g is the credit supplement constant, which is usually set to g∈[1,3] so that the node can obtain sufficient incentives when fulfilling its contract without excessively increasing the system burden.
[0129] When the node fulfills its contract credit C z j When it is less than 100, the node needs to punish the electricity consumption that it has not fulfilled. The method of determining and allocating the penalty T is as follows:
[0130]
[0131] In formula (8), P is the penalty electricity price, Q treaty is the transaction volume agreed upon by both parties in the smart contract, Q deal It is the actual transaction power of the node.
[0132]
[0133] In formula (9), T a is the liquidated damages paid by the breached party; μ is the compensation control coefficient, μ∈[0,1); N is the total number of nodes participating in the transaction on the blockchain; The penalty for the N-2 nodes participating in the allocation is allocated according to their credits; It is the fulfillment credit value of each node participating in the allocation.
[0134] If one party breaches the contract in a transaction, in order to protect the rights and interests of the breached party, the liquidated damages T will be divided according to the proportion μ and then compensated. At the same time, considering that all nodes on the chain bear the same responsibilities and obligations for maintaining the operation of the trading platform, the remaining liquidated damages T after the division will be weighted and distributed to the remaining nodes on the chain according to the credit value, so that all nodes involved in blockchain security maintenance and transaction work can obtain certain incentive compensation. If both parties in the transaction breach the contract, μ=0, and the liquidated damages will be distributed to the remaining nodes on the chain, and the breaching parties will not participate in the distribution.
[0135] As shown in Table 1, the data is generated by the power transaction simulation model based on the alliance chain. The simulation environment uses the MATLAB 2018 version. The performance credit value C of the power generation node and the power consumption node before the transaction z jThe values are 100 and 90 respectively, simulating 15 consecutive trading periods for power generation nodes and power consumption nodes. The power generation nodes undertake the verification work in each trading period, and the price fluctuation range is 0.64-0.68 yuan / (kW·h) to simulate the dynamic changes of node credit value in real power trading scenarios.
[0136] Table 1: Credit incentive mechanism simulation data table
[0137]
[0138] As shown in Table 2, data is generated in a transaction simulation scenario through a credit incentive mechanism. The specific rules and algorithm implementations are shown in equations (2) to (9), which are used to verify the rationality of the performance credit and verification reward mechanism in this application. Among them, k1=5, k2=5, g=3, and the simulation data are shown in Tables 1 and 2.
[0139] Table 2: Simulated node performance credit table;
[0140]
[0141] (1) The power generation node and the power consumption node breach the contract in the 2nd, 13th, and 15th trading periods and in the 1st, 3rd, 4th, and 15th trading periods respectively; the power generation node breaches the contract in the 2nd and 13th trading periods, and the transaction volume agreed by both parties is Q treaty The actual power generation of the power generation node is not equal, but since the performance credit value of the previous trading period is 100, only the credit value is deducted in this transaction, and no penalty is imposed;
[0142] (2) In the 15th trading period, both parties to the transaction breached the contract, but the performance credit value of the power generation node was 98, which was higher than the performance credit value of the power consumption node, 86, and the power generation node completed the verification work for 8 consecutive times. Therefore, the penalty electricity price of the power generation node was lower than the penalty electricity price of the power consumption node. Good performance and work quality can bring more economic benefits to the node. It can be seen that the credit incentive mechanism can effectively motivate nodes to actively maintain their own credit, improve performance, and realize positive incentives and autonomous management of node credit;
[0143] (3) When no breach of contract occurs in all transactions as shown in Tables 1 and 2, no penalty electricity price is generated for the node; when a breach of contract occurs in a transaction, the node can be punished according to the provisions based on the node's performance credit value and verification work. It can be seen that the credit incentive mechanism has certain fairness and rationality, and can achieve the purpose of prompting nodes to actively perform verification work and improve their own credit value, which is consistent with expectations.
[0144] Beneficial technical effects: Compared with the prior art, this application has the following advantages:
[0145] This application helps to effectively manage transactions between nodes, strengthen the constraints on node transaction behavior, and plays an important role in promoting the development of distributed energy and the consumption of clean energy. Both parties to the transaction can freely choose the transaction object on the platform. At the same time, the platform also provides matching services for the remaining untraded nodes to ensure that the node power is cleared as much as possible, improve the transaction efficiency and stability of the system, and promote the sustainable development of new energy technologies.
Claims
1. A method for electricity trading based on blockchain, characterized in that: The following steps are included: Step S1: constructing a power trading platform system, which includes a consortium chain module, a network layer module, a regulatory layer module and an external physical layer module; Step S2: Divide the transaction into the pre-quotation stage, the circular listing stage, the system matching stage and the grid transaction stage, apply the non-cooperative game model to quantify the node interests and decision-making behaviors, optimize the node matching, and complete the power transaction; Step S3: Calculate the node credit value and penalty based on the credit incentive mechanism, allocate the penalty, and settle the transaction amount according to the current transaction electricity volume.
2. A method for power trading based on blockchain according to claim 1, characterized in that: In step S1, the alliance chain module includes a support module, a contract module and a consensus module. The support module is used to store the underlying data supporting the operation of the blockchain, the data propagation mechanism, P2P networking and data verification; the contract module is used to store the smart contract information of the blockchain; the consensus module is used to store the consensus mechanism for the operation of the alliance chain.
3. A method for power trading based on blockchain according to claim 1, characterized in that: In step S1, the network layer module includes a basic module, a data module and a transaction management module. The basic module includes a network system, a computer, a storage device and a security device; the data module is used to store system data, and the system data includes a database and data backup as well as user information and transaction information related to the user; the transaction management module is used to process and integrate the applications required for related node transactions, and the applications include account registration, information release, contract generation, transmission management and financial calculations.
4. A method for electricity trading based on blockchain according to claim 1, characterized in that: In step S1, the physical layer module includes power generation nodes and power consumption nodes, the power generation nodes include bus nodes, photovoltaic nodes and wind power nodes, and the power consumption nodes include residential power consumption nodes, commercial power consumption nodes and agricultural power consumption nodes; The regulatory layer module includes a credit management module, which is used to store the user's credit evaluation function model and credit incentive mechanism, and complete transaction review, credit calculation, credit review and credit evaluation, as well as verification rewards for ordinary nodes; the nodes include central nodes, verification nodes and ordinary nodes. The computer of the power trading center is the central node in the credit incentive mechanism, and the power generation node or the power consumption node is the ordinary node. The central node allocates the regulatory rights to the ordinary nodes participating in the transaction. The ordinary node becomes the verification node through credit election. The verification node supervises the transactions of other ordinary nodes, and the central node rewards the verification node.
5. A method for power trading based on blockchain according to claim 1, characterized in that: The step S2 specifically includes the following steps: Step S201: pre-quotation stage, node pre-quotation; Step S202: During the cyclic listing phase, the node adjusts the quotation, cyclically lists and completes the transaction until the listing transaction phase ends; Step S203: In the system matching stage, the computer of the power trading center conducts system negotiation and matching transactions based on the untraded electricity and the quotation, returns the system negotiation and matching transaction intention to the remaining nodes, and asks for transaction opinions. If the two parties reach an agreement, the transaction is completed; at the end of the system matching stage, the unfinished transaction demand is regarded as the remaining supply and demand electricity; Step S204: During the power grid transaction phase, the power grid receives the remaining supply and demand electricity during the system matching phase and completes the transaction closed loop.
6. A method for electricity trading based on blockchain according to claim 1, characterized in that: The step S3 specifically includes the following steps: Step S301: When the transaction time is reached, the verification work is initiated and the verification node starts the verification; Step S302: The verification node determines whether there is a breach of contract; Step S3021: When both parties to the transaction do not breach the contract, that is, the power generation node generates the specified amount of electricity in accordance with the contract and the power consumption node uses the specified amount of electricity in accordance with the contract, the transaction funds specified in the contract are transferred to the power generation node account, and both parties settle the transaction in accordance with the contract; Step S3022: When any party to the transaction breaches the contract, that is, the power generation node fails to generate the specified amount of electricity as agreed in the contract or the power consumption node fails to use the specified amount of electricity as agreed in the contract, the transaction will be treated as a breach of contract, and the corresponding credit deduction value of the breaching node will be calculated, the credit value will be deducted and updated to obtain the current credit value, and the penalty payable for settlement will be calculated based on the current credit value; after the penalty allocation is completed, the transaction amount will be settled according to the current transaction electricity.
7. A method for power trading based on blockchain according to claim 6, characterized in that: In step S3022, the credit deduction value U corresponding to the default node is calculated based on equations (2) and (3): z , Set the initial performance credit value of all on-chain nodes to Pick If a power generation node or a power consumption node defaults in the zth transaction, its credit deduction value U z Determined according to the number of defaults i, if there is no transaction default, the credit deduction value is 0. In formula (2), Q treaty is the transaction volume agreed upon by both parties in the smart contract, Q deal is the actual transaction power of the node, U i is the credit deduction value of the node in the i-th default transaction, Formula (3) uses the Fibonacci sequence, that is, when a node defaults for the first and second time, 1 credit point is deducted; when the number of defaults i>2, the deducted credit value is the sum of the i-1st and i-2nd credit deduction values.
8. A method for power trading based on blockchain according to claim 7, characterized in that: In step S3022, the penalty payable for settlement is calculated based on equations (4) to (8) and the current credit value. For nodes participating in the transaction, the node fulfillment credit value is: In formula (4), are the node fulfillment credit values generated by node j after the zth and z-1th transactions respectively; In formula (5), is the verification reward credit value of node j, n is the number of consecutive successful verifications of the verification node; k1 is the control coefficient of node j, generally speaking, k1∈[0,5]. When the value is small, the growth rate will slow down, and when it is large, the reward will increase rapidly. The larger the value, the greater the verification reward credit value, and the lower the credit penalty electricity price; If a breach of contract occurs, the penalty electricity price P is calculated: In formula (6), P treaty The contract price for trading; is the initial value of the performance credit of all nodes on the chain, k2 is the credit recovery coefficient, k2∈[0,5], k2=0 means that credit recovery is completely stopped and the node cannot recover its credit value; k2=5 means that the credit value of the node can be completely restored to its original state after each fulfillment; In formula (7), β is the credit cost influencing factor, β∈[0,1]. Too high β may lead to unnecessary electricity price fluctuations, while too low β may reduce the incentive effect of credit recovery. g is the credit supplement constant, which is usually set to g∈[1,3] so that the node can obtain sufficient incentives when fulfilling the contract, but will not excessively increase the system burden. When the node fulfills the credit When it is less than 100, the node needs to punish the electricity consumption that it has not fulfilled. The method of determining and allocating the penalty T is as follows: In formula (8), P is the penalty electricity price, Q treaty is the transaction volume agreed upon by both parties in the smart contract, Q deal It is the actual transaction power of the node.
9. A method for power trading based on blockchain according to claim 8, characterized in that: In step S3022, the penalty allocation is completed according to formula (9): In formula (9), T a is the liquidated damages paid by the breached party; μ is the compensation control coefficient, μ∈[0,1); N is the total number of nodes participating in the transaction on the blockchain; The penalty for the N-2 nodes participating in the allocation is allocated according to their credits; It is the fulfillment credit value of each node participating in the allocation.
10. A method for electricity trading based on blockchain according to claim 9, characterized in that: In step S3022, if one party breaches the contract in the transaction, the liquidated damages T will be divided according to the ratio μ and compensated to the non-breaching party; the remaining liquidated damages T after the division will be weighted and distributed to the remaining nodes on the chain according to the credit value, so that all nodes involved in blockchain security maintenance and transaction work can obtain incentive compensation; if both parties in the transaction breach the contract, μ=0, and the liquidated damages will be distributed to the remaining nodes on the chain, and the breaching parties will not participate in the distribution.