Power dispatching and optimization method based on multi-granularity tree graph neural network

By constructing a power dispatch model using a multi-granularity dendritic graph neural network, the problem of insufficient interpretability of graph neural networks in power systems is solved, enabling efficient and transparent power dispatch decisions and improving the safety and flexibility of power grid operation.

CN119518709BActive Publication Date: 2025-10-24ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411529530.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-10-24
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

Existing power dispatching methods based on graph neural networks suffer from insufficient interpretability in power systems, making it difficult to model at multiple granularities and failing to meet the high requirements of power systems for security, transparency, and flexibility.

Method used

A multi-granularity dendritic neural network is adopted. By constructing a power grid state sample dataset, graph representation and feature extraction, hierarchical multi-granularity power grid information coarsening, learnable graph perturbation and adaptive path selection modules, a multi-level tree model is built to improve the prediction accuracy and decision interpretability of the model.

Benefits of technology

It achieves high efficiency and interpretability in power dispatching decisions, enabling analysis and decision-making at different granular levels, meeting the power system's requirements for transparency and compliance, and improving the accuracy and robustness of dispatching schemes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119518709B_ABST
    Figure CN119518709B_ABST
Patent Text Reader

Abstract

The application discloses a power system scheduling and optimization method and system based on a multi-granularity tree-shaped graph neural network, and the method comprises the following steps: step 1, constructing a power grid state sample data set; step 2, performing graph representation and feature extraction on power grid data; step 3, constructing a hierarchical multi-granularity power grid information coarsening model; step 4, constructing a power grid information graph disturbance model; step 5, constructing a tree-shaped neural network adaptive path selection model; and step 6, performing power system explanation and scheduling decision according to the multi-granularity tree-shaped neural network model. The application considers the graph network structure characteristics of the power system, models the power grid as graph data, and introduces a multi-granularity graph coarsening, a learnable disturbance and an adaptive path selection module on the basis of an existing graph neural network model to construct a multi-level tree-shaped model, so that the power system states and representations of various granular levels such as a global level and a local level of different range scales are analyzed, and the prediction accuracy of the model and the explainability of the decision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of power dispatching and neural network explainability, and relates to a power dispatching and optimization method and system. BACKGROUND

[0002] The dispatching of a power system is a complex and critical task that requires coordination and optimization of various factors while ensuring the safety and reliability of power supply. These factors include the state of power generation equipment, power demand forecasts for different load centers, and the operating conditions of transmission lines. As the scale of the power system expands and the proportion of renewable energy increases, the imbalance between power supply and demand intensifies, making the dispatching of the power system more difficult. The complexity of the power grid stems from its multi-node, multi-variable, and high-dynamic characteristics, and its operating state is full of uncertainties when power load changes and power generation equipment is under maintenance. The complexity of these problems requires more reliable data analysis and dispatching techniques to optimize the operation and management of the power grid.

[0003] In a power system, the power grid can be naturally modeled as a graph, where nodes represent key devices such as power stations, substations, and load centers, and edges represent transmission lines between these nodes. As a solution to the power dispatching problem, graph neural network (GNN)-based methods have been shown to have significant potential for analyzing the complex topology of the power grid and predicting the state of the power system, effectively capturing the complex connectivity and interaction in the graph structure.

[0004] However, despite the success of GNN in the optimization problem of power dispatching, its complex model structure is often considered a "black box", making it difficult to provide intuitive explanations for dispatching decisions. This lack of explainability is a major bottleneck in the power system, which requires strict compliance and transparency. In addition, the complex relationships in the power system often need to be modeled at multiple granularities, such as the operating state of a single power station, the balance of power generation and load within different regions, and the power flow path in the entire grid. When making dispatching and decision-making, power dispatchers not only need to focus on the global structure and state of the power grid system, such as the power dispatching path and load distribution characteristics across regions, but also need to consider the local structure and state at different granularities. Therefore, there is an urgent need to develop a new solution that not only has the powerful ability of GNN in modeling complex network structures, but also has high explainability at multiple granularities, through different range analysis and decision-making path visualization techniques for the power system, to clearly and intuitively present the dispatching decision-making process, thereby meeting the high requirements of safety, transparency, and flexibility in modern power systems. SUMMARY

[0005] To solve the above problems, the application provides a power scheduling decision method and system based on a multi-granularity tree graph neural network.

[0006] The application considers the graph network structure characteristics of the power system, models the power grid as graph data, and on the basis of the existing graph neural network model, introduces a multi-granularity graph coarsening, a learnable disturbance, and an adaptive path selection module to construct a multi-level tree model, thereby analyzing the power system state and representation of each granularity level such as the global and local of different range scales, and improving the prediction accuracy and interpretability of the decision of the model. The technical scheme of the application is:

[0007] The power scheduling decision method based on the multi-granularity tree graph neural network comprises the following steps:

[0008] S1. Constructing a power grid state sample data set;

[0009] The power system simulation tool Pandapower of Python is used to construct the power grid state sample data set; the data set is based on the regional power grid data after desensitization processing, is generated through a high-precision power scheduling simulation algorithm, and contains more than 5000 simulation samples covering different working conditions; first, an electric power simulation model containing electrical characteristic parameters such as voltage level, load type, and generator capacity of each node in the power grid, power grid topology structure such as substation connection relationship and transmission line parameter, and node output information under different load states is constructed; then, based on the typical daily load data, the output of different generators is randomly adjusted, and the power demand of the load node is adjusted at the same time to ensure the balance between power generation and power consumption under different situations; finally, the simulation data is filtered through power flow calculation, and the samples that meet the power system thermal stability constraints and converge are included in the data set; the above steps are repeated several times, and the generated sample data set can be used to train and verify the graph neural network model of power grid scheduling optimization. The data set not only accurately simulates the dynamic behavior of the power system under different load conditions, but also guarantees the wide applicability and representativeness of the data through strict power flow calculation and topology structure analysis, thereby providing a basis for the training and verification of the subsequent model.

[0010] S2. Graph representation and feature extraction of power grid data;

[0011] Each component in the power grid such as power station, substation, and load center is modeled as a node of a graph, and the transmission line between the nodes is regarded as an edge of the graph, so that the power grid data is converted into a graph form; the state of such a graph can be represented as s=(A,H), wherein A is an adjacency matrix representing the connection relationship of the nodes, and contains the connection information of N nodes, and H is a node feature matrix, each row h i represents the characteristics (such as power generation, voltage, and other power characteristics) of node i.

[0012] In the feature extraction process, we use the Graph Attention Network (GAT) to model the relationship between nodes. First, we calculate the correlation score c ij between nodes i and j, which reflects the strength of their association:

[0013]

[0014] where W1 and W2 are weight matrices for transforming features, denotes the connection operation of features, and MLP is a multi-layer perceptron used to generate the correlation score between nodes.

[0015] Next, by normalizing the correlation score, we obtain the attention weight β ij of node j to node i:

[0016]

[0017] where β ij represents the relative importance of node j to node i in the information transmission process.

[0018] The new feature representation p i of node i is obtained by aggregating the information of its neighbor nodes:

[0019]

[0020] where W g is the weight matrix for feature transformation, σ is the activation function, and p i is the updated feature representation of node i.

[0021] This method allows each node to dynamically adjust the aggregation of information based on the importance of its neighbors, enabling better capture of complex relationships and interdependencies between grid nodes when constructing the representation of the power grid. The final node feature p i combines the information of neighbor nodes, providing an in-depth feature representation for power grid characteristic analysis under various states in power dispatch.

[0022] S3. Construct a hierarchical multi-granularity power grid information coarsening model;

[0023] The application adopts a hierarchical graph coarsening module, constructs each level of a tree-shaped neural network model, models the complex relationship in the power system at multiple granularities step by step, gradually simplifies the power grid graph structure, obtains multi-granularity structure information, such as the operation state of a single power station, the balance of power generation and load in different range areas, and the power flow path in the whole network range, and better responds to the information needs of different levels in power dispatching.

[0024] The module is based on the classic graph pooling strategy, extracts node embedding representation of each layer through a graph neural network (GNN), and performs graph coarsening processing on the basis. Specifically, we first extract node embedding Z (l) in each layer, and the update rule is as follows:

[0025]

[0026] wherein Z (0) is the input feature matrix, is the adjacency matrix containing self-loops, is the degree matrix of Z , W (l) is the weight matrix of the lth layer, and sigma (·) is an activation function.

[0027] Next, we generate a clustering assignment matrix S (l) through a multi-layer perceptron (MLP) to merge nodes into coarse-grained clusters in each layer:

[0028] S (l) = softmax (MLP (l) (Z (l) ; Θ MLP )) (5)

[0029] wherein Θ MLP is a trainable parameter, represents the probability that node v i belongs to cluster j.

[0030] Then, we generate the coarsened adjacency matrix A (l+1) and embedding matrix X (l+1) using S (l) :

[0031]

[0032] wherein N is the number of nodes in the current layer, K (l) is the number of clusters in the lth layer. In order to maintain the connectivity of the graph structure in the coarsening process, we introduce an edge prediction loss to constrain the coarsening process:

[0033]

[0034] where A ij is the element in the original adjacency matrix, is the coarsened adjacency matrix. With this hierarchical coarsening strategy, we are able to extract information from the detailed level of the power grid to the higher abstract level gradually to adapt to different scheduling requirements.

[0035] S4. Constructing the power grid information graph perturbation model;

[0036] On the basis of multi-granularity graph coarsening, the application introduces a learnable graph perturbation module, constructs corresponding nodes in each level of the tree-shaped neural network model, aims to improve the adaptability and robustness of the model to different operating states of the power grid by introducing a slight perturbation, and provides leaf nodes for each layer of the tree-shaped neural network model.

[0037] The module generates a set of learnable perturbation matrices for each parent node, so as to perturb the coarsened allocation matrix and generate a plurality of possible subgraph states:

[0038]

[0039] wherein, is the original clustering allocation matrix.

[0040] Based on the perturbed allocation matrix, the perturbed node embedding

[0041]

[0042] wherein, is the embedding representation of the kth parent node in the lth layer. In order to ensure that the perturbed embedding both maintains the original information and has diversity, two kinds of regularization terms are designed:

[0043] Similarity regularization:

[0044]

[0045] to ensure that the perturbed embedding is similar to the original embedding, and the structure information of the graph is reserved.

[0046] Diversity regularization:

[0047]

[0048] to promote the difference between different perturbations and ensure that the model can cope with different power grid scenarios. Through the two regularization terms, the total loss of perturbation is defined:

[0049]

[0050] S5. Constructing a tree neural network adaptive path selection model;

[0051] The adaptive path selection module aims to dynamically select the optimal path from the root node to the leaf node, and construct the routing path between the nodes corresponding to different levels of the tree neural network model, thereby providing the optimal decision scheme for power dispatch.

[0052] We designed a router for each non-leaf node in each layer to select the path with the most information. Specifically, the router generates the embedding As input, the logits of path selection are generated by MLP:

[0053]

[0054] where, and are the weight matrices of the router, and are the bias terms, and σ is a nonlinear activation function. Then, we calculate the probability distribution of path selection by softmax:

[0055]

[0056] Select the path with the maximum probability:

[0057]

[0058] To encourage the diversity of path selection, an entropy-based regularization term is introduced

[0059]

[0060] This regularization term encourages the model to explore multiple possibilities when selecting paths, thereby enhancing the adaptability of the model.

[0061] S6. Perform interpretation and dispatching decision of power system according to the multi-granularity tree neural network model;

[0062] The present application provides local to global interpretive analysis by combining the multi-granularity paths generated by the adaptive path selection module with the node embeddings of different levels.

[0063] For each power grid instance G t , we calculate the probability of path selection in each layer and select the optimal path sequence to represent the multi-granularity interpretation path from the root to the leaf. The specific calculation is as follows:

[0064]

[0065] Final embedding For generating the prediction results of power scheduling:

[0066] h i = sofmax(f(Z final )) (19)

[0067] Where h i represents the classification probability of the grid state.

[0068] In the loss function design, we combined the classification loss, edge prediction loss, perturbation regularization and entropy regularization to ensure the overall performance of the model:

[0069]

[0070] Where α1, α2, α3 control the weights of different regularization terms respectively.

[0071] Through the above design, the application realizes efficient and interpretable decision-making ability in complex power scheduling scenarios. The model not only provides diversified scheduling schemes, but also provides clear explanations for each decision path, meeting the high requirements of transparency and compliance of the power system.

[0072] The power scheduling decision system based on the multi-granularity tree graph neural network for implementing the method of the application, characterized by comprising: a power grid state sample data set construction module, a power grid data graph representation and feature extraction module, a hierarchical multi-granularity power grid information coarsening module, a power grid information perturbation module, an adaptive tree model path selection module, and a power system multi-granularity explanation and scheduling decision module.

[0073] In the process of power grid dispatching decision, firstly, according to the electrical characteristics and topological structure of the power grid, a power grid simulation model is constructed by using a power system simulation tool, and the data is screened through power flow calculation to generate a power grid state sample data set suitable for training and verification; then, the power grid data is modeled as graph data, in which the nodes represent power plants, substations and load centers, etc., and the edges represent the transmission lines between these nodes; graph convolution network (GCN) is used to extract features from the graph data, and high-level feature representation of the power grid state is extracted by capturing the complex interactions between nodes; based on these graph features, a multi-granularity graph coarsening module is used to gradually compress the graph structure of the power grid, and the complex relationships in the power system are gradually modeled at multiple granularities to generate multi-level graph representations from fine granularity to coarse granularity, such as the operating state of a single power plant, the balance of power generation and load in different ranges of areas, and the power flow path in the whole grid, ensuring that the model can take into account both local details and global structure; at the same time, a learnable graph perturbation module is used to add different perturbations to the power grid state, and the corresponding nodes in each level of the tree-shaped neural network model are constructed to simulate the operation of the power grid under various working conditions, improving the robustness and adaptability of the model; the adaptive path selection module constructs the routing paths between the nodes corresponding to different levels of the tree-shaped neural network model, dynamically selects the optimal path from the root to the leaf, generates the most reasonable power dispatching scheme, and provides detailed explanations for the dispatching scheme based on the multi-granularity explanation module, helping users understand the basis for dispatching decisions; finally, the performance of the model is evaluated, including accuracy, robustness and interpretability, and the model is applied to real-time dispatching, load management and emergency response of the power grid, demonstrating the practical utility of the model in power grid dispatching, effectively realizing the optimization management and reliability improvement of power grid dispatching.

[0074] The advantages of the present application are: by modeling the power grid data as graph data and using graph convolution network to extract high-level features, the complex topological relationships in the power grid are effectively captured, improving the accuracy of dispatching decisions; in addition, the present application combines multi-granularity graph coarsening and adaptive path selection, and gradually models the complex relationships in the power system at multiple granularities to generate multi-level graph representations from fine granularity to coarse granularity, such as the operating state of a single power plant, the balance of power generation and load in different ranges of areas, and the power flow path in the whole grid, ensuring that the model can take into account both local details and global structure, realizing multi-level decision-making from local to global, making the dispatching scheme more interpretable and transparent; at the same time, the learnable graph perturbation module further enhances the adaptability of the model under actual working conditions, providing a more flexible and robust solution for power dispatching, effectively supporting the efficient management and safe operation of modern power systems. BRIEF DESCRIPTION OF DRAWINGS

[0075] Figure 1 is a flowchart of the method of the present application.

[0076] Figure 2 is the general schematic diagram of the method of the present application. The gradient green color is used in the figure to represent the hierarchical structure of different depths of the graph neural network from shallow to deep; different colors such as orange, purple, green, blue, etc. are used to represent the sub-structures with different independent information in the graph result or node embedding structure of each layer of the graph neural network; and different depths of orange, blue and gray are used to represent the feature matrix, adjacency matrix, node embedding matrix, cluster assignment matrix, etc. in the graph result or node embedding structure of each layer of the graph neural network. DETAILED DESCRIPTION

[0077] The technical solutions of the present application will be clearly and completely explained and described below in combination with the drawings.

[0078] Example 1

[0079] The present embodiment relates to a power dispatching decision method based on a multi-granularity tree-shaped graph neural network, comprising the following steps:

[0080] S1. Constructing a power grid state sample data set;

[0081] The power system simulation tool Pandapower of Python is used to construct the power grid state sample data set; the data set is based on the regional power grid data after desensitization processing, generated by high-precision power dispatching simulation algorithm, containing more than 5000 simulation samples covering different working conditions; first, an electric power simulation model containing electrical characteristic parameters such as voltage level, load type, generator capacity, power grid topology structure such as substation connection relationship, transmission line parameters and node output information under different load conditions is constructed; then, based on the typical daily load data, the output of different generators is randomly adjusted, and the electricity demand of the load node is adjusted at the same time to ensure the balance between power generation and electricity consumption under different situations; finally, the simulation data is filtered by power flow calculation, and the samples that meet the power system thermal stability constraints are included in the data set; repeat the above steps several times, and the generated sample data set can be used to train and verify the graph neural network model of power grid dispatching optimization. The data set not only accurately simulates the dynamic behavior of the power system under different load conditions, but also ensures the wide applicability and representativeness of the data through strict power flow calculation and topology structure analysis, providing a basis for the training and verification of the subsequent model.

[0082] S2. Graph representation and feature extraction of power grid data;

[0083] The various components in the power grid, such as power plants, substations, load centers, etc., are modeled as nodes of a graph, and the transmission lines between nodes are considered as edges of the graph, thereby converting the power grid data into a graph representation. The state of such a graph can be represented as s = (A, H), where A is an adjacency matrix representing the connection relationship of nodes, containing the connection information of N nodes, and H is a node feature matrix, each row h i represents the characteristics of node i (such as power generation, voltage, etc.).

[0084] In the feature extraction process, we use the Graph Attention Network (GAT) to model the relationship between nodes. First, we calculate the correlation score c ij between nodes i and j, which reflects the strength of their association:

[0085]

[0086] where W1 and W2 are weight matrices for transforming features, represents the connection operation of features, and MLP is a multi-layer perceptron used to generate the correlation score between nodes.

[0087] Next, by normalizing the correlation score, we get the attention weight β ij of node j to node i:

[0088]

[0089] where β ij represents the relative importance of node j to node i in the information transmission process.

[0090] The new feature representation p i of node i is obtained by aggregating the information of its neighbor nodes:

[0091]

[0092] where W g is a weight matrix for feature transformation, σ is an activation function, and p i is the updated feature representation of node i.

[0093] This method allows each node to dynamically adjust the aggregation of information based on the importance of its neighbors, thereby better capturing the complex relationships and dependencies between nodes in the power grid graph representation. The final node feature p i combines the information of neighbor nodes, providing an in-depth feature representation for power grid characteristic analysis under various states in power dispatch.

[0094] S3. Construct a hierarchical multi-granularity power grid information coarsening model;

[0095] The application adopts a hierarchical graph coarsening module to construct each level of a tree-shaped neural network model, gradually models the complex relationship in the power system at multiple granularities to gradually simplify the grid graph structure, and obtains multi-granularity structural information, such as the operation state of a single power station, the balance between power generation and load in different ranges of regions, and the power flow path in the whole network range, so as to better cope with different levels of information needs in power dispatching.

[0096] The module is based on a classic graph pooling strategy, extracts node embedding representation of each layer through a graph neural network (GNN), and performs graph coarsening processing on the basis. Specifically, we first extract node embedding Z (l) in each layer, and the update rule is as follows:

[0097]

[0098] where Z (0) is the input feature matrix, is the adjacency matrix containing self-loops, is the degree matrix of , W (l) is the weight matrix of the lth layer, and σ(·) is the activation function.

[0099] Next, we generate a clustering assignment matrix S (l) through a multi-layer perceptron (MLP) to merge nodes into coarse-grained clusters in each layer:

[0100] S (l) = softmax(MLP (l) (z (l) ; Θ MLP )) (5)

[0101] where Θ MLP is a trainable parameter, represents the probability that node v i belongs to cluster j.

[0102] Then, we generate the coarsened adjacency matrix A (l) and embedding matrix X (l+1) using S (l+1) :

[0103]

[0104] where N is the number of nodes in the current layer, and K (l) is the number of clusters in the lth layer. In order to maintain the connectivity of the graph structure during the coarsening process, we introduce an edge prediction loss To constrain the coarsening process:

[0105]

[0106] where A ij is the element in the original adjacency matrix, is the coarsened adjacency matrix. With this hierarchical coarsening strategy, we are able to extract information from the detailed level of the power grid to the higher abstract level gradually to adapt to different scheduling requirements.

[0107] S4. Constructing the graph perturbation model of power grid information graph;

[0108] On the basis of multi-granularity graph coarsening, the application introduces a learnable graph perturbation module, constructs corresponding nodes in each level of the tree-shaped neural network model, and aims to improve the adaptability and robustness of the model to different operating states of the power grid by introducing a slight perturbation, and provides leaf nodes for each layer of the tree-shaped neural network model.

[0109] The module generates a set of learnable perturbation matrices for each parent node so as to perturb the coarsened allocation matrix and generate a plurality of possible subgraph states:

[0110]

[0111] where, is the original clustering allocation matrix.

[0112] Based on the perturbed allocation matrix, the perturbed node embedding

[0113]

[0114] where, is the embedding representation of the kth parent node in the lth layer. In order to ensure that the perturbed embedding both maintains the original information and has diversity, two kinds of regularization terms are designed:

[0115] Similarity regularization:

[0116]

[0117] Ensure that the perturbed embedding is similar to the original embedding, and retain the structural information of the graph.

[0118] Diversity regularization:

[0119]

[0120] Promote the difference between different disturbances, ensure that the model can cope with different power grid scenarios. Through these two regularization terms, we define the total loss of the disturbance:

[0121]

[0122] S5. Constructing a tree neural network adaptive path selection model;

[0123] The adaptive path selection module aims to dynamically select the optimal path from the root node to the leaf node, and construct the routing path between the nodes corresponding to different levels of the tree neural network model, so as to provide the optimal decision scheme for power dispatching.

[0124] We design a router for each non-leaf node in each layer to select the path with the most information. Specifically, the router generates the embedding of the disturbance module as input, and generates the logits of path selection through the MLP: As input, through the MLP to generate the logits of path selection:

[0125]

[0126] Where, and are the weight matrices of the router, and are the bias terms, and σ is a nonlinear activation function. Then, we calculate the probability distribution of path selection through softmax:

[0127]

[0128] Select the path with the maximum probability:

[0129]

[0130] To encourage the diversity of path selection, an entropy-based regularization term is introduced

[0131]

[0132] This regularization term encourages the model to explore multiple possibilities when selecting paths, thereby enhancing the adaptability of the model.

[0133] S6. Perform power system explanation and dispatching decision according to the multi-granularity tree neural network model;

[0134] The present application provides a multi-granularity path generated by the adaptive path selection module, combined with the node embedding of different levels, to provide local to global explanatory analysis.

[0135] For each power grid instance G tWe calculate the probability of path selection in each layer and select the optimal path sequence To represent the multi-granularity explanation path from root to leaf. The specific calculation is as follows:

[0136]

[0137] Final embedding For generating the prediction results of power scheduling:

[0138] h i = softmax(f(z final )) (19)

[0139] Where h i represents the classification probability of the grid state.

[0140] In the loss function design, we combine the classification loss, edge prediction loss, perturbation regularization and entropy regularization to ensure the overall performance of the model:

[0141]

[0142] Where α1, α2, α3 control the weights of different regularization terms respectively.

[0143] Through the above design, the invention realizes efficient and interpretable decision-making ability in complex power scheduling scenarios. The model not only provides diversified scheduling schemes, but also provides clear explanations for each decision path, meeting the high requirements of transparency and compliance of the power system.

[0144] Embodiment 2

[0145] This embodiment relates to a power scheduling decision system based on a multi-granularity tree graph neural network, which is used to realize the method of embodiment 1, comprising:

[0146] A power grid state sample data set construction module is constructed to construct a power grid state sample data set.

[0147] A graph representation and feature extraction module of power grid data is used to perform graph representation and feature extraction on the power grid data.

[0148] A hierarchical multi-granularity power grid information coarsening module is used to construct a hierarchical multi-granularity power grid information coarsening model.

[0149] A power grid information perturbation module is used to construct a power grid information graph perturbation model.

[0150] An adaptive tree model path selection module is used to construct a tree neural network adaptive path selection model.

[0151] The power system multi-granularity explanation and dispatching decision module performs explanation and dispatching decision of the power system according to a multi-granularity tree-shaped neural network model.

[0152] The modules sequentially contain the contents of S1-S6 of the method.

[0153] The content described in the embodiments of the present specification is only a list of implementation forms of the inventive concept, and the protection scope of the present application should not be regarded as being limited to the specific forms stated in the embodiments, and the protection scope of the present application also extends to equivalent technical means that can be thought of by those skilled in the art according to the inventive concept.

Claims

1. A power dispatching and optimization method based on a multi-granularity tree graph neural network, comprising the following steps: Step 1. Constructing a power grid state sample dataset; Step 2. Graph representation and feature extraction of power grid data; Step 3. Constructing a hierarchical multi-granularity power grid information coarsening model; specifically including: A hierarchical graph coarsening module is used to build each level of the tree neural network model. By modeling the complex relationships in the power system at multiple granularities, the power grid graph structure is gradually simplified to obtain multi-granularity structural information. The module is based on a classic graph pooling strategy, extracts node embedding representation of each layer through a graph neural network (GNN), and performs graph coarsening processing on this basis; first, the node embedding Z (l) The update rule is as follows: wherein Z (0) = X is an input feature matrix, is an adjacency matrix containing self-loops, is a degree matrix of W (l) is a weight matrix of the l-th layer, and σ(·) is an activation function. Next, a clustering assignment matrix S is generated by a multilayer perceptron (MLP) ( l) for merging nodes into coarse-grained clusters in each layer: S (l) = softmax(MLP (l) (Z (l) ; Θ MLP )) (5) where Θ MLP are trainable parameters, denotes the probability that a node v i belongs to cluster j; Then, the S (l) The roughened adjacency matrix A (l+1) and the embedding matrix X (l+1) are generated where N is the number of nodes of the current layer, K (l) is the number of clusters of the l-th layer; to preserve the connectivity of the graph structure in the coarsening process, an edge prediction loss to constrain the coarsening process: where A ij is an element in the original adjacency matrix, is the coarsened adjacency matrix; through this hierarchical coarsening strategy, information can be gradually extracted from the detailed level of the power grid to a higher abstract level to adapt to different scheduling requirements; Step 4. Constructing a power grid information graph perturbation model; specifically including: On the basis of multi-granularity graph coarsening, a learnable graph perturbation module is introduced to construct the corresponding nodes in each level of the tree neural network model, aiming to improve the adaptability and robustness of the model to different operating states of the power grid by introducing a small perturbation, and to provide leaf nodes for each layer of the tree neural network model; the module generates a set of learnable perturbation matrices for each parent node Thus, the coarsened allocation matrix is perturbed to generate multiple possible subgraph states: wherein, assigning a matrix to the original cluster; based on the perturbed allocation matrix, compute perturbed node embeddings wherein, is the embedding representation of the kth parent node in the lth layer; To ensure that the perturbed embedding both preserves the original information and has diversity, two regularization terms are designed: Similarity regularization: Ensure that the perturbed embedding is similar to the original embedding, preserving the structure information of the graph; Diversity regularization: Promote the differences between different perturbations to ensure that the model can handle different power grid scenarios; through these two regularization terms, define the total loss of perturbation: Step 5. Constructing a tree neural network adaptive path selection model; the adaptive path selection model aims to dynamically select the optimal path from the root node to the leaf node, and construct the routing path between the nodes corresponding to different levels of the tree neural network model, thereby providing the optimal decision scheme for power dispatching; Step 6. According to the multi-granularity tree neural network model, execute the explanation and dispatching decision of the power system. 2.The power dispatching and optimization method based on the multi-granularity tree graph neural network according to claim 1, wherein, Step 1 specifically includes: The Python power system simulation tool Pandapower is used to construct the power grid state sample dataset; this dataset is based on desensitized regional power grid data and generated through high-precision power dispatching simulation algorithms, containing more than 5000 simulation samples covering different operating conditions; first, construct a power grid simulation model containing the electrical characteristic parameters of each node in the power grid, the power grid topology structure, and the output information of each node under different load conditions; then, based on typical daily load data, randomly adjust the output of different generators while adjusting the electricity demand of load nodes to ensure balance between power generation and electricity consumption under different scenarios; finally, through power flow calculation, filter the simulation data to include samples that converge and meet the thermal stability constraints of the power system; repeat the above steps multiple times to generate a sample dataset that can be used to train and verify the graph neural network model for power grid dispatching optimization; this dataset not only accurately simulates the dynamic behavior of the power system under different load conditions, but also ensures the wide applicability and representativeness of the data through strict power flow calculation and topology structure analysis, providing a foundation for subsequent model training and verification. 3.The power dispatching and optimization method based on the multi-granularity tree graph neural network of claim 1, wherein, Step 2 specifically includes: The power grid data is converted into a graph form representation by modeling each component of the power grid, such as power stations, substations, and load centers, as a node of the graph, and the power transmission lines between the nodes as edges of the graph. The state of the graph is represented as s = (A, H), where A is an adjacency matrix representing the connection relationship of the nodes, containing the connection information of N nodes, and H is a node feature matrix, each row h i represents the features of node i. In the feature extraction process, the graph attention network (GAT) is used to model the relationship between nodes. First, the correlation score c between nodes i and j is calculated, which reflects the strength of the association between the two: ij ​ where W1 and W2 are used to transform the weight matrix of the features, a connection operation representing the features, and an MLP is a multi-layer perceptron used to generate a correlation score between nodes; Next, by normalizing the correlation score, the attention weight β of node j to node i is obtained ij : where β ij represents the relative importance of node j to node i in the information transmission process; The new feature representation p of node i i is obtained by aggregating the information of its neighbor nodes: where W g is the weight matrix for feature transformation, σ is the activation function, p i is the updated feature representation of node i; This method enables each node to dynamically adjust the aggregation of information according to the importance of its neighbors, so that the complex relationships and interdependencies between power grid nodes can be better captured when constructing the representation of the power grid graph; the final node feature p i Combined with the information of neighbor nodes, the method provides in-depth feature representation for power grid characteristic analysis in various states in power dispatch. 4.The power dispatching and optimization method based on the multi-granularity tree graph neural network of claim 1, wherein, Step 5 specifically includes: A router is designed for each layer's non-leaf node to select the most informative path; specifically, the router will perturb the embeddings generated by the perturbation module As input, logits for path selection are generated by an MLP: where, and is the weight matrix of the router, and are the bias terms, and σ is a non-linear activation function; then, the probability distribution of path selection is computed by softmax: Select the path with the highest probability: To encourage diversity in path selection, an entropy-based regularization term is introduced This regularization term encourages the model to explore multiple possibilities when selecting paths, thereby enhancing the adaptability of the model. 5.The power dispatching and optimization method based on the multi-granularity tree graph neural network according to claim 1, wherein, Step 6 specifically includes: Through the multi-granularity paths generated by the adaptive path selection module, combined with the node embeddings at different levels, provide local to global explanatory analysis; For each grid instance G t , the probability of path selection in each layer is calculated, and the optimal path sequence is selected to represent the multi-granularity explanation path from the root to the leaf; the specific calculation is as follows: Final embedding For generating a prediction of an electricity dispatch: where h i denotes the classification probability for the grid state; In the loss function design, combine classification loss, edge prediction loss, perturbation regularization, and entropy regularization to ensure the multi-faceted performance of the model: Where α1, α2, α3 control the weights of different regularization terms.

6. The power system dispatching and optimization system based on the multi-granularity tree graph neural network, realizing the power dispatching and optimization method based on the multi-granularity tree graph neural network according to any one of claims 1-5, characterized in that, Including: A power grid state sample data set construction module constructs a power grid state sample data set; A power grid data graph representation and feature extraction module performs graph representation and feature extraction on power grid data; A hierarchical multi-granularity power grid information coarsening module constructs a hierarchical multi-granularity power grid information coarsening model; A power grid information perturbation module constructs a power grid information graph perturbation model; An adaptive tree model path selection module constructs an adaptive tree neural network path selection model; A power system multi-granularity explanation and dispatching decision module performs power system explanation and dispatching decision according to the multi-granularity tree neural network model.

Citation Information

Patent Citations

  • Microgrid topology planning based on optimal loop

    CN111211560A

  • Method, system and equipment for extracting global information of graph data and medium

    CN113591955A