Power distribution network topology automatic checking method and device, terminal equipment and storage medium
By using breadth-first search and depth-first search in automatic verification of distribution network topology, identifying abnormal nodes, and calculating their connectivity and comprehensive abnormality scores, the problem of lack of data verification mechanism in the existing technology is solved, and the data quality of distribution network topology graphs is improved.
Patent Information
- Application Number
- CN202411991991.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The existing technology lacks an effective data verification mechanism in automatic verification of distribution network topology, resulting in incorrect data entering the graph database and affecting the overall data quality.
By obtaining the distribution network topology map, perform multiple breadth-first searches and depth-first searches, identify isolated nodes, loop nodes, and disconnected nodes, calculate connectivity and comprehensive exception scores for these nodes, and mark exception nodes to correct error data.
It realizes timely discovery and correction of wrong data in the distribution network topology diagram, and improves data quality and operation and maintenance efficiency.
Smart Images

Figure CN119884189A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of topology verification, and in particular to a method, device, terminal equipment and storage medium for automatic verification of distribution network topology. Background Art
[0002] The distribution network is the part of the power system that directly faces the end user and is responsible for distributing electricity from high-voltage transmission lines to low-voltage users. With the acceleration of urbanization and the widespread access to new energy, the scale and complexity of the distribution network are increasing, bringing unprecedented challenges to its operation and maintenance. With its unique advantages, graph database technology has shown great potential in the field of automatic verification of distribution network topology. Graph databases can seamlessly integrate data from different systems (such as SCADA systems, GIS systems, etc.) into a unified model, solve the problem of data islands, and realize integrated data management. Using the efficient query capability and pattern matching function of graph databases, complex network analysis tasks such as shortest path calculation and connectivity check can be completed quickly, thereby speeding up fault response and improving operation and maintenance efficiency. Graph databases not only support static data analysis, but also can combine time series data for dynamic simulation, providing a more scientific basis for the planning and design of distribution networks, and helping decision makers make more reasonable plans. Although graph database technology has shown obvious advantages in automatic verification of distribution network topology, it lacks an effective data verification mechanism and cannot detect and correct errors in data in a timely manner. This will cause erroneous data to enter the graph database, affecting the overall data quality. Summary of the invention
[0003] The present invention provides a method, device, terminal equipment and storage medium for automatic verification of distribution network topology to solve the technical problem that the prior art lacks a data verification mechanism, resulting in erroneous data entering a graph database.
[0004] In order to solve the above technical problems, an embodiment of the present invention provides a method for automatically checking the topology of a distribution network, comprising:
[0005] Obtain the distribution network topology map;
[0006] Starting from the starting node, a first breadth-first search is performed on the distribution network topology map to obtain a first access order for each node; wherein the preset starting node is the node with the largest degree in the distribution network topology map;
[0007] According to the result of the first breadth-first search, all nodes that have not been visited are regarded as isolated nodes in the distribution network topology graph;
[0008] 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;
[0009] Starting from the starting node, performing a second breadth-first search on the distribution network topology map, and determining a disconnected node in the distribution network topology map according to the first access order;
[0010] Taking all the isolated nodes, loop nodes and disconnected nodes as possible abnormal nodes, and calculating the connectivity of each of the possible abnormal nodes;
[0011] Calculating a comprehensive abnormality score of each of the possible abnormal nodes according to the connectivity and the first access order of all the possible abnormal nodes;
[0012] Determine the abnormal nodes based on the comprehensive abnormality score of each possible abnormal node;
[0013] All the abnormal nodes are marked in the distribution network topology diagram.
[0014] As a preferred solution, starting from the starting node, the first breadth-first search is performed on the distribution network topology map to obtain the first access sequence of each node, including:
[0015] Initialize an empty first waiting-to-be-accessed queue and a first access sequence counter with an initial value of 0;
[0016] Adding the starting node to the first queue to be accessed;
[0017] Repeat the first node access operation until the first to-be-accessed queue is empty, obtain the first access order of each visited node, and set the first access order of nodes that have not been visited to 0;
[0018] The first node access operation includes:
[0019] Taking out the head node from the first queue to be visited as the first current visited node;
[0020] Adding all adjacent nodes of the first currently visited node that have not been visited in the first breadth-first search process to the first to-be-visited queue;
[0021] The first access sequence counter is incremented by 1, and the updated value of the first access sequence counter is used as the first access sequence of the first current access node.
[0022] As a preferred solution, starting from the starting node, performing a depth-first search on the distribution network topology map to determine the loop nodes in the distribution network topology map includes:
[0023] Initialize an empty stack to be visited;
[0024] Pushing the starting node into the to-be-accessed stack;
[0025] Repeat the second node access operation until the to-be-accessed stack is empty;
[0026] The second node access operation includes:
[0027] Popping the top node from the to-be-visited stack as the second currently visited node;
[0028] For each adjacent node of the second currently visited node, determine whether the adjacent node has been visited during the depth-first search process; if not, push the adjacent node into the to-be-visited stack; if so, determine that the adjacent node is a loop node.
[0029] As a preferred solution, starting from the starting node, performing a second breadth-first search on the distribution network topology map, and determining the disconnected nodes in the distribution network topology map according to the first access order, includes:
[0030] Initialize an empty second to-be-accessed queue and a second access sequence counter with an initial value of 0;
[0031] Initialize the second access order of all nodes to 0;
[0032] Adding the starting node to the second to-be-accessed queue;
[0033] Repeat the third node access operation until the second to-be-accessed queue is empty;
[0034] The third node access operation includes:
[0035] Taking the head node from the second queue to be visited as the third currently visited node;
[0036] Adding all adjacent nodes of the third currently visited node that have not been visited in the second breadth-first search process to the second to-be-visited queue;
[0037] Incrementing the second access sequence counter by 1, and updating the second access sequence of the third access node with the updated value of the second access sequence counter;
[0038] If the second access order of the third currently accessed node is smaller than the first access order of the third currently accessed node, determine that the node whose first access order is not smaller than the second access order of the third currently accessed node and smaller than the first access order of the third currently accessed node is a disconnected node; and update the second access order counter 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 solution, the calculating the connectivity of each of the possible abnormal nodes includes:
[0040] For each of the possible abnormal nodes, taking the adjacent node with the smallest first access order of the possible abnormal node as the adjacent node of the possible abnormal node;
[0041] Obtaining edge weights between the possible abnormal node and the adjacent nodes, connectivity of the adjacent nodes, and the degree of the possible abnormal node;
[0042] Calculating the connectivity of the possible abnormal node according to the edge weight, the connectivity of the adjacent nodes and the degree of the possible abnormal node;
[0043] The calculation formula of connectivity is:
[0044]
[0045] In the formula, C v represents the connectivity of node v; C u 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 Represents the degree of node v.
[0046] As a preferred solution, the method of calculating the comprehensive abnormality score of each of the possible abnormal nodes according to the connectivity and the first access order of all the possible abnormal nodes includes:
[0047] Determining the maximum connectivity according to the connectivity of all the possible abnormal nodes;
[0048] Determine a maximum first access sequence according to the first access sequences of all the possible abnormal nodes;
[0049] For each of the possible abnormal nodes, calculating a comprehensive abnormality score of the possible abnormal node according to the maximum connectivity, the maximum first access sequence, the connectivity of the possible abnormal node and the first access sequence of the possible abnormal node;
[0050] The calculation formula of the comprehensive abnormality score is:
[0051]
[0052] In the formula, A v represents the comprehensive anomaly score of node v; C v represents the connectivity of node v; max(C v ) represents the maximum connectivity; O v represents the first access order of node v; max(Ov ) represents the maximum first access order; α is the preset weight value.
[0053] As a preferred solution, the step of determining abnormal nodes according to the comprehensive abnormality score of each possible abnormal node includes:
[0054] According to the comprehensive anomaly score of each possible abnormal node, the average comprehensive anomaly score is calculated;
[0055] A possible abnormal node whose comprehensive abnormality score is greater than the average comprehensive abnormality score is determined as an abnormal node.
[0056] On the basis of the above-mentioned embodiment, another embodiment of the present invention provides a distribution network topology automatic verification device, comprising: 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 a distribution network topology map;
[0058] The possible abnormal node search module is used to perform a first breadth-first search on the distribution network topology map starting from a starting node to obtain a first access order for 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 nodes that have not been visited 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 judgment module is used to take all the isolated nodes, loop nodes and disconnected nodes as possible abnormal nodes, calculate the connectivity of each possible abnormal node; calculate the comprehensive abnormality score of each possible abnormal node according to the connectivity and the first access order of all the possible abnormal nodes; determine the abnormal node according to the comprehensive abnormality score of each possible abnormal node; and mark all the abnormal nodes in the distribution network topology map.
[0060] Based on the above embodiments, another embodiment of the present 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, and when the processor executes the computer program, the distribution network topology automatic verification method described in the above invention embodiment is implemented.
[0061] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the distribution network topology automatic verification method described in the above invention embodiment.
[0062] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0063] The present 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; 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 nodes that have not been visited 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; all the isolated nodes, loop nodes and disconnected nodes are regarded as possible abnormal nodes, and the connectivity of each possible abnormal node is calculated; according to the connectivity of all the possible abnormal nodes and the first access order, the comprehensive abnormal score of each possible abnormal node is calculated; according to the comprehensive abnormal score of each possible abnormal node, the abnormal node is determined; and all the abnormal nodes are marked in the distribution network topology map. The present invention provides a distribution network topology automatic verification method, which can timely discover and correct errors in the distribution network topology map and improve data quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flow chart of a method for automatic verification of distribution network topology provided by one embodiment of the present invention;
[0065] Figure 2 It is a structural schematic diagram of a distribution network topology automatic calibration device provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] Embodiment 1
[0068] Please refer to Figure 1, is a flow chart of a method for automatic verification of distribution network topology provided by an embodiment of the present invention, comprising:
[0069] S1. Obtain a distribution network topology map.
[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 a graph database to form a graph model of the distribution network topology map.
[0071] Exemplarily, the graph model of the distribution network topology graph 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 in series, but are 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 distribution network topology map to obtain a first access order for each node; wherein the preset starting node is the node with the largest degree in the distribution network topology map.
[0077] In a preferred embodiment, starting from the starting node, performing a first breadth-first search on the distribution network topology map to obtain a first access sequence of each node includes:
[0078] Initialize an empty first waiting-to-be-accessed queue and a first access sequence counter with an initial value of 0;
[0079] Adding the starting node to the first queue to be accessed;
[0080] Repeat the first node access operation until the first to-be-accessed queue is empty, obtain the first access order of each visited node, and set the first access order of nodes that have not been visited to 0;
[0081] The first node access operation includes:
[0082] Taking out the head node from the first queue to be visited as the first current visited node;
[0083] Adding all adjacent nodes of the first currently visited node that have not been visited in the first breadth-first search process to the first to-be-visited queue;
[0084] The first access sequence counter is incremented by 1, and the updated value of the first access sequence counter is used as the first access sequence of the first current access node.
[0085] In this embodiment, isolated nodes are detected by a first breadth-first search algorithm, which specifically includes:
[0086] Initialize an empty first waiting-to-be-accessed queue and a first access sequence counter with an initial value of 0;
[0087] Add the starting node to the first queue to be accessed;
[0088] When the first queue to be visited is not empty, the first node of the queue is taken out cyclically and visited. The visiting process is: 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] Exemplarily, the first node A is taken out from the first queue to be visited: [A], and is visited. The first visit order of node A is 1; at this time, the first queue to be visited is: []. All adjacent nodes of node A are obtained [B, E]. Check whether the adjacent node B has been visited. If not, add it to the first queue to be visited: [B]. Check whether the adjacent node E has been visited. If not, add it to the first queue to be visited: [B, E].
[0090] Take out the first node B from the first queue to be visited and visit it. The first visit order of node B is 2; at this time, the first queue to be visited is: [E]. Get all the adjacent nodes of node B [A, C]. Check whether the adjacent node A has been visited. If it has been visited, skip it. Check whether the adjacent node C has been visited. If it has not been visited, add it to the first queue to be visited: [E, C].
[0091] Take out the first node E from the first queue to be visited and visit it. The first visit order of node E is 3; at this time, the first queue to be visited is: [C]. Get all the adjacent nodes of node E [A, D]. Check whether the adjacent node A has been visited. If it has been visited, skip it. Check whether the adjacent node D has been visited. If it has not been visited, add it to the first queue to be visited: [C, D].
[0092] Take out the first node C from the first queue to be visited and visit it. The first visit order of node C is 4; at this time, the first queue to be visited is: [D]. Get all the adjacent nodes of node C [B, D]. Check whether the adjacent node B has been visited. If it has been visited, skip it. Check whether the adjacent node D has been visited. If it has not been visited, add it to the first queue to be visited: [D].
[0093] Take out the first node D from 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 the adjacent nodes of node D [C, E]. Check whether the adjacent node C has been visited. If it has been visited, skip it. Check whether the adjacent node E has been visited. If it has been visited, skip it.
[0094] S3. According to the result of the first breadth-first search, all nodes that have not been visited are regarded as isolated nodes in the distribution network topology map.
[0095] In step S3, the node F that has not been visited after the first breadth-first search is completed is regarded as an isolated node.
[0096] S4. 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.
[0097] In a preferred embodiment, starting from a starting node, performing a depth-first search on the distribution network topology map to determine a loop node in the distribution network topology map includes:
[0098] Initialize an empty stack to be visited;
[0099] Pushing the starting node into the to-be-accessed stack;
[0100] Repeat the second node access operation until the to-be-accessed stack is empty;
[0101] The second node access operation includes:
[0102] Popping the top node from the to-be-visited stack as the second currently visited node;
[0103] For each adjacent node of the second currently visited node, determine whether the adjacent node has been visited during the depth-first search process; if not, push the adjacent node into the to-be-visited stack; if so, determine that the adjacent node is a loop node.
[0104] In this embodiment, loop nodes are detected by a depth-first search algorithm, specifically including:
[0105] Initialize an empty stack to be visited;
[0106] Push the starting node into the to-be-visited stack;
[0107] When the to-be-visited stack is not empty, the top node of the stack is taken out cyclically 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 into the to-be-visited stack; if they have been visited, the adjacent node is determined to be a loop node.
[0108] Exemplarily, take out the top node A from the to-be-visited stack: [A] and visit it. At this time, the to-be-visited stack is: []. Get all the adjacent nodes of node A [B, E]. Check whether the adjacent node B has been visited. If not, push it into the to-be-visited stack: [B]. Check whether the adjacent node E has been visited. If not, push it into the to-be-visited stack: [B, E].
[0109] Take out the top node E from the to-be-visited stack and visit it. The to-be-visited stack is now [B]. Get all the adjacent nodes of node E [A, D]. Check whether the adjacent node A has been visited. If it has been visited, determine that A is a loop node. Check whether the adjacent node D has been visited. If it has not been visited, push it into the to-be-visited stack: [B, D].
[0110] Take out the top node D from the to-be-visited stack and visit it. The to-be-visited stack is now [B]. Get all the adjacent nodes of node D [C, E]. Check whether the adjacent node C has been visited. If not, push it into the to-be-visited stack: [B, C]. Check whether the adjacent node E has been visited. If it has been visited, determine that E is a loop node.
[0111] Take out the top node C from the to-be-visited stack and visit it. The to-be-visited stack is now [B]. Get all the adjacent nodes of node C [B, D]. Check whether the adjacent node B has been visited. If it has been visited, determine that B is a loop node. Check whether the adjacent node D has been visited. If it has been visited, determine that D is a loop node.
[0112] Take out the top node B from the to-be-visited stack and visit it. The to-be-visited stack is now []. Get all the adjacent nodes of node B [A, C]. Check whether the adjacent node A has been visited. If it has been visited, determine that A is a loop node. Check whether the adjacent node C has been visited. If it has been visited, determine that C is a loop node.
[0113] S5. Starting from the starting node, perform a second breadth-first search on the distribution network topology map, and determine the disconnected nodes in the distribution network topology map according to the first access order.
[0114] In a preferred embodiment, starting from the starting node, performing a second breadth-first search on the distribution network topology map, and determining the disconnected nodes in the distribution network topology map according to the first access order, includes:
[0115] Initialize an empty second to-be-accessed queue and a second access sequence counter with an initial value of 0;
[0116] Initialize the second access order of all nodes to 0;
[0117] Adding the starting node to the second to-be-accessed queue;
[0118] Repeat the third node access operation until the second to-be-accessed queue is empty;
[0119] The third node access operation includes:
[0120] Taking the head node from the second queue to be visited as the third currently visited node;
[0121] Adding all adjacent nodes of the third currently visited node that have not been visited in the second breadth-first search process to the second to-be-visited queue;
[0122] Incrementing the second access sequence counter by 1, and updating the second access sequence of the third access node with the updated value of the second access sequence counter;
[0123] If the second access order of the third currently accessed node is smaller than the first access order of the third currently accessed node, determine that the node whose first access order is not smaller than the second access order of the third currently accessed node and smaller than the first access order of the third currently accessed node is a disconnected node; and update the second access order counter 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, in this embodiment, the isolated node is detected by a second breadth-first search algorithm, specifically including:
[0125] Initialize an empty second to-be-accessed queue and a second access sequence counter with an initial value of 0;
[0126] Add the starting node to the second queue to be accessed;
[0127] When the second queue to be visited is not empty, the first node of the queue is taken out cyclically 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 confirmed according to whether the first access sequence and the second access sequence are consistent.
[0128] For example, assume that the connection between nodes A and B is disconnected. The graph model of the distribution network topology graph at this time includes 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 out the first node A from the second queue to be visited: [A] and visit it. The second access order of node A is 1; at this time, the second queue to be visited is: []. Get all adjacent nodes of node A [E]. Check whether the adjacent node E has been visited. If not, add it to the second queue to be visited: [E]. The first access order of node A is consistent with the second access order.
[0132] Take out the head node E from the second queue to be visited and visit it. The second access order of node E is 2; at this time, the second queue to be visited is: []. Get all adjacent nodes [A, D] of node E. Check whether the adjacent node A has been visited. If it has been visited, skip it. Check whether the adjacent node D has been visited. If it has not been visited, add it to the second queue to be visited: [D]. The second access order 2 of node E is less than the first access order 3. The node with the first access order in the interval [2,3) is determined to be a disconnected node, that is, node B with a first access order of 2; and the sum of the first access order 3 of node E and the current number of disconnected nodes (1) (equal to 4) is used to update the second access order counter.
[0133] Take out the first node D from the second queue to be visited and visit it. The second visit order of node D is 5. At this time, the second queue to be visited is: []. Get all the adjacent nodes of node D [C, E]. Check whether the adjacent node C has been visited. If not, add it to the second queue to be visited: [C]. Check whether the adjacent node E has been visited. If it has been visited, skip it. The first visit order of node D is consistent with the second visit order.
[0134] Take out the first node C from the second queue to be visited and visit it. The second access order of node C is 6. At this time, the second queue to be visited is: []. Get all the adjacent nodes of node C [B, D]. Check whether the adjacent node B has been visited. If not, add it to the second queue to be visited: [B]. Check whether the adjacent node D has been visited. If it has been visited, skip it. The second access order of node C is 5 and is not less than the first access order 4.
[0135] Take out the first node B from the second queue to be visited and visit it. The second access order of node B is 7. At this time, the second queue to be visited is: []. Get all the adjacent nodes of node B [A, C]. Check whether the adjacent node A has been visited. If it has been visited, skip it. Check whether the adjacent node A has been visited. If it has been visited, skip it. The second access order of node B 7 is not less than the first access order 2.
[0136] S6. All the isolated nodes, loop nodes and disconnected nodes are regarded as possible abnormal nodes, and the connectivity of each possible abnormal node is calculated.
[0137] In a preferred embodiment, the calculating the connectivity of each of the possible abnormal nodes includes:
[0138] For each of the possible abnormal nodes, taking the adjacent node with the smallest first access order of the possible abnormal node as the adjacent node of the possible abnormal node;
[0139] Obtaining edge weights between the possible abnormal node and the adjacent nodes, connectivity of the adjacent nodes, and the degree of the possible abnormal node;
[0140] Calculating the connectivity of the possible abnormal node according to the edge weight, the connectivity of the adjacent nodes and the degree of the possible abnormal node;
[0141] The calculation formula of connectivity is:
[0142]
[0143] In the formula, C v represents the connectivity of node v; C u 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 Represents the degree of node v.
[0144] S7. Calculate a comprehensive abnormality score of each of the possible abnormal nodes according to the connectivity and the first access order of all the possible abnormal nodes.
[0145] In a preferred embodiment, the step of calculating the comprehensive abnormality score of each of the possible abnormal nodes according to the connectivity and the first access order of all the possible abnormal nodes includes:
[0146] Determining the maximum connectivity according to the connectivity of all the possible abnormal nodes;
[0147] Determine a maximum first access sequence according to the first access sequences of all the possible abnormal nodes;
[0148] For each of the possible abnormal nodes, calculating a comprehensive abnormality score of the possible abnormal node according to the maximum connectivity, the maximum first access sequence, the connectivity of the possible abnormal node and the first access sequence of the possible abnormal node;
[0149] The calculation formula of the comprehensive abnormality score is:
[0150]
[0151] In the formula, A v represents the comprehensive anomaly score of node v; C v represents the connectivity of node v; max(C v ) represents the maximum connectivity; O v represents the first access order of node v; max(O v ) represents the maximum first access order; α is the preset weight value.
[0152] S8. Determine the abnormal node according to the comprehensive abnormality score of each possible abnormal node.
[0153] In a preferred embodiment, determining the abnormal node according to the comprehensive abnormality score of each possible abnormal node includes:
[0154] According to the comprehensive anomaly score of each possible abnormal node, the average comprehensive anomaly score is calculated;
[0155] A possible abnormal node whose comprehensive abnormality score is greater than the average comprehensive abnormality score is determined as an abnormal node.
[0156] In this embodiment, a mean of the comprehensive anomaly score is constructed, and the comprehensive anomaly score of the possible abnormal node is compared with the mean. If the comprehensive anomaly score is greater than the mean, the possible abnormal node is an abnormal node; if the comprehensive score of the possible abnormal node is less than or equal to the mean, the possible abnormal node is not an abnormal node.
[0157] S9. Mark all the abnormal nodes in the distribution network topology diagram.
[0158] In this embodiment, a topology check is performed on the graph model, abnormal nodes are identified and marked, and a topology check result is output.
[0159] Embodiment 2
[0160] Please refer to Figure 2 , is a schematic diagram of the structure of a distribution network topology automatic verification device provided by an embodiment of the present invention, comprising: 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 a distribution network topology map;
[0162] The possible abnormal node search module is used to perform a first breadth-first search on the distribution network topology map starting from a starting node to obtain a first access order for 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 nodes that have not been visited 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 judgment module is used to take all the isolated nodes, loop nodes and disconnected nodes as possible abnormal nodes, calculate the connectivity of each possible abnormal node; calculate the comprehensive abnormality score of each possible abnormal node according to the connectivity and the first access order of all the possible abnormal nodes; determine the abnormal node according to the comprehensive abnormality score of each possible abnormal node; and mark all the abnormal nodes in the distribution network topology map.
[0164] Embodiment 3
[0165] Accordingly, an embodiment of the present 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, and when the processor executes the computer program, the distribution network topology automatic verification method described in the above-mentioned embodiment of the invention is implemented.
[0166] Embodiment 4
[0167] Accordingly, an embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the distribution network topology automatic verification method described in the above-mentioned embodiment of the invention.
[0168] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0169] Those skilled in the art can clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0170] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0171] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device, and various interfaces and lines are used to connect various parts of the entire device.
[0172] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0173] The storage medium is a storage medium, and the computer program is stored in the storage medium. When the computer program is executed by the processor, the steps of each method embodiment described above can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium can be appropriately increased or decreased 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 electric carrier signals and telecommunication signals.
[0174] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. 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: Obtain the distribution network topology map; Starting from the starting node, a first breadth-first search is performed on the distribution network topology map to obtain a first access order of each node; wherein the 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 nodes that have not been visited are regarded as isolated nodes in the distribution network topology graph; 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, performing a second breadth-first search on the distribution network topology map, and determining a disconnected node in the distribution network topology map according to the first access order; Taking all the isolated nodes, loop nodes and disconnected nodes as possible abnormal nodes, and calculating the connectivity of each of the possible abnormal nodes; Calculating a comprehensive abnormality score of each of the possible abnormal nodes according to the connectivity and the first access order of all the possible abnormal nodes; Determine the abnormal nodes based on the comprehensive abnormality score of each possible abnormal node; All the abnormal nodes are marked in the distribution network topology diagram.
2. The method for automatic verification of distribution network topology according to claim 1, characterized in that: Starting from the starting node, performing a first breadth-first search on the distribution network topology map to obtain a first access sequence of each node includes: Initialize an empty first waiting-to-be-accessed queue and a first access sequence counter with an initial value of 0; Adding the starting node to the first queue to be accessed; Repeat the first node access operation until the first to-be-accessed queue is empty, obtain the first access order of each visited node, and set the first access order of nodes that have not been visited to 0; The first node access operation includes: Taking out the head node from the first queue to be visited as the first current visited node; Adding all adjacent nodes of the first currently visited node that have not been visited in the first breadth-first search process to the first to-be-visited queue; The first access sequence counter is incremented by 1, and the updated value of the first access sequence counter is used as the first access sequence of the first current access node.
3. The method for automatic verification of distribution network topology according to claim 1, characterized in that: Starting from the starting node, performing a depth-first search on the distribution network topology map to determine the loop nodes in the distribution network topology map includes: Initialize an empty stack to be visited; Pushing the starting node into the to-be-accessed stack; Repeat the second node access operation until the to-be-accessed stack is empty; The second node access operation includes: Popping the top node from the to-be-visited stack as the second currently visited node; For each adjacent node of the second currently visited node, determine whether the adjacent node has been visited during the depth-first search process; if not, push the adjacent node into the to-be-visited stack; if so, determine that the adjacent node is a loop node.
4. The method for automatic verification of distribution network topology according to claim 1, characterized in that: 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 to-be-accessed queue and a second access sequence counter with an initial value of 0; Initialize the second access order of all nodes to 0; Adding the starting node to the second to-be-accessed queue; Repeat the third node access operation until the second to-be-accessed queue is empty; The third node access operation includes: Taking the head node from the second queue to be visited as the third currently visited node; Adding all adjacent nodes of the third currently visited node that have not been visited in the second breadth-first search process to the second to-be-visited queue; Incrementing the second access sequence counter by 1, and updating the second access sequence of the third access node with the updated value of the second access sequence counter; If the second access order of the third currently accessed node is smaller than the first access order of the third currently accessed node, determine that the node whose first access order is not smaller than the second access order of the third currently accessed node and smaller than the first access order of the third currently accessed node is a disconnected node; and update the second access order counter with the sum of the value of the first access order of the third currently accessed node and the current number of disconnected nodes.
5. The method for automatic verification of distribution network topology according to claim 1, characterized in that: The calculating the connectivity of each of the possible abnormal nodes includes: For each of the possible abnormal nodes, taking the adjacent node with the smallest first access order of the possible abnormal node as the adjacent node of the possible abnormal node; Obtaining edge weights between the possible abnormal node and the adjacent nodes, connectivity of the adjacent nodes, and the degree of the possible abnormal node; Calculating the connectivity of the possible abnormal node according to the edge weight, the connectivity of the adjacent nodes and the degree of the possible abnormal node; The calculation formula of connectivity is: In the formula, C v represents the connectivity of node v; C u 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 Represents the degree of node v.
6. The method for automatic verification of distribution network topology according to claim 1, characterized in that: The step of calculating a comprehensive abnormality score of each of the possible abnormal nodes according to the connectivity and the first access order of all the possible abnormal nodes includes: Determining the maximum connectivity according to the connectivity of all the possible abnormal nodes; Determine a maximum first access sequence according to the first access sequences of all the possible abnormal nodes; For each of the possible abnormal nodes, calculating a comprehensive abnormality score of the possible abnormal node according to the maximum connectivity, the maximum first access sequence, the connectivity of the possible abnormal node and the first access sequence of the possible abnormal node; The calculation formula of the comprehensive abnormality score is: In the formula, A v represents the comprehensive anomaly score of node v; C v represents the connectivity of node v; max(C v ) represents the maximum connectivity; O v represents the first access order of node v; max(O v ) represents the maximum first access order; α is the preset weight value.
7. The method for automatic verification of distribution network topology according to claim 1, characterized in that: The step of determining the abnormal node according to the comprehensive abnormality score of each possible abnormal node includes: According to the comprehensive anomaly score of each possible abnormal node, the average comprehensive anomaly score is calculated; A possible abnormal node whose comprehensive abnormality score is greater than the average comprehensive abnormality score is determined as an abnormal node.
8. A distribution network topology automatic verification device, 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 a distribution network topology map; The possible abnormal node search module is used to perform a first breadth-first search on the distribution network topology map starting from a starting node to obtain a first access order for 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 nodes that have not been visited 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; The abnormal node judgment module is used to take all the isolated nodes, loop nodes and disconnected nodes as possible abnormal nodes, calculate the connectivity of each possible abnormal node; calculate the comprehensive abnormality score of each possible abnormal node according to the connectivity and the first access order of all the possible abnormal nodes; determine the abnormal node according to the comprehensive abnormality score of each possible abnormal node; and mark all the abnormal nodes in the distribution network topology map.
9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for automatic verification of distribution network topology as claimed in any one of claims 1 to 7 is implemented.
10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute the method for automatic verification of distribution network topology according to any one of claims 1 to 7.
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
Network abnormal information extraction method and device, electronic equipment and storage medium
CN118740459A
Trimming blackhole clusters
US11704315B1
Cited By
Power distribution network adjustment processing system and method based on simulation requirements
CN120745134A
Data communication transmission method and device in wireless communication network and medium
CN121418830A