Abstract
With the rapid development of new energy resources and diversified load, power network topology data have grown swiftly. To meet the needs of the smart grid dispatching system, the power network topology analysis to support the marketing, power distribution, and other businesses in the operation of the grid has become one of the bottlenecks in the development of the smart grid. In the power grid, the outgoing lines of some generators are directly connected to the transformer, and during the busbar analysis, the nodes only adjacent to the transformer components will be identified as independent busbars. Therefore, a new method of node numbering optimization is proposed, in which the nodes adjacent to the switch are numbered preferentially. On this basis, a new abstract description method of adjacency relations and an improved breadth-first search method based on information interaction are proposed. Finally, simulation experiments are carried out in power grids with three different scales. The simulation results show that the algorithm can quickly and accurately realize power network topology analysis in the large-scale power grid, and the operating efficiency is improved by about 20% compared with the traditional algorithm.
1. Introduction
The power network topology analysis is based on the real-time data of the power system. The real-time topology of the entire network is obtained by refining the information on switches, busbars, transformers, generators, and loads in the power system. In recent years, the power grid architecture and operation mode have become more and more complex. The in-depth study on the topology analysis algorithm oriented to the physical node information of large-scale and large-capacity power grids can provide the initial network data structure and stability guarantee to the online state estimation of large-scale power grids [1–3], power flow calculation optimization [4, 5], power system safety analysis [6, 7], and relay protection device coordination [8].
The essence of power network topology analysis is the problem of network connectivity. The most common methods are the search method, matrix method, and related algorithms combined with new technologies. The matrix method has the advantages of intuitive calculation and simple programming in practical applications. Zhang et al. [9] realized the power network topology analysis based on the adjacency matrix method. However, under the background of the continuous expansion of the power grid, the adjacency matrix established by the traditional matrix method not only occupies a large amount of memory but also cannot meet the real-time and accuracy requirements of the power dispatching system. Yao [10] used the matrix quasi-square method to optimize the times of matrix self-multiplication to improve the operation efficiency of the algorithm. Yao et al. [11] used sparse technology to simplify matrix storage, optimize the traditional matrix method, and achieve significant acceleration. Compared with the matrix method, the search method does not need to perform large-scale matrix self-multiplication calculations, which saves memory resources. The disadvantage is that the adaptability to the loop network and mesh network is poor and the algorithm is relatively complex. Hua et al. [12] proposed a depth-first search method with good scalability and compatibility. This method adopts the idea of “first in, last out,” and there is a step of backtracking nodes in the search process, which leads to repeated visits of nodes, thus reducing the efficiency of the algorithm. Bose and Clements [13] realized the real-time modeling of the power network based on the breadth-first search algorithm, which traversed all the nodes adjacent to the root node according to the idea of “first in, first out” and put them in the queue in turn. During the search process, there is no need to backtrack the nodes, which reduces the repeated visits of the nodes, thereby improving efficiency. In addition, some scholars explored new technologies for power network topology analysis from the perspective of the power grid structure and component states. Cheng et al. [14] proposed a switch classification method, which determined the network topology of the power system through different switch types, realized the coordination of plant-station topology analysis and system topology analysis, and improved the efficiency of topology analysis from the grid level.
Some physical nodes are not adjacent to the switch depending on the structure of the grid; this part of the nodes can be regarded as independent busbars during busbar analysis. Therefore, if numbering the nodes adjacent to the switch preferentially, the independent busbar can be filtered out in advance, thereby reducing the search dimension. The node labeling method [15] can be used to mark the searched node in the process of topology analysis, so as to inform the computer that the node has formed a complete connectivity relationship with other nodes, which avoids unnecessary breadth-first traversal of the adjacent nodes of the node by the computer and further reduces the time cost. However, the traditional method requires that the array describing the adjacency relationship of each node should cover all its adjacent nodes, which leads to the following unavoidable situation. Assuming that node i is adjacent to node j, and i < j, nodes Bij adjacent to i are also adjacent to j. Since Bij has formed a connectivity relationship with i, when searching for nodes adjacent to j, the computer will still judge whether Bij is connective, which is obviously meaningless. It will undoubtedly cause high time overhead when the scale of the power grid is large.
In general, the previous research on network topology analysis related to the search method mainly focused on the improvement of the algorithm itself. However, the node numbering optimization method considering the characteristics of the power grid structure and the form of array used to describe the adjacency relationship between nodes has received little attention. For the busbar analysis process, considering the real power grid structure, this paper proposes a new node numbering optimization method, in which the nodes adjacent to the switch are numbered preferentially. In addition, this paper defines a new adjacency relationship description method. Only some adjacent nodes whose node number is greater than their own node number are reserved for each node. However, due to the lack of adjacency information, the connectivity relationship formed after each breadth-first search is no longer complete in most cases. To this end, this paper presents an improved breadth-first search method based on information interaction applied for power network topology analysis, which marks the array describing the adjacency relationship by the node labeling method, so that the busbar (or topological island) whose connectivity relationship between nodes has been determined by breadth-first search and the busbar (or topological island) that is undergoing breadth-first search generate information interaction. If it is determined that there is a potential connectivity relationship between these two, they will be merged into a new busbar (or topological island), so as to realize the rapid traversal of the entire power network topology and further reduce the meaningless time overhead. Finally, the running speed of the method proposed in this paper and the traditional method are compared under the examples of three different scales to verify the effectiveness.
The paper is organized as follows: Section 2 takes the 17 node power system as an example to analyze the numbering logic of different node numbering optimization technologies. Section 3 introduces the basic steps of the traditional power network topology analysis method based on the breadth-first algorithm, and further analyzes the advantages of the node numbering optimization technology proposed in this paper through examples. In Section 4, an improved abstract description method of adjacency relation is proposed. On this basis, the idea of information interaction is introduced and an improved breadth-first search method is designed. In Section 5, the acceleration effect of the proposed method in large-scale scenes is verified by experiments. Section 6 gives a summary and discusses some ideas for future work.
2. Node Numbering Optimization Technology
The power network topology needs to know the connectivity relationship between nodes, and the number of outgoing lines, connection elements, and switch states of each node are different. Therefore, the order of node numbering optimization will affect the efficiency of power network topology analysis to a certain extent.
2.1. Node Sequence Numbering
As shown in Figure 1, in the actual raw data of the power system, physical nodes are not numbered in a certain order but are marked with strings, such as 100122321 or A123BC001. Such nodes marked with strings cannot be directly used for power network topology analysis, so the initial physical nodes need to be renumbered one by one. Node numbering optimization technology can provide conditions for topology analysis without changing the original power network topology. The node sequence numbering has the characteristics of a simple structure but is relatively unscientific at the same time. This method is used to number the nodes in Figure 1, and the results are shown in Table 1.

2.2. Numbering the Nodes According to the Number of Outgoing Lines from More to Less
Since the topology analysis based on the breadth-first search method will traverse the nodes of the whole graph in turn, before the first search or after each time the complete connectivity relationship between some nodes is determined, it is possible to have an adjacency with more nodes if the first unlabeled node k has more outgoing lines, thereby reducing the number of times of judging whether a node has been merged in this search, it can slightly improve the average operating efficiency generally. The nodes in Figure 1 are numbered using this method, and the results are shown in Table 2.
2.3. Numbering the Nodes Adjacent to the Switch Preferentially
According to the grid structure, the outlet node of some generators will be directly connected to the transformer, and there will be no switching elements installed in the middle, such as A10020 and A10025 in Figure 1. The transformer component is treated as an open circuit component when performing busbar analysis. Obviously, A10020 and A10025 are independent busbars. Selecting such nodes prior to busbar analysis can help reduce the search range and improve the operating efficiency of busbar analysis to a certain extent. Therefore, a node numbering optimization method is proposed in which the nodes adjacent to the switch are numbered preferentially. The nodes adjacent to the switch are sorted from more to less according to the number of adjacent switch components. This is because whether there is an adjacency relationship between two nodes mainly depends on the on-off condition of the switching components in the busbar analysis. If only the number of outgoing lines of the node is considered, the probability of the number of adjacent nodes of the node with the former number being less than that of the adjacent nodes with the later number will increase. For example, both A10013 and A10014 in Figure 1 have 3 outgoing lines, but during busbar analysis, A10013 actually only has an adjacency relationship with A10012. If A10013 is renumbered first, it will increase the number of judgments on whether some nodes have been merged. Generally speaking, the average search efficiency will be slightly lower than the case of preferentially renumbering A10014, which will be given in a more detailed explanation below. When using the node numbering optimization method proposed in this paper, since A10013 is only adjacent to two switching elements, A10014 will be numbered preferentially. It should be noted that, since the transformer element will be regarded as a closed switch during the topological island analysis, and the object of the topological island analysis is the busbars of entire power network, this node numbering optimization method is only applicable to the busbar analysis.
Using this method, the nodes in Figure 1 are numbered, and the numbering results are shown in Table 3.
3. Traditional Power Network Topology Analysis Method Based on the Breadth-First Search Method
The adjacency matrix method and its deformation algorithm are more suitable for the power network topology analysis with nodes of small scale. When the node scale is large, the shortcomings of low timeliness, long time consumption, and large memory footprint will be exposed [16]. Compared with the adjacent matrix method, the expansion of node size has a lower impact on the efficiency of the search method, and the demand for system memory is much smaller. Therefore, the search method has unique advantages in the face of large-scale power network topology analysis problems. The main purpose of power network topology analysis is to convert the physical model represented by nodes into a mathematical model represented by busbars. First, a busbar analysis is performed to merge many physical nodes connected by closed switches to form multiple busbars. Then, the topological island analysis is carried out, and the transformer between each busbar is regarded as a closed switch, and many busbars connected by closed branches are merged to obtain the topological structure of the entire power grid.
3.1. The Traditional Abstract Description Method of Adjacency Relationship
The nodes in Figure 1 are numbered according to the principle of numbering the nodes adjacent to the switch preferentially, and a schematic diagram of the adjacency relationship between each node is obtained, as shown in Figure 2. Obviously, 16 and 17 were identified as independent busbars before the busbar analysis. In order to facilitate the topology analysis based on the search method, it is necessary to abstractly describe the adjacency relationship between each node. For traditional topology analysis methods, the adjacency information of any node is completely described. The first column of the array stores the nodes’ numbers in ascending order, and the nodes that have an adjacent relationship with each node will be inserted into the specified position in turn after each node. The adjacency relationship between nodes in Figure 2 can be abstractly described by the array shown in Figure 3.


3.2. Traditional Power Network Topology Analysis Method Based on the Breadth-First Search Method
Search methods are generally divided into the depth-first algorithm and breadth-first algorithm. In terms of operation efficiency, the breadth-first search method is more suitable for topology analysis than the depth-first search algorithm [17]. The breadth-first search method is similar to the hierarchical traversal process of a tree [18]. In the initial state, all nodes have not been visited yet, and the entire graph is traversed from node 1, as shown in Figure 4 (a). Starting from node 1, adjacent nodes 2, 3, and 4 that have not been visited can be searched in turn, as shown in Figure 4 (b). Next, the adjacent nodes of the second layer node are searched in turn. Obviously, 5, 6, 7, 8, 9, and 10 all meet the requirement of not being visited yet, as shown in Figure 4 (c). When searching the adjacent nodes of the third-layer node, it is found that all nodes have been visited. So far, a complete round of breadth-first search method ends.

The steps of the traditional power network topology analysis method based on the breadth-first search method are as follows:(1)Traverse the array V that abstractly describes the adjacency relationship from top to bottom, i represents the row index of V, set i = 0. After that, go to (2);(2)If V[i][0] is not marked, create an array q to store connected nodes, and set q = V[i]. jump is the index of the node in q, and the initial value of jump is set to 1. len represents the number of nodes in q, which also changes dynamically when q is updated. After that, go to (3). If V[i][0] is marked, set i = i + 1, and go to (6);(3)If jump < len, go to (4). If jump = len, go to (5);(4)Mark V[q[jump] − 1][0]. If the number of nodes in V[q[jump] − 1] is greater than 2, it means that it may contain additional nodes that can form a connectivity relationship with the nodes in q. Therefore, judge whether the nodes after V[q[jump] − 1][0] exist in q in turn, and insert the nodes not included in q into the end of q in turn. Finally, set jump = jump + 1, go to (3). If the number of nodes in V[q[jump] − 1] is equal to 2, set jump = jump + 1, go to (3);(5)The nodes in q have formed a completely connectivity relationship, and q is stored in Q. After that, set i = i + 1, go to (6);(6)If i exceeds the index range, the topology analysis is complete, and exit the loop. Otherwise, go to (2).
The pseudocode of the algorithm is shown in Algorithm1.
|
Taking array V in Figure 3 as an example, use the above method for busbar analysis. First, there is V[0][0] = 1, node 1 is not marked, so set q = {1, 2, 5, 7} and jump = 1. Obviously, there is jump < len, so mark V[1][0], the set of adjacent nodes of 2 is n2 = {1, 3}, then update q to {1, 2, 5, 7, 3}, and set jump = 2. There is still jump < len, so mark V[4][0], the set of adjacent nodes of 5 is n5 = {1, 6}, then update q to {1, 2, 5, 7, 3, 6}, and set jump = 3. There is still jump < len, so mark V[6][0], the set of adjacent nodes of 7 is n7 = {1, 8}, update q to {1, 2, 5, 7, 3, 6, 8}, and set jump = 4. There is still jump < len, so mark V[2][0] and set jump = 5. There is still jump < len, so mark V[5][0], the set of adjacent nodes of 6 is n6 = {4, 5}, then update q to {1, 2, 5, 7, 3, 6, 8, 4}, and set jump = 6. There is still jump < len, so mark V[7][0] and set jump = 7. There is still jump < len, so mark V[3][0] and set jump = 8. At this time, there is jump = len, and the nodes in q have formed a complete connectivity relationship, so store q in Q and set i = 1. V[1][0] is already marked, so set i = 2. V[2][0] is already marked, so set i = 3. V[3][0] is already marked, so set i = 4. V[4][0] is already marked, so set i = 5. V[5][0] is already marked, so set i = 6. V[6][0] is already marked, so set i = 7. V[7][0] is already marked, so set i = 8. There is V[8][0] = 9, node 9 is not marked, so set q = {9, 10} and jump = 1. Obviously, there is jump < len, so mark V[9][0] and set jump = 2. At this time, there is jump = len, so store q in Q and set i = 9. V[9][0] is already marked, so set i = 10. There is V[10][0] = 11, node 11 is not marked, so set q = {11, 12} and jump = 1. Obviously, there is jump < len, so mark V[11][0] and set jump = 2. At this time, there is jump = len, so store q in Q and set i = 11. V[11][0] has been marked, so set i = 12. There is V[12][0] = 13, node 13 is not marked, so set q = {13} and jump = 1. Obviously, there is jump = len, so store q in Q and set i = 13. There is V[13][0] = 14, node 14 is not marked, so set q = {14} and jump = 1. Obviously, there is jump = len, so store q in Q and set i = 14. There is V[14][0] = 15, node 15 is not marked, so set q = {15} and jump = 1. Obviously, there is jump = len, so store q in Q and set i = 15. i exceeds the index range, the busbar analysis is complete, and exit the loop.
After the busbar analysis is completed, each busbar is regarded as a topology node. It should be noted that 16 and 17 should also be taken into account when performing topological island analysis, and all topology nodes should be renumbered according to the principle of the number of outgoing lines from more to less. The numbering results are shown in Figure 5. Then, using the breadth-first topology analysis method, all the busbars with electrical connections are merged into topological islands. Finally, the topological island analysis is completed. The research objects of busbar analysis and topological island analysis are different, but the steps are the same. Therefore, the process of topological island analysis will not be repeated here.

When the nodes are numbered according to the principle that the nodes adjacent to the switch are numbered preferentially, if the nodes adjacent to the switch are numbered according to the principle of the number of outgoing lines of nodes from more to less, for the power grid Structure in Figure 1, the adjacency relationship between the nodes is shown in Figure 6 and can be abstractly described by the array shown in Figure 7.


Taking array V in Figure 7 as an example, the busbar analysis is performed using the breadth-first search method. First, there is V[0][0] = 1, node 1 is not marked, so set q = {1, 7} and jump = 1. Obviously, there is jump < len, so mark V[6][0], the set of adjacent nodes of 7 is n7 = {1, 2}, then update q to {1, 7, 2}, and set jump = 2. There is still jump < len, so mark V[1][0], the set of adjacent nodes of 2 is n2 = {4, 7, 10}, then update q to {1, 7, 2, 4, 10}, and set jump = 3. There is still jump < len, so mark V[3][0], the set of adjacent nodes of 4 is n4 = {2, 8}, then update q to {1, 7, 2, 4, 10, 8}, and set jump = 4. There is still jump < len, so mark V[9][0], the set of adjacent nodes of 10 is n10 = {2, 5}, then update q to {1, 7, 2, 4, 10, 8, 5}, and set jump = 5. There is still jump < len, so mark V[7][0], the set of adjacent nodes of 8 is n8 = {3, 4}, then update q to {1, 7, 2, 4, 10, 8, 5, 3}, and set jump = 6. There is still jump < len, so mark V[4][0] and set jump = 7. There is still jump < len, so mark V[2][0] and set jump = 8. At this time, there is jump = len, and the nodes in q have formed a complete connectivity relationship, so store q in Q and set i = 1. V[1][0] is already marked, so set i = 2. V[2][0] is already marked, so set i = 3. V[3][0] is already marked, so set i = 4. V[4][0] is already marked, so set i = 5. There is V[5][0] = 6, node 6 is not marked, so set q = {6, 13} and jump = 1. Obviously, there is jump < len, so mark V[12][0] and set jump = 2. At this time, there is jump = len, so store q in Q and set i = 6. V[6][0] is already marked, so set i = 7. V[7][0] is already marked, so set i = 8. There is V[8][0] = 9, node 9 is not marked, so set q = {9, 14}, and jump = 1. Obviously, there is jump < len, so mark V[13][0] and set jump = 2. At this time, there is jump = len, so store q in Q and set i = 9. V[9][0] is already marked, so set i = 10. There is V[10][0] = 11, node 11 is not marked, so set q = {11} and jump = 1. Obviously, there is jump = len, so store q in Q and set i = 11. There is V[11][0] = 12, node 12 is not marked, so set q = {12} and jump = 1. Obviously, there is jump = len, so store q in Q and set i = 12. V[12][0] is already marked, so set i = 13. V[13][0] is already marked, so set i = 14. There is V[14][0] = 15, node 15 is not marked, so set q = {15} and jump = 1. Obviously, there is jump = len, so store q in Q and set i = 15. i exceeds the index range, the busbar analysis is complete, and exit the loop.
Compared with the busbar analysis process of the array describing the adjacency relationship in Figure 3, the main difference is that the number of times judging whether the nodes in the adjacent node set ni exist in q is significantly increased. Therefore, when numbering the nodes by using the method of numbering the nodes adjacent to the switch preferentially, for the nodes adjacent to the switch, if they are numbered from more to less according to the number of adjacent switches, the average operating efficiency will generally be better than that are numbered from more to less according to the number of outgoing lines of nodes. Compared to node sequence numbering, this is also the reason why the topology nodes are numbered according to the number of outgoing lines of the nodes from more to less when analyzing topological islands.
4. An Improved Breadth-First Search Method Based on Information Interaction
The traditional method uses an array to describe the complete adjacency relationship between nodes abstractly. Therefore, the complete connectivity analysis between nodes can be realized by the breadth-first search method. However, this also leads to at least one extra judgment for any pair of nodes with an adjacency relationship to identify whether a node has formed a connectivity relationship with another node. This kind of meaningless operation will bring more time overhead when the node scale expands.
4.1. Improved Abstract Description Method
For any node, if only the adjacent nodes whose node number is greater than itself are stored, the meaningless judgment operations mentioned above will undoubtedly be greatly reduced. When this scheme is adopted, the adjacency relationship between each node in Figure 2 can be abstractly described by the array shown in Figure 8.

However, it can be seen from Figure 2 that 4 only has an adjacency relationship with 6. To obtain 4 through the traverse of the breadth-first method, 6 must be used as the medium. Since 4 < 6, 4 is not stored after V[5][0] in Figure 8. Obviously, the traditional topology analysis method is no longer applicable in the context of this abstract description method.
4.2. The Improved Breadth-First Search Method Based on Information Interaction
For the array that describes the adjacency relationship abstractly in Figure 8, when using the traditional topology analysis method to analyze the busbar, store q = {1, 2, 5, 7, 3, 6, 8} formed in the first breadth-first search in Q[0], since V[3][0] is not marked, set q = {4, 6} and jump = 1, there is V[5][0] = 1. Through this mark, it can be found that 6 has been merged by 1. Therefore, the nodes in q should have a connectivity relationship with the node in Q[0]. Inspired by this, combined with the node labeling method, an improved breadth-first search method based on information interaction is proposed for the whole power network topology analysis. The basic steps are as follows:(1)Traverse the array V that abstractly describes the adjacency relationship from top to bottom, i represents the row index of V, set i = 0. After that, go to (2);(2)If V[i][0] is not marked and the number of nodes in V[i] is greater than 1, create an array q to store connected nodes, and set q = V[i]. jump is the index of the node in q, and the initial value of jump is set to 1. len represents the number of nodes in q, which also changes dynamically when q is updated. After that, go to (3). If V[i][0] is not marked and the number of nodes in V[i] is equal to 1, i is not connected to any node, store i in Z and set i = i + 1, then go to (9). If V[i][0] is marked, set i = i + 1, then go to (9);(3)If jump < len, go to (4). If jump = len, go to (8);(4)Determine the relationship between q[jump] and V[q[jump] − 1][0]. If q[jump] = V[q[jump] − 1][0], go to (5). If q[0] > V[q[jump] − 1][0], go to (6). If q[0] < V[q[jump] − 1][0], go to (7). If q[0] = V[q[jump] − 1][0], set jump = jump + 1, then go to (3);(5)Mark V[q[jump] − 1][0] and set V[q[jump] − 1][0] = q[0]. If the number of nodes in V[q[jump] − 1] is greater than 1, judge whether the nodes after V[q[jump] − 1][0] exist in q in turn, and insert the nodes not included at the end of q into q in turn. Finally, set jump = jump + 1, then go to (3). If the number of nodes in V[q[jump] − 1] is equal to 1, set jump = jump + 1, then go to (3);(6)Find the row index in Q of the connected node set with V[q[jump] − 1][0] as the head node, set qp = Q[]. Record the number of nodes nj in the current qp, insert all the nodes in front of q[jump] into the tail of qp in turn, and update the node’s mark to set it equal to V[q[jump] − 1][0]. After that, judge whether the node after q[jump] is already in qp in turn, if not, insert it into the tail of qp. Finally, clear Q[], update jump, set jump = jump + nj, and update q, set q = qp, then go to (3);(7)Find the row index in Q of the connected node set with V[q[jump] − 1][0] as the head node, and set qp = Q[]. Obviously, it is impossible for all nodes in front of q[jump] to intersect with qp, but the nodes after q[jump] have the possibility of intersecting with qp. Therefore, store all nodes in front of q[jump] into Y, store q[jump] and all the nodes after it into G, and then judge whether the nodes in qp are already in G, if not, insert it into the tail of Y, and record the number of nodes inserted into the tail through nj. At the same time, update the marks of all nodes in qp to set it equal to q[0], which also leads to the possibility of q[0] = V[q[jump] − 1][0] mentioned in (4) in the later search process. Finally, clear Q[], update jump, and set jump = Y.size() + 1, insert G into the tail of Y and set q = Y, then go to (3);(8)Store q in the first empty line Q[j] of Q and set i = i + 1, then go to (9);(9)If i exceeds the index range, the topology analysis is complete, and exit the loop. Otherwise, go to (2).
The pseudocode of the algorithm is shown in Algorithm 2.
|
In order to explain the meaning of each step in Algorithm_B more clearly, the example shown in Figure 9 is designed, and the detailed derivation process, as shown below, is given.(1)First, there is V[0][0] = 1, node 1 is not marked, so set q = {1, 8} and jump = 1. Obviously, there is jump < len, so mark V[7][0], then set V[7][0] = 1 and jump = 2. At this time, there is jump = len, so store q in Q[0], then set i = 1. The result of (1) is shown in Figure 10(a);(2)There is V[1][0] = 2, node 2 is not marked, so set q = {2, 9, 10} and jump = 1. Obviously, there is jump < len, so mark V[8][0], then set V[8][0] = 2 and jump = 2. There is still jump < len, so mark V[9][0], then set V[9][0] = 2 and jump = 3. At this time, there is jump = len, so store q in Q[1], then set i = 2. The result of (2) is shown in Figure 10(b);(3)There is V[2][0] = 3, node 3 is not marked, so set q = {3, 5} and jump = 1. Obviously, there is jump < len, so mark V[4][0] and set V[4][0] = 3, the set of adjacent nodes of 5 is n5 = {6}, update q to {3, 5, 6} and set jump = 2. There is still jump < len, so mark V[5][0], then set V[5][0] = 3 and jump = 3. At this time, there is jump = len, so store q in Q[2] and set i = 3. The result of (3) is shown in Figure 10(c);(4)There is V[3][0] = 4, node 4 is not marked, so set q = {4, 6} and jump = 1. Obviously, there is jump < len, but V[5][0] = 3, and there is q[0] > V[5][0], so set qp = Q[2] = {3, 5, 6} and nj = 3. The nodes set in front of q[1] is {4}, so insert 4 into the tail of qp and update the mark of 4, set V[3][0] = 3. If there are no other nodes after q[1], clear Q[2], update jump and set jump = jump + nj = 4, then update q and set q = qp = {3, 5, 6, 4}. At this time, there is jump = len, so store q in Q[2], then set i = 4. The result of (3) is shown in Figure 10(d);(5)V[4][0] has been marked, so set i = 5. V[5][0] has been marked, so set i = 6;(6)There is V[6][0] = 7, node 7 is not marked, so set q = {7, 8, 9, 10} and jump = 1. Obviously, there is jump < len, but V[7][0] = 1, and there is q[0] > V[7][0], so set qp = Q[0] = {1, 8} and nj = 2. The node set in front of q[1] is {7}, so insert 7 into the tail of qp and update the mark of 7, then set V[6][0] = 1. The node set after q[1] is {9, 10}, so update qp and set qp = {1, 8, 7, 9, 10}. After that, clear Q[0], update jump and set jump = jump + nj = 3, then update q and set q = qp = {1, 8, 7, 9, 10}. The result of (6) is shown in Figure 10(e);(7)Obviously, there is jump < len, but V[8][0] = 2, and there is q[0] < V[8][0], so set qp = Q[1] = {2, 9, 10} and nj = 0. Store all nodes in front of q[3] into Y, there is Y = {1, 8, 7}, so store q[jump] and all nodes after it into G, and there is G = {9, 10}. Judge whether the nodes in qp are already in G in turn. Since 2 is not in G, insert 2 into the tail of Y, then update nj and set nj = 1. At the same time, update the marks of all nodes in qp, then set V[1][0] = 1, V[8][0] = 1, and V[9][0] = 1. After that, clear Q[1] and update jump, then set jump = Y.size() + 1 = 5. After that, insert G into the tail of Y, set q = Y = {1, 8, 7, 2, 9, 10}. There is still jump < len, but V[9][0] = 1, and there is q[0] = V[9][0], so update jump and set jump = 6. At this time, there is jump = len, so store q in Q[0] and set i = 7. V[7][0] is already marked, so set i = 8. V[8][0] is already marked, so set i = 9. V[9][0] is already marked, so set i = 10. i is out of index range, exit the loop. The result of (7) is shown in Figure 10(f).


(a)

(b)

(c)

(d)

(e)

(f)
5. Example Analysis
Taking the power grid with a scale of 10000 nodes as an example, the partial original data of power network topology analysis after basic processing are given, as shown in Table 4. It contains a series of information such as node number, transformer ratio, equipment position and status, and node voltage. For the third column in Table 4, 0 means that switch elements are installed between two nodes. If it is a non-0 element, it means that transformers are installed between two nodes, and this value is equal to the transformer ratio. For the fourth column in Table 4, 1 means the component is put into use, and 0 means the component is not put into use. The CPU of the device is Intel® Core™ i7-11700@2.50 GHz, and the running memory is 16 GB. In the Visual Studio 2017 development environment, the effects of different scales of power grids, different node numbering optimation methods, and different algorithms on the average running time are compared, as shown in Table 5. The average running time here refers to the average of time it takes for the algorithm to execute 100 times. At the same time, the running times of different schemes are visualized, as shown in Figure 11. Taking Figure 11(a) as an example, the first column represents the node numbering optimization technology selected in the busbar analysis process. The second column represents the topology analysis algorithm selected in the busbar analysis process. The third column represents the node numbering optimization technology in the process of topological island analysis. The fourth column represents the topology analysis algorithm in the process of topological island analysis. The fifth column represents the average execution time of the method under the combination scheme of the first four columns.

(a)

(b)

(c)
It can be found from the above chart that the node numbering optimization method will have a greater impact on the efficiency of topology analysis. In the process of busbar analysis, if the traditional node numbering method is used, the efficiency of the algorithm proposed in this paper has no advantage compared with the traditional algorithm. This is because the method proposed in this paper is mainly based on the node labeling method so that the busbar (or topological island) undergoing breadth-first search has an information interaction with the busbar (or topological island) whose connectivity relationship has been determined. When the traditional node numbering method is used, the array structure that abstractly describes the adjacency relationship between nodes is relatively scattered, which leads to the possibility of storing multiple groups of busbars (or topological islands) with connectivity relationship in Q at the same time. Even if the algorithm proposed in this paper avoids the disadvantages of the traditional method, the advantage of the proposed algorithm is overshadowed by the huge time overhead caused by frequent information interaction in this case. However, when using the node numbering method, in which the nodes adjacent to the switch are numbered preferentially proposed in this paper, it can be found that the performance of the algorithm proposed in this paper is significantly improved, and the operating efficiency also exceeds the traditional algorithm. This is because when the node numbering optimization method proposed in this paper is adopted, the scale of Q in the algorithm execution process is generally kept at a low level. Compared with the traditional node numbering optimation method, the number of information interactions can be effectively reduced, thereby significantly reducing the time overhead. In the process of topological island analysis, if the nodes are numbered according to the principle of numbering the number of node outgoing lines from more to less, compared with the node sequence numbering, the performance of the algorithm proposed in this paper will also be significantly improved, and the operating efficiency will be slightly higher than the traditional algorithm. This is because the object of topological island analysis is topology nodes, and the number of such nodes is often small. For small and medium-sized nodes, the possibility of frequent interaction is relatively low. Compared with traditional algorithms, the advantages of the algorithm proposed in this paper are reflected.
6. Conclusion
The task of power network topology analysis is to analyze the topology of the power grid according to the status and location information of the power grid components given by the system after the network structure of the power grid changes, and quickly and accurately build the power system analysis and calculation model to identify isolated subsystems. The main conclusions are as follows:(1)A node numbering optimization method in which the nodes adjacent to the switch are numbered preferentially, which can identify the independent busbar before the busbar analysis, and assist the topology analysis algorithm to effectively reduce the calculation amount, thereby improving the efficiency of the algorithm operation;(2)A new abstract expression method of adjacency relationship and an improved breadth-first search method applied to power network topology analysis based on information interaction are proposed. When using the traditional node numbering optimization method, compared with traditional method, this method has certain advantages in the application of topology analysis of small and medium-scale power grids. In the face of a large-scale power grid, with the aid of the node numbering optimization method proposed in this paper, an acceleration effect of about 20% can be obtained;(3)This method can provide a reference for the study of graph connectivity, and can be further extended to the fields of transportation, social interaction, finance, medical care, etc., and has a high interdisciplinary.
The outlook for future related research work is as follows: During the collection, transmission, and exchange of measurement data required for power network topology analysis, some data information will be damaged or deviated due to equipment or network reasons, resulting in bad data. In this case, the accuracy of power network topology analysis results may be affected to some extent. We usually call the topology error correction process after power network topology analysis as power network topology error identification. Generally speaking, the purpose of power network topology error identification is to eliminate part of the error information of the topology result in the process of state estimation, or to identify the topology error independently by using the characteristics of bad data, to correct the topology result, and replace the bad data. In addition, the dynamic thermal rating system (DTR) can be combined with network topology optimization (NTO) to maximize the deployment of transmission assets in a highly flexible way and improve the reliability of the power system [19]. DTR can dynamically evaluate the maximum transmission capacity of the transmission line according to the weather conditions around the conductor, and increase the transmission capacity without investing in the construction of new lines. As a new type of power system operation strategy, NTO can change the transmission topology according to the operation conditions, potentially minimize the load shedding in an emergency [20], and also alleviate network congestion and improve the flexibility of the network by optimizing the switching of lines and busbars [21]. The coordination of these two cost-effective technologies can bring economic and reliability advantages to the power grid [22]. Compared with the traditional network topology optimization technology, under the joint deployment framework of DTR and NTO, the average number of line or busbar switching operations is often lower, but it can significantly improve the reliability of the system. The theoretical results of the topology optimization scheme obtained can be used as a reference to judge whether the original data of the power network topology analysis have problems, it can also provide new ideas for the subsequent network topology error identification and the correction of various parameters in the application of power system analysis. Therefore, in the future, we will study the optimization scheme of power network topology error identification technology with the input of the DTR and NTO joint deployment system.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that there are no conflicts of interest.