Permission block chain power transaction method and system based on multi-factor consensus mechanism
By constructing a permission-based blockchain power trading method with a multi-factor consensus mechanism, the problem of limited scheduling efficiency in distributed power generation peer-to-peer trading is solved, achieving efficient scheduling under high-frequency trading and complex power grid structures, and is suitable for high-reliability power markets.
Patent Information
- Application Number
- CN202511668438.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies have limited dispatch efficiency in distributed generation peer-to-peer trading, especially in high-frequency trading or complex power grid structures, and are not suitable for power market environments with high reliability requirements.
A permission-based blockchain power trading method based on a multi-factor consensus mechanism is adopted. By constructing a distribution network topology model, a global linear power flow model, power conservation and antisymmetry constraints, and a dynamic transaction cost function, a unified optimization model is built. The distributed alternating direction multiplier method is used to optimize the transaction power, generate the optimal transaction power, and complete the on-chain transaction data based on the multi-factor consensus mechanism.
It improves dispatch efficiency in high-frequency trading or complex power grid structures, is suitable for power market environments with high reliability requirements, and enhances transaction response speed and system robustness.
Smart Images

Figure CN121504609A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of blockchain and power trading technology, specifically to a permissioned blockchain power trading method and a permissioned blockchain power trading system based on a multi-factor consensus mechanism. Background Technology
[0002] In related technologies, when conducting peer-to-peer transactions of distributed power sources, optimization is usually based on a single dimension, such as price prediction, supply and demand matching, or data security. This results in limited dispatch efficiency under high-frequency trading or complex power grid structures, and it is not suitable for power market environments with high reliability requirements. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a permission-based blockchain power trading method based on a multi-factor consensus mechanism. By unifying and integrating power physical constraints and user behavior preferences, and introducing smart contracts and consensus mechanisms, a resource-driven unified optimization scheduling framework is formed. A trading mechanism linked with a global linear power flow model is constructed, thereby greatly improving scheduling efficiency in high-frequency trading or complex power grid structures, and is suitable for power market environments with high reliability requirements.
[0004] The technical solution adopted in this invention is as follows: A permissioned blockchain power trading method based on a multi-factor consensus mechanism includes the following steps: constructing a distribution network topology model and establishing a global linear power flow model based on the distribution network topology model; constructing power conservation and antisymmetry constraints in point-to-point energy trading and introducing a trading preference factor to construct a dynamic transaction cost function; constructing a unified optimization model based on the power grid topology model, the global linear power flow model, the power conservation and antisymmetry constraints, and the dynamic transaction cost function; using the distributed alternating direction multiplier method to optimize the trading power based on the unified optimization model to generate the optimal trading power; and completing the on-chain transaction data according to the optimal trading power based on the multi-factor consensus mechanism and generating a corresponding blockchain ledger.
[0005] In one embodiment of the present invention, the permission-based blockchain power trading method based on a multi-factor consensus mechanism further includes the following steps: on the basis of the generated blockchain ledger, constructing a system security verification and fork resolution mechanism.
[0006] In one embodiment of the present invention, the global linear power flow model is generated using the following formula: , in, This represents the voltage vector of all buses except the reference bus in the power distribution network topology model. This represents the resistance mapping matrix of the branches in the power distribution network topology model. This represents the active power vector injected into the corresponding node of the branch in the power distribution network topology model. This represents the reactance mapping matrix of the branches in the power distribution network topology model. This represents the reactive power vector injected into the corresponding node of the branch in the power distribution network topology model. This indicates that the bus-branch correlation matrix in the power distribution network topology model has been reduced by the first... Submatrix after the row, This represents the normalized voltage value of the reference bus.
[0007] In one embodiment of the present invention, the power conservation and antisymmetry constraints are constructed using the following formula: , in, This represents the active power injected into node i of the branch in the power distribution network topology model at time t. Let represent the power exchanged between node j (corresponding to a branch) and node i at time t in the power distribution network topology model. This represents the set of transaction neighbors of node i corresponding to a branch in the power distribution network topology model. Let represent the power exchanged between node i and node j at time t in the power distribution network topology model.
[0008] In one embodiment of the present invention, a dynamic transaction cost function is constructed using the following formula: , in, This represents the transaction preference factor of node i to node j at time t in the power distribution network topology model. This represents the dynamic transaction cost of node i corresponding to a branch in the power distribution network topology model at time t.
[0009] In one embodiment of the present invention, the objective optimization function of the unified optimization model is generated by the following formula: , in, This represents the total cost of node i corresponding to a branch in the power distribution network topology model at time t. This represents the quadratic coefficient of the total cost function for node i corresponding to a branch in the power distribution network topology model. This represents the first-order coefficient of the total cost function for node i corresponding to a branch in the power distribution network topology model.
[0010] A permissioned blockchain power trading system based on a multi-factor consensus mechanism includes: a first construction module for constructing a distribution network topology model and establishing a global linear power flow model based on the distribution network topology model; a second construction module for constructing power conservation and antisymmetry constraints in point-to-point energy trading and introducing a trading preference factor to construct a dynamic trading cost function; a third construction module for constructing a unified optimization model based on the power grid topology model, the global linear power flow model, the power conservation and antisymmetry constraints, and the dynamic trading cost function; a first generation module for using a distributed alternating direction multiplier method to optimize the trading power based on the unified optimization model to generate the optimal trading power; and a second generation module for uploading trading data to the blockchain based on the optimal trading power according to the multi-factor consensus mechanism and generating a corresponding blockchain ledger.
[0011] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned permission-based blockchain power trading method based on a multi-factor consensus mechanism.
[0012] A non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned permissioned blockchain power trading method based on a multi-factor consensus mechanism.
[0013] The beneficial effects of this invention are: This invention integrates power physical constraints and user behavior preferences into a unified scheduling framework, and introduces smart contracts and consensus mechanisms to form a resource-driven unified optimization scheduling framework. It also constructs a trading mechanism that is linked to the global linear power flow model, thereby greatly improving the scheduling efficiency in high-frequency trading or complex power grid structures, and is suitable for power market environments with high reliability requirements. Attached Figure Description
[0014] Figure 1 This is a flowchart of a permission-based blockchain power trading method based on a multi-factor consensus mechanism, according to an embodiment of the present invention. Figure 2 This is an architecture diagram of a distributed energy trading system according to a specific embodiment of the present invention; Figure 3 This is a block diagram of a permission-based blockchain power trading system based on a multi-factor consensus mechanism, according to an embodiment of the present invention. Figure 4This is a block diagram of a permission-based blockchain power trading system based on a multi-factor consensus mechanism, according to an embodiment of the present invention. Detailed Implementation
[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] Figure 1 This is a flowchart illustrating the permission-based blockchain power trading method based on a multi-factor consensus mechanism, as described in an embodiment of the present invention.
[0017] like Figure 1 As shown, the permission-based blockchain power trading method based on a multi-factor consensus mechanism according to an embodiment of the present invention may include the following steps: S1. Construct a distribution network topology model and establish a global linear power flow model based on the distribution network topology model.
[0018] Specifically, a power distribution network can be represented as a directed acyclic graph, where the set of buses is denoted as . , (1) Among them, bus 0 is the reference node, and its voltage is quantized as a known constant.
[0019] The branch set is defined as , (2) Indicates node i to node It has an electrical connection and is directional.
[0020] To systematically describe the connection relationship between buses and branches, a bus-branch correlation matrix is introduced. , dimension For any branch Its correlation matrix with busbars and branches The corresponding column vector in the first position The row is assigned a value of +1, the first row... The row is assigned a value of -1, and the remaining elements are set to 1. .
[0021] Utilizing the existing network topology, in the branch resistance and branch road Reactance Under known conditions, based on the normalization of the bus voltage (assuming the reference bus voltage is...), And adopts the approximate linearization assumption. A linear relationship between bus voltage difference and branch power is established. For any branch... The voltage difference expression is established as follows: , (3) in, and Let i and j represent the voltages at nodes i and j, respectively. and Branch roads The active power and reactive power on the device.
[0022] The voltage difference relationship in formula (3) above is further rearranged into matrix form to obtain the global linear power flow model: , (4) in, This represents the voltage vector of all buses except the reference bus in the power distribution network topology model. This represents the resistance mapping matrix of a branch in a power distribution network topology model. This represents the active power vector injected into the corresponding node of a branch in a power distribution network topology model. This represents the reactance mapping matrix of a branch in a power distribution network topology model. This represents the reactive power vector injected into the corresponding node of a branch in a power distribution network topology model. This indicates that the bus-branch correlation matrix in the distribution network topology model has been removed after removing the first branch. Submatrix after the row, This represents the normalized voltage value of the reference bus.
[0023] in, , , and These represent the corresponding main diagonal matrices, with the diagonal elements representing the resistance of each branch. With reactance , express The generalized inverse matrix, express The transpose of the generalized inverse matrix of .
[0024] S2 constructs power conservation and antisymmetry constraints in peer-to-peer energy trading, and introduces a trading preference factor to construct a dynamic trading cost function.
[0025] Specifically, to accurately describe the coordination relationship between node power flow and traded power in a peer-to-peer energy trading mechanism, power conservation and antisymmetry constraints for the trade can be established. Let the active power injected by node i at time t be... The transaction power of node i to node j at time t is The following power conservation and antisymmetry constraints must be satisfied: , (5) in, This represents the active power injected into node i of a branch in the power distribution network topology model at time t. Let represent the power exchanged between node j and node i at time t in the distribution network topology model. This represents the set of transaction neighbors of node i corresponding to a branch in the power distribution network topology model. Let represent the power exchanged between node i and node j at time t in the power distribution network topology model.
[0026] Among them, antisymmetry constraint To ensure the bilateral balance of transactions, this constraint guarantees that the sum of the transaction power between any pair of nodes in both directions is zero, thereby ensuring that power exchange is physically equal.
[0027] S3 constructs a unified optimization model based on the power grid topology model, the global linear power flow model, power conservation and antisymmetry constraints, and the dynamic transaction cost function.
[0028] Specifically, when modeling the economic behavior of transactions between nodes, considering that their transaction decisions are influenced by historical interaction preferences, a transaction preference factor is introduced to construct a dynamic transaction cost function. Specifically, in one embodiment of the present invention, the dynamic transaction cost function is constructed using the following formula: , (6) in, This represents the transaction preference factor between node i and node j at time t in the distribution network topology model. This represents the dynamic transaction cost of node i at time t in the distribution network topology model, and represents the economic preference of the node in participating in point-to-point energy trading. The smaller the transaction preference factor, the more likely node i is to choose node j as its trading partner.
[0029] It should be noted that the trading preference factor can be dynamically updated based on historical trading information. Specifically, the trading preference factor can be updated using the following formula: , (7) in, Let represent the transaction preference factor of node i for node j at time t-1. and and represent the first preference factor adjustment parameter and the second preference factor adjustment parameter, respectively, which control the influence strength of historical contribution and node reputation. This represents a time evolution function, characterizing the trend of preference adjustment changing over time. This represents the transaction power of node i to node j at time t-1. Indicates a branch The transaction price at time t-1, This represents the verification index of node j at time t-1, which reflects its transaction stability and reputation level.
[0030] In one embodiment of the present invention, a unified optimization model can be established based on the integration of the electrical physical model, transaction power constraints, and transaction cost function driven by historical preferences. Specifically, the objective optimization function of the unified optimization model can be generated by the following formula: , (8) in, This represents the total cost of node i corresponding to a branch in the power distribution network topology model at time t. This represents the quadratic coefficient of the total cost function for node i corresponding to a branch in the distribution network topology model. This represents the first-order coefficient of the total cost function for node i corresponding to a branch in the power distribution network topology model.
[0031] In one embodiment of the present invention, the constraints of the unified optimization model may be: , (9) It should be noted that, in addition to satisfying the constraints of the above formula (9), the unified optimization model also needs to satisfy physical constraints such as the upper limit of node output and the bus voltage boundary. By integrating power network topology, transaction behavior mechanism and economic preference factors, this model provides a structurally rigorous input foundation and modeling framework for deploying distributed scheduling algorithms such as SASTF-ADMM.
[0032] S4 employs the distributed alternating direction multiplier method based on a unified optimization model to optimize and solve for transaction power, thereby generating the optimal transaction power.
[0033] Specifically, parameter initialization can be performed first. Specifically, to ensure the effectiveness and stability of the iterative solution process using the alternating direction multiplier method, initial states need to be set for the variables involved. This initialization operation is based on the linear power flow model and trading constraints, setting the initial injection power for each node i and time point t. and all branch roads The initial trading power is set to This satisfies the structural requirement of antisymmetric trading power.
[0034] In terms of the dual variables, the Lagrange multipliers are initialized to , as well as This provides initial relaxation control over system constraints. Among them, Indicates the branch road The initial Lagrange multipliers related to the power constraints of the transaction; Represents the initial Lagrange multiplier associated with the power balance constraint at node i; This represents the initial Lagrange multiplier associated with the capacity constraint of node i. Regarding algorithm parameters, the initial penalty factor... With initial step size coefficient It needs to be set to a positive value to ensure the convergence and stability of the iterative update; the introduced transaction preference factor of node i to node j Cost function coefficients used to reflect transaction preferences among nodes and This provides an economic basis for the subsequent construction of the objective function. Ultimately, the output initialization result includes a set of variables. This provides a foundation for iterative updates in subsequent steps.
[0035] Secondly, the trading power is updated. Specifically, the update of the trading power is based on minimizing the local objective function and depends on the state of various variables at the current iteration k. Based on the ADMM distributed framework, the update expression of the trading power is derived in closed form as follows: , (10) in, This represents the transaction power from node i to node j in the (k+1)th round. Indicates the first Rounds and Branches Lagrange multipliers related to power constraints in the trading process; Represents the penalty factor in the k-th round; In the k-th round, the branch is... Related auxiliary variables; This represents the Lagrange multiplier associated with the power balance constraint of node i in round k; This represents the Lagrange multiplier associated with the capacity constraint of node i in round k; This represents the auxiliary adjustment amount for node i in the k-th round.
[0036] Among them, the auxiliary adjustment amount of node i in the kth round It can be generated using the following formula: , (11) in, This represents the mapping coefficient between node i and bus b. Represents node i and branch The coupling coefficient, and These are the values of the bus-related variables and their auxiliary variables in the current cycle.
[0037] Then, the projection symbols are corrected. Specifically, to ensure the consistency between the directionality of transaction power and the node role, the transaction power from node i to node j in the (k+1)th round needs to be corrected. Perform symbolic projection correction. This operation is based on the node. In the system's role classification, if node i belongs to the producer set... Then its transaction power should be non-negative; if it is a set of consumers If the power is negative, then the trading power should be non-positive. This can be expressed by the following formula: , (12) Furthermore, the auxiliary variables are updated. To better satisfy the antisymmetric constraint of the trading power and support the parallel computing architecture, the auxiliary variables are updated based on the trading power update result and the current Lagrange multiplier state, using the following formula: , (13) in, This indicates the updated penalty factor.
[0038] Furthermore, the Lagrange multipliers are updated. Specifically, the update of the Lagrange multipliers aims at a gradual approximation of the antisymmetric constraint, employing a predictor-corrector mechanism and introducing a momentum acceleration strategy. First, the predicted Lagrange multipliers for the k-th round are calculated. Its expression is: , (14) The momentum factor is then updated using the following formula. : , (15) in, This represents the momentum factor in the k-th round.
[0039] The Lagrange multipliers are corrected to obtain the updated values for the next round, which can be achieved using the following formula: (16) Furthermore, the penalty factor is adaptively adjusted. Specifically, the penalty factor is dynamically adjusted based on the error index of the k-th round. This is to enhance the numerical stability and convergence of the ADMM iteration. The specific formula is as follows: , (17) , (18) , (19) in, Let i represent the set of state variables of node i in the k-th round. and These represent the corresponding penalty factor update adjustment coefficients. This represents the antisymmetric error in the (k+1)th round. This represents the state error in the (k+1)th round.
[0040] Furthermore, regarding the update of the step size coefficient, specifically, to further adjust the stability and convergence speed of the iteration process, the step size coefficient needs to be adjusted in a timely manner according to the iteration number k. Specifically, it can be updated using the following formula: , (20) in, This indicates the preset step size adjustment factor. The step size coefficient for the (k+1)th round after the update. Finally, a convergence check is performed. Specifically, after each iteration, the error index, namely the antisymmetric error in the (k+1)th iteration, is checked. and the state error in round k+1 Compare and determine if the termination condition is met. If it is met... ,and If the algorithm converges, it is considered to have achieved convergence, and the final optimal trading power distribution is output. Otherwise, return to the k-th round and recalculate. This represents the convergence threshold.
[0041] S5, based on a multi-factor consensus mechanism, completes the on-chaining of transaction data according to the optimal transaction power and generates the corresponding blockchain ledger.
[0042] Specifically, step S5 may include the following steps: S501, the node submits a resource description and generates a verification request.
[0043] Specifically, the system requires all participating nodes to submit structured descriptions of their computing power and resource status to initialize the consensus candidate node information pool. For any node i, the following resource metrics must be provided: a unique identifier. Computing resources (Unit: GHz), Storage Capacity (Unit: GB) Disposable Digital Assets Backup energy reserves (Unit: kWh) and public key The above parameters together constitute the node resource state vector: , (twenty one) Among them, node i will It is encapsulated as a resource verification request and submitted to the resource verification request pool as input for the subsequent block proposal node selection and scoring.
[0044] S502, calculate the probability of a node being selected.
[0045] By constructing a multi-factor weighted model, all nodes that have submitted resource information are evaluated to generate a probability distribution of their selection as new block proposers. Let the set of participating consensus nodes be denoted as . Then the set of all node resources can be represented as: , (twenty two) The system defines a set of nodes i in the resource dimension Weighting coefficients ,in These correspond to four categories of indicators: computing resources, storage capacity, available digital assets, and backup energy reserves.
[0046] For any node The probability of it being selected as a proposal node. Calculate using the following formula: , (twenty three) in, Indicates that node i is in dimension Resource value on; This represents the total resources of all nodes under this resource dimension.
[0047] After the calculation is complete, output the set of node election probabilities. .
[0048] S503, selection of block production nodes and generation of new blocks.
[0049] Specifically, after constructing the node probability distribution, the system selects the winning node from all candidate nodes through a weighted random sampling mechanism. This is used to execute the block proposal task for the current round. The sampling is based on a set. Select the winning node. Then, construct the first Wheel Block The block data structure can be represented by the following formula: ,(twenty four) in, Indicates the first Winning node number in each round; For hash digest functions; Indicates the first Hash digest operations for round blocks; Indicates the first Round of transactions set; Represents a node Sign the block; Represents the block generation timestamp, symbol " The ">" operator represents the data concatenation operator. The output is a new structured block of data. .
[0050] S504, New Block Broadcast and Consensus Verification.
[0051] Specifically, the new block From the winning node Broadcast to all network nodes The accepting node uses a known node public key. Verify the signature in the new block The validity of the digital signature. If the digital signature verification passes, node j returns a vote response. Otherwise, do not respond or return a negative flag.
[0052] The system sets the consensus threshold to be a percentage of confirmed votes exceeding 70% among all nodes, i.e.: , (25) in, This indicates an indicator function. The value is set to 0 if the condition in the indicator function is true, and otherwise the value is 0. This represents the total number of nodes currently participating in the consensus process; It represents the set of all network nodes.
[0053] If the conditions of formula (25) are met, then the new block is considered to be... Once a consensus is reached, proceed to the ledger registration process; if not, the current round is invalidated, and the process is rolled back to step S502 to restart the node selection process.
[0054] S505, blocks are written to the ledger and transaction status is recorded.
[0055] Specifically, when the new block After the consensus verification confirms the validity, each participating node j will create a new block. Added to its local ledger copy The tail of the ledger. Ledger update operations can be represented by the following formula: , (26) in, This represents the k-th historical block on the blockchain. The system can enable a ledger state synchronization mechanism, allowing nodes to periodically compare the ledger structure with the main chain, selecting and retaining the longest valid chain to enhance consistency guarantees. Furthermore, all optimal transaction power... It will be embedded in the blockchain structure to ensure the traceability and immutability of transaction status across the network.
[0056] Therefore, this invention, based on the power network topology and linear power flow model, constructs a unified optimization scheduling framework and considers the dynamic transaction cost function of nodes' historical transaction preferences. It employs the distributed alternating direction multiplier method to efficiently optimize transaction power, achieving coordinated scheduling of power flow, voltage constraints, and transaction behavior under complex multi-node power grid structures. This solves the problem of limited scheduling efficiency caused by the failure to uniformly model physical constraints and economic preferences in existing technologies, and improves the transaction response speed and system robustness in the power market environment.
[0057] Furthermore, in one embodiment of the present invention, the permission-based blockchain power trading method based on a multi-factor consensus mechanism further includes the following steps: S6, on the basis of the generated blockchain ledger, constructing a system security verification and fork resolution mechanism.
[0058] Specifically, based on the generated blockchain ledger, a security assessment and ledger consistency control mechanism for decentralized system operating environments is constructed. The goal is to achieve multi-dimensional resource-driven node election anti-attack analysis, node identity authenticity verification, and anti-tampering guarantee mechanism for transaction data writing process, and to establish ledger synchronization and fork resolution strategies, thereby enhancing the system's proactive defense capabilities against malicious manipulation, resource hijacking, and data inconsistency issues.
[0059] In one embodiment of the present invention, step S6 may include the following steps: S601, Analysis of Node Election Resistance to Attacks.
[0060] Specifically, this quantitatively assesses the probability that, under a multi-resource weighted election mechanism, any group of nodes in the system could be hijacked by a malicious controller and continuously maintain control over block production rights. This includes assessing the probability of an attacker's node set existing. In dimension Total resources are Then the attacker will be in the number of consecutive block production rounds. Probability of continued election This can be expressed by the following formula: , (27) in, The elements in the table represent computing resources, storage capacity, available digital assets, and backup energy reserves, respectively. Indicates that node q is in dimension The resource value on it.
[0061] By controlling Approaching zero, this means that attackers cannot control block production rights for a long time under multiple resource weight combinations, thus verifying that the system has the ability to resist resource-centralized attacks.
[0062] S602, False Identity Recognition and Sybil Attack Suppression.
[0063] To effectively limit node spoofing and prevent Sybil attacks, a verification mechanism based on physical access metadata and horizontal resource consistency is introduced, establishing a full-process verification system from identity registration to consensus. During verification, the system executes the following logic: by comparing resource usage patterns and physical access characteristics among nodes, it identifies… Repeated registration or resource reuse is detected; based on a pre-set intelligent decision rule base, suspected forged nodes are further denied access. Finally, a set of legitimate nodes is generated. This limits each entity to having only one valid identity in the network, thereby reducing the risk of voting manipulation or consensus hijacking caused by the injection of fake nodes.
[0064] S603, ledger synchronization and fork resolution mechanism.
[0065] To ensure the consistency of the blockchain ledger across the entire network, a chain state synchronization mechanism based on periodic broadcasting and the majority-priority principle of consensus tickets is constructed. The main chain ledger is broadcast by the operators, denoted as... Every The unified broadcast is performed once per round; any node j locally maintains the ledger status as follows. When node j receives its own... After the main chain broadcast, the first step is to process the local ledger copy of node j. The node compares its state with the broadcast ledger state. If a difference in ledger structure is detected, the node performs consensus branch vote counting locally, selecting the ledger branch with the highest number of votes in the fork structure, and recording it as the [branch name missing]. This synchronization operation updates the local ledger to match the main chain branch. The update method can be expressed by the following formula: , (28) When all node ledgers satisfy the following formula: , (29) This means that the entire network ledger has achieved on-chain data consistency. This mechanism can effectively suppress forked chain problems caused by network latency, orphan block generation, or double-spending attacks, achieving robust control over ledger consistency.
[0066] S604, Transaction data writing and anti-tampering verification.
[0067] To ensure the integrity and non-repudiation of transaction data writing, a signature binding and network-wide verification mechanism is constructed to ensure that transaction content within a block cannot be maliciously tampered with. Let the... The winning node of the round-robin block is It is responsible for building blocks and the optimal trading power Write to the Round transaction set To ensure the authenticity of the data source, the winning node... Use its private key Sign the block content to generate a block signature. .
[0068] After receiving a new block, other network nodes call the digital signature verification function: , (30) in, This represents the signature verification function. Indicates the winning node The public key is used for signature verification; once the signature is verified, the transaction data has been accepted by the network and is tamper-proof. This mechanism ensures that the data uploaded to the blockchain is traceable in origin, trustworthy in content, and non-repudiable in operation.
[0069] In a specific embodiment of the present invention, the architecture diagram of the distributed energy trading system can be as follows: Figure 2 As shown, the system consists of three main layers: an application service layer, a communication network layer, and a physical network layer. This three-layer structure supports parallel interaction between energy and information, realizing a decentralized energy trading mechanism. In the physical network layer, the system includes various energy production nodes (distributed photovoltaic power stations, wind power clusters, biomass power stations, and hydrogen power generation facilities), energy storage nodes (battery storage stations and pumped storage stations), and various types of energy consumers (smart home users, commercial building clusters, industrial parks, electric vehicle clusters, and agricultural facilities), as well as a main grid connection point. These physical nodes exchange energy through the energy flow represented by the thick red line, forming a complete energy network. The communication network layer consists of a blockchain network and multiple consensus nodes, which are responsible for realizing information interaction and data sharing within the system. The blockchain network, as the core element, achieves decentralized information transmission through a peer-to-peer communication mechanism and employs the multi-dimensional weighted consensus mechanism proposed in this invention to handle consensus among nodes. The application service layer provides rich functional services, including an energy trading market, settlement and payment services, an energy forecasting system, a smart contract engine, a credit assessment system, and a regulatory and auditing platform. In addition, auxiliary components such as weather forecasting, load forecasting, and market analysis are used to enhance the system's forecasting capabilities.
[0070] Therefore, this invention, based on a multi-factor driven permission-based blockchain mechanism, constructs a node election model by introducing multi-dimensional resource indicators such as computing resources, storage capacity, backup energy, and digital assets. It combines node reputation and transaction contribution to calculate the probability of block proposal rights, achieving a more flexible and attack-resistant consensus mechanism design. This solves the problem in existing technologies where a single consensus algorithm makes it difficult to balance network security and decentralization performance, enhancing the system's defense against resource manipulation, pseudo-identity attacks, and centralized node control. Furthermore, by embedding the optimized transaction power results into the multi-factor consensus-driven blockchain ledger, and combining signature verification, broadcast consensus, and ledger synchronization mechanisms, this invention ensures that transaction records are traceable, immutable, and verifiable in a distributed environment. This effectively solves the problems of insufficient transaction data credibility and difficulty in guaranteeing record consistency in existing technologies, improving the data security and business transparency of the power trading system. It is suitable for new power market scenarios with high-frequency, low-latency, and high-reliability requirements.
[0071] In summary, the permission-based blockchain power trading method based on a multi-factor consensus mechanism according to embodiments of the present invention constructs a distribution network topology model, establishes a global linear power flow model based on the distribution network topology model, constructs power conservation and antisymmetry constraints in point-to-point energy trading, introduces a trading preference factor to construct a dynamic transaction cost function, and constructs a unified optimization model based on the power grid topology model, the global linear power flow model, power conservation and antisymmetry constraints, and the dynamic transaction cost function. A distributed alternating direction multiplier method is used to optimize the trading power based on the unified optimization model to generate the optimal trading power. Finally, based on the multi-factor consensus mechanism, the transaction data is uploaded to the blockchain according to the optimal trading power, and a corresponding blockchain ledger is generated. Thus, by unifying and integrating power physical constraints and user behavior preferences, and introducing smart contracts and consensus mechanisms, a resource-driven unified optimization scheduling framework is formed, and a trading mechanism linked with the global linear power flow model is constructed. This significantly improves scheduling efficiency in high-frequency trading or complex power grid structures and is suitable for power market environments with high reliability requirements.
[0072] Corresponding to the permission-based blockchain power trading method based on a multi-factor consensus mechanism in the above embodiments, this invention also proposes a permission-based blockchain power trading system based on a multi-factor consensus mechanism.
[0073] like Figure 3 As shown, the permission-based blockchain power trading system based on a multi-factor consensus mechanism according to an embodiment of the present invention may include: a first construction module 100, a second construction module 200, a third construction module 300, a first generation module 400, and a second generation module 500.
[0074] The system comprises the following modules: a first construction module 100 for constructing a distribution network topology model and establishing a global linear power flow model based on the distribution network topology model; a second construction module 200 for constructing power conservation and antisymmetry constraints in point-to-point energy trading and introducing a trading preference factor to construct a dynamic trading cost function; a third construction module 300 for constructing a unified optimization model based on the power grid topology model, the global linear power flow model, power conservation and antisymmetry constraints, and the dynamic trading cost function; a first generation module 400 for using the distributed alternating direction multiplier method to optimize the trading power based on the unified optimization model to generate the optimal trading power; and a second generation module 500 for using a multi-factor consensus mechanism to upload the trading data to the blockchain based on the optimal trading power and generate the corresponding blockchain ledger.
[0075] In one embodiment of the present invention, such as Figure 4 As shown, the permission-based blockchain power trading system based on a multi-factor consensus mechanism may also include a fourth building module 600, wherein the fourth building module 600 is used to build a system security verification and fork resolution mechanism based on the generated blockchain ledger.
[0076] In one embodiment of the present invention, the first construction module 100 is specifically used to generate a global linear power flow model using the following formula: , in, This represents the voltage vector of all buses except the reference bus in the power distribution network topology model. This represents the resistance mapping matrix of a branch in a power distribution network topology model. This represents the active power vector injected into the corresponding node of a branch in a power distribution network topology model. This represents the reactance mapping matrix of a branch in a power distribution network topology model. This represents the reactive power vector injected into the corresponding node of a branch in a power distribution network topology model. This indicates that the bus-branch correlation matrix in the distribution network topology model has been removed after removing the first branch. Submatrix after the row, This represents the normalized voltage value of the reference bus.
[0077] In one embodiment of the present invention, the second construction module 200 is specifically used to construct power conservation and antisymmetry constraints using the following formula: , in, This represents the active power injected into node i of a branch in the power distribution network topology model at time t. Let represent the power exchanged between node j and node i at time t in the distribution network topology model. This represents the set of transaction neighbors of node i corresponding to a branch in the power distribution network topology model. Let represent the power exchanged between node i and node j at time t in the power distribution network topology model.
[0078] In one embodiment of the present invention, the second construction module 200 is specifically used to construct a dynamic transaction cost function using the following formula: , in, This represents the transaction preference factor between node i and node j at time t in the distribution network topology model. This represents the dynamic transaction cost of node i corresponding to a branch in the power distribution network topology model at time t.
[0079] In one embodiment of the present invention, the third construction module 300 is specifically used to generate the objective optimization function of the unified optimization model using the following formula: , in, This represents the total cost of node i corresponding to a branch in the power distribution network topology model at time t. This represents the quadratic coefficient of the total cost function for node i corresponding to a branch in the distribution network topology model. This represents the first-order coefficient of the total cost function for node i corresponding to a branch in the power distribution network topology model.
[0080] It should be noted that for details not disclosed in the permission-based blockchain power trading system based on a multi-factor consensus mechanism in this embodiment of the invention, please refer to the details disclosed in the permission-based blockchain power trading method based on a multi-factor consensus mechanism described above, which will not be elaborated here.
[0081] According to an embodiment of the present invention, a permission-based blockchain power trading system based on a multi-factor consensus mechanism constructs a distribution network topology model through a first construction module, and establishes a global linear power flow model based on the distribution network topology model. A second construction module is used to construct power conservation and antisymmetry constraints in point-to-point energy trading, and introduces a trading preference factor to construct a dynamic transaction cost function. A third construction module constructs a unified optimization model based on the power grid topology model, the global linear power flow model, power conservation and antisymmetry constraints, and the dynamic transaction cost function. A first generation module uses a distributed alternating direction multiplier method to optimize the trading power based on the unified optimization model to generate the optimal trading power. A second generation module uses a multi-factor consensus mechanism to upload the trading data to the blockchain based on the optimal trading power and generate the corresponding blockchain ledger. Thus, by unifying and integrating power physical constraints and user behavior preferences, and introducing smart contracts and a consensus mechanism, a resource-driven unified optimization scheduling framework is formed, and a trading mechanism linked to the global linear power flow model is constructed. This significantly improves scheduling efficiency in high-frequency trading or complex power grid structures and is suitable for power market environments with high reliability requirements.
[0082] Corresponding to the above embodiments, the present invention also proposes a computer device.
[0083] The computer device of this invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the permission-based blockchain power trading method based on a multi-factor consensus mechanism as described in the above embodiments.
[0084] The computer device according to embodiments of the present invention integrates and schedules power physical constraints and user behavior preferences in a unified manner, and introduces smart contracts and consensus mechanisms to form a resource-driven unified optimization scheduling framework and construct a trading mechanism linked with the global linear power flow model. This greatly improves the scheduling efficiency under high-frequency trading or complex power grid structures and is suitable for power market environments with high reliability requirements.
[0085] Corresponding to the above embodiments, the present invention also proposes a non-transitory computer-readable storage medium.
[0086] The non-transitory computer-readable storage medium of this invention stores a computer program that, when executed by a processor, implements the aforementioned permission-based blockchain power trading method based on a multi-factor consensus mechanism.
[0087] According to embodiments of the present invention, a non-transitory computer-readable storage medium integrates and schedules power physical constraints and user behavior preferences, and introduces smart contracts and consensus mechanisms to form a resource-driven unified optimization scheduling framework. It also constructs a trading mechanism linked with a global linear power flow model, thereby greatly improving scheduling efficiency under high-frequency trading or complex power grid structures, and is suitable for power market environments with high reliability requirements.
[0088] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.
[0089] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0090] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0091] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0092] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0093] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A permission-based blockchain power trading method based on a multi-factor consensus mechanism, characterized in that, Includes the following steps: Construct a distribution network topology model, and establish a global linear power flow model based on the distribution network topology model; We construct power conservation and antisymmetry constraints in peer-to-peer energy trading, and introduce a trading preference factor to construct a dynamic trading cost function. A unified optimization model is constructed based on the power grid topology model, the global linear power flow model, the power conservation and antisymmetry constraints, and the dynamic transaction cost function. The distributed alternating direction multiplier method is used to optimize the transaction power based on the unified optimization model to generate the optimal transaction power. Based on the multi-factor consensus mechanism, transaction data is uploaded to the blockchain according to the optimal transaction power, and a corresponding blockchain ledger is generated.
2. The permission-based blockchain power trading method based on a multi-factor consensus mechanism according to claim 1, characterized in that, It also includes the following steps: Based on the generated blockchain ledger, a system security verification and fork resolution mechanism is constructed.
3. The permission-based blockchain power trading method based on a multi-factor consensus mechanism according to claim 2, characterized in that, The global linear power flow model is generated using the following formula: , in, This represents the voltage vector of all buses except the reference bus in the power distribution network topology model. This represents the resistance mapping matrix of the branches in the power distribution network topology model. This represents the active power vector injected into the corresponding node of the branch in the power distribution network topology model. This represents the reactance mapping matrix of the branches in the power distribution network topology model. This represents the reactive power vector injected into the corresponding node of the branch in the power distribution network topology model. This indicates that the bus-branch correlation matrix in the power distribution network topology model has been reduced by the first... Submatrix after the row, This represents the normalized voltage value of the reference bus.
4. The permission-based blockchain power trading method based on a multi-factor consensus mechanism according to claim 3, characterized in that, The power conservation and antisymmetry constraints are constructed using the following formula: , in, This represents the active power injected into node i of the branch in the power distribution network topology model at time t. Let represent the power exchanged between node j (corresponding to a branch) and node i at time t in the power distribution network topology model. This represents the set of transaction neighbors of node i corresponding to a branch in the power distribution network topology model. Let represent the power exchanged between node i and node j at time t in the power distribution network topology model.
5. The permission-based blockchain power trading method based on a multi-factor consensus mechanism as described in claim 4, wherein the dynamic transaction cost function is constructed using the following formula: , in, This represents the transaction preference factor of node i to node j at time t in the power distribution network topology model. This represents the dynamic transaction cost of node i corresponding to a branch in the power distribution network topology model at time t.
6. The permission-based blockchain power trading method based on a multi-factor consensus mechanism as described in claim 5 generates the objective optimization function of the unified optimization model using the following formula: , in, This represents the total cost of node i corresponding to a branch in the power distribution network topology model at time t. This represents the quadratic coefficient of the total cost function for node i corresponding to a branch in the power distribution network topology model. This represents the first-order coefficient of the total cost function for node i corresponding to a branch in the power distribution network topology model.
7. A permission-based blockchain power trading system based on a multi-factor consensus mechanism, characterized in that, include: The first construction module is used to construct a power distribution network topology model and establish a global linear power flow model based on the power distribution network topology model. The second construction module is used to construct the power conservation and antisymmetry constraints in peer-to-peer energy trading, and to introduce a trading preference factor to construct a dynamic trading cost function. The third construction module is used to construct a unified optimization model based on the power grid topology model, the global linear power flow model, the power conservation and antisymmetry constraints, and the dynamic transaction cost function. The first generation module is used to perform transaction power optimization solution based on the unified optimization model using the distributed alternating direction multiplier method to generate the optimal transaction power; The second generation module, based on the multi-factor consensus mechanism and the optimal transaction power, completes the on-chaining of transaction data and generates the corresponding blockchain ledger.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the permission-based blockchain power trading method based on a multi-factor consensus mechanism according to any one of claims 1-6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the permissioned blockchain power trading method based on a multi-factor consensus mechanism as described in any one of claims 1-6.