Power grid state prediction method and device, equipment and storage medium

By mapping the power grid topology data structure to the PI-SNN framework and introducing Kirchhoff's current law constraints, and combining the model training with a high-fidelity physical simulator, the problems of low computational efficiency and insufficient reliability in power grid state prediction are solved, and ultra-real-time, reliable power grid state prediction and rapid instability early warning are achieved.

CN122225397APending Publication Date: 2026-06-16YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST
Filing Date
2026-02-09
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing technologies are computationally inefficient and unreliable in power grid condition prediction, making it difficult to meet the needs of large-scale online power grid analysis. In particular, purely data-driven methods may produce erroneous results that violate physical laws in extreme scenarios.

Method used

A Physical Information Spike Neural Network (PI-SNN) framework is adopted. By modifying the membrane potential dynamic equation of the leaky integral ignition neuron model to implicitly incorporate Kirchhoff's current law, and combining it with a high-fidelity physical simulator to generate training samples, a PI-SNN model for power grid state prediction is constructed. The model parameters are then optimized through backpropagation and gradient descent.

Benefits of technology

It improves the computational efficiency of power grid state prediction while ensuring physical reliability, enabling ultra-real-time power grid state prediction, and maintains long-term reliability through a low-frequency verification mechanism, with the ability to quickly predict instability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122225397A_ABST
    Figure CN122225397A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a power grid state prediction method and device, equipment and a storage medium, relates to the power distribution network field, and the method maps the topology data structure of the equivalent circuit of the power distribution network into a PI-SNN framework, modifies the membrane potential dynamic equation of the leaky integrate-and-fire neuron model used by the neural network model into a target membrane potential dynamic equation that implicitly contains Kirchhoff's current law, and gives the PI-SNN framework to obtain a PI-SNN model, so that a digital twin simulation model of the power distribution network, namely the PI-SNN model, can be effectively constructed. Since Kirchhoff's current law exists in the PI-SNN model as a physical law for constraint, and the PI-SNN model runs in an event-driven asynchronous parallel mode, the calculation speed is very fast, and therefore, the power grid state prediction can be realized in super real time on the basis of ensuring physical reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution network technology, and in particular to a power grid condition prediction method, apparatus, equipment, and storage medium. Background Technology

[0002] Digital twin technology for distribution networks is crucial for predicting the state of the distribution network. Currently, there are two main technical approaches in this field: one is a physical mechanism-based modeling method, which accurately simulates the dynamic process of the power grid by solving a system of differential algebraic equations to achieve power grid state prediction. However, its computational efficiency is low, making it difficult to meet the needs of large-scale online power grid analysis. The other is a purely data-driven surrogate model, such as deep neural networks. Although it can improve speed, its "black box" nature leads to poor extrapolation. In extreme scenarios where the training data is not covered, it may give erroneous results that violate physical laws, making reliability difficult to guarantee.

[0003] Therefore, there is an urgent need for a power grid state prediction method that can both inherit the reliability of physical models and effectively improve computational efficiency with ultra-real-time computational performance. Summary of the Invention

[0004] The main objective of this invention is to provide a power grid condition prediction method, apparatus, device, and storage medium that can effectively achieve ultra-real-time power grid condition prediction while ensuring physical reliability.

[0005] To achieve the above objectives, the first aspect of the present invention provides a power grid state prediction method, the method comprising: Obtain the topology data structure of the equivalent circuit of the power distribution network; Based on the topology data structure, the power distribution network is mapped to a Physical Information Spike Neural Network (PI-SNN) framework, and the network topology of the PI-SNN framework is consistent with the topology data structure. The membrane potential dynamic equation of the leaking integral ignition neuron model used in the neural network model is modified to obtain the target membrane potential dynamic equation with hidden Kirchhoff current law. The target membrane potential dynamic equation is then assigned to each node in the PI-SNN framework to obtain the PI-SNN model to be trained. A high-fidelity physical simulator is used to generate training samples, which include a first power grid state, a power vector corresponding to an event, and a second power grid state. The power vector in the training samples is converted into a current vector equivalent to the current stimulation of neurons in a neural network model to obtain the target training sample. The first power grid state and the current vector constitute the input data, and the second power grid state after the event affects the power grid state is used as the output data. The PI-SNN model to be trained is trained according to the target training samples to obtain a trained PI-SNN model for predicting the power grid state. The target grid state of the distribution network is obtained, and the target grid state is input into the PI-SNN model for state prediction to obtain the target grid state of the distribution network.

[0006] Optionally, the dynamic equation for the target membrane potential is as follows:

[0007] Represents the nodes in the PI-SNN model The voltage at time t, This represents the voltage of node j at time t in the PI-SNN model. The current vector at node i at time t. Let represent the admittance on the branch formed by nodes i and j. Let i represent the set of all nodes adjacent to node i. Mathematically equivalent to applying Kirchhoff's current law at node i; Indicates the reference voltage of the node. The first parameter, representing the capacitance of the neuron membrane, is obtained by training the i-th node in the PI-SNN model. This represents the second parameter, which is equivalent to the membrane conductance of the neuron membrane, obtained by training the i-th node in the PI-SNN model.

[0008] Optionally, the PI-SNN model to be trained is trained according to the target training samples to obtain a trained PI-SNN model for predicting the power grid state. The loss function is constructed by minimizing the optimal algorithm; The first power grid state and current vector in the target training sample are input into the PI-SNN model to be trained to obtain the predicted power grid state. Substituting the predicted power grid state and the second power grid state into the loss function, the loss value is obtained; If the PI-SNN model to be trained converges based on the loss value or the number of iterations, then the last PI-SNN model to be trained will be used as the PI-SNN model after training for predicting the power grid state based on the occurrence of events. If, based on the loss value or the number of iterations, it is determined that the PI-SNN model to be trained has not converged, then the parameters in the parameter set of each node in the PI-SNN model to be trained are adjusted using the loss value through backpropagation and gradient descent to obtain an updated PI-SNN model to be trained, and the process of inputting the first power grid state and the current vector from the target training sample into the PI-SNN model to be trained to obtain the predicted power grid state is returned.

[0009] Optionally, the loss function is as follows:

[0010]

[0011]

[0012] in, Represents the loss function. This represents the set of parameters to be trained for each node. and This represents the preset hyperparameters. This represents the data fitting loss value. This represents the physical constraint loss value. Represents a function, This represents the predicted power grid state obtained by training using the k-th training sample. Indicates the second power grid state. Let L represent the square of the L2 norm, and N represent the total number of training samples.

[0013] Optionally, the step of mapping the distribution network to a Physical Information Spike Neural Network (PI-SNN) framework based on the topology data structure includes: The bus nodes in the topology data structure of the power distribution network are mapped to spiking neurons in the PI-SNN framework, and the branches connecting two nodes in the topology data structure of the power distribution network are mapped to the synapses of the spiking neurons corresponding to the two nodes in the PI-SNN framework.

[0014] Optionally, the method further includes: The high-fidelity physical simulator is controlled to operate at a preset low frequency to generate a third and fourth power grid state for verification. The third power grid state is input into the PI-SNN model to obtain the output verification power grid state; Determine the relative deviation between the verified power grid state and the fourth power grid state; When the relative deviation value is greater than or equal to the preset deviation threshold, the PI-SNN model is fine-tuned and optimized to obtain the optimized PI-SNN model.

[0015] Optionally, the method further includes: During the prediction process, the PI-SNN model is monitored to obtain the voltage values ​​of each node in the PI-SNN model at the current time. From the voltage values ​​of each node in the PI-SNN model at the current moment, select the voltage values ​​that are greater than the reference voltage corresponding to the corresponding node to form the pulse firing rate vector at the current moment; The resilience margin and stability mode deviation of the distribution network are calculated based on the pulse firing rate vector at the current moment and the preset health benchmark attractor. When the deviation of the stability mode exceeds the resilience margin, an early warning is triggered to indicate that the distribution network is rapidly becoming unstable.

[0016] To achieve the above objectives, a second aspect of the present invention provides a power grid state prediction device, the device comprising: The acquisition module is used to acquire the topology data structure of the equivalent circuit of the power distribution network; A mapping module is used to map the power distribution network into a Physical Information Spur Neural Network (PI-SNN) framework based on the topology data structure, wherein the network topology of the PI-SNN framework is consistent with the topology data structure. The modification module is used to modify the membrane potential dynamic equation of the leaky integral ignition neuron model used in the neural network model to obtain the target membrane potential dynamic equation with hidden Kirchhoff current law. The target membrane potential dynamic equation is then assigned to each node in the PI-SNN framework to obtain the PI-SNN model to be trained. The generation module is used to generate training samples using a high-fidelity physical simulator. The training samples include a first power grid state, a power vector corresponding to an event, and a second power grid state. The power vector in the training samples is converted into a current vector equivalent to the current stimulation of neurons in a neural network model to obtain a target training sample. The first power grid state and the current vector constitute the input data, and the second power grid state after the event affects the power grid state is used as the output data. The training module trains the PI-SNN model to be trained based on the target training samples to obtain a trained PI-SNN model for predicting the power grid state. The prediction module is used to obtain the power grid state to be input into the distribution network, input the power grid state to be input into the PI-SNN model for state prediction, and obtain the target power grid state of the distribution network.

[0017] To achieve the above objectives, a third aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the power grid state prediction method in the first aspect.

[0018] To achieve the above objectives, a fourth aspect of the present invention provides a computer device including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the power grid state prediction method of the first aspect.

[0019] The embodiments of the present invention have the following beneficial effects: This invention provides a method for predicting the state of a power grid. The method includes: acquiring the topological data structure of the equivalent circuit of a distribution network; mapping the distribution network to a Physical Information Spur Neural Network (PI-SNN) framework based on the topological data structure, wherein the network topology of the PI-SNN framework is consistent with the topological data structure; modifying the membrane potential dynamic equation of the leaky integral ignition neuron model used in the neural network model to obtain a target membrane potential dynamic equation containing the hidden Kirchhoff current law; assigning the target membrane potential dynamic equation to each node in the PI-SNN framework to obtain a PI-SNN model to be trained; and generating training samples using a high-fidelity physical simulator, wherein the training samples contain a first power grid state. The system obtains the target training sample by converting the power vector corresponding to the occurrence of an event into a current vector equivalent to the current stimulation of neurons in a neural network model. The first grid state and the current vector constitute the input data, and the second grid state after the occurrence of the event affects the grid state is used as the output data. The PI-SNN model to be trained is trained according to the target training sample to obtain the trained PI-SNN model for predicting the grid state. The grid state to be input of the distribution network is obtained and input into the PI-SNN model for state prediction to obtain the target grid state of the distribution network. In this embodiment of the invention, the topological data structure of the equivalent circuit of the distribution network is mapped to the PI-SNN framework. At the same time, the membrane potential dynamic equation of the leakage integral ignition neuron model used in the neural network model is modified to the target membrane potential dynamic equation containing the hidden Kirchhoff current law, and then given to the PI-SNN framework to obtain the PI-SNN model. This enables the effective construction of a digital twin simulation model of the distribution network, namely the PI-SNN model. Since the PI-SNN model is constrained by the Kirchhoff current law as a physical law, and it runs in an event-driven asynchronous parallel mode, the calculation speed is very fast. Therefore, it can achieve ultra-real-time power grid state prediction while ensuring physical reliability. Attached Figure Description

[0020] 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] in: Figure 1 This is a flowchart illustrating the power grid state prediction method in an embodiment of the present invention; Figure 2 This is a schematic diagram of the equivalent model of the power distribution network in an embodiment of the present invention; Figure 3 This is a schematic diagram of the power grid state prediction device in an embodiment of the present invention; Figure 4 This is a structural block diagram of a computer device in an embodiment of the present invention. Detailed Implementation

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

[0023] Please see Figure 1 The diagram below illustrates a power grid state prediction method according to an embodiment of the present invention. The method includes: Step 101: Obtain the topology data structure of the equivalent circuit of the distribution network; Step 102: Based on the topology data structure, map the power distribution network into a Physical Information Spike Neural Network (PI-SNN) framework, wherein the network topology of the PI-SNN framework is consistent with the topology data structure; Step 103: Modify the membrane potential dynamic equation of the leaky integral ignition neuron model used in the neural network model to obtain the target membrane potential dynamic equation with hidden Kirchhoff current law. Assign the target membrane potential dynamic equation to each node in the PI-SNN framework to obtain the PI-SNN model to be trained. In this embodiment of the invention, the above-mentioned power grid state prediction method is implemented by a power grid state prediction device, which is a program module stored in the storage medium of the device used to implement the power grid state prediction method, so that the processor can implement the power grid state prediction method in this embodiment of the invention by calling and executing the corresponding program module.

[0024] In this embodiment of the invention, it is necessary to first obtain the equivalent circuit of the distribution network, and further collect the topology data structure of the equivalent circuit of the distribution network. This topology data structure includes nodes and the connections between them, enabling the distribution network to be mapped to a Physical Information Spiking Neural Network (PI-SNN) framework based on this topology data structure, while maintaining consistency between the network topology of the PI-SNN framework and the topology data structure. Specifically, the bus nodes in the distribution network's topology data structure can be mapped to spiking neurons in the PI-SNN framework, and the branches connecting two nodes in the distribution network's topology data structure can be mapped to the synapses of the corresponding spiking neurons in the PI-SNN framework. For example, nodes A and B in the topology data structure can be mapped to spiking neurons A and B, respectively, and the connection branches between nodes A and B can be mapped to the synapses of spiking neurons A and B, so that the distribution network can be equivalently represented as a spiking neuron network.

[0025] After obtaining the above PI-SNN framework, the membrane potential dynamic equation of the leaky integral ignition neuron model used in the neural network model will be modified to obtain the target membrane potential dynamic equation containing the hidden Kirchhoff circuit law. This target membrane potential dynamic equation will then be assigned to each node in the PI-SNN framework to obtain a complete PI-SNN model to be trained.

[0026] It should be noted that when obtaining the topology data structure of the equivalent circuit of the distribution network, the reference parameters of the equivalent circuit of the distribution network will also be obtained. These reference parameters include the nominal voltage of the nodes, the resting potential, the impedance and admittance parameters of each branch, etc. The reference parameters of each node in the topology data structure are assigned to each node of the PI-SNN model to be trained to complete the initialization of the PI-SNN model to be trained. This ensures that the PI-SNN model to be trained is not only structurally consistent with the distribution network, but also provides a clearly defined physical starting point for training the PI-SNN model, effectively realizing the digital twin of the distribution network. This allows a model for simulating the distribution network to be obtained through training the PI-SNN model.

[0027] PI-SNN combines SNN and PINN. SNN refers to the third-generation neural network model, which processes information by simulating the dynamic changes in the membrane potential of neurons and the synaptic impulse transmission mechanism. It has the spatiotemporal characteristics and event-driven nature of biological nervous systems and has the advantage of high processing efficiency. PINN is a physical information neural network that embeds physical laws into the neural network architecture to achieve data-driven and physical rules, so that the output of the model can comply with known physical rules or laws. PI-SNN, which combines SNN and PINN, is a machine learning model that uses spiking neural networks as the basic model and introduces physical laws for constraints. This makes PI-SNN a model that is both highly efficient and complies with physical laws. It not only meets the requirement of complying with physical laws for predicting the power grid state of the distribution network, but also makes ultra-real-time prediction possible, effectively meeting the needs of predicting the power grid state of the distribution network.

[0028] Furthermore, the dynamic equation for the target membrane potential, which implicitly contains Kirchhoff's circuit laws, is as follows:

[0029] Represents nodes in the PI-SNN model The voltage at time t, This represents the voltage of node j at time t in the PI-SNN model. The current vector at node i at time t is obtained by converting the node's power vector into the current stimulation of the neuron, which will be described in detail later. Let represent the admittance on the branch formed by nodes i and j. Let i represent the set of all nodes adjacent to node i.

[0030] Mathematically, this is equivalent to applying Kirchhoff's current law to node i, thereby embedding the physical law as a hard constraint into the forward propagation process of the PI-SNN model to be trained, so that the output of the model can conform to the physical law.

[0031] Indicates the reference voltage of the node. The first parameter, representing the capacitance of the neuron membrane, is obtained by training the i-th node in the PI-SNN model. This represents the second parameter, which is equivalent to the membrane conductance of the neuron membrane, obtained by training the i-th node in the PI-SNN model.

[0032] It should be noted that the above target membrane potential dynamic equation is obtained by modifying the membrane potential dynamic equation of the integral leakage ignition neuron model of the neural network model. Therefore, the interpretation of each parameter above is to transform the interpretation of parameters in the neuron domain to the distribution network domain, so that the target membrane potential dynamic equation can be applied to the distribution network domain.

[0033] To better understand the PI-SNN model in this embodiment of the invention, the following explanation will cover the relevant interpretation of the above membrane potential dynamic equation in the field of neurons. This represents the equivalent capacitance of the neuron membrane. Indicates the membrane conductance of a neuron. This represents the membrane potential of the i-th neuron at time t. This represents the steady-state potential of a neuron when it is not stimulated. This represents the external injection of electrical stimulation into the i-th neuron. This represents the set of neighboring neurons connected to the i-th neuron. This represents the synaptic conductance connecting the i-th neuron and the j-th neuron. Furthermore, m represents the membrane in the neuron domain; the neuron membrane is a physical entity, while in a power distribution network, it is an abstract membrane. In a power distribution network, this parameter can be understood as equivalent to the capacitance of a neuron's membrane. It can be used to describe the inertia / velocity of voltage changes at nodes in the power distribution network, similar to the neuron domain. In a power distribution network, it can be understood as a parameter equivalent to the membrane conductance of a neuron membrane, and can be used to describe the admittance component of a constant impedance load connected to a node in the power distribution network.

[0034] Step 104: Generate training samples using a high-fidelity physical simulator. The training samples include a first power grid state, a power vector corresponding to the event, and a second power grid state. Convert the power vector in the training samples into a current vector equivalent to the current stimulation of neurons in a neural network model to obtain the target training samples. The first power grid state and the current vector constitute the input data, and the second power grid state after the event affects the power grid state is used as the output data. Step 105: Train the PI-SNN model to be trained according to the target training samples to obtain the trained PI-SNN model for predicting the power grid state. In this embodiment of the invention, after obtaining the PI-SNN model to be trained, a high-fidelity physical simulator is used to generate training samples for training the PI-SNN model. The high-fidelity physical simulator is a simulation model constructed based on the equivalent circuit of a distribution network, capable of accurately mimicking the operation of the distribution network. In one feasible implementation, the high-fidelity physical simulator can be based on differential algebraic equations to simulate various operating conditions and disturbance scenarios, generating a large number of "state-action-evolution" data pairs as training samples. Here, "state" refers to the first grid state, including a preset time... The voltage vector of the long-range input distribution network includes voltage magnitude and phase angle. The occurrence event refers to the disturbance or control operation applied to the distribution network, such as line tripping, load change, generator output change, switch opening and closing, etc. The occurrence event is used to indicate the cause of the system state change. Evolution refers to the process of the distribution network state changing under the above "state" and "action" conditions, resulting in the final output state of the distribution network. Therefore, "state" corresponds to the first grid state, "action" corresponds to the power vector corresponding to the occurrence event, and "evolution" corresponds to the second grid state.

[0035] It should be noted that the high-fidelity physical simulator also has the topology data structure of the equivalent circuit of the distribution network mentioned above. Therefore, each node in the high-fidelity physical simulator has a one-to-one correspondence with each node in the PI-SNN model. In the obtained training samples, the first grid state contains the voltage vector of each node in the high-fidelity physical simulator at each time, the second grid state contains the evolved voltage vector of each node in the PI-SNN model, and the power vector contains the net inflow power value of each node in the high-fidelity physical simulator.

[0036] Since there is no concept of net inflow power value in the neural network model, it is necessary to transform the power vector of the training sample into a current vector equivalent to the current stimulation of neurons in the neural network model, so as to obtain the target training sample. In the target training sample, the first grid state and the current vector are used as input data, and the second grid state after the event affects the grid state change is used as output data.

[0037] Furthermore, the net inflow power values ​​of each node at each time step obtained from the high-fidelity physical simulator simulation process are encoded into pulse stimulation current values ​​to achieve the conversion process. The formula for the pulse stimulation current value of node i at time t is as follows:

[0038] in, This represents the preset coding gain coefficient, used to map the net inflow power value to a suitable range of neuron input current. This is a preset reference bias current used to maintain the basic activity of each node in the PI-SNN model when there is no injected power. This represents the pulse stimulation current value at node i at time t. This represents the net inflow power value.

[0039] The reference bias current is used to maintain the basic activity of neurons (nodes) in the PI-SNN model when there is no injected power. This can prevent the PI-SNN model from stalling due to zero input, thereby ensuring the continuity and stability of the model.

[0040] By using the above formula, the physical quantity of the power grid, namely the net inflow power value, can be converted into the pulse stimulation current value that the PI-SNN model can process, ensuring that the power grid state, such as power changes, can be input into the PI-SNN model in an event-driven manner.

[0041] In this embodiment, the PI-SNN model to be trained is trained according to the target training samples to obtain the trained PI-SNN model, which is used to predict the power grid state based on the occurrence of events.

[0042] Specifically, the process of training the PI-SNN model to be trained based on the target training samples is as follows: A1: Construct the loss function by minimizing it using the optimal algorithm; A2: Input the first power grid state and the current vector from the target training sample into the PI-SNN model to be trained to obtain the predicted power grid state; A3: Substitute the predicted power grid state and the second power grid state into the loss function to obtain the loss value; A4: If the PI-SNN model to be trained converges based on the loss value or the number of iterations, then the last PI-SNN model to be trained will be used as the PI-SNN model to be trained after training for predicting the power grid state based on the occurrence of events. A5: If, based on the loss value or the number of iterations, it is determined that the PI-SNN model to be trained has not converged, then the parameters in the parameter set of each node in the PI-SNN model to be trained are adjusted using the loss value through backpropagation and gradient descent to obtain an updated PI-SNN model to be trained, and the step of inputting the first power grid state and the current vector in the target training sample into the PI-SNN model to be trained to obtain the predicted power grid state is returned.

[0043] Steps A1 to A5 above describe the detailed training process, specifically: Because the membrane potential dynamic equation of the leaky integral ignition neuron model has been modified to obtain the target membrane potential implied by Kirchhoff's current law, and this potential is assigned to each node in the PI-SNN framework to obtain the PI-SNN model, the loss function used to train this PI-SNN model also needs to be improved so that it can also reflect the influence of Kirchhoff's current law, in order to effectively achieve consistency between data fitting accuracy and physical laws. Specifically, the loss function is as follows:

[0044]

[0045]

[0046] in, Represents the loss function. This represents the set of parameters to be trained for each node. and This represents the preset hyperparameters. This represents the data fitting loss value, used to minimize the prediction error. This represents the physical constraint loss value. The function is used to calculate the degree to which the predicted power grid state output by the PI-SNN model violates the laws of physics. This represents the predicted power grid state obtained by training using the k-th training sample. This represents the second power grid state in the training samples. Let L represent the square of the L2 norm, and N represent the total number of training samples.

[0047] It should be noted that the parameter set to be trained at the node includes at least the reference voltage, the first parameter, and the second parameter in the above-mentioned target membrane potential dynamic equation.

[0048] When training the PI-SNN model, the first grid state and current vector from the target training samples are input into the PI-SNN model to obtain the predicted grid state output by the PI-SNN model. Specifically, all voltage vectors and current vectors at the same time are input into the corresponding nodes, so that each node in the PI-SNN model can be trained based on the parameters corresponding to each node in the high-fidelity physical simulator to obtain the predicted grid state. The predicted grid state and the second grid state are substituted into the loss function mentioned above to obtain the loss value. If the loss value is less than the preset convergence threshold, the loss is calculated. If the loss value or the number of iterations trained on the PI-SNN model has reached a preset number, then the PI-SNN model to be trained is determined to have converged. The PI-SNN model used in the last training iteration is then used as the PI-SNN model for predicting the power grid state after training. If, based on the loss value or the number of iterations, it is determined that the PI-SNN model to be trained has not converged, then the parameters in the parameter set of each node in the PI-SNN model to be trained are adjusted using the loss value through backpropagation and gradient descent to obtain the updated PI-SNN model to be trained. Then, the process returns to step B above to continue the iterative training process.

[0049] In this embodiment of the invention, after training is completed, the trained values ​​of each parameter in the parameter set to be trained for each node in the PI-SNN model can be obtained, so that the dynamic equation of the target membrane potential of each node can be fixed for prediction. The PI-SNN model after training is a digital twin model of the distribution network, which is used to effectively predict the power grid state of the distribution network.

[0050] It should be noted that in the above training process, after the first grid state and current vector from the training samples are input into the PI-SNN model to be trained, each node in the PI-SNN model will perform an inference process based on the input voltage and current vectors. During the inference process, for each node in the PI-SNN model to be trained, the relevant parameters are substituted into the above target membrane potential dynamic equation, and the target membrane potential dynamic equation is solved using the numerical integration method to obtain the voltage curve of the node during the training process. When the voltage exceeds the threshold at a certain moment, the node will emit a pulse, affecting the inference process of other nodes and the inference at the next moment. Finally, the grid vector of each node is obtained. After a training process is completed, the curve formed by the voltage vectors output by each node can be used as the predicted grid state.

[0051] Step 106: Obtain the power grid state to be input into the distribution network, input the power grid state to be input into the PI-SNN model for state prediction, and obtain the target power grid state of the distribution network.

[0052] It should be noted that after the PI-SNN model is trained and obtained, if the target grid state is obtained using the PI-SNN model, only the grid state to be input needs to be obtained, and its power vector does not need to be obtained and transformed. This is because after the PI-SNN model is trained, the current vector can be calculated based on the grid state to be trained.

[0053] In this embodiment of the invention, after obtaining the trained PI-SNN model, the target grid state of the distribution network can be acquired and input into the PI-SNN model for state prediction, thus obtaining the target grid state of the distribution network. Target training samples are obtained by generating training samples using a high-fidelity physical simulator and converting the power vector to the current vector of the neuron. These target training samples are then used to train the constructed PI-SNN model, enabling the PI-SNN model to mimic the input-output response of the high-fidelity physical simulator. Since the PI-SNN model operates in an event-driven asynchronous parallel manner, it has high processing speed and efficiency, effectively improving the prediction of the grid state of the distribution network and achieving ultra-real-time simulation exercises.

[0054] Furthermore, in this embodiment of the invention, the topology data structure of the equivalent circuit of the distribution network is first obtained, and the distribution network is mapped to a PI-SNN framework based on the topology data structure. The network topology structure of the PI-SNN framework is consistent with the topology data structure, and the membrane potential dynamic equation of the leakage integral ignition neuron model used in the neural network model is modified to obtain the target membrane potential dynamic equation containing the hidden Kirchhoff current law. The target membrane potential dynamic equation is assigned to each node in the PI-SNN framework to obtain the PI-SNN model to be trained, thus completing the construction of the PI-SNN model to be trained. Furthermore, a high-fidelity physical simulator is used to generate training samples, which include the first... The system takes the following parameters: grid state, power vector corresponding to the event, and second grid state; the power vector in the training sample is converted into a current vector equivalent to the current stimulation of neurons in a neural network model to obtain the target training sample; the first grid state and the current vector constitute the input data; the second grid state after the event affects the grid state is used as the output data; the PI-SNN model to be trained is trained according to the target training sample to obtain the trained PI-SNN model for predicting the grid state; the grid state to be input of the distribution network is obtained, and the grid state to be input is input into the PI-SNN model for state prediction to obtain the target grid state of the distribution network. In this embodiment of the invention, the topological data structure of the equivalent circuit of the distribution network is mapped to the PI-SNN framework. At the same time, the membrane potential dynamic equation of the leakage integral ignition neuron model used in the neural network model is modified to the target membrane potential dynamic equation containing the hidden Kirchhoff current law, and then given to the PI-SNN framework to obtain the PI-SNN model. This enables the effective construction of a digital twin simulation model of the distribution network, namely the PI-SNN model. Since the PI-SNN model is constrained by the Kirchhoff current law as a physical law, and it runs in an event-driven asynchronous parallel mode, the calculation speed is very fast. Therefore, it can achieve ultra-real-time power grid state prediction while ensuring physical reliability.

[0055] It should be noted that, in order to ensure the long-term reliability of the PI-SNN model—that is, to ensure it can consistently obey the laws of physics and achieve super real-time performance—a low-frequency verification mechanism is introduced. This mechanism is used to fine-tune the PI-SNN model to ensure its reliability. Specifically, the following method can be used: B1: Control the high-fidelity physical simulator to run at a preset low frequency to generate a third and fourth power grid state for verification; B2: Input the third power grid state into the PI-SNN model to obtain the output verification power grid state; B3: Determine the relative deviation between the verified power grid state and the fourth power grid state; B4: When the relative deviation value is greater than or equal to the preset deviation threshold, the PI-SNN model is fine-tuned and optimized to obtain the optimized PI-SNN model.

[0056] In this embodiment of the invention, the low-frequency verification mechanism first requires controlling the high-fidelity physical simulator to run at a preset low frequency. This low frequency can be a frequency value less than a preset frequency threshold. A third grid state for verification is generated by running at low frequency. This third grid state is input into the PI-SNN model to obtain the output verification grid state. The relative deviation value between the verification grid state and the fourth grid state is determined. When the relative deviation value is greater than or equal to the preset deviation threshold, it indicates that the reliability of the PI-SNN model has decreased. At this time, the PI-SNN model needs to be fine-tuned and optimized to obtain the optimized PI-SNN model.

[0057] The formula for calculating the relative deviation value is as follows:

[0058] in, This indicates that the power grid status is being checked. Indicates the fourth power grid state. This represents the Euclidean distance between the current grid state and the fourth grid state. The norm representing the fourth grid state is used for normalization. This represents the relative deviation value.

[0059] In this embodiment of the invention, training samples are also required during fine-tuning. These training samples can be part or all of the aforementioned target training samples, or regenerated and transformed training samples. During training, a small number of training processes can be performed, such as 5-10 iterations, to optimize the gradient descent of the PI-SNN model. When calculating the loss value, a very small learning rate can be used, for example, much smaller than the learning rate used during the model training. This very small learning rate can be set based on experience to avoid the "catastrophic forgetting" process. That is, the purpose of this fine-tuning is to enable the PI-SNN model to quickly adapt to the current events through minor adjustments, thereby maintaining long-term reliability.

[0060] In this embodiment of the invention, by introducing a low-frequency verification mechanism, the prediction bias of the PI-SNN model can be detected and corrected in a timely manner, ensuring the reliability of long-term operation and forming an autonomous and reliable closed loop for simulation and evaluation.

[0061] In this embodiment of the invention, the resilience of the distribution network can also be assessed based on the PI-SNN model, so that when the distribution network is rapidly becoming unstable, an early warning can be issued in time, thereby achieving an early warning of resilience risks.

[0062] Specifically, the resilience of the distribution network can be assessed using the following methods: C1: During the prediction process, the PI-SNN model is monitored to obtain the voltage values ​​of each node of the PI-SNN model at the current time. C2: From the voltage values ​​of each node in the PI-SNN model at the current moment, select the voltage values ​​that are greater than the reference voltage corresponding to the corresponding node to form the pulse firing rate vector at the current moment; C3: Calculate the resilience margin and stability mode deviation of the distribution network based on the pulse firing rate vector at the current moment and the preset health benchmark attractor; C4: When the deviation value of the stability mode is greater than the resilience margin value, an early warning is triggered to indicate that the distribution network is rapidly becoming unstable.

[0063] In this embodiment of the invention, after the power grid state to be input is entered into the PI-SNN model, the PI-SNN model is monitored during the prediction process to obtain the voltage values ​​of each node in the PI-SNN model at the current time. From the voltage values ​​of each node in the PI-SNN model at the current time, voltage values ​​greater than the reference voltage corresponding to the corresponding node are selected to form the pulse firing rate vector at the current time. The pulse firing rate vector at the current time is obtained. Furthermore, the resilience margin value of the distribution network is calculated based on the pulse firing rate vector at the current time and the preset health benchmark attractor. When the stability mode deviation value is greater than the resilience margin value, an early warning is triggered to indicate that the distribution network is rapidly becoming unstable.

[0064] The formula for calculating the toughness margin is as follows:

[0065]

[0066] in, This represents the degree of deviation of the distribution network from its stable mode at time t. This represents the resilience margin of the distribution network at time t. This value is not fixed and is time-dependent. The resilience margin corresponding to each time can be calculated. This value increases as the distribution network deviates from the stable mode at a faster rate, enabling an earlier and more sensitive response to accelerated instability and capturing the trend of the distribution network accelerating its deviation from the stable mode.

[0067] in, This represents a health baseline attractor, which contains multiple health baseline state vectors. This represents a health baseline state vector in the health baseline attractor. Represents the pulse firing rate vector. This represents the gain coefficient or sensitivity coefficient, which means the amplification weight of the deviation rate of the power grid state in the distribution network.

[0068] The health baseline attractor can be obtained in the following ways: Obtain historical operating data of the distribution network, and extract scenario data that can represent the healthy operation of the distribution network from the historical operating data. The scenario data includes: normal grid state in which no events have occurred, and normal and minor load fluctuations exist in the normal grid state.

[0069] The aforementioned scenario data is input into the trained PI-SNN model. After input, the voltage values ​​of each node in the PI-SNN model at each time step are acquired in real time, forming the voltage values ​​of each node at each time step. A pulse firing rate vector is then generated, organized by time step. For example, for time t, the voltage values ​​of each node at time t can be sorted to form the pulse firing rate vector at time t. Furthermore, the obtained pulse firing rate vectors at multiple time steps can be viewed as a point cloud in a high-dimensional space. Unsupervised clustering algorithms are used to analyze and cluster the point cloud, obtaining the region with the highest density. The voltage values ​​contained in the region with the highest density are used as the health benchmark state vector in the health benchmark attractor, thus obtaining the health benchmark state vector corresponding to each scenario data. This allows for the quantification of the normal power grid state during stable operation of the distribution network through the health benchmark attractor.

[0070] Among them, the The determination can be made in the following way: During training, observe the degree of deviation of the stable mode and the rate of change of this degree of deviation during system instability, and adjust the... The size of the value ensures that situations where the severity value exceeds the resilience margin can be detected at the earliest possible time before a drastic collapse in electrical quantities (such as voltage), enabling timely warnings without generating too many false alarms due to normal minor fluctuations. Therefore, selecting a value that achieves the optimal balance between "timely warning" and "accurate warning" is crucial. This allows the resilience threshold to decrease rapidly when the power grid state of the distribution network deviates from its normal state at an accelerated pace, triggering timely warnings and enhancing the ability to detect the accelerated instability process of the distribution network.

[0071] As can be seen from the formula for the toughness margin value above, even Even if the change rate is not large, a rapid change can still result in a large overall resilience margin, easily triggering early warnings. This allows for the assessment of distribution network resilience through internal dynamics analysis, significantly improving the accuracy of resilience margin acquisition, enabling effective resilience assessment, and significantly enhancing early warning capabilities. Furthermore, assessing resilience through the deviation of the distribution network's stability mode and its changing trends provides a higher-dimensional and more sensitive intrinsic indicator. This allows for the earlier detection of distribution network instability risks compared to traditional judgments based on external electrical quantities such as voltage and frequency, buying valuable time for preventative control.

[0072] In this embodiment of the invention, by constructing a PI-SNN model, which is a hybrid simulation model that integrates a physical model (Kirchhoff's current law) and a spiking neural network (SNN), it can effectively achieve ultra-real-time, high-fidelity simulation and dynamic resilience assessment of the distribution network, and solve the problem that the simulation model of the digital twin of the distribution network cannot balance computational efficiency and physical reliability.

[0073] In this embodiment of the invention, it can be verified that the voltage state prediction method of this application can achieve ultra-real-time prediction in the following ways: Select any training sample from the above target training samples as a verification sample, obtain the net inflow power value of each node in the high-fidelity physical simulator at each time during the simulation process of the verification sample, and record the time required for the high-fidelity physical simulator to complete the simulation process, which is recorded as the first time.

[0074] After obtaining the pulse stimulation current values ​​of each node at each time, the pulse stimulation current values ​​of each node at the same time are obtained according to the time and grouped together. The groups are then arranged in chronological order to form a sequence, resulting in a pulse stimulation current sequence. This pulse stimulation current sequence is used to input current stimulation into each corresponding node of the PI-SNN model, triggering the target membrane potential dynamic equation of each node, thereby simulating the evolution process of the distribution network and obtaining the final voltage values ​​of each node to form the predicted verification network state.

[0075] Furthermore, during the aforementioned verification process, the start time of inputting the pulse stimulation current sequence into the PI-SNN model and the end time of the PI-SNN model outputting the predicted power grid state will be recorded. The difference between these two time points will be used as the second time when the PI-SNN model completes the prediction. The super-real-time coefficient between the first and second time points will be used for judgment. If the super-real-time coefficient is greater than 1, it indicates that the simulation prediction speed using the PI-SNN model is faster than the actual speed, and super-real-time can be achieved.

[0076] Please see Figure 2The topology data structure of the equivalent circuit of the distribution network used in the experiment is shown, which contains a total of 33 nodes of distributed generation. Three scenarios are set up to verify the feasibility of the grid state prediction method in this invention to achieve ultra-real-time operation. Scenario A: Load surge (nodes 6, 9, 14); Scenario B: Photovoltaic grid disconnection (nodes 24, 22); Scenario C: Line fault (lines 7-8, lines 26-27). The following are the time consumed and other parameters involved in simulating the above three scenarios using a high-fidelity physical simulator and the trained PI-SNN model.

[0077]

[0078] The table above shows the detailed test results. It can be seen that the computation time of the high-fidelity physics simulator fluctuates between 378 and 521 milliseconds depending on the scene complexity, while the computation time of the PI-SNN model proposed in this invention remains stable within the range of 11.5 to 18.1 milliseconds. The calculated super-real-time coefficient is between 28.7 and 32.9 times, with an average speedup of approximately 31 times, fully demonstrating the significant super-real-time capability of this invention.

[0079] In terms of prediction accuracy, the root mean square error of voltage prediction for all test cases was less than 0.005 pu (per unit), with an average of 0.0033 pu. This indicates that the present invention maintains extremely high prediction accuracy and physical reliability while achieving ultra-real-time prediction.

[0080] Please see Figure 3 This is a schematic diagram of the power grid state prediction device in an embodiment of the present invention. The device includes: The acquisition module 301 is used to acquire the topology data structure of the equivalent circuit of the power distribution network; Mapping module 302 is used to map the power distribution network into a Physical Information Spur Neural Network (PI-SNN) framework based on the topology data structure, wherein the network topology of the PI-SNN framework is consistent with the topology data structure. Modification module 303 is used to modify the membrane potential dynamic equation of the leaky integral ignition neuron model used in the neural network model to obtain the target membrane potential dynamic equation with hidden Kirchhoff current law. The target membrane potential dynamic equation is assigned to each node in the PI-SNN framework to obtain the PI-SNN model to be trained. The generation module 304 is used to generate training samples using a high-fidelity physical simulator. The training samples include a first power grid state, a power vector corresponding to an event, and a second power grid state. The power vector in the training samples is converted into a current vector equivalent to the current stimulation of neurons in a neural network model to obtain a target training sample. The first power grid state and the current vector constitute the input data, and the second power grid state after the event affects the power grid state is used as the output data. Training module 305 trains the PI-SNN model to be trained according to the target training samples to obtain a trained PI-SNN model for predicting the power grid state. The prediction module 306 is used to obtain the power grid state to be input into the distribution network, input the power grid state to be input into the PI-SNN model for state prediction, and obtain the target power grid state of the distribution network.

[0081] In this embodiment of the invention, the acquisition module 301 acquires the topology data structure of the equivalent circuit of the distribution network; the mapping module 302 maps the distribution network to a Physical Information Spiking Neural Network (PI-SNN) framework based on the topology data structure, and the network topology structure of the PI-SNN framework is consistent with the topology data structure; the modification module 303 modifies the membrane potential dynamic equation of the leaky integral ignition neuron model used in the neural network model to obtain the target membrane potential dynamic equation containing the hidden Kirchhoff current law, and assigns the target membrane potential dynamic equation to each node in the PI-SNN framework to obtain the PI-SNN model to be trained; the generation module 304... Training samples are generated using a high-fidelity physical simulator. The training samples include a first grid state, a power vector corresponding to an event, and a second grid state. The first grid state and the event constitute the input data, and the second grid state after the event affects the grid state is used as the output data. The training module 305 trains the PI-SNN model to be trained based on the target training samples to obtain a trained PI-SNN model for predicting grid state. The prediction module 306 obtains the grid state to be input for the distribution network, inputs the grid state to be input into the PI-SNN model for state prediction, and obtains the target grid state of the distribution network. In this embodiment of the invention, the topological data structure of the equivalent circuit of the distribution network is mapped to the PI-SNN framework. At the same time, the membrane potential dynamic equation of the leakage integral ignition neuron model used in the neural network model is modified to the target membrane potential dynamic equation containing the hidden Kirchhoff current law, and then given to the PI-SNN framework to obtain the PI-SNN model. This enables the effective construction of a digital twin simulation model of the distribution network, namely the PI-SNN model. Since the PI-SNN model is constrained by the Kirchhoff current law as a physical law, and it runs in an event-driven asynchronous parallel mode, the calculation speed is very fast. Therefore, it can achieve ultra-real-time power grid state prediction while ensuring physical reliability.

[0082] Figure 3 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 3 As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program causes the processor to perform the steps in the above-described method embodiments. The internal memory may also store a computer program, which, when executed by the processor, causes the processor to perform the steps in the above-described method embodiments. Those skilled in the art will understand that... Figure 3The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0083] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the aforementioned method.

[0084] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the contents of the aforementioned method.

[0085] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0086] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0087] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for predicting power grid conditions, characterized in that, The method includes: Obtain the topology data structure of the equivalent circuit of the power distribution network; Based on the topology data structure, the power distribution network is mapped to a Physical Information Spike Neural Network (PI-SNN) framework, and the network topology of the PI-SNN framework is consistent with the topology data structure. The membrane potential dynamic equation of the leaking integral ignition neuron model used in the neural network model is modified to obtain the target membrane potential dynamic equation with hidden Kirchhoff current law. The target membrane potential dynamic equation is then assigned to each node in the PI-SNN framework to obtain the PI-SNN model to be trained. Training samples are generated using a high-fidelity physical simulator. The training samples include a first power grid state, a power vector corresponding to an event, and a second power grid state. The power vector in the training samples is converted into a current vector equivalent to the current stimulation of neurons in a neural network model to obtain the target training sample. The first power grid state and the current vector constitute the input data, and the second power grid state after the event affects the power grid state is used as the output data. The PI-SNN model to be trained is trained according to the target training samples to obtain a trained PI-SNN model for predicting the power grid state. The target grid state of the distribution network is obtained, and the target grid state is input into the PI-SNN model for state prediction to obtain the target grid state of the distribution network.

2. The method according to claim 1, characterized in that, The dynamic equation for the target membrane potential is as follows: Represents the nodes in the PI-SNN model The voltage at time t, This represents the voltage of node j at time t in the PI-SNN model. This represents the current vector at node i at time t. Let represent the admittance on the branch formed by nodes i and j. Let represent the set of all nodes adjacent to node i. Mathematically equivalent to applying Kirchhoff's current law at node i; Indicates the reference voltage of the node. The first parameter, representing the capacitance of the neuron membrane, is obtained by training the i-th node in the PI-SNN model. This represents the second parameter, which is equivalent to the membrane conductance of the neuron membrane, obtained by training the i-th node in the PI-SNN model.

3. The method according to claim 1, characterized in that, The PI-SNN model to be trained is trained according to the target training samples to obtain a trained PI-SNN model for predicting the power grid state. The loss function is constructed by minimizing the optimal algorithm; The first power grid state and current vector in the target training sample are input into the PI-SNN model to be trained to obtain the predicted power grid state. Substituting the predicted power grid state and the second power grid state into the loss function, the loss value is obtained; If the PI-SNN model to be trained converges based on the loss value or the number of iterations, then the last PI-SNN model to be trained will be used as the PI-SNN model after training for predicting the power grid state based on the occurrence of events. If, based on the loss value or the number of iterations, it is determined that the PI-SNN model to be trained has not converged, then the parameters in the parameter set of each node in the PI-SNN model to be trained are adjusted using the loss value through backpropagation and gradient descent to obtain an updated PI-SNN model to be trained, and the process of inputting the first power grid state and the current vector from the target training sample into the PI-SNN model to be trained to obtain the predicted power grid state is returned.

4. The method according to claim 3, characterized in that, The loss function is as follows: in, Represents the loss function. This represents the set of parameters to be trained for each node. and This represents the preset hyperparameters. This represents the data fitting loss value. This represents the physical constraint loss value. Represents a function, This represents the predicted power grid state obtained by training using the k-th training sample. Indicates the second power grid state. Let L represent the square of the L2 norm, and N represent the total number of training samples.

5. The method according to claim 1, characterized in that, The framework for mapping the distribution network to a Physical Information Spike Neural Network (PI-SNN) based on the topology data structure includes: The bus nodes in the topology data structure of the power distribution network are mapped to spiking neurons in the PI-SNN framework, and the branches connecting two nodes in the topology data structure of the power distribution network are mapped to the synapses of the spiking neurons corresponding to the two nodes in the PI-SNN framework.

6. The method according to claim 1, characterized in that, The method further includes: The high-fidelity physical simulator is controlled to operate at a preset low frequency to generate a third and fourth power grid state for verification. The third power grid state is input into the PI-SNN model to obtain the output verification power grid state; Determine the relative deviation between the verified power grid state and the fourth power grid state; When the relative deviation value is greater than or equal to the preset deviation threshold, the PI-SNN model is fine-tuned and optimized to obtain the optimized PI-SNN model.

7. The method according to claim 1, characterized in that, The method further includes: During the prediction process, the PI-SNN model is monitored to obtain the voltage values ​​of each node in the PI-SNN model at the current time. From the voltage values ​​of each node in the PI-SNN model at the current moment, select the voltage values ​​that are greater than the reference voltage corresponding to the corresponding node to form the pulse firing rate vector at the current moment; The resilience margin and stability mode deviation of the distribution network are calculated based on the pulse firing rate vector at the current moment and the preset health benchmark attractor. When the deviation of the stability mode exceeds the resilience margin, an early warning is triggered to indicate that the distribution network is rapidly becoming unstable.

8. A power grid condition prediction device, characterized in that, The device includes: The acquisition module is used to acquire the topology data structure of the equivalent circuit of the power distribution network; A mapping module is used to map the power distribution network into a Physical Information Spur Neural Network (PI-SNN) framework based on the topology data structure, wherein the network topology of the PI-SNN framework is consistent with the topology data structure. The modification module is used to modify the membrane potential dynamic equation of the leaky integral ignition neuron model used in the neural network model to obtain the target membrane potential dynamic equation with hidden Kirchhoff current law. The target membrane potential dynamic equation is then assigned to each node in the PI-SNN framework to obtain the PI-SNN model to be trained. The generation module is used to generate training samples using a high-fidelity physical simulator. The training samples include a first power grid state, a power vector corresponding to an event, and a second power grid state. The power vector in the training samples is converted into a current vector equivalent to the current stimulation of neurons in a neural network model to obtain a target training sample. The first power grid state and the current vector constitute the input data, and the second power grid state after the event affects the power grid state is used as the output data. The training module trains the PI-SNN model to be trained based on the target training samples to obtain a trained PI-SNN model for predicting the power grid state. The prediction module is used to obtain the power grid state to be input into the distribution network, input the power grid state to be input into the PI-SNN model for state prediction, and obtain the target power grid state of the distribution network.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 7.

10. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 7.