Distribution network load transfer control method and system based on neural network decision distillation

Through the method of decision-making distillation based on neural network, the use of graph neural network and knowledge distillation technology to optimize the load transfer control of distribution network, the uncertainty of the topological change of distribution network load transfer method in the existing technology in the face of failure is solved. The problem has achieved high-precision grid state prediction and simplified decision-making process, and improved the stability and reliability of the grid.

CN118899844BActive Publication Date: 2024-12-31CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411372281.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-31
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

The existing distribution network load transfer method has various limitations in the face of uncertainty in topological changes after failure and the "combination explosion" problem of transfer path selection, and it is difficult to provide high-quality solutions in a short period of time.

Method used

Using a neural network-based decision distillation method, the topological structure and node characteristics of the distribution network are deeply analyzed through the graph neural network, and the complex graph neural network model is simplified into an easy-to-understand and execute decision tree model to optimize power distribution The network's response strategy during load transfer control.

Benefits of technology

It realizes high-precision prediction of the combined state of the power grid switch, simplifies the decision-making process, improves the interpretability and transparency of the model, reduces unnecessary power losses, reduces the frequency of abnormal situations such as overload and voltage oversight, and extends the The service life of the equipment is reduced and the operation and maintenance costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118899844B_ABST
    Figure CN118899844B_ABST
Patent Text Reader

Abstract

The present invention discloses a distribution network load transfer control method and system based on neural network decision distillation, which belongs to the technical field of power grid operation optimization. The method includes collecting distribution network data and constructing a distribution network load transfer control data set; converting the distribution network load transfer control data set into graph data; training a graph neural network model based on the graph data to extract high-dimensional features of the distribution network load transfer control data set, obtain switch state prediction results and output load transfer control strategies; using knowledge distillation technology to use the original input of the graph neural network model and the high-dimensional features and switch state prediction results extracted from the graph neural network model to train a decision tree model respectively, minimizing the difference between the output of the decision tree model and the output of the graph neural network model; using the trained decision tree model to match the specific features and decision results of the power grid state, and providing a decision basis for the distribution network load transfer control. The present invention can more accurately predict the operation state of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power grid operation optimization, and in particular relates to a distribution network load transfer control method and system based on neural network decision distillation. Background Art

[0002] With the rapid expansion of urban scale and the continuous advancement of electric energy substitution, the number of nodes in the distribution network has increased significantly, and the structure has become more complex. After a fault occurs, the topological changes of the distribution network have great uncertainty, which makes it difficult for traditional load transfer methods to provide high-quality solutions in a short time. Load transfer refers to the process of changing the power supply path by operating different combinations of contact switches and section switches when a fault occurs in the distribution network to restore the power supply to downstream power-off load users as soon as possible. It aims to reduce the power loss caused by faults or maintenance under the premise of meeting the open-loop operation of the distribution network, and improve the reliability and economy of the distribution network operation.

[0003] At present, the solutions to load transfer in distribution networks mainly include heuristic algorithms, mathematical optimization algorithms, expert system methods, and random search algorithms. These methods have various limitations in dealing with the uncertainty of topological changes after distribution network failures and the "combinatorial explosion" problem of transfer path selection. For example, although the heuristic algorithm is simple and intuitive, the quality of the solution depends on the formulation of rules and the initial state of the distribution network, which affects the speed and quality of the solution. Mathematical optimization algorithms are prone to "combinatorial explosion" problems when facing large and complex distribution network structures and high dimensions. Although the expert system method has good real-time performance and wide applicability, the establishment and integration of the library is time-consuming and laborious. Although the random search algorithm has good robustness, the search process has a large scope and requires a large amount of simulation calculations, which may cause non-convergence problems. Summary of the invention

[0004] The purpose of the present invention is to address the problems in the above-mentioned prior art and provide a distribution network load transfer control method and system based on neural network decision distillation, which uses graph neural networks to deeply analyze the topological structure and node characteristics of the distribution network, realize high-precision prediction of the combination state of power grid switches, and simplify the complex graph neural network model into a decision tree model that is easy to understand and execute through decision distillation technology, so as to optimize the response strategy of the distribution network when performing load transfer control.

[0005] In order to achieve the above object, the present invention has the following technical solutions:

[0006] In a first aspect, a distribution network load transfer control method based on neural network decision distillation is provided, comprising:

[0007] Collect distribution network data and build distribution network load transfer control data set;

[0008] The distribution network load transfer control dataset is converted into graph data, where the nodes of the graph represent the elements in the power grid and the edges represent the electrical connections between the elements; a graph neural network model is trained based on the graph data to extract high-dimensional features of the distribution network load transfer control dataset, obtain the switch state prediction results, and output the load transfer control strategy;

[0009] The knowledge distillation technology is used to train the decision tree model using the original input of the graph neural network model and the high-dimensional features and switch state prediction results extracted from the graph neural network model, so as to minimize the difference between the output of the decision tree model and the output of the graph neural network model.

[0010] The trained decision tree model is used to match the specific characteristics of the power grid state and the decision results, providing a decision basis for load transfer control in the distribution network.

[0011] As a preferred solution, the steps of collecting distribution network data and constructing a distribution network load transfer control data set include collecting voltage levels, key line load parameters, and whether there is an overload or voltage over-limit situation, using the analysis results as sample features, and recording the corresponding control measures and the switch combination status after load transfer as sample labels; using the comprehensive power system analysis tool PyPSA, in conjunction with custom scripts, to automatically generate and process data sets, using historical load and power generation data as a benchmark, and dynamically adjusting the load and power generation status in the power grid model by simulating different load change scenarios and the access or exit of distributed energy; after each simulation, performing power flow analysis to determine the operating status of the power grid.

[0012] As a preferred solution, the step of converting the distribution network load transfer control data set into graph data includes converting the feature representation of each grid node by a graph neural network model through an adjacency matrix of the grid topology and node feature data X It is calculated that the graph neural network model calculates the new features of each node by learning the connection relationship and node features between nodes. for:

[0013]

[0014] in, It is l The node representation of the layer, is the normalized adjacency matrix, It is l The learnable weights of the layers, is a nonlinear activation function;

[0015] Train the graph neural network model to predict the switch combination status of the distribution network:

[0016]

[0017] In the formula, for The degree matrix of Express Add row by row, for The inverse of the square root of a matrix is ​​obtained by right Normalize the result so that the sum of each row is 1. is the adjacency matrix with self-connection added, where is the original adjacency matrix, is the identity matrix; for l The weight matrix of the layer;

[0018] The prediction accuracy of the graph neural network model is measured by the cross entropy loss function:

[0019]

[0020] In the formula, represents the sample size, represents the number of categories, is a binary indicator, that is, if the sample Belongs to category If yes, it is 1, otherwise it is 0; is the model prediction sample Belongs to category probability;

[0021] The difference between the predicted value and the true value of the graph neural network model is calculated by the mean square error loss function:

[0022]

[0023] In the formula, is the number of samples, and The samples are The true and predicted values.

[0024] As a preferred solution, the trained graph neural network model is evaluated using a test set, and the accuracy, precision, recall and F1-score are used to quantify the evaluation results. The calculation expressions are as follows:

[0025]

[0026]

[0027]

[0028]

[0029] In the formula, is the true positive, that is, the number of positive examples that are actually positive and judged as positive by the model; is the number of true negative examples, that is, the number of negative examples that are actually negative examples and are judged as negative examples by the model; is the number of false positives, that is, the number of negative examples that are actually positive examples judged by the model; is the number of false negative examples, that is, the number of examples that are actually positive but are judged as negative examples by the model.

[0030] As a preferred solution, the step of extracting high-dimensional features from the distribution network load transfer control data set by training the graph neural network model based on graph data includes:

[0031] Hypothesis Diagram By node collection and edge set Composition, Node The eigenvector of , the graph neural network has Update the representation of the node by the following expression:

[0032]

[0033] In the formula, Is a node The updated feature representation is the high-dimensional feature to be explained; Is a node Neighbor nodes j In the The feature representation of the layer, Representation Node The set of neighbor nodes of is the normalization constant; It is The weight matrix of the layer; is a non-linear activation function.

[0034] As a preferred solution, it also includes optimizing the learning process of high-dimensional features by adjusting the graph neural network model parameters, wherein the graph neural network model parameters include the first The weight matrix of the layer and nonlinear activation function , as well as possible regularization strategies, during the optimization process, the sensitivity of the graph neural network model to different grid states, fault types and load changes is improved, so that the graph neural network model can distinguish different grid states and make effective load transfer decisions.

[0035] As a preferred solution, the attention mechanism is introduced into the graph neural network model to adjust the graph neural network model parameters, and the attention coefficient This is calculated using the following expression:

[0036]

[0037] In the formula, Represents the connection of vectors; is the learned weight vector used to calculate the attention coefficient; Is a node and The attention coefficient between nodes The feature pair node the extent of the impact; For Node feature The encoded query vector, For Node j feature The encoded key vector, For Node k feature The encoded key vector, is the transposed matrix of the attention weight matrix, is the activation function; To get the index, For Node The set of neighbor nodes of Represents neighbor nodes;

[0038] The node update expression after adding the attention mechanism is:

[0039] .

[0040] As a preferred solution, in the step of using the knowledge distillation technology to respectively train the decision tree model using the original input of the graph neural network model and the high-dimensional features extracted from the graph neural network model and the switch state prediction results, a knowledge transfer process from the graph neural network model to the decision tree model is defined. , through training, each decision tree model outputs near :

[0041]

[0042] The mean squared error loss function is used to minimize the difference between the output of the decision tree model and the output of the graph neural network model:

[0043]

[0044] In the formula, is the sample size, and They are The graph neural network output and decision tree output of samples.

[0045] In a second aspect, a distribution network load transfer control system based on neural network decision distillation is provided, comprising:

[0046] A data set construction module is used to collect distribution network data and construct a distribution network load transfer control data set;

[0047] The graph data conversion and high-dimensional feature extraction module is used to convert the distribution network load transfer control data set into graph data, where the nodes of the graph represent the elements in the power grid and the edges represent the electrical connections between the elements; the graph neural network model is trained based on the graph data to extract high-dimensional features of the distribution network load transfer control data set, obtain the switch state prediction results, and output the load transfer control strategy;

[0048] The knowledge distillation module is used to use the knowledge distillation technology to train the decision tree model using the original input of the graph neural network model and the high-dimensional features and switch state prediction results extracted from the graph neural network model, so as to minimize the difference between the output of the decision tree model and the output of the graph neural network model;

[0049] The decision-making module is used to use the trained decision tree model to match the specific characteristics of the power grid state and the decision results, and provide a decision basis for the load transfer control of the distribution network.

[0050] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the distribution network load transfer control method based on neural network decision distillation is implemented.

[0051] Compared with the prior art, the first aspect of the present invention has at least the following beneficial effects:

[0052] By expressing the distribution network status as graph data, comprehensively considering the relationship between node status and topological structure, embedding static topological knowledge into the graph neural network model, and using the graph neural network model for feature extraction, the implicit relationship of the distribution network is explored to form high-dimensional features that are highly sensitive to different grid states, fault types and load changes. Afterwards, the knowledge distillation technology is used to train the decision tree model using the original input of the graph neural network model and the high-dimensional features and switch state prediction results extracted from the graph neural network model, and the difference between the output of the decision tree model and the output of the graph neural network model is minimized. By introducing the model distillation technology, the complex decision-making process of the graph neural network is transferred to a simpler model and converted into a more intuitive and easy-to-understand decision rule and pattern. By constructing a decision tree model, the interpretability of the distribution network transfer path generation strategy is achieved while retaining the calculation accuracy of the graph neural network, so that the operation and maintenance personnel can more clearly understand the logical reasons behind the decision. In particular, unlike the process from high-dimensional features to decision results, the interpretation object of the control method of the present invention adds the process from original input features to decision results, and explains the complete graph neural network decision process. The present invention can more accurately predict the operating state of the power grid, not only simplifies the complexity of the model, but also retains the high-precision prediction ability and greatly improves the interpretability of the model. The visual display of the decision tree model makes the decision logic intuitive and easy to understand for non-professional users, enhances the transparency and credibility of the model, and provides an easy-to-understand decision basis for power grid operators, which is conducive to improving the safety and stability of the power grid. The method of the present invention can effectively reduce unnecessary power loss and optimize the distribution network operation mode by optimizing the grid operation status prediction and load transfer decision-making process. At the same time, it can reduce the frequency of abnormal situations such as overload and voltage over-limit, prevent operation risks, reduce the operation pressure of grid equipment, extend the service life of equipment, and reduce the operation and maintenance cost of the grid.

[0053] Furthermore, the present invention introduces an attention mechanism into the graph neural network model to adjust the graph neural network model parameters, and uses the mean square error loss function to minimize the difference between the output of the decision tree model and the output of the graph neural network model. Figure 2 Classification model, the solution of the present application is more suitable for load transfer control in distribution networks, and belongs to a graph node binary classification model. The load transfer control strategy is obtained by judging the operating status of each switch in the distribution network.

[0054] It can be understood that the beneficial effects of the second to third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0056] Figure 1 Flow chart of the load transfer control method of distribution network based on neural network decision distillation in an embodiment of the present invention;

[0057] Figure 2 A structural block diagram of a distribution network load transfer control system based on neural network decision distillation in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0059] At present, there are decision-making methods for load transfer in distribution networks, such as the load transfer control method of distribution networks based on deep reinforcement learning. By considering the load transfer process as a Markov decision process, the method interacts with the real-time electrical and topological data of the distribution network to control the tie switch and the section switch. This method adopts the Dueling deep Q network algorithm (Dueling DQN), and improves the convergence speed and robustness of the algorithm through technical means such as pre-simulation mechanism, action and learning ratio adjustment, and adaptive optimization algorithm, so as to give a high-quality transfer decision plan in a short time. The main process includes considering the load transfer process as a Markov decision process and using the reinforcement learning RL (Reinforcement Learning) theory to deal with the load transfer problem. The Dueling deep Q network DQN (Dueling Deep Q-Network) algorithm is used to solve the problem through pre-simulation mechanism, action and learning ratio adjustment, and adaptive optimization algorithm to improve the accuracy and generalization ability of the algorithm. The tie switch and the section switch are controlled to adapt to the uncertainty of the topological changes of the distribution network.

[0060] However, the load transfer control method for distribution networks based on deep reinforcement learning, although it has significant advantages, also faces a series of challenges, including at least: First, high computational complexity is a major problem, because deep learning models require a lot of computing resources and time to train, which may become a constraint in application scenarios that require real-time or near-real-time response. Secondly, this method is highly dependent on data. High-quality historical and real-time data are crucial to model performance. Data collection, processing and updating need to be accurate and efficient. Any data problems may affect the accuracy of the model. In addition, although the generalization ability of the model can be improved to a certain extent through pre-simulation mechanisms and adaptive optimization algorithms, the generalization ability of the model is still a challenge when facing unknown situations or drastic changes in the distribution network structure. The "black box" characteristics of deep learning models also make the decision-making process lack transparency and explainability, which may cause concern in distribution network scenarios that require high reliability and security. Finally, the adjustment and maintenance of the model requires continuous human and material investment. As the distribution network environment changes, the model needs to be continuously updated to adapt to new changes, adding additional costs.

[0061] In this context, the present invention proposes a load transfer control method for distribution network based on graph neural network (GNN) and knowledge distillation decision tree. This method uses graph neural network to capture the topological structure and node characteristics of the distribution network to understand the complex connectivity of the distribution network and the dependencies between nodes. Combined with knowledge distillation technology, decision knowledge is extracted from complex deep learning models to generate concise and efficient decision trees to achieve precise control of tie switches and section switches. This method aims to adapt to the uncertainty of topological changes in the adaptive distribution network, deeply understand the structural characteristics of the distribution network through graph neural network, and combine the rapid decision-making ability of decision trees to improve the accuracy and generalization ability of the algorithm.

[0062] See also Figure 1 The load transfer control method of the distribution network based on the neural network decision distillation in the embodiment of the present invention includes:

[0063] S1, collect distribution network data and construct distribution network load transfer control data set;

[0064] S2. Convert the distribution network load transfer control data set into graph data, where the nodes of the graph represent the elements in the power grid and the edges represent the electrical connections between the elements; train a graph neural network model based on the graph data to extract high-dimensional features of the distribution network load transfer control data set, obtain the switch state prediction results, and output the load transfer control strategy;

[0065] S3. Use knowledge distillation technology to train the decision tree model using the original input of the graph neural network model and the high-dimensional features and switch state prediction results extracted from the graph neural network model, and minimize the difference between the output of the decision tree model and the output of the graph neural network model.

[0066] S4. Use the trained decision tree model to match the specific characteristics of the power grid state and the decision results, and provide a decision basis for the load transfer control of the distribution network.

[0067] In one possible implementation, in order to construct a distribution network load transfer control data set, during the data collection phase, special attention is paid to the results of the power flow analysis, especially key parameters such as voltage level, line load, and whether there is overload or voltage over-limit. These analysis results are used as sample features, and the corresponding control measures and the switch combination state after load transfer are recorded as sample labels. This data collection process is repeated until enough data samples are accumulated for model training and testing.

[0068] Step S1 of the embodiment of the present invention uses the comprehensive power system analysis tool PyPSA, in conjunction with a custom script to automatically generate and process data sets. First, a distribution network model is designed. The distribution network model is based on the characteristics of the real-world distribution network, including but not limited to the electrical properties, topology, and various equipment parameters of the power grid. Subsequently, using historical load and power generation data as a benchmark, the load and power generation status in the power grid model are dynamically adjusted by simulating different load change scenarios and the access or exit of distributed energy. After each simulation, a power flow analysis is performed to determine the operating status of the power grid.

[0069] In a possible implementation, step S2 represents the feature representation of each grid node by the graph neural network model through the adjacency matrix of the grid topology. and node feature data X The graph neural network model calculates the new features of each node by learning the connection relationship and node features between nodes. for:

[0070]

[0071] in, It is l The node representation of the layer, is the normalized adjacency matrix, It is l The learnable weights of the layers, is a nonlinear activation function; this method not only considers the characteristics of the nodes themselves, but also the relationship between the nodes, thereby obtaining a richer and deeper representation of the power grid state.

[0072] Train the graph neural network model to predict the switch combination status of the distribution network:

[0073]

[0074] In the formula, for The degree matrix of (ie Add row by row), for The inverse of the square root of a matrix is ​​obtained by right Normalize the result so that the sum of each row is 1. is the adjacency matrix with self-connection added, where is the original adjacency matrix, is the identity matrix; for l The weight matrix of the layer; this design is intended to update the feature representation of each node through the network layer, so that the node can learn and encode its contextual information in the graph structure.

[0075] For classification tasks, the prediction accuracy of the graph neural network model is measured by the cross entropy loss function:

[0076]

[0077] In the formula, represents the sample size, represents the number of categories, is a binary indicator, that is, if the sample Belongs to category If yes, it is 1, otherwise it is 0; is the model prediction sample Belongs to category probability;

[0078] For regression tasks, the difference between the predicted value and the true value of the graph neural network model is calculated by the mean square error loss function:

[0079]

[0080] In the formula, is the number of samples, and The samples are The true and predicted values.

[0081] It also includes using the test set to evaluate the trained graph neural network model, using the accuracy, precision, recall, and F1-score to quantify the evaluation results. The calculation expressions are as follows:

[0082]

[0083]

[0084]

[0085]

[0086] In the formula, is the true positive, that is, the number of positive examples that are actually positive and judged as positive by the model; is the number of true negative examples, that is, the number of negative examples that are actually negative examples and are judged as negative examples by the model; is the number of false positives, that is, the number of negative examples that are actually positive examples judged by the model; is the number of false negative examples, that is, the number of examples that are actually positive but are judged as negative examples by the model.

[0087] In one possible implementation, a graph neural network model is trained based on graph data to extract high-dimensional features of the distribution network load transfer control data set. Since the ability of graph neural networks lies in capturing the complex topological structure and dependencies between nodes in graph data, it can learn high-dimensional features that represent the state of the power grid. These features not only include the electrical properties of each node in the power grid, such as voltage, current, etc., but also include the interactions between nodes and information on network topology.

[0088] These high-dimensional features are effectively encoded through multi-layer processing of graph neural networks. The graph convolution operation of each layer updates the representation of the node, so that it not only reflects the properties of the node itself, but also incorporates the information of its neighboring nodes. This method makes the final node representation rich in the overall state information of the power grid, providing a comprehensive perspective for subsequent decision-making.

[0089] Step S2 of extracting high-dimensional features from the distribution network load transfer control data set includes:

[0090] Hypothesis Diagram By node collection and edge set Composition, Node The eigenvector of , the graph neural network has Update the representation of the node by the following expression:

[0091]

[0092] In the formula, Is a node The updated feature representation is the high-dimensional feature to be explained; Is a node Neighbor nodes j In the The feature representation of the layer, Representation Node The set of neighbor nodes of is the normalization constant; It is The weight matrix of the layer; It is a nonlinear activation function and uses ReLU (Rectified Linear Unit).

[0093] After obtaining the high-dimensional feature representation, the next key step is to optimize the learning process of these features. This includes adjusting the parameters in the graph neural network model. Therefore, the embodiment of the present invention also includes optimizing the learning process of high-dimensional features by adjusting the parameters of the graph neural network model. The graph neural network model parameters include the first The weight matrix of the layer and nonlinear activation function , and possible regularization strategies to improve the discriminative power of feature representations and the interpretability of the model.

[0094] During the optimization process, special attention was paid to improving the model’s sensitivity to different grid states, fault types, and load changes, so that the model can more accurately distinguish different grid states and make effective load transfer decisions.

[0095] In addition, by introducing advanced features such as the attention mechanism, the model's attention to key nodes and key paths can be further improved, thereby enhancing the model's prediction accuracy and interpretability. For the optimization process of feature learning, the introduction of the attention mechanism can further improve the quality of feature representation. Specifically, the embodiment of the present invention introduces an attention mechanism into the graph neural network model to adjust the graph neural network model parameters, and the attention coefficient This is calculated using the following expression:

[0096]

[0097] In the formula, Represents the connection of vectors; is the learned weight vector used to calculate the attention coefficient; Is a node and The attention coefficient between nodes The feature pair node the extent of the impact; For Node feature The encoded query vector, For Node j feature The encoded key vector, For Node k feature The encoded key vector, is the transposed matrix of the attention weight matrix, is the activation function; To get the index, For Node The set of neighbor nodes of Represents neighbor nodes;

[0098] The node update expression after adding the attention mechanism is:

[0099] .

[0100] In a possible implementation, in step S3, the knowledge distillation technology is used to train the decision tree model using the original input of the graph neural network model and the high-dimensional features extracted from the graph neural network model and the switch state prediction results. First, the knowledge transfer process from the graph neural network model to the decision tree model is defined. For the output of the graph neural network model, The goal is to train each decision tree model to output As close as possible :

[0101]

[0102] In the process of knowledge distillation, the output of the graph neural network model is used as a label to train the decision tree model. This means that the training goal of the decision tree model is not only to match the original label data, but also to match the prediction results of the graph neural network model as much as possible. This goal is achieved by minimizing the difference between the decision tree output and the graph neural network output. The embodiment of the present invention uses the mean square error loss function to minimize the difference between the decision tree model output and the graph neural network model output:

[0103]

[0104] In the formula, is the sample size, and They are The graph neural network output and decision tree output of samples.

[0105] In this way, the decision tree model learns the decision logic of the graph neural network model during the training process, and the natural interpretability of the decision tree ensures that power grid operators can easily understand the decision-making process of the model. The division criteria of each decision node and the output value of the leaf node directly correspond to the specific characteristics of the power grid state and the decision results, thereby providing power grid operators with an easy-to-understand decision basis. The method of the present invention integrates the deep learning capabilities of the graph neural network and the interpretability of the decision tree. This interpretable decision distillation process not only improves the efficiency of power grid fault response, but also improves the transparency and scientificity of decision making, thereby providing important technical support for the stable operation and efficient management of the power grid.

[0106] See also Figure 2 Another embodiment of the present invention further proposes a distribution network load transfer control system based on neural network decision distillation, comprising:

[0107] A data set construction module is used to collect distribution network data and construct a distribution network load transfer control data set;

[0108] The graph data conversion and high-dimensional feature extraction module is used to convert the distribution network load transfer control data set into graph data, where the nodes of the graph represent the elements in the power grid and the edges represent the electrical connections between the elements; the graph neural network model is trained based on the graph data to extract high-dimensional features of the distribution network load transfer control data set, obtain the switch state prediction results, and output the load transfer control strategy;

[0109] The knowledge distillation module is used to use the knowledge distillation technology to train the decision tree model using the original input of the graph neural network model and the high-dimensional features and switch state prediction results extracted from the graph neural network model, so as to minimize the difference between the output of the decision tree model and the output of the graph neural network model;

[0110] The decision-making module is used to use the trained decision tree model to match the specific characteristics of the power grid state and the decision results, and provide a decision basis for the load transfer control of the distribution network.

[0111] In response to the challenges of load transfer control in power grids, the present invention firstly constructs an accurate power grid simulation model based on the electrical properties, topological structure and equipment parameters of the power grid through power system simulation tools. This model can simulate different load change scenarios and the access or exit of distributed energy sources, and screen out key data through power flow calculation to form a comprehensive power grid status sample data set, which provides a basis for subsequent model training and verification.

[0112] Next, the power grid data is modeled as graph data, where the nodes of the graph represent the elements in the power grid and the edges represent the electrical connections between the elements. By adopting the graph neural network (GNN) technology, the present invention performs in-depth feature extraction on the graph data. The graph neural network (GNN) technology successfully extracts high-level feature representations that reflect the state of the power grid by learning the complex interactions between the elements of the power grid. These high-dimensional features not only include the electrical properties of each node in the power grid, such as voltage, current, etc., but also contain deep information about the relationships between nodes and the network topology, greatly improving the accuracy of state prediction.

[0113] In order to further improve the interpretability and reasoning speed of the model, the present invention transfers the knowledge of the graph neural network (GNN) model to a decision tree model through distillation technology. This step not only simplifies the complexity of the model, but also retains its high-precision prediction ability, so that the decision logic of the model can be intuitively displayed through visualization technology, greatly improving the transparency and credibility of the model, so that non-professional users can also easily understand it. Finally, by conducting a comprehensive performance evaluation of the distilled decision tree model, such as verification of key indicators such as accuracy and recall rate, it is proved that the model proposed in the embodiment of the present invention is highly efficient in the fields of real-time monitoring of power systems, fault diagnosis and system optimization. The present invention effectively realizes the accurate prediction and system optimization of the power grid state, and provides strong technical support for the stable operation and efficient management of the power grid.

[0114] In summary, the present invention combines graph neural network (GNN) with decision distillation technology to propose an innovative solution for load transfer control of distribution network. Its main advantages are: by modeling power grid data as graph data and using graph neural network to accurately extract high-level features of power grid state, the accuracy of state prediction is significantly improved, and the topological structure and electrical properties of the power grid are effectively considered. In addition, the present invention distills the knowledge of graph neural network model to decision tree model, which not only greatly simplifies the complexity of the model, but also significantly enhances the interpretability and reasoning speed of the model, making the decision logic intuitive and easy to understand for non-professional users, and enhancing the transparency and credibility of the model. This innovative method not only improves the stability and reliability of the distribution network, but also provides strong technical support for power grid operators, optimizes the management and operation of the power grid, and has great theoretical significance and wide application value. Furthermore, because the present invention constructs a distribution network load transfer control data set and uses graph neural network (GNN) to deeply analyze the power grid state, it can more accurately predict the operating state of the power grid. Compared with traditional power grid analysis methods, the use of graph neural network (GNN) for state prediction can consider more complex topological structures of power grids and the relationship between nodes, thereby greatly improving the accuracy of prediction. Experimental data show that the model implemented by the present invention has significant improvements in key performance indicators such as accuracy, recall rate and F1 score. On the other hand, the present invention transfers the knowledge of the graph neural network model to the decision tree model through distillation technology, which not only simplifies the complexity of the model, but also retains the high-precision prediction ability and greatly improves the interpretability of the model. The visual display of the decision tree model makes the decision logic intuitive and easy to understand for non-professional users, enhancing the transparency and credibility of the model. This provides grid operators with an easy-to-understand decision-making basis, which is conducive to improving the safety and stability of the grid. On the whole, the method of the present invention can effectively reduce unnecessary power loss and optimize the distribution network operation mode by optimizing the grid operation state prediction and load transfer decision-making process; at the same time, it can reduce the frequency of abnormal situations such as overload and voltage over-limit, prevent operation risks, reduce the operation pressure of grid equipment, and extend the service life of equipment, thereby reducing the operation and maintenance cost of the grid.

[0115] Another embodiment of the present invention further proposes an electronic device, including a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the distribution network load transfer control method based on neural network decision distillation.

[0116] Another embodiment of the present invention further proposes a computer-readable storage medium, which stores at least one instruction, and when the at least one instruction is executed by a processor, it implements the distribution network load transfer control method based on neural network decision distillation.

[0117] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals. For ease of explanation, the above content only shows the part related to the embodiment of the present invention. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium is non-temporary and can be stored in a storage device formed by various electronic devices, which can realize the execution process recorded in the method of the embodiment of the present invention.

[0118] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A distribution network load transfer control method based on neural network decision distillation, characterized in that: include: Collect distribution network data and construct distribution network load transfer control data set; The distribution network load transfer control dataset is converted into graph data, where the nodes of the graph represent the elements in the power grid and the edges represent the electrical connections between the elements; a graph neural network model is trained based on the graph data to extract high-dimensional features of the distribution network load transfer control dataset, obtain the switch state prediction results, and output the load transfer control strategy; The knowledge distillation technology is used to train the decision tree model using the original input of the graph neural network model and the high-dimensional features and switch state prediction results extracted from the graph neural network model, so as to minimize the difference between the output of the decision tree model and the output of the graph neural network model. Use the trained decision tree model to match the specific characteristics of the power grid state and the decision results, and provide a decision basis for the load transfer control of the distribution network; The step of collecting distribution network data and constructing a distribution network load transfer control data set includes collecting voltage levels, key line load parameters, and whether there is an overload or voltage over-limit situation, using the analysis results as sample features, and recording corresponding control measures and the switch combination state after load transfer as sample labels; The integrated power system analysis tool PyPSA is used with custom scripts to automatically generate and process data sets. Historical load and power generation data are used as a benchmark to dynamically adjust the load and power generation status in the power grid model by simulating different load change scenarios and the access or exit of distributed energy resources. After each simulation, power flow analysis is performed to determine the operating status of the power grid. The method also includes optimizing the learning process of high-dimensional features by adjusting the parameters of the graph neural network model, wherein the parameters of the graph neural network model include the first The weight matrix of the layer and nonlinear activation function , and possible regularization strategies, during the optimization process, improve the sensitivity of the graph neural network model to different grid states, fault types, and load changes, so that the graph neural network model can distinguish different grid states and make effective load transfer decisions; Introducing the attention mechanism into the graph neural network model to adjust the graph neural network model parameters, attention coefficient This is calculated using the following expression: In the formula, Represents the connection of vectors; is the learned weight vector used to calculate the attention coefficient; Is a node and The attention coefficient between nodes The feature pair node the extent of the impact; For Node feature The encoded query vector, For Node j feature The encoded key vector, For Node k feature The encoded key vector, is the transposed matrix of the attention weight matrix, is the activation function; To get the index, For Node The set of neighbor nodes of Represents neighbor nodes; The node update expression after adding the attention mechanism is: 。 2. According to claim 1, the method for load transfer control of distribution network based on neural network decision distillation is characterized in that: The step of converting the distribution network load transfer control data set into graph data includes converting the feature representation of each grid node into an adjacency matrix of the grid topology by the graph neural network model. and node feature data X It is calculated that the graph neural network model calculates the new features of each node by learning the connection relationship and node features between nodes. for: in, It is l The node representation of the layer, is the normalized adjacency matrix, It is l The learnable weights of the layers, is a nonlinear activation function; Train the graph neural network model to predict the switch combination status of the distribution network: In the formula, for The degree matrix of Express Add row by row, for The inverse of the square root of a matrix is ​​obtained by right Normalize the result so that the sum of each row is 1. is the adjacency matrix with self-connection added, where is the original adjacency matrix, is the identity matrix; for l The weight matrix of the layer; The prediction accuracy of the graph neural network model is measured by the cross entropy loss function: In the formula, represents the sample size, represents the number of categories, is a binary indicator, that is, if the sample Belongs to category If yes, it is 1, otherwise it is 0; is the model prediction sample Belongs to category probability; The difference between the predicted value and the true value of the graph neural network model is calculated by the mean square error loss function: In the formula, is the number of samples, and The samples are The true and predicted values.

3. The load transfer control method for distribution network based on neural network decision distillation according to claim 2 is characterized in that: It also includes using the test set to evaluate the trained graph neural network model, using accuracy, precision, recall, and F1-score to quantify the evaluation results. The calculation expressions are as follows: In the formula, is the number of true positive examples, that is, the number of positive examples that are actually positive examples and are judged as positive examples by the model; is the number of true negative examples, that is, the number of examples that are actually negative and judged as negative by the model; is the number of false positive examples, that is, the number of examples that are actually negative examples but are judged as positive examples by the model; is the number of false negative examples, that is, the number of examples that are actually positive but are judged as negative examples by the model.

4. The load transfer control method for distribution network based on neural network decision distillation according to claim 1 is characterized in that: The step of extracting high-dimensional features from the distribution network load transfer control data set based on graph data training graph neural network model includes: Hypothesis Diagram By node collection and edge set Composition, Node The eigenvector of , the graph neural network has Update the representation of the node by the following expression: In the formula, Is a node The updated feature representation is the high-dimensional feature to be explained; Is a node Neighbor nodes j In the The feature representation of the layer, Representation Node The set of neighbor nodes of is the normalization constant; It is The weight matrix of the layer; is a non-linear activation function.

5. The method for load transfer control of distribution network based on neural network decision distillation according to claim 1 is characterized in that: In the step of using the knowledge distillation technology to respectively train the decision tree model using the original input of the graph neural network model and the high-dimensional features extracted from the graph neural network model and the switch state prediction results, a knowledge transfer process from the graph neural network model to the decision tree model is defined. , through training, each decision tree model outputs near : The mean squared error loss function is used to minimize the difference between the output of the decision tree model and the output of the graph neural network model: In the formula, is the sample size, and They are The graph neural network output and decision tree output of samples.

6. A distribution network load transfer control system based on neural network decision distillation, characterized in that: include: A data set construction module is used to collect distribution network data and construct a distribution network load transfer control data set; The graph data conversion and high-dimensional feature extraction module is used to convert the distribution network load transfer control data set into graph data, where the nodes of the graph represent the elements in the power grid and the edges represent the electrical connections between the elements; the graph neural network model is trained based on the graph data to extract high-dimensional features of the distribution network load transfer control data set, obtain the switch state prediction results, and output the load transfer control strategy; The knowledge distillation module is used to use the knowledge distillation technology to train the decision tree model using the original input of the graph neural network model and the high-dimensional features and switch state prediction results extracted from the graph neural network model, so as to minimize the difference between the output of the decision tree model and the output of the graph neural network model; The decision-making module is used to match the specific characteristics of the power grid state and the decision results using the trained decision tree model, and provide a decision basis for the load transfer control of the distribution network; The step of collecting distribution network data and constructing a distribution network load transfer control data set includes collecting voltage levels, key line load parameters, and whether there is an overload or voltage over-limit situation, using the analysis results as sample features, and recording corresponding control measures and the switch combination state after load transfer as sample labels; The integrated power system analysis tool PyPSA is used with custom scripts to automatically generate and process data sets. Historical load and power generation data are used as a benchmark to dynamically adjust the load and power generation status in the power grid model by simulating different load change scenarios and the access or exit of distributed energy resources. After each simulation, power flow analysis is performed to determine the operating status of the power grid. The method also includes optimizing the learning process of high-dimensional features by adjusting the parameters of the graph neural network model, wherein the parameters of the graph neural network model include the first The weight matrix of the layer and nonlinear activation function , and possible regularization strategies, during the optimization process, improve the sensitivity of the graph neural network model to different grid states, fault types, and load changes, so that the graph neural network model can distinguish different grid states and make effective load transfer decisions; Introducing the attention mechanism into the graph neural network model to adjust the graph neural network model parameters, attention coefficient This is calculated using the following expression: In the formula, Represents the connection of vectors; is the learned weight vector used to calculate the attention coefficient; Is a node and The attention coefficient between nodes The feature pair node the extent of the impact; For Node feature The encoded query vector, For Node j feature The encoded key vector, For Node k feature The encoded key vector, is the transposed matrix of the attention weight matrix, is the activation function; To get the index, For Node The set of neighbor nodes of Represents neighbor nodes; The node update expression after adding the attention mechanism is: 。 7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, it implements the distribution network load transfer control method based on neural network decision distillation as described in any one of claims 1 to 5.