Method and device for generating power system network topology diagram

By generating and optimizing the power system network topology diagram, the problem of insufficient spatial information display between nodes in large-scale power grids is solved, and more accurate and effective power grid data analysis is achieved.

CN115630199BActive Publication Date: 2025-09-19SHENZHEN COMTOP INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211354431.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-01
Publication Date
2025-09-19
Estimated Expiration
2042-11-01

AI Technical Summary

Technical Problem

The existing power system network topology diagram cannot effectively display the spatial information between nodes in large-scale power grids, resulting in inaccurate and slow power grid data analysis.

Method used

By generating an initial topology map, the node positions are optimized according to the geographic information and connection relationship of the power system equipment using the search path, and the optimal distance is determined and updated to form the target topology map.

Benefits of technology

The effectiveness of displaying power grid relationships and the accuracy and effectiveness of analyzing power grid data are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115630199B_ABST
    Figure CN115630199B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for generating a power system network topology map, the method comprising: generating corresponding nodes and connection relationships between all nodes based on geographic information of target devices and device connection relationships, and determining an initial topology map based on the initial positions of all nodes and the connection relationships between all nodes; searching all nodes according to a predetermined search path; judging whether the sum of the current connection distances between all nodes is less than the current optimal distance based on the node exchange situation when the search depth increases; if the judgment result is yes, updating the current optimal distance to the sum of the current connection distances between all nodes; after all search paths are searched, determining the topology map formed by the node positions corresponding to the current optimal distance and the connection relationships between all nodes that are finally stored as the target topology map. It can be seen that the implementation of the present invention can improve the effectiveness of displaying power grid relationships and the accuracy and effectiveness of displaying and analyzing power grid data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system data processing, and in particular to a method and device for generating a power system network topology diagram. Background Art

[0002] In real life, the network topology diagram of the power system can reflect the status of each device in the power system and the communication information between each device. It is the information necessary to display and analyze power grid data and power grid relationships.

[0003] Currently, when power grids are large and have many nodes, the connections between nodes are complex. While existing topological maps contain information about the connections and locations between nodes, the limited space within the topological maps makes it difficult to effectively display the spatial information between nodes and to accurately and quickly analyze power grid data. This suggests that existing technologies have certain shortcomings that urgently need to be addressed. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method and device for generating a power system network topology diagram, which can help improve the effectiveness of displaying power grid relationships, and further improve the accuracy and effectiveness of displaying and analyzing power grid data.

[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a method for generating a power system network topology diagram, the method comprising:

[0006] Generate corresponding nodes and connection relationships between all nodes based on geographic information and device connection relationships of target devices in the power system, and determine an initial topology map based on initial positions of all nodes and connection relationships between all nodes, wherein the initial topology map is used to represent the initial positions of all nodes and connection relationships between all nodes;

[0007] Searching all the nodes in the initial topology graph according to a predetermined search path;

[0008] When the search depth increases, judging whether the sum of the current connection distances between all the nodes in the initial topology graph is less than the current optimal distance according to the node exchange situation, wherein the current optimal distance is the minimum value of the sum of the connection distances between all the nodes stored before the search depth increases;

[0009] If the judgment result is yes, then the current optimal distance is updated to the sum of the current connection distances between all the nodes;

[0010] After all the search paths are searched, a topology graph formed by the node positions corresponding to the current optimal distance and the connection relationships between all the nodes that are finally stored is determined as a target topology graph.

[0011] As an optional implementation manner, in the first aspect of the present invention, determining the initial topology graph based on the initial positions of all the nodes and the connection relationships between all the nodes includes:

[0012] Dividing the blank topological map into a plurality of topological regions, wherein the number of the topological regions is greater than the number of all the nodes;

[0013] For each of all the nodes, assign the node to the topological area to determine an initial position of the node, wherein each of the nodes corresponds to one topological area;

[0014] An initial topology graph is determined based on the initial positions of all the nodes and the connection relationships between all the nodes.

[0015] As an optional implementation manner, in the first aspect of the present invention, searching all the nodes in the initial topology graph according to a predetermined search path includes:

[0016] Determining a first target node from all the nodes in the initial topology map according to a first preset rule, and searching all the nodes in the initial topology map according to a first target search path starting from an initial position of the first target node, wherein the first target search path is determined from all the predetermined search paths that have the first target node as a search starting point;

[0017] After the search for the first target search path is completed, performing a first backtracking operation according to the first target search path to update the first target node and the first target search path, and continuing to perform the operation of searching all the nodes in the initial topology graph according to the first target search path starting from the initial position of the first target node;

[0018] The updated first target node is a node that cannot be accessed when searching according to the first target search path, and the updated first target search path is determined from all the predetermined search paths with the updated first target node as the search starting point.

[0019] As an optional implementation manner, in the first aspect of the present invention, determining the first target node from all the nodes in the initial topology graph according to a first preset rule includes:

[0020] For each of all the nodes, determine the number of all connected nodes corresponding to the node according to the connection relationships between all the nodes, wherein the connected nodes are other nodes in all the nodes that have a connection relationship with the node;

[0021] A node corresponding to the smallest number of connected nodes among all the nodes is determined as a first target node.

[0022] As an optional implementation, in the first aspect of the present invention, the search depth has corresponding depth information, and the depth information at least includes a source node to be exchanged, a target node to be exchanged, and a current optimal distance;

[0023] The determining, based on the node exchange situation, whether the sum of the current connection distances between all the nodes in the initial topology graph is less than the current optimal distance includes:

[0024] Exchanging the position of the source node to be exchanged with the position of the target node to be exchanged corresponding to a first search depth, so as to update the positions of all the nodes in the initial topology graph, wherein the first search depth is the search depth reached by searching according to the current search path;

[0025] Calculating the sum of current connection distances between all the nodes based on the updated positions of all the nodes and the connection relationships between all the nodes;

[0026] It is determined whether the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth.

[0027] As an optional implementation manner, in the first aspect of the present invention, the depth information further includes a current depth value; and the method further includes:

[0028] Determining whether a current depth value corresponding to the first search depth is greater than or equal to a first preset depth threshold;

[0029] If it is determined that the current depth value corresponding to the first search depth is greater than or equal to the first preset depth threshold, a first intermediate solution is executed, wherein the first intermediate solution includes exchanging the position of the source node to be exchanged corresponding to the first search depth with the position of the target node to be exchanged to update the positions of all the nodes in the initial topology graph, calculating the sum of the current connection distances between all the nodes based on the updated positions of all the nodes and the connection relationships between all the nodes, and determining whether the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth;

[0030] If it is determined that the sum of the current connection distances between all the nodes is greater than or equal to the current optimal distance corresponding to the first search depth, performing a second backtracking operation according to the current search path to determine a second target node and its corresponding second target search path;

[0031] The second target node is a node that cannot be accessed by searching according to the current search path, and the second target search path is determined from all the predetermined search paths that use the second target node as a search starting point.

[0032] As an optional implementation manner, in the first aspect of the present invention, after performing the second backtracking operation according to the current search path, the method further includes:

[0033] Starting from the initial position of the second target node, searching all the nodes in the initial topology graph according to the second target search path;

[0034] Determining whether a current depth value corresponding to a second search depth is greater than or equal to a second preset depth threshold, wherein the second search depth is a search depth reached by searching according to the second target search path;

[0035] If it is determined that the current depth value corresponding to the second search depth is greater than or equal to the second preset depth threshold, determining a current depth value corresponding to a third target node that has a connection relationship with the second target node, wherein the third target node is a node that has been visited by searching according to the current search path, and the current depth value corresponding to the third target node is determined based on depth information corresponding to the search depth of the third target node in the current search path;

[0036] Calculating a first depth difference between a current depth value corresponding to the second search depth and a current depth value corresponding to the third target node;

[0037] It is determined whether the first depth difference is greater than or equal to a first preset threshold. If it is determined that the first depth difference is greater than or equal to the first preset threshold, a second intermediate solution is executed.

[0038] As an optional embodiment, in the first aspect of the present invention, the method further comprises:

[0039] If it is determined that the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth, continue searching according to the current search path;

[0040] Calculating a second depth difference between a current depth value corresponding to a third search depth and a current depth value corresponding to the first search depth, wherein the third search depth is a search depth reached by continuing to search along the current search path;

[0041] It is determined whether the second depth difference is greater than or equal to a second preset threshold. If it is determined that the second depth difference is greater than or equal to the second preset threshold, a third intermediate solution is executed.

[0042] A second aspect of the present invention discloses a device for generating a power system network topology diagram, the device comprising:

[0043] A generation module, configured to generate corresponding nodes and connection relationships between all nodes based on geographic information of target devices and device connection relationships in the power system;

[0044] a determination module, configured to determine an initial topology graph based on the initial positions of all the nodes and the connection relationships between all the nodes, wherein the initial topology graph is used to represent the initial positions of all the nodes and the connection relationships between all the nodes;

[0045] A search module, configured to search all the nodes in the initial topology graph according to a predetermined search path;

[0046] a judgment module, configured to judge, when the search depth increases, whether the sum of the current connection distances between all the nodes in the initial topology graph is less than the current optimal distance based on the node exchange situation, wherein the current optimal distance is the minimum value of the sum of the connection distances between all the nodes stored before the search depth increases;

[0047] An updating module, configured to update the current optimal distance to the sum of the current connection distances between all the nodes if the judgment result is yes;

[0048] The determination module is further configured to determine, after all the search paths are searched, a topology graph formed by the node positions corresponding to the current optimal distance and the connection relationships between all the nodes that are finally stored as a target topology graph.

[0049] As an optional implementation, in the second aspect of the present invention, the specific manner in which the determination module determines the initial topology graph according to the initial positions of all the nodes and the connection relationships between all the nodes is:

[0050] Dividing the blank topological map into a plurality of topological regions, wherein the number of the topological regions is greater than the number of all the nodes;

[0051] For each of all the nodes, assign the node to the topological area to determine an initial position of the node, wherein each of the nodes corresponds to one topological area;

[0052] An initial topology graph is determined based on the initial positions of all the nodes and the connection relationships between all the nodes.

[0053] As an optional implementation, in the second aspect of the present invention, the specific manner in which the search module searches all the nodes in the initial topology graph according to a predetermined search path is:

[0054] Determining a first target node from all the nodes in the initial topology map according to a first preset rule, and searching all the nodes in the initial topology map according to a first target search path starting from an initial position of the first target node, wherein the first target search path is determined from all the predetermined search paths that have the first target node as a search starting point;

[0055] After the search for the first target search path is completed, performing a first backtracking operation according to the first target search path to update the first target node and the first target search path, and continuing to perform the operation of searching all the nodes in the initial topology graph according to the first target search path starting from the initial position of the first target node;

[0056] The updated first target node is a node that cannot be accessed when searching according to the first target search path, and the updated first target search path is determined from all the predetermined search paths with the updated first target node as the search starting point.

[0057] As an optional implementation, in the second aspect of the present invention, the specific manner in which the search module determines the first target node from all the nodes in the initial topology graph according to the first preset rule is:

[0058] For each of all the nodes, determine the number of all connected nodes corresponding to the node according to the connection relationships between all the nodes, wherein the connected nodes are other nodes in all the nodes that have a connection relationship with the node;

[0059] A node corresponding to the smallest number of connected nodes among all the nodes is determined as a first target node.

[0060] As an optional implementation, in the second aspect of the present invention, the search depth has corresponding depth information, and the depth information at least includes a source node to be exchanged, a target node to be exchanged, and a current optimal distance;

[0061] The specific method in which the judgment module judges whether the sum of the current connection distances between all the nodes in the initial topology graph is less than the current optimal distance according to the node exchange situation is:

[0062] Exchanging the position of the source node to be exchanged with the position of the target node to be exchanged corresponding to a first search depth, so as to update the positions of all the nodes in the initial topology graph, wherein the first search depth is the search depth reached by searching according to the current search path;

[0063] Calculating the sum of current connection distances between all the nodes based on the updated positions of all the nodes and the connection relationships between all the nodes;

[0064] It is determined whether the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth.

[0065] As an optional implementation manner, in the second aspect of the present invention, the depth information further includes a current depth value;

[0066] The judging module is further configured to judge whether a current depth value corresponding to the first search depth is greater than or equal to a first preset depth threshold;

[0067] The device further comprises:

[0068] an execution module, configured to execute a first intermediate solution if the judgment module determines that the current depth value corresponding to the first search depth is greater than or equal to the first preset depth threshold, wherein the first intermediate solution includes exchanging the position of the source node to be exchanged corresponding to the first search depth with the position of the target node to be exchanged to update the positions of all the nodes in the initial topology graph, calculating the sum of the current connection distances between all the nodes based on the updated positions of all the nodes and the connection relationships between all the nodes, and determining whether the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth;

[0069] The execution module is further configured to, if the judgment module determines that the sum of the current connection distances between all the nodes is greater than or equal to the current optimal distance corresponding to the first search depth, perform a second backtracking operation according to the current search path to determine a second target node and a second target search path corresponding thereto;

[0070] The second target node is a node that cannot be accessed by searching according to the current search path, and the second target search path is determined from all the predetermined search paths that use the second target node as a search starting point.

[0071] As an optional embodiment, in the second aspect of the present invention, the search module is further configured to, after the execution module performs a second backtracking operation according to the current search path, start from the initial position of the second target node and search all the nodes in the initial topology graph according to the second target search path;

[0072] The judgment module is further configured to judge whether a current depth value corresponding to a second search depth is greater than or equal to a second preset depth threshold, wherein the second search depth is a search depth reached by searching according to the second target search path;

[0073] The determining module is further configured to, if the judging module determines that the current depth value corresponding to the second search depth is greater than or equal to the second preset depth threshold, determine a current depth value corresponding to a third target node connected to the second target node, wherein the third target node is a node that has been visited by searching according to the current search path, and the current depth value corresponding to the third target node is determined based on depth information corresponding to the search depth of the third target node in the current search path;

[0074] The device further comprises:

[0075] A first calculation module is configured to calculate a first depth difference between a current depth value corresponding to the second search depth and a current depth value corresponding to the third target node;

[0076] The judging module is further configured to judge whether the first depth difference is greater than or equal to a first preset threshold;

[0077] The execution module is further configured to execute a second intermediate solution if the judgment module determines that the first depth difference is greater than or equal to the first preset threshold.

[0078] As an optional implementation, in the second aspect of the present invention, the search module is further configured to continue searching along the current search path if the judgment module determines that the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth;

[0079] The device further comprises:

[0080] a second calculation module, configured to calculate a second depth difference between a current depth value corresponding to a third search depth and the current depth value corresponding to the first search depth, wherein the third search depth is a search depth reached by continuing to search along the current search path;

[0081] The judging module is further configured to judge whether the second depth difference is greater than or equal to a second preset threshold;

[0082] The execution module is further configured to execute a third intermediate solution if the judgment module determines that the second depth difference is greater than or equal to the second preset threshold.

[0083] A third aspect of the present invention discloses another device for generating a power system network topology diagram, the device comprising:

[0084] a memory storing executable program code;

[0085] a processor coupled to the memory;

[0086] The processor calls the executable program code stored in the memory to execute the method for generating a power system network topology diagram disclosed in the first aspect of the present invention.

[0087] A fourth aspect of the present invention discloses a computer storable medium, wherein the computer storage medium stores computer instructions. When the computer instructions are called, they are used to execute the method for generating a power system network topology diagram disclosed in the first aspect of the present invention.

[0088] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0089] In an embodiment of the present invention, the corresponding nodes and the connection relationships between all nodes can be generated according to the geographic information of the target equipment in the power system and the equipment connection relationship, and the initial topology map can be determined according to the initial positions of all nodes and the connection relationships between all nodes; all nodes in the initial topology map are searched according to a predetermined search path; when the search depth increases, it is determined whether the sum of the current connection distances between all nodes in the initial topology map is less than the current optimal distance according to the node exchange situation; if the judgment result is yes, the current optimal distance is updated to the sum of the current connection distances between all nodes; after all search paths are searched, the topology map formed by the node positions corresponding to the current optimal distance and the connection relationships between all nodes that are finally stored is determined as the target topology map. It can be seen that the implementation of the present invention can improve the effectiveness of displaying power grid relationships, thereby improving the accuracy and effectiveness of displaying and analyzing power grid data. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.

[0091] Figure 1 This is a flow chart of a method for generating a power system network topology diagram disclosed in an embodiment of the present invention;

[0092] Figure 2 This is a flow chart of another method for generating a power system network topology diagram disclosed in an embodiment of the present invention;

[0093] Figure 3 It is a structural schematic diagram of a device for generating a power system network topology diagram disclosed in an embodiment of the present invention;

[0094] Figure 4 It is a structural schematic diagram of another device for generating a power system network topology diagram disclosed in an embodiment of the present invention;

[0095] Figure 5 This is a structural schematic diagram of another device for generating a power system network topology diagram disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0096] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0097] The terms "first," "second," and so on, in the description and claims of the present invention and the accompanying drawings are used to distinguish between different items, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or end comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed therein, or may optionally include other steps or elements inherent to such process, method, product, or end.

[0098] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0099] The present invention discloses a method and apparatus for generating a power system network topology diagram, which can improve the effectiveness of displaying power grid relationships, thereby improving the accuracy and effectiveness of displaying and analyzing power grid data. Detailed descriptions are provided below.

[0100] Example 1

[0101] See also Figure 1 , Figure 1 This is a flow chart of a method for generating a power system network topology diagram disclosed in an embodiment of the present invention. Figure 1 The method for generating a power system network topology map described above can be applied to a device for generating a power system network topology map, or to a cloud server or a local server for generating a power system network topology map, and the embodiment of the present invention does not limit this. Figure 1 As shown, the method for generating the power system network topology diagram may include the following operations:

[0102] 101. Generate corresponding nodes and connection relationships between all nodes based on geographic information and device connection relationships of target devices in the power system.

[0103] In an embodiment of the present invention, the target device may optionally include at least one of power grid devices such as a substation, a distribution room, a ring main unit, a distribution box, and an electric meter. Optionally, the nodes correspond one-to-one to the target devices. Optionally, during the search process, the connection relationships between all nodes remain unchanged, but the locations of the nodes may change, resulting in a change in the sum of the connection distances between all corresponding nodes.

[0104] 102. Determine an initial topology graph based on the initial positions of all nodes and the connection relationships between all nodes.

[0105] In the embodiment of the present invention, the initial topology graph is used to represent the initial positions of all nodes and the connection relationships between all nodes.

[0106] 103. Search all nodes in the initial topology graph according to a predetermined search path.

[0107] In an embodiment of the present invention, optionally, the predetermined search paths may be all search paths that may be generated by a depth-first search. Optionally, the depth-first search may start from a vertex among all nodes and continuously search for adjacent, unvisited vertices. If multiple vertices are found, a vertex is selected and the search continues from the vertex. If none are found, the search returns to the previously visited vertices to see if there are any missed, unvisited nodes. Assuming that the search starts from vertex V, it will eventually return to vertex V. At this time, the depth-first search algorithm will look for a new unvisited vertex from all vertices. If it can be found, the search will continue from the vertex in the same way. If it cannot be found, the algorithm execution ends. Optionally, the order of visiting each vertex in all nodes through depth-first search is not unique, that is, there may be multiple vertex visit sequences.

[0108] In an embodiment of the present invention, optionally, the predetermined search path can also be to enumerate all situations involved in the problem one by one through a loop enumeration, and check which are the solutions to the problem and which should be excluded based on the conditions raised by the problem. Optionally, assuming that the intervention state of the problem is called the initial state, and the final required state is called the target state, the state generated in real time is analyzed and detected through the search until a target state or an optimal state that meets the requirements is obtained. For example, the search process through loop enumeration can be: 1. Select an initial state and start the search from the initial state; 2. Traverse the legal states generated from the initial state, generate a new state and enter recursion; 3. Check whether the new state is the target state. If not, continue traversing and repeat steps 2 to 3.

[0109] 104. When the search depth increases, it is determined whether the sum of the current connection distances between all nodes in the initial topology graph is less than the current optimal distance based on the node exchange situation.

[0110] In the embodiment of the present invention, the current optimal distance is the minimum value of the sum of the connection distances between all nodes stored before the search depth increases.

[0111] In an embodiment of the present invention, each backward search optionally increases the search depth. Optionally, each time the search depth increases, an attempt is made to exchange the currently visited node with the node visited at the previous search depth, and the current optimal distance stored at the current depth before the node exchange is compared with the sum of the current connection distances between all nodes after the node exchange.

[0112] 105. If the judgment result is yes, the current optimal distance is updated to the sum of the current connection distances between all nodes.

[0113] In an embodiment of the present invention, optionally, if the sum of the current connection distances between all nodes after the node exchange is less than the current optimal distance stored at the current depth before the node exchange, the distance value corresponding to the current optimal distance is updated to the sum of the current connection distances between all nodes after the node exchange. Optionally, if the sum of the current connection distances between all nodes after the node exchange is greater than or equal to the current optimal distance stored at the current depth before the node exchange, the current optimal distance is kept unchanged, and the search is continued to increase a search depth. At this time, the current optimal distance corresponding to the increased search depth and used for comparison with the sum of the current connection distances between all nodes after the node exchange is the current optimal distance when the previous search depth remains unchanged.

[0114] In the embodiment of the present invention, the current optimal distance is optionally a variable value. Optionally, the current optimal distance may change or remain unchanged according to the specific situation of node exchange after increasing the search depth.

[0115] 106. After all search paths are searched, a topology graph formed by the node positions corresponding to the current optimal distance and the connection relationships between all nodes that are finally stored is determined as a target topology graph.

[0116] In an embodiment of the present invention, the current optimal distance that is ultimately stored is optionally the sum of the distances between nodes with the smallest distances obtained after repeated node exchanges and comparisons. Optionally, the positions of all nodes corresponding to the sum of the distances between nodes with the smallest distances and the connection relationships between all nodes form a target topology graph.

[0117] It can be seen that implementation Figure 1 The described method for generating a power system network topology map can generate corresponding nodes and connection relationships between all nodes based on the geographic information of the target equipment and the equipment connection relationship in the power system, and determine the initial topology map based on the initial positions of all nodes and the connection relationships between all nodes. All nodes in the initial topology map are searched according to a predetermined search path. When the search depth increases, it is judged based on the node exchange situation whether the sum of the current connection distances between all nodes in the initial topology map is less than the current optimal distance. If the judgment result is yes, the current optimal distance is updated to the sum of the current connection distances between all nodes. After all search paths are searched, the topology map formed by the node positions corresponding to the current optimal distance and the connection relationships between all nodes that are finally stored is determined as the target topology map, which can help improve the effectiveness of displaying power grid relationships, and thereby improve the accuracy and effectiveness of displaying and analyzing power grid data.

[0118] In an optional embodiment, determining the initial topology graph according to the initial positions of all nodes and the connection relationships between all nodes includes:

[0119] Divide the blank topology graph into multiple topology regions, where the number of topology regions is greater than the number of all nodes;

[0120] For each node among all nodes, assign the node to a topological region to determine the initial position of the node, wherein each node corresponds to a topological region;

[0121] The initial topology graph is determined based on the initial positions of all nodes and the connection relationships between all nodes.

[0122] In this optional embodiment, optionally, the blank topology map is divided into multiple topology regions according to the number of all nodes. Optionally, assuming that the number of all nodes is N, the number of topology regions can be 2N to 4N. Optionally, assuming that the length (I): width (J) of the blank topology map is 4:3, the blank topology map is divided into I×J topology regions, and the number of topology regions is 2N. In this case, the equation ①I / J=4 / 3 and the equation ②I×J=2N can be combined to obtain the values ​​of I and J, and then the blank topology map is divided according to the values ​​of I and J.

[0123] In this optional embodiment, optionally, all nodes can be randomly assigned to topological areas in the blank topological map so that each node corresponds to a topological area, and the topological area corresponding to each node is determined as the initial position of the node in the initial topological map.

[0124] It can be seen that implementing this optional embodiment can preliminarily display the relationship between power grid data and power grid by dividing the blank topology map into multiple topology areas and assigning all nodes to the topology areas to determine the initial position of each node in the initial topology.

[0125] In another optional embodiment, searching all nodes in the initial topology graph according to a predetermined search path includes:

[0126] Determine a first target node from all nodes in the initial topology graph according to a first preset rule, and search all nodes in the initial topology graph according to a first target search path starting from an initial position of the first target node, wherein the first target search path is determined from all predetermined search paths that have the first target node as a search starting point;

[0127] After the search for the first target search path is completed, a first backtracking operation is performed according to the first target search path to update the first target node and the first target search path, and the operation of searching all nodes in the initial topology graph according to the first target search path is continued starting from the initial position of the first target node;

[0128] The updated first target node is a node that cannot be accessed when searching according to the first target search path, and the updated first target search path is determined from all pre-determined search paths that use the updated first target node as a search starting point.

[0129] In this optional embodiment, optionally, the first target node is the starting point for the search. Optionally, after the search for the first target search path is completed, the first backtracking operation is used to fall back to the previously visited vertices to see if there are any missed or unvisited nodes. If an unvisited node is found, it is determined as the updated first target node, and the search is continued from the initial position of the updated first target node. Optionally, if there are multiple search paths corresponding to the node, one of them is selected to be determined as the updated first target search path, and the search is performed according to the updated first search path. Optionally, if there are multiple search paths corresponding to the updated first target node, one of them can be randomly selected as the updated first target search path.

[0130] In this optional embodiment, optionally, the first backtracking operation may include: returning to the previous search depth, and judging whether a first node exists based on the depth information corresponding to the previous search depth, the first node being a node that cannot be accessed by searching according to the first search path, and the first node is adjacent to a node that has been visited by searching according to the first search path; if the judgment result is yes, updating the first target node based on the first node to obtain an updated first target node, and starting from the initial position of the updated first target node, searching according to the updated first target search path; if the judgment result is no, continuing to execute the step of returning to the previous search depth, and judging whether a first node exists based on the depth information corresponding to the previous search depth, until the first node is determined.

[0131] In this optional embodiment, optionally, assuming that the traversal starts from V0, ① visit V0 and find that two unvisited vertices can be reached from V0: V1 and V2, so prepare to visit the two vertices V1 and V2; ② visit V1 from V0 and find that one unvisited vertex can be reached from V1: V3; ③ visit V3 from V1, but no unvisited vertex can be reached from V3, so return to V1, but no unvisited vertex can be reached from V1, so it can only return to V0, the fork in the road closest to V3 on the current search path that still has unvisited branch vertices; ④ visit V2 from V0 and find that one unvisited vertex can be reached from V2: V4; ⑤ visit V4 from V2 and find that no unvisited vertex can be reached, so return to V2, but no unvisited vertex can be reached from V2, so return to V0, but no unvisited vertex can be reached from V0, so the depth search ends. In the above process, V0 is the first target node, and V0→V1→V3 is the first target search path; V2 is the updated first target node, and V2→V4 is the second target search path. Optionally, searching all nodes in the initial topology graph according to a predetermined search path can be performed by following a search path until no further progress is possible, then returning to the fork in the path closest to the current vertex with unvisited branches, and then visiting those unvisited branches until the entire graph is traversed.

[0132] It can be seen that the implementation of this optional embodiment can determine the first target node from all nodes according to the first preset rule, and starting from the initial position of the first target node, search all nodes in the initial topology map according to the first target search path. After the search of the first target search path is completed, the first backtracking operation is performed according to the first target search path to update the first target node and the first target search path, and continue to perform the operation of searching all nodes in the initial topology map according to the first target search path starting from the initial position of the first target node, thereby facilitating the completion of the search for all nodes without missing any node, thereby improving the accuracy and effectiveness of the target topology map finally generated.

[0133] In yet another optional embodiment, determining the first target node from all nodes in the initial topology graph according to a first preset rule includes:

[0134] For each node among all nodes, determine the number of all connected nodes corresponding to the node according to the connection relationship between all nodes, wherein the connected nodes are other nodes among all nodes that have a connection relationship with the node;

[0135] A node corresponding to the smallest number of all connected nodes among all nodes is determined as the first target node.

[0136] It can be seen that the implementation of this optional embodiment can determine the number of all connected nodes corresponding to each node based on the connection relationship between all nodes, and determine the node with the smallest number of all connected nodes among all nodes as the first target node, which can help improve the accuracy of determining the first target node.

[0137] Example 2

[0138] See also Figure 2 , Figure 2 This is a flow chart of a method for generating a power system network topology diagram disclosed in an embodiment of the present invention. Figure 2 The method for generating a power system network topology map described above can be applied to a device for generating a power system network topology map, or to a cloud server or a local server for generating a power system network topology map, and the embodiment of the present invention does not limit this. Figure 2 As shown, the method for generating the power system network topology diagram may include the following operations:

[0139] 201. Generate corresponding nodes and connection relationships between all nodes based on geographic information and device connection relationships of target devices in the power system.

[0140] 202. Determine an initial topology graph based on the initial positions of all nodes and the connection relationships between all nodes.

[0141] 203. Search all nodes in the initial topology graph according to a predetermined search path.

[0142] 204. Exchange the position of the source node to be exchanged corresponding to the first search depth with the position of the target node to be exchanged, so as to update the positions of all nodes in the initial topology map.

[0143] In the embodiment of the present invention, the first search depth is the search depth reached by searching according to the current search path.

[0144] In the embodiment of the present invention, each search depth has corresponding depth information, and the depth information at least includes a source node to be exchanged, a target node to be exchanged, and a current optimal distance.

[0145] In an embodiment of the present invention, optionally, the source node to be exchanged may be the node currently visited after increasing a search depth, and the target node to be exchanged may be the node visited at the previous search depth. Optionally, after increasing a search depth, the currently visited node is exchanged with the node visited at the previous search depth, and the current optimal distance stored at the current depth before the node exchange is compared with the sum of the current connection distances between all nodes after the node exchange. If the sum of the current connection distances between all nodes after the node exchange is less than the current optimal distance stored at the current depth before the node exchange, the exchange state of the currently visited node and the node visited at the previous search depth is maintained; if the sum of the current connection distances between all nodes after the node exchange is greater than or equal to the current optimal distance stored at the current depth before the node exchange, the currently visited node is exchanged back with the node visited at the previous search depth. Optionally, the depth information corresponding to each search depth may also include the result of whether the source node to be exchanged and the target node to be exchanged are exchanged.

[0146] 205. Calculate the sum of the current connection distances between all nodes based on the updated positions of all nodes and the connection relationships between all nodes.

[0147] In the embodiment of the present invention, optionally, updating the positions of all nodes may result in updating the connection relationships between all nodes.

[0148] 206. Determine whether the sum of the current connection distances between all nodes is less than the current optimal distance corresponding to the first search depth.

[0149] In the embodiment of the present invention, optionally, the current optimal distance corresponding to the first search depth is the minimum value of the sum of the connection distances between all the nodes stored at the previous search depth corresponding to the first search depth.

[0150] 207. If the judgment result is yes, the current optimal distance is updated to the sum of the current connection distances between all nodes.

[0151] 208. After all search paths are searched, a topology graph formed by the node positions corresponding to the current optimal distance and the connection relationships between all nodes that are finally stored is determined as a target topology graph.

[0152] In the embodiment of the present invention, for other descriptions of steps 201 to 203 and steps 207 to 208, please refer to the detailed description of steps 101 to 106 in the first embodiment, which will not be repeated in the embodiment of the present invention.

[0153] It can be seen that implementation Figure 2The described method for generating a power system network topology map can generate corresponding nodes and connection relationships between all nodes based on the geographic information of target devices in the power system and the device connection relationships, and determine the initial topology map based on the initial positions of all nodes and the connection relationships between all nodes. All nodes in the initial topology map are searched according to a predetermined search path. When the search depth increases, the position of the source node to be exchanged corresponding to the first search depth is exchanged with the position of the target node to be exchanged to update the positions of all nodes in the initial topology map. The sum of the current connection distances between all nodes is calculated based on the updated positions of all nodes and the connection relationships between all nodes, and the current connection distances between all nodes are determined. Whether the sum of the distances is less than the current optimal distance corresponding to the first search depth. If the judgment result is yes, the current optimal distance is updated to the sum of the current connection distances between all nodes, and after all search paths are searched, the topology formed by the node positions corresponding to the current optimal distances and the connection relationships between all nodes that are finally stored is determined as the target topology. This can help to accurately determine the sum of the current connection distances between all nodes and compare it with the current optimal distance based on the exchange of the position of the source node to be exchanged and the position of the target node to be exchanged each time the search depth increases, thereby improving the effectiveness of displaying the power grid relationship, and thereby improving the accuracy and effectiveness of displaying and analyzing power grid data.

[0154] In an optional embodiment, the depth information further includes a current depth value; and the method further includes:

[0155] Determine whether the current depth value corresponding to the first search depth is greater than or equal to a first preset depth threshold;

[0156] If it is determined that the current depth value corresponding to the first search depth is greater than or equal to the first preset depth threshold, a first intermediate solution is executed, wherein the first intermediate solution includes exchanging the position of the source node to be exchanged corresponding to the first search depth with the position of the target node to be exchanged to update the positions of all nodes in the initial topology graph, calculating the sum of the current connection distances between all nodes based on the updated positions of all nodes and the connection relationships between all nodes, and determining whether the sum of the current connection distances between all nodes is less than the current optimal distance corresponding to the first search depth;

[0157] If it is determined that the sum of the current connection distances between all nodes is greater than or equal to the current optimal distance corresponding to the first search depth, a second backtracking operation is performed according to the current search path to determine the second target node and its corresponding second target search path;

[0158] The second target node is a node that cannot be accessed by searching according to the current search path, and the second target search path is determined from all pre-determined search paths that use the second target node as a search starting point.

[0159] In this optional embodiment, the first intermediate solution optionally serves to optimize pruning, reduce the number of searches, and reduce the program running time, that is, under the premise of ensuring correctness, take necessary measures to make the algorithm skip branches that do not contain the target state or the optimal solution, thereby ensuring that the algorithm is carried out efficiently and the target state or the optimal solution is found more quickly.

[0160] In this optional embodiment, optionally, the first intermediate solution is mainly optimized by promptly stopping the search for the search direction that obviously does not contain the target state and switching to searching for the branch that may contain the target state. Optionally, after obtaining the sum of the current connection distances between all nodes through the first intermediate solution, if the sum of the current connection distances between all nodes is greater than or equal to the current optimal distance corresponding to the first search depth, the search according to the current search path is promptly stopped, and other branches that may contain the target state are searched for, that is, the second target node and its corresponding second target search path are determined through a second backtracking operation.

[0161] In this optional embodiment, optionally, the second backtracking operation may include: returning to the previous search depth, and judging whether a second node exists based on the depth information corresponding to the previous search depth, the second node being a node that cannot be accessed by searching according to the second search path, and the second node is adjacent to a node that has been visited by searching according to the second search path; if the judgment result is yes, updating the second target node based on the second node to obtain an updated second target node, and starting from the initial position of the updated second target node, searching according to the updated second target search path; if the judgment result is no, continuing to execute the step of returning to the previous search depth, and judging whether a second node exists based on the depth information corresponding to the previous search depth, until the second node is determined.

[0162] It can be seen that the implementation of this optional embodiment can determine whether the current depth value corresponding to the first search depth is greater than or equal to the first preset depth threshold, and execute the first intermediate solution when the judgment result is yes, and then determine whether the sum of the current connection distances between all nodes corresponding to the execution of the first intermediate solution is greater than or equal to the current optimal distance corresponding to the first search depth, and execute the second backtracking operation when the judgment result is yes, thereby being conducive to reducing the number of depth searches, reducing the calculation of obviously unreasonable solutions, and reducing the program running time, thereby improving the generation speed of the network topology map to be analyzed using the original data of the power grid by improving the search efficiency.

[0163] In another optional embodiment, after performing the second backtracking operation according to the current search path, the method further includes:

[0164] Starting from the initial position of the second target node, search all nodes in the initial topology graph according to the second target search path;

[0165] Determining whether a current depth value corresponding to a second search depth is greater than or equal to a second preset depth threshold, wherein the second search depth is a search depth reached by searching according to the second target search path;

[0166] If it is determined that the current depth value corresponding to the second search depth is greater than or equal to the second preset depth threshold, then determining a current depth value corresponding to a third target node that has a connection relationship with the second target node, wherein the third target node is a node that has been visited by searching according to the current search path, and the current depth value corresponding to the third target node is determined based on depth information corresponding to the search depth of the third target node in the current search path;

[0167] Calculating a first depth difference between a current depth value corresponding to the second search depth and a current depth value corresponding to the third target node;

[0168] It is determined whether the first depth difference is greater than or equal to a first preset threshold. If it is determined that the first depth difference is greater than or equal to the first preset threshold, a second intermediate solution is executed.

[0169] In this optional embodiment, optionally, the specific description of the second intermediate solution refers to the aforementioned specific description of the first intermediate solution.

[0170] In this optional embodiment, the third target node having a connection relationship with the second target node may optionally refer to the second target node being adjacent to the third target node. Optionally, the first depth difference is a search depth spanned when searching from an initial position corresponding to the second target node to a second search depth after finding the second target node adjacent to the third target node.

[0171] It can be seen that the implementation of this optional embodiment can, after re-determining the second target node as the search starting point, determine the current depth value corresponding to the third target node that has a connection relationship with the second target node when the search depth meets the preset depth threshold, and then calculate the first depth difference between the current depth value corresponding to the second search depth and the current depth value corresponding to the third target node, and execute the second intermediate solution when the first depth difference is greater than or equal to the first preset threshold, so that after executing the first intermediate solution, when the number of exchanges meets the preset threshold, the second intermediate solution can be executed, thereby further reducing the number of depth searches, reducing the calculation of obviously unreasonable solutions, and reducing the program running time, thereby improving the generation speed of the network topology map to be analyzed using the original data of the power grid by improving the search efficiency.

[0172] In yet another optional embodiment, the method further includes:

[0173] If it is determined that the sum of the current connection distances between all nodes is less than the current optimal distance corresponding to the first search depth, continue searching along the current search path;

[0174] Calculating a second depth difference between a current depth value corresponding to a third search depth and a current depth value corresponding to the first search depth, wherein the third search depth is a search depth reached by continuing to search along the current search path;

[0175] It is determined whether the second depth difference is greater than or equal to a second preset threshold. If it is determined that the second depth difference is greater than or equal to the second preset threshold, a third intermediate solution is executed.

[0176] In this optional embodiment, the specific description of the third intermediate solution refers to the aforementioned specific description of the first intermediate solution.

[0177] In this optional embodiment, optionally, the second depth difference is a search depth spanned from the first search depth to the third search depth when continuing the search along the current search path.

[0178] It can be seen that the implementation of this optional embodiment can determine that the sum of the current connection distances between all nodes is less than the current optimal distance corresponding to the first search depth, continue the search based on the first search depth, and calculate the second depth difference between the current depth value corresponding to the third search depth and the current depth value corresponding to the first search depth, and execute the third intermediate solution when it is determined that the second depth difference is greater than or equal to the second preset threshold, thereby further reducing the number of depth searches, reducing the calculation of obviously unreasonable solutions, and reducing the program running time, thereby improving the generation speed of the network topology map to be analyzed using the original data of the power grid by improving the search efficiency.

[0179] Example 3

[0180] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a device for generating a power system network topology diagram disclosed in an embodiment of the present invention. Figure 3 As shown, the device for generating the power system network topology diagram may include:

[0181] A generation module 301 is used to generate corresponding nodes and connection relationships between all nodes based on the geographic information and device connection relationships of the target device in the power system;

[0182] A determination module 302 is configured to determine an initial topology map based on the initial positions of all nodes and the connection relationships between all nodes, wherein the initial topology map is used to represent the initial positions of all nodes and the connection relationships between all nodes;

[0183] Search module 303, used to search all nodes in the initial topology graph according to a predetermined search path;

[0184] A judgment module 304 is configured to determine, when the search depth increases, whether the sum of the current connection distances between all nodes in the initial topology graph is less than the current optimal distance based on the node exchange status, wherein the current optimal distance is the minimum value of the sum of the connection distances between all nodes stored before the search depth increases;

[0185] Update module 305, for updating the current optimal distance to the sum of the current connection distances between all nodes if the judgment result is yes;

[0186] The determination module 302 is further configured to determine, after all search paths are searched, a topology formed by the node positions corresponding to the current optimal distance and the connection relationships between all nodes that are finally stored as a target topology.

[0187] It can be seen that implementation Figure 3 The described device can generate corresponding nodes and connection relationships between all nodes based on the geographic information of the target equipment and the equipment connection relationship in the power system, and determine the initial topology map based on the initial positions of all nodes and the connection relationships between all nodes, and search all nodes in the initial topology map according to a predetermined search path. When the search depth increases, it is judged according to the node exchange situation whether the sum of the current connection distances between all nodes in the initial topology map is less than the current optimal distance. If the judgment result is yes, the current optimal distance is updated to the sum of the current connection distances between all nodes. After all search paths are searched, the topology map formed by the node positions corresponding to the current optimal distance and the connection relationships between all nodes that are finally stored is determined as the target topology map, which can help improve the effectiveness of displaying power grid relationships, and thereby improve the accuracy and effectiveness of displaying and analyzing power grid data.

[0188] In an optional embodiment, the specific manner in which the determination module 302 determines the initial topology graph according to the initial positions of all nodes and the connection relationships between all nodes is as follows:

[0189] Divide the blank topology graph into multiple topology regions, where the number of topology regions is greater than the number of all nodes;

[0190] For each node among all nodes, assign the node to a topological region to determine the initial position of the node, wherein each node corresponds to a topological region;

[0191] The initial topology graph is determined based on the initial positions of all nodes and the connection relationships between all nodes.

[0192] It can be seen that the device described in this optional embodiment can divide the blank topology map into multiple topology areas and assign all nodes to the topology areas to determine the initial position of each node in the initial topology, thereby being able to preliminarily display the power grid relationship and power grid data.

[0193] In another optional embodiment, the specific manner in which the search module 303 searches all nodes in the initial topology graph according to a predetermined search path is:

[0194] Determine a first target node from all nodes in the initial topology graph according to a first preset rule, and search all nodes in the initial topology graph according to a first target search path starting from an initial position of the first target node, wherein the first target search path is determined from all predetermined search paths that have the first target node as a search starting point;

[0195] After the search for the first target search path is completed, a first backtracking operation is performed according to the first target search path to update the first target node and the first target search path, and the operation of searching all nodes in the initial topology graph according to the first target search path is continued starting from the initial position of the first target node;

[0196] The updated first target node is a node that cannot be accessed when searching according to the first target search path, and the updated first target search path is determined from all pre-determined search paths that use the updated first target node as a search starting point.

[0197] It can be seen that the device described in this optional embodiment can determine the first target node from all nodes according to the first preset rule, and starting from the initial position of the first target node, search all nodes in the initial topology map according to the first target search path. After the search of the first target search path is completed, a first backtracking operation is performed according to the first target search path to update the first target node and the first target search path, and continue to perform the operation of searching all nodes in the initial topology map according to the first target search path starting from the initial position of the first target node, thereby facilitating the completion of the search for all nodes without missing any node, thereby improving the accuracy and effectiveness of the target topology map finally generated.

[0198] In another optional embodiment, the specific manner in which the search module 303 determines the first target node from all nodes in the initial topology graph according to the first preset rule is:

[0199] For each node among all nodes, determine the number of all connected nodes corresponding to the node according to the connection relationship between all nodes, wherein the connected nodes are other nodes among all nodes that have a connection relationship with the node;

[0200] A node corresponding to the smallest number of all connected nodes among all nodes is determined as the first target node.

[0201] It can be seen that the device described in this optional embodiment can determine the number of all connected nodes corresponding to each node based on the connection relationship between all nodes, and determine the node with the smallest number of all connected nodes among all nodes as the first target node, which can help improve the accuracy of determining the first target node.

[0202] In yet another optional embodiment, the search depth has corresponding depth information, and the depth information includes at least a source node to be exchanged, a target node to be exchanged, and a current optimal distance;

[0203] The specific method in which the judgment module 304 judges whether the sum of the current connection distances between all nodes in the initial topology graph is less than the current optimal distance according to the node exchange situation is:

[0204] Swapping the position of the source node to be exchanged with the position of the target node to be exchanged corresponding to the first search depth to update the positions of all nodes in the initial topology graph, wherein the first search depth is the search depth reached by searching according to the current search path;

[0205] Calculate the sum of the current connection distances between all nodes based on the updated positions of all nodes and the connection relationships between all nodes;

[0206] Determine whether the sum of the current connection distances between all nodes is less than the current optimal distance corresponding to the first search depth.

[0207] It can be seen that the device described in this optional embodiment can help to accurately determine the sum of the current connection distances between all nodes and compare it with the current optimal distance based on the exchange of the position of the source node to be exchanged and the position of the target node to be exchanged each time the search depth increases, thereby helping to improve the effectiveness of displaying the power grid relationship, and thus improve the accuracy and effectiveness of displaying and analyzing power grid data.

[0208] In yet another optional embodiment, the depth information further includes a current depth value;

[0209] The judging module 304 is further configured to judge whether the current depth value corresponding to the first search depth is greater than or equal to a first preset depth threshold;

[0210] like Figure 4 As shown, the device also includes:

[0211] An execution module 306 is configured to execute a first intermediate solution if the judgment module 304 determines that the current depth value corresponding to the first search depth is greater than or equal to a first preset depth threshold, wherein the first intermediate solution includes exchanging the position of the source node to be exchanged corresponding to the first search depth with the position of the target node to be exchanged to update the positions of all nodes in the initial topology graph, calculating the sum of the current connection distances between all nodes based on the updated positions of all nodes and the connection relationships between all nodes, and determining whether the sum of the current connection distances between all nodes is less than the current optimal distance corresponding to the first search depth;

[0212] The execution module 306 is further configured to perform a second backtracking operation according to the current search path to determine a second target node and a second target search path corresponding to the second target node if the determination module 304 determines that the sum of the current connection distances between all nodes is greater than or equal to the current optimal distance corresponding to the first search depth;

[0213] The second target node is a node that cannot be accessed by searching according to the current search path, and the second target search path is determined from all pre-determined search paths that use the second target node as a search starting point.

[0214] It can be seen that the device described in this optional embodiment can determine whether the current depth value corresponding to the first search depth is greater than or equal to the first preset depth threshold, and execute the first intermediate plan when the judgment result is yes, and then determine whether the sum of the current connection distances between all nodes corresponding to the execution of the first intermediate plan is greater than or equal to the current optimal distance corresponding to the first search depth, and execute the second backtracking operation when the judgment result is yes, which can help reduce the number of depth searches, reduce the calculation of obviously unreasonable plans, and reduce the program running time, and then improve the generation speed of the network topology map to be analyzed using the original data of the power grid by improving the search efficiency.

[0215] In another optional embodiment, the search module 303 is further configured to search all nodes in the initial topology graph according to the second target search path starting from the initial position of the second target node after the execution module performs the second backtracking operation according to the current search path;

[0216] The judgment module 304 is further configured to judge whether a current depth value corresponding to a second search depth is greater than or equal to a second preset depth threshold, wherein the second search depth is a search depth reached by searching according to the second target search path;

[0217] The determination module 302 is further configured to determine a current depth value corresponding to a third target node connected to the second target node if the judgment module 304 determines that the current depth value corresponding to the second search depth is greater than or equal to a second preset depth threshold, wherein the third target node is a node that has been visited by searching according to the current search path, and the current depth value corresponding to the third target node is determined based on depth information corresponding to the search depth of the third target node in the current search path;

[0218] like Figure 4 As shown, the device also includes:

[0219] A first calculation module 307 is configured to calculate a first depth difference between a current depth value corresponding to the second search depth and a current depth value corresponding to the third target node;

[0220] The judging module 304 is further configured to judge whether the first depth difference is greater than or equal to a first preset threshold;

[0221] The execution module 306 is further configured to execute the second intermediate solution if the judgment module 304 determines that the first depth difference is greater than or equal to the first preset threshold.

[0222] It can be seen that the device described in this optional embodiment can, after re-determining the second target node as the search starting point, determine the current depth value corresponding to the third target node that has a connection relationship with the second target node when the search depth meets the preset depth threshold, and then calculate the first depth difference between the current depth value corresponding to the second search depth and the current depth value corresponding to the third target node, and execute the second intermediate solution when the first depth difference is greater than or equal to the first preset threshold, so that after executing the first intermediate solution, when the number of exchanges meets the preset threshold, the second intermediate solution can be executed, thereby further reducing the number of depth searches, reducing the calculation of obviously unreasonable solutions, and reducing the program running time, thereby improving the generation speed of the network topology map to be analyzed using the original data of the power grid by improving the search efficiency.

[0223] In another optional embodiment, the search module 303 is further configured to continue searching along the current search path if the judgment module determines that the sum of the current connection distances between all nodes is less than the current optimal distance corresponding to the first search depth;

[0224] like Figure 4 As shown, the device also includes:

[0225] A second calculation module 308 is configured to calculate a second depth difference between a current depth value corresponding to a third search depth and a current depth value corresponding to the first search depth, wherein the third search depth is a search depth reached by continuing to search along the current search path;

[0226] The judging module 304 is further configured to judge whether the second depth difference is greater than or equal to a second preset threshold;

[0227] The execution module 306 is further configured to execute a third intermediate solution if the judgment module 304 determines that the second depth difference is greater than or equal to a second preset threshold.

[0228] It can be seen that the device described in this optional embodiment is able to determine that the sum of the current connection distances between all nodes is less than the current optimal distance corresponding to the first search depth, continue searching based on the first search depth, and calculate the second depth difference between the current depth value corresponding to the third search depth and the current depth value corresponding to the first search depth, and execute the third intermediate solution when it is determined that the second depth difference is greater than or equal to the second preset threshold, thereby further reducing the number of depth searches, reducing the calculation of obviously unreasonable solutions, and reducing the program running time, thereby improving the generation speed of the network topology map to be analyzed using the original data of the power grid by improving the search efficiency.

[0229] Example 4

[0230] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of another device for generating a power system network topology diagram disclosed in an embodiment of the present invention. Figure 5 As shown, the device for generating the power system network topology diagram may include:

[0231] A memory 501 storing executable program code;

[0232] a processor 502 coupled to the memory 501;

[0233] The processor 502 calls the executable program code stored in the memory 501 to execute the steps of the method for generating a power system network topology map described in the first embodiment or the second embodiment of the present invention.

[0234] Example 5

[0235] An embodiment of the present invention discloses a computer storage medium storing computer instructions. When the computer instructions are called, they are used to execute the steps in the method for generating a power system network topology diagram described in Embodiment 1 or Embodiment 2 of the present invention.

[0236] Example 6

[0237] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the method for generating a power system network topology map described in Example 1 or Example 2.

[0238] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Those skilled in the art can understand and implement the present invention without inventive effort.

[0239] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the above technical solution, in essence, or the portion that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0240] Finally, it should be noted that the method and device for generating a power system network topology diagram disclosed in the embodiment of the present invention only disclose a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that it is still possible to modify the technical solutions recorded in the aforementioned embodiments, or to replace some of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for generating a power system network topology diagram, characterized in that: The method comprises: Generate corresponding nodes and connection relationships between all nodes based on geographic information and device connection relationships of target devices in the power system, and determine an initial topology map based on initial positions of all nodes and connection relationships between all nodes, wherein the initial topology map is used to represent the initial positions of all nodes and connection relationships between all nodes; Searching all the nodes in the initial topology graph according to a predetermined search path; When the search depth increases, judging whether the sum of the current connection distances between all the nodes in the initial topology graph is less than the current optimal distance according to the node exchange situation, wherein the current optimal distance is the minimum value of the sum of the connection distances between all the nodes stored before the search depth increases; If the judgment result is yes, then the current optimal distance is updated to the sum of the current connection distances between all the nodes; After all the search paths are searched, a topology graph formed by the node positions corresponding to the current optimal distance and the connection relationships between all the nodes that are finally stored is determined as a target topology graph.

2. The method for generating a power system network topology diagram according to claim 1, wherein: Determining the initial topology graph according to the initial positions of all the nodes and the connection relationships between all the nodes includes: Dividing the blank topological map into a plurality of topological regions, wherein the number of the topological regions is greater than the number of all the nodes; For each of all the nodes, assign the node to the topological area to determine an initial position of the node, wherein each of the nodes corresponds to one topological area; An initial topology graph is determined based on the initial positions of all the nodes and the connection relationships between all the nodes.

3. The method for generating a power system network topology diagram according to claim 1, wherein: The searching of all the nodes in the initial topology graph according to a predetermined search path includes: Determining a first target node from all the nodes in the initial topology map according to a first preset rule, and searching all the nodes in the initial topology map according to a first target search path starting from an initial position of the first target node, wherein the first target search path is determined from all the predetermined search paths that have the first target node as a search starting point; After the search for the first target search path is completed, performing a first backtracking operation according to the first target search path to update the first target node and the first target search path, and continuing to perform the operation of searching all the nodes in the initial topology graph according to the first target search path starting from the initial position of the first target node; The updated first target node is a node that cannot be accessed when searching according to the first target search path, and the updated first target search path is determined from all the predetermined search paths with the updated first target node as the search starting point.

4. The method for generating a power system network topology diagram according to claim 3, wherein: The determining of the first target node from all the nodes in the initial topology graph according to a first preset rule includes: For each of all the nodes, determine the number of all connected nodes corresponding to the node according to the connection relationships between all the nodes, wherein the connected nodes are other nodes in all the nodes that have a connection relationship with the node; A node corresponding to the smallest number of connected nodes among all the nodes is determined as a first target node.

5. The method for generating a power system network topology diagram according to claim 1, wherein: The search depth has corresponding depth information, and the depth information at least includes a source node to be exchanged, a target node to be exchanged, and a current optimal distance; The determining, based on the node exchange situation, whether the sum of the current connection distances between all the nodes in the initial topology graph is less than the current optimal distance includes: Exchanging the position of the source node to be exchanged with the position of the target node to be exchanged corresponding to a first search depth, so as to update the positions of all the nodes in the initial topology graph, wherein the first search depth is the search depth reached by searching according to the current search path; Calculating the sum of current connection distances between all the nodes based on the updated positions of all the nodes and the connection relationships between all the nodes; It is determined whether the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth.

6. The method for generating a power system network topology diagram according to claim 5, characterized in that: The depth information also includes a current depth value; and the method further includes: Determining whether a current depth value corresponding to the first search depth is greater than or equal to a first preset depth threshold; If it is determined that the current depth value corresponding to the first search depth is greater than or equal to the first preset depth threshold, a first intermediate solution is executed, wherein the first intermediate solution includes exchanging the position of the source node to be exchanged corresponding to the first search depth with the position of the target node to be exchanged to update the positions of all the nodes in the initial topology graph, calculating the sum of the current connection distances between all the nodes based on the updated positions of all the nodes and the connection relationships between all the nodes, and determining whether the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth; If it is determined that the sum of the current connection distances between all the nodes is greater than or equal to the current optimal distance corresponding to the first search depth, performing a second backtracking operation according to the current search path to determine a second target node and its corresponding second target search path; The second target node is a node that cannot be accessed by searching according to the current search path, and the second target search path is determined from all the predetermined search paths that use the second target node as a search starting point.

7. The method for generating a power system network topology diagram according to claim 6, characterized in that: After performing the second backtracking operation according to the current search path, the method further includes: Starting from the initial position of the second target node, searching all the nodes in the initial topology graph according to the second target search path; Determining whether a current depth value corresponding to a second search depth is greater than or equal to a second preset depth threshold, wherein the second search depth is a search depth reached by searching according to the second target search path; If it is determined that the current depth value corresponding to the second search depth is greater than or equal to the second preset depth threshold, determining a current depth value corresponding to a third target node that has a connection relationship with the second target node, wherein the third target node is a node that has been visited by searching according to the current search path, and the current depth value corresponding to the third target node is determined based on depth information corresponding to the search depth of the third target node in the current search path; Calculating a first depth difference between a current depth value corresponding to the second search depth and a current depth value corresponding to the third target node; It is determined whether the first depth difference is greater than or equal to a first preset threshold. If it is determined that the first depth difference is greater than or equal to the first preset threshold, a second intermediate solution is executed.

8. The method for generating a power system network topology diagram according to claim 6, wherein: The method further comprises: If it is determined that the sum of the current connection distances between all the nodes is less than the current optimal distance corresponding to the first search depth, continue searching according to the current search path; Calculating a second depth difference between a current depth value corresponding to a third search depth and a current depth value corresponding to the first search depth, wherein the third search depth is a search depth reached by continuing to search along the current search path; It is determined whether the second depth difference is greater than or equal to a second preset threshold. If it is determined that the second depth difference is greater than or equal to the second preset threshold, a third intermediate solution is executed.

9. A device for generating a power system network topology diagram, characterized in that: The device comprises: A generation module, configured to generate corresponding nodes and connection relationships between all nodes based on geographic information of target devices and device connection relationships in the power system; a determination module, configured to determine an initial topology graph based on the initial positions of all the nodes and the connection relationships between all the nodes, wherein the initial topology graph is used to represent the initial positions of all the nodes and the connection relationships between all the nodes; A search module, configured to search all the nodes in the initial topology graph according to a predetermined search path; a judgment module, configured to judge, when the search depth increases, whether the sum of the current connection distances between all the nodes in the initial topology graph is less than the current optimal distance based on the node exchange situation, wherein the current optimal distance is the minimum value of the sum of the connection distances between all the nodes stored before the search depth increases; An updating module, configured to update the current optimal distance to the sum of the current connection distances between all the nodes if the judgment result is yes; The determination module is further configured to determine, after all the search paths are searched, a topology graph formed by the node positions corresponding to the current optimal distance and the connection relationships between all the nodes that are finally stored as a target topology graph.

10. A device for generating a power system network topology diagram, characterized in that: The device comprises: a memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method for generating a power system network topology map according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for determining topological structure diagram of electric power communication network

    CN105681099A

  • Topological map presentation system, topological map presentation method, and computer readable recording medium

    US20200336387A1