Automatic verification methods, devices, terminal equipment and storage media for power distribution network topology
By performing breadth-first, depth-first, and second breadth-first searches in the distribution network topology graph, combined with connectivity and anomaly scoring, the problem of erroneous data in the graph database was solved, and the data quality was improved.
Patent Information
- Application Number
- CN202411991991.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The lack of an effective data verification mechanism in existing technologies leads to erroneous data entering graph databases, affecting the overall quality of distribution network topology data.
By acquiring the distribution network topology map, a first breadth-first search is performed to detect isolated nodes, a depth-first search is performed to detect loop nodes, and a second breadth-first search is performed to detect disconnected nodes. The connectivity and comprehensive anomaly score of the nodes are calculated, and abnormal nodes are marked.
It enables timely detection and correction of errors in the distribution network topology diagram, thus improving data quality.
Smart Images

Figure CN119884189B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of topology verification technology, and in particular to a method, apparatus, terminal equipment, and storage medium for automatic topology verification of distribution networks. Background Technology
[0002] The distribution network is the part of the power system that directly faces end users, responsible for distributing electrical energy from high-voltage transmission lines to low-voltage users. With the acceleration of urbanization and the widespread integration of new energy sources, the scale and complexity of distribution networks are constantly increasing, bringing unprecedented challenges to their operation and maintenance. Graph database technology, with its unique advantages, shows great potential in the field of automatic distribution network topology verification. Graph databases can seamlessly integrate data from different systems (such as SCADA systems, GIS systems, etc.) into a unified model, solving the problem of data silos and achieving integrated data management. Utilizing the efficient query capabilities and pattern matching functions of graph databases, complex network analysis tasks, such as shortest path calculation and connectivity checks, can be completed quickly, thereby accelerating fault response and improving operation and maintenance efficiency. Graph databases not only support static data analysis but can also perform dynamic simulations combined with time-series data, providing a more scientific basis for distribution network planning and design, and helping decision-makers make more reasonable plans. Although graph database technology has shown significant advantages in automatic distribution network topology verification, it lacks an effective data verification mechanism, making it impossible to detect and correct errors in the data in a timely manner. This can lead to erroneous data entering the graph database, affecting the overall data quality. Summary of the Invention
[0003] This invention provides a method, apparatus, terminal equipment, and storage medium for automatic verification of distribution network topology, in order to solve the technical problem that the lack of a data verification mechanism in the prior art leads to erroneous data entering the graph database.
[0004] To address the aforementioned technical problems, embodiments of the present invention provide an automatic distribution network topology verification method, comprising:
[0005] Obtain the power distribution network topology;
[0006] Starting from the starting node, a first breadth-first search is performed on the distribution network topology to obtain the first access order for each node; wherein, the preset starting node is the node with the largest degree in the distribution network topology.
[0007] Based on the results of the first breadth-first search, all unvisited nodes are considered as isolated nodes in the power distribution network topology.
[0008] Starting from the starting node, a depth-first search is performed on the distribution network topology to determine the loop nodes in the distribution network topology.
[0009] Starting from the starting node, a second breadth-first search is performed on the power distribution network topology map, and disconnected nodes in the power distribution network topology map are determined according to the first access order;
[0010] Treat all isolated nodes, loop nodes, and disconnected nodes as possible abnormal nodes, and calculate the connectivity of each of the possible abnormal nodes;
[0011] Calculate a comprehensive anomaly score for each of the possible anomaly nodes based on the connectivity and first access order of all the possible anomaly nodes.
[0012] The abnormal nodes are identified based on the comprehensive abnormality score of each possible abnormal node.
[0013] Mark all the abnormal nodes in the power distribution network topology diagram.
[0014] As a preferred embodiment, the first breadth-first search of the distribution network topology, starting from the starting node, to obtain the first access order for each node includes:
[0015] Initialize an empty first queue to be accessed and a first access sequence counter with an initial value of 0;
[0016] Add the starting node to the first queue to be accessed;
[0017] Repeat the first node access operation until the first queue to be accessed is empty, obtain the first access order of each accessed node, and set the first access order of unaccessed nodes to 0.
[0018] The first node access operation includes:
[0019] Take the head node of the first queue to be accessed as the first currently accessed node;
[0020] Add all adjacent nodes of the first currently visited node that were not visited during the first breadth-first search to the first queue to be visited;
[0021] Increment the first access order counter by 1, and use the updated value of the first access order counter as the first access order of the first currently accessed node.
[0022] As a preferred embodiment, the step of performing a depth-first search on the distribution network topology map starting from the starting node to determine the loop nodes in the distribution network topology map includes:
[0023] Initialize an empty stack to be accessed;
[0024] Push the starting node onto the stack to be visited;
[0025] Repeat the second node access operation until the stack to be accessed is empty;
[0026] The second node access operation includes:
[0027] Pop the top node from the stack to be visited and use it as the second currently visited node;
[0028] For each neighboring node of the second currently accessed node, determine whether the neighboring node has been accessed during the depth-first search process. If not, push the neighboring node onto the unaccessed stack. If so, determine that the neighboring node is a loop node.
[0029] As a preferred embodiment, the step of performing a second breadth-first search on the distribution network topology map starting from the starting node, and determining the disconnected nodes in the distribution network topology map according to the first access order, includes:
[0030] Initialize an empty second queue to be accessed and a second access sequence counter with an initial value of 0;
[0031] Initialize the second access order of all nodes to 0;
[0032] Add the starting node to the second queue to be accessed;
[0033] Repeat the third node access operation until the second queue to be accessed is empty;
[0034] The third node access operation includes:
[0035] Take the head node of the second queue to be accessed and use it as the third currently accessed node;
[0036] Add all adjacent nodes of the third currently visited node that were not visited during the second breadth-first search to the second queue to be visited;
[0037] Increment the second access order counter by 1, and update the second access order of the third access node with the updated value of the second access order counter;
[0038] If the second access order of the third currently accessed node is less than the first access order of the third currently accessed node, then nodes whose first access order is not less than the second access order of the third currently accessed node and less than the first access order of the third currently accessed node are identified as disconnected nodes; the second access order counter is updated with the sum of the value of the first access order of the third currently accessed node and the current number of disconnected nodes.
[0039] As a preferred embodiment, calculating the connectivity of each of the potentially abnormal nodes includes:
[0040] For each of the possible abnormal nodes, the neighboring node with the smallest first access order of the possible abnormal node is taken as the neighboring node of the possible abnormal node.
[0041] Obtain the edge weights between the potentially abnormal node and the neighboring nodes, the connectivity of the neighboring nodes, and the degree of the potentially abnormal node;
[0042] The connectivity of the potentially abnormal nodes is calculated based on the edge weights, the connectivity of neighboring nodes, and the degree of the potentially abnormal nodes.
[0043] The formula for calculating connectivity is:
[0044]
[0045] In the formula, C v Indicates the connectivity of node v; C u ω(u,v) represents the connectivity of node v to its neighboring node u; ω(u,v) represents the edge weight between node v and node u; d v This represents the degree of node v.
[0046] As a preferred embodiment, the step of calculating a comprehensive anomaly score for each of the potentially abnormal nodes based on the connectivity and first access order of all the potentially abnormal nodes includes:
[0047] Determine the maximum connectivity based on the connectivity of all the possible abnormal nodes;
[0048] Determine the maximum first access order based on the first access order of all the possible abnormal nodes;
[0049] For each of the possible abnormal nodes, a comprehensive abnormal score is calculated based on the maximum connectivity, the maximum first access order, the connectivity of the possible abnormal node, and the first access order of the possible abnormal node.
[0050] The formula for calculating the comprehensive anomaly score is as follows:
[0051]
[0052] In the formula, A v C represents the overall anomaly score of node v; v Indicates the connectivity of node v; max(C v ) represents maximum connectivity; O v Indicates the first access order of node v; max(Ov ) indicates the maximum first access order; α is the preset weight value.
[0053] As a preferred embodiment, determining the anomalous node based on the comprehensive anomalous score of each potentially anomalous node includes:
[0054] Calculate the mean of the comprehensive anomaly scores based on the comprehensive anomaly scores of each possible anomaly node;
[0055] Nodes with a comprehensive anomaly score greater than the average comprehensive anomaly score are identified as anomaly nodes.
[0056] Based on the above embodiments, another embodiment of the present invention provides an automatic topology verification device for a distribution network, including: a data acquisition module, a possible abnormal node search module, and an abnormal node judgment module;
[0057] The data acquisition module is used to acquire the power distribution network topology diagram;
[0058] The possible abnormal node search module is used to perform a first breadth-first search on the distribution network topology map starting from the starting node to obtain the first access order of each node; wherein, the preset starting node is the node with the largest degree in the distribution network topology map; based on the result of the first breadth-first search, all unvisited nodes are regarded as isolated nodes in the distribution network topology map; starting from the starting node, a depth-first search is performed on the distribution network topology map to determine the loop nodes in the distribution network topology map; starting from the starting node, a second breadth-first search is performed on the distribution network topology map, and the disconnected nodes in the distribution network topology map are determined according to the first access order;
[0059] The abnormal node determination module is used to treat all isolated nodes, loop nodes, and disconnected nodes as possible abnormal nodes, calculate the connectivity of each possible abnormal node; calculate the comprehensive abnormal score of each possible abnormal node based on the connectivity of all possible abnormal nodes and the first access order; determine the abnormal node based on the comprehensive abnormal score of each possible abnormal node; and mark all the abnormal nodes in the power distribution network topology diagram.
[0060] Based on the above embodiments, another embodiment of the present invention provides a terminal device, the terminal device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the automatic power distribution network topology verification method described in the above embodiments of the invention.
[0061] Based on the above embodiments, another embodiment of the present invention provides a storage medium, the storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute the automatic power distribution network topology verification method described in the above embodiments of the invention.
[0062] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0063] This invention obtains a distribution network topology map. Starting from a starting node, a first breadth-first search is performed on the distribution network topology map to obtain a first access order for each node. The preset starting node is the node with the highest degree in the distribution network topology map. Based on the results of the first breadth-first search, all unvisited nodes are designated as isolated nodes in the distribution network topology map. Starting from the starting node, a depth-first search is performed on the distribution network topology map to determine loop nodes. Starting from the starting node, a second breadth-first search is performed on the distribution network topology map, and disconnected nodes are determined based on the first access order. All isolated nodes, loop nodes, and disconnected nodes are designated as potential anomalous nodes, and the connectivity of each potential anomalous node is calculated. Based on the connectivity of all potential anomalous nodes and the first access order, a comprehensive anomalous score is calculated for each potential anomalous node. Based on the comprehensive anomalous score of each potential anomalous node, an anomalous node is determined. All anomalous nodes are marked in the distribution network topology map. This invention provides an automatic distribution network topology verification method that can promptly detect and correct errors in the distribution network topology map, improving data quality. Attached Figure Description
[0064] Figure 1 This is a flowchart illustrating an automatic topology verification method for a power distribution network according to an embodiment of the present invention.
[0065] Figure 2 This is a schematic diagram of the structure of an automatic power distribution network topology verification device provided in an embodiment of the present invention. Detailed Implementation
[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0067] Example 1
[0068] Please refer to Figure 1The above is a flowchart illustrating an automatic topology verification method for a distribution network according to an embodiment of the present invention, comprising:
[0069] S1. Obtain the power distribution network topology.
[0070] In step S1, the equipment data and connection relationship data in the distribution network are obtained, and the obtained equipment data and connection relationship data are imported into the graph database to form a graph model of the distribution network topology.
[0071] For example, the graph model of the distribution network topology includes the following nodes and edges:
[0072] Nodes: A, B, C, D, E, F;
[0073] Sides: (A, B), (B, C), (C, D), (D, E), (E, A).
[0074] It should be noted that steps S2-S5 include three detections: isolated node detection, loop node detection, and disconnected node detection.
[0075] These three detection operations are not strictly sequential, but rather relatively independent steps that can be performed at different stages.
[0076] S2. Starting from the starting node, perform a first breadth-first search on the power distribution network topology to obtain the first access order of each node; wherein, the preset starting node is the node with the largest degree in the power distribution network topology.
[0077] In a preferred embodiment, the step of performing a first breadth-first search on the distribution network topology map starting from the starting node to obtain the first access order for each node includes:
[0078] Initialize an empty first queue to be accessed and a first access sequence counter with an initial value of 0;
[0079] Add the starting node to the first queue to be accessed;
[0080] Repeat the first node access operation until the first queue to be accessed is empty, obtain the first access order of each accessed node, and set the first access order of unaccessed nodes to 0.
[0081] The first node access operation includes:
[0082] Take the head node of the first queue to be accessed as the first currently accessed node;
[0083] Add all adjacent nodes of the first currently visited node that were not visited during the first breadth-first search to the first queue to be visited;
[0084] Increment the first access order counter by 1, and use the updated value of the first access order counter as the first access order of the first currently accessed node.
[0085] In this embodiment, the detection of isolated nodes using the first breadth-first search algorithm specifically includes:
[0086] Initialize an empty first queue to be accessed and a first access sequence counter with an initial value of 0;
[0087] Add the starting node to the first queue to be visited;
[0088] When the first queue to be visited is not empty, the head node is retrieved in a loop and visited. The visiting process is as follows: for all adjacent nodes of the current node, if they have not been visited, they are added to the first queue to be visited.
[0089] For example, node A, the head node, is taken from the first queue to be visited: [A] and visited. The first visit order of node A is 1. At this time, the first queue to be visited is: []. All adjacent nodes [B, E] of node A are obtained. It is checked whether adjacent node B has been visited. If it has not been visited, it is added to the first queue to be visited: [B]. It is checked whether adjacent node E has been visited. If it has not been visited, it is added to the first queue to be visited: [B, E].
[0090] Remove node B from the first queue to be visited and visit it. The first visit order for node B is 2. At this time, the first queue to be visited is [E]. Get all adjacent nodes [A, C] of node B. Check if adjacent node A has been visited. If it has been visited, skip it. Check if adjacent node C has been visited. If it has not been visited, add it to the first queue to be visited: [E, C].
[0091] Remove node E from the first queue to be visited and visit it. The first visit order for node E is 3. At this time, the first queue to be visited is [C]. Get all adjacent nodes [A,D] of node E. Check if adjacent node A has been visited. If it has been visited, skip it. Check if adjacent node D has been visited. If it has not been visited, add it to the first queue to be visited: [C,D].
[0092] Remove node C from the first queue to be visited and visit it. The first visit order for node C is 4. At this time, the first queue to be visited is [D]. Get all adjacent nodes [B,D] of node C. Check if adjacent node B has been visited. If it has been visited, skip it. Check if adjacent node D has been visited. If it has not been visited, add it to the first queue to be visited: [D].
[0093] Take node D, the head node of the first queue to be visited, and visit it. The first visit order of node D is 5. At this time, the first queue to be visited is: []. Get all adjacent nodes [C, E] of node D. Check if adjacent node C has been visited. If it has been visited, skip it. Check if adjacent node E has been visited. If it has been visited, skip it.
[0094] S3. Based on the results of the first breadth-first search, all unvisited nodes are designated as isolated nodes in the power distribution network topology.
[0095] In step S3, nodes F that have not been visited after the first breadth-first search are designated as isolated nodes.
[0096] S4. Starting from the starting node, perform a depth-first search on the power distribution network topology to determine the loop nodes in the power distribution network topology.
[0097] In a preferred embodiment, the step of performing a depth-first search on the distribution network topology map, starting from the starting node, to determine the loop nodes in the distribution network topology map includes:
[0098] Initialize an empty stack to be accessed;
[0099] Push the starting node onto the stack to be visited;
[0100] Repeat the second node access operation until the stack to be accessed is empty;
[0101] The second node access operation includes:
[0102] Pop the top node from the stack to be visited and use it as the second currently visited node;
[0103] For each neighboring node of the second currently accessed node, determine whether the neighboring node has been accessed during the depth-first search process. If not, push the neighboring node onto the unaccessed stack. If so, determine that the neighboring node is a loop node.
[0104] In this embodiment, loop nodes are detected using a depth-first search algorithm, specifically including:
[0105] Initialize an empty stack to be accessed;
[0106] Push the starting node onto the stack to be visited;
[0107] When the stack to be visited is not empty, the top node of the stack is popped out in a loop and visited. The visiting process is as follows: for all adjacent nodes of the current node, if they have not been visited, they are pushed onto the stack to be visited; if they have been visited, the adjacent node is determined to be a loop node.
[0108] For example, remove node A from the top of the stack to be visited: [A], and visit it. At this time, the stack to be visited is: []. Get all adjacent nodes [B, E] of node A. Check if adjacent node B has been visited. If not, push it onto the stack to be visited: [B]. Check if adjacent node E has been visited. If not, push it onto the stack to be visited: [B, E].
[0109] Remove node E from the top of the stack to be visited and visit it. The stack to be visited now contains [B]. Get all adjacent nodes of node E [A, D]. Check if adjacent node A has been visited. If it has, then A is a cycle node. Check if adjacent node D has been visited. If it has not been visited, then push it onto the stack to be visited: [B, D].
[0110] Remove node D from the top of the stack to be visited and visit it. The stack now contains [B]. Get all adjacent nodes of node D [C, E]. Check if adjacent node C has been visited. If not, push it onto the stack to be visited: [B, C]. Check if adjacent node E has been visited. If it has been visited, determine that E is a cycle node.
[0111] Remove node C from the top of the stack to be visited and visit it. The stack now contains [B]. Obtain all adjacent nodes [B, D] of node C. Check if adjacent node B has already been visited. If it has, B is a cycle node. Check if adjacent node D has already been visited. If it has, D is a cycle node.
[0112] Remove node B from the top of the stack to be visited and visit it. The stack to be visited is now []. Get all adjacent nodes [A, C] of node B. Check if adjacent node A has been visited. If it has been visited, then A is a cycle node. Check if adjacent node C has been visited. If it has been visited, then C is a cycle node.
[0113] S5. Starting from the starting node, perform a second breadth-first search on the power distribution network topology map, and determine the disconnected nodes in the power distribution network topology map according to the first access order.
[0114] In a preferred embodiment, the step of performing a second breadth-first search on the distribution network topology map starting from the starting node, and determining the disconnected nodes in the distribution network topology map according to the first access order, includes:
[0115] Initialize an empty second queue to be accessed and a second access sequence counter with an initial value of 0;
[0116] Initialize the second access order of all nodes to 0;
[0117] Add the starting node to the second queue to be accessed;
[0118] Repeat the third node access operation until the second queue to be accessed is empty;
[0119] The third node access operation includes:
[0120] Take the head node of the second queue to be accessed and use it as the third currently accessed node;
[0121] Add all adjacent nodes of the third currently visited node that were not visited during the second breadth-first search to the second queue to be visited;
[0122] Increment the second access order counter by 1, and update the second access order of the third access node with the updated value of the second access order counter;
[0123] If the second access order of the third currently accessed node is less than the first access order of the third currently accessed node, then nodes whose first access order is not less than the second access order of the third currently accessed node and less than the first access order of the third currently accessed node are identified as disconnected nodes; the second access order counter is updated with the sum of the value of the first access order of the third currently accessed node and the current number of disconnected nodes.
[0124] In this embodiment, the detection of isolated nodes using a second breadth-first search algorithm specifically includes:
[0125] Initialize an empty second queue to be accessed and a second access sequence counter with an initial value of 0;
[0126] Add the starting node to the second queue to be visited;
[0127] When the second queue to be visited is not empty, the head node is retrieved in a loop and visited. The visiting process is as follows: for all adjacent nodes of the current node, if they have not been visited, they are added to the second queue to be visited, and during the visiting process, the disconnected nodes are identified based on whether the first visiting order and the second visiting order are consistent.
[0128] For example, suppose that nodes A and B are disconnected. The graph model of the power distribution network topology at this point contains the following nodes and edges:
[0129] Nodes: A, B, C, D, E, F;
[0130] Edges: (B, C), (C, D), (D, E), (E, A).
[0131] Take node A, the head node, from the second queue to be visited: [A], and visit it. The second visit order of node A is 1. At this time, the second queue to be visited is: []. Get all adjacent nodes [E] of node A. Check if adjacent node E has been visited. If it has not been visited, add it to the second queue to be visited: [E]. The first visit order and the second visit order of node A are the same.
[0132] Take node E, the head node of the second queue to be visited, and visit it. The second visit order of node E is 2. At this time, the second queue to be visited is: []. Get all adjacent nodes of node E [A,D]. Check if adjacent node A has been visited. If it has been visited, skip it. Check if adjacent node D has been visited. If it has not been visited, add it to the second queue to be visited: [D]. The second visit order 2 of node E is less than the first visit order 3. Determine the nodes whose first visit order is in the interval [2,3) as disconnected nodes, that is, node B whose first visit order is 2; and update the second visit order counter with the sum of the first visit order 3 of node E and the current number of disconnected nodes (1) (equal to 4).
[0133] Remove node D from the second queue to be visited and visit it. The second visit order for node D is 5. At this time, the second queue to be visited is: []. Get all adjacent nodes [C, E] of node D. Check if adjacent node C has been visited. If not, add it to the second queue to be visited: [C]. Check if adjacent node E has been visited. If it has been visited, skip it. The first and second visit orders for node D are the same.
[0134] Take node C, the head of the second queue to be visited, and visit it. The second visit order for node C is 6. At this time, the second queue to be visited is: []. Get all adjacent nodes [B, D] of node C. Check if adjacent node B has been visited. If not, add it to the second queue to be visited: [B]. Check if adjacent node D has been visited. If it has been visited, skip it. The second visit order 5 of node C is not less than the first visit order 4.
[0135] Take node B, the head of the second queue to be visited, and visit it. The second visit order of node B is 7. At this time, the second queue to be visited is: []. Get all adjacent nodes [A, C] of node B. Check if adjacent node A has been visited. If it has been visited, skip it. Check if adjacent node A has been visited. If it has been visited, skip it. The second visit order 7 of node B is not less than the first visit order 2.
[0136] S6. Treat all isolated nodes, loop nodes, and disconnected nodes as possible abnormal nodes, and calculate the connectivity of each of the possible abnormal nodes.
[0137] In a preferred embodiment, calculating the connectivity of each of the potentially anomalous nodes includes:
[0138] For each of the possible abnormal nodes, the neighboring node with the smallest first access order of the possible abnormal node is taken as the neighboring node of the possible abnormal node.
[0139] Obtain the edge weights between the potentially abnormal node and the neighboring nodes, the connectivity of the neighboring nodes, and the degree of the potentially abnormal node;
[0140] The connectivity of the potentially abnormal nodes is calculated based on the edge weights, the connectivity of neighboring nodes, and the degree of the potentially abnormal nodes.
[0141] The formula for calculating connectivity is:
[0142]
[0143] In the formula, C v Indicates the connectivity of node v; C u ω(u,v) represents the connectivity of node v to its neighboring node u; ω(u,v) represents the edge weight between node v and node u; d v This represents the degree of node v.
[0144] S7. Calculate the comprehensive anomaly score for each of the possible abnormal nodes based on the connectivity and first access order of all the possible abnormal nodes.
[0145] In a preferred embodiment, calculating the comprehensive anomaly score for each of the potentially anomalous nodes based on the connectivity and first access order of all the potentially anomalous nodes includes:
[0146] Determine the maximum connectivity based on the connectivity of all the possible abnormal nodes;
[0147] Determine the maximum first access order based on the first access order of all the possible abnormal nodes;
[0148] For each of the possible abnormal nodes, a comprehensive abnormal score is calculated based on the maximum connectivity, the maximum first access order, the connectivity of the possible abnormal node, and the first access order of the possible abnormal node.
[0149] The formula for calculating the comprehensive anomaly score is as follows:
[0150]
[0151] In the formula, A v C represents the overall anomaly score of node v; v Indicates the connectivity of node v; max(C v ) represents maximum connectivity; O v Indicates the first access order of node v; max(O v ) indicates the maximum first access order; α is the preset weight value.
[0152] S8. Determine the abnormal nodes based on the comprehensive abnormal score of each possible abnormal node.
[0153] In a preferred embodiment, determining the anomalous node based on the comprehensive anomalous score of each possible anomalous node includes:
[0154] Calculate the mean of the comprehensive anomaly scores based on the comprehensive anomaly scores of each possible anomaly node;
[0155] Nodes with a comprehensive anomaly score greater than the average comprehensive anomaly score are identified as anomaly nodes.
[0156] In this embodiment, a comprehensive anomaly score mean is constructed. The comprehensive anomaly scores of potential anomaly nodes are compared with the mean. If the comprehensive anomaly score is greater than the mean, the potential anomaly node is an anomaly node; if the comprehensive anomaly score of a potential anomaly node is less than or equal to the mean, the potential anomaly node is not an anomaly node.
[0157] S9. Mark all the abnormal nodes in the power distribution network topology diagram.
[0158] In this embodiment, a topology check is performed on the graph model, abnormal nodes are identified and marked, and the topology check results are output.
[0159] Example 2
[0160] Please refer to Figure 2 This is a schematic diagram of the structure of an automatic topology verification device for a distribution network according to an embodiment of the present invention, including: a data acquisition module, a possible abnormal node search module, and an abnormal node judgment module;
[0161] The data acquisition module is used to acquire the power distribution network topology diagram;
[0162] The possible abnormal node search module is used to perform a first breadth-first search on the distribution network topology map starting from the starting node to obtain the first access order of each node; wherein, the preset starting node is the node with the largest degree in the distribution network topology map; based on the result of the first breadth-first search, all unvisited nodes are regarded as isolated nodes in the distribution network topology map; starting from the starting node, a depth-first search is performed on the distribution network topology map to determine the loop nodes in the distribution network topology map; starting from the starting node, a second breadth-first search is performed on the distribution network topology map, and the disconnected nodes in the distribution network topology map are determined according to the first access order;
[0163] The abnormal node determination module is used to treat all isolated nodes, loop nodes, and disconnected nodes as possible abnormal nodes, calculate the connectivity of each possible abnormal node; calculate the comprehensive abnormal score of each possible abnormal node based on the connectivity of all possible abnormal nodes and the first access order; determine the abnormal node based on the comprehensive abnormal score of each possible abnormal node; and mark all the abnormal nodes in the power distribution network topology diagram.
[0164] Example 3
[0165] Accordingly, this invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the automatic power distribution network topology verification method described in the above-described embodiments of the invention.
[0166] Example 4
[0167] Accordingly, embodiments of the present invention provide a storage medium, the storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute the automatic power distribution network topology verification method described in the above embodiments of the invention.
[0168] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0169] Those skilled in the art will clearly understand that, for convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0170] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0171] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the device, connecting various parts of the device via various interfaces and lines.
[0172] The memory can be used to store the computer program. The processor implements various functions of the device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0173] The storage medium is a storage medium in which the computer program is stored. When executed by a processor, the computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0174] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for automatic verification of distribution network topology, characterized in that, include: Acquire equipment data and connection relationship data in the distribution network, import the acquired equipment data and connection relationship data into the graph database, and form a graph model of the distribution network topology. Starting from the starting node, a first breadth-first search is performed on the distribution network topology to obtain the first visit order for each node; wherein, the starting node is the node with the largest degree in the distribution network topology. Based on the results of the first breadth-first search, all unvisited nodes are considered as isolated nodes in the power distribution network topology. Starting from the starting node, a depth-first search is performed on the distribution network topology to determine the loop nodes in the distribution network topology. Starting from the starting node, a second breadth-first search is performed on the power distribution network topology map, and disconnected nodes in the power distribution network topology map are determined according to the first access order; Treat all isolated nodes, loop nodes, and disconnected nodes as possible abnormal nodes, and calculate the connectivity of each of the possible abnormal nodes; Calculate a comprehensive anomaly score for each of the possible anomaly nodes based on the connectivity and first access order of all the possible anomaly nodes. The abnormal nodes are identified based on the comprehensive abnormality score of each possible abnormal node. Mark all the abnormal nodes in the power distribution network topology diagram; The step of performing a second breadth-first search on the distribution network topology map starting from the starting node, and determining the disconnected nodes in the distribution network topology map according to the first access order, includes: Initialize an empty second queue to be accessed and a second access sequence counter with an initial value of 0; Initialize the second access order of all nodes to 0; Add the starting node to the second queue to be accessed; Repeat the third node access operation until the second queue to be accessed is empty; The third node access operation includes: Take the head node of the second queue to be accessed and use it as the third currently accessed node; Add all adjacent nodes of the third currently visited node that were not visited during the second breadth-first search to the second queue to be visited; Increment the second access order counter by 1, and update the second access order of the third currently accessed node with the updated value of the second access order counter; If the second access order of the third currently accessed node is less than the first access order of the third currently accessed node, then nodes whose first access order is not less than the second access order of the third currently accessed node and less than the first access order of the third currently accessed node are identified as disconnected nodes; the second access order counter is updated with the sum of the value of the first access order of the third currently accessed node and the current number of disconnected nodes.
2. The automatic topology verification method for distribution networks as described in claim 1, characterized in that, The first breadth-first search of the distribution network topology, starting from the initial node, to obtain the first access order for each node includes: Initialize an empty first queue to be accessed and a first access sequence counter with an initial value of 0; Add the starting node to the first queue to be accessed; Repeat the first node access operation until the first queue to be accessed is empty, obtain the first access order of each accessed node, and set the first access order of unaccessed nodes to 0. The first node access operation includes: Take the head node of the first queue to be accessed as the first currently accessed node; Add all adjacent nodes of the first currently visited node that were not visited during the first breadth-first search to the first queue to be visited; Increment the first access order counter by 1, and use the updated value of the first access order counter as the first access order of the first currently accessed node.
3. The automatic topology verification method for distribution networks as described in claim 1, characterized in that, The step of performing a depth-first search on the distribution network topology graph, starting from the starting node, to determine the loop nodes in the distribution network topology graph includes: Initialize an empty stack to be accessed; Push the starting node onto the stack to be visited; Repeat the second node access operation until the stack to be accessed is empty; The second node access operation includes: Pop the top node from the stack to be visited and use it as the second currently visited node; For each neighboring node of the second currently accessed node, determine whether the neighboring node has been accessed during the depth-first search process. If not, push the neighboring node onto the unaccessed stack. If so, determine that the neighboring node is a loop node.
4. The automatic topology verification method for distribution networks as described in claim 1, characterized in that, The calculation of the connectivity of each of the potentially abnormal nodes includes: For each of the possible abnormal nodes, the neighboring node with the smallest first access order of the possible abnormal node is taken as the neighboring node of the possible abnormal node. Obtain the edge weights between the potentially abnormal node and the neighboring nodes, the connectivity of the neighboring nodes, and the degree of the potentially abnormal node; The connectivity of the potentially abnormal nodes is calculated based on the edge weights, the connectivity of neighboring nodes, and the degree of the potentially abnormal nodes. The formula for calculating connectivity is: ; In the formula, Represents a node Connectivity; Represents a node neighboring nodes Connectivity; Represents a node and nodes Edge weights between them; Represents a node The degree.
5. The automatic topology verification method for distribution networks as described in claim 1, characterized in that, The step of calculating a comprehensive anomaly score for each of the potentially abnormal nodes based on the connectivity and first access order of all the potentially abnormal nodes includes: Determine the maximum connectivity based on the connectivity of all the possible abnormal nodes; Determine the maximum first access order based on the first access order of all the possible abnormal nodes; For each of the possible abnormal nodes, a comprehensive abnormal score is calculated based on the maximum connectivity, the maximum first access order, the connectivity of the possible abnormal node, and the first access order of the possible abnormal node. The formula for calculating the comprehensive anomaly score is as follows: ; In the formula, Represents a node The overall abnormality score; Represents a node Connectivity; Indicates maximum connectivity; Represents a node The first access order; Indicates the maximum first access order; The preset weight values.
6. The automatic topology verification method for distribution networks as described in claim 1, characterized in that, The process of determining abnormal nodes based on the comprehensive abnormality score of each potentially abnormal node includes: Calculate the mean of the comprehensive anomaly scores based on the comprehensive anomaly scores of each possible anomaly node; Nodes with a comprehensive anomaly score greater than the average comprehensive anomaly score are identified as anomaly nodes.
7. An automatic topology verification device for a distribution network, characterized in that, include: Data acquisition module, possible abnormal node search module, and abnormal node judgment module; The data acquisition module is used to acquire equipment data and connection relationship data in the power distribution network, and import the acquired equipment data and connection relationship data into the graph database to form a graph model of the power distribution network topology. The possible abnormal node search module is used to perform a first breadth-first search on the distribution network topology map starting from the starting node to obtain the first access order of each node; wherein, the preset starting node is the node with the largest degree in the distribution network topology map; according to the result of the first breadth-first search, all unvisited nodes are regarded as isolated nodes in the distribution network topology map; starting from the starting node, a depth-first search is performed on the distribution network topology map to determine the loop nodes in the distribution network topology map; starting from the starting node, a second breadth-first search is performed on the distribution network topology map, and disconnected nodes in the distribution network topology map are determined according to the first access order; The abnormal node determination module is used to treat all isolated nodes, loop nodes, and disconnected nodes as possible abnormal nodes, calculate the connectivity of each possible abnormal node; calculate the comprehensive abnormal score of each possible abnormal node based on the connectivity of all possible abnormal nodes and the first access order; determine the abnormal node based on the comprehensive abnormal score of each possible abnormal node; and mark all the abnormal nodes in the power distribution network topology diagram. The step of performing a second breadth-first search on the distribution network topology map starting from the starting node, and determining the disconnected nodes in the distribution network topology map according to the first access order, includes: Initialize an empty second queue to be accessed and a second access sequence counter with an initial value of 0; Initialize the second access order of all nodes to 0; Add the starting node to the second queue to be accessed; Repeat the third node access operation until the second queue to be accessed is empty; The third node access operation includes: Take the head node of the second queue to be accessed and use it as the third currently accessed node; Add all adjacent nodes of the third currently visited node that were not visited during the second breadth-first search to the second queue to be visited; Increment the second access order counter by 1, and update the second access order of the third currently accessed node with the updated value of the second access order counter; If the second access order of the third currently accessed node is less than the first access order of the third currently accessed node, then nodes whose first access order is not less than the second access order of the third currently accessed node and less than the first access order of the third currently accessed node are identified as disconnected nodes; the second access order counter is updated with the sum of the value of the first access order of the third currently accessed node and the current number of disconnected nodes.
8. A terminal device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the automatic power distribution network topology verification method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform the automatic power distribution network topology verification method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Power distribution network power failure simulation analysis method and system based on equipment topological relation
CN112597624A
Equipment island checking method and device based on topological data of power distribution network
CN116226106A