A method for automatically drawing feeder ring diagrams of distribution networks based on fast force guidance

Through the automatic diagramming method of distribution network feeder loop network diagram based on fast force guidance, the CIM model file is analyzed and the line sub-graph is spliced, which solves the difficulties in drawing and maintaining the distribution network logic view, and achieves efficient and accurate graph generation and decision support.

CN119048639BActive Publication Date: 2025-03-21YANTAI HAIYI SOFTWARE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411505782.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-03-21
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

The prior art has difficulties in drawing and maintaining the logical views of the distribution network, including inconsistent manual drawing and frequent transformations, resulting in large workloads in modification and maintenance of system logic wiring diagrams and high probability of errors. GIS equipment is fine in granularity and cannot meet the scheduling decision-making needs.

Method used

The automatic diagramming method of distribution network feeder ring network diagram based on fast force guidance is adopted. By obtaining CIM model files, the basic information of the equipment, topological relationships and line association information are analyzed, key nodes are identified, and the circuit sub-graphs are drawn in groups are drawn, and the final feeder ring network diagram is formed through recursive algorithms.

Benefits of technology

It realizes accurate analysis and graphical drawing of distribution network data, improves data processing efficiency and graphical accuracy and completeness, reduces the error and maintenance costs of manual drawing, and provides a global perspective and decision-making support tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048639B_ABST
    Figure CN119048639B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of automatic drawing of distribution network feeder ring network diagrams, and specifically relates to a method for automatic drawing of distribution network feeder ring network diagrams based on fast force guidance. The method comprises: obtaining a CIM model file, parsing the CIM model file, and the parsed data includes basic information of the equipment and the topological relationship between the equipment; traversing the data, identifying all key nodes and the topological relationship data between the key nodes, and the nodes are the equipment; grouping the data according to the lines to which they belong, and drawing the current line sub-graph according to the positions of the key nodes in the lines; selecting the basic line sub-graph as the basic graph, and continuously splicing the basic graph with other basic line sub-graphs to form a new basic graph, until all the graphs are spliced ​​together to generate the final feeder ring network diagram. The feeder ring network diagram finally generated provides a global perspective of the distribution network, which helps users to grasp the operating status and potential problems of the distribution network as a whole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of automatic drawing of distribution network feeder ring network diagrams, and in particular relates to a method for automatic drawing of distribution network feeder ring network diagrams based on fast force guidance. Background Art

[0002] With the rapid development of my country's economy and society, the structure of distribution network is becoming increasingly complex and huge, and the drawing and maintenance of distribution network graphics are becoming increasingly difficult. Although this problem has been recognized and the idea of ​​sharing distribution network graphic models through Geographic Information System (GIS) and Energy Management System (EMS) has been proposed, there are still great difficulties in the generation and maintenance of multiple views of the power grid, mainly including: it is difficult to draw and maintain the logical view of the distribution network manually, and there is always a hidden danger of inconsistency between the diagram and the model when drawing manually; the distribution network is frequently transformed, and the modification and maintenance of the system logic wiring diagram is heavy and the error probability is high; GIS models according to specific equipment objects, the granularity of the equipment is relatively fine, and if the graphics are displayed according to the 1:1 transformation of the model, it cannot meet the scheduling decision-making needs, etc.

[0003] The graphical display of the power system operation status is crucial in the operation and dispatch of power grids at all levels. For the distribution network, even if the power grid automation is not realized, the dispatch and operation of the distribution network still needs the support of the system wiring diagram, feeder wiring diagram, and internal wiring diagram of the distribution station. In order to facilitate fault handling and power supply restoration, multiple logical views such as the distribution network area wiring diagram and the ring network wiring diagram are also required during the distribution network dispatch or emergency repair command process. Summary of the invention

[0004] In order to overcome the problems in the prior art, the present invention proposes a method for automatically drawing a distribution network feeder ring diagram based on fast force guidance.

[0005] The technical solution of the present invention to solve the above technical problems is as follows:

[0006] The present invention provides a method for automatically drawing a distribution network feeder ring diagram based on fast force guidance, which is characterized by comprising the following steps:

[0007] Obtain the CIM model file and parse the CIM model file. The parsed data includes basic information of the device, topological relationship between devices, and association information between devices and lines.

[0008] Traversing the parsed data, identifying all key nodes in the data and topological relationship data between the key nodes, where the nodes are devices;

[0009] Group the data according to the lines they belong to, and draw the current line sub-graph according to the key node positions in the line;

[0010] Select the basic line sub-diagram as the basic graphic, and continuously splice the basic graphic with other basic line sub-diagrams to form a new basic graphic, until all graphics are spliced ​​together to generate the final feeder ring network diagram.

[0011] Furthermore, all key nodes in the data are identified, and the basis for determining the key nodes includes: the degree of the node, the importance of the device represented by the node, the position of the node in the network, and whether the node participates in forming a closed loop; the degree of the node is the number of edges connected to the node, and the position of the node in the network is such as being located on a main line or connecting multiple branches.

[0012] Furthermore, the parsed data is grouped according to the lines to which they belong, and the current line sub-graph is drawn according to the positions of key nodes in the line, specifically including:

[0013] Calculate the paths from the root node of the subtree to all leaf nodes. These paths are called node sequences, and the leaf nodes are key nodes.

[0014] Traverse the entire subtree data and sort all node sequences according to the traversal order;

[0015] In the sorted node sequence, the direction of the node sequence is determined according to the relative positions of the key nodes in the node sequence;

[0016] According to the sorting results and the direction of the node sequence, calculate the number of rows of each node sequence;

[0017] The number of rows where the upper key node is located is calculated based on the number of rows where the lower key node is located, until the number of rows where the root node is located is calculated;

[0018] Calculate the number of rows of non-key nodes in each node sequence, where the number of rows of non-key nodes is equal to the number of rows of the closest superior key node in the node sequence;

[0019] Determine the locations of all nodes and draw the current line subgraph according to their locations.

[0020] Furthermore, in the sorted node sequence, the direction of the node sequence is determined according to the relative positions of the key nodes in the node sequence, including: for each pair of adjacent nodes in the node sequence, the relative positions between them are calculated using the coordinate differences of the nodes.

[0021] Furthermore, the number of rows of each node sequence is calculated based on the sorting result of the node sequence and the direction of the node sequence, including: starting from the root node, the number of rows is the level of the node; the number of rows of the root node is 0, and for each child node, the number of rows of the child node is equal to the number of rows of the parent node of the child node plus 1.

[0022] Furthermore, the number of rows where the upper-level key nodes are located is calculated in reverse according to the number of rows where the lower-level key nodes are located, until the number of rows where the root node is located is calculated, including: starting from the number of rows of each lower-level key node, and calculating upward step by step, for each lower-level key node, the number of rows of the parent node is equal to the number of rows of the child node minus 1.

[0023] Furthermore, the calculation of the number of rows of non-key nodes in each node sequence, wherein the number of rows of non-key nodes is equal to the number of rows of the nearest upper-level key node in the node sequence, includes:

[0024] For each non-critical node, find the closest superior critical node in the node sequence, that is, the critical node above the non-critical node and closest to it in the same line;

[0025] Traverse all key nodes in the node sequence, find the key node closest to the non-key node, and set the number of rows of the non-key node to the number of rows of the key node.

[0026] Further, the selecting the basic line subgraph as the basic graph includes:

[0027] The connectivity of each route subgraph is calculated based on all key nodes in the basic route subgraph and the topological relationship between the key nodes; the connectivity is calculated by calculating the number of edges in the basic route subgraph, and selecting the basic route subgraph with the largest number of edges as the basic graph; wherein the edge refers to the topological relationship between the key nodes.

[0028] Furthermore, the basic graph is continuously spliced ​​with other basic line sub-graphs to form a new basic graph until all graphs are spliced ​​to generate a final feeder ring network graph, including:

[0029] Select the subgraph that has the most connections with the current basic graph from the remaining basic drawing subgraphs, that is, the basic drawing subgraph that has the most common nodes or edges with the current basic graph, referred to as the subgraph to be spliced;

[0030] The offset of the sub-graph to be spliced ​​is calculated according to the relative positions of the coordinates of the corresponding ring network points in the basic graph and the sub-graph to be spliced, and the sub-graph to be spliced ​​is spliced ​​with the current basic graph according to the offset of the sub-graph to be spliced.

[0031] Further, the calculating the offset of the sub-image to be spliced ​​according to the relative position of the coordinates of the corresponding ring network points in the basic image and the sub-image to be spliced, and splicing the sub-image to be spliced ​​with the current basic image according to the offset of the sub-image to be spliced, comprises:

[0032] Select a pair of corresponding ring network points in the basic graph and the sub-graph to be spliced, and obtain the coordinates of the reference point in the basic graph and the coordinates of the corresponding point in the sub-graph to be spliced;

[0033] Calculate the distance that the sub-image to be spliced ​​needs to move, where the distance that needs to be moved is the relative position difference between the reference point and the corresponding point, and the horizontal position difference and the vertical position difference are obtained by subtracting the coordinates of the reference point and the corresponding point;

[0034] The distance that the sub-image to be spliced ​​needs to be moved, that is, the offset, is calculated, and the sub-image to be spliced ​​is moved to a specified position according to the offset to be spliced ​​with the current basic image.

[0035] Compared with the prior art, the present invention has the following technical effects:

[0036] (1) By parsing the CIM model file, the present invention can accurately extract key data such as basic information of the equipment and the topological relationship between the equipment. This ensures the accuracy and reliability of the data in the subsequent processing. The parsing process covers all important elements in the distribution network, including various equipment and the connection relationship between them, providing comprehensive data support for subsequent graphics drawing and decision analysis.

[0037] (2) The present invention groups data according to the lines to which the equipment belongs, so that each line sub-map can clearly reflect the equipment and connection relationship of the line. This grouping method helps users quickly locate specific lines and conduct targeted analysis and management. The line sub-map is drawn using graphical means, so that the structure and operating status of the distribution network are clear at a glance. This intuitive display method helps improve user work efficiency and reduce the error rate.

[0038] (3) By traversing the parsed data, the present invention can quickly identify all key nodes (i.e., important equipment) and the connection relationships between them. This process not only improves the data processing efficiency, but also makes the subsequent graphics drawing more accurate. Clear topological relationship identification helps to understand the overall structure and operating status of the distribution network, and provides strong support for fault troubleshooting, scheduling decisions, etc.

[0039] (4) The present invention selects the basic line sub-diagram as the basic graphic, and forms a new basic graphic by continuously splicing it with other basic line sub-diagrams until a complete feeder ring network diagram is finally generated. This flexible splicing method can adapt to distribution networks of different scales and complexities, ensuring the integrity and accuracy of the final graphic. The final generated feeder ring network diagram provides a global perspective of the distribution network, which helps users to grasp the operating status and potential problems of the distribution network as a whole. At the same time, the graphic can also be used as a decision support tool to provide strong support for the planning, design, operation and maintenance of the distribution network. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 It is a schematic diagram of the process of the present invention;

[0042] Figure 2 It is a full thumbnail of the present invention;

[0043] Figure 3 is the initial sub-image thumbnail of the present invention;

[0044] Figure 4 is the initial subgraph of the present invention;

[0045] Figure 5 is the first spliced ​​subgraph of the present invention;

[0046] Figure 6 is the second spliced ​​subgraph of the present invention;

[0047] Figure 7 This is the final mapping result of the present invention. DETAILED DESCRIPTION

[0048] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. The specific features, structures or characteristics in one or more embodiments may be combined in any suitable form. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by technicians in the technical field of the present invention.

[0049] In one embodiment of the present invention, referring to Figure 1-Figure 7, provides a method for automatically drawing a distribution network feeder ring network diagram based on fast force guidance, including the following steps: obtaining a CIM model file, parsing the CIM model file, and the parsed data includes basic information of the equipment, topological relationships between the equipment, and association information between the equipment and the line; traversing the data, identifying all key nodes and topological relationship data between key nodes, and the key nodes include branch nodes and ring network points; grouping the data according to the lines to which they belong, and drawing the current line sub-graph according to the positions of the key nodes in the line; selecting a basic line sub-graph as a basic graph, and using a recursive algorithm to continuously splice the basic graph with other basic line sub-graphs to form a new basic graph, until all the graphs are spliced ​​together to generate the final feeder ring network diagram.

[0050] The following is a detailed explanation of each of the above steps:

[0051] Step 100: Prepare data: obtain a CIM model file, parse the CIM model file, and parse out basic information of devices, topological relationships between devices, and association information between devices and lines in the CIM model file.

[0052] As a specific example, this step 100 specifically includes:

[0053] Step 110: Convert the XML document of the CIM model file into relational data and save it in a relational database.

[0054] The CIM (Common Information Model) model defines various equipment objects in the power system, such as substations, circuit breakers, transformers, etc., as well as the relationships between them, such as inclusion relationships (such as substations contain circuit breakers), connection relationships (such as circuit breakers are connected to busbars), etc. This step involves converting the three-dimensional model data of complex topological structures into a table form in a relational database for subsequent data retrieval and processing.

[0055] The step 110 specifically includes the following sub-steps:

[0056] Step 1101: Use the XML parsing library to read the XML document in the CIM model file, parse the structure of the XML document, and extract basic device information, topological relationships between devices, and association information between devices and lines.

[0057] Specifically, an XML parsing library is selected, such as Python's xml.etree.ElementTree, Java's JAXB, etc., and the XML parsing library is used to read and parse XML documents; using the selected XML parsing library, the CIM model file is loaded and its structure is parsed.

[0058] Identify all equipment elements from the CIM model file and extract basic equipment information, which may include equipment ID, name, type, location, etc.; equipment ID represents a string that uniquely identifies the equipment; name represents the name or description of the equipment; type represents the type of equipment, such as transformer, circuit breaker; location represents the location of the equipment in the power system, which can be referenced by other elements, such as substation or busbar.

[0059] Extract the topological relationship between devices by analyzing the connection points or related connection elements of the devices. Traverse the list of connection points in the CIM model, find the interconnected device pairs, and record the connection information between them. Infer the hierarchical relationship between devices based on the connection relationship, location relationship and their functional roles in the power system.

[0060] The CIM model file also usually contains information about line identification, such as line name, line ID or other unique identifiers to distinguish different lines. At the same time, each device usually has a field pointing to the feeder or line it is connected to.

[0061] Step 1102: Design a database table based on basic device information and topological relationships between devices.

[0062] When designing a database table to store basic device information, in addition to storing basic device information and topological relationships between devices, you also need to add one or more fields to each device or topological relationship to identify the line it belongs to. These fields can be foreign keys pointing directly to the line table, or string fields that store line names or unique identifiers.

[0063] Step 1103: Store the extracted basic information of the equipment, the topological relationship between the equipment, and the association information between the equipment and the line into a relational database.

[0064] Specifically, the basic information of the equipment, the topological relationship between the equipment, and the association information between the equipment and the line are stored in the corresponding table of the relational database through the database interface; after the storage is completed, it is verified whether the data in the relational database is complete and accurate, and whether there is any violation of the database constraints.

[0065] Step 120: Retrieve data of the corresponding line from the relational database as needed.

[0066] Query the data of a specific line in the relational database for subsequent data processing and graphics drawing. Specifically, when retrieving data from the relational database, query all the equipment information of a specific line and the topological relationship between them according to the line identifier. This usually involves executing SQL queries, which contain JOIN operations to connect the equipment table and other related tables, such as the line table, and filter the results by line identifier.

[0067] Step 130: Substitute the retrieved data of the corresponding line into the data preprocessing model for preprocessing, wherein the preprocessing includes cleaning and formatting the retrieved line data, removing redundant data, processing missing values, unifying the data format, etc.

[0068] The retrieved data of the corresponding lines are input into the data preprocessing model for data processing and analysis, and the generated data can be used to draw graphics or other visualization results of the distribution network.

[0069] Step 200: Draw the basic line sub-diagram and feeder ring network diagram.

[0070] As a specific example, this step 200 specifically includes:

[0071] Step 210: traverse the preprocessed data to identify all key nodes and topological relationship data between key nodes.

[0072] The step 210 specifically includes the following sub-steps:

[0073] Step 2101: traverse the preprocessed data to identify all key nodes and topological relationship data between key nodes, wherein a node represents a device, and the key nodes include branch nodes and ring network points.

[0074] Key nodes refer to nodes that have an important position in the network, such as nodes that connect multiple branch points or important nodes that form loops. The criteria for determining key nodes include, but are not limited to, the degree of the node, the importance of the device represented by the node, the location of the node in the network, and whether the node participates in forming a closed loop. The degree of a node is the number of edges connected to the node; the location of a node in the network is such as being located on the main line or connecting multiple branches.

[0075] A branch node is a node with more than two connection directions, that is, its degree is greater than 2. In a distribution network, such nodes usually connect multiple lines and play a role in distributing electricity. The method of identifying branch nodes includes: calculating the degree of each node, that is, the number of other nodes directly connected; if the degree of the node is greater than 2, the node is considered to be a branch node. Check whether the node is located at the intersection of multiple lines to confirm its status as a branch node.

[0076] A ring point refers to a key point constituting a ring network structure, that is, a node that participates in forming a closed loop path. The method for identifying a ring point includes: applying a loop detection algorithm, such as a depth-first search or a breadth-first search algorithm, to detect a closed loop path in the network, and marking all nodes on the path as ring points.

[0077] For each key node, check all its adjacent nodes, that is, directly connected nodes; if the adjacent node is also a key node, record the connection relationship between the pair of key nodes. Analyze the relationship between key nodes to ensure that the formed ring network structure meets the physical characteristics and operation constraints of the actual distribution network.

[0078] Step 2102: Substitute the key nodes and the topological relationship data between the key nodes into the Yifan Hu algorithm, and the Yifan Hu algorithm automatically calculates the relative strength, initial step size, step ratio, convergence threshold and other parameters to calculate the rough position of the key nodes, forming an initial layout, retaining the basic topological relationship between the key nodes, avoiding the layout from starting from a random position and causing the calculation time to be too long. Subsequent fine layout can also be locally optimized based on these positions.

[0079] It is worth mentioning that the Yifan Hu algorithm is an algorithm for graph layout, which is mainly used to effectively layout graphs on a two-dimensional plane, especially for the visualization of large-scale graphs. The force-directed layout function of the algorithm uses the mechanical principles in the physical model to set the repulsive force between nodes and the attractive force of edges, thereby adjusting the positions between nodes.

[0080] Step 220: Group the data according to the lines they belong to, and draw a sub-graph of the current line according to the key node positions in the line; specifically including:

[0081] Step 2201: Calculate the paths from the root node of the subtree to all leaf nodes through a recursive algorithm. These paths are called node sequences, and the leaf nodes are key nodes.

[0082] Recursive algorithms solve problems by calling themselves from within a function. They are often used to process tree structures or to repeatedly apply the same process to different sizes or different parts of a data set.

[0083] In the scenario of the distribution network graph layout, the recursive algorithm starts from the root node, takes it as the current node, and checks whether the node is a leaf node, that is, a node without child nodes. If the current node is not a leaf node, the algorithm recursively calls itself for each of its child nodes and continues to search for paths until all leaf nodes are found. In this process, the recursive algorithm records the path from the root node to each leaf node, that is, the node sequence. The recursive algorithm has the top-down characteristic that it can ensure that all paths are found and each path is unique.

[0084] If the in-degree of a node (i.e., the number of edges pointing to the node) is zero, the node can be regarded as a root node. The root node, as the starting point of the subtree, controls the entire line, and the key nodes under it represent the end devices of the subtree, which are responsible for further power distribution or control.

[0085] Step 2202: Use the breadth-first traversal algorithm to traverse the entire subtree data, and sort all node sequences according to the traversal order.

[0086] Breadth-First Search (BFS) is an algorithm for graph traversal or search tree (or tree representation of graph). It starts from the root node, first visits the root node, then visits all nodes directly adjacent to the root node, then visits the unvisited adjacent nodes of these adjacent nodes, and so on, until all reachable nodes are visited.

[0087] Step 2203: In the sorted node sequence, the direction of the node sequence is determined according to the relative positions of the key nodes in the node sequence.

[0088] Specifically, for each pair of adjacent nodes in the node sequence, the relative position between them is calculated using the node coordinate difference. When the horizontal coordinate difference of the node is positive, the direction is from left to right, otherwise it is from right to left; when the vertical coordinate difference of the node is positive, the direction is from top to bottom, otherwise it is from bottom to top.

[0089] Step 2204: Calculate the row number and direction of each node sequence according to the sorting result of the node sequence and the direction of the node sequence.

[0090] Specifically, starting from the root node, the number of rows can be regarded as the level of the node. The number of rows of the root node is 0. For each child node, its number of rows is equal to the number of rows of its parent node plus 1. Therefore, the number of rows of each child node sequence can be gradually determined by traversing the entire node sequence.

[0091] Step 2205: By using a recursive algorithm, the number of rows where the upper-level key nodes are located is calculated inversely according to the number of rows where the lower-level key nodes are located, until the number of rows where the root node is located is calculated.

[0092] Specifically, starting from the number of rows of each subordinate key node, we calculate upward step by step. For each subordinate key node, the number of rows of the parent node is equal to the number of rows of the child node minus 1. We use a recursive function to complete this process. The input of the recursive function is the current node and its row number. The output of the recursive function is the number of rows of the parent node. The recursive termination condition is reaching the root node.

[0093] Step 2206: Calculate the number of rows of non-key nodes in each node sequence, where the number of rows of non-key nodes is equal to the number of rows of the closest upper-level key node in the node sequence.

[0094] Specifically, for each non-key node, find the closest superior key node in the node sequence, that is, the key node on the same line that is above the non-key node and closest to it. Traverse all the key nodes in the node sequence, find the key node closest to the non-key node, and set the number of rows of the non-key node to the number of rows of this key node.

[0095] Step 2207: Use the depth-first traversal algorithm to determine the locations of all key nodes and draw the current route subgraph according to their locations.

[0096] Step 230: Select a basic line sub-graph as a basic graph, and use a recursive algorithm to continuously splice the basic graph with other basic line sub-graphs to form a new basic graph, until all graphs are spliced ​​together to generate a final feeder ring network diagram.

[0097] The step 230 specifically includes the following sub-steps:

[0098] Step 2301: Select a basic line subgraph as a basic graph;

[0099] Specifically, the connectivity of each basic route subgraph is calculated based on all key nodes in the basic route subgraph and the topological relationships between key nodes. The connectivity is measured by calculating the number of edges in the basic route subgraph, where "edges" refer to the topological relationships between key nodes. The more edges there are, the higher the connectivity of the basic route subgraph is, and the basic route subgraph with the highest connectivity is selected as the basic graph.

[0100] Step 2302: using a recursive algorithm, continuously splicing the basic graph with other basic line subgraphs to form a new basic graph, until all graphs are spliced ​​together to generate a final feeder ring network diagram;

[0101] The step 2302 specifically includes the following sub-steps:

[0102] Step 23021: Select the basic drawing subgraph that has the most associations with the current basic graph from the remaining basic drawing subgraphs, that is, the basic drawing subgraph that has the most common nodes or edges with the current basic graph, referred to as the subgraph to be spliced.

[0103] Step 23022: Calculate the offset of the sub-graph to be spliced ​​according to the relative positions of the coordinates of the corresponding ring network points in the basic graph and the sub-graph to be spliced, and splice the sub-graph to be spliced ​​with the current basic graph according to the offset of the sub-graph to be spliced.

[0104] Specifically, a pair of corresponding ring network points are selected in the basic graph and the sub-graph to be spliced, and the coordinates of the reference point in the basic graph and the coordinates of the corresponding point in the sub-graph to be spliced ​​are obtained. The distance that the sub-graph to be spliced ​​needs to move is calculated. This distance is the relative position difference between the reference point and the corresponding point. The horizontal position difference and vertical position difference can be obtained by subtracting the coordinates of the reference point and the corresponding point. The distance that the sub-graph to be spliced ​​needs to move, that is, the offset, is calculated, and the sub-graph to be spliced ​​is moved to the specified position according to the offset to be spliced ​​with the current basic graph.

[0105] Use a recursive algorithm to repeat the above steps until all basic route subgraphs are spliced.

[0106] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A method for automatically drawing a distribution network feeder ring diagram based on fast force guidance, characterized in that: The following steps are involved: Obtain the CIM model file and parse the CIM model file. The parsed data includes basic information of the device, topological relationship between devices, and association information between devices and lines. Traversing the parsed data, identifying all key nodes in the data and the topological relationships between the key nodes, the nodes are devices, and the key nodes include branch nodes and ring network points; The parsed data is grouped according to the lines they belong to, and the current line sub-graph is drawn according to the key node positions in the line, including: Calculate the paths from the root node of the subtree to all leaf nodes, which are called node sequences, and the leaf nodes are key nodes; traverse the entire subtree data and sort all node sequences according to the traversal order; in the sorted node sequence, determine the direction of the node sequence according to the relative position of the key nodes in the node sequence; calculate the number of rows of each node sequence according to the sorting result of the node sequence and the direction of the node sequence; reversely calculate the number of rows of the upper key nodes according to the number of rows of the lower key nodes, until the number of rows of the root node is calculated; calculate the number of rows of non-key nodes in each node sequence, and the number of rows of the non-key nodes is equal to the number of rows of the closest upper key node in the node sequence; determine the location of all nodes, and draw the current line subgraph according to their locations; Select the basic line sub-diagram as the basic graph, and continuously splice the basic graph with other basic line sub-diagrams to form a new basic graph, until all graphs are spliced ​​together to generate the final feeder ring network diagram; The selecting of the basic line subgraph as the basic graph includes: calculating the connectivity of each line subgraph according to all key nodes in the basic line subgraph and the topological relationship between the key nodes; the connectivity is to calculate the number of edges in the basic line subgraph, and select the basic line subgraph with the largest number of edges as the basic graph; wherein the edge refers to the topological relationship between the key nodes; The basic graph is continuously spliced ​​with other basic line subgraphs to form a new basic graph until all graphs are spliced ​​to generate a final feeder ring network graph, including: selecting the basic line subgraph that has the most associations with the current basic graph from the remaining basic line subgraphs, that is, the basic line subgraph that has the most common nodes or edges with the current basic graph, referred to as the subgraph to be spliced; according to the relative position of the coordinates of the corresponding ring network points in the basic graph and the subgraph to be spliced, the offset of the subgraph to be spliced ​​is calculated, and according to the offset of the subgraph to be spliced, the subgraph to be spliced ​​is spliced ​​with the current basic graph.

2. The method for automatically drawing a distribution network feeder loop diagram based on fast force guidance according to claim 1, characterized in that: The identification of all key nodes in the data, the basis for determining the key nodes includes: the degree of the node, the importance of the device represented by the node, the position of the node in the network, and whether the node participates in forming a closed loop; the degree of the node is the number of edges connected to the node, and the position of the node in the network is such as being located on the main line or connecting multiple branches.

3. The method for automatically drawing a distribution network feeder loop diagram based on fast force guidance according to claim 1, characterized in that: In the sorted node sequence, the direction of the node sequence is determined according to the relative positions of the key nodes in the node sequence, including: for each pair of adjacent nodes in the node sequence, the relative positions between the adjacent nodes are calculated using the coordinate differences of the nodes.

4. The method for automatically drawing a distribution network feeder loop diagram based on fast force guidance according to claim 3, characterized in that: The number of rows of each node sequence is calculated according to the sorting result of the node sequence and the direction of the node sequence, including: starting from the root node, the number of rows is the level of the node; the number of rows of the root node is 0, and for each child node, the number of rows of the child node is equal to the number of rows of the parent node of the child node plus 1.

5. The method for automatically drawing a distribution network feeder loop diagram based on fast force guidance according to claim 4, characterized in that: The number of rows where the upper key node is located is calculated inversely according to the number of rows where the lower key node is located, until the number of rows where the root node is located is calculated, including: starting from the number of rows of each lower key node, gradually calculating upwards, for each lower key node, the number of rows of the parent node is equal to the number of rows of the child node minus 1.

6. The method for automatically drawing a distribution network feeder loop diagram based on fast force guidance according to claim 5, characterized in that: The calculating of the number of rows of non-key nodes in each node sequence, wherein the number of rows of non-key nodes is equal to the number of rows of the nearest upper-level key node in the node sequence, includes: For each non-critical node, find the closest superior critical node in the node sequence, that is, the critical node above the non-critical node and closest to it in the same line; Traverse all key nodes in the node sequence, find the key node closest to the non-key node, and set the number of rows of the non-key node to the number of rows of the key node.

7. The method for automatically drawing a distribution network feeder loop diagram based on fast force guidance according to claim 1, characterized in that: The step of calculating the offset of the sub-image to be spliced ​​according to the relative positions of the coordinates of the corresponding ring network points in the basic image and the sub-image to be spliced, and splicing the sub-image to be spliced ​​with the current basic image according to the offset of the sub-image to be spliced ​​includes: Select a pair of corresponding ring network points in the basic graph and the sub-graph to be spliced, and obtain the coordinates of the reference point in the basic graph and the coordinates of the corresponding point in the sub-graph to be spliced; Calculate the distance that the sub-image to be spliced ​​needs to move, where the distance that needs to be moved is the relative position difference between the reference point and the corresponding point, and the horizontal position difference and the vertical position difference are obtained by subtracting the coordinates of the reference point and the corresponding point; The distance that the sub-image to be spliced ​​needs to be moved, that is, the offset, is calculated, and the sub-image to be spliced ​​is moved to a specified position according to the offset to be spliced ​​with the current basic image.

Citation Information

Patent Citations

  • Automatic power distribution network single line diagram drawing method based on improved gravitation repulsion model

    CN106354976A