Power grid post-disaster first-aid repair method and device based on small sample graph learning, and medium
By using small sample graph learning technology, combined with GNN and meta-learning to optimize the post-disaster repair strategy of the power grid, the technical bottleneck of rapid post-disaster recovery of the power grid is solved, efficient repair and stability improvement are achieved, and it can adapt to diverse disaster scenarios.
Patent Information
- Application Number
- CN202510882855.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-28
- Publication Date
- 2025-09-26
AI Technical Summary
Existing post-disaster power grid repair technologies are subject to uncertainty, resource waste, and lack of adaptability when faced with complex disaster scenarios. They are unable to quickly generate efficient repair strategies and cannot meet the needs of rapid power grid recovery.
A method based on small sample graph learning is adopted, which integrates graph neural network (GNN), dynamic adjustment of intelligent agents and meta-learning technology to build a power grid topology graph model, extract topological features and node features, generate node embedding features, optimize repair strategies and optimize meta-parameters through multi-task meta-learning to achieve rapid adaptation to new disaster scenarios.
It significantly improves the grid repair efficiency and load recovery rate, reduces the average recovery time, and increases the success rate of power flow calculations. It is adaptable to grid systems of different sizes and types and has efficient engineering application value.
Smart Images

Figure CN120707115A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of post-disaster repair of power grids, and in particular relates to a post-disaster repair method, device and medium for power grids based on small sample graph learning. Background Art
[0002] As critical infrastructure, the stability and reliability of power systems are crucial. In recent years, the frequent occurrence of extreme weather events and natural disasters has posed unprecedented challenges to power grid operations. Traditional power grid repair methods primarily rely on mathematical optimization and deep learning technologies, but these methods have numerous limitations when addressing complex disaster scenarios. Mathematical optimization methods exhibit high uncertainty when dealing with extreme disaster scenarios, making it difficult to effectively address complex and changing disaster situations. While deep learning methods excel in big data scenarios, their generalization capabilities are limited in small sample sizes or novel scenarios, making them difficult to adapt to diverse new disaster scenarios.
[0003] Furthermore, multi-agent collaborative decision-making methods face real-time bottlenecks, making them difficult to meet the urgent needs of post-disaster power grid repair. Furthermore, existing technologies lack adaptability to diverse and novel disaster scenarios, making it difficult to quickly generate efficient repair strategies. Consequently, they often fail to fully realize their effectiveness in practical applications, making it difficult to meet the urgent need for rapid post-disaster power grid recovery.
[0004] In this context, the resilience and rapid repair capabilities of the power system have become particularly important for ensuring the stable operation of the social economy and the normal life of residents. Post-disaster repair work of the power grid must not only quickly restore power supply, but also comprehensively consider the complexity of the power grid topology, the differences in the importance of different nodes, and the reasonable allocation of limited repair resources. However, existing post-disaster repair strategies often lack in-depth mining and dynamic utilization of power grid topology characteristics, and are unable to adjust the repair sequence in real time according to changes in disaster scenarios, making it difficult to fully utilize the efficiency of limited repair resources. In addition, when faced with new disaster scenarios, existing technologies often require a lot of time and resources to be retrained and adjusted, making it difficult to quickly adapt to new scenarios, and thus unable to provide a comprehensive and effective solution for improving the resilience of smart grids. Summary of the Invention
[0005] In view of the above deficiencies in the existing technology, the purpose of the present invention is to provide a post-disaster emergency repair method, device and medium for power grid based on small sample graph learning. By integrating GNN, dynamic adjustment of intelligent agents and meta-learning technology, it can quickly generate efficient repair strategies under small sample conditions, has strong ability to adapt to new disaster scenarios, and significantly improves the power grid repair efficiency, load recovery rate and power flow calculation success rate.
[0006] To achieve the above objectives, the present invention provides a power grid post-disaster repair method based on small sample graph learning, comprising the following steps: Using grid topology data and node attribute data, a graph model of the grid topology is constructed; The graph neural network (GNN) is used to extract the grid topology and node features in the graph model. Node embedding features are generated based on the grid topology and node features. The node importance score is calculated based on the node embedding features as well as the node's power generation capacity, load demand, and connectivity. After a disaster occurs, the node repair priority is initialized based on the node importance score, and the nodes are repaired based on the node repair priority. Based on the load recovery amount, the success rate of power flow calculation and the repair history dynamics, an intelligent agent dynamic adjustment mechanism is constructed to optimize the repair order; Based on node load, power generation, and node embedding features generated by GNN, a node repair time model is established. Meta-parameters are set in new disaster scenarios and optimized through multi-task meta-learning to minimize the overall loss. Based on the node repair time model and the optimized repair sequence, an optimized repair strategy and repair time are generated.
[0007] As a preferred solution of the present invention, the graphical model of the power grid topology is: In the area, V represents the node set, including load nodes, generation nodes and substations, and E represents the edge set.
[0008] As a preferred solution of the present invention, the process of generating node embedding features is to use GNN. The feature update process of each layer performs weighted aggregation on the feature information of the node neighbors and combines the characteristics of the node itself to generate a new feature representation: ; Where k represents the layer index of GNN; is the embedded feature of node i in the k+1 layer; represents the neighbor set of node i, j is one of the neighbor nodes; represents the weight matrix of the kth layer; represents the embedded features of node j at layer k; represents the bias vector of the kth layer; After K layers of iterative updates, the final node embedding features are: ; Where, is the final embedding feature of node i; Represents the embedded features of node i at the kth layer, k = 1, 2, ..., K, K is the number of layers of GNN; represents the embedded features of node i at the Kth layer.
[0009] As a preferred solution of the present invention, node i is recorded as , whose importance score is defined as: ; Where, Score the importance of node i; represents the embedding feature of node i, which is equivalent to ; represents the connectivity of node i; represents the power generation capacity of node i; represents the reference value of node i; represents the load demand of node i; 、 、 、 、 They are 、 、 、 、 The weight parameter of .
[0010] As a preferred solution of the present invention, the construction method of the agent dynamic adjustment mechanism is as follows: Check whether the node to be repaired is connected to the main network, expressed as: ; Where, represents node i, represents node j; E represents the edge set of the graph model; Is an indicator function that returns 1 if node i is connected to the main network, otherwise it returns 0; Represents the set of nodes to be repaired; is an existential quantifier; The priority of the node to be repaired is adjusted based on the load recovery amount, the success rate of power flow calculation, and the repair history. The load recovery amount is expressed as: ; Where, represents the load recovery amount of node i; represents the load restored after node i is repaired; Indicates the total load of the power grid; The success rate of power flow calculation is expressed as: ; Where, represents the success rate of power flow calculation after node i is repaired; The node will retry when the repair fails. The repair history dynamically records the number of repair attempts and failures of the node, expressed as: ; Where, represents the repair history dynamics of node i; Indicates the current retry count of node i; Indicates the maximum number of retries allowed; The priority of the node to be repaired is comprehensively expressed as: ; Where, Indicates the dynamically adjusted repair priority of node i; 、 、 They are 、 、 The weight parameter of .
[0011] As a preferred solution of the present invention, after each repair, the priority of the node to be repaired is calculated based on the load recovery amount of the current node, the success rate of the power flow calculation and the repair history dynamics, and the priority list is dynamically updated.
[0012] As a preferred solution of the present invention, the node repair time model is expressed as: ; Where, represents the estimated repair time of node i; is the node load of node i, which is equivalent to ; is the power generation of node i, which is equivalent to ; 、 、 Are meta parameters, representing 、 、 weight in the repair time estimate; Optimize meta-parameters through multi-task meta-learning to minimize the comprehensive loss: ; Where, represents the comprehensive loss; n is the index of the task, N is the total number of tasks, and tasks refer to different disaster scenarios or different power grid repair scenarios; is the load recovery amount of task n; Calculate the success rate of the power flow for task n; The total number of turns consumed to repair task n.
[0013] As a preferred solution of the present invention, the perturbation method is used to calculate the gradient of the loss function to the parameter and set the learning rate Update task parameters, expressed as: ; ; Where, are meta parameters, including 、 、 ; represents a small disturbance; Represents the local meta-parameters in the nth task, that is, the nth task corresponding to 、 、 ; Combining the learning results of all tasks, the meta-learning rate Update meta parameters: .
[0014] The power grid post-disaster repair device based on small sample graph learning includes: one or more processors; a memory for storing one or more computer programs; When one or more programs are executed by one or more processors, the one or more processors execute the above method.
[0015] A computer-readable storage medium stores executable instructions, which, when executed by a processor, enable the processor to perform the above method.
[0016] The beneficial effects of the present invention are: The present invention successfully overcomes the limitations of traditional power grid post-disaster repair methods in complex disaster scenarios by integrating GNN, dynamic adjustment of intelligent agents, and meta-learning technology. With its powerful feature extraction capability, GNN can accurately extract key features from the power grid topology and provide an information basis for repair decisions. The dynamic adjustment mechanism of the intelligent agent flexibly optimizes the repair sequence based on real-time feedback, ensuring that key nodes are repaired first and improving repair efficiency. Meta-learning technology gives the model excellent rapid adaptability by simulating a variety of disaster scenarios, enabling it to quickly adjust strategies in new scenarios and achieve efficient repairs. Experimental verification shows that in the IEEE 39-node system, the average load recovery rate of the present invention reached 85%, and the success rate of power flow calculation reached 90%. Compared with traditional methods, the average recovery time was significantly reduced by 22%, and the standard deviation of recovery time between tasks was only 5 steps. These results fully demonstrate the excellent performance of the present invention in repair efficiency and stability.
[0017] The present invention also shows broad application prospects and significant engineering application value. Its excellent generalization ability enables the present invention to adapt to power grid systems of different sizes and types. It can play a key role in post-disaster recovery of large-scale power grids, fault prediction, and new energy integration optimization. It provides an efficient and intelligent solution for improving the resilience of the power grid, helps reduce the impact of disasters on the power grid, and speeds up the recovery process. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 It is a flow chart of the verification process of the present invention; Figure 3 It is a schematic diagram of the final load in ten disaster scenarios during the verification process of the present invention; Figure 4 This is a schematic diagram of the success probability of the final power flow calculation in ten disaster scenarios during the verification process of the present invention; Figure 5 It is a comparison diagram of adding meta parameters and not adding meta parameters in the verification process of the present invention. DETAILED DESCRIPTION
[0019] The embodiments of the present invention are further described below with reference to the accompanying drawings: like Figure 1 As shown in FIG, the power grid post-disaster repair method based on small sample graph learning includes the following steps: Using grid topology data and node attribute data, a graph model of the grid topology is constructed; The graph neural network (GNN) is used to extract the grid topology and node features in the graph model. Node embedding features are generated based on the grid topology and node features. The node importance score is calculated based on the node embedding features as well as the node's power generation capacity, load demand, and connectivity. After a disaster occurs, the node repair priority is initialized based on the node importance score, and the nodes are repaired based on the node repair priority (the nodes with the highest scores are repaired first). Based on the load recovery amount, the success rate of power flow calculation and the historical dynamics of the repair, an intelligent agent dynamic adjustment mechanism is established to optimize the repair order; Based on node load, power generation, and node embedding features generated by GNN, a node repair time model is established. Meta-parameters are set in new disaster scenarios and optimized through multi-task meta-learning to minimize the overall loss. Based on the node repair time model and the optimized repair sequence, an optimized repair strategy and repair time are generated.
[0020] The graphical model of the power grid topology is: In the area, V represents the node set, including load nodes, generation nodes and substations, and E represents the edge set.
[0021] The process of generating node embedding features is to use GNN. The feature update process of each layer performs weighted aggregation of the feature information of the node neighbors and combines the characteristics of the node itself to generate a new feature representation: ; Where k represents the layer index of GNN; is the embedded feature of node i in the k+1 layer; represents the neighbor set of node i, j is one of the neighbor nodes; represents the weight matrix of the kth layer; represents the embedded features of node j at layer k; represents the bias vector of the kth layer; through layer-by-layer aggregation, local features and global dependencies are captured. Through this formula, the feature update process of each layer performs weighted aggregation of feature information of node neighbors and combines it with the characteristics of the node itself to generate a new feature representation.
[0022] After K layers of iterative updates, the final node embedding features are: ; Where, is the final embedding feature of node i; Represents the embedded features of node i at the kth layer, k = 1, 2, ..., K, K is the number of layers of GNN; represents the embedded features of node i at the Kth layer.
[0023] Let node i be , whose importance score is defined as: ; Where, Score the importance of node i; represents the embedding feature of node i, which is equivalent to ; represents the connectivity of node i; represents the power generation capacity of node i; Represents the reference value of node i (set according to the node situation and requirements); represents the load demand of node i; 、 、 、 、 They are 、 、 、 、 The weight parameters are set according to the requirements, the same below.
[0024] The dynamic adjustment mechanism of the intelligent agent is constructed as follows: Check whether the node to be repaired is connected to the main network, expressed as: ; Where, represents node i, represents node j; E represents the edge set of the graph model; Is an indicator function that returns 1 if node i is connected to the main network, otherwise it returns 0; Represents the set of nodes to be repaired; is an existential quantifier; The priority of nodes to be repaired is adjusted based on the load recovery amount, the success rate of power flow calculation, and the historical dynamics of repair. Among them, the load recovery amount is the core goal of power grid repair and directly reflects the contribution of node repair to the system recovery capability. The load recovery amount is expressed as: ; Where, represents the load recovery amount of node i; represents the load restored after node i is repaired; Represents the total load of the power grid; prioritizing the repair of nodes with large load recovery can significantly improve the power supply capacity of the system in a short period of time.
[0025] The success rate of power flow calculation is an important indicator for evaluating network stability and repair effectiveness. Whether a node can pass the power flow calculation after repair directly determines the effectiveness of the repair operation. The success rate of power flow calculation is expressed as: ; Where, represents the success rate of power flow calculation after node i is repaired; For nodes with a high number of repair failures, the priority should be appropriately reduced to avoid excessive resource consumption on nodes that are difficult to repair. When a node fails to repair, it will retry. The repair history dynamically records the number of repair attempts and failures of the node, expressed as: ; Where, represents the repair history dynamics of node i; Indicates the current retry count of node i; Indicates the maximum number of retries allowed; The priority of the node to be repaired is comprehensively expressed as: ; Where, Indicates the dynamically adjusted repair priority of node i; 、 、 They are 、 、 The weight parameter of .
[0026] After each repair, the priority of the node to be repaired is calculated based on the load recovery amount of the current node, the success rate of the power flow calculation and the repair history dynamics, and the priority list is dynamically updated.
[0027] The node repair time model is expressed as: ; Where, represents the estimated repair time of node i; is the node load of node i, which is equivalent to ; is the power generation of node i, which is equivalent to ; 、 、 Are meta parameters, representing 、 、 weight in the repair time estimate; Optimize meta-parameters through multi-task meta-learning to minimize the comprehensive loss: ; Where, represents the comprehensive loss; n is the index of the task, N is the total number of tasks, and tasks refer to different disaster scenarios or different power grid repair scenarios; is the load recovery amount of task n; Calculate the success rate of the power flow for task n; The total number of turns consumed to repair task n.
[0028] Use the perturbation method to calculate the gradient of the loss function with respect to the parameters and set the learning rate Update task parameters, expressed as: ; ; Where, are meta parameters, including 、 、 ; represents a small disturbance; Represents the local meta-parameters in the nth task, that is, the nth task corresponding to 、 、 ; Combining the learning results of all tasks, the meta-learning rate Update meta parameters: .
[0029] The verification process is: Based on the IEEE 39-node power system, the method of this embodiment is used for verification. Figure 2 The overall flow chart of the verification process is presented. Through three stages, namely offline feature extraction and training, online dynamic repair optimization, and meta-learning parameter optimization, the tasks of grid topology feature extraction, dynamic adjustment of repair strategies, and rapid adaptation to new scenarios are collaboratively completed.
[0030] Figure 3 This is the final load image of the method proposed in this embodiment in ten disaster scenarios. The horizontal axis represents the ten mission disaster scenarios, and the vertical axis represents the final load after each system repair is completed. The recovery effect of the proposed method can basically be maintained at more than 85% of the initial system total load.
[0031] Figure 4 The final success probability of power flow calculation in ten disaster scenarios of the method proposed in this embodiment is shown in the figure. The horizontal axis represents the ten disaster scenarios, and the vertical axis represents the success probability of power flow calculation after each system repair is completed. The average success probability of power flow calculation of the proposed method is above 85%. Figure 3 and Figure 4 The advantages of the proposed method in terms of recovery efficiency and stability are demonstrated.
[0032] Table 1 shows the recovery strategies output by the method proposed in this embodiment in ten disaster scenarios. The first column shows the ten disaster scenarios, the second column shows the number of damaged nodes in the corresponding disaster scenarios, that is, the scale of the failure, the third column shows the final repair strategy for each disaster scenario, and the fourth column shows the repair effect.
[0033] Table 1 Recovery strategies output in ten disaster scenarios
[0034] Figure 5 This figure compares the method proposed in this example with and without meta-parameters. The horizontal axis represents the number of training rounds, and the vertical axis represents the system load. After only five rounds of training, the system can adapt to new tasks, achieving a 78% recovery rate after 50 steps and a 90% recovery rate after 150 steps. In contrast, the baseline method trained from scratch requires 50 rounds of adaptation and achieves a 50-step recovery rate of only 62%. This demonstrates that the addition of the meta-learning model enables the proposed method to adapt well to new disaster scenarios.
[0035] Example 2: A power grid post-disaster repair device based on small sample graph learning, comprising: one or more processors; a memory for storing one or more computer programs; When one or more programs are executed by one or more processors, the one or more processors execute the method in Example 1.
[0036] Example 3: A computer-readable storage medium stores executable instructions, which, when executed by a processor, cause the processor to execute the method in Example 1.
Claims
1. A power grid post-disaster repair method based on small sample graph learning, characterized by The following steps are involved: Using grid topology data and node attribute data, a graph model of the grid topology is constructed; The graph neural network (GNN) is used to extract the grid topology and node features in the graph model. Node embedding features are generated based on the grid topology and node features. The node importance score is calculated based on the node embedding features as well as the node's power generation capacity, load demand, and connectivity. After a disaster occurs, the node repair priority is initialized based on the node importance score, and the nodes are repaired based on the node repair priority. Based on the load recovery amount, the success rate of power flow calculation and the repair history dynamics, an intelligent agent dynamic adjustment mechanism is constructed to optimize the repair order; Based on node load, power generation, and node embedding features generated by GNN, a node repair time model is established. Meta-parameters are set in new disaster scenarios and optimized through multi-task meta-learning to minimize the overall loss. Based on the node repair time model and the optimized repair sequence, an optimized repair strategy and repair time are generated.
2. The power grid post-disaster repair method based on small sample graph learning according to claim 1 is characterized by: The graphical model of the power grid topology is: In the area, V represents the node set, including load nodes, generation nodes and substations, and E represents the edge set.
3. The power grid post-disaster repair method based on small sample graph learning according to claim 1 is characterized by: The process of generating node embedding features is to use GNN. The feature update process of each layer performs weighted aggregation of the feature information of the node neighbors and combines the characteristics of the node itself to generate a new feature representation: ; Where k represents the layer index of GNN; is the embedded feature of node i in the k+1 layer; represents the neighbor set of node i, j is one of the neighbor nodes; represents the weight matrix of the kth layer; represents the embedded features of node j at layer k; represents the bias vector of the kth layer; After K layers of iterative updates, the final node embedding features are: ; Where, is the final embedding feature of node i; Represents the embedded features of node i at the kth layer, k = 1, 2, ..., K, K is the number of layers of GNN; represents the embedded features of node i at the Kth layer.
4. The power grid post-disaster repair method based on small sample graph learning according to claim 3 is characterized by: Let node i be , whose importance score is defined as: ; Where, Score the importance of node i; represents the embedding feature of node i, which is equivalent to ; represents the connectivity of node i; represents the power generation capacity of node i; represents the reference value of node i; represents the load demand of node i; 、 、 、 、 They are 、 、 、 、 The weight parameter of .
5. The power grid post-disaster repair method based on small sample graph learning according to claim 1 is characterized by: The dynamic adjustment mechanism of the intelligent agent is constructed as follows: Check whether the node to be repaired is connected to the main network, expressed as: ; Where, represents node i, represents node j; E represents the edge set of the graph model; Is an indicator function that returns 1 if node i is connected to the main network, otherwise it returns 0; Represents the set of nodes to be repaired; is an existential quantifier; The priority of the node to be repaired is adjusted based on the load recovery amount, the success rate of power flow calculation, and the repair history. The load recovery amount is expressed as: ; Where, represents the load recovery amount of node i; represents the load restored after node i is repaired; Indicates the total load of the power grid; The success rate of power flow calculation is expressed as: ; Where, represents the success rate of power flow calculation after node i is repaired; The node will retry when the repair fails. The repair history dynamically records the number of repair attempts and failures of the node, expressed as: ; Where, represents the repair history dynamics of node i; Indicates the current retry count of node i; Indicates the maximum number of retries allowed; The priority of the node to be repaired is comprehensively expressed as: ; Where, Indicates the dynamically adjusted repair priority of node i; 、 、 They are 、 、 The weight parameter of .
6. The power grid post-disaster repair method based on small sample graph learning according to claim 5 is characterized by: After each repair, the priority of the node to be repaired is calculated based on the load recovery amount of the current node, the success rate of the power flow calculation and the repair history dynamics, and the priority list is dynamically updated.
7. The power grid post-disaster repair method based on small sample graph learning according to claim 4 is characterized by: The node repair time model is expressed as: ; Where, represents the estimated repair time of node i; is the node load of node i, which is equivalent to ; is the power generation of node i, which is equivalent to ; 、 、 Are meta parameters, representing 、 、 weight in the repair time estimate; Optimize meta-parameters through multi-task meta-learning to minimize the comprehensive loss: ; Where, represents the comprehensive loss; n is the index of the task, N is the total number of tasks, and tasks refer to different disaster scenarios or different power grid repair scenarios; is the load recovery amount of task n; Calculate the success rate of the power flow for task n; The total number of turns consumed to repair task n.
8. The power grid post-disaster repair method based on small sample graph learning according to claim 7 is characterized by: Use the perturbation method to calculate the gradient of the loss function with respect to the parameters and set the learning rate Update task parameters, expressed as: ; ; Where, are meta parameters, including 、 、 ; represents a small disturbance; Represents the local meta-parameters in the nth task, that is, the nth task corresponding to 、 、 ; Combining the learning results of all tasks, the meta-learning rate Update meta parameters: 。 9. A power grid post-disaster repair device based on small sample graph learning, characterized in that: include: one or more processors; a memory for storing one or more computer programs; When one or more programs are executed by one or more processors, the one or more processors are caused to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having executable instructions stored thereon, characterized in that: When the instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 8.