An inverse-time interactive rapid sorting method for topological similarity of massive power grids
By adopting the inverse-time interactive massive power grid topological similarity fast sorting method in power grid management, and using editing distance and interactive indicators, the problem of quickly finding the highest similarity chart in the massive power grid topological map is solved, which significantly improves the efficiency of grid topological similarity sorting, and supports the formulation of new grid equipment startup and fault recovery plans.
Patent Information
- Application Number
- CN202210734775.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-06-27
AI Technical Summary
How to quickly find the most similar grid topology diagram from the massive power grid topology diagram to provide reference for the preparation of new grid equipment startup plans and the formulation of recovery plans after power system failure.
The inverse time-limit interactive massive power grid topological similarity quick sorting method is adopted, and the inverse time-limit interaction index is constructed by defining the edit distance between the power grid topological maps as a similarity indicator, and the edit distance horizontal similarity comparison coefficient and vertical time comparison coefficient are used to construct the inverse time-limit interaction index to achieve the similarity quick sorting of the power grid topological map.
It effectively improves the efficiency of grid topological similarity sorting, and can quickly find the most similar graphs in the massive grid topological graph, thus supporting key decisions in grid management and maintenance.
Smart Images

Figure CN115329117B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid management and maintenance, and in particular to an inverse-time interactive rapid sorting method for the similarity of massive power grid topologies. Background Art
[0002] With the development of science and technology, the scale of graph data generated in the fields of the Internet and electricity has increased explosively. It is of great significance to effectively analyze and mine large-scale graph data to obtain the important information contained in the graph. Among them, how to compare the similarity of graphs and perform graph similarity sorting is an important research branch in the field of graph research, and current intelligent graph recognition is facing severe challenges.
[0003] The similarity of power grid topologies refers to the degree of similarity between power grid topologies. The comparison and sorting of the similarity of power grid topologies are of great significance in the fields of power grid new equipment start-up plan preparation, power system post-fault restoration plan formulation, etc. During the preparation of power grid new equipment start-up plans and the formulation of power system post-fault restoration plans, it is necessary to find the power grid topology structure with the highest similarity from a large number of power grid topology diagrams, and use the historical start-up plan and restoration plan of the power grid topology structure with the highest similarity as a reference for the formulation of the current power grid topology start-up plan and restoration plan.
[0004] Therefore, how to quickly sort the similarity of a large number of power grid topology diagrams and quickly find the power grid topology diagram with the highest similarity from a large number of power grid topology diagrams has become a major problem in power grid management and maintenance. Summary of the Invention
[0005] In order to overcome the defects in the above-mentioned prior art, the present invention provides an inverse-time interactive rapid sorting method for the similarity of massive power grid topologies, which can realize the comparison and sorting of the similarity of power grid topologies, and can find the power grid topology with the highest similarity from a large number of power grid topologies, thereby providing a reference for the fields of power grid new equipment start-up plan preparation, power system post-fault restoration plan formulation, etc.
[0006] To achieve the above object, the present invention adopts the following technical solutions, including:
[0007] An inverse-time interactive rapid sorting method for the similarity of massive power grid topologies, comprising the following steps:
[0008] S1, defining a similarity index: taking the edit distance between two power grid topology diagrams as the similarity index between the two power grid topology diagrams. Among them, the smaller the edit distance d(A, B) between power grid topology diagram A and power grid topology diagram B, the higher the similarity between power grid topology diagram A and power grid topology diagram B;
[0009] The solution method of the edit distance d(A, B) between power grid topology diagram A and power grid topology diagram B is as follows:
[0010] For power grid topology diagrams A and B, through a series of editing operations, make power grid topology diagram A isomorphic to power grid topology diagram B;
[0011] The sequence composed of this series of editing operations is called an editing path. Each editing operation corresponds to an editing cost value. The sum of the editing cost values of this series of editing operations is called the path cost value of the editing path; By searching for the path with the minimum path cost value, the optimal editing path is found. Take the minimum path cost value corresponding to this optimal editing path as the editing distance for power grid topology diagram A to be isomorphic to power grid topology diagram B, that is, the editing distance d(A, B) between power grid topology diagrams A and B;
[0012] S2. According to the similarity index, obtain the similarity ranking of power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G = {g i |i = 1, 2…n}, where g i represents the i-th power grid topology diagram in the power grid topology diagram library G, i = 1, 2…n, that is, there are n power grid topology diagrams in the power grid topology diagram library G; The specific process is as follows:
[0013] Compare power grid topology diagram q with each power grid topology diagram in the established power grid topology diagram library G one by one, and respectively obtain the editing distance for power grid topology diagram q to be isomorphic to each power grid topology diagram. Sort them in ascending order of the editing distance to obtain the similarity ranking of power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G, and it is a similarity ranking from high to low.
[0014] Preferably, in step S2, to obtain the similarity ranking of power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G = {g i |i = 1, 2…n}, the following method can also be specifically adopted:
[0015] S21. Perform the k-th iteration, and the search time t k :
[0016] t k = k·Δt
[0017] where k represents the number of iterations, k = 1, 2, 3...; Δt is the time increment for each iteration, and Δt is a fixed value;
[0018] S22. In the k-th iteration, respectively solve the editing distance between power grid topology diagram q and each power grid topology diagram in the power grid topology library G at the k-th iteration;
[0019] Among them, the editing distance between power grid topology diagram q and the i-th power grid topology diagram g iCompare the search time t at the k-th iteration k Perform path search within it, traverse multiple editing paths to find the editing path with the minimum path cost value, and use the minimum path cost value as the editing distance from the power grid topology map q to the i-th power grid topology map g at the k-th iteration i Isomorphic, that is, the editing distance between the power grid topology map q and the i-th power grid topology map g at the k-th iteration i The editing distance d between them k (q, g i ) i = 1, 2…n;
[0020] S23, Sort the editing distances between the power grid topology map q at the k-th iteration and each power grid topology map in the power grid topology library G in ascending order to obtain the similarity ranking of the power grid topology map q at the k-th iteration and each power grid topology map in the power grid topology library G, and it is a ranking from high to low similarity;
[0021] S24, Determine whether k is greater than 1. If so, perform step S25. If not, add 1 to the value of k and jump to step S21 to directly perform the next iteration;
[0022] S25, Calculate the horizontal similarity comparison coefficient h of the editing distance at the k-th iteration k :
[0023]
[0024] Among them, sort k (g i ) represents the similarity ranking number of the power grid topology map q at the k-th iteration and the i-th power grid topology map g i The similarity ranking number, min(d k (q, G)) represents the minimum value of the editing distances between the power grid topology map q at the k-th iteration and all power grid topology maps in the power grid topology library G; α is the relaxation factor for horizontal similarity comparison;
[0025] S26, Calculate the vertical time comparison coefficient z of the editing distance at the k-th iteration k :
[0026]
[0027] Among them, d k-1 (q, g i ) represents the editing distance between the power grid topology map q at the (k - 1)-th iteration, that is, the previous iteration, and the i-th power grid topology map g i The editing distance between them; β is the relaxation factor for vertical time comparison;
[0028] S27, Calculate the inverse time interaction index value ITI at the k-th iteration k :
[0029]
[0030] where λ is the time relaxation factor and t k is the search time for the k-th iteration;
[0031] S28. Determine whether the inverse-time interaction index value ITI for the k-th iteration k is less than the precision threshold ε, and determine whether the current iteration number k is greater than the maximum iteration number K;
[0032] If the inverse-time interaction index value ITI for the k-th iteration k is less than the precision threshold ε, or the current iteration number k is greater than the maximum iteration number K, then output the similarity ranking for the k-th iteration to obtain the final similarity ranking of the power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G;
[0033] Otherwise, increment the value of k by 1, jump to step S21 to directly perform the next iteration until the inverse-time interaction index value is less than the precision threshold ε or the iteration number reaches the maximum iteration number K, to obtain the final similarity ranking of the power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G.
[0034] Preferably, the editing operations include: node deletion, edge deletion, node insertion, edge insertion, node label transformation, and edge label transformation.
[0035] The advantages of the present invention are as follows:
[0036] (1) The present invention constructs a similarity index between power grid topology diagrams, i.e., the edit distance between power grid topology diagrams, and uses the edit distance between two power grid topology diagrams to measure the power grid topology similarity, which can realize the comparison and ranking of power grid topology similarities, and can find the power grid topology with the highest similarity from a large number of power grid topologies, thus providing a reference for fields such as the preparation of power grid new equipment startup plans and the formulation of power system post-fault restoration plans.
[0037] (2) The present invention calculates the similarity ranking of power grid topology diagrams to obtain the power grid topology structure with the highest similarity, and can prepare a power grid new equipment startup plan and a power system new fault restoration plan with reference to its historical power grid equipment startup plan and power system post-fault restoration plan.
[0038] (3) The present invention proposes an inverse-time interactive rapid sorting method for the similarity of massive power grid topologies. First, considering that the similarity sorting of power grid topology diagrams changes with the increase of the solution time, an editing distance horizontal similarity comparison coefficient is proposed. Second, considering that the value of the editing distance between the power grid topology diagrams to be compared changes with the increase of the solution time, an editing distance vertical time comparison coefficient is proposed. Finally, by combining the two, an inverse-time interactive index is constructed to effectively determine whether the current sorting can be used as the final sorting, converting the accurate solution of the editing distance into an approximate solution of the editing distance. For the purpose of judging the similarity sorting of power grid topologies, the editing distance is not accurately solved, overcoming the problems of long time consumption and low efficiency in the process of comparing and sorting the similarity of power grid topologies by the traditional depth-first algorithm, and greatly improving the sorting efficiency of the similarity of power grid topologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart of the method for sorting the similarity of power grid topology diagrams.
[0040] Figure 2 It is a schematic diagram of the construction process of the power grid topology diagram.
[0041] Figure 3 It is a schematic diagram of the process of the power grid topology diagram A being isomorphic to the power grid topology diagram B.
[0042] Figure 4 It is a flowchart of the method for sorting the similarity of the power grid topology diagram by constructing an inverse-time interactive index.
[0043] Figure 5 It is a schematic diagram of each power grid topology diagram in the power grid topology library G in Embodiment 3.
[0044] Figure 6 It is a schematic diagram of the power grid topology diagram of double busbars with single sectioning (1).
[0045] Figure 7 It is an ITI curve diagram when each power grid topology diagram in the power grid topology library G1 in Embodiment 3 is compared with three power grid topology diagrams of single busbar without sectioning (1), double busbar without sectioning (1), and double busbar with single sectioning (1) respectively.
[0046] Figure 8 It is a schematic diagram of the editing distance results between the power grid topology diagrams in the power grid topology library G2. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0048] Example 1
[0049] Example 1 provides a method for quickly sorting the similarities of a large number of power grid topologies. First, a power grid topology graph library is established; second, a similarity index between power grid topology graphs is constructed, that is, the edit distance between power grid topology graphs (Graph Edit Distance of Power Grid Topology, PGT-GED); finally, the power grid topology graph is compared one by one with each power grid topology graph in the established power grid topology graph library, and the edit distances of the power grid topology graph isomorphic to each power grid topology graph are calculated respectively, and sorted in ascending order of the edit distance to obtain the similarity sorting of the power grid topology graph and each power grid topology graph in the power grid topology graph library, and the similarity sorting is from high to low. The similarity sorting is performed by accurately solving the edit distance.
[0050] As Figure 1 shown, a method for quickly sorting the similarities of a large number of power grid topologies is carried out in the following specific steps:
[0051] S1. Establish a power grid topology graph library G, G = {g i | i = 1, 2…n};
[0052] where g i represents the i-th power grid topology graph in the power grid topology graph library G, i = 1, 2…n, that is, there are n power grid topology graphs in the power grid topology graph library G.
[0053] The process of step S1 is specifically as follows:
[0054] S11. Construct a power grid topology knowledge representation framework based on the Resource Description Framework Schema (RDFS):
[0055] Use RDFS to construct a power grid topology knowledge representation framework, and use "head entity, entity relationship, tail entity", class and attributes to describe the power grid topology. Define "power grid topology" as the parent class, define all specific devices in the topology as "entities", and define the overall type to which all devices belong as "class". The classes of devices include busbars, substations, lines, disconnecting switches, line switches, bus coupler switches, sectionalizing switches, main transformers, lightning arresters, voltage transformers, etc. At the same time, each device also has several attributes; for example, for the entity "Line AB", its class is "line", the parent class is "power grid topology", and the attributes it has are "substation: A station" and "voltage level: 110 kV", etc.
[0056] S12. After obtaining the power grid topology knowledge representation framework in step S11, use Neo4j software to construct a power grid topology knowledge graph library. Entities in the knowledge graph correspond to nodes in the graph database, the relationships between entities correspond to edges in the graph database, and the types and attributes in the knowledge graph belong to the nodes and edges in the graph database. Therefore, abstract the entities of the power grid topology as nodes connected according to the actual topological relationship, add descriptions such as "parent class", "class", and "attribute" to the nodes, and name the edges connecting the nodes as "connection" to represent the relationship between nodes;
[0057] Define the undirected labeled power grid topology M as consisting of 4 parts M = {V M , E M , ζ V M , ζ E M}, where V M is the equipment node in the power grid topology M, E M is the undirected connection relationship between equipment nodes in the power grid topology M, ζ V M is the label of the nodes in the power grid topology M, ζ E M is the label of the edges in the power grid topology M.
[0058] In this embodiment, according to the power grid topology knowledge graph library, the process of constructing the power grid topology map is as Figure 2 shown: "AB line", "1 disconnecting switch", "AB switch", "bus 2", etc. are "equipment nodes", the relationships between "AB line" and "1 disconnecting switch", and between "1 disconnecting switch" and "AB switch" are "undirected connection relationships", and the "node labels" of "AB line", "1 disconnecting switch", "AB switch", and "bus 2" can be set as "line", "disconnecting switch", "switch", and "bus" respectively, and the "edge labels" connected between "AB line" and "1 disconnecting switch", and between "1 disconnecting switch" and "AB switch" can be set as "connection".
[0059] S2. Construct a similarity index between power grid topology maps, and use the edit distance between two power grid topology maps as the similarity index between the two power grid topology maps. Among them, the smaller the edit distance d(A, B) between power grid topology map A and power grid topology map B, the higher the similarity between power grid topology map A and power grid topology map B;
[0060] For power grid topology map A and power grid topology map B, through a series of editing operations, including node deletion, edge deletion, node insertion, edge insertion, node label transformation, edge label transformation, etc., make power grid topology map A isomorphic to power grid topology map B;
[0061] Under different mappings, the sequence composed of this series of editing operations is called an editing path. Each editing operation corresponds to an editing cost value, and the sum of the editing cost values of this series of editing operations is called the path cost value of the editing path. By searching for the editing path with the minimum path cost value through path search, that is, the optimal editing path, the minimum path cost value corresponding to this optimal editing path is used as the editing distance between the power grid topology graph A and the power grid topology graph B being isomorphic, that is, the editing distance d(A, B) between the power grid topology graph A and the power grid topology graph B. The smaller the editing distance d(A, B) between the power grid topology graph A and the power grid topology graph B being isomorphic, the higher the similarity between the power grid topology graph A and the power grid topology graph B.
[0062] As Figure 3 shown, the editing path for the power grid topology graph A to be isomorphic to the power grid topology graph B can be: deleting the node "AC line", deleting the connection edge between the AC line node and the 1 disconnect switch node, deleting the node "1 disconnect switch", and deleting the connection edge between the 1 disconnect switch node and the AC switch node. If the cost of each editing operation is set to 1, then the editing distance d(A, B) for the power grid topology graph A to be isomorphic to the power grid topology graph B under this editing path is 4.
[0063] S3. According to the power grid topology knowledge graph library, construct the power grid topology graph q for the new power grid, and obtain the similarity ranking of the power grid topology graph q with each power grid topology graph in the power grid topology graph library G = {g i | i = 1, 2…n}:
[0064] Compare the power grid topology graph q with each power grid topology graph in the established power grid topology graph library G one by one, respectively obtain the editing distance for the power grid topology graph q to be isomorphic to each power grid topology graph, and sort them in ascending order of the editing distance to obtain the similarity ranking of the power grid topology graph q with each power grid topology graph in the power grid topology graph library G, and it is a similarity ranking from high to low;
[0065] In Embodiment 1, when using the editing distance between power grid topology graphs to measure the similarity between power grid topology graphs, the depth - first algorithm can be used to search and traverse each editing path to accurately solve the editing distance between two power grid topology graphs. For different power grid topology graphs, the traditional depth - first algorithm is used for search, and after accurately solving the editing distance one by one, the similarity ranking of the power grid topology graphs is then carried out.
[0066] Embodiment 2
[0067] Embodiment 2 provides an inverse-time interactive rapid sorting method for the similarity of massive power grid topologies. First, a power grid topology graph library is established; second, a similarity index between power grid topology graphs is constructed, that is, the edit distance between power grid topology graphs (Graph Edit Distance of Power Grid Topology, PGT-GED); finally, a horizontal similarity comparison coefficient of the edit distance and a vertical time comparison coefficient of the edit distance are defined, and then an inverse-time interaction index is constructed to determine the similarity ranking of power grid topology graphs. The accurate solution of the edit distance is converted into an approximate solution of the edit distance to improve the efficiency of power grid topology similarity comparison and sorting, and obtain the power grid topology structure with the highest similarity, so as to provide reference for the preparation of new equipment start-up plans for power grids and the formulation of power system restoration plans after faults, etc.
[0068] As Figure 1 shown, a method for rapidly sorting the similarity of inverse-time interactive massive power grid topologies is carried out in the following specific steps:
[0069] S1. Establish a power grid topology graph library G, G = {g i | i = 1, 2…n};
[0070] where, g i represents the i-th power grid topology graph in the power grid topology graph library G, i = 1, 2…n, that is, there are n power grid topology graphs in the power grid topology graph library G.
[0071] The process of step S1 is specifically as follows:
[0072] S11. Construct a power grid topology knowledge representation framework based on the Resource Description Framework Schema (RDFS):
[0073] Use RDFS to construct a power grid topology knowledge representation framework, and use "head entity, entity relationship, tail entity", class and attributes to describe the power grid topology. Define "power grid topology" as the parent class, define all specific devices in the topology as "entities", and define the overall type to which all devices belong as "class". The classes of devices include busbars, substations, lines, disconnecting switches, line switches, bus coupler switches, sectionalizing switches, main transformers, lightning arresters, voltage transformers, etc. At the same time, each device also has several attributes; for example, for the entity "Line AB", its class is "line", the parent class is "power grid topology", and the attributes it has are "substation to which it belongs: Substation A" and "voltage level: 110 kV", etc.
[0074] S12. After obtaining the power grid topology knowledge representation framework in step S11, use Neo4j software to construct a power grid topology knowledge graph library. Entities in the knowledge graph correspond to nodes in the graph database, the relationships between entities correspond to edges in the graph database, and the types and attributes in the knowledge graph belong to the nodes and edges in the graph database. Therefore, abstract the entities of the power grid topology as nodes and connect them according to the actual topological relationship, add descriptions such as "parent class", "class", and "attribute" to the nodes, and name the edges connecting the nodes as "connection" to represent the relationship between nodes.
[0075] Define the undirected labeled power grid topology M as consisting of 4 parts: M = {V M , E M , ζ V M , ζ E M}, where V M is the equipment node in the power grid topology M, E M is the undirected connection relationship between equipment nodes in the power grid topology M, ζ V M is the label of the nodes in the power grid topology M, and ζ E M is the label of the edges in the power grid topology M.
[0076] In this embodiment, according to the power grid topology knowledge graph library, the process of constructing the power grid topology map is as Figure 2 shown: "AB line", "1 disconnecting switch", "AB switch", "bus 2", etc. are "equipment nodes", the relationships between "AB line" and "1 disconnecting switch", and between "1 disconnecting switch" and "AB switch" are "undirected connection relationships", and the "node labels" of "AB line", "1 disconnecting switch", "AB switch", and "bus 2" can be set as "line", "disconnecting switch", "switch", and "bus" respectively, and the "edge labels" connected between "AB line" and "1 disconnecting switch", and between "1 disconnecting switch" and "AB switch" can be set as "connection".
[0077] S2. Construct a similarity index between power grid topology maps, and use the edit distance between two power grid topology maps as the similarity index between the two power grid topology maps. Among them, the smaller the edit distance d(A, B) between power grid topology map A and power grid topology map B, the higher the similarity between power grid topology map A and power grid topology map B.
[0078] For power grid topology map A and power grid topology map B, through a series of editing operations, including node deletion, edge deletion, node insertion, edge insertion, node label transformation, edge label transformation, etc., make power grid topology map A isomorphic to power grid topology map B.
[0079] Under different mappings, the sequence of this series of editing operations is called an editing path. Each editing operation corresponds to an editing cost value, and the sum of the editing cost values of this series of editing operations is called the path cost value of the editing path. By searching for the path with the minimum path cost value, the optimal editing path is found, and the minimum path cost value corresponding to this optimal editing path is used as the editing distance between the power grid topology map A and the power grid topology map B being isomorphic, that is, the editing distance d(A, B) between the power grid topology map A and the power grid topology map B. The smaller the editing distance d(A, B) between the power grid topology map A and the power grid topology map B being isomorphic, the higher the similarity between the power grid topology map A and the power grid topology map B.
[0080] As Figure 3 shown, the power grid topology editing path from the power grid topology map A to the power grid topology map B can be: deleting the node "AC line", deleting the connection edge between the AC line node and the 1 disconnecting switch node, deleting the node "1 disconnecting switch", and deleting the connection edge between the 1 disconnecting switch node and the AC switch node. If the cost of each editing operation is set to 1, then the editing distance d(A, B) between the power grid topology map A and the power grid topology map B under this editing path is 4.
[0081] S3. According to the power grid topology knowledge graph library, construct the power grid topology map q for the new power grid, and obtain the similarity ranking of each power grid topology map in the power grid topology map library G = {g i |i = 1, 2…n}, where g i represents the i-th power grid topology map in the power grid topology map library G, i = 1, 2…n, that is, there are n power grid topology maps in the power grid topology map library G.
[0082] Define the editing distance horizontal similarity comparison coefficient and the editing distance vertical time comparison coefficient, and then construct the inverse time interaction index to solve the similarity ranking of the power grid topology map.
[0083] As Figure 4 shown, the specific process of solving the similarity ranking of the power grid topology map includes the following steps:
[0084] S31. Conduct the k-th iteration, and the search time t k :
[0085] t k = k·Δt
[0086] where k represents the number of iterations, k = 1, 2, 3...; Δt is the time increment for each iteration, and Δt is a fixed value.
[0087] S32. In the k-th iteration, solve the editing distance between the power grid topology map q and each power grid topology map in the power grid topology map library G at the k-th iteration respectively.
[0088] Among them, the power grid topology diagram q is compared with the i-th power grid topology diagram g in the power grid topology library G i in the search time t of the k-th iteration k to perform path search, traverse multiple editing paths to find the editing path with the minimum path cost value, and take the minimum path cost value as the editing distance of the power grid topology diagram q to the i-th power grid topology diagram g i in the k-th iteration, that is, the editing distance between the power grid topology diagram q and the i-th power grid topology diagram g i is the editing distance d k (q, g i ) where i = 1, 2... n;
[0089] S33. Sort the editing distances between the power grid topology diagram q and each power grid topology diagram in the power grid topology library G in ascending order at the k-th iteration to obtain the similarity sorting of the power grid topology diagram q and each power grid topology diagram in the power grid topology library G at the k-th iteration, and it is sorted from high to low similarity;
[0090] S34. Determine whether k is greater than 1. If so, perform step S35. If not, add 1 to the value of k and jump to step S31 to directly perform the next iteration;
[0091] S35. Calculate the horizontal similarity comparison coefficient h k of the k-th iteration:
[0092]
[0093] Among them, sort k (g i ) represents the similarity sorting serial number of the power grid topology diagram q and the i-th power grid topology diagram g at the k-th iteration, and min(d i (q, G)) represents the minimum value of the editing distances between the power grid topology diagram q and all power grid topology diagrams in the power grid topology library G at the k-th iteration; α is the relaxation factor for horizontal similarity comparison; k To solve the similarity sorting between power grid topology diagrams, since the similarity between power grid topology diagrams is inversely related to the editing distance, that is, the higher the similarity between power grid topology diagrams, the lower the value of the editing distance. Therefore, 1 / sort
[0094] needs to be multiplied in the horizontal similarity comparison coefficient k (g i );
[0095] S36. Calculate the vertical time comparison coefficient z k of the k-th iteration:
[0096]
[0097] Among them, d k-1 (q, g i ) represents the edit distance between the power grid topology diagram q and the i-th power grid topology diagram g at the (k - 1)-th iteration, i.e., the previous iteration; β is the relaxation factor for longitudinal time comparison; i
[0098] S37. Calculate the inverse-time interaction index value ITI at the k-th iteration k :
[0099]
[0100] Among them, λ is the time relaxation factor, and t k is the search time at the k-th iteration; the smaller the value of the inverse-time interaction index value ITI k , the closer the current similarity ranking is to the ranking obtained by accurately calculating the edit distance.
[0101] S38. Determine whether the inverse-time interaction index value ITI at the k-th iteration k is less than the precision threshold ε, and determine whether the current iteration number k is greater than the maximum iteration number K;
[0102] If the inverse-time interaction index value ITI at the k-th iteration k is less than the precision threshold ε, or the current iteration number k is greater than the maximum iteration number K, then output the similarity ranking at the k-th iteration to obtain the final similarity ranking of the power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G;
[0103] Otherwise, increment the value of k by 1, jump to step S31 to directly perform the next iteration until the inverse-time interaction index value is less than the precision threshold ε or the iteration number reaches the maximum iteration number K, and obtain the final similarity ranking of the power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G.
[0104] The present invention uses the edit distance between two power grid topology diagrams to measure the power grid topology similarity, can realize the comparison and ranking of power grid topology similarity, and can find the power grid topology with the highest similarity from a large number of power grid topologies, thereby providing a reference for fields such as the preparation of power grid new equipment startup plans and the formulation of power system post-fault restoration plans.
[0105] In Example 1, when measuring the grid topology similarity using the edit distance between two grid topology diagrams, the edit distance between the two grid topology diagrams can be accurately solved by searching and traversing each edit path through the depth-first algorithm. However, the depth-first algorithm is specialized in accurately solving the edit distance. If the traditional depth-first algorithm is used to search for different grid topologies and the edit distance is accurately solved one by one and then the grid topology similarity is sorted, the time cost is huge and the efficiency is extremely low, which is not conducive to the search and comparison of a large number of topologies. Therefore, in Example 2, the accurate solution of the edit distance is further converted into an approximate solution. For the purpose of judging the grid topology similarity sorting, the edit distance is not accurately solved, thereby reducing the solution time of the model and greatly improving the efficiency of the grid topology similarity sorting. Further, the problems such as the long time consumption and low efficiency of the grid topology similarity comparison and sorting, and the inefficiency of the search and comparison of a large number of topologies are solved.
[0106] Example 3
[0107] According to the anti-time interactive massive grid topology similarity fast sorting method provided in Example 2, a grid topology library G of a substation grid topology in a certain province is selected to verify the effectiveness of the model. In this Example 3, the python language is used, and the networkx2.6.2 library is selected for programming to calculate the edit distance. The horizontal comparison relaxation α of the given edit distance is 1, the vertical time comparison relaxation β is 1, the time relaxation λ is 1, and the time interval Δt is given as 15 s, and the edit operation cost is 1.
[0108] As Figure 5 shown, the grid topology library G includes grid topology diagrams of single busbar without section (1), single busbar without section (2), single busbar with double sections (1), single busbar with double sections (2), double busbar with single section (2), double busbar without section (1), double busbar without section (2), double busbar with double sections (1), and double busbar with double sections (2).
[0109] The grid topology diagram of double busbar with single section (1) is Figure 6 shown.
[0110] To verify the rationality of the anti-time interactive massive grid topology similarity fast sorting method provided in Example 2, the approximate edit distance values between the grid topology diagram of double busbar with single section (1) and each grid topology diagram in the grid topology library G at different calculation times are given as shown in Table 1 below.
[0111] Table 1
[0112]
[0113]
[0114] As can be seen from Table 1, as the solution time increases, each edit distance value continuously decreases, that is, the edit distance value is closer to the exact value. However, the similarity ranking of the power grid topology diagram q of the double-bus single-section substation (1) and other substations in the power grid topology diagram library G has no obvious change. That is to say, the consumption of time cost does not bring a more accurate similarity ranking, which indicates that the method proposed in Embodiment 2 is reasonable.
[0115] Extract the power grid topology diagram libraries of single-bus non-sectioning (2), single-bus double-sectioning (1), single-bus double-sectioning (2), double-bus single-sectioning (2), double-bus non-sectioning (2), double-bus double-sectioning (1), and double-bus double-sectioning (2) from the power grid topology diagram library G, construct a new power grid topology diagram library, denoted as power grid topology diagram library G1, and compare each power grid topology diagram in the power grid topology diagram library G1 with the three power grid topology diagrams of single-bus non-sectioning (1), double-bus non-sectioning (1), and double-bus single-sectioning (1) to obtain the horizontal similarity comparison coefficient h of each edit distance k and the vertical time comparison coefficient z of the edit distance k and the inverse-time interaction index ITI k . As shown in Tables 2, 3, and 4 below, where Table 2 shows the values of h k , z k , and ITI k when each power grid topology diagram in the power grid topology diagram library G1 is compared with the power grid topology diagram of single-bus non-sectioning (1), Table 3 shows the values of h k , z k , and ITI k when each power grid topology diagram in the power grid topology diagram library G1 is compared with the power grid topology diagram of double-bus non-sectioning (1), and Table 4 shows the values of h k , z k , and ITI k when each power grid topology diagram in the power grid topology diagram library G1 is compared with the power grid topology diagram of double-bus single-sectioning (1).
[0116] Table 2
[0117]
[0118]
[0119] Table 3
[0120]
[0121]
[0122] Table 4
[0123] Time (seconds) <![CDATA[h t > <![CDATA[z t > <![CDATA[ITI t > 15 116.0095 0 7.73397 30 113.8845 2.125 3.86698 45 110.8 5.20952 2.57799 60 110.8 5.20952 1.93349 75 110.3 5.70952 1.54679 90 110.1 5.90952 1.28899 105 110.1 5.90952 1.10485 120 110.1 5.90952 0.96675 135 110.1 5.90952 0.85933 150 109.4143 6.59524 0.7734 165 109.4143 6.59524 0.70309 180 110.1 5.90952 0.6445 195 109.8143 6.19524 0.59492 210 110.0095 6 0.55243 225 110.0429 5.96667 0.5156 240 110.3143 5.69524 0.48337
[0124] When each power grid topology map in the power grid topology map library G1 is compared with the three power grid topology maps of single busbar without section (1), double busbar without section (1), and double busbar single section (1), the ITI curves are as follows Figure 7 shown. It can be seen from Figure 7 that as time goes on, the edit distance solving model of the inverse-time interactive massive power grid topology similarity fast sorting method converges continuously. Specifically analyzed, when the power grid topology map library G1 is compared with the power grid topology map of double busbar single section (1), the solving speed of the topology similarity sorting is significantly slower than that when compared with the power grid topology maps of single busbar without section (1) and double busbar without section (1). It can be seen that the more complex the power grid topology is, the longer the solving time of the power grid topology similarity sorting is.
[0125] The inverse-time interactive massive power grid topology similarity fast sorting method proposed in Embodiment 2 does not aim to solve the exact edit distance, but aims to solve the power grid topology similarity sorting, thus greatly improving the solving efficiency of the power grid topology similarity sorting. If the ITI k threshold is set to 2.0, and the new power grid topology map library composed of the power grid topology map of double busbar single section (1) and the power grid topology map library G is denoted as the power grid topology map library G2, the edit distance results between the power grid topology maps in the power grid topology map library G2 can be obtained as follows Figure 8 shown. According to experience, the topological similarity of substations with the same busbar connection method is higher. According to the similarity comparison model based on edit distance proposed in this paper, calculate the similarity sorting of each power grid topology map in the power grid topology map library G and the power grid topology map of double busbar single section (1). Through Figure 8 it can be seen that among many power grid topology maps, the edit distance between double busbar single section (2) and double busbar single section (1) is the smallest and the similarity is the highest. In this embodiment, when the ITI k threshold is set to 2.0, the solving time is 31.75 minutes. If the algorithm for exactly solving the edit distance in Embodiment 1 is directly used for solving, the required time is 12.3 hours. Therefore, it can be seen that the inverse-time interactive massive power grid topology similarity fast sorting method proposed in Embodiment 2 can quickly compare the power grid topology similarity and obtain the similarity sorting.
[0126] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. An inverse-time interactive rapid sorting method for massive power grid topology similarity, characterized in that, it includes the following steps: S1, Define the similarity index: Take the edit distance between two power grid topology diagrams as the similarity index between the two power grid topology diagrams. Among them, the smaller the edit distance d(A, B) between power grid topology diagram A and power grid topology diagram B, the higher the similarity between power grid topology diagram A and power grid topology diagram B; The solution method of the edit distance d(A, B) between power grid topology diagram A and power grid topology diagram B is as follows: For power grid topology diagram A and power grid topology diagram B, through a series of editing operations, make power grid topology diagram A isomorphic to power grid topology diagram B; The sequence composed of this series of editing operations is called an edit path. Each editing operation corresponds to an edit cost value. The sum of the edit cost values of this series of editing operations is called the path cost value of the edit path; Search for the edit path with the minimum path cost value through path search, that is, the optimal edit path, and take the minimum path cost value corresponding to this optimal edit path as the edit distance for power grid topology diagram A to be isomorphic to power grid topology diagram B, that is, the edit distance d(A, B) between power grid topology diagram A and power grid topology diagram B; S2. According to the similarity index, obtain the similarity ranking of the power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G = {g i | i = 1, 2…n}, where g i represents the i-th power grid topology diagram in the power grid topology diagram library G, i = 1, 2…n, that is, there are n power grid topology diagrams in the power grid topology diagram library G; the specific process is as follows: Compare power grid topology diagram q with each power grid topology diagram in the established power grid topology diagram library G one by one, respectively calculate the edit distance for power grid topology diagram q to be isomorphic to each power grid topology diagram, and sort them in ascending order of the edit distance to obtain the similarity ranking of power grid topology diagram q and each power grid topology diagram in power grid topology diagram library G, and it is a similarity ranking from high to low.
2. The inverse-time interactive rapid sorting method for massive power grid topology similarity according to claim 1, characterized in that, In step S2, the similarity ranking of the power grid topology diagram q and each power grid topology diagram in the power grid topology diagram library G = {g i | i = 1, 2…n} is obtained. Specifically, the following method can also be adopted: S21, perform the k-th iteration, and the search time t of the k-th iteration k : t k = k·Δt wherein, k represents the number of iterations, k = 1, 2, 3...; Δt is the time increment for each iteration, and Δt is a fixed value; S22, In the kth iteration, respectively calculate the edit distance between power grid topology diagram q and each power grid topology diagram in power grid topology library G at the kth iteration; Among them, the power grid topology diagram q is compared with the i-th power grid topology diagram g in the power grid topology library G i During the search time t of the k-th iteration k Perform path search, traverse multiple editing paths to find the editing path with the smallest path cost value, and use the smallest path cost value as the editing distance of the power grid topology diagram q to the i-th power grid topology diagram g i Isomorphic at the k-th iteration, that is, the editing distance between the power grid topology diagram q and the i-th power grid topology diagram g i The editing distance d between them k (q, g i ) i = 1, 2... n; S23, Sort the edit distances between power grid topology diagram q and each power grid topology diagram in power grid topology library G at the kth iteration in ascending order to obtain the similarity ranking of power grid topology diagram q and each power grid topology diagram in power grid topology library G at the kth iteration, and it is a similarity ranking from high to low; S24, Judge whether k is greater than 1. If so, perform step S25. If not, add 1 to the value of k and jump to step S21 to directly perform the next iteration; S25, calculate the horizontal similarity comparison coefficient h of the edit distance for the k-th iteration k : Among them, sort k (g i ) represents the similarity sorting serial number of the power grid topology diagram q and the i-th power grid topology diagram g at the k-th iteration i ; min(d k (q, G)) represents the minimum value of the edit distance between the power grid topology diagram q and all power grid topology diagrams in the power grid topology library G at the k-th iteration; α is the relaxation factor for horizontal similarity comparison; S26, calculate the vertical time comparison coefficient z of the edit distance for the k-th iteration k : where d k-1 (q, g i ) represents the edit distance between the power grid topology diagram q and the i-th power grid topology diagram g at the (k - 1)-th iteration, i.e., the previous iteration; β is the relaxation factor for longitudinal time comparison; i S27, calculate the inverse time interaction index value ITI for the k-th iteration k : where λ is the time relaxation factor, and t k is the search time for the k-th iteration; S28, determine the inverse time interaction index value ITI of the k-th iteration k whether it is less than the precision threshold ε, and determine whether the current iteration number k is greater than the maximum iteration number K; If the inverse time interaction index value ITI of the k-th iteration k is less than the precision threshold ε, or the current iteration number k is greater than the maximum iteration number K, then output the similarity ranking of the k-th iteration, and obtain the final similarity ranking of the power grid topology map q and each power grid topology map in the power grid topology map library G; Otherwise, add 1 to the value of k and jump to step S21 to directly perform the next iteration until the inverse-time interaction index value is less than the precision threshold ε or the number of iterations reaches the maximum number of iterations K, and obtain the final similarity ranking of power grid topology diagram q and each power grid topology diagram in power grid topology library G.
3. The inverse-time interactive rapid sorting method for massive power grid topology similarity according to claim 1 or 2, characterized in that, The editing operations include: node deletion, edge deletion, node insertion, edge insertion, node label transformation, edge label transformation.
Citation Information
Patent Citations
Cross-system automatic matching and constructing method for topological structure of power grid on the basis of graph calculation and machine learning
CN107741999A
Automatic compilation method for relay protection starting scheme of new power grid equipment
CN113300340A