A blockchain-based energy storage safety control method, device and equipment for a power grid system and a storage medium

By constructing a non-intrusive proxy model and a virtual digital twin, combined with blockchain's hash signature and consensus protocol, the problem of fake data attacks on distributed energy storage in the power grid system was solved, achieving efficient control over the energy storage security of the power grid system and ensuring the safety and stability of the power grid.

CN122437179APending Publication Date: 2026-07-21HANGZHOU KAIDA ELECTRIC POWER CONSTR +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU KAIDA ELECTRIC POWER CONSTR
Filing Date
2026-04-24
Publication Date
2026-07-21

Smart Images

  • Figure CN122437179A_ABST
    Figure CN122437179A_ABST
Patent Text Reader

Abstract

The application discloses a kind of energy storage safety control methods, device and equipment based on blockchain-based power grid system and storage medium, it is related to power system technical field, including: obtaining the port voltage and current of distributed energy storage node grid connection point, non-intrusive proxy model is constructed in combination with first-order RC equivalent circuit, resistance and capacitance parameters are identified using recursive least squares method, generate virtual digital twin, determine the power regulation credible physical boundary of node, build the alliance chain composed of dispatch center and energy storage node, node will own state information and physical boundary encapsulation after private key hash signature form transaction package, after consistency, eliminate the node of verification failure, form trusted node set, stored to distributed ledger by P2P network, based on the communication topology of trusted node set, delay tolerance mechanism and iteration format, active power of each energy storage node is adjusted and controlled using smart contract, to improve the efficiency of control to power grid system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system technology, and in particular to a blockchain-based energy storage security control method, device, equipment, and storage medium for power grid systems. Background Technology

[0002] Currently, with the rapid integration of distributed energy sources such as photovoltaics, wind power, and energy storage, the proportion of distributed energy storage in the power grid continues to increase, posing significant challenges to the grid's active power dispatch and frequency control. Distributed energy storage is characterized by numerous nodes, decentralized control, and incomplete controllability. Traditional centralized dispatch methods are insufficient to meet its requirements for rapid response and multi-node coordination. Especially in large-scale integration scenarios, communication networks are highly vulnerable to malicious attacks such as spoofed data injection. Hackers can manipulate reported power or energy status to induce dispatch decisions to fail, seriously affecting the safe and stable operation of the power grid.

[0003] Existing research largely focuses on optimizing energy dispatch and ensuring reliable data storage, such as blockchain-based energy trading and data management. While these approaches address some data storage security issues, they still have limitations. Existing blockchain solutions often rely on information-layer verification such as digital signatures, failing to identify "source-forged" data with legitimate identities but violating physical laws. This makes it difficult for blockchains to guarantee the physical security of collaborative control under cyberattacks. Furthermore, existing physical verification methods often require real-time acquisition of private parameters from the battery management system within the energy storage system. However, in scenarios involving multiple stakeholders, privacy and trade secrets make it difficult to obtain complete internal data using this intrusive detection method, limiting the practical application of defense solutions. Therefore, the lack of a comprehensive control framework that can achieve both non-intrusive physical sensing and deep coupling with the blockchain consensus mechanism leaves the system lacking effective defenses against covert cyberattacks.

[0004] As can be seen from the above, how to improve the efficiency of controlling the energy storage security of the power grid system in the process of blockchain-based power grid system energy storage security control is an urgent problem to be solved. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for energy storage security control of a blockchain-based power grid system, which can improve the efficiency of controlling the energy storage security of the power grid system during the blockchain-based energy storage security control process. The specific solution is as follows: Firstly, this application provides a blockchain-based energy storage security control method for power grid systems, comprising: Obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, the port voltage and the port current; The recursive least squares method is used to identify and update the resistance and capacitance parameters corresponding to the non-intrusive proxy model to obtain a virtual digital twin corresponding to the distributed energy storage node. Then, based on the virtual digital twin and the current state of charge, the reliable physical boundary of power regulation of the distributed energy storage node under the condition of not triggering risks is determined. A consortium blockchain is constructed, comprising a scheduling center and the distributed energy storage nodes. The distributed energy storage nodes are used to encapsulate the node status information and the trusted physical boundary of power regulation. Then, the encapsulation result is hashed and signed using a private key to obtain a transaction packet. The transaction packet is subjected to information consistency verification and physical consistency verification. If the verification fails, the distributed energy storage node corresponding to the transaction packet is removed using a consensus protocol to obtain a set of trusted nodes. The trusted node set is stored in the distributed ledger of the consortium blockchain through a P2P network. The active power of each distributed energy storage node in the trusted node set is adjusted and controlled by smart contracts based on the communication topology, latency tolerance mechanism and iteration format of the trusted node set, so as to obtain the power control result.

[0006] Optionally, the construction of the non-intrusive proxy model based on the first-order RC equivalent circuit, the port voltage, and the port current includes: Kirchhoff's laws are used to construct an evolution law expression for the polarization voltage based on the port current. Then, the current state of charge at the current moment is determined using the evolution law expression and based on the state of charge at the previous moment, the port current, the charging and discharging efficiency, and the capacity parameters. The open-circuit voltage is determined based on the current state of charge and the open-circuit voltage curve. The state-space voltage relationship model is determined by using the evolution law expression and based on the open-circuit voltage, the voltage across the ohmic internal resistance and the polarization voltage, and the state-space current relationship model is constructed based on the current state of charge, the port current, the charge and discharge efficiency and the capacity parameter. A non-intrusive proxy model is constructed based on the state-space voltage relationship model, the state-space current relationship model, the ohmic internal resistance, the capacity parameter, and the first-order RC equivalent circuit.

[0007] Optionally, the step of identifying and updating the resistance and capacitance parameters corresponding to the non-intrusive proxy model using the recursive least squares method to obtain a virtual digital twin corresponding to the distributed energy storage node includes: The RC equivalent circuit in the non-intrusive proxy model is discretized into observation equations, and the predicted value is determined based on the product between the observation vector at the current time and the parameter vector to be identified. Then, the observation terminal voltage at the current time is determined using the observation equations. The time constant parameter is determined based on the resistance and capacitance in the RC equivalent circuit and the sampling interval time, and the current parameter vector is determined based on the time constant parameter and the resistance parameter of the RC equivalent circuit. The current gain matrix is ​​determined based on the covariance matrix of the previous time step, the current observation vector, and the forgetting factor; the forgetting factor is used to adjust the parameter identification sensitivity and noise suppression capability. The current covariance matrix is ​​updated based on the current gain matrix, the observation vector, and the covariance matrix of the previous time step. Then, the current parameter vector is updated based on the current gain matrix, the current observation error, and the parameter vector of the previous time step. The current observation error is the error determined based on the current observed voltage and the current predicted voltage. The resistance parameter and time constant parameter in the new current parameter vector are set as the current resistance-capacitance parameter identification results of the distributed energy storage node, so as to construct a virtual digital twin of the distributed energy storage node based on the current resistance-capacitance parameter identification results, the port voltage, and the port current; the virtual digital twin is used to restore the physical expected behavior of the distributed energy storage node locally. A state vector is constructed based on the state of charge and polarization voltage, and the state space equation of the distributed energy storage node is constructed based on the state vector, the port current, the port voltage, process noise, and measurement noise. A state observer is constructed, and an observation residual system is built using the state observer and the state space equation. The observation residual system is then used to update the virtual digital twin to obtain a new virtual digital twin.

[0008] Optionally, determining the trusted physical boundary of power regulation of the distributed energy storage node under conditions that do not trigger risks, based on the virtual digital twin and the current state of charge, includes: Based on the current state of charge, rated capacity, charging and discharging efficiency, and scheduling cycle duration of the distributed energy storage node, the charging power boundary of the distributed energy storage node under the upper limit constraint of the state of charge and the discharging power boundary under the lower limit constraint of the state of charge are determined. The charging power boundary is compared with the rated charging power of the distributed energy storage node, and the larger value in the comparison result is set as the maximum charging power boundary; the maximum charging power boundary is used to characterize the upper limit of the charging power of the distributed energy storage node without triggering the risk of overcharging. The discharge power boundary is compared with the rated discharge power, and the smaller value in the comparison result is set as the maximum discharge power boundary; the maximum discharge power boundary is used to characterize the upper limit of the discharge power of the distributed energy storage node without triggering the risk of over-discharge. The power regulation reliable physical boundary of the distributed energy storage node is constructed based on the maximum charging power boundary and the maximum discharging power boundary.

[0009] Optionally, the construction includes a consortium blockchain comprising a scheduling center and the distributed energy storage nodes, and encapsulates the node status information and the trusted physical boundary for power regulation using the distributed energy storage nodes. Then, a private key is used to hash and sign the encapsulation result to obtain a transaction packet, including: A consortium blockchain is constructed, comprising a scheduling center and the distributed energy storage nodes. The distributed energy storage nodes are then used to encapsulate the node status information and the trusted physical boundary for power regulation to obtain the encapsulated data packet. The private key of the distributed energy storage node is used to perform hash operation and signature on the encapsulated data packet to obtain a transaction packet; the hash signature is used to maintain the integrity of the data packet during transmission; the transaction packet includes the identity identifier of the distributed energy storage node, node status information, the trusted physical boundary of power regulation, timestamp, and hash signature.

[0010] Optionally, the step of performing information consistency verification and physical consistency verification on the transaction packet, and removing the distributed energy storage node corresponding to the transaction packet using a consensus protocol after verification failure, to obtain a set of trusted nodes, includes: The public key of the distributed energy storage node is used to verify the hash signature in the transaction packet to obtain the verification result. After the verification result indicates that the verification is successful, the non-intrusive proxy model is used to predict the terminal voltage at the current moment to obtain the terminal voltage prediction value. Then, the terminal voltage of the distributed energy storage node at the grid connection point is measured to obtain the terminal voltage measurement value. The difference between the measured value of the terminal voltage and the predicted value of the terminal voltage is determined to obtain the physical residual. Then, a detection statistic is constructed based on the physical residual, and the detection statistic is compared with a threshold determined based on a preset significance level to obtain a first comparison result. When the first comparison result indicates that the detection statistic is greater than the threshold, it is determined that the node status information in the transaction packet has deviated from the consistency trajectory in terms of physical statistical characteristics, and the distributed energy storage node corresponding to the transaction packet is set as a node with the risk of false data injection attack. Then, the distributed energy storage node corresponding to the transaction packet is removed using the consensus protocol to obtain a set of trusted nodes. A trusted communication subgraph is constructed based on each distributed energy storage node in the trusted node set and the communication links between the nodes. Then, the eigenvalues ​​of the Laplace matrix corresponding to the trusted communication subgraph are determined. The eigenvalues ​​are used to characterize the algebraic connectivity of the trusted communication subgraph. When the feature value is greater than zero, it is determined that the trusted communication subgraph includes a spanning tree, and it is determined that the set of trusted nodes maintains topological connectivity after removing malicious nodes; Based on the power data of each distributed energy storage node in the set of trusted nodes and the admittance parameters of the distribution network, the active power flow consistency residual is determined, and then the active power flow consistency residual is compared with a preset power flow convergence threshold to obtain a second comparison result. When the second comparison result indicates that the active power flow consistency residual is less than the preset power flow convergence threshold, it is determined that the transaction packet satisfies the global power flow nonlinear mapping constraint, and the transaction packet is set as a physical real data block and stored on the blockchain.

[0011] Optionally, the step of storing the set of trusted nodes in the distributed ledger of the consortium blockchain via a P2P network, and using smart contracts to adjust and control the active power of each of the distributed energy storage nodes in the set of trusted nodes based on the communication topology, latency tolerance mechanism, and iteration format of the set of trusted nodes, to obtain power control results, includes: The transaction packet is broadcast to other nodes in the consortium blockchain via a P2P network, and the nodes in the consortium blockchain verify the transaction packet. After successful verification, the transaction packet is stored in the distributed ledger of the consortium blockchain. By utilizing the latency tolerance mechanism in smart contracts, preset latency tolerance parameters, and communication topology, time delay compensation and topology correction are performed on each distributed energy storage node in the set of trusted nodes to obtain the correction result. The discrete processing characteristics of the blockchain are determined using an iterative format. Then, the discrete processing characteristics and the iterative format are used to determine the state variables of each distributed energy storage node at the next moment based on the state variables of each distributed energy storage node at the current moment, the state variables of trusted neighbor nodes, and the deviation between the system frequency reference value and the actual value. The active power of each distributed energy storage node in the set of trusted nodes is adjusted and controlled based on the state variables to obtain the power control result.

[0012] Secondly, this application provides a blockchain-based energy storage safety control device for a power grid system, comprising: A non-intrusive proxy model construction module is used to obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, the port voltage and the port current. The virtual digital twin generation module is used to identify and update the resistance and capacitance parameters corresponding to the non-intrusive proxy model using the recursive least squares method to obtain a virtual digital twin corresponding to the distributed energy storage node. Then, based on the virtual digital twin and the current state of charge, the reliable physical boundary of power regulation of the distributed energy storage node under the condition of not triggering risks is determined. The transaction packet generation module is used to construct a consortium blockchain including the scheduling center and the distributed energy storage nodes, and to encapsulate the node status information and the trusted physical boundary of power regulation using the distributed energy storage nodes. Then, the encapsulation result is hashed and signed using a private key to obtain the transaction packet. The trusted node set generation module is used to perform information consistency verification and physical consistency verification on the transaction packet, and remove the distributed energy storage node corresponding to the transaction packet using a consensus protocol after the verification fails, so as to obtain the trusted node set. The power control result determination module is used to store the set of trusted nodes in the distributed ledger of the consortium blockchain through a P2P network, and to adjust and control the active power of each of the distributed energy storage nodes in the set of trusted nodes using smart contracts and based on the communication topology, latency tolerance mechanism and iteration format of the set of trusted nodes, so as to obtain the power control result.

[0013] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned energy storage security control method for a blockchain-based power grid system.

[0014] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned energy storage security control method for a blockchain-based power grid system.

[0015] As can be seen from the above, before conducting energy storage security control of a blockchain-based power grid system, this application needs to obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, port voltage, and port current. The recursive least squares method is used to identify and update the resistance and capacitance parameters corresponding to the non-intrusive proxy model, obtaining a virtual digital twin corresponding to the distributed energy storage node. Then, based on the virtual digital twin and the current state of charge, the trusted physical boundary of power regulation of the distributed energy storage node under the condition of not triggering risks is determined. A consortium blockchain including a dispatch center and distributed energy storage nodes is constructed, and the following is utilized... Distributed energy storage nodes encapsulate node state information and trusted physical boundaries for power regulation. They then hash the encapsulation result using a private key to obtain a transaction packet. The transaction packet undergoes information consistency verification and physical consistency verification. If verification fails, the corresponding distributed energy storage node is removed using a consensus protocol, resulting in a set of trusted nodes. This set of trusted nodes is stored in a distributed ledger within the consortium blockchain via a P2P network. Smart contracts, based on the communication topology, latency tolerance mechanism, and iterative format of the trusted node set, are used to adjust and control the active power of each distributed energy storage node in the set, yielding the power control result.

[0016] Therefore, this application first needs to obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, port voltage, and port current. Second, it uses the recursive least squares method to identify and update the RC parameters corresponding to the non-intrusive proxy model, obtaining a virtual digital twin corresponding to the distributed energy storage node. Then, based on the virtual digital twin and the current state of charge, it determines the reliable physical boundary of power regulation of the distributed energy storage node under conditions that do not trigger risks. Finally, it constructs a consortium blockchain including a scheduling center and distributed energy storage nodes, and uses the distributed energy storage nodes to connect the nodes... The process involves encapsulating state information and the trusted physical boundary of power regulation, then hashing the encapsulation result using a private key to obtain a transaction packet. Next, the transaction packet undergoes information consistency verification and physical consistency verification. Upon verification failure, a consensus protocol is used to remove the corresponding distributed energy storage node, resulting in a set of trusted nodes. Finally, the set of trusted nodes is stored in a distributed ledger within the consortium blockchain via a P2P network. Smart contracts, based on the communication topology, latency tolerance mechanism, and iterative format of the trusted node set, are used to adjust and control the active power of each distributed energy storage node in the set, yielding the power control result. This approach improves the efficiency of energy storage security control in blockchain-based power grid systems, thereby enhancing the security of the production process. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0018] Figure 1 This application discloses a flowchart of an energy storage security control method for a blockchain-based power grid system. Figure 2 This is a schematic diagram of a specific NBSM principle based on a first-order RC equivalent circuit disclosed in this application; Figure 3 This is a schematic diagram of a specific blockchain trusted interaction and consensus defense architecture that integrates NBSM physical verification disclosed in this application; Figure 4 This application discloses a specific flowchart of a distributed energy storage blockchain security consensus response system that integrates non-intrusive proxy model verification. Figure 5 This is a schematic diagram of the structure of an energy storage safety control device for a blockchain-based power grid system disclosed in this application; Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0019] 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.

[0020] Currently, with the rapid integration of distributed energy sources such as photovoltaics, wind power, and energy storage, the proportion of distributed energy storage in the power grid continues to increase, posing significant challenges to the active power dispatch and frequency control of the power grid. Distributed energy storage is characterized by numerous nodes, decentralized control, and incomplete controllability. Traditional centralized dispatch methods are insufficient to meet its requirements for rapid response and multi-node coordination. Especially in large-scale integration scenarios, communication networks are highly vulnerable to malicious attacks such as fake data injection. Hackers can manipulate reported power or energy status to induce dispatch decisions to fail, seriously affecting the safe and stable operation of the power grid. To address this, this application provides a blockchain-based energy storage security control method for power grid systems, which can improve the efficiency of controlling energy storage security in the blockchain-based power grid system.

[0021] See Figure 1 As shown in the figure, this invention discloses a blockchain-based energy storage security control method for power grid systems, comprising: Step S11: Obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, the port voltage and the port current.

[0022] In this embodiment, the present application first constructs a distributed energy storage physical boundary prediction system based on a non-intrusive surrogate model, that is, constructs a distribution network topology model consisting of distributed energy storage and loads. For energy storage nodes, a first-order resistance-capacitance (RC) equivalent circuit surrogate model (NBSM) is established using externally observable data (port voltage, current) to achieve non-intrusive estimation of the power regulation capability and state evolution of energy storage nodes, and obtain the physical operating constraint range for each scheduling cycle.

[0023] Subsequently, a blockchain-based trusted interaction and evidence storage mechanism was designed: a consortium blockchain architecture consisting of a scheduling center and various distributed energy storage nodes was constructed. Control commands for distributed energy storage and NBSM-estimated physical state information were encrypted, signed, and stored on the blockchain. The immutability of the blockchain ensured the authenticity and traceability of power allocation commands and frequency regulation data exchanged between nodes.

[0024] Furthermore, a blockchain consensus defense algorithm integrating proxy model verification is constructed: "Physical-information" dual verification is introduced into the blockchain consensus process. When a consensus node receives the state of a neighboring node, it first verifies the node's identity credibility through encrypted signature, and then uses the node's NBSM model to verify whether the reported active power meets physical constraints. If a fake data attack is identified, the abnormal node is removed through the consensus mechanism.

[0025] Finally, smart contracts are used to drive automatic verification and coordinated control: integrated smart contracts enable automatic verification and closed-loop execution of control commands. Based on verified trusted neighbor data, combined with droop control and a secondary frequency recovery algorithm, and taking into account communication delay tolerance mechanisms, coordinated adjustment of active power and system frequency stability of multiple distributed energy storage systems are achieved.

[0026] In this embodiment, the internal electrochemical parameters of a battery are extremely difficult to obtain as "black box" data in actual engineering. This embodiment simplifies the complex electrochemical reaction into a resistive-capacitive evolution process in electrical engineering by utilizing the battery's equivalent RC circuit. Only a basic voltage / current transformer needs to be installed at the point of common coupling (PCC) of the distributed energy storage system to collect the dynamic response data of the port.

[0027] Furthermore, the embodiments of this application are based on Kirchhoff's laws to set the polarization voltage. The evolution law is entirely determined by the external excitation current. Decide: ; The above modeling method does not touch the underlying control protocol of the battery management system (BMS), thus achieving physical decoupling.

[0028] In this embodiment, the schematic diagram of the NBSM principle based on the first-order RC equivalent circuit is as follows: Figure 2 As shown, the NBSM model acts as a "virtual proxy," where nodes only need to publish encrypted and signed port power data on the blockchain. The blockchain consensus node can then use the identified RC fingerprint parameters to locally reconstruct the node's physical behavior without invading its internal privacy, thus verifying the authenticity of its actions.

[0029] For energy storage nodes in the power grid, an NBSM (NB-IoT Modeling System) is established using external electrical data from their ports: State-space modeling: Based on a first-order RC equivalent circuit, the node is established... i Discretized state-space model: ; in, For nodes i The state of charge (SOC) of the stored energy. Port voltage, This is the charging and discharging current. For ohmic internal resistance, This is the polarization voltage.

[0030] It is worth mentioning that the core of the above model lies in "non-invasiveness," that is, the terminal voltage can be directly observed solely by sensors. and charging / discharging current The resistive and capacitive characteristics obtained through offline parameter identification This constructs a "virtual digital twin" of the node.

[0031] Specifically, constructing a non-intrusive surrogate model based on a first-order RC equivalent circuit, port voltage, and port current can include: using Kirchhoff's laws and constructing an evolution law expression for polarization voltage based on port current; then using the evolution law expression and based on the state of charge, port current, charging / discharging efficiency, and capacity parameters of the previous time step to determine the current state of charge; determining the open-circuit voltage based on the current state of charge and open-circuit voltage curve; using the evolution law expression and based on the open-circuit voltage, voltage across the ohmic internal resistance, and polarization voltage to determine a state-space voltage relationship model; and constructing a state-space current relationship model based on the current state of charge, port current, charging / discharging efficiency, and capacity parameters; and constructing a non-intrusive surrogate model based on the state-space voltage relationship model, state-space current relationship model, ohmic internal resistance, capacity parameters, and a first-order RC equivalent circuit.

[0032] Step S12: Identify and update the resistance and capacitance parameters corresponding to the non-intrusive proxy model using the recursive least squares method to obtain a virtual digital twin corresponding to the distributed energy storage node. Then, based on the virtual digital twin and the current state of charge, determine the reliable physical boundary of power regulation of the distributed energy storage node under the condition of not triggering risks.

[0033] In this embodiment, the RC parameters of the NBSM are... Real-time identification is required by discretizing the observation equations to discretize the continuous equations into the following form: ; in, For the voltage at the observation terminal, The parameter vector to be identified.

[0034] Subsequently, recursive least squares with a forgetting factor (FFRLS) is introduced to track the dynamic drift of the parameters: Gain Update: ; Covariance matrix update: ; in, It is a forgetting factor used to balance recognition sensitivity and noise suppression capability.

[0035] It is worth mentioning that the first-order RC model not only protects privacy but also effectively characterizes the dynamic power response of energy storage units during secondary frequency regulation. In actual power system operation, the output of distributed energy storage is limited by inverter capacity and energy storage SOC. Accurate physical boundary prediction can prevent relay protection actions or equipment damage caused by control command exceeding limits, thereby maintaining the static security and stability of the distribution network.

[0036] Specifically, the recursive least squares method is used to identify and update the resistance and capacitance parameters corresponding to the non-intrusive surrogate model, obtaining a virtual digital twin corresponding to the distributed energy storage node. This can include: discretizing the resistance and capacitance equivalent circuit in the non-intrusive surrogate model into observation equations, determining the predicted value based on the product of the current observation vector and the parameter vector to be identified, and then using the observation equations to determine the observed terminal voltage at the current time; determining the time constant parameter based on the resistance and capacitance in the resistance and capacitance equivalent circuit and the sampling interval time, and determining the current parameter vector based on the time constant parameter and the resistance parameter of the resistance and capacitance equivalent circuit; determining the current gain matrix based on the covariance matrix of the previous time step, the current observation vector, and the forgetting factor; the forgetting factor is used to adjust the parameter identification sensitivity and noise suppression capability; updating the current covariance matrix based on the current gain matrix, the observation vector, and the covariance matrix of the previous time step, and then using the current gain matrix to determine the observed terminal voltage at the current time step. The current parameter vector is updated using the gain matrix, the current observation error, and the parameter vector from the previous time step. The current observation error is determined based on the current observed terminal voltage and the current predicted terminal voltage. The resistance parameter and time constant parameter in the new current parameter vector are set as the current RC parameter identification results of the distributed energy storage node. A virtual digital twin of the distributed energy storage node is constructed based on the current RC parameter identification results, port voltage, and port current. The virtual digital twin is used to locally reproduce the expected physical behavior of the distributed energy storage node. A state vector is constructed based on the state of charge and polarization voltage. The state space equation of the distributed energy storage node is constructed based on the state vector, port current, port voltage, process noise, and measurement noise. A state observer is constructed, and an observation residual system is constructed using the state observer and the state space equation. The virtual digital twin is then updated using the observation residual system to obtain a new virtual digital twin.

[0037] In this embodiment, the physical boundary estimation of this application requires physical boundary estimation in each scheduling cycle. k Utilizing NBSM and based on the current The maximum adjustable power boundary of the node at the next time step is calculated in real time without triggering overcharge or over-discharge risks. Considering battery life and operational safety, its power regulation physical constraint range is set as follows: : The expression corresponding to the maximum charging boundary is: ; The expression corresponding to the maximum discharge boundary is: ; It is worth mentioning that the above process does not require access to the BMS's internal private protocol. It only uses port characteristics to make an advance prediction of the physical evolution boundary, thereby transforming the physical and electrochemical limitations of the battery into a digital constraint range that can be identified by the communication layer, providing an objective basis for the subsequent "physical audit" of the blockchain.

[0038] Furthermore, to ensure the accuracy of the evolutionary trajectory of NBSM without infringing on BMS privacy data, this application's embodiments introduce state observer theory. The stability of the equivalent circuit is verified. The energy storage node is then... The electrical evolution is modeled as follows: ; Wherein, the state vector , Port current, This is the terminal voltage. and These are system process noise and measurement noise, respectively.

[0039] Subsequently, to demonstrate the reliability of the prediction boundary, embodiments of this application construct a Lyapunov function. ,in, The observation residual is used. The existence of an observer gain is proven by solving linear matrix inequalities. This makes the residual system asymptotically stable, and the corresponding formula for solving the linear matrix inequality is shown below: ; In this way, the convergence of the "physical fingerprint" generated by the model is guaranteed from the perspective of control theory, thereby providing a steady-state benchmark for subsequent FDIA attack detection.

[0040] Specifically, determining the reliable physical boundary of power regulation for distributed energy storage nodes under conditions without triggering risks, based on a virtual digital twin and the current state of charge, can include: determining the charging power boundary and discharging power boundary of the distributed energy storage node under the upper limit constraint of the state of charge, and the lower limit constraint of the state of charge, based on the current state of charge, rated capacity, charging and discharging efficiency, and scheduling cycle duration of the distributed energy storage node; comparing the charging power boundary with the rated charging power of the distributed energy storage node, and setting the larger value in the comparison result as the maximum charging power boundary; the maximum charging power boundary is used to characterize the upper limit of the charging power of the distributed energy storage node without triggering the overcharge risk; comparing the discharging power boundary with the rated discharging power, and setting the smaller value in the comparison result as the maximum discharging power boundary; the maximum discharging power boundary is used to characterize the upper limit of the discharging power of the distributed energy storage node without triggering the over-discharge risk; and constructing the reliable physical boundary of power regulation for the distributed energy storage node based on the maximum charging power boundary and the maximum discharging power boundary.

[0041] Step S13: Construct a consortium blockchain including the scheduling center and the distributed energy storage nodes, and use the distributed energy storage nodes to encapsulate the node status information and the trusted physical boundary of power regulation. Then, use the private key to hash and sign the encapsulation result to obtain a transaction packet.

[0042] In this embodiment, to ensure data security of distributed energy storage under an open communication network, this application embodiment chooses to construct a trusted interaction architecture based on a consortium blockchain, and the schematic diagram of the blockchain trusted interaction and consensus defense architecture integrating NBSM physical verification is shown below. Figure 3 As shown, this means constructing a system consisting of distributed energy storage nodes. The consortium blockchain enables encrypted sharing of scheduling information: ; Subsequently, data encapsulation and signing are performed: each node sends its own state information. And physical evidence generated by NBSM Combine them, and then use asymmetric encryption technology and private keys. Perform hash signature on data packets to generate transaction packets. : ; This ensures that any tampering by a third party during the data transmission from distributed energy storage to the scheduling link will invalidate the signature, thus guaranteeing the integrity of the "information flow".

[0043] Subsequently, evidence is stored on the blockchain: the transaction packet is broadcast via a P2P network, and after verification, it is stored in the blockchain distributed ledger. The data packet uploaded to the blockchain includes not only the power value but also a timestamped snapshot of the physical characteristics. Leveraging the immutability of the blockchain, a traceable data source is provided for secondary collaborative control. Through the decentralized storage of the blockchain, each node has a synchronized copy of the ledger, effectively avoiding single points of failure and abuse of power by centralized nodes, achieving traceability and transparency of the control logic.

[0044] Specifically, a consortium blockchain comprising a scheduling center and distributed energy storage nodes is constructed. The distributed energy storage nodes encapsulate node status information and trusted physical boundaries for power regulation. Then, the encapsulation result is hash-signed using a private key to obtain a transaction packet. This process can include: constructing a consortium blockchain comprising a scheduling center and distributed energy storage nodes; encapsulating node status information and trusted physical boundaries for power regulation using distributed energy storage nodes to obtain an encapsulated data packet; hashing and signing the encapsulated data packet using the private key of the distributed energy storage nodes to obtain a transaction packet; the hash signature is used to maintain the integrity of the data packet during transmission; the transaction packet includes the identity identifier of the distributed energy storage node, node status information, trusted physical boundaries for power regulation, a timestamp, and a hash signature.

[0045] Step S14: Perform information consistency verification and physical consistency verification on the transaction packet, and remove the distributed energy storage node corresponding to the transaction packet using the consensus protocol after the verification fails, to obtain a set of trusted nodes.

[0046] In this embodiment, the application requires a "consensus mechanism" to intercept malicious data. Specifically, before packaging data onto the blockchain, the consensus node needs to perform "physical-information" dual verification to identify and defend against fake data injection attacks. The following verifications are performed: First, perform information consistency verification: call the node's public key. Verify the signature to check its validity and ensure that the data has not been tampered with by a man-in-the-middle during transmission.

[0047] Then, perform a physical consistency check: call the corresponding NBSM model to check the reported power. Physical mechanism verification is performed to check whether the reported data violates physical mechanisms and to identify FDIA attacks. This application's embodiment constructs a dynamic probability distribution of node physical characteristics using NBSM. (Timeframe definition) The physical residual vector is .

[0048] Under normal operating conditions, since the NBSM satisfies the asymptotic stability of the state observer, the residuals... It should follow a Gaussian distribution with a mean of 0. In this application, the following detection statistic is constructed using the Bayesian criterion in an embodiment. : ; in, For the prediction error covariance matrix, The dimension of the observed space.

[0049] In the blockchain consensus process, smart contracts use a preset saliency level. Get the threshold by looking up the table If satisfied If the node has a valid digital signature, it is determined that it has deviated from the consistency trajectory in terms of physical statistical characteristics, and the consensus protocol can reject the transaction from being recorded.

[0050] It's worth noting that the above process forms the core logic for preventing FDIA attacks. Even if an attacker possesses a legitimate private key, if they forge power commands... This violates the electrochemical evolution laws derived from the RC model (e.g.: If the data changes rapidly or the power exceeds the calculated range, the data will be automatically rejected by the consensus protocol.

[0051] Among them, the non-intrusive model provides the blockchain with a dynamically changing physical fingerprint database. Due to the battery's... Since polarization states evolve continuously, spurious power data with "step-like" or "abnormal slopes" will produce huge residuals under the differential equations of NBSM.

[0052] Furthermore, when the blockchain receives a valid identity signature, but its power reporting value... This leads to the calculated terminal voltage When the behavior deviates significantly from the measured value, the model will automatically identify it as a "physical violation from a non-intrusive perspective": ; In this way, this method of using physical laws to endorse information security solves the problem of source fraud caused by vulnerabilities in communication protocols at its root.

[0053] To address the stealthy nature of FDIA attacks, this application's embodiments elevate the single threshold determination to a statistical detection based on the chi-square test. Subsequently, the physical residual vector is defined. Among them, under normal working conditions It follows a mean of 0 and a covariance of It follows a normal distribution.

[0054] Subsequently, the detection statistics were constructed. : ; in, The dimension of observation.

[0055] Subsequently, based on a given confidence level ,when In such cases, the smart contract can determine that the data has been maliciously tampered with without randomness. This detection method, based on the essence of Bayesian probability, can effectively identify those data that are "legitimate in identity and have minor numerical adjustments" but violate statistical characteristics. Deep attacks on the evolutionary patterns of the model significantly improve the audit accuracy of the blockchain consensus layer.

[0056] In this embodiment, after the blockchain consensus mechanism removes the attacked malicious nodes, the control resilience of the distributed system depends on the communication topology connectivity of the remaining nodes. Based on the essence of algebraic graph theory, the system communication graph is defined as follows: When a set of malicious nodes is identified and removed. After that, the remaining set of trusted nodes Subgraphs Must meet: ; in, For subgraph The Laplace matrix, It is its second smallest eigenvalue (algebraic connectivity). As long as... With at least one spanning tree, distributed cooperative laws can guarantee the system's frequency deviation. Still satisfied: ; It's worth noting that the aforementioned theory supports the effectiveness of blockchain consensus defense: that is, by sacrificing local nodes, i.e., eliminating malicious nodes, the frequency support resilience of the large system is maintained while ensuring global topological connectivity. Specifically, the consensus layer not only verifies the NBSM residual of individual nodes but also needs to verify the consistency of the global physical flow. The active power flow consistency residual of the distributed energy storage cluster is defined. : ; in, and Let represent the real and imaginary parts of the power distribution network admittance matrix.

[0057] In the blockchain consensus process, only those that meet the following conditions are considered valid. Only transaction blocks that are statistically detected and satisfy the above-mentioned nonlinear mapping constraints of power flow can be considered "physically real". If a node Reported If the global power flow fails to converge, smart contracts will be used to remove the affected nodes through a consensus protocol. In this way, this physical verification mechanism effectively builds a foundation of trust between the power grid's source, grid, and load ends, preventing malicious nodes from manipulating power data to compensate for auxiliary power services. Simultaneously, using physical residuals for detection is equivalent to deploying a dynamic power system state estimator at the information layer, achieving a deep integration of information security management and the physical operation laws of the power system.

[0058] Specifically, the transaction packet undergoes information consistency verification and physical consistency verification. If the verification fails, the distributed energy storage node corresponding to the transaction packet is removed using a consensus protocol to obtain a set of trusted nodes. This may include: calling the public key of the distributed energy storage node to verify the hash signature in the transaction packet, obtaining the verification result, and after the verification result indicates that the verification is successful, using a non-intrusive proxy model to predict the terminal voltage at the current moment, obtaining the predicted terminal voltage value, and then obtaining the actual terminal voltage measured by the distributed energy storage node at the grid connection point, obtaining the measured terminal voltage value; determining the difference between the measured terminal voltage value and the predicted terminal voltage value, obtaining the physical residual, and then constructing a detection statistic based on the physical residual, and comparing the detection statistic with a threshold determined based on a preset significance level to obtain the first comparison result.

[0059] Specifically, when the first comparison result indicates that the detection statistic is greater than a threshold, it is determined that the node state information in the transaction packet has deviated from the consistency trajectory in terms of physical statistical characteristics. The distributed energy storage node corresponding to the transaction packet is then designated as a node at risk of spoofed data injection attacks. A consensus protocol is then used to remove the distributed energy storage node corresponding to the transaction packet, resulting in a set of trusted nodes. A trusted communication subgraph is constructed based on each distributed energy storage node in the trusted node set and the communication links between them. The eigenvalues ​​of the Laplacian matrix corresponding to the trusted communication subgraph are then determined. These eigenvalues ​​are used to characterize the representation of the trusted communication subgraph. The connectivity is calculated; when the eigenvalue is greater than zero, the trusted communication subgraph is determined to include a spanning tree, and the trusted node set is determined to maintain topological connectivity after removing malicious nodes; the active power flow consistency residual is determined based on the power data of each distributed energy storage node in the trusted node set and the admittance parameters of the distribution network, and then the active power flow consistency residual is compared with the preset power flow convergence threshold to obtain a second comparison result; when the second comparison result indicates that the active power flow consistency residual is less than the preset power flow convergence threshold, the transaction packet is determined to satisfy the global power flow nonlinear mapping constraint, and the transaction packet is set as a physical real data block and stored on the chain.

[0060] Step S15: Store the set of trusted nodes in the distributed ledger of the consortium blockchain through a P2P network, and use smart contracts to adjust and control the active power of each of the distributed energy storage nodes in the set of trusted nodes based on the communication topology, latency tolerance mechanism and iteration format of the set of trusted nodes, to obtain the power control result.

[0061] In this embodiment, based on ensuring data trustworthiness, the present application embodiment can utilize distributed algorithms to achieve rapid frequency recovery. The flowchart of the distributed energy storage blockchain security consensus response, which integrates non-intrusive proxy model verification, is as follows. Figure 4 As shown, driven by integrated smart contracts, this embodiment of the application can utilize verified trusted data to execute distributed collaborative control laws and restore system frequency: it uses smart contracts and automatically filters out nodes that fail NBSM verification based on consensus results, extracting only the set of trusted nodes. Smart contracts participate in computation. As pre-defined automated scripts, smart contracts automatically trigger control logic once consensus is reached. This mechanism eliminates the delays and risks of human intervention, achieving "execution upon seeing the code" for control instructions.

[0062] Subsequently, the collaborative control law is updated: To address the potential time overhead introduced by blockchain consensus, this application's embodiments design a latency tolerance mechanism. By introducing compensation gain and topology correction, the system is able to adjust the active power output of each distributed energy storage unit even when the attacked node is isolated and after successful verification, and the frequency deviation can still converge to zero, thus ensuring the operational resilience of the networked microgrid. ; in, This is the topology weighting factor. Through the enforcement of smart contracts and latency tolerance mechanisms, the active power of each node is ensured to be proportionally and coordinated, ultimately achieving system frequency deviation control. .

[0063] To adapt to the discrete processing characteristics of blockchain transactions, the embodiments of this application transform the collaborative control law into an event-triggered iterative format: ; in, The weighting factor, after being corrected by blockchain consensus, satisfies... Among them, if the neighboring node (i.e., failing NBSM verification), then the smart contract will be forcibly reset. This is to achieve physical layer malicious isolation.

[0064] It is worth mentioning that the final distributed cooperative control law is based on the fundamental principle of microgrid droop control, and uses a frequency compensation term modified by a smart contract. This enables the system to achieve error-free active power regulation in both islanded and grid-connected modes. Furthermore, this "plug-and-play" control characteristic, combined with a latency tolerance mechanism, solves the time-scale matching problem between the blockchain transaction processing cycle and the second-level response requirements of power grid frequency control. Its steady-state effect is as follows: .

[0065] Specifically, the trusted node set is stored in the distributed ledger of the consortium blockchain through a P2P network. The active power of each distributed energy storage node in the trusted node set is adjusted and controlled by smart contracts based on the communication topology, latency tolerance mechanism and iteration format of the trusted node set to obtain the power control result. This may include: broadcasting the transaction packet to other nodes in the consortium blockchain through the P2P network, verifying the transaction packet using the nodes in the consortium blockchain, and storing the transaction packet in the distributed ledger of the consortium blockchain after successful verification. By utilizing the latency tolerance mechanism in smart contracts, preset latency tolerance parameters, and communication topology, time delay compensation and topology correction are performed on each distributed energy storage node in the trusted node set to obtain the correction result. The discrete processing characteristics of the blockchain are determined using an iterative format. Then, based on the discrete processing characteristics and the iterative format, and considering the state variables of each distributed energy storage node at the current moment, the state variables of trusted neighbor nodes, and the deviation between the system frequency reference value and the actual value, the state variables of each distributed energy storage node at the next moment are determined. Based on the state variables, the active power of each distributed energy storage node in the trusted node set is adjusted and controlled to obtain the power control result.

[0066] Thus, this application's embodiment employs a dual defense mechanism: it utilizes blockchain to address the risk of "communication link" tampering, while simultaneously using the NBSM proxy model to resolve the issue of "node source" FDIA attacks, constructing a comprehensive security defense system; it provides non-intrusive and privacy protection: considering the non-intrusive nature of energy storage system modeling, it eliminates the need to delve into the device's internal structure to read private BMS parameters, achieving high-strength physical security auditing solely based on port external characteristics; it possesses autonomy and practicality: combining smart contracts and latency-tolerant design, through automated verification and execution mechanisms, it resolves potential time lag and trust bottlenecks in real-time frequency control using blockchain.

[0067] As can be seen from the above, the embodiments of this application first need to obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, port voltage, and port current; secondly, the recursive least squares method is used to identify and update the RC parameters corresponding to the non-intrusive proxy model to obtain a virtual digital twin corresponding to the distributed energy storage node, and then the reliable physical boundary of power regulation of the distributed energy storage node under the condition of not triggering risks is determined based on the virtual digital twin and the current state of charge; then, a consortium chain including the scheduling center and the distributed energy storage node is constructed, and the distributed energy storage node is used to save energy. Point-state information and trusted physical boundaries for power regulation are encapsulated, and then the encapsulation result is hashed and signed using a private key to obtain a transaction packet. Next, the transaction packet undergoes information consistency verification and physical consistency verification. If verification fails, the distributed energy storage node corresponding to the transaction packet is removed using a consensus protocol, resulting in a set of trusted nodes. Finally, the set of trusted nodes is stored in a distributed ledger on a consortium blockchain via a P2P network. Smart contracts, based on the communication topology, latency tolerance mechanism, and iterative format of the trusted node set, are used to adjust and control the active power of each distributed energy storage node in the set, yielding the power control result. This improves the efficiency of energy storage security control in blockchain-based power grid systems, thereby enhancing the security of the production process.

[0068] Accordingly, see Figure 5 As shown, this application also provides a blockchain-based energy storage safety control device for a power grid system, comprising: The non-intrusive proxy model construction module 11 is used to obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, the port voltage and the port current. The virtual digital twin generation module 12 is used to identify and update the resistance and capacitance parameters corresponding to the non-intrusive proxy model using the recursive least squares method to obtain a virtual digital twin corresponding to the distributed energy storage node. Then, based on the virtual digital twin and the current state of charge, the reliable physical boundary of power regulation of the distributed energy storage node under the condition of not triggering risks is determined. The transaction packet generation module 13 is used to construct a consortium blockchain including the scheduling center and the distributed energy storage nodes, and to encapsulate the node status information and the trusted physical boundary of power regulation using the distributed energy storage nodes. Then, the encapsulation result is hashed and signed using a private key to obtain a transaction packet. The trusted node set generation module 14 is used to perform information consistency verification and physical consistency verification on the transaction packet, and remove the distributed energy storage node corresponding to the transaction packet using a consensus protocol after the verification fails, so as to obtain the trusted node set. The power control result determination module 15 is used to store the set of trusted nodes in the distributed ledger of the consortium blockchain through a P2P network, and to adjust and control the active power of each of the distributed energy storage nodes in the set of trusted nodes using smart contracts and based on the communication topology, latency tolerance mechanism and iteration format of the set of trusted nodes, so as to obtain the power control result.

[0069] In some specific embodiments, the non-intrusive agent model construction module 11 may specifically include: The open-circuit voltage determination unit is used to construct an evolution law expression of polarization voltage based on Kirchhoff's laws and the port current, and then use the evolution law expression and the state of charge of the previous moment, the port current, the charging and discharging efficiency and capacity parameters to determine the current state of charge, and determine the open-circuit voltage based on the current state of charge and the open-circuit voltage curve. The state-space current relationship model construction unit is used to determine the state-space voltage relationship model based on the evolution law expression and the open-circuit voltage, the voltage across the ohmic internal resistance and the polarization voltage, and to construct the state-space current relationship model based on the current state of charge, the port current, the charging and discharging efficiency and the capacity parameter. A non-intrusive surrogate model construction subunit is used to construct a non-intrusive surrogate model based on the state-space voltage relationship model, the state-space current relationship model, the ohmic internal resistance, the capacity parameter, and the first-order RC equivalent circuit.

[0070] In some specific embodiments, the virtual digital twin generation module 12 may specifically include: The prediction value determination unit is used to discretize the RC equivalent circuit in the non-intrusive surrogate model into observation equations, determine the prediction value based on the product between the observation vector at the current time and the parameter vector to be identified, and then use the observation equations to determine the observation terminal voltage at the current time. The time constant parameter determination unit is used to determine the time constant parameter based on the resistance and capacitance in the RC equivalent circuit and the sampling interval time, so as to determine the current parameter vector based on the time constant parameter and the resistance parameter of the RC equivalent circuit. The gain matrix determination unit is used to determine the current gain matrix based on the covariance matrix of the previous time step, the current observation vector, and the forgetting factor; the forgetting factor is used to adjust the parameter identification sensitivity and noise suppression capability. The parameter vector update unit is used to update the current covariance matrix based on the current gain matrix, the observation vector, and the covariance matrix of the previous time step, and then update the current parameter vector based on the current gain matrix, the current observation error, and the parameter vector of the previous time step; the current observation error is the error determined based on the current observation terminal voltage and the current prediction terminal voltage; A virtual digital twin generation subunit is used to set the resistance parameter and time constant parameter in the new current parameter vector as the current resistance-capacitance parameter identification result of the distributed energy storage node, so as to construct a virtual digital twin of the distributed energy storage node based on the current resistance-capacitance parameter identification result, the port voltage, and the port current; the virtual digital twin is used to restore the expected physical behavior of the distributed energy storage node locally; The state-space equation construction unit is used to construct a state vector based on the state of charge and polarization voltage, and to construct the state-space equation of the distributed energy storage node based on the state vector, the port current, the port voltage, the process noise and the measurement noise. The virtual digital twin update unit is used to construct a state observer and use the state observer and the state space equation to construct an observation residual system, so as to use the observation residual system to update the virtual digital twin and obtain a new virtual digital twin.

[0071] In some specific embodiments, the virtual digital twin generation module 12 may specifically include: The discharge power boundary determination unit is used to determine the charging power boundary of the distributed energy storage node under the upper limit constraint of the state of charge and the discharge power boundary under the lower limit constraint of the state of charge based on the current state of charge, rated capacity, charging and discharging efficiency and scheduling cycle duration of the distributed energy storage node. The maximum charging power boundary determination unit is used to compare the charging power boundary with the rated charging power of the distributed energy storage node, and set the larger value in the comparison result as the maximum charging power boundary; the maximum charging power boundary is used to characterize the upper limit of the charging power of the distributed energy storage node without triggering the risk of overcharging. The maximum discharge power boundary determination unit is used to compare the discharge power boundary with the rated discharge power, and set the smaller value in the comparison result as the maximum discharge power boundary; the maximum discharge power boundary is used to characterize the upper limit of the discharge power of the distributed energy storage node without triggering the risk of over-discharge. A power regulation trusted physical boundary construction unit is used to construct the power regulation trusted physical boundary of the distributed energy storage node based on the maximum charging power boundary and the maximum discharging power boundary.

[0072] In some specific embodiments, the transaction package generation module 13 may specifically include: The consortium blockchain construction unit is used to construct a consortium blockchain including a scheduling center and the distributed energy storage nodes, and to encapsulate the node status information and the trusted physical boundary of power regulation using the distributed energy storage nodes to obtain the encapsulated data packet. A transaction packet generation subunit is used to perform hash calculation and signature on the encapsulated data packet using the private key of the distributed energy storage node to obtain a transaction packet; the hash signature is used to maintain the integrity of the data packet during transmission; the transaction packet includes the identity identifier of the distributed energy storage node, node status information, the trusted physical boundary of power regulation, timestamp, and hash signature.

[0073] In some specific embodiments, the trusted node set generation module 14 may specifically include: The verification result generation unit is used to call the public key of the distributed energy storage node to verify the hash signature in the transaction packet, obtain the verification result, and after the verification result indicates that the verification is successful, use the non-intrusive proxy model to predict the terminal voltage at the current moment to obtain the terminal voltage prediction value, and then obtain the actual terminal voltage measured by the distributed energy storage node at the grid connection point to obtain the actual terminal voltage value. The first comparison result generation unit is used to determine the difference between the measured value of the terminal voltage and the predicted value of the terminal voltage, obtain the physical residual, construct a detection statistic based on the physical residual, and compare the detection statistic with a threshold determined based on a preset significance level to obtain the first comparison result. The trusted node set generation unit is used to determine that the node status information in the transaction packet has deviated from the consistency trajectory in terms of physical statistical characteristics when the first comparison result indicates that the detection statistic is greater than the threshold, and to set the distributed energy storage node corresponding to the transaction packet as a node with the risk of false data injection attack. Then, the distributed energy storage node corresponding to the transaction packet is removed using the consensus protocol to obtain the trusted node set. The trusted communication subgraph construction unit is used to construct a trusted communication subgraph based on each distributed energy storage node in the trusted node set and the communication links between each node, and then determine the eigenvalues ​​of the Laplace matrix corresponding to the trusted communication subgraph; the eigenvalues ​​are used to characterize the algebraic connectivity of the trusted communication subgraph. The trusted communication subgraph determination unit is used to determine that the trusted communication subgraph includes a spanning tree when the feature value is greater than zero, and to determine that the trusted node set maintains topological connectivity after removing malicious nodes; The second comparison result generation unit is used to determine the active power flow consistency residual based on the power data of each of the distributed energy storage nodes in the set of trusted nodes and the admittance parameters of the distribution network, and then compare the active power flow consistency residual with a preset power flow convergence threshold to obtain the second comparison result. The transaction packet determination unit is used to determine that the transaction packet satisfies the global power flow nonlinear mapping constraint when the second comparison result indicates that the active power flow consistency residual is less than the preset power flow convergence threshold, and to set the transaction packet as a physical real data block and perform evidence storage and on-chain.

[0074] In some specific embodiments, the power control result determination module 15 may specifically include: The transaction packet verification unit is used to broadcast the transaction packet to other nodes in the consortium blockchain via a P2P network, verify the transaction packet using the nodes in the consortium blockchain, and store the transaction packet in the distributed ledger of the consortium blockchain after successful verification. The correction result generation unit is used to perform time delay compensation and topology correction on each distributed energy storage node in the set of trusted nodes by using the time delay tolerance mechanism in the smart contract, the preset time delay tolerance parameters and the communication topology, and to obtain the correction result. The discrete processing characteristic determination unit is used to determine the discrete processing characteristics of the blockchain using an iterative format. Then, using the discrete processing characteristics and the iterative format, and based on the state variables of each distributed energy storage node at the current time, the state variables of trusted neighbor nodes, and the deviation between the system frequency reference value and the actual value, the unit determines the state variables of each distributed energy storage node at the next time. Based on the state variables, the unit adjusts and controls the active power of each distributed energy storage node in the trusted node set to obtain a power control result.

[0075] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the blockchain-based power grid system energy storage security control method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0076] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0077] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0078] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the energy storage security control method for a blockchain-based power grid system executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0079] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed energy storage security control method for a blockchain-based power grid system. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0080] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0081] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0082] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0083] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0084] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A blockchain-based energy storage security control method for a power grid system, characterized in that, include: Obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, the port voltage and the port current; The recursive least squares method is used to identify and update the resistance and capacitance parameters corresponding to the non-intrusive proxy model to obtain a virtual digital twin corresponding to the distributed energy storage node. Then, based on the virtual digital twin and the current state of charge, the reliable physical boundary of power regulation of the distributed energy storage node under the condition of not triggering risks is determined. A consortium blockchain is constructed, comprising a scheduling center and the distributed energy storage nodes. The distributed energy storage nodes are used to encapsulate the node status information and the trusted physical boundary of power regulation. Then, the encapsulation result is hashed and signed using a private key to obtain a transaction packet. The transaction packet is subjected to information consistency verification and physical consistency verification. If the verification fails, the distributed energy storage node corresponding to the transaction packet is removed using a consensus protocol to obtain a set of trusted nodes. The trusted node set is stored in the distributed ledger of the consortium blockchain through a P2P network. The active power of each distributed energy storage node in the trusted node set is adjusted and controlled by smart contracts based on the communication topology, latency tolerance mechanism and iteration format of the trusted node set, so as to obtain the power control result.

2. The energy storage security control method for a blockchain-based power grid system according to claim 1, characterized in that, The non-intrusive proxy model constructed based on the first-order RC equivalent circuit, the port voltage, and the port current includes: Kirchhoff's laws are used to construct an evolution law expression for the polarization voltage based on the port current. Then, the current state of charge at the current moment is determined using the evolution law expression and based on the state of charge at the previous moment, the port current, the charging and discharging efficiency, and the capacity parameters. The open-circuit voltage is determined based on the current state of charge and the open-circuit voltage curve. The state-space voltage relationship model is determined by using the evolution law expression and based on the open-circuit voltage, the voltage across the ohmic internal resistance and the polarization voltage, and the state-space current relationship model is constructed based on the current state of charge, the port current, the charge and discharge efficiency and the capacity parameter. A non-intrusive proxy model is constructed based on the state-space voltage relationship model, the state-space current relationship model, the ohmic internal resistance, the capacity parameter, and the first-order RC equivalent circuit.

3. The energy storage security control method for a blockchain-based power grid system according to claim 1, characterized in that, The step of identifying and updating the resistance and capacitance parameters corresponding to the non-intrusive proxy model using the recursive least squares method to obtain a virtual digital twin corresponding to the distributed energy storage node includes: The RC equivalent circuit in the non-intrusive proxy model is discretized into observation equations, and the predicted value is determined based on the product between the observation vector at the current time and the parameter vector to be identified. Then, the observation terminal voltage at the current time is determined using the observation equations. The time constant parameter is determined based on the resistance and capacitance in the RC equivalent circuit and the sampling interval time, and the current parameter vector is determined based on the time constant parameter and the resistance parameter of the RC equivalent circuit. The current gain matrix is ​​determined based on the covariance matrix of the previous time step, the current observation vector, and the forgetting factor; the forgetting factor is used to adjust the parameter identification sensitivity and noise suppression capability. The current covariance matrix is ​​updated based on the current gain matrix, the observation vector, and the covariance matrix of the previous time step. Then, the current parameter vector is updated based on the current gain matrix, the current observation error, and the parameter vector of the previous time step. The current observation error is the error determined based on the current observed voltage and the current predicted voltage. The resistance parameter and time constant parameter in the new current parameter vector are set as the current resistance-capacitance parameter identification results of the distributed energy storage node, so as to construct a virtual digital twin of the distributed energy storage node based on the current resistance-capacitance parameter identification results, the port voltage, and the port current; the virtual digital twin is used to restore the physical expected behavior of the distributed energy storage node locally. A state vector is constructed based on the state of charge and polarization voltage, and the state space equation of the distributed energy storage node is constructed based on the state vector, the port current, the port voltage, process noise, and measurement noise. A state observer is constructed, and an observation residual system is built using the state observer and the state space equation. The observation residual system is then used to update the virtual digital twin to obtain a new virtual digital twin.

4. The energy storage security control method for a blockchain-based power grid system according to claim 1, characterized in that, The determination of the trusted physical boundary for power regulation of the distributed energy storage node under conditions that do not trigger risks, based on the virtual digital twin and the current state of charge, includes: Based on the current state of charge, rated capacity, charging and discharging efficiency, and scheduling cycle duration of the distributed energy storage node, the charging power boundary of the distributed energy storage node under the upper limit constraint of the state of charge and the discharging power boundary under the lower limit constraint of the state of charge are determined. The charging power boundary is compared with the rated charging power of the distributed energy storage node, and the larger value in the comparison result is set as the maximum charging power boundary; the maximum charging power boundary is used to characterize the upper limit of the charging power of the distributed energy storage node without triggering the risk of overcharging. The discharge power boundary is compared with the rated discharge power, and the smaller value in the comparison result is set as the maximum discharge power boundary; the maximum discharge power boundary is used to characterize the upper limit of the discharge power of the distributed energy storage node without triggering the risk of over-discharge. The power regulation reliable physical boundary of the distributed energy storage node is constructed based on the maximum charging power boundary and the maximum discharging power boundary.

5. The energy storage security control method for a blockchain-based power grid system according to claim 1, characterized in that, The construction includes a consortium blockchain comprising a scheduling center and the distributed energy storage nodes. The distributed energy storage nodes encapsulate node status information with the trusted physical boundary for power regulation. Then, a private key is used to hash and sign the encapsulation result to obtain a transaction packet, including: A consortium blockchain is constructed, comprising a scheduling center and the distributed energy storage nodes. The distributed energy storage nodes are then used to encapsulate the node status information and the trusted physical boundary for power regulation to obtain the encapsulated data packet. The private key of the distributed energy storage node is used to perform hash operation and signature on the encapsulated data packet to obtain a transaction packet; the hash signature is used to maintain the integrity of the data packet during transmission; the transaction packet includes the identity identifier of the distributed energy storage node, node status information, the trusted physical boundary of power regulation, timestamp, and hash signature.

6. The energy storage security control method for a blockchain-based power grid system according to claim 5, characterized in that, The process involves performing information consistency verification and physical consistency verification on the transaction packet, and, upon verification failure, removing the distributed energy storage node corresponding to the transaction packet using a consensus protocol, thereby obtaining a set of trusted nodes, including: The public key of the distributed energy storage node is used to verify the hash signature in the transaction packet to obtain the verification result. After the verification result indicates that the verification is successful, the non-intrusive proxy model is used to predict the terminal voltage at the current moment to obtain the terminal voltage prediction value. Then, the terminal voltage of the distributed energy storage node at the grid connection point is measured to obtain the terminal voltage measurement value. The difference between the measured value of the terminal voltage and the predicted value of the terminal voltage is determined to obtain the physical residual. Then, a detection statistic is constructed based on the physical residual, and the detection statistic is compared with a threshold determined based on a preset significance level to obtain a first comparison result. When the first comparison result indicates that the detection statistic is greater than the threshold, it is determined that the node status information in the transaction packet has deviated from the consistency trajectory in terms of physical statistical characteristics, and the distributed energy storage node corresponding to the transaction packet is set as a node with the risk of false data injection attack. Then, the distributed energy storage node corresponding to the transaction packet is removed using the consensus protocol to obtain a set of trusted nodes. A trusted communication subgraph is constructed based on each distributed energy storage node in the trusted node set and the communication links between the nodes. Then, the eigenvalues ​​of the Laplace matrix corresponding to the trusted communication subgraph are determined. The eigenvalues ​​are used to characterize the algebraic connectivity of the trusted communication subgraph. When the feature value is greater than zero, it is determined that the trusted communication subgraph includes a spanning tree, and it is determined that the set of trusted nodes maintains topological connectivity after removing malicious nodes; Based on the power data of each distributed energy storage node in the set of trusted nodes and the admittance parameters of the distribution network, the active power flow consistency residual is determined, and then the active power flow consistency residual is compared with a preset power flow convergence threshold to obtain a second comparison result. When the second comparison result indicates that the active power flow consistency residual is less than the preset power flow convergence threshold, it is determined that the transaction packet satisfies the global power flow nonlinear mapping constraint, and the transaction packet is set as a physical real data block and stored on the blockchain.

7. The energy storage security control method for a blockchain-based power grid system according to any one of claims 1 to 6, characterized in that, The process involves storing the set of trusted nodes in the distributed ledger of the consortium blockchain via a P2P network, and then using smart contracts to adjust and control the active power of each distributed energy storage node in the set of trusted nodes based on the communication topology, latency tolerance mechanism, and iteration format of the set of trusted nodes, to obtain power control results, including: The transaction packet is broadcast to other nodes in the consortium blockchain via a P2P network, and the nodes in the consortium blockchain verify the transaction packet. After successful verification, the transaction packet is stored in the distributed ledger of the consortium blockchain. By utilizing the latency tolerance mechanism in smart contracts, preset latency tolerance parameters, and communication topology, time delay compensation and topology correction are performed on each distributed energy storage node in the set of trusted nodes to obtain the correction result. The discrete processing characteristics of the blockchain are determined using an iterative format. Then, the discrete processing characteristics and the iterative format are used to determine the state variables of each distributed energy storage node at the next moment based on the state variables of each distributed energy storage node at the current moment, the state variables of trusted neighbor nodes, and the deviation between the system frequency reference value and the actual value. The active power of each distributed energy storage node in the set of trusted nodes is adjusted and controlled based on the state variables to obtain the power control result.

8. A blockchain-based energy storage safety control device for a power grid system, characterized in that, include: A non-intrusive proxy model construction module is used to obtain the port voltage and port current of the distributed energy storage node at the grid connection point, and construct a non-intrusive proxy model based on the first-order RC equivalent circuit, the port voltage and the port current. The virtual digital twin generation module is used to identify and update the resistance and capacitance parameters corresponding to the non-intrusive proxy model using the recursive least squares method to obtain a virtual digital twin corresponding to the distributed energy storage node. Then, based on the virtual digital twin and the current state of charge, the reliable physical boundary of power regulation of the distributed energy storage node under the condition of not triggering risks is determined. The transaction packet generation module is used to construct a consortium blockchain including the scheduling center and the distributed energy storage nodes, and to encapsulate the node status information and the trusted physical boundary of power regulation using the distributed energy storage nodes. Then, the encapsulation result is hashed and signed using a private key to obtain the transaction packet. The trusted node set generation module is used to perform information consistency verification and physical consistency verification on the transaction packet, and remove the distributed energy storage node corresponding to the transaction packet using a consensus protocol after the verification fails, so as to obtain the trusted node set. The power control result determination module is used to store the set of trusted nodes in the distributed ledger of the consortium blockchain through a P2P network, and to adjust and control the active power of each of the distributed energy storage nodes in the set of trusted nodes using smart contracts and based on the communication topology, latency tolerance mechanism and iteration format of the set of trusted nodes, so as to obtain the power control result.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the energy storage security control method for a blockchain-based power grid system as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the energy storage security control method for a blockchain-based power grid system as described in any one of claims 1 to 7.