Enterprise-level micro-grid topological structure and parameter identification method, device and equipment and readable storage medium
By using graph neural networks and information gain screening technology in enterprise-level microgrids, we can identify and predict the topological structure of the microgrid, and solve the problem of low accuracy of topological information recognition in the existing technology, and achieve a more accurate and efficient microgrid Status monitoring and control.
Patent Information
- Application Number
- CN202411425170.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-07
AI Technical Summary
In the prior art, the identification accuracy of microgrid topology information is low, especially when accessing distributed energy and energy storage systems, it is difficult to obtain accurate topology information in a timely manner, resulting in confusion of user information and affecting supervision and troubleshooting.
By obtaining the historical electrical measurement data and unrighted undirected graphs of each power consumption node in the enterprise-level microgrid, using information gain to screen the target data, perform matrix processing, and train the graph neural network to obtain the pre-trained topology Structural identification model, used for topological prediction of online electrical measurement data.
It improves the accuracy of identification of microgrid topological information, enhances the ability to identify electrical parameters and phase relationships of microgrid nodes, and improves the perception, optimization and control capabilities of microgrid.
Smart Images

Figure CN119397409A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric power technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for enterprise-level microgrid topology structure and parameter identification. Background Art
[0002] Micro-Grid refers to a small power generation and distribution system composed of distributed generation (DG) units, energy storage devices, loads, control devices, etc. The topological structure of the micro-grid is the basis for its safe, stable and efficient operation. Accurate topological information is the basis for various analysis and calculations such as micro-grid state estimation, fault location, power outage analysis, network reconstruction, etc., which is of great significance to the safe operation, flexible control and economic planning of the micro-grid.
[0003] Most of the microgrid topology management methods in related technologies use the ledger method. When dealing with the access of new systems such as distributed energy and distributed energy storage, there is a problem of being unable to obtain more accurate topology information in a timely manner, which can easily cause confusion in the original user information and is not conducive to supervision and troubleshooting.
[0004] Therefore, there is a problem in the related art that the recognition accuracy of the topology information of the microgrid is low. Summary of the invention
[0005] Based on this, it is necessary to provide an enterprise-level microgrid topology structure and parameter identification method, device, computer equipment, computer-readable storage medium and computer program product that can improve the recognition accuracy of microgrid topology information in response to the above technical problems.
[0006] In a first aspect, the present application provides an enterprise-level microgrid topology structure and parameter identification method, including:
[0007] Acquire multiple historical electrical measurement data corresponding to each power consumption node in the enterprise-level microgrid, and acquire an unweighted undirected graph representing the topological structure of the enterprise-level microgrid; the unweighted undirected graph has each of the power consumption nodes as a node, and the connection relationship between each of the power consumption nodes as an edge of the node;
[0008] According to the information gain of each of the historical electrical measurement data corresponding to each of the power consumption nodes, the target historical electrical measurement data corresponding to each of the power consumption nodes is screened out; the importance of the target historical electrical measurement data to the topology identification process meets the preset conditions;
[0009] Matrixing the target historical electrical measurement data corresponding to each of the power consumption nodes to obtain a historical measurement data matrix corresponding to the enterprise-level microgrid;
[0010] The graph neural network to be trained is trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topology structure identification model; the pre-trained topology structure identification model is used to output a predicted adjacency matrix representing the topology structure of the microgrid to be identified based on the input online electrical measurement data of the microgrid to be identified.
[0011] In one embodiment, the training of the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topological structure recognition model includes:
[0012] The historical measurement data matrix and the unweighted undirected graph are input into the graph neural network to be trained, and a prediction adjacency matrix corresponding to the enterprise-level microgrid is output; the prediction adjacency matrix of the enterprise-level microgrid is determined by the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph, by fitting the graph-perceived implicit state of each node;
[0013] Training the graph neural network to be trained according to a difference between a predicted adjacency matrix corresponding to the enterprise-level microgrid and an actual adjacency matrix corresponding to the unweighted undirected graph;
[0014] When the trained graph neural network meets the preset training conditions, the pre-trained topological structure recognition model is obtained.
[0015] In one embodiment, the inputting the historical measurement data matrix and the unweighted undirected graph into the graph neural network to be trained, and outputting the predicted adjacency matrix corresponding to the enterprise-level microgrid, includes:
[0016] The graph neural network to be trained determines the node features of each node, the node features of the neighboring nodes of each node, and the edge features of the adjacent edges of each node according to the historical measurement data matrix and the unweighted undirected graph; wherein the node features are determined based on the target historical electrical measurement data corresponding to the node; and the edge features are determined based on the connection relationship between the nodes in the unweighted undirected graph;
[0017] The graph-aware implicit state of each of the nodes is determined according to the node features of each of the nodes, the node features of the neighboring nodes of each of the nodes, and the edge features of the adjacent edges of each of the nodes.
[0018] In one embodiment, determining the graph-aware implicit state of each node according to the node features of each node, the node features of the neighboring nodes of each node, and the edge features of the adjacent edges of each node includes:
[0019] The graph neural network iteratively updates the graph-perceived implicit states of all the nodes to fit the state update function of the implicit state; the template learned or fitted by the state update function of the implicit state is to obtain the graph-perceived implicit state of each of the nodes;
[0020] Among them, the update method is:
[0021] ;
[0022] in, is the state update function of the implicit state, For Node The node characteristics of For Node The edge features of adjacent edges, For Node The neighbor nodes of The graph perceives the implicit state at each moment, For Node The node characteristics of the neighbor nodes, For Node The neighbor nodes of The graph perceives the implicit state at each moment.
[0023] In one embodiment, the step of filtering out target historical electrical measurement data corresponding to each power consumption node according to the information gain of each historical electrical measurement data corresponding to each power consumption node includes:
[0024] Calculating the information gain of the split sub-nodes of each of the historical electrical measurement data corresponding to each of the power consumption nodes through a decision tree to determine the importance of each of the historical electrical measurement data corresponding to each of the power consumption nodes for the topology identification process; specifically including:
[0025] For each of the power consumption nodes, all the corresponding historical electrical measurement data are traversed, and the historical electrical measurement data with the largest information gain is selected as the split measurement by calculating the information gain. The information gain calculation formula is:
[0026] ;
[0027] in, is the information gain, is the optimal solution of the left decision subtree, is the optimal solution of the right decision subtree, is the optimal solution when there is no split, To adjust the parameters, When , the decision tree stops splitting;
[0028] All decision trees are traversed, and the information gains calculated when each of the historical electrical measurement data is used as split measurement are weighted and summed to determine the importance of each of the historical electrical measurement data for the topology identification process.
[0029] In one embodiment, the method further comprises:
[0030] Acquire online electrical measurement data corresponding to each power consumption node in the microgrid to be identified;
[0031] According to the information gain of the online electrical measurement data corresponding to each power node in the microgrid to be identified, the target online electrical measurement data corresponding to each power node in the microgrid to be identified is screened out; the importance of the target online electrical measurement data to the topology identification process meets the preset condition;
[0032] Matrixing each of the target online electrical measurement data to obtain an online measurement data matrix corresponding to the microgrid to be identified;
[0033] The online measurement data matrix is input into the pre-trained topology structure identification model, and a predicted adjacency matrix representing the topology structure of the microgrid to be identified is output.
[0034] In a second aspect, the present application also provides an enterprise-level microgrid topology structure and parameter identification device, including:
[0035] An acquisition module is used to acquire a plurality of historical electrical measurement data corresponding to each power consumption node in the enterprise-level microgrid, and to acquire an unweighted undirected graph representing the topological structure of the enterprise-level microgrid; the unweighted undirected graph has each of the power consumption nodes as a node, and the connection relationship between each of the power consumption nodes as an edge of the node;
[0036] A screening module, for screening out target historical electrical measurement data corresponding to each power consumption node according to the information gain of each of the historical electrical measurement data corresponding to each power consumption node; the importance of the target historical electrical measurement data to the topology identification process meets a preset condition;
[0037] A matrixing module, used for matrixing the target historical electrical measurement data corresponding to each of the power consumption nodes to obtain a historical measurement data matrix corresponding to the enterprise-level microgrid;
[0038] A training module is used to train the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topology structure identification model; the pre-trained topology structure identification model is used to output a predicted adjacency matrix representing the topology structure of the microgrid to be identified according to the input online electrical measurement data of the microgrid to be identified.
[0039] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0041] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0042] The above-mentioned enterprise-level microgrid topology structure and parameter identification method, device, computer equipment, computer-readable storage medium and computer program product obtain multiple historical electrical measurement data corresponding to each power node in the enterprise-level microgrid, and obtain an unweighted undirected graph representing the topology structure of the enterprise-level microgrid; the unweighted undirected graph has each power node as a node and the connection relationship between each power node as the edge of the node; according to the information gain of each historical electrical measurement data corresponding to each power node, the target historical electrical measurement data corresponding to each power node is screened out; the importance of the target historical electrical measurement data for the topology identification process meets the preset conditions; the target historical electrical measurement data corresponding to each power node is matrixed to obtain the historical measurement data matrix corresponding to the enterprise-level microgrid; the graph neural network to be trained is trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topology structure identification model; the pre-trained topology structure identification model is used to output a predicted adjacency matrix representing the topology structure of the microgrid to be identified based on the input online electrical measurement data of the microgrid to be identified.
[0043] In this way, the topological structure of the enterprise microgrid is characterized based on an unweighted undirected graph, which contains the power nodes in the enterprise microgrid and the connections between each power node. The electrical measurement data corresponding to each power node in the enterprise microgrid is matrixed to obtain the historical measurement data matrix corresponding to the enterprise-level microgrid. The graph neural network to be trained is trained through the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topological structure identification model, wherein the adjacency matrix of the unweighted undirected graph can reflect the specific connections between the nodes in the graph. Therefore, the pre-trained topological structure identification model can learn the end-to-end mapping of the electrical parameters of each node to the graph adjacency matrix, so that the pre-trained topological structure identification model can output the predicted adjacency matrix representing the topological structure of the microgrid to be identified according to the input online electrical measurement data of the microgrid to be identified, and the topological structure identification process is converted into the solution of the adjacency matrix. This method of solving the topological structure of a microgrid based on a graph neural network can achieve end-to-end mapping of the electrical parameters of each node to the graph adjacency matrix, and then identify the phase and upstream and downstream relationships of each node in the microgrid. While speeding up the efficiency of microgrid topological structure and parameter identification, it can more accurately identify the topological information of the microgrid, laying the foundation for the perception, optimization and control of the microgrid. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A schematic diagram of a process of identifying a method for topological structure and parameters of an enterprise-level microgrid in an embodiment;
[0046] Figure 2 is a schematic diagram of a building microgrid topology structure in an embodiment;
[0047] Figure 3 A flowchart of yet another enterprise-level microgrid topology structure and parameter identification method in an embodiment;
[0048] Figure 4 A schematic diagram of a flow chart of an enterprise-level microgrid topology structure and parameter identification method in another embodiment;
[0049] Figure 5 A structural block diagram of an enterprise-level microgrid topology structure and parameter identification device in an embodiment;
[0050] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0053] In one embodiment, Figure 1 As shown, a method for identifying the topology and parameters of an enterprise-level microgrid is provided. This embodiment uses the method applied to a computer device as an example. It can be understood that the computer device can be a terminal, a server, or a system including a terminal and a server. In this embodiment, the method includes the following steps:
[0054] Step S110, obtaining a plurality of historical electrical measurement data corresponding to each power consumption node in the enterprise-level microgrid, and obtaining an unweighted undirected graph representing the topological structure of the enterprise-level microgrid.
[0055] The historical electrical measurement data may be historical active power data of the node.
[0056] The unweighted undirected graph has each electricity consumption node as a node, and the connection relationship between each electricity consumption node as the edge of the node.
[0057] The power consumption node may refer to the power consumption load in the enterprise-level microgrid.
[0058] In order to facilitate understanding by those skilled in the art, Figure 2 A schematic diagram of a building microgrid topology structure is provided, wherein L is the live wire and N is the neutral wire.
[0059] In a specific implementation, the computer device can obtain a sample set of multiple historical electrical measurement data corresponding to each power node in the enterprise-level microgrid, and obtain an unweighted undirected graph representing the topological structure of the enterprise-level microgrid. ,in:
[0060] is the node set of the unweighted undirected graph (N represents the number of nodes),
[0061] is the edge set of the unweighted undirected graph, For Node The connection between.
[0062] For the graph There is an adjacency matrix:
[0063] ;
[0064] The specific meaning is node If the connection relationship between nodes Connected between, ; If the node There is no connection between them. .
[0065] Step S120 , filtering out target historical electrical measurement data corresponding to each power consumption node according to the information gain of each historical electrical measurement data corresponding to each power consumption node.
[0066] Among them, the importance of the target historical electrical measurement data to the topology identification process meets the preset conditions.
[0067] In a specific implementation, the computer device can filter out the target historical electrical measurement data corresponding to each power consumption node according to the information gain of each historical electrical measurement data corresponding to each power consumption node. Specifically, the computer device can determine the importance of each historical electrical measurement data corresponding to each power consumption node for the topology identification process according to the information gain of each historical electrical measurement data corresponding to each power consumption node, and filter out the historical electrical measurement data with an importance greater than a preset threshold for each power consumption node, for example, filter out n historical electrical measurement data with a higher importance for each power consumption node as the target historical electrical measurement data of the power consumption node.
[0068] Among them, in the process of screening out the target historical electrical measurement data corresponding to each power consumption node according to the information gain of each historical electrical measurement data corresponding to each power consumption node, the computer device can calculate the information gain of the split sub-nodes of each historical electrical measurement data corresponding to each power consumption node through a decision tree to determine the importance of each historical electrical measurement data corresponding to each power consumption node for the topology identification process.
[0069] In practical applications, XGBoost (eXtreme Gradient Boosting) can be used as a feature selection algorithm to classify historical electrical measurement data. The information gain of the split sub-nodes of each historical electrical measurement data corresponding to each power consumption node is calculated through a decision tree to determine the importance of the historical electrical measurement data for the topology identification process.
[0070] Assume an additive ensemble model consisting of K decision trees:
[0071] ;
[0072] in For sample The weight of the leaf node corresponding to the kth decision tree is, For each decision tree sample pair The predicted value is obtained by adding up the scores.
[0073] For the kth decision tree, its loss function is:
[0074] ;
[0075] in For the current model sample Target value of For sample The training residual of It is a penalty function that reflects the complexity of the model. The smaller the complexity, the stronger the generalization ability of the decision tree. is the total number of samples.
[0076] For each power consumption node, the computer device can traverse all the corresponding historical electrical measurement data, and select the historical electrical measurement data with the largest information gain as the split measurement by calculating the information gain. The information gain calculation formula is:
[0077] ;
[0078] in, is the information gain, is the optimal solution of the left decision subtree, is the optimal solution of the right decision subtree, is the optimal solution when there is no split, To adjust the parameters, When , the decision tree stops splitting;
[0079] The computer device can traverse K decision trees, and for each power consumption node, perform weighted summation of the information gain calculated when each historical electrical measurement data is used as the split measurement, so as to determine the importance of each historical electrical measurement data for the topology identification process for each power consumption node.
[0080] Step S130 , matrixing the target historical electrical measurement data corresponding to each power consumption node to obtain a historical measurement data matrix corresponding to the enterprise-level microgrid.
[0081] In a specific implementation, the computer device can matrix the target historical electrical measurement data corresponding to each power consumption node to obtain the historical measurement data matrix corresponding to the enterprise-level microgrid.
[0082] For example, taking the electrical measurement data as active power data, the target historical electrical measurement data (target historical active power data) after each power consumption node is selected is matrixed, and there are:
[0083] ;
[0084] in, represents the historical measurement data matrix consisting of the target historical active power data, Indicates the target historical active power measurement value of node m at time n.
[0085] Step S140, training the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topological structure recognition model.
[0086] The pre-trained topology structure identification model is used to output a predicted adjacency matrix representing the topology structure of the microgrid to be identified based on the input online electrical measurement data of the microgrid to be identified.
[0087] In some embodiments, when a computer device trains a graph neural network to be trained based on a historical measurement data matrix and an unweighted undirected graph to obtain a pre-trained topology structure recognition model, the computer device can input the historical measurement data matrix and the unweighted undirected graph into the graph neural network to be trained, and output a predicted adjacency matrix corresponding to the enterprise-level microgrid.
[0088] Among them, the predicted adjacency matrix of the enterprise-level microgrid is determined by the graph neural network to be trained based on the historical measurement data matrix and the unweighted undirected graph, fitting the graph-aware implicit state of each node.
[0089] In this way, the computer equipment can train the graph neural network to be trained based on the difference between the predicted adjacency matrix corresponding to the enterprise-level microgrid and the actual adjacency matrix corresponding to the unweighted undirected graph; when the trained graph neural network meets the preset training conditions, a pre-trained topology structure recognition model is obtained.
[0090] Among them, in some embodiments, in the process of inputting the historical measurement data matrix and the unweighted undirected graph into the graph neural network to be trained and outputting the predicted adjacency matrix corresponding to the enterprise-level microgrid, the graph neural network to be trained determines the node characteristics of each node, the node characteristics of each node's neighbor nodes, and the edge characteristics of each node's adjacent edges according to the historical measurement data matrix and the unweighted undirected graph; wherein the node characteristics are determined based on the target historical electrical measurement data corresponding to the node; the edge characteristics are determined based on the connection relationship between the nodes in the unweighted undirected graph; the graph-perceived implicit state of each node is determined according to the node characteristics of each node, the node characteristics of each node's neighbor nodes, and the edge characteristics of each node's adjacent edges.
[0091] Among them, the characteristic of the edge is the connection property between nodes, which includes connected and unconnected.
[0092] In some embodiments, in the process of determining the graph-aware implicit state of each node according to the node features of each node, the node features of each node's neighboring nodes, and the edge features of each node's adjacent edges, the computer device may use a graph neural network to fit electrical parameters to a complex function f of the topological structure, and the template learned or fitted is to obtain the graph-aware implicit state of each node. This means that for each node, the implicit state of the graph contains information from neighboring nodes.
[0093] In practical applications, the complex function f can be a state update function of the implicit state. The graph neural network iteratively updates the graph-aware implicit state of all nodes to fit the state update function of the implicit state. The update method is:
[0094] ;
[0095] in, is the state update function of the implicit state, For Node The node characteristics of For Node The edge features of adjacent edges, For Node The neighbor nodes of The graph perceives the implicit state at each moment, For Node The node characteristics of the neighbor nodes, For Node The neighbor nodes of The graph perceives the implicit state at each moment.
[0096] In other embodiments, an evaluation system for the identification results can also be constructed, and the number of elements of the actual adjacency matrix of the unweighted undirected graph obtained by defining the topological structure of the enterprise-level microgrid identified in the actual situation should be: Finally, the number of elements in the prediction adjacency matrix corresponding to the enterprise-level microgrid obtained by the identification result is , that is, the topological identification completeness:
[0097] ;
[0098] Define the number of correctly identified elements in the final identification result as , that is, the topology identification accuracy is:
[0099] .
[0100] In other embodiments, Figure 3 As shown, a flow chart of another enterprise-level microgrid topology structure and parameter identification method is provided, including the following steps:
[0101] Step S310, obtaining online electrical measurement data corresponding to each power node in the microgrid to be identified.
[0102] The microgrid to be identified may be an enterprise-level microgrid whose topology structure needs to be identified.
[0103] Among them, the electrical measurement data of the microgrid to be identified can be collected based on the remote real-time data collection device to obtain online electrical measurement data.
[0104] Among them, the online electrical measurement data may be active power data.
[0105] Step S320 , based on the information gain of the online electrical measurement data corresponding to each power node in the microgrid to be identified, the target online electrical measurement data corresponding to each power node in the microgrid to be identified is screened out.
[0106] Among them, the importance of the target online electrical measurement data to the topology identification process meets the preset conditions.
[0107] Among them, the method of filtering electrical measurement data according to information gain can refer to the step of filtering out target historical electrical measurement data corresponding to each power consumption node according to the information gain of each historical electrical measurement data corresponding to each power consumption node, which will not be repeated here.
[0108] In practical applications, n target online electrical measurement data can be screened out for each power consumption node in the microgrid to be identified.
[0109] Step S330 , matrixing each target online electrical measurement data to obtain an online measurement data matrix corresponding to the microgrid to be identified.
[0110] Among them, the matrixing method can refer to the steps of matrixing the target historical electrical measurement data corresponding to each power consumption node to obtain the historical measurement data matrix corresponding to the enterprise-level microgrid, which will not be repeated here.
[0111] Step S340 , inputting the online measurement data matrix into the pre-trained topology structure identification model, and outputting a predicted adjacency matrix representing the topology structure of the microgrid to be identified.
[0112] In the specific implementation, the computer equipment can input the online measurement data matrix into the pre-trained topology structure identification model, and output the predicted adjacency matrix representing the topology structure of the microgrid to be identified. In this way, the end-to-end mapping of the electrical parameters of each node to the graph adjacency matrix can be achieved. This method of solving the topology structure of the microgrid based on the graph neural network can speed up the speed and accuracy of the microgrid topology structure and parameter identification.
[0113] In the above-mentioned enterprise-level microgrid topology structure and parameter identification method, multiple historical electrical measurement data corresponding to each power node in the enterprise-level microgrid are obtained, and an unweighted undirected graph representing the topology structure of the enterprise-level microgrid is obtained; the unweighted undirected graph has each power node as a node, and the connection relationship between each power node is the edge of the node; according to the information gain of each historical electrical measurement data corresponding to each power node, the target historical electrical measurement data corresponding to each power node is screened out; the importance of the target historical electrical measurement data for the topology identification process meets the preset conditions; the target historical electrical measurement data corresponding to each power node is matrixed to obtain the historical measurement data matrix corresponding to the enterprise-level microgrid; the graph neural network to be trained is trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topology structure identification model; the pre-trained topology structure identification model is used to output a predicted adjacency matrix representing the topology structure of the microgrid to be identified based on the input online electrical measurement data of the microgrid to be identified.
[0114] In this way, the topological structure of the enterprise microgrid is characterized based on an unweighted undirected graph, which contains the power nodes in the enterprise microgrid and the connections between each power node. The electrical measurement data corresponding to each power node in the enterprise microgrid is matrixed to obtain the historical measurement data matrix corresponding to the enterprise-level microgrid. The graph neural network to be trained is trained through the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topological structure identification model, wherein the adjacency matrix of the unweighted undirected graph can reflect the specific connections between the nodes in the graph. Therefore, the pre-trained topological structure identification model can learn the end-to-end mapping of the electrical parameters of each node to the graph adjacency matrix, so that the pre-trained topological structure identification model can output the predicted adjacency matrix representing the topological structure of the microgrid to be identified according to the input online electrical measurement data of the microgrid to be identified, and the topological structure identification process is converted into the solution of the adjacency matrix. This method of solving the topological structure of a microgrid based on a graph neural network can achieve end-to-end mapping of the electrical parameters of each node to the graph adjacency matrix, and then identify the phase and upstream and downstream relationships of each node in the microgrid. While speeding up the efficiency of microgrid topological structure and parameter identification, it can more accurately identify the topological information of the microgrid, laying the foundation for the perception, optimization and control of the microgrid.
[0115] In another embodiment, Figure 4 As shown, a method for identifying the topology and parameters of an enterprise-level microgrid is provided, which is described by taking the method applied to a computer device as an example, and includes the following steps:
[0116] Step S402, obtaining a plurality of historical electrical measurement data corresponding to each power consumption node in the enterprise-level microgrid, and obtaining an unweighted undirected graph representing the topological structure of the enterprise-level microgrid.
[0117] Step S404 , filtering out target historical electrical measurement data corresponding to each power consumption node according to the information gain of each historical electrical measurement data corresponding to each power consumption node.
[0118] Step S406 , matrixing the target historical electrical measurement data corresponding to each power consumption node to obtain a historical measurement data matrix corresponding to the enterprise-level microgrid.
[0119] Step S408, inputting the historical measurement data matrix and the unweighted undirected graph into the graph neural network to be trained, and outputting the predicted adjacency matrix corresponding to the enterprise-level microgrid.
[0120] Step S410: training the graph neural network to be trained according to the difference between the predicted adjacency matrix corresponding to the enterprise-level microgrid and the actual adjacency matrix corresponding to the unweighted undirected graph.
[0121] Step S412: When the trained graph neural network meets the preset training conditions, a pre-trained topological structure recognition model is obtained.
[0122] Step S414, obtaining online electrical measurement data corresponding to each power node in the microgrid to be identified.
[0123] Step S416 , based on the information gain of the online electrical measurement data corresponding to each power node in the microgrid to be identified, the target online electrical measurement data corresponding to each power node in the microgrid to be identified is screened out.
[0124] Step S418, matrixing each target online electrical measurement data to obtain an online measurement data matrix corresponding to the microgrid to be identified.
[0125] Step S420 , inputting the online measurement data matrix into the pre-trained topology structure identification model, and outputting a predicted adjacency matrix representing the topology structure of the microgrid to be identified.
[0126] It should be noted that the specific limitations of the above steps can refer to the specific limitations of an enterprise-level microgrid topology structure and parameter identification method mentioned above.
[0127] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0128] Based on the same inventive concept, the embodiment of the present application also provides an enterprise-level microgrid topology structure and parameter identification device for implementing the enterprise-level microgrid topology structure and parameter identification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the enterprise-level microgrid topology structure and parameter identification device provided below can refer to the limitations of the enterprise-level microgrid topology structure and parameter identification method above, and will not be repeated here.
[0129] In an exemplary embodiment, Figure 5As shown, an enterprise-level microgrid topology structure and parameter identification device is provided, including: an acquisition module 510, a screening module 520, a matrix module 530 and a training module 540, wherein:
[0130] The acquisition module 510 is used to obtain multiple historical electrical measurement data corresponding to each power consumption node in the enterprise-level microgrid, and to obtain an unweighted undirected graph representing the topological structure of the enterprise-level microgrid; the unweighted undirected graph has each of the power consumption nodes as a node, and the connection relationship between each of the power consumption nodes as an edge of the node.
[0131] The screening module 520 is used to screen out the target historical electrical measurement data corresponding to each power consumption node according to the information gain of each historical electrical measurement data corresponding to each power consumption node; the importance of the target historical electrical measurement data to the topology identification process meets the preset conditions.
[0132] The matrixing module 530 is used to matrix the target historical electrical measurement data corresponding to each of the power consumption nodes to obtain a historical measurement data matrix corresponding to the enterprise-level microgrid.
[0133] The training module 530 is used to train the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topology structure identification model; the pre-trained topology structure identification model is used to output a predicted adjacency matrix representing the topology structure of the microgrid to be identified based on the input online electrical measurement data of the microgrid to be identified.
[0134] In one embodiment, the training module 530 is specifically used to input the historical measurement data matrix and the unweighted undirected graph into the graph neural network to be trained, and output the predicted adjacency matrix corresponding to the enterprise-level microgrid; the predicted adjacency matrix of the enterprise-level microgrid is determined by the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph, by fitting the graph-perceived implicit state of each node; the graph neural network to be trained is trained according to the difference between the predicted adjacency matrix corresponding to the enterprise-level microgrid and the actual adjacency matrix corresponding to the unweighted undirected graph; when the trained graph neural network meets the preset training conditions, the pre-trained topological structure recognition model is obtained.
[0135] In one embodiment, the training module 530 is specifically used for the graph neural network to be trained to determine the node characteristics of each of the nodes, the node characteristics of each of the node's neighbor nodes, and the edge characteristics of each of the node's adjacent edges according to the historical measurement data matrix and the unweighted undirected graph; wherein the node characteristics are determined based on the target historical electrical measurement data corresponding to the node; the edge characteristics are determined based on the connection relationship between the nodes in the unweighted undirected graph; and the graph-perceived implicit state of each of the nodes is determined based on the node characteristics of each of the node's neighbor nodes, and the edge characteristics of each of the node's adjacent edges.
[0136] In one embodiment, the training module 530 is specifically used for the graph neural network to iteratively update the graph-perceived implicit states of all the nodes to fit the state update function of the implicit state; the template learned or fitted by the state update function of the implicit state is to obtain the graph-perceived implicit state of each of the nodes; wherein the updating method is:
[0137] The update method is:
[0138] ;
[0139] in, is the state update function of the implicit state, For Node The node characteristics of For Node The edge features of adjacent edges, For Node The neighbor nodes of The graph perceives the implicit state at each moment, For Node The node characteristics of the neighbor nodes, For Node The neighbor nodes of The graph perceives the implicit state at each moment.
[0140] In one embodiment, the screening module 520 is specifically used to calculate the information gain of the split sub-nodes of each of the historical electrical measurement data corresponding to each of the power consumption nodes through a decision tree to determine the importance of each of the historical electrical measurement data corresponding to each of the power consumption nodes for the topology identification process; specifically comprising: for each of the power consumption nodes, traversing all the corresponding historical electrical measurement data, and selecting the historical electrical measurement data with the largest information gain as the split measurement by calculating the information gain, and the information gain calculation formula is:
[0141] ;
[0142] in, is the information gain, is the optimal solution of the left decision subtree, is the optimal solution of the right decision subtree, is the optimal solution when there is no split, To adjust the parameters, When , the decision tree stops splitting; traverse all decision trees, and use each of the historical electrical measurement data as the information gain calculated when splitting the measurement for weighted summation to determine the importance of each of the historical electrical measurement data for the topology identification process.
[0143] In one embodiment, the device also includes: an identification module, used to obtain online electrical measurement data corresponding to each power node in the microgrid to be identified; based on the information gain of the online electrical measurement data corresponding to each power node in the microgrid to be identified, screening out the target online electrical measurement data corresponding to each power node in the microgrid to be identified; the importance of the target online electrical measurement data to the topology identification process meets the preset conditions; matrixing each of the target online electrical measurement data to obtain an online measurement data matrix corresponding to the microgrid to be identified; inputting the online measurement data matrix into the pre-trained topology structure identification model, and outputting a predicted adjacency matrix representing the topological structure of the microgrid to be identified.
[0144] Each module in the above-mentioned enterprise-level microgrid topology structure and parameter identification device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0145] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store model parameter data of a pre-trained topology structure identification model. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying the topology and parameters of an enterprise-level microgrid is implemented.
[0146] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0147] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0148] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0149] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0150] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0151] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0152] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0153] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for identifying enterprise-level microgrid topology and parameters, characterized in that: The method comprises: Acquire multiple historical electrical measurement data corresponding to each power consumption node in the enterprise-level microgrid, and acquire an unweighted undirected graph representing the topological structure of the enterprise-level microgrid; the unweighted undirected graph has each of the power consumption nodes as a node, and the connection relationship between each of the power consumption nodes as an edge of the node; According to the information gain of each of the historical electrical measurement data corresponding to each of the power consumption nodes, the target historical electrical measurement data corresponding to each of the power consumption nodes is screened out; the importance of the target historical electrical measurement data to the topology identification process meets the preset conditions; Matrixing the target historical electrical measurement data corresponding to each of the power consumption nodes to obtain a historical measurement data matrix corresponding to the enterprise-level microgrid; The graph neural network to be trained is trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topology structure identification model; the pre-trained topology structure identification model is used to output a predicted adjacency matrix representing the topology structure of the microgrid to be identified based on the input online electrical measurement data of the microgrid to be identified.
2. The method according to claim 1, characterized in that The method of training the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topological structure recognition model includes: The historical measurement data matrix and the unweighted undirected graph are input into the graph neural network to be trained, and a prediction adjacency matrix corresponding to the enterprise-level microgrid is output; the prediction adjacency matrix of the enterprise-level microgrid is determined by the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph, by fitting the graph-perceived implicit state of each node; Training the graph neural network to be trained according to a difference between a predicted adjacency matrix corresponding to the enterprise-level microgrid and an actual adjacency matrix corresponding to the unweighted undirected graph; When the trained graph neural network meets the preset training conditions, the pre-trained topological structure recognition model is obtained.
3. The method according to claim 2, characterized in that The step of inputting the historical measurement data matrix and the unweighted undirected graph into the graph neural network to be trained, and outputting a prediction adjacency matrix corresponding to the enterprise-level microgrid, includes: The graph neural network to be trained determines the node features of each node, the node features of the neighboring nodes of each node, and the edge features of the adjacent edges of each node according to the historical measurement data matrix and the unweighted undirected graph; wherein the node features are determined based on the target historical electrical measurement data corresponding to the node; and the edge features are determined based on the connection relationship between the nodes in the unweighted undirected graph; The graph-aware implicit state of each of the nodes is determined according to the node features of each of the nodes, the node features of the neighboring nodes of each of the nodes, and the edge features of the adjacent edges of each of the nodes.
4. The method according to claim 3, characterized in that Determining the graph-aware implicit state of each of the nodes according to the node features of each of the nodes, the node features of the neighboring nodes of each of the nodes, and the edge features of the adjacent edges of each of the nodes includes: The graph neural network iteratively updates the graph-perceived implicit states of all the nodes to fit the state update function of the implicit state; the template learned or fitted by the state update function of the implicit state is to obtain the graph-perceived implicit state of each of the nodes; The update method is: ; in, is the state update function of the implicit state, For Node The node characteristics of For Node The edge features of adjacent edges, For Node The neighbor nodes of The graph perceives the implicit state at each moment, For Node The node characteristics of the neighbor nodes, For Node The neighbor nodes of The graph perceives the implicit state at each moment.
5. The method according to claim 1, characterized in that The step of filtering out target historical electrical measurement data corresponding to each power consumption node according to the information gain of each of the historical electrical measurement data corresponding to each power consumption node comprises: Calculating the information gain of the split sub-nodes of each of the historical electrical measurement data corresponding to each of the power consumption nodes through a decision tree to determine the importance of each of the historical electrical measurement data corresponding to each of the power consumption nodes for the topology identification process; specifically including: For each of the power consumption nodes, all the corresponding historical electrical measurement data are traversed, and the historical electrical measurement data with the largest information gain is selected as the split measurement by calculating the information gain. The information gain calculation formula is: ; in, is the information gain, is the optimal solution of the left decision subtree, is the optimal solution of the right decision subtree, is the optimal solution when there is no split, To adjust the parameters, When , the decision tree stops splitting; All decision trees are traversed, and the information gains calculated when each of the historical electrical measurement data is used as split measurement are weighted and summed to determine the importance of each of the historical electrical measurement data for the topology identification process.
6. The method according to claim 1, characterized in that The method further comprises: Acquire online electrical measurement data corresponding to each power consumption node in the microgrid to be identified; According to the information gain of the online electrical measurement data corresponding to each power node in the microgrid to be identified, the target online electrical measurement data corresponding to each power node in the microgrid to be identified is screened out; the importance of the target online electrical measurement data to the topology identification process meets the preset condition; Matrixing each of the target online electrical measurement data to obtain an online measurement data matrix corresponding to the microgrid to be identified; The online measurement data matrix is input into the pre-trained topology structure identification model, and a predicted adjacency matrix representing the topology structure of the microgrid to be identified is output.
7. An enterprise-level microgrid topology structure and parameter identification device, characterized in that: The device comprises: An acquisition module is used to acquire a plurality of historical electrical measurement data corresponding to each power consumption node in the enterprise-level microgrid, and to acquire an unweighted undirected graph representing the topological structure of the enterprise-level microgrid; the unweighted undirected graph has each of the power consumption nodes as a node, and the connection relationship between each of the power consumption nodes as an edge of the node; A screening module, for screening out target historical electrical measurement data corresponding to each power consumption node according to the information gain of each of the historical electrical measurement data corresponding to each power consumption node; the importance of the target historical electrical measurement data to the topology identification process meets a preset condition; A matrixing module, used for matrixing the target historical electrical measurement data corresponding to each of the power consumption nodes to obtain a historical measurement data matrix corresponding to the enterprise-level microgrid; A training module is used to train the graph neural network to be trained according to the historical measurement data matrix and the unweighted undirected graph to obtain a pre-trained topology structure identification model; the pre-trained topology structure identification model is used to output a predicted adjacency matrix representing the topology structure of the microgrid to be identified according to the input online electrical measurement data of the microgrid to be identified.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.