Graph theory-based power grid topology modeling method, computer equipment and system
By setting up a different scale in a large -scale grid, analyzing the topology vector and similarity, screening and dividing the neighboring domain and constructing the second topological chart structure, solving the problem of poor topological optimization effects in the existing technology in the existing technology. Efficient grid analysis and processing.
Patent Information
- Application Number
- CN202411483282.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The prior art has poor optimization effect on the topological structure of large power grids, resulting in a large amount of computing resources still required during topological analysis.
By setting the neighborhood ranges at different scales, obtain the topological vectors of each node at different scales, analyze the similarity between adjacent elements to determine the segmentation point and segmentation effect, filter out the segmentation neighborhood, and perform segmentation under the segmentation neighborhood Construct a second topological graph structure for node classification.
It reduces the calculation amount of power grid topological analysis, while ensuring the richness of the model's information, improves the analysis and processing efficiency of smart grids, and can analyze the appropriate scale according to the adaptive requirements of analysis needs.
Smart Images

Figure CN119358182A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid technology, and in particular to a graph theory-based grid topology modeling method, computer equipment and system. Background Art
[0002] Grid topology analysis is one of the basic technologies in the process of power system simulation and analysis and calculation. The topology analysis model is constructed through the power equipment model and the connection relationship model. Graph theory and graph calculation methods can abstract the grid structure into a graph structure for grid topology analysis. For example, the publication number CN113051694B proposes a grid topology modeling method based on graph theory. This method merges the vertices and connected edges of line-type devices to establish a mapping relationship between the switch state and the segment connectivity state for switch-type devices, thereby reducing the number of vertices and edges in the graph structure, effectively reducing the amount of calculation for grid topology analysis, and improving the efficiency of grid analysis. Although the prior art has optimized and simplified the grid graph structure to a certain extent, for large-scale power grids, the simplified graph structure still contains a large number of nodes and edges, and a large amount of computing resources are still required for topology analysis when performing topology analysis, that is, the prior art has poor optimization effect on the topological structure of large-scale power grids. Summary of the invention
[0003] In order to solve the technical problem that the prior art has poor optimization effect on the topological structure of a large power grid, the purpose of the present invention is to provide a power grid topology modeling method, computer equipment and system based on graph theory. The technical solutions adopted are as follows: The present invention proposes a power grid topology modeling method based on graph theory, the method comprising: Obtaining a first topological graph structure of the power grid; for each node in the initial topological graph structure, obtaining a topological vector of the node within a neighborhood range of different scales; For each of the nodes, the topological vectors are formed into a topological vector sequence according to the size of the neighborhood range; an adjacent scale similarity sequence is obtained according to the similarity between adjacent elements in the topological vector sequence; a segmentation point in the adjacent scale similarity sequence and a segmentation effect in the node are determined according to the size of the continuous elements; the segmentation points and segmentation effects of all nodes are counted, and the segmentation property of each neighborhood range is obtained according to the segmentation effect of each node in the neighborhood range to which the segmentation point belongs, and a segmentation neighborhood is screened out according to the segmentation property; For each segmented neighborhood, the node value of each node is set to the corresponding topological vector to obtain a second topological graph structure; the node category area in the second topological graph structure is obtained; the topological vectors in the node category area are screened, and the representative topological vector of the node category area is determined and used as the power grid structure descriptor of the node category area.
[0004] Furthermore, the Node2Vec method is used to obtain the topological vectors of the nodes in neighborhoods of different scales.
[0005] Furthermore, the method for obtaining the adjacent scale similarity sequence includes: The topological vector sequence is a sequence sorted from small to large according to the neighborhood range. For each topological vector in the topological vector sequence, the average value of the cosine similarity between the topological vector and each preceding topological vector is taken as the adjacent scale similarity of the corresponding topological vector; the adjacent scale similarities of all topological vectors constitute the adjacent scale similarity sequence.
[0006] Furthermore, the segmentation points in the adjacent scale similarity sequence are obtained using the Otsu multi-threshold segmentation algorithm.
[0007] Furthermore, the method for obtaining the segmentation effect includes: In the adjacent scale similarity sequence, the ratio between the element corresponding to the segmentation point and the minimum value of the previous segmentation segment is taken as the first ratio, the ratio between the element corresponding to the segmentation point and the maximum value of the previous segmentation segment is taken as the second ratio, the means of the first ratio and the second ratio are negatively correlated and normalized to obtain the segmentation effect of the segmentation point.
[0008] Furthermore, the method for obtaining the segmentability includes: Any neighborhood range is taken as the target scale. If the neighborhood range to which the segmentation point of the node belongs is the target scale, the node is taken as the target node. The segmentation effects of the segmentation points of all target nodes at the target scale are accumulated to obtain the segmentability of the target scale.
[0009] Furthermore, the method for obtaining the node category area includes: In the second topological graph structure, multiple initial node categories are obtained according to the similarity of node values between each node, and each node is labeled according to the initial node category. The label is updated using the SLPA algorithm to obtain a final label result. In the final label result, nodes with the same label and connected form a node category area.
[0010] Furthermore, the method for obtaining the representative topology vector includes: In the node category area, the cosine similarities between each topology vector and other topology vectors are calculated and accumulated to obtain the overall similarity of each topology vector, and the topology vector with the largest overall similarity is used as the representative topology vector.
[0011] The present invention also proposes a computer device for power grid topology modeling based on graph theory, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the steps of the graph theory-based power grid topology modeling method when executing the computer program.
[0012] The present invention also proposes a power grid topology modeling system based on graph theory, the system comprising: A power grid first topology structure acquisition module is used to obtain a first topology structure of the power grid; for each node in the initial topology structure, a topology vector of the node in a neighborhood range of different scales is obtained; The first topology map analysis module is used to form a topology vector sequence from the topology vector according to the size of the neighborhood range for each of the nodes; obtain an adjacent scale similarity sequence according to the similarity between adjacent elements in the topology vector sequence; determine the segmentation points in the adjacent scale similarity sequence and the segmentation effect in the node according to the size of the continuous elements; count the segmentation points and segmentation effects of all nodes, obtain the segmentation property of each neighborhood range according to the segmentation effect of each node in the neighborhood range to which the segmentation point belongs, and select the segmentation neighborhood according to the segmentation property; A power grid topology modeling module is used to set the node value of each node to the corresponding topology vector for each segmented neighborhood to obtain a second topology graph structure; obtain a node category area in the second topology graph structure; screen the topology vectors in the node category area, determine the representative topology vector of the node category area and use it as a power grid structure descriptor for the node category area.
[0013] The present invention has the following beneficial effects: The present invention first sets neighborhood ranges of different scales, and obtains the topological vectors of nodes in different neighborhood ranges in the first topological graph structure. By setting neighborhood ranges of different scales, the final result can be a multi-scale result. The final power grid topology modeling has multi-scale information, and can adaptively select a suitable scale for analysis and processing according to the analysis requirements, which reduces the amount of calculation of the power grid topology analysis while ensuring the information richness of the final model and improving the analysis and processing efficiency of the smart grid. Further considering that not every neighborhood range can make the node contain accurate information of the edge in the original power grid, if the neighborhood range is not appropriate, it will make it difficult to represent the large-scale information of the original power grid in the final modeling result, so by analyzing the distribution characteristics of the topological vectors represented by the nodes under each neighborhood range, the segmentation of the neighborhood range is obtained, and then the segmented neighborhood is screened out. Under the segmented neighborhood, a second topological graph structure is constructed based on the corresponding topological vector, and by classifying the nodes in the second topological graph structure, the nodes can be further merged, and the overall analysis is performed in a node category area through the power grid structure descriptor, so that the final modeling result has larger scale information while containing valid information in the original power grid to prevent information distortion. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0015] Figure 1 A flow chart of a method for modeling a power grid topology based on graph theory provided by an embodiment of the present invention; Figure 2 A structural block diagram of a power grid topology modeling system based on graph theory is provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a graph-based power grid topology modeling method, computer equipment and system proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0017] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0018] The following is a detailed description of a specific scheme of a power grid topology modeling method, a computer device and a system based on graph theory provided by the present invention in conjunction with the accompanying drawings.
[0019] See also Figure 1 , which shows a flow chart of a method for power grid topology modeling based on graph theory provided by an embodiment of the present invention, the method comprising: Step S1: obtaining a first topological graph structure of a power grid; for each node in the initial topological graph structure, obtaining a topological vector of the node within a neighborhood range of different scales.
[0020] The present invention aims to further optimize the topological structure of the power grid, so the nodes and edges in the graph structure of the power grid can be constructed based on the existing technical means. For example, the method in the publication number CN113051694B is used to construct the first topological structure of the power grid. This method is a prior art, and its process is only briefly described here: (1) Create a corresponding node in the graph structure for each electrical device and generate a unique identification code for the node and edge.
[0021] (2) For switch devices, establish a mapping relationship between the switch status and the terminal connection status.
[0022] (3) For connected nodes, create corresponding edges depending on whether they contain busbars or running rods.
[0023] (4) For line-type devices such as wires and cables, if the degree of a node is 2, the node and the two edges connected to it are merged into one edge.
[0024] It should be noted that, in other embodiments of the present invention, other existing calculations may be used to construct the first topology structure of the power grid, which will not be elaborated here.
[0025] The embodiment of the present invention aims to further classify the nodes in the neighborhood range after determining the effective neighborhood range, thereby optimizing the graph structure. Because there is topological information in the topological structure, the nodes in the first topological graph structure cannot be directly classified and analyzed. It is necessary to make the nodes first contain the surrounding node information, and then classify them to obtain the larger scale structural information of the power grid topological structure, otherwise it will lead to the lack of information of the final modeling structure. Therefore, the embodiment of the present invention first obtains the topological vectors of the nodes in the neighborhood ranges of different scales for the nodes in the initial topological graph structure. The topological vector is a vector constructed based on the connection relationship between the node and other surrounding nodes, which can characterize the surrounding structural information of the node in the current neighborhood range.
[0026] In an embodiment of the present invention, the Node2Vec algorithm is used to obtain the topological vector of each node in each neighborhood. The algorithm is a method for processing a graph structure and can convert the graph structure into a vector space. The specific algorithm is a technical means well known to those skilled in the art and will not be described in detail here.
[0027] It should be noted that the neighborhood range of a node is determined based on the neighborhood range determined by the connection relationship. Taking a node as an analysis node as an example, other nodes directly connected to the analysis node are nodes within the first neighborhood range of the analysis node; nodes directly connected to nodes in a neighborhood are nodes within the second neighborhood range of the analysis node. By analogy, the node information within the neighborhood range of each scale can be obtained. The number of scales of the neighborhood range can be adaptively set according to the scale of the power grid. In the embodiment of the present invention, it is set from one to ten, and a total of ten scales of neighborhood ranges are analyzed.
[0028] Step S2: For each node, the topological vectors are formed into a topological vector sequence according to the size of the neighborhood range; the adjacent scale similarity sequence is obtained according to the similarity between adjacent elements in the topological vector sequence; the segmentation points in the adjacent scale similarity sequence and the segmentation effect in the node are determined according to the size of the continuous elements; the segmentation points and segmentation effects of all nodes are counted, and the segmentation properties of each neighborhood range are obtained according to the segmentation effect of each node in the neighborhood range to which the segmentation points belong, and the segmentation neighborhood is screened out according to the segmentation properties.
[0029] Although each node obtains the topological vector under each neighborhood range in step S1, not every neighborhood range can be analyzed as an analysis scale. The scale of a neighborhood range can have a good segmentation effect for some nodes, enabling these nodes to obtain effective neighborhood node distribution information under the neighborhood range; but for some other nodes, the neighborhood range may be too large, resulting in the influence of noise on the neighborhood node distribution information of these nodes, or it may be too small, resulting in the neighborhood node distribution information of these nodes not being able to fully represent the node's surrounding node distribution information. Therefore, it is necessary to effectively screen the neighborhood range and select a more appropriate neighborhood range for subsequent analysis.
[0030] The embodiment of the present invention takes into account that the useful neighborhood range scale will cause the topological vector of the node to change greatly as the neighborhood range expands. That is, if a neighborhood range scale is a better neighborhood range, the topological vectors between neighborhood ranges smaller than the neighborhood range scale are not much different, and as the neighborhood range expands, the scale larger than the neighborhood range is no longer suitable for the node, resulting in noise interference in the obtained topological vector, and the obtained topological vector undergoes obvious changes. Therefore, the embodiment of the present invention analyzes each node, and constructs a topological vector sequence from the topological vector according to the size of the neighborhood range, that is, the topological vectors in the topological vector sequence are sorted in the order from small to large or from large to small along the neighborhood range.
[0031] The embodiment of the present invention further analyzes based on the topological vector sequence. According to the above relationship between the neighborhood range scale and the change of the topological vector, the segmentation point in the topological vector sequence is the more effective neighborhood range corresponding to the node. Therefore, the embodiment of the present invention first obtains the adjacent scale similarity sequence based on the similarity between adjacent elements in the topological vector sequence. Each element in the adjacent scale similarity sequence is a specific similarity value, which has a more easily quantifiable effect compared to analyzing the topological vector sequence. Therefore, the segmentation point in the adjacent scale similarity sequence and the segmentation effect of the segmentation point in the node are determined according to the size of the continuous elements in the adjacent scale similarity sequence. Because the segmentation point is an element in the adjacent scale similarity sequence, the element corresponds to a neighborhood range in the topological vector sequence, that is, the neighborhood range corresponding to the segmentation point is the more effective neighborhood range of the node. However, there are multiple nodes in the first topological graph structure, and the effective neighborhood range cannot be determined based on a certain node alone. It is necessary to count the segmentation points and segmentation effects of all nodes. If a certain neighborhood range is the neighborhood range corresponding to the segmentation point in more nodes, and the segmentation effect is good, it means that the segmentation of the neighborhood range is good for the overall power grid topology structure. Further analysis under this neighborhood range can ensure that the original information in the power grid is not destroyed while obtaining large-scale power grid information. Therefore, the embodiment of the present invention further counts the segmentation points and segmentation effects of all nodes, and obtains the segmentation of each neighborhood range according to the segmentation effect of each node in the neighborhood range to which the segmentation point belongs, and the segmentation neighborhood to be analyzed can be screened out according to the segmentation.
[0032] Preferably, in some implementations of the embodiments of the present invention, the method for acquiring the adjacent scale similarity sequence includes: The topological vector sequence is a sequence sorted from small to large according to the neighborhood range. For each topological vector in the topological vector sequence, the average value of the cosine similarity between the topological vector and each previous topological vector is used as the adjacent scale similarity corresponding to the topological vector. It should be noted that the previous topological vector is the vector before the topological vector in the sequence, that is, the neighborhood range corresponding to the previous topological vector is smaller than the neighborhood range corresponding to the topological vector. The method of calculating the average value of the cosine similarity between the topological vector and each previous topological vector can effectively amplify the difference between the element corresponding to the segmentation point and other previous elements in the adjacent scale similarity sequence, making the subsequent determination of the segmentation point and the determination of the segmentation effect more obvious. The adjacent scale similarities of all topological vectors constitute an adjacent scale similarity sequence.
[0033] It should be noted that in some implementations of the embodiments of the present invention, the order of the topological vector sequence is from large to small according to the neighborhood range, so it is necessary to analyze the similarity relationship between each topological vector and its subsequent topological vector, which will not be repeated here.
[0034] In other implementations of the embodiments of the present invention, the cosine similarity between each topological vector in the topological vector sequence and the previous topological vector may also be directly used as an element in the adjacent scale similarity sequence.
[0035] In some implementations of the embodiments of the present invention, the segmentation points in the adjacent scale similarity sequence are obtained using the Otsu multi-threshold segmentation algorithm, which is a well-known technical means for those skilled in the art and will not be described in detail here.
[0036] Preferably, in some implementations of the embodiments of the present invention, the method for obtaining the segmentation effect includes: In the adjacent scale similarity sequence, the ratio between the element corresponding to the segmentation point and the minimum value of the previous segment is taken as the first ratio, and the ratio between the element corresponding to the segmentation point and the maximum value of the previous segment is taken as the second ratio. For the segmentation point, because it represents the similarity between adjacent elements in the topological vector sequence, the size of the element corresponding to it in the adjacent scale similarity sequence should be a smaller value, and the minimum and maximum values of the previous segment should be similar values and both greater than the element value of the segmentation point. The smaller the first ratio and the second ratio are, the smaller the element value of the segmentation point is, the lower the adjacent scale similarity is, and the better the segmentation effect is. Therefore, the embodiment of the present invention performs negative correlation mapping and normalization on the mean of the first ratio and the second ratio to obtain the segmentation effect of the segmentation point.
[0037] It should be noted that those skilled in the art can implement the negative correlation mapping and normalization method by using basic mathematical means, such as first normalizing the data using a function mapping method, limiting the value range to between 0 and 1, and then subtracting the normalized value from a positive integer 1 to obtain the final result. In the embodiment of the present invention, the opposite number of the data is directly used as the power of an exponential function with a natural constant as the base to achieve the effect of negative correlation mapping and normalization.
[0038] Preferably, in an embodiment of the present invention, the method for obtaining the segmentability includes: Take any neighborhood range as the target scale. If the neighborhood range of the node's segmentation point is the target scale, then take the node as the target node. Accumulate the segmentation effects of all target nodes' segmentation points at the target scale to obtain the segmentability of the target scale. That is, for the target scale, the more target nodes there are and the better the segmentation effect, the greater the segmentability of the target scale.
[0039] In the embodiment of the present invention, based on the segmentability of all neighborhood ranges, each segmentability is normalized using range normalization, and the segmentability threshold is set to 0.6. According to the above logical description, the greater the segmentability, the more effective the neighborhood range is. Therefore, the neighborhood range with a segmentability greater than the segmentability threshold is used as the segmentation neighborhood.
[0040] Step S3: For each segmented neighborhood, the node value of each node is set to the corresponding topological vector to obtain a second topological graph structure; the node category area in the second topological graph structure is obtained; the topological vectors in the node category area are screened to determine the representative topological vector of the node category area and use it as the power grid structure descriptor of the node category area.
[0041] In step S2, a multi-scale segmentation neighborhood with relatively effective information in the first topological graph structure of the current power grid is obtained, and for each segmentation neighborhood, further structural analysis can be performed and the topological graph can be optimized. For each segmentation neighborhood, the node value of each node is set as the topological vector of the node under the segmentation neighborhood to obtain a second topological graph structure. Because the node value of the node in the second topological graph structure is the topological vector under the segmentation neighborhood, the topological vector represents the node structure information within a local range, so for adjacent and structurally similar nodes, the node values in the second topological graph structure should be similar. Therefore, the node category area in the second topological graph structure can be further obtained, that is, the node category area is the merged large-scale information, because the node structure distribution in the node category area is close to the same distribution, so it can be regarded as a whole for topological analysis. Further considering that the node category area contains multiple nodes, that is, it contains multiple topological vectors, the topological vectors in the node category area are screened, and the representative topological vector of the node category area is determined and used as the power grid structure descriptor of the node category area. When conducting intelligent analysis on the power grid, it is only necessary to analyze the power grid structure descriptor of the node category area to effectively analyze the power grid structure, reduce the amount of analysis calculations, and increase the efficiency of intelligent analysis of the power grid.
[0042] Similarly, each segmented neighborhood can eventually obtain the classification information in the second topological graph structure to complete the grid topology modeling. After obtaining the final modeling structure, the grid can be subjected to macroscopic analysis, mesoscopic analysis, microscopic analysis, integrated analysis, and continuous updating. Graph structures of different scales help to gradually identify potential fault points and risk areas in the grid from the whole to the local. Among them, macroscopic analysis includes: dividing the grid into multiple areas, identifying key nodes and load conditions, analyzing power supply paths, etc.; mesoscopic analysis includes: checking the connection between nodes in the area, considering the switch status, evaluating the equipment status, etc.; microscopic analysis includes: conducting detailed analysis of key nodes, constructing local network topology, simulating fault impact, etc.; integrated analysis includes: integrating results at all levels, evaluating risks, and proposing preventive measures, etc.; continuous updating includes: real-time monitoring of grid status, updating models, and dynamically adjusting analysis, etc.
[0043] Preferably, in an embodiment of the present invention, the method for obtaining the node category area includes: In the second topological graph structure, multiple initial node categories are obtained according to the similarity of node values between each node, and each node is labeled according to the initial node category. The label is updated using the SLPA algorithm to obtain the final label result. In the final label result, nodes with the same label and connected form a node category area.
[0044] In the embodiment of the present invention, the initial node classification can be directly implemented by calculating the cosine similarity of node values between nodes and using a density clustering method. Cosine similarity and density clustering are technical means well known to those skilled in the art and will not be described in detail.
[0045] It should be noted that the SLPA algorithm is a method for updating category labels in a graph structure that is well known to those skilled in the art. Here is a brief description of its general process: (1) Label the different initial node categories. According to the number of node categories n, assign a number 1-n to each category. Meanwhile, replace the node value of each node with the label value of the category to which the node belongs.
[0046] (2) First, calculate the number of nodes with different node numbers from each node among the directly connected nodes of each node, which is recorded as the number of nodes with different numbers. Then, calculate the nodes in order from large to small. That is, the calculation order of the nodes is determined first.
[0047] (3) For each node, when performing calculations, the node with the largest number of labels among the nodes directly connected to the node is used as the updated label value of the node. The nodes are updated in sequence according to the calculation order. After the first round of updates is completed, an updated graph is obtained.
[0048] (4) Calculate whether the updated label value of each node in the updated graph and the original graph structure is the same as the original label value. If they are the same, do not count them, otherwise count +1, and calculate the number of counts. Calculate the ratio of the number of counts to the number of nodes. If the ratio is greater than 0.2, perform the next round of node label update, otherwise stop. If the ratio is greater than 0.2, based on the update results of the first round, calculate the calculation order of the nodes by the same method, and then obtain the second update graph. Iterate continuously. When the iteration stops, the target node is labeled by the neighboring node labels, so that the labels of the adjacent nodes are the same. Then, the nodes with the same labels and connected are regarded as the same region, that is, multiple node category regions are obtained.
[0049] Preferably, in an embodiment of the present invention, the method for obtaining the representative topological vector includes: in the node category region, calculating and accumulating the cosine similarity between each topological vector and other topological vectors to obtain the overall similarity of each topological vector, and taking the topological vector with the largest overall similarity as the representative topological vector. That is, the representative topological vector is the topological vector that best represents the structural information in the node category region.
[0050] In summary, the embodiment of the present invention obtains the topological vectors of each node in the first topological graph structure of the power grid within the neighborhood range at different scales. In the topological vector sequence, the similarity between adjacent elements is analyzed to determine the neighborhood range corresponding to the segmentation point and the segmentation effect. By counting the segmentation points and segmentation effects of all nodes, the segmentability within each neighborhood range is obtained, and the segmentation neighborhood is screened out. Under each segmentation neighborhood, a second topological graph structure is constructed based on the topological vector of the node and the nodes are classified to obtain the node category area and its power grid structure descriptor. The present invention can make the final result a multi-scale result by setting the neighborhood range of different scales. The final power grid topology modeling has multi-scale information, and can adaptively select the appropriate scale for analysis and processing according to the analysis requirements, and the graph structure at each scale contains large-scale information, which reduces the computational complexity of the power grid topology analysis while ensuring the information richness of the final model and improving the analysis and processing efficiency of the smart grid.
[0051] Based on the same inventive concept, the present invention also proposes a computer device for power grid topology modeling based on graph theory, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any step of a method for power grid topology modeling based on graph theory.
[0052] The present invention also proposes a power grid topology modeling system based on graph theory, please refer to Figure 2 The system comprises: The power grid first topology graph structure acquisition module 101 is used to obtain the first topology graph structure of the power grid. For each node in the initial topology graph structure, a topology vector of the node in a neighborhood range of different scales is obtained.
[0053] The first topology map analysis module 102 is used to form a topology vector sequence from the topology vector according to the size of the neighborhood range for each node. The adjacent scale similarity sequence is obtained according to the similarity between adjacent elements in the topology vector sequence. The segmentation points in the adjacent scale similarity sequence and the segmentation effect in the node are determined according to the size of the continuous elements. The segmentation points and segmentation effects of all nodes are counted, and the segmentation properties of each neighborhood range are obtained according to the segmentation effect of each node in the neighborhood range to which the segmentation point belongs, and the segmentation neighborhood is screened out according to the segmentation properties.
[0054] The power grid topology modeling module 103 is used to set the node value of each node to the corresponding topology vector for each segmented neighborhood, and obtain a second topology graph structure. Obtain a node category region in the second topology graph structure. Screen the topology vectors in the node category region, determine the representative topology vector of the node category region and use it as a power grid structure descriptor of the node category region.
[0055] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0056] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A power grid topology modeling method based on graph theory, characterized in that: The method comprises: Obtaining a first topological graph structure of the power grid; for each node in the initial topological graph structure, obtaining a topological vector of the node within a neighborhood range of different scales; For each of the nodes, the topological vectors are formed into a topological vector sequence according to the size of the neighborhood range; an adjacent scale similarity sequence is obtained according to the similarity between adjacent elements in the topological vector sequence; a segmentation point in the adjacent scale similarity sequence and a segmentation effect in the node are determined according to the size of the continuous elements; the segmentation points and segmentation effects of all nodes are counted, and the segmentation property of each neighborhood range is obtained according to the segmentation effect of each node in the neighborhood range to which the segmentation point belongs, and a segmentation neighborhood is screened out according to the segmentation property; For each segmented neighborhood, the node value of each node is set to the corresponding topological vector to obtain a second topological graph structure; the node category area in the second topological graph structure is obtained; the topological vectors in the node category area are screened, and the representative topological vector of the node category area is determined and used as the power grid structure descriptor of the node category area.
2. The method for power grid topology modeling based on graph theory according to claim 1, characterized in that: The Node2Vec method is used to obtain the topological vectors of the nodes in neighborhoods of different scales.
3. The method for power grid topology modeling based on graph theory according to claim 1, characterized in that: The method for obtaining the adjacent scale similarity sequence includes: The topological vector sequence is a sequence sorted from small to large according to the neighborhood range. For each topological vector in the topological vector sequence, the average value of the cosine similarity between the topological vector and each preceding topological vector is taken as the adjacent scale similarity of the corresponding topological vector; the adjacent scale similarities of all topological vectors constitute the adjacent scale similarity sequence.
4. The method for power grid topology modeling based on graph theory according to claim 1, characterized in that: The segmentation points in the adjacent scale similarity sequence are obtained using the Otsu multi-threshold segmentation algorithm.
5. The method for power grid topology modeling based on graph theory according to claim 1, characterized in that: The method for obtaining the segmentation effect includes: In the adjacent scale similarity sequence, the ratio between the element corresponding to the segmentation point and the minimum value of the previous segmentation segment is taken as the first ratio, the ratio between the element corresponding to the segmentation point and the maximum value of the previous segmentation segment is taken as the second ratio, the means of the first ratio and the second ratio are negatively correlated and normalized to obtain the segmentation effect of the segmentation point.
6. The method for power grid topology modeling based on graph theory according to claim 1, characterized in that: The method for obtaining the segmentability includes: Any neighborhood range is taken as the target scale. If the neighborhood range to which the segmentation point of the node belongs is the target scale, the node is taken as the target node. The segmentation effects of the segmentation points of all target nodes at the target scale are accumulated to obtain the segmentability of the target scale.
7. The method for power grid topology modeling based on graph theory according to claim 1, characterized in that: The method for obtaining the node category area includes: In the second topological graph structure, multiple initial node categories are obtained according to the similarity of node values between each node, and each node is labeled according to the initial node category. The label is updated using the SLPA algorithm to obtain a final label result. In the final label result, nodes with the same label and connected form a node category area.
8. The method for power grid topology modeling based on graph theory according to claim 1, characterized in that: The method for obtaining the representative topology vector includes: In the node category area, the cosine similarities between each topology vector and other topology vectors are calculated and accumulated to obtain the overall similarity of each topology vector, and the topology vector with the largest overall similarity is used as the representative topology vector.
9. A computer device for power grid topology modeling based on graph theory, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a graph-theory-based power grid topology modeling method are implemented as described in any one of claims 1 to 8.
10. A power grid topology modeling system based on graph theory, characterized in that: The system comprises: A power grid first topology structure acquisition module is used to obtain a first topology structure of the power grid; for each node in the initial topology structure, a topology vector of the node in a neighborhood range of different scales is obtained; The first topology map analysis module is used to form a topology vector sequence from the topology vector according to the size of the neighborhood range for each of the nodes; obtain an adjacent scale similarity sequence according to the similarity between adjacent elements in the topology vector sequence; determine the segmentation points in the adjacent scale similarity sequence and the segmentation effect in the node according to the size of the continuous elements; count the segmentation points and segmentation effects of all nodes, obtain the segmentation property of each neighborhood range according to the segmentation effect of each node in the neighborhood range to which the segmentation point belongs, and select the segmentation neighborhood according to the segmentation property; A power grid topology modeling module is used to set the node value of each node to the corresponding topology vector for each segmented neighborhood to obtain a second topology graph structure; obtain a node category area in the second topology graph structure; screen the topology vectors in the node category area, determine the representative topology vector of the node category area and use it as a power grid structure descriptor for the node category area.
Citation Information
Patent Citations
A graph theory-based method for power grid topology modeling
CN113051694B
Power system state similarity analysis method
CN106816871A
Cross-system automatic matching and constructing method for topological structure of power grid on the basis of graph calculation and machine learning
CN107741999A
Graph theory-based power grid topology modeling method
CN113051694A
Power grid line division method, computer equipment and computer readable storage medium
CN115566670A