Area topology accuracy calculation method and system, electronic equipment, and storage medium
Through the hierarchical processing method, the parent-child relationship list and node matching are solved, and the accuracy sensitivity and high computational complexity of the existing topological accuracy calculation method is achieved, and more stable and accurate topological structure evaluation is achieved.
Patent Information
- Application Number
- CN202411325234.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-09-23
AI Technical Summary
The existing topological accuracy calculation methods have shortcomings in terms of accuracy sensitivity, high computational complexity, local error amplification and lack of standardization, which leads to unstable calculation results and difficulty in cross-scenario comparison.
Using hierarchical processing, by constructing a parent-child relationship list of computational topology and real topology, user node matching and hierarchical path analysis, determine the possibility list of table box nodes, and perform node replacement, reduce accuracy sensitivity and calculation complexity, and provide unified matching standards.
The accuracy and stability of topological structure calculations are improved, the impact of small errors on the overall accuracy is avoided, and the uniqueness and accuracy of the calculation results are ensured.
Smart Images

Figure CN119415511B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of area topology accuracy calculation, and in particular, to an area topology accuracy calculation method and system, electronic equipment, and a computer-readable storage medium. Background Art
[0002] Existing methods for calculating topological accuracy include direct comparison method, path comparison method, graph matching algorithm and edit distance method. Among them, the direct comparison method directly compares each node and edge in the actual topology with the calculated topology one by one to ensure that their connection relationship is completely consistent. It is used to evaluate the matching degree between the calculated topology and the actual topology and accurately verify the similarity between the two in terms of node and edge connection. The path comparison method compares the path from the source node to the target node, checks the matching of all nodes and edges on the path, and evaluates the correctness of the topological structure by comparing specific paths. It is particularly suitable for networks with important path structures. The graph matching algorithm uses a graph theory algorithm to compare two graphs based on the overall characteristics of the topological structure (such as the number of nodes, the connection relationship of the edges, etc.). It is used to globally evaluate the topological similarity and is suitable for accuracy evaluation of larger-scale networks while allowing a certain error. The edit distance method calculates the minimum number of operations required to transform one topology into another (such as inserting, deleting, and modifying nodes or edges), quantifies the difference between the two topologies, and evaluates their similarity. It is particularly suitable for evaluating the difference between two topologies under local changes. However, these methods often rely on precise matching of nodes or edges. For example, direct comparison and path comparison methods only allow complete matching, which makes them overly sensitive to small topological differences. Graph matching algorithms and edit distance methods require global calculations of the entire graph, especially in large-scale topologies, where the computational complexity rises dramatically. In addition, when these methods encounter local errors, they tend to spread errors to the global level, because local matching errors affect the evaluation of the entire structure, leading to error amplification. Due to different requirements for topological structure characteristics and application scenarios, different methods also lack unified standards, making it difficult to compare results across scenarios. Therefore, existing topological accuracy calculation methods have the disadvantages of precision sensitivity, high computational complexity, local error amplification, and lack of standardization. Summary of the invention
[0003] The present invention provides a method and system for calculating the topology accuracy of a substation, an electronic device, and a computer-readable storage medium, which adopts a hierarchical processing method to reduce accuracy sensitivity and calculation complexity, avoid error amplification, prevent excessive influence of small topological errors on the overall accuracy, ensure the stability and reliability of the calculation results, and provide a unified matching standard that can more comprehensively and accurately reflect the topological structure. The matching result of each meter box node is determined based on a possible list of all meter box nodes, thereby ensuring the uniqueness and accuracy of the calculated topology and improving the calculation accuracy.
[0004] According to one aspect of the present invention, a method for calculating the topology accuracy of a substation is provided, comprising the following contents:
[0005] Construct parent-child relationship lists of the computational topology and the real topology respectively;
[0006] Matching the user nodes based on the two parent-child relationship lists, deleting the unmatched user nodes and their corresponding parent-child relationships in the parent-child relationship list of the calculation topology, and recording the number of remaining user nodes in the parent-child relationship list of the calculation topology as the first number;
[0007] The path from the total table node to each user node in the computing topology is parsed based on the parent-child relationship list of the computing topology. Each node on the path is regarded as a level, and multiple level paths are obtained.
[0008] Based on multiple hierarchical paths and the parent-child relationship list of the real topology, the parent-child relationship is matched to obtain a possibility list of each table box node in the computational topology;
[0009] Determine the matching result of each table box node in the calculation topology in the actual topology based on the possibility list of all table box nodes, replace each table box node in the calculation topology according to the matching result, find out the user node that is not under the replacement node and delete it;
[0010] The number of user nodes remaining in the calculation topology is recorded as a second number, and the accuracy of the area topology is calculated based on the second number and the first number.
[0011] Furthermore, the process of constructing the parent-child relationship list for respectively constructing the calculation topology and the real topology includes the following contents:
[0012] According to the different node types, the total table node, table box node and user node are assigned values respectively. Starting from the user node at the end of the topology, the calculation topology and the real topology are traversed respectively, and the direct parent node corresponding to each user node is found and a parent-child relationship between the two is established. After traversing all user nodes, the direct parent node corresponding to each remaining node is found and a parent-child relationship between the two is established until the direct parent node is the total table. A unique virtual name is assigned to the direct parent node of the total table and a parent-child relationship between the two is established, thereby constructing the parent-child relationship lists of the calculation topology and the real topology respectively, where the parent-child relationship includes the id of the child node, the node type assignment of the child node and the id of the direct parent node.
[0013] Furthermore, the process of matching user nodes based on the two parent-child relationship lists includes the following:
[0014] Traverse each user node in the parent-child relationship list of the calculated topology, and match the id of the user node with all the user nodes in the parent-child relationship list of the real topology. If the ids are the same, the match is considered successful.
[0015] Furthermore, the process of matching the parent-child relationship based on the multiple hierarchical paths and the parent-child relationship list of the real topology to obtain the possibility list of each table box node includes the following:
[0016] Based on the multiple hierarchical paths of the computational topology and the parent-child relationship list of the real topology, the parent-child relationship of the user node is first matched, and the possibility of each user parent node in the computational topology is determined based on the matching results. Then, the parent-child relationship matching method is used to recursively push to the total table node layer by layer to obtain the possibility of each remaining node in the computational topology. The total table node in the computational topology is directly determined according to the possibility of the total table node. If all child nodes under a node have the same possibility, all its child nodes are deleted, and the possibilities of all child nodes are directly assigned to the node, thereby obtaining a possibility list for each table box node.
[0017] Furthermore, the process of determining the matching result of each meter box node in the calculation topology in the actual topology based on the possibility list of all meter box nodes includes the following:
[0018] First, all table box nodes are hierarchically sorted in ascending order with the total table node as the 0th layer, and then the possibility list of each table box node is sorted to obtain the overall possibility sorting list, and the matching result of each table box node in the actual topology is determined according to the overall possibility sorting list.
[0019] Furthermore, the process of sorting the possibility list of each table box node includes the following:
[0020] The number of user nodes contained in the table box node under each possibility is obtained by counting, and the possibilities are sorted from large to small according to the number of user nodes. If there are at least two possibilities in which the number of user nodes contained in the table box node is the same, the sorting between the at least two possibilities is considered to be in no particular order.
[0021] Furthermore, the process of determining the matching result of each table box node in the actual topology according to the overall possible sorting list includes the following:
[0022] The matching result of each table box node is determined in sequence according to the order in the overall sorted list of possibilities, and the possibility at the top of the possibility sorting results of each table box node is taken as the matching result. If the matching result of the latter table box node is repeated with the matching result of the former table box node, the latter possibility in the possibility sorting results of the latter table box node is selected as the matching result, and the process is continued until the matching result of each table box node in the actual topology is determined.
[0023] In addition, the present invention also provides a system for calculating the accuracy of a substation topology, comprising:
[0024] A parent-child relationship list construction module is used to construct the parent-child relationship lists of the calculation topology and the real topology respectively;
[0025] A user node matching module is used to match user nodes based on two parent-child relationship lists, delete the unmatched user nodes and their corresponding parent-child relationships in the parent-child relationship list of the calculation topology, and record the number of user nodes remaining in the parent-child relationship list of the calculation topology as a first number;
[0026] The hierarchical path parsing module is used to parse the path from the general table node to each user node in the computing topology based on the parent-child relationship list of the computing topology. Each node on the path is regarded as a level, and multiple hierarchical paths are obtained.
[0027] The parent-child relationship matching module is used to match the parent-child relationship based on multiple hierarchical paths and the parent-child relationship list of the real topology, and obtain the possibility list of each table box node in the calculation topology;
[0028] A table box node matching module is used to determine the matching result of each table box node in the calculation topology in the actual topology based on the possibility list of all table box nodes, replace each table box node in the calculation topology according to the matching result, find out the user node that is not under the replacement node and delete it;
[0029] The topology accuracy calculation module is used to record the number of user nodes remaining in the calculation topology, record it as the second number, and calculate the area topology accuracy based on the second number and the first number.
[0030] In addition, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the above method by calling the computer program stored in the memory.
[0031] In addition, the present invention also provides a computer-readable storage medium for storing a computer program for calculating the accuracy of the substation topology, wherein the computer program executes the steps of the method described above when running on a computer.
[0032] The present invention has the following beneficial effects:
[0033] The method for calculating the accuracy of the substation topology of the present invention, after respectively constructing the parent-child relationship lists of the two topologies, takes into account that the user node is a unique identifier in the topology, and the id of the user node will not change whether in the calculation topology or in the real topology, so the calculation topology is cleaned for the first time by matching the user node. Then, the hierarchical path from the total table node to each user node is obtained by parsing the parent-child relationship list of the calculation topology, and then the parent-child relationship matching is performed using multiple hierarchical paths to obtain a possibility list of each table box node in the calculation topology. Next, the matching result of each table box node in the actual topology is determined according to the possibility list of all table box nodes, and the table box nodes of the calculation topology are replaced and cleaned for the second time according to the matching results. Finally, the substation topology accuracy is calculated based on the number of user nodes remaining after the first cleaning and the second cleaning. The hierarchical processing method is adopted to reduce the accuracy sensitivity and computational complexity, avoid error amplification, prevent the excessive influence of small topological errors on the overall accuracy, ensure the stability and reliability of the calculation results, and provide a unified matching standard that can more comprehensively and accurately reflect the topological structure. The matching result of each table box node is determined based on the possibility list of all table box nodes, which ensures the uniqueness and accuracy of the calculated topology and improves the calculation accuracy.
[0034] In addition, the area topology accuracy calculation system of the present invention also has the above advantages.
[0035] In addition to the above-described objects, features and advantages, the present invention has other objects, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0037] Figure 1 It is a flow chart of the method for calculating the accuracy of the substation topology of the preferred embodiment of the present application.
[0038] Figure 2 It is a schematic diagram of the module structure of a substation topology accuracy calculation system according to another embodiment of the present application. DETAILED DESCRIPTION
[0039] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0040] Reference Figure 1 The preferred embodiment of the present application provides a method for calculating the topology accuracy of a substation, including the following contents:
[0041] Step S1: construct the parent-child relationship lists of the calculated topology and the real topology respectively;
[0042] Step S2: matching user nodes based on the two parent-child relationship lists, deleting the unmatched user nodes and their corresponding parent-child relationships in the parent-child relationship list of the calculation topology, and recording the number of remaining user nodes in the parent-child relationship list of the calculation topology, which is recorded as the first number;
[0043] Step S3: parsing the path from the general table node to each user node in the computing topology based on the parent-child relationship list of the computing topology, treating each node on the path as a level, and obtaining multiple level paths;
[0044] Step S4: matching the parent-child relationship based on multiple hierarchical paths and the parent-child relationship list of the real topology to obtain a possibility list of each table box node in the calculation topology;
[0045] Step S5: determining the matching result of each table box node in the calculation topology in the actual topology based on the possibility list of all table box nodes, performing node replacement on each table box node in the calculation topology according to the matching result, finding out the user node that is not under the replacement node and deleting it;
[0046] Step S6: Record the number of user nodes remaining in the calculation topology, record it as the second number, and calculate the area topology accuracy based on the second number and the first number.
[0047] It can be understood that the method for calculating the accuracy of the area topology of the present embodiment, after respectively constructing the parent-child relationship lists of the two topologies, takes into account that the user node is a unique identifier in the topology, and the id of the user node will not change whether in the calculation topology or in the real topology, so the calculation topology is cleaned for the first time by matching the user node. Then, the hierarchical path from the total table node to each user node is obtained according to the parent-child relationship list of the calculation topology, and then the parent-child relationship matching is performed using multiple hierarchical paths to obtain the possibility list of each table box node in the calculation topology. Then, the matching result of each table box node in the actual topology is determined according to the possibility list of all table box nodes, and the table box nodes of the calculation topology are replaced and cleaned for the second time according to the matching result. Finally, the area topology accuracy is calculated according to the number of user nodes remaining after the first cleaning and the second cleaning. The hierarchical processing method is adopted to reduce the accuracy sensitivity and computational complexity, avoid error amplification, prevent the excessive influence of small topological errors on the overall accuracy, ensure the stability and reliability of the calculation results, and provide a unified matching standard that can more comprehensively and accurately reflect the topological structure. The matching result of each table box node is determined based on the possibility list of all table box nodes, which ensures the uniqueness and accuracy of the calculated topology and improves the calculation accuracy.
[0048] It can be understood that in step S1, the process of constructing the parent-child relationship list for respectively constructing the calculation topology and the real topology includes the following contents:
[0049] According to the different node types, the total table node, table box node and user node are assigned values respectively. Starting from the user node at the end of the topology, the calculation topology and the real topology are traversed respectively, and the direct parent node corresponding to each user node is found and a parent-child relationship between the two is established. After traversing all user nodes, the direct parent node corresponding to each remaining node is found and a parent-child relationship between the two is established until the direct parent node is the total table. A unique virtual name is assigned to the direct parent node of the total table and a parent-child relationship between the two is established, thereby constructing the parent-child relationship lists of the calculation topology and the real topology respectively, where the parent-child relationship includes the id of the child node, the node type assignment of the child node and the id of the direct parent node.
[0050] Specifically, first distinguish the node type, and assign different values according to the node type. For example, the user node is assigned 2, the table box node is assigned 1, and the total table node is assigned 0. Then, starting from the user node at the end of the topology, traverse the calculated topology and the real topology respectively, find the direct parent node corresponding to each user node and establish the parent-child relationship between the user node and its direct parent node. After traversing all user nodes, find the direct parent node corresponding to each remaining node and establish the parent-child relationship between the node and its corresponding direct parent node until the direct parent node is found to be the total table, and assign a virtual name to the direct parent node of the total table. The name format is unified with other nodes and does not repeat with other nodes in the topology diagram, so that the parent-child relationship list of the calculated topology and the real topology can be constructed. Among them, the parent-child relationship includes the id of the child node, the node type assignment of the child node, and the id of the direct parent node. For example, in the real topology, assume that the direct parent node of user node A is B, and the direct parent node of B is C. The type of A is user node, the type of B is table box node, and the type of C is general table node. Then the parent-child relationship between A and B is recorded as: {node_id:A,node_type:2,father_node_id:B}, and the parent-child relationship between B and C is recorded as: {node_id:B,node_type:1,father_node_id:C}. Because C is the general table, the parent node is assigned to the non-repeated D, and the parent-child relationship is: {node_id:C,node_type:0,father_node_id:D}. Finally, all parent-child relationships are merged into a parent-child relationship list.
[0051] For example, in the first specific embodiment of the present invention, the parent-child relationship list of the actual topology is:
[0052] "original_topo":[
[0053] {"node_id":0,"node_type":0,"father_node_id":999999},
[0054] {"node_id":1,"node_type":1,"father_node_id":0},
[0055] {"node_id":2,"node_type":1,"father_node_id":0},
[0056] {"node_id":3,"node_type":1,"father_node_id":1},
[0057] {"node_id":4,"node_type":1,"father_node_id":1},
[0058] {"node_id":5,"node_type":1,"father_node_id":2},
[0059] {"node_id":6,"node_type":1,"father_node_id":2},
[0060] {"node_id":7,"node_type":2,"father_node_id":3},
[0061] {"node_id":8,"node_type":2,"father_node_id":3},
[0062] {"node_id":9,"node_type":2,"father_node_id":3},
[0063] {"node_id":10,"node_type":2,"father_node_id":3},
[0064] {"node_id":11,"node_type":2,"father_node_id":4},
[0065] {"node_id":12,"node_type":2,"father_node_id":5},
[0066] {"node_id":13,"node_type":2,"father_node_id":5},
[0067] {"node_id":14,"node_type":2,"father_node_id":6},
[0068] {"node_id":15,"node_type":2,"father_node_id":6}
[0069] 。
[0070] And the list of parent-child relationships of the computational topology is: "calculate_result":
[0071] {"node_id":0,"node_type":0,"father_node_id":999999},
[0072] {"node_id":111,"node_type":1,"father_node_id":0},
[0073] {"node_id":222,"node_type":1,"father_node_id":0},
[0074] {"node_id":333,"node_type":1,"father_node_id":111},
[0075] {"node_id":444,"node_type":1,"father_node_id":111},
[0076] {"node_id":555,"node_type":1,"father_node_id":222},
[0077] {"node_id":666,"node_type":1,"father_node_id":222},
[0078] {"node_id":777,"node_type":1,"father_node_id":333},
[0079] {"node_id":888,"node_type":1,"father_node_id":333},
[0080] {"node_id":7,"node_type":2,"father_node_id":777},
[0081] {"node_id":8,"node_type":2,"father_node_id":777},
[0082] {"node_id":9,"node_type":2,"father_node_id":888},
[0083] {"node_id":10,"node_type":2,"father_node_id":888},
[0084] {"node_id":11,"node_type":2,"father_node_id":444},
[0085] {"node_id":12,"node_type":2,"father_node_id":555},
[0086] {"node_id":14,"node_type":2,"father_node_id":555},
[0087] {"node_id":13,"node_type":2,"father_node_id":666},
[0088] {"node_id":15,"node_type":2,"father_node_id":666},
[0089] {"node_id":17,"node_type":2,"father_node_id":444}
[0090] ].
[0091] It can be understood that in step S1, the parent-child relationship lists of the two topologies have been constructed respectively. In step S2, the calculation topology needs to be cleaned for the first time, and the user nodes are matched based on the two parent-child relationship lists. The user nodes and their corresponding parent-child relationships that have not been successfully matched in the parent-child relationship list of the calculation topology are deleted, and the number of user nodes remaining in the parent-child relationship list of the calculation topology is recorded, which is recorded as the first number.
[0092] The process of matching user nodes based on two parent-child relationship lists includes the following:
[0093] Traverse each user node in the parent-child relationship list of the calculated topology, and match the id of the user node with all the user nodes in the parent-child relationship list of the real topology. If the ids are the same, the match is considered successful.
[0094] Specifically, considering that when the topology is calculated using pure soft computing, the user node is a unique identifier, and the id of the user node will not change whether in the calculated topology or in the real topology, the present invention traverses each node_id corresponding to node_type=2 in the parent-child relationship list of the calculated topology, and then matches it in the real topology, and deletes the user nodes and their corresponding parent-child relationships that have not been successfully matched in the calculated topology, and records the number of node_i with node_type=2 remaining in the parent-child relationship list of the calculated topology at this time, recorded as count1. For example, if the relationship list of the calculated topology is: {{node_id:F,node_type:0,father_node_id:G},{node_id:H,node_type:1,father_node_id:F},{node_id:A,node_type:2,father_node_id:H},{node_id:K,node_type:2,father_node_id:H}}, but the relationship list of the real topology is: {{node_id:C,node_type:0,father_node_id:D},{node_id:B,node_type:1,father_node_id:C},{node_id:A,node_type:2,father_node_id:B}}, there are two user nodes A and K in the calculated topology, but there is only one user node A in the real topology, then delete the user node K in the calculated topology and its corresponding parent-child relationship, and record count1 as 1 at this time.
[0095] For another example, in the above-mentioned specific embodiment 1, the user node with node_id 17 and node_type=2 in the calculation topology does not exist in the actual topology, so the user node with node_id 17 and its corresponding parent-child relationship are directly deleted. The calculation topology after the first cleaning is changed to: "calculate_result":[
[0096] {"node_id":0,"node_type":0,"father_node_id":999999},
[0097] {"node_id":111,"node_type":1,"father_node_id":0},
[0098] {"node_id":222,"node_type":1,"father_node_id":0},
[0099] {"node_id":333,"node_type":1,"father_node_id":111},
[0100] {"node_id":444,"node_type":1,"father_node_id":111},
[0101] {"node_id":555,"node_type":1,"father_node_id":222},
[0102] {"node_id":666,"node_type":1,"father_node_id":222},
[0103] {"node_id":777,"node_type":1,"father_node_id":333},
[0104] {"node_id":888,"node_type":1,"father_node_id":333},
[0105] {"node_id":7,"node_type":2,"father_node_id":777},
[0106] {"node_id":8,"node_type":2,"father_node_id":777},
[0107] {"node_id":9,"node_type":2,"father_node_id":888},
[0108] {"node_id":10,"node_type":2,"father_node_id":888},
[0109] {"node_id":11,"node_type":2,"father_node_id":444},
[0110] {"node_id":12,"node_type":2,"father_node_id":555},
[0111] {"node_id":14,"node_type":2,"father_node_id":555},
[0112] {"node_id":13,"node_type":2,"father_node_id":666},
[0113] {"node_id":15,"node_type":2,"father_node_id":666}
[0114] ]. At this time, after the calculation topology is cleaned for the first time, the number of node_type=2 is 9, recorded as count1=9.
[0115] It can be understood that in step S3, the path from the general table node to each user node is parsed according to the parent-child relationship list of the calculated topology, and each node on the path is regarded as a level, and multiple hierarchical paths can be obtained to facilitate the determination of the level of each table box node and user node. For example, if the parent-child relationship list of the calculated topology is: {{node_id:F,node_type:0,father_node_id:G},{node_id:H,node_type:1,father_node_id:F},{node_id:A,node_type:2,father_node_id:H}}, then all nodes are layered, the general table node F is the 0th level, the table box node H is the 1st level, and the user node A is the 2nd level.
[0116] For another example, for the above specific embodiment 1, the multiple hierarchical paths that can be obtained are: {7:[0,111,333,777,7],8:[0,111,333,777,8],9:[0,111,333,888,9],10:[0,111,333,888,10],11:[0,111,444,11],12:[0,222,555,12],1 4:[0,222,555,14],15:[0,222,666,15],13:[0,222,666,13]}, where 7:[0,111,333,777,7] indicates that the hierarchical path of the user node with node_id 7 is: 0→111→333→777→7, the node types of 111, 333 and 777 are table box nodes, and the node type of 0 is the total table node.
[0117] It can be understood that in step S4, the process of matching the parent-child relationship based on multiple hierarchical paths and the parent-child relationship list of the real topology to obtain the possibility list of each table box node includes the following:
[0118] Based on the multiple hierarchical paths of the computational topology and the parent-child relationship list of the real topology, the parent-child relationship of the user node is first matched, and the possibility of each user parent node in the computational topology is determined based on the matching results. Then, the parent-child relationship matching method is used to recursively push to the total table node layer by layer to obtain the possibility of each remaining node in the computational topology. The total table node in the computational topology is directly determined according to the possibility of the total table node. If all child nodes under a node have the same possibility, all its child nodes are deleted, and the possibilities of all child nodes are directly assigned to the node, thereby obtaining a possibility list for each table box node.
[0119] Specifically, since the user node is used as a unique identifier in pure soft computing topology, the id of the user node will not change in either the computing topology or the real topology, so the possibilities are traversed upwards from the user node. First, the parent-child relationship of the user node is matched based on the multiple hierarchical paths of the computing topology and the parent-child relationship list of the real topology. Each user node is matched in the real topology according to the id of the user node in the computing topology, and its direct parent node is found in the parent-child relationship list of the real topology as the direct parent node possibility of the user node in the computing topology. For example, the calculated topology part is: {{node_id:A,node_type:2,father_node_id:H},{node_id:K,node_type:2,father_node_id:H}}, and the real topology part is: {{node_id:A,node_type:2,father_node_id:B},{node_id:K,node_type:2,father_node_id:C}}, in the calculated topology, the direct parent node of user nodes A and K is H, while in the real topology, the direct parent nodes of user nodes A and K are B and C respectively, then the possibility of node H after matching is B or C. For another example, for the above specific embodiment 1, the possibilities of the direct parent nodes of all user nodes can be obtained respectively: {444:[4],555:[5,6],666:[5,6],777:[3],888:[3]}.
[0120] After obtaining the possibility of the direct parent node of the user node, it is recursively pushed to the nodes at higher levels until the master table node, so as to obtain the possibility of all remaining nodes. Since there is only one master table node, no matter what the possibility of the child node is, the possibility of the master table node directly determines the master table node of the calculation topology.For example, the calculation topology is: {{node_id:F,node_type:0,father_node_id:G},{node_id:H,node_type:1,father_node_id:F},{node_id:I,node_type:1,father_nod e_id:H},{node_id:N,node_type:1,father_node_id:F},{node_id:A,node_type:2,father_node_id:H},{node_id:K,node_type:2,father_node_i d:H},{node_id:J,node_type:2,father_node_id:I},{node_id:M,node_type:2,father_node_id:N}}, and the real topology is: {{node_id:C,node_type:0,father _node_id:G},{node_id:B,node_type:1,father_node_id:C},{node_id:D,node_type:1,father_node_id:C},{node_id:A,node_type:1,father_no de_id:C},{node_id:A,node_type:2,father_node_id:B},{node_id:K,node_type:2,father_node_id:A},{node_id:J,node_type:2,father_node_id:D},{node_id:M,node_type:2,father_node_id:B}}, it can be seen that according to the matching results of the parent-child relationship of the user node, the possibility of the direct parent node I of the user node J in the calculation topology is D, the possibility of node H is B or A, and the possibility of N is B. However, going up one level, it can be inferred that the direct parent node H of node I may not only be B and A, but may also be derived from I, because the possibility of the matched node I in the real topology is node D, and the direct parent node of node D can be found in the real topology as C, then the possibility of node H can also be node C, and the type of node C is node_type=0, then the total table node F in the calculation topology is directly matched to the total table node C in the real topology.
[0121] At the same time, if all child nodes under a node have the same probability, then delete all child nodes, assign the probability of the child node directly to the node, and adjust the calculation topology accordingly to obtain the probability list of each table box node. For example, the parent-child relationship list of the calculation topology is as follows: {{node_id:B,node_type:1,father_node_id:C},{node_id:A,node_type:1,father_node_id:C},{node_id:C,node_type:1,father_node_id:D},{node_id:1,node_type:2,father_node_id:C} e_id:B},{node_id:4,node_type:2,father_node_id:B},{node_id:2,node_type:2,father_node_id:A},{node_id:3,node_type:2,father_node_id:A}}, at this time, the direct parent node of user nodes 2 and 3 is node A, the direct parent node of user nodes 1 and 4 is B, and the direct parent node of nodes B and A is C; the parent-child relationship list of the real topology is as follows: {{node_id:E,node_type:1,father_node_id:F},{node_id:1,node_type:2,father_node_ id:E},{node_id:4,node_type:2,father_node_id:E},{node_id:2,node_type:2,father_node_id:E},{node_id:3,node_type:2,father_node_id:E}},In the real topology, the direct parent nodes of user nodes 1, 2, 3, and 4 are all E. When all child nodes under a node have the same probability, these child nodes are deleted and the probability is directly assigned to the node. Since the probability of child nodes A and B of node C are both E, nodes B and A in the calculation topology are deleted, and child nodes 2, 3, 1, and 4 are directly connected to node C, and the probability of node C is set to E.
[0122] For example, for the above-mentioned specific embodiment 1, after hierarchical recursive matching, the possibility list of all table box nodes in the calculation topology is obtained: {111: [1], 222: [2], 444: [4], 555: [5, 6], 666: [5, 6], 333: [3]}, among which the possibilities of child nodes 777 and 888 under node 333 are both [3], so child nodes 777 and 888 are deleted, and the possibility of node 333 is positioned as [3].
[0123] It can be understood that in step S5, the process of determining the matching result of each meter box node in the calculation topology in the actual topology based on the possibility list of all meter box nodes includes the following:
[0124] First, all table box nodes are hierarchically sorted in ascending order with the total table node as the 0th layer, and then the possibility list of each table box node is sorted to obtain the overall possibility sorting list, and the matching result of each table box node in the actual topology is determined according to the overall possibility sorting list.
[0125] Specifically, all table box nodes in the computing topology are first hierarchically sorted, and the total table node is sorted in ascending order at the 0th level. For example, for the above-mentioned specific embodiment 1, the hierarchical sorting result is {111: [1], 222: [2], 444: [4], 555: [5, 6], 666: [5, 6], 333: [3]}, where nodes 111 and 222 are first-layer nodes, and nodes 444, 555, 666 and 333 are second-layer nodes. The hierarchical sorting result is: {111: [1], 222: [2], 555: [5, 6], 666: [5, 6], 444: [4], 333: [3]}.
[0126] Next, the possibility list of each meter box node is sorted, wherein the process of sorting the possibility list of each meter box node includes the following contents:
[0127] The number of user nodes contained in the table box node under each possibility is obtained by counting, and the possibilities are sorted from large to small according to the number of user nodes. If there are at least two possibilities in which the number of user nodes contained in the table box node is the same, the sorting between the at least two possibilities is considered to be in no particular order.
[0128] For example, if the actual topology is:
[0129] {{node_id:0,node_type:1,father_node_id:000},{node_id:1,node_type:1,father_node_id:0},{node_id:2,node_type:1,father_node_id:0},{node_id:3,node_type:1,father_node_id:1},{node_id:4,node_type:1,father_node_id:1},{node_id:5,node_type:1,fath er_node_id:2},{node_id:6,node_type:1,father_node_id:2},{node_id:A,node_type:2,fa ther_node_id:3},{node_id:B,node_type:2,father_node_id:3},{node_id:C,node_type:2,father_node_id:4},{node_id:D,node_type:2,father_node_id:5},{node_id:E,node_typ e:2,father_node_id:5},{node_id:F,node_type:2,father_node_id:6}},
[0130] The computational topology is as follows:
[0131] {{node_id:0,node_type:1,father_node_id:000},{node_id:111,node_type:1,father_node_id:0},{node_id:22 2,node_type:1,father_node_id:0},{node_id:333,node_type:1,father_node_id:1},{node_id:555,node_type: 1,father_node_id:2},{node_id:666,node_type:1,father_node_id:2},{node_id:A,node_type:2,father_node_ id:333},{node_id:B,node_type:2,father_node_id:3333},{node_id:C,node_type:2,father_node_id:111},{no de_id:D,node_type:2,father_node_id:555},{node_id:E,node_type:2,father_node_id:666},{node_id:F,node_type:2,father_node_id:555}},
[0132] It can be inferred that the possibility of node 333 is 3, and the possibility of node 111 is 1 or 4. If node 111 is 1, it contains 3 user nodes. If node 111 is 4, it contains 1 user node, so node 111 is judged to be 1.
[0133] For example, for the above-mentioned specific embodiment 1, after hierarchical sorting and possibility sorting, the overall possibility sorting list obtained is: {111: [1], 222: [2], 555: [5, 6], 666: [5, 6], 444: [4], 333: [3]}, among which the possibilities of nodes 555 and 6 both include 5 and 6, and when the possibilities are 5 and 6, the number of user nodes contained therein is the same.
[0134] Then, the matching result of each table box node in the actual topology is determined according to the overall sorted list of possibilities. Specifically, the matching result of each table box node is determined in sequence according to the order in the overall sorted list of possibilities, and the possibility at the top of the possibility sorting results of each table box node is taken as the matching result. If the matching result of the latter table box node is repeated with the matching result of the former table box node, the latter possibility is selected as the matching result in the possibility sorting results of the latter table box node, and the process is iterated continuously until the matching result of each table box node in the actual topology is determined. For example, if a possible overall sorted list is {'999':['999'], '1001':['1', '2', '3'], '1002':['2', '3'], '1003':['2', '3']}, where node '999' is the total table node, nodes '1001' and '1002' are first-level nodes, and node '1003' is a second-level node, then the matching result of node '1001' is '1', the matching result of node '1002' is '2', and the matching result of node '1003' is 3. For another example, for the overall ranked list of possibilities in the above-mentioned specific embodiment 1, the matching results of all table box nodes can be determined as follows: the matching result of node 111 is 1, the matching result of node 222 is 2, the matching result of node 555 is 5, the matching result of node 666 is 6, the matching result of node 444 is 4, and the matching result of node 333 is 3, among which the possibilities of node 555 and node 666 are both 5 or 6, and when the matching results are 5 or 6, the number of user nodes contained therein is the same, so the two can be mutually exclusive matched, that is, node 555 can also be matched as 6, and node 666 can be matched as 5.
[0135] It can be understood that in step S5, after determining the matching result of each table box node in the actual topology, each table box node in the calculated topology is replaced according to the matching result, and the user nodes that are not under the replacement node are found and deleted, thereby performing a second cleansing of the calculated topology. For example, for the above-mentioned specific embodiment 1, node 111 in the computing topology is replaced with node 1 in the actual topology, node 222 is replaced with node 2 in the actual topology, node 555 is replaced with node 5 in the actual topology, node 666 is replaced with node 6 in the actual topology, node 444 is replaced with node 4 in the actual topology, and node 333 is replaced with node 3 in the actual topology, and it is found that user nodes 12 and 13 are under node 5 in the actual topology, while user nodes 12 and 14 are under node 5 in the replaced computing topology, that is, user node 14 is not under node 5, so user node 14 in the computing topology is deleted. Similarly, user nodes 14 and 15 are under node 6 in the actual topology, while user nodes 13 and 15 are under node 6 in the replaced computing topology, and user node 13 is not under node 6, so user node 13 in the computing topology is deleted. The computing topology after node replacement and the second cleaning is:
[0136] "calculate_result":[
[0137] {"node_id":0,"node_type":0,"father_node_id":999999},
[0138] {"node_id":1,"node_type":1,"father_node_id":0}
[0139] {"node_id":2,"node_type":1,"father_node_id":0},
[0140] {"node_id":3,"node_type":1,"father_node_id":1},
[0141] {"node_id":4,"node_type":1,"father_node_id":1},
[0142] {"node_id":5,"node_type":1,"father_node_id":2},
[0143] {"node_id":6,"node_type":1,"father_node_id":2},
[0144] {"node_id":7,"node_type":2,"father_node_id":3},
[0145] {"node_id":8,"node_type":2,"father_node_id":3},
[0146] {"node_id":9,"node_type":2,"father_node_id":3},
[0147] {"node_id":10,"node_type":2,"father_node_id":3},
[0148] {"node_id":11,"node_type":2,"father_node_id":4},
[0149] {"node_id":12,"node_type":2,"father_node_id":5}
[0150] {"node_id":15,"node_type":2,"father_node_id":6}
[0151] ].
[0152] It can be understood that after the node replacement and the second cleaning of the calculation topology in step S5, in the step S6, the number of user nodes remaining in the calculation topology is recorded, that is, the number of nodes with node_type=2 remaining is recorded as the second number count2, and the topology accuracy of the station area can be calculated based on count2 / count1. For example, for the above-mentioned specific embodiment 1, count1=9, count2=7, then the topology accuracy of the station area can be calculated as 7 / 9=77.78%.
[0153] In addition, if Figure 2 As shown, another embodiment of the present invention further provides a system for calculating the accuracy of a substation topology, preferably using the method for calculating the accuracy of a substation topology as described above, the system comprising:
[0154] A parent-child relationship list construction module is used to construct the parent-child relationship lists of the calculation topology and the real topology respectively;
[0155] A user node matching module is used to match user nodes based on two parent-child relationship lists, delete the unmatched user nodes and their corresponding parent-child relationships in the parent-child relationship list of the calculation topology, and record the number of user nodes remaining in the parent-child relationship list of the calculation topology as a first number;
[0156] The hierarchical path parsing module is used to parse the path from the general table node to each user node in the computing topology based on the parent-child relationship list of the computing topology. Each node on the path is regarded as a level, and multiple hierarchical paths are obtained.
[0157] The parent-child relationship matching module is used to match the parent-child relationship based on multiple hierarchical paths and the parent-child relationship list of the real topology, and obtain the possibility list of each table box node in the calculation topology;
[0158] A table box node matching module is used to determine the matching result of each table box node in the calculation topology in the actual topology based on the possibility list of all table box nodes, replace each table box node in the calculation topology according to the matching result, find out the user node that is not under the replacement node and delete it;
[0159] The topology accuracy calculation module is used to record the number of user nodes remaining in the calculation topology, record it as the second number, and calculate the area topology accuracy based on the second number and the first number.
[0160] It can be understood that the area topology accuracy calculation system of the present embodiment, after constructing the parent-child relationship list of the two topologies respectively, takes into account that the user node is a unique identifier in the topology, and the id of the user node will not change whether in the calculation topology or in the real topology, so the calculation topology is cleaned for the first time by matching the user node. Then, the hierarchical path from the total table node to each user node is obtained according to the parent-child relationship list of the calculation topology, and then the parent-child relationship matching is performed using multiple hierarchical paths to obtain the possibility list of each table box node in the calculation topology. Then, the matching result of each table box node in the actual topology is determined according to the possibility list of all table box nodes, and the table box nodes of the calculation topology are replaced and cleaned for the second time according to the matching result. Finally, the area topology accuracy is calculated according to the number of user nodes remaining after the first cleaning and the second cleaning. The hierarchical processing method is adopted to reduce the accuracy sensitivity and computational complexity, avoid error amplification, prevent the excessive influence of small topological errors on the overall accuracy, ensure the stability and reliability of the calculation results, and provide a unified matching standard that can more comprehensively and accurately reflect the topological structure. The matching result of each table box node is determined based on the possibility list of all table box nodes, which ensures the uniqueness and accuracy of the calculated topology and improves the calculation accuracy.
[0161] In addition, another embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the above method by calling the computer program stored in the memory.
[0162] In addition, another embodiment of the present invention further provides a computer-readable storage medium for storing a computer program for calculating the accuracy of the substation topology, wherein the computer program executes the steps of the method described above when running on a computer.
[0163] The general form of computer readable storage media includes: floppy disk, flexible disk, hard disk, magnetic tape, any other magnetic medium, CD-ROM, any other optical medium, punch cards, paper tape, any other physical medium with a pattern of holes, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash erasable programmable read-only memory (FLASH-EPROM), any other memory chip or cartridge, or any other medium that can be read by a computer. The instructions can further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium that can be used to store, encode or carry instructions for execution by a machine, and includes digital or analog communication signals or other intangible media that facilitate the communication of the above instructions. Transmission media include coaxial cables, copper wires and optical fibers, which include the wires of a bus used to transmit a computer data signal.
[0164] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0168] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0169] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0170] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for calculating the accuracy of a station area topology, characterized in that: Includes the following: Construct parent-child relationship lists of the calculated topology and the real topology respectively; Matching the user nodes based on the two parent-child relationship lists, deleting the unmatched user nodes and their corresponding parent-child relationships in the parent-child relationship list of the calculation topology, and recording the number of remaining user nodes in the parent-child relationship list of the calculation topology as the first number; The path from the total table node to each user node in the computing topology is parsed based on the parent-child relationship list of the computing topology. Each node on the path is regarded as a level, and multiple level paths are obtained. Based on multiple hierarchical paths and the parent-child relationship list of the real topology, the parent-child relationship is matched to obtain a possibility list of each table box node in the computational topology; Determine the matching result of each table box node in the calculation topology in the actual topology based on the possibility list of all table box nodes, replace each table box node in the calculation topology according to the matching result, find out the user node that is not under the replacement node and delete it; The number of user nodes remaining in the calculation topology is recorded as a second number, and the accuracy of the area topology is calculated based on the second number and the first number.
2. The method for calculating the topology accuracy of a station area according to claim 1, characterized in that: The process of constructing the parent-child relationship list for constructing the calculation topology and the real topology respectively includes the following: According to the different node types, the total table node, table box node and user node are assigned values respectively. Starting from the user node at the end of the topology, the calculation topology and the real topology are traversed respectively, and the direct parent node corresponding to each user node is found and a parent-child relationship between the two is established. After traversing all user nodes, the direct parent node corresponding to each remaining node is found and a parent-child relationship between the two is established until the direct parent node is the total table. A unique virtual name is assigned to the direct parent node of the total table and a parent-child relationship between the two is established, thereby constructing the parent-child relationship lists of the calculation topology and the real topology respectively, where the parent-child relationship includes the id of the child node, the node type assignment of the child node and the id of the direct parent node.
3. The method for calculating the accuracy of the area topology according to claim 1, characterized in that: The process of matching user nodes based on two parent-child relationship lists includes the following: Traverse each user node in the parent-child relationship list of the calculated topology, and match the id of the user node with all the user nodes in the parent-child relationship list of the real topology. If the ids are the same, the match is considered successful.
4. The method for calculating the accuracy of the area topology according to claim 1, characterized in that: The process of matching the parent-child relationship based on multiple hierarchical paths and the parent-child relationship list of the real topology to obtain the possibility list of each table box node includes the following: Based on the multiple hierarchical paths of the computational topology and the parent-child relationship list of the real topology, the parent-child relationship of the user node is first matched, and the possibility of each user parent node in the computational topology is determined based on the matching results. Then, the parent-child relationship matching method is used to recursively push to the total table node layer by layer to obtain the possibility of each remaining node in the computational topology. The total table node in the computational topology is directly determined according to the possibility of the total table node. If all child nodes under a node have the same possibility, all its child nodes are deleted, and the possibilities of all child nodes are directly assigned to the node, thereby obtaining a possibility list for each table box node.
5. The method for calculating the accuracy of the area topology according to claim 1, characterized in that: The process of determining the matching result of each table box node in the calculation topology in the actual topology based on the possibility list of all table box nodes includes the following: First, all table box nodes are hierarchically sorted in ascending order with the total table node as the 0th layer, and then the possibility list of each table box node is sorted to obtain the overall possibility sorting list, and the matching result of each table box node in the actual topology is determined according to the overall possibility sorting list.
6. The method for calculating the accuracy of the area topology according to claim 5, characterized in that: The process of sorting the possibility list of each table box node includes the following: The number of user nodes contained in the table box node under each possibility is obtained by counting, and the possibilities are sorted from large to small according to the number of user nodes. If there are at least two possibilities in which the number of user nodes contained in the table box node is the same, the sorting between the at least two possibilities is considered to be in no particular order.
7. The method for calculating the accuracy of the area topology according to claim 6, characterized in that: The process of determining the matching result of each table box node in the actual topology according to the overall sorted list of possibilities includes the following: The matching result of each table box node is determined in sequence according to the order in the overall sorted list of possibilities, and the possibility at the top of the possibility sorting results of each table box node is taken as the matching result. If the matching result of the latter table box node is repeated with the matching result of the former table box node, the latter possibility in the possibility sorting results of the latter table box node is selected as the matching result, and the process is continued until the matching result of each table box node in the actual topology is determined.
8. A system for calculating the accuracy of a substation topology, characterized in that: include: A parent-child relationship list construction module is used to construct the parent-child relationship lists of the calculation topology and the real topology respectively; A user node matching module is used to match user nodes based on two parent-child relationship lists, delete the unmatched user nodes and their corresponding parent-child relationships in the parent-child relationship list of the calculation topology, and record the number of user nodes remaining in the parent-child relationship list of the calculation topology as a first number; The hierarchical path parsing module is used to parse the path from the general table node to each user node in the computing topology based on the parent-child relationship list of the computing topology. Each node on the path is regarded as a level, and multiple hierarchical paths are obtained. The parent-child relationship matching module is used to match the parent-child relationship based on multiple hierarchical paths and the parent-child relationship list of the real topology, and obtain the possibility list of each table box node in the calculation topology; A table box node matching module is used to determine the matching result of each table box node in the calculation topology in the actual topology based on the possibility list of all table box nodes, replace each table box node in the calculation topology according to the matching result, find out the user node that is not under the replacement node and delete it; The topology accuracy calculation module is used to record the number of user nodes remaining in the calculation topology, record it as the second number, and calculate the area topology accuracy based on the second number and the first number.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method according to any one of claims 1 to 7 by calling the computer program stored in the memory.
10. A computer-readable storage medium for storing a computer program for calculating the accuracy of a station area topology, characterized in that: When the computer program is run on a computer, the steps of the method according to any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Zone area topology identification method and system based on fusion terminal and LTU
CN116896507A
Transformer area topology intelligent identification method and system, electronic equipment and storage medium
CN117171535A