Self-error correction technology for node measurement data of hybrid power grid topological graph
By constructing a directed graph and identifying and breaking loops, the problem of topological logic confusion caused by node metering data errors in hybrid power grids is solved, and accurate and real-time calculation of power and energy components in the power grid is achieved, thereby improving the efficiency and reliability of power grid operation.
Patent Information
- Application Number
- CN202510870201.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-26
AI Technical Summary
In hybrid power grids, topological logic confusion caused by errors in node meter data collection affects the accurate calculation and real-time performance of power and energy components in the power grid.
Topological sorting theory and depth-first traversal (DFS) strategy are used to construct directed graphs, identify and break directed loops, and correct node measurement data by adjusting directed edges to ensure the total order relationship of the topological structure.
It achieves accurate and real-time calculation of node power and energy components in the hybrid power grid, improving the efficiency and reliability of power grid operation.
Smart Images

Figure BDA0005469677910000031 
Figure BDA0005469677910000071 
Figure FDA0005469677890000021
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid technology, and in particular to a self-correcting technology for metering data of nodes in a hybrid power grid topology diagram. Background Art
[0002] With the advocacy and popularization of green energy, new types of power plants and substations are rapidly emerging and becoming increasingly popular. The scale of the power grid network is rapidly expanding, and the network structure is becoming increasingly complex. This objective situation poses a huge challenge to network operation monitoring and energy composition analysis. How to timely and accurately calculate the power consumption and node power composition ratio of each node in the power network has become a key research focus and hot topic in the industry. The types and number of network sites (hereinafter referred to as "nodes" for ease of understanding) are becoming increasingly complex, and the frequency of meter data collection for each node is also increasing. Any error in the data collection process at any node will lead to errors in the grid power accounting and energy composition calculation.
[0003] From the perspective of electric energy flow, the hybrid electric energy network composed of stations as "nodes" and transmission and distribution lines as "edges" constitutes a huge directed topological logical graph. Since the energy meter collection time slot of each node is getting shorter and shorter (currently reaching the minute level), the state of each node at any time is instantaneous, which requires that the full node accounting based on the topological structure must be real-time. However, in actual operation scenarios, due to factors such as the meter standard, collection method, data transmission protocol and channel medium, individual node metering errors are unavoidable. Although such errors are individual at any time, they are sufficient to destroy the full order relationship of the entire power grid topology, that is, to produce a "logically directed closed loop". In order to support the accurate accounting of electricity for all nodes in the entire network, it is objectively required to have sufficient error capture and correction strategies and means. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, this paper proposes a self-correcting technology for node metering data in hybrid power grid topologies. This technology not only identifies node data errors but also automatically corrects them, enabling accurate, real-time calculation of power and energy components at all nodes across the entire topology.
[0005] The present invention provides a self-correcting technology for node metering data of a hybrid power grid topology diagram, which is characterized by comprising the following steps:
[0006] Step 1: Determine whether the node meter data of the hybrid power grid is abnormal. Use topological sorting theory to perform topological sorting on the directed graph of the power grid. If a topological logic error is found, it is said that the nodes of the directed graph satisfy a partial order relationship.
[0007] Step 2: Identify directed cycles in the partial order relation and use the depth-first search (DFS) strategy of the directed graph to identify all the cycle subgraphs in the directed graph.
[0008] Step 3: Automatically correct the meter data of directed graph nodes.
[0009] Specifically, step 1 is to construct a directed graph G for a hybrid power network with all stations as nodes (denoted as V), transmission lines between all stations as edges (denoted as E), and the power flow carried by the lines as the direction; and obtain a total order relationship for V in G using topological sorting theory. The specific algorithm is as follows:
[0010] Step 1: Construct a directed topological graph G(V,E) and calculate the indegree of each node v∈V;
[0011] Step 2: Select any node v'∈V with Indegree=0 and output the node v';
[0012] Step 3: Delete node v' and all directed edges starting from v' in G;
[0013] Step 4: Repeat step 2 and step 3 until there are no new nodes output;
[0014] If the set of all output nodes V'=V, that is, all nodes in G are output, then the data of the directed graph G is accurate and the nodes of the directed graph G are said to satisfy the total order relationship; otherwise, there is a "directed loop" in the directed graph G, that is, a topological logic error occurs, and the nodes of the directed graph G are said to satisfy the partial order relationship;
[0015] Whether the directed graph G satisfies the total order relation is used as the identification standard for judging whether the hybrid power grid meter data is compliant;
[0016]
[0017] The step 2 is specifically to use the depth-first traversal (DFS) strategy of the directed graph to search all loop subgraphs in G. When traversing all edges of the directed graph G, each time the depth is increased, the edge path from the starting node to the current node is recorded. If a node in a certain path is traversed repeatedly, it can be determined that there is a loop subgraph in G, and then the complete logical loop is traced back according to the traversal order of nodes and edges.
[0018] In step 2, a loop dictionary and a node state array are used to record the complete path information of all loops and the traversal status of all nodes in G to assist the directed loop identification algorithm process; a node state array is used to record the traversal status of each node in G. The traversal status of the node can be used to determine whether the local directed graph associated with the node constitutes a loop and to identify the path information of the specific loop;
[0019] For each node v∈V in the directed graph G, three traversal states are set, namely:
[0020] Untraversed: The current node v is a brand new node and has not been traversed yet;
[0021] Traversing: The current node v has been traversed, but all branches and sub-branches of v have not been searched yet;
[0022] Traversed: All branches and subbranches of node v have been traversed, and no loops are found.
[0023] The step 2, tracing back the complete logical loop, i.e. the directed loop identification algorithm is specifically as follows:
[0024] S01: Initialize all node states to "not traversed" and initialize the loop dictionary to an empty set;
[0025] S02: Extract a node x∈V with a status of "not traversed" from the node status array, push x into the stack, start depth-first search, and change the status of node x to "traversing";
[0026] S03: traverse the adjacent nodes y∈V of node x;
[0027] If y is an "untraversed" node, then continue the depth-first search starting from the y node;
[0028] If y is a "traversing" node, it means that node y has been traversed before, which indicates that there is a loop in the graph. Extract all node elements between the top node of the stack and the position where y first appears in the stack from the stack. Construct a list L based on these node elements. List L contains node y. At this time, L represents a logical closed loop. Output L to the loop dictionary;
[0029] If y is a "traversed" node, then the branches and sub-branches of the node have been confirmed to be acyclic, and the current search is terminated;
[0030] Repeat S02 and S03 until there are no [untraversed] nodes in the node status array; at this time, output the loop dictionary to obtain all loops.
[0031] In actual business scenarios, the existence of directed loops is inconsistent with the logic of power transmission business. The main reason for this is the error in meter data collection at the station. Therefore, from a topological perspective, data error correction is equivalent to breaking the loop in the directed graph.
[0032] In step 3, the loop breaking method is to remove individual directed edges that do not meet the business logic requirements based on the loop dictionary output by the directed loop identification algorithm in step 2; the directed graph node meter data error correction algorithm is:
[0033] S1: Read the directed loop dictionary and sort it in descending order according to the link length of the loop;
[0034] S2: Read the loop in sequence and calculate the sharing degree of each directed edge in the loop, that is, the number of times it is shared;
[0035] S3: Check whether the directed edge with the highest degree of sharing is unique. If there is only one, remove it directly from the directed graph G and repeat S2. If it is not unique, that is, there are N candidates with the highest degree of sharing, execute S4.
[0036] S4: Inspect N directed edges and directly remove the directed edge with the smallest energy from the directed graph G;
[0037] Repeat S2 to S4 until all directed cycles in the dictionary are broken.
[0038] According to the requirements of electric energy metering accuracy, the principles for breaking loops are:
[0039] Principle 1: Prioritize breaking long directed loops: Sort loops in descending order of length, breaking the loop with the longest link first, then the loop with the second longest link, and finally the loop with the shortest link.
[0040] Principle 2: Prioritize the removal of directed edges shared by multiple loops: If multiple loops share one or more directed edges (such as Figure 7 ), the directed edges with the highest degree of sharing are removed first. This not only maximizes processing efficiency (removing one directed edge can break multiple loops at the same time), but also meets the requirements of lossless energy metering and accurate energy metering.
[0041] Principle 3, energy-carrying minimization principle: In a loop, the directed edge with the smallest energy-carrying capacity is removed first. That is, the power carried by the directed edge is used as the weight, and the directed edge with the smallest weight is removed. This operation meets the requirement of minimizing the loss of measurement accuracy.
[0042] The present invention provides a beneficial effect: it relates to a technology for identifying and automatically correcting metering data errors at any node in a hybrid power grid topology. The proposed algorithm not only identifies node data errors but also automatically corrects them, enabling accurate, real-time calculation of power and energy components at all nodes in the entire topology.
[0043] This technology constructs a directed topology graph and incorporates topological sorting theory to determine whether node meter data is abnormal. By detecting topological logic errors and implementing automatic error correction strategies, it effectively avoids grid topology logic disruptions caused by data anomalies, ensuring real-time, accurate grid-wide energy accounting. This is of great significance for improving grid operational efficiency and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a directed graph of a partially ordered relation according to the present invention (with a directed cycle);
[0045] Figure 2 is a directed graph of the total order relation of the present invention (no directed cycles exist);
[0046] Figure 3 This is an example diagram of the loop identification algorithm process of the present invention (directed graph G);
[0047] Figure 4 This is an example diagram of the loop identification algorithm process of the present invention (loop discovery: substation 1 -> substation 2);
[0048] Figure 5 This is an example diagram of the loop identification algorithm process of the present invention (loop discovery: substation 1->substation 2->substation 3);
[0049] Figure 6 This is an example diagram of the loop identification algorithm process of the present invention (directed loop is found: substation 1->substation 4->substation 5->substation 3);
[0050] Figure 7 This is a schematic diagram of multi-ring shared directed edges of the present invention;
[0051] Figure 8 This is an example diagram of the directed graph node meter data error correction algorithm of the present invention (three directed loops a, b and c are searched out);
[0052] Figure 9 The directed graph G after the data of the present invention is automatically corrected ' . DETAILED DESCRIPTION
[0053] In embodiment 1, the present invention provides a self-correcting technology for metering data of nodes in a hybrid power grid topology, characterized by comprising the following steps:
[0054] Step 1: Determine whether the node meter data of the hybrid power grid is abnormal. Use topological sorting theory to perform topological sorting on the directed graph of the power grid. If a topological logic error is found, it is said that the nodes of the directed graph satisfy a partial order relationship.
[0055] Step 2: Identify directed cycles in the partial order relation and use the depth-first search (DFS) strategy of the directed graph to identify all the cycle subgraphs in the directed graph.
[0056] Step three: Automatic error correction of node meter data.
[0057] Specifically, step 1 is to construct a directed graph G for a hybrid power network with all stations as nodes (denoted as V), transmission lines between all stations as edges (denoted as E), and the power flow carried by the lines as the direction; and obtain a total order relationship for V in G using topological sorting theory. The specific algorithm is as follows:
[0058] Step 1: Construct a directed topological graph G(V,E) and calculate the indegree of each node v∈V;
[0059] Step 2: Select any node v'∈V with Indegree=0 and output the node v';
[0060] Step 3: Delete node v' and all directed edges starting from v' in G;
[0061] Step 4: Repeat step 2 and step 3 until there are no new nodes output;
[0062] If the set of all output nodes V'=V, that is, all nodes in G are output, then the data of the directed graph G is accurate and the nodes of the directed graph G are said to satisfy the total order relationship; otherwise, there is a "directed loop" in the directed graph G, that is, a topological logic error occurs, and the nodes of the directed graph G are said to satisfy the partial order relationship; Figure 1 and Figure 2 Directed graphs describing partial and total order relations respectively.
[0063] Whether the directed graph G satisfies the total order relation is used as the identification standard for judging whether the hybrid power grid meter data is compliant;
[0064]
[0065] The step 2 is specifically to use the depth-first traversal (DFS) strategy of the directed graph to search all loop subgraphs in G. When traversing all edges of the directed graph G, each time the depth is increased, the edge path from the starting node to the current node is recorded. If a node in a certain path is traversed repeatedly, it can be determined that there is a loop subgraph in G, and then the complete logical loop is traced back according to the traversal order of nodes and edges.
[0066] In step 2, a loop dictionary and a node state array are used to record the complete path information of all loops and the traversal status of all nodes in G to assist the directed loop identification algorithm process; a node state array is used to record the traversal status of each node in G. The traversal status of the node can be used to determine whether the local directed graph associated with the node constitutes a loop and to identify the path information of the specific loop;
[0067] For each node v∈V in the directed graph G, three traversal states are set, namely:
[0068] Untraversed: The current node v is a brand new node and has not been traversed yet;
[0069] Traversing: The current node v has been traversed, but all branches and sub-branches of v have not been searched yet;
[0070] Traversed: All branches and subbranches of node v have been traversed, and no loops are found.
[0071] The step 2, tracing back the complete logical loop, i.e. the directed loop identification algorithm is specifically as follows:
[0072] S01: Initialize all node states to "not traversed" and initialize the loop dictionary to an empty set;
[0073] S02: Extract a node x∈V with a status of "not traversed" from the node status array, push x into the stack, start depth-first search, and change the status of node x to "traversing";
[0074] S03: traverse the adjacent nodes y∈V of node x;
[0075] If y is an "untraversed" node, then continue the depth-first search starting from the y node;
[0076] If y is a "traversing" node, it means that node y has been traversed before, which indicates that there is a loop in the graph. Extract all node elements between the top node of the stack and the position where y first appears in the stack from the stack. Construct a list L based on these node elements. List L contains node y. At this time, L represents a logical closed loop. Output L to the loop dictionary;
[0077] If y is a "traversed" node, then the branches and sub-branches of the node have been confirmed to be acyclic, and the current search is terminated;
[0078] Repeat S02 and S03 until there are no [untraversed] nodes in the node status array; at this time, output the loop dictionary to obtain all loops.
[0079] Algorithm examples include Figure 3 , using depth-first search traversal, we can extract three directed loops, as follows Figure 4 、 Figure 5 、 Figure 6 .
[0080] In actual business scenarios, the existence of directed loops is inconsistent with the logic of power transmission business. The main reason for this is the error in meter data collection at the station. Therefore, from a topological perspective, data error correction is equivalent to breaking the loop in the directed graph.
[0081] In step 3, the loop breaking method is to remove individual directed edges that do not meet the business logic requirements based on the loop dictionary output by the directed loop identification algorithm in step 2; the directed graph node meter data error correction algorithm is:
[0082] S1: Read the directed loop dictionary and sort it in descending order according to the link length of the loop;
[0083] S2: Read the loop in sequence and calculate the sharing degree of each directed edge in the loop, that is, the number of times it is shared;
[0084] S3: Check whether the directed edge with the highest degree of sharing is unique. If there is only one, remove it directly from the directed graph G and repeat S2. If it is not unique, that is, there are N candidates with the highest degree of sharing, execute S4.
[0085] S4: Inspect N directed edges and directly remove the directed edge with the smallest energy from the directed graph G;
[0086] Repeat S2 to S4 until all directed cycles in the dictionary are broken.
[0087] According to the requirements of electric energy metering accuracy, the principles for breaking loops are:
[0088] Principle 1: Prioritize breaking long directed loops: Sort loops in descending order of length, breaking the loop with the longest link first, then the loop with the second longest link, and finally the loop with the shortest link.
[0089] Principle 2: Prioritize the removal of directed edges shared by multiple loops: If multiple loops share one or more directed edges (such as Figure 7), the directed edges with the highest degree of sharing are removed first. This not only maximizes processing efficiency (removing one directed edge can break multiple loops at the same time), but also meets the requirements of lossless energy metering and accurate energy metering.
[0090] Principle 3, energy-carrying minimization principle: In a loop, the directed edge with the smallest energy-carrying capacity is removed first. That is, the power carried by the directed edge is used as the weight, and the directed edge with the smallest weight is removed. This operation meets the requirement of minimizing the loss of measurement accuracy.
[0091] Algorithm examples include Figure 8 , according to step 2, from the directed graph G( Figure 1 ) and find three directed rings a, b and c.
[0092] Investigation Figure 8 There are three directed loops. According to Principle 1, the link of directed loop c is the longest (length is 4), so we start by breaking loop c. Examining all directed edges of loop c, according to Principle 2, the directed edge "Substation 3->Substation 1" in c has the highest sharing degree (sharing degree is 1) and is unique, so remove the directed edge "Substation 3->Substation 1". After removal, the two loops (loop b and loop c) can be eliminated at the same time. At this time, only loop a remains. Examining loop a, according to Principle 3, remove the directed edge "Substation 2->Substation 1" and break loop a. After the three loops are broken, the directed graph G becomes G ' ,like Figure 9 At this time, according to the invention content 1, for G ' Perform topological sorting and verify G ' The total order relation holds.
Claims
1. A self-correcting technology for node metering data in a hybrid power grid topology, characterized in that: The following steps are involved: Step 1: Determine whether the node meter data of the hybrid power grid is abnormal. Use topological sorting theory to perform topological sorting on the directed graph of the power grid. If a topological logic error is found, it is said that the nodes of the directed graph satisfy a partial order relationship. Step 2: Identify directed cycles in the partial order relation and use the depth-first search (DFS) strategy of the directed graph to identify all the cycle subgraphs in the directed graph. Step three: Automatic error correction of node meter data.
2. The self-correcting technology for hybrid power grid topology node metering data according to claim 1 is characterized in that: The first step is to construct a directed graph G for a hybrid power network with all stations as nodes (denoted as V), transmission lines between all stations as edges (denoted as E), and the power flow carried by the lines as the direction; using topological sorting theory, obtain a total order relationship for V in G. The specific algorithm is: Step 1: Construct a directed topological graph G(V,E) and calculate the indegree of each node v∈V; Step 2: Select any node v'∈V with Indegree=0 and output the node v'; Step 3: Delete node v' and all directed edges starting from v' in G; Step 4: Repeat step 2 and step 3 until there are no new nodes output; If the set of all output nodes V'=V, that is, all nodes in G are output, then the data of the directed graph G is accurate and the nodes of the directed graph G are said to satisfy the total order relationship. On the contrary, there is a "directed loop" in the directed graph G, that is, a topological logic error occurs, and the nodes of the directed graph G are said to satisfy the partial order relationship. Whether the directed graph G satisfies the total order relation is used as the identification criterion for judging whether the hybrid power grid meter data is compliant; 3. The self-correcting technology for hybrid power grid topology node metering data according to claim 2 is characterized in that: The step 2 is specifically to use the depth-first traversal strategy of the directed graph to search for all loop subgraphs in G. When traversing all edges of the directed graph G, each time the depth is increased, the edge path from the starting node to the current node is recorded. If a node in a certain path is traversed repeatedly, it can be determined that there is a loop subgraph in G, and then the complete logical loop is traced back according to the traversal order of nodes and edges.
4. The self-correcting technology for hybrid power grid topology node metering data according to claim 3 is characterized in that: In step 2, a loop dictionary and a node state array are used to record the complete path information of all loops and the traversal status of all nodes in G to assist the directed loop identification algorithm process; a node state array is used to record the traversal status of each node in G. The traversal status of the node can be used to determine whether the local directed graph associated with the node constitutes a loop and to identify the path information of the specific loop; For each node v∈V in the directed graph G, three traversal states are set, namely: Untraversed: The current node v is a brand new node and has not been traversed yet; Traversing: The current node v has been traversed, but all branches and sub-branches of v have not been searched yet; Traversed: All branches and subbranches of node v have been traversed, and no loops are found.
5. The self-correcting technology for hybrid power grid topology node metering data according to claim 4 is characterized in that: The step 2, tracing back the complete logical loop, i.e. the directed loop identification algorithm is specifically as follows: S01: Initialize all node states to "not traversed" and initialize the loop dictionary to an empty set; S02: Extract a node x∈V with the status of "not traversed" from the node status array, push x into the stack, start depth-first search, and change the status of node x to "traversing"; S03: traverse the adjacent nodes y∈V of node x; If y is an "untraversed" node, then continue the depth-first search starting from the y node; If y is a "traversing" node, it means that node y has been traversed before, which indicates that there is a cycle in the graph. Extract all node elements between the top node of the stack and the position where y first appears in the stack from the stack. Construct a list L based on these node elements. List L contains node y. In this case, L represents a logical closed loop. Output L to the loop dictionary. If y is a "traversed" node, then the branches and sub-branches of the node have been confirmed to be acyclic, and the current search is terminated; Repeat S02 and S03 until there are no [untraversed] nodes in the node status array; at this time, output the loop dictionary to obtain all loops.
6. The self-correcting technology for hybrid power grid topology node metering data according to claim 5 is characterized in that: In step 3, the loop breaking method is to remove individual directed edges that do not meet the business logic requirements based on the loop dictionary output by the directed loop identification algorithm in step 2; the directed graph node meter data error correction algorithm is specifically as follows: S1: Read the directed loop dictionary and sort it in descending order according to the link length of the loop; S2: Read the loop in sequence and calculate the sharing degree of each directed edge in the loop, that is, the number of times it is shared; S3: Check whether the directed edge with the highest degree of sharing is unique. If there is only one, remove it directly from the directed graph G and repeat S2. If it is not unique, that is, there are N candidates with the highest degree of sharing, execute S4. S4: Inspect N directed edges and directly remove the directed edge with the smallest energy from the directed graph G; Repeat S2 to S4 until all directed cycles in the dictionary are broken.
7. The self-correcting technology for hybrid power grid topology node metering data according to claim 6 is characterized in that: According to the requirements of electric energy metering accuracy, the principles for breaking loops are: Principle 1: Prioritize breaking long directed loops: Sort loops in descending order of length, breaking the longest loop first, then the next longest, and finally the shortest. Principle 2: Prioritize the removal of directed edges shared by multiple loops: If multiple loops share one or more directed edges, prioritize the removal of the directed edge with the highest degree of sharing. Principle 3, energy minimization principle: In a loop, the directed edge with the smallest energy load should be removed first. That is, the directed edge with the smallest weight is weighted by the power carried by the directed edge.