PMS graph model-based single line diagram generation method

By designing automatic verification rules, the problems of topology obstruction and missing element attributes in single-line diagrams generated by the PMS system are solved, and the accurate, complete and consistent generation of single-line diagrams is achieved, and the graph model management and graph formation efficiency are optimized.

CN120107403APending Publication Date: 2025-06-06STATE GRID XINJIANG ELECTRIC POWER CO LTD CHANGJI POWER SUPPLY CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510161028.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In the existing distribution network automation system, the single-line diagrams automatically generated by the PMS system have problems such as topology blockage and missing element attributes when displaying, which affects the overall display effect.

Method used

Provide a single-line graph generation method based on PMS graph model. By obtaining PMS graph model files, analyzing and analyzing model information, and designing automatic verification rules to ensure the accuracy and completeness of the topology, node equipment and connection relationship attributes of the graph model.

Benefits of technology

Through automatic verification rules, we can identify and solve the topological problems of mismatch and missing element attributes in the graph molding diagram, ensure the accuracy, completeness and consistency of single-line diagrams, optimize the graph mold management, and improve the efficiency of graph molding diagrams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107403A_ABST
    Figure CN120107403A_ABST
Patent Text Reader

Abstract

The invention discloses a single line diagram generation method based on a PMS graph model, and relates to the field of automatic generation of power distribution network contact diagrams.The method comprises the steps that PMS graph model files are obtained, and the PMS graph model files comprise SVG graph files and XML model files; the PMS graphic model file is analyzed to obtain model information, the model information comprises equipment information, substation information, topological information and primitive information, the topological information comprises a topological relation and a connection relation between equipment, and the primitive information comprises graphic attributes, application attributes and interaction information; analyzing and checking the model information to obtain an automatic checking rule; and verifying the PMS graphic model file based on the automatic verification rule to obtain a single line diagram, so that the problem that the diagram cannot be formed due to topology blockage and pixel attribute missing in the graphic model operation process can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic generation of distribution network connection diagrams, and in particular to a method for generating a single-line diagram based on a PMS diagram model. Background Art

[0002] In the current construction of distribution network automation, the distribution network single-line diagram is an important part of the terminal and line display. The information related to the graphic model mainly comes from the PMS (equipment (asset) operation and maintenance lean management system) system. The PMS system uses the GIS positioning of the equipment and the equipment's ledger information to generate the line single-line diagram, and pushes it to the distribution automation system according to specific rules. Due to the differences in the requirements and goals of the PMS system and the distribution automation system for the single-line diagram display, the single-line diagram automatically generated by the PMS system has problems with topology incompatibility and missing graphic element attributes in the distribution automation system, which directly affects the overall display effect of the distribution automation system. Summary of the invention

[0003] In order to solve the problem of being unable to form a diagram due to topological incomprehension and missing graphic element attributes during the operation of a diagram model, the present invention provides a method for generating a single-line diagram based on a PMS diagram model, the method comprising: obtaining a PMS diagram model file, the PMS diagram model file comprising an SVG graphic file and an XML model file; analyzing the PMS diagram model file to obtain model information, the model information comprising equipment information, substation information, topology information and graphic element information, the topology information comprising topological relationships and connection relationships between devices, and the graphic element information comprising graphic attributes, application attributes and interaction information; parsing and verifying the model information to obtain automatic verification rules; verifying the PMS diagram model file based on the automatic verification rules to obtain a single-line diagram.

[0004] Principle of the present invention: The model data pushed by the PMS system to the distribution automation system includes equipment information, substation information, topology information, etc. of the line. By analyzing the PMS graphic model file, the verification rules are divided into three categories: graphic model topology, node equipment and connection relationship attributes. A detailed analysis is performed on these three types of attributes to construct a set of verification rules, which can comprehensively verify the feeder graphic model. By continuously refining the rules, a set of automatic verification rules for the single-line diagram of the PMS graphic model is designed, and applied to the topology verification link of the graphic model file, which effectively identifies the problems existing in the drawing of the distribution network graphic model, ensures the accuracy, completeness and consistency of the single-line diagram of the PMS graphic model, optimizes the graphic model management work, and thus solves the problem of being unable to draw due to topological incomprehension and missing graphic element attributes during the operation of the graphic model.

[0005] Furthermore, the specific steps of obtaining the automatic verification rules include: hierarchically dividing the device nodes based on the device information and the substation information to obtain a hierarchical device node set; hierarchically dividing the graphic element information based on the element type to obtain a graphic element layer set; respectively obtaining the first device quantity and the second device quantity of the hierarchical device node set and the graphic element layer set; obtaining device parameter information based on the device information; generating the device node verification rules based on the first device quantity, the second device quantity and the device parameter information; generating the connection relationship verification rules based on the connection relationship; generating the graph model topology verification rules based on the topological relationship; and obtaining the automatic verification rules based on the graph model topology verification rules, the device node verification rules and the connection relationship verification rules.

[0006] The verification rules are divided into three categories: diagram model topology, node equipment and connection relationship attributes. A detailed analysis is performed on these three attributes to construct a set of verification rules that can comprehensively verify the feeder diagram model. By continuously refining the rules, a set of automatic verification rules for the PMS diagram model single-line diagram is developed to ensure the accuracy, completeness and consistency of the PMS diagram model single-line diagram.

[0007] In view of the problem that some lines in the distribution network diagram have complex topological structures, although most of the verification rules have been passed through the above automatic verification rules, there are still problems such as topological islands and topological isolation that have not passed the verification, which ultimately lead to the inability to form a complete diagram. Therefore, complex topological structure verification rules are added to process and verify these complex topological structures, including identifying and solving topological islands or loop problems.

[0008] Furthermore, the automatic verification rules also include complex topology structure verification rules, and the specific steps of obtaining the complex topology structure verification rules include: dividing the lines in the PMS model file into several sections based on the segmentation switch, traversing each of the sections to obtain the traversal results, and obtaining branch verification rules based on the traversal results; splicing all the sections to obtain the splicing results, and obtaining the topology structure verification rules based on the splicing results; obtaining the complex topology structure verification rules based on the branch verification rules and the topology structure verification rules.

[0009] In order to solve the problems of chaotic layout, inconsistent element size and overlapping elements when the graphics model is imported into the distribution automation system. On the basis of the above, the overall topology and connection relationship of the graphics model are guaranteed to be accurate, the graphics model is constructed through the collision detection algorithm, and the force-directed algorithm is combined to complete the optimization, ensuring that the equipment at each node of the graphics model avoids overlapping, achieving the goals of consistent element size and text attributes, and finally completing the layout of the graphics model node equipment based on the energy model drawing algorithm, and realizing the automatic drawing of the single-line diagram.

[0010] Furthermore, the method also includes: obtaining first data of the single-line diagram, the first data including power system topology data, line parameters and standard rule information; constructing a topological structure of the power system based on the power system topological data, and obtaining a line path and a connection method of the line based on the topological structure and the line parameters; optimizing the single-line diagram based on preset constraints, the line path and the connection method to obtain an optimized single-line diagram.

[0011] Furthermore, the specific steps of obtaining the optimized single-line diagram include: obtaining the line spatial position layout based on the line path and the connection method, performing collision detection on the line spatial position layout to obtain a detection result, adjusting the line spatial position layout based on the detection result, and obtaining a one-dimensional collision model; obtaining component primitives of the single-line diagram, obtaining the first coordinates of the component primitives, constructing a 2D model of the component primitive based on the first coordinates, obtaining a 2D spatial position layout based on the 2D model, adjusting the distance between the 2D models based on the 2D spatial position layout, and obtaining a two-dimensional collision model; optimizing the single-line diagram based on the one-dimensional collision model and the two-dimensional collision model to obtain a first optimized single-line diagram, and obtaining the optimized single-line diagram based on the first optimized single-line diagram.

[0012] Based on the collision detection algorithm, the modeling of node equipment and feeder segments in the diagram is completed. The one-dimensional model is built for the feeder segment, and the line is effectively laid out according to the positional relationships of multiple feeder segments such as connection, separation, and intersection. At the same time, a two-dimensional model is built based on the power-saving equipment element, a 2D rectangle is constructed, and the distance of the element is allocated and automatically laid out according to the collision detection algorithm to ensure that there will be no collision between the various devices, and finally a preliminary layout plan is formed.

[0013] Furthermore, the specific steps of obtaining the optimized single-line diagram also include: obtaining the collision relationship of the graphic element model in the first optimized single-line diagram, initializing the node position of the first optimized node in the first optimized single-line diagram based on the collision relationship, and calculating the repulsion and attraction between the first optimized nodes based on the node position; based on the repulsion, the attraction and preset rules, iteratively adjusting the node position to obtain the second optimized single-line diagram, and obtaining the optimized single-line diagram based on the second optimized single-line diagram.

[0014] The force-directed algorithm is used to achieve the interval layout of the model, eliminate the intersection and overlap between the elements, the elements and the lines, and the elements and the text, and ensure the compactness and beauty of the entire model line layout. The force-directed algorithm can take into account the special layout requirements of the feeder model, such as the direction, bend, and intersection of the feeder. During the layout process, the force-directed algorithm can adjust the effects of repulsion and attraction according to the characteristics of the feeder model, so that the layout between the feeders and between the feeders and other elements reaches the optimal state, thereby ensuring the compactness and beauty of the overall layout.

[0015] In the feeder model, the application of force-directed algorithms can effectively avoid crossing and overlapping between feeders, thereby improving the maintainability and stability of the line layout. By optimizing the layout scheme, the force-directed algorithm can ensure that the layout of the feeder model meets the requirements of engineering design, while ensuring the aesthetics and practicality of the overall model layout. This optimization method that comprehensively considers the special needs of the feeder model can provide a more complete solution for engineering design.

[0016] Furthermore, the specific steps of obtaining the optimized single-line diagram also include: obtaining the node distance between the second optimized nodes in the second optimized single-line diagram, and constructing an energy model based on the node distance; obtaining second data of the energy model, and cleaning the second data to obtain third data; the second data includes line topology information, equipment inventory information, equipment asset information and line contact information; taking the substation as the starting point and the line equipment as the node, constructing a single-line diagram multi-branch model based on the third data; traversing the single-line diagram multi-branch model to obtain fourth data, the fourth data including the maximum length of the weighted tree, the longest line node list, the maximum length line and the second coordinate of the maximum length line; obtaining the line nodes of the single-line diagram multi-branch model, and obtaining Get the number of child nodes and the node type of the line node; determine whether there is a branch line at the line node based on the number of child nodes, and if so, obtain the first maximum length of the branch line and the node direction of the line node; if the node type is an overhead node, orthogonalize the branch line based on the node direction, the maximum length and the fourth data to obtain a second branch line, and update the branch line to the second branch line; if the first node type is a cable line node, process the branch line based on the hierarchical layout and the fourth data to obtain a third branch line, and update the branch line to the third branch line; obtain a third optimized single-line diagram based on the single-line diagram multi-branch number model, and obtain the optimized single-line diagram based on the third optimized single-line diagram.

[0017] The energy model drawing algorithm can effectively handle complex layout situations in the feeder model, including the arrangement of various nodes, connecting lines and other elements. By optimizing the energy model algorithm, the layout of each part can be made more compact, orderly and beautiful while considering the connectivity of the line. This not only helps to improve the maintainability and stability of the line, but also reduces human errors in the design process, improves design efficiency and quality, simplifies the layout process, and provides engineering designers with more flexible and efficient tools, which helps to achieve high-quality, compact and beautiful line layout.

[0018] Considering that all current model files are single radial lines, in the actual operating environment, in order to ensure good power supply reliability, most lines use contact switches for hand-in-hand mode power supply. In order to fully reflect the connection relationship of the current line from the model file, facilitate the contact grid operation and maintenance, and solve the problem of lack of control of line operation status caused by contact reverse supply and operation mode switching, this method realizes the construction of the contact model based on association rules, and realizes the splicing of the contact diagram according to the front and back network topology combination algorithm. Finally, the dynamic contact splicing of multiple feeders is realized through the force-directed simulated annealing algorithm to realize the formation of the contact diagram.

[0019] Furthermore, the method further includes: starting from the power supply, searching the optimized single-line diagram to obtain search data, and based on the search data, obtaining a number of buses based on closed bus switches and feeder switches; obtaining bus node associated data and bus branch associated data of the bus; the search data includes search nodes, tie switch information, node information connected to both ends of the tie switch, component information, branch information connected to components, a first state of the tie switch and a second state of the branch, marking the search node; judging whether each of the bus is a valid bus, and if not, deleting the bus; if so, based on the The busbar node association data and the busbar branch association data are used to merge the busbars to obtain several electrical islands, and each electrical island is analyzed to obtain electrical island information; a forward topology multi-branch tree model is constructed based on the electrical island information and the busbar; with the substation as the starting point, the substation of the interconnecting line as the end point, the interconnecting switch as the connection point, and the interconnecting line connected to the interconnecting switch taking the interconnecting switch as the starting point, the optimized single-line diagram is reversely topologically analyzed until the topology reaches the line substation, and a reverse topology multi-branch tree model is constructed; based on the forward topology multi-branch tree model and the reverse topology multi-branch tree model, the first optimal single-line diagram is obtained.

[0020] Furthermore, the method further comprises:

[0021] S1. Traverse the first optimal single line diagram to obtain a first maximum line length and a trunk line corresponding to the first maximum line length;

[0022] S2, determining whether there is a branch line at the node on the trunk line, and if so, executing S3; if not, obtaining the third coordinate of the node, and the execution ends, obtaining the second optimal single-line diagram based on the third coordinate;

[0023] S3, traversing the second maximum line length of the branch line, and obtaining the branch line direction of the branch line;

[0024] S4, obtaining the fourth coordinate of the branch node on the branch line, determining whether the third coordinate and the fourth coordinate intersect, if so, executing S5; if not, caching the fourth coordinate to a cache list, laying out the branch line based on the branch line direction, and returning to S2;

[0025] S5, obtaining a fifth coordinate intersecting the branch line, and moving the branch line based on the fifth coordinate and the direction of the branch line;

[0026] S6. Return to S2, and repeat S2-S6 until the node traversal on the trunk line is completed, and the second optimal single-line diagram is obtained.

[0027] The distribution network contact diagram can visually view the lines with contact relationships, which greatly facilitates the use of on-site operation and maintenance personnel during the actual on-site operation and maintenance process. The constructed contact line topology model adopts a dynamic layout strategy, starting from the first node of the topology model, and calculating the maximum line length of the authorized tree through depth-first traversal. The authorized tree with the maximum length is used as the trunk line, and dynamic layout is performed according to the topological order and equipment type to complete the layout of the contact line.

[0028] When dealing with hybrid line connection splicing, although the graphic model of a single feeder has achieved an aesthetic effect, there is still the problem of overlapping graphic elements between different lines. The force-guided simulated annealing algorithm is introduced to implement dynamic layout. The algorithm can automatically identify the elements in the line diagram and intelligently adjust their positions to avoid overlapping problems.

[0029] Furthermore, the method also includes: initializing a first graph model based on the second optimal single-line diagram; obtaining the connection point between the two feeders based on the first graph model and the connecting switch, obtaining a solution based on the connection point, and constructing a solution space based on the solution; calculating the splicing objective function based on the solution space to obtain the objective function value; constructing an energy splicing model, and judging whether the solution space accepts a new solution based on the energy splicing model and the objective function value, and if so, updating the solution based on the new solution, and otherwise updating the solution based on a preset probability; obtaining a third optimal single-line diagram based on the updated solution.

[0030] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:

[0031] 1. Analyze the topology and node attributes of the model, design a set of automatic verification rules for the single-line diagram of the PMS model, and apply them to the topology verification link of the model file, effectively identify the problems existing in the distribution network model drawing, optimize the model management work, and improve the accuracy and efficiency of the model drawing. It can solve the problem of being unable to draw due to topological incomprehension and missing element attributes during the model operation process.

[0032] 2. The research on the advanced algorithm for automatic drawing is completed through the drawing model file after the automatic verification rules of the drawing model. It can quickly and accurately generate a complete drawing model, while meeting the aesthetic requirements of the drawing model layout and the practical needs of the distribution automation master station drawing model. It can solve the problems of overlapping graphic elements, chaotic layout, inconsistent graphic element sizes, etc. when the drawing model is imported into the distribution automation system.

[0033] 3. Research on intelligent combination technology of diagram and model splicing. For the single-line diagram after automatic drawing, multiple feeder diagrams are intelligently spliced ​​by identifying the interconnection switch to generate a distribution network interconnection diagram, which is convenient for adjusting the operation mode at any time. Grid-based operation and maintenance can solve the problem of adjusting the diagram model operation mode during interconnection reversal. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of the present invention, and do not constitute a limitation on the embodiments of the present invention;

[0035] Figure 1 It is the overall flow chart of the single line diagram generation in the present invention;

[0036] Figure 2 It is a flow chart of the automatic verification rule design in the present invention;

[0037] Figure 3 It is a flow chart of the automatic verification algorithm of the image model in the present invention;

[0038] Figure 4 It is a schematic diagram of the hierarchical relationship of the container model in the present invention;

[0039] Figure 5 It is a schematic diagram of the relationship between the device and the endpoint in the present invention;

[0040] Figure 6 It is a schematic diagram of the topological connection relationship between the device container levels in the present invention;

[0041] Figure 7 It is the logic diagram of the automatic mapping high-level algorithm in the present invention;

[0042] Figure 8 It is a processing logic diagram of the collision detection algorithm in the present invention;

[0043] Fig. 9is a schematic diagram of a one-dimensional circuit model in the present invention, wherein X1 and X2 represent coordinates of the x-axis, and Y1 and Y2 represent coordinates of the y-axis;

[0044] Fig.10 is a schematic diagram of a two-dimensional circuit model in the present invention, wherein A (X1, Y1) and B (X2, Y2) respectively represent the coordinates of components, H1 and H2 represent heights, and W represents width;

[0045] Fig.11 It is a logic diagram of the application of the force-directed algorithm in the present invention;

[0046] Fig.12 It is the application logic diagram of the energy model mapping algorithm in the present invention;

[0047] Fig.13 It is a flow chart of the mapping algorithm in the present invention;

[0048] Fig.14 It is a logic diagram of the intelligent combination technology of image-model splicing in the present invention;

[0049] Fig.15 It is a schematic diagram of the image-model splicing process in the present invention;

[0050] Fig.16 1 is a schematic diagram of a forward topology model of a line in the present invention, wherein T1, T2 and T3 all represent feeders, and 2, 3, 4, 5, 6, 7 and 8 all represent tie switches;

[0051] Fig.17 It is a schematic diagram of the reverse topology model of the line in the present invention;

[0052] Fig.18 It is a schematic diagram of the topological model of the contact line in the present invention;

[0053] Fig.19 is a schematic diagram of dynamic layout direction determination in the present invention, wherein PM and P1-P7 all represent nodes;

[0054] Fig. 20 is a schematic diagram of dynamic layout direction determination in the present invention, wherein PM and P1-P12 all represent nodes;

[0055] Fig.21 It is a flow chart of the contact splicing algorithm in the present invention. DETAILED DESCRIPTION

[0056] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0057] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those within the scope of this description. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0058] Embodiment 1

[0059] refer to Figure 1-Figure 7 This embodiment provides a method for generating a single line diagram based on a PMS diagram model, the method comprising:

[0060] Acquire a PMS graphic model file, wherein the PMS graphic model file includes an SVG graphic file and an XML model file; analyze the PMS graphic model file to obtain model information, wherein the model information includes device information, substation information, topology information and graphic element information, wherein the topology information includes the topological relationship and connection relationship between devices, and the graphic element information includes graphic attributes, application attributes and interaction information; parse and verify the model information, such as format parsing the XML model file through XML tags to obtain storage information of the model file, and obtain automatic verification rules based on the storage information; verify the PMS graphic model file based on the automatic verification rules to obtain a single-line diagram.

[0061] The specific steps of obtaining the automatic verification rules include:

[0062] like Figure 4-Figure 6 , hierarchically dividing the device nodes based on the device information and the substation information to obtain a hierarchical device node set;

[0063] Get the attribute information of each device node. The XML model file describes the electrical equipment in detail, including its attributes and relationships. Different nodes store different model information, such as voltage level nodes, feeder nodes, substation nodes, and graphic connection nodes. The attributes within the relevant nodes are as follows:

[0064] cim:IdentifiedObject.mRID node: device number;

[0065] cim:BaseVoltage node: basic voltage level: defines the basic voltage level information of the equipment on the line;

[0066] cim:VoltageLevel node: Voltage level: defines the voltage level of the ring network box on the line.

[0067] The visualization of the distribution network is realized by using SVG technology. Through SVG technology, each electrical device in the distribution network can be represented by an image of electrical graphics. In the distribution network, an electrical graphics element represents the graphics of an electrical device. SVG graphics element files include graphics attributes, application attributes and interaction information. Graphic attributes are specifically composed of three parts: style, geometric information and animation effects. Geometric information mainly reflects the shape, size and position of the graphics element. Style mainly enables the graphics element to be displayed in a unified style. Animation effects mainly reflect the changes in the shape of the graphics element, such as the animation of the opening and closing of the switch. Through these three attributes, the graphics of an electrical device can be accurately defined. Application attributes are mainly used to save CIM model information associated with electrical equipment. Interaction events are mainly realized by defining a large number of interaction event scripts, and the basis is that SVG technology supports embedded scripting languages. In addition to the above basic information, it should also contain other additional information such as pointer information of parent graphics element, mapping relationship information between color and shape, and information on the way of scaling and rotation.

[0068] Based on the element type, the primitive information is hierarchically divided to obtain a primitive layer set; for example:

[0069] 1) Background layer: the background layer color and background canvas layer size can be modified under this node; 2) Switch layer: including switches in the station and all switches on poles; 3) Ring main unit layer: including substations and ring main unit node sets on lines; 4) Station combination switch layer: including station combination switch sets; 5) Isolation switch layer: including all isolation switch sets; 6) Busbar layer: including substations and all ring main unit busbars; 7) Distribution transformer layer: including all public transformers, special transformer users, and station transformers; 8) Station conductor layer: including all station conductor nodes or customized off-site connecting lines; 9) Terminal layer: including all terminals in and outside the station; 10) Pole tower layer: including all pole tower nodes, including tension poles and straight poles; 11) Text layer: all text description nodes on the line diagram; 12) Hyperlink layer: communication line nodes.

[0070] The graphic file svg and the model file xml are related and separated but also interconnected. The interconnection means that the two types of information are associated with a unique attribute, and the unique attribute is PD, which is a unique ID value. The model information and the graphic information are associated through PD, thereby completing the association of the graphic and the model.

[0071] Respectively obtaining the first device quantity and the second device quantity of the hierarchical device node set and the primitive layer set; obtaining device parameter information based on the device information; generating the device node verification rule based on the first device quantity, the second device quantity and the device parameter information;

[0072] For example, the types and quantities of devices in the model are parsed, the detailed information of each device is cached, and then the types and quantities of devices in the graphics are parsed, and the following verification rules are summarized and generated:

[0073] (1) Verification of the number of graphics in the graphic file and the model file; (2) Verification of the security and integrity of the attributes in the graphics file; (3) Verification of the uniqueness of the equipment and the accuracy of the text in the graphics file; (4) Verification of the connection relationship, isolated graphics, and circular graphics in the graphics file; (5) Verification of the connection relationship between graphics files; (6) Verification of the missing of necessary graphics in the graphics file.

[0074] The connection relationship verification rule is generated based on the connection relationship; for example, the connection relationship between each node device of the graph model is analyzed, and at the same time, according to the consistency verification principle of the graph model, based on the connection model, it is found in the graph whether the connection relationship exists and is correct. If not, it is judged that the graph model connection principle is violated. Thus, the connection relationship verification rule is designed and generated.

[0075] Generate the graph model topology verification rule based on the topological relationship;

[0076] Based on the graph model topology verification rules, the device node verification rules and the connection relationship verification rules, the automatic verification rules are obtained. For example, the topology island and loop verification principle is based on the topological relationship of the equipment in the model file, and the virtual link points at both ends of the equipment are used to determine whether it is a topological island. After the line model is remodeled, a depth-first traversal is performed starting from the substation to find out whether the line topology is a loop. If the line has a topological island or a loop, the line does not match the actual line and cannot be automatically mapped. Finally, the graph model topology verification rules are designed.

[0077] Through three verification types: graph topology verification, node device verification, and connection relationship verification, combined with verification logic, automatic verification rules can be summarized and designed, as shown in Table 1:

[0078] Table 1

[0079]

[0080]

[0081] Embodiment 2

[0082] On the basis of Example 1, in this embodiment, the automatic verification rules also include complex topology structure verification rules, and the specific steps of obtaining the complex topology structure verification rules include: dividing the lines in the PMS model file into several sections based on the segmentation switch, traversing each of the sections to obtain the traversal results, and obtaining branch verification rules based on the traversal results; splicing all the sections to obtain the splicing results, and obtaining the topology structure verification rules based on the splicing results; based on the branch verification rules and the topology structure verification rules, the complex topology structure verification rules are obtained.

[0083] For example, through the model slicing analysis, the line is divided into several sections according to the segment switches on the line, and each section is used as an independent model. In this way, the line can be analyzed more finely and complex line problems can be effectively solved. At the same time, the depth-first search algorithm is used to traverse and solve the problem of branch line verification at all levels. This algorithm can accurately detect and solve potential problems by deeply exploring each part of the line.

[0084] In this embodiment, a breadth-first search algorithm can also be used to perform breadth verification based on the segmented image segments. This method can identify potential topological problems and effectively solve problems related to line structure. Through the application of these algorithms, the line can be analyzed more accurately, and potential problems can be discovered and solved in a timely manner, thereby improving the reliability and stability of the line.

[0085] Embodiment 3

[0086] refer to Figure 8-Figure 11 Based on the above embodiment, in this embodiment, the method further includes:

[0087] The first data of the single-line diagram is obtained, wherein the first data includes power system topology data, line parameters and standard rule information; in this embodiment, the data may also be processed and cleaned to ensure the accuracy and completeness of the data.

[0088] Based on the power system topology data, a topological structure of the power system is constructed, such as using graph theory algorithms such as breadth-first search and depth-first search to obtain nodes and their connection relationships, thereby constructing a topological structure, and based on the topological structure and the line parameters, obtaining the line path and the connection method of the line; such as using the shortest path algorithm, minimum spanning tree algorithm, etc. to determine the path and connection method of the line, and at the same time, considering increasing the decision-making considerations of factors such as the capacity and load of the line.

[0089] The single line diagram is optimized based on preset constraints, the line path and the connection mode to obtain an optimized single line diagram. In this embodiment, the preset constraints may be constraints such as line length, voltage drop, safety spacing, load balancing, and fault tolerance.

[0090] Collision detection is to detect whether two (or more) objects in space intersect, are tangent, or intersect at least at one point. The most basic result returned is a Boolean value that determines whether the two objects intersect.

[0091] The specific steps of obtaining the optimized single-line diagram include:

[0092] The spatial position layout of the line is obtained based on the line path and the connection method, collision detection is performed on the spatial position layout of the line to obtain a detection result, and the spatial position layout of the line is adjusted based on the detection result to obtain a one-dimensional collision model; for example, in the one-dimensional collision model, only the coordinates of the starting and ending ends of the line are needed to determine the spatial position layout of a line, and then the collision principle based on the separation distance is used to regularly arrange and plan the layout of the line.

[0093] Suppose there are two line segments a and b, the two endpoints of line segment a are: X1 and Y1, and the two endpoints of line segment b are: X2 and Y2.

[0094] Condition 1: Whether vectors X1->X2 and X1->Y2 are located at the left and right ends of vector X1->Y1 respectively;

[0095] Condition 2: Whether vectors X2->X1 and X2->Y1 are located at the left and right ends of vector X2->Y2 respectively;

[0096] When conditions 1 and 2 are met at the same time, line segments a and b intersect. To determine the orientation of a vector relative to another vector, the 2D cross product formula can be used.

[0097] Obtain the component primitive of the single-line diagram, obtain the first coordinate of the component primitive, construct a 2D model of the component primitive based on the first coordinate, obtain a 2D spatial position layout based on the 2D model, adjust the distance between the 2D models based on the 2D spatial position layout, and obtain a two-dimensional collision model; for example, for the primitives representing the transformers, circuit breakers, switches and other components in the distribution network in the line diagram, use a two-dimensional collision model for modeling, that is, a 2D rectangle, calculate the coordinates of the geometric center points A and B, the rectangle width W1 and W2, and the height H1 and H2. In the modeling, a 2D rectangle is constructed using the center coordinates (x, y) of the rectangle and the length and height of the rectangle, and then the distance of the primitive is allocated and laid out according to the collision detection algorithm. The distance calculation can be measured in the following way: the separation distance and the puncture distance are measured using the Euclidean distance.

[0098] The separation distance refers to the length of the shortest line segment connecting two separated point sets A and B, and the piercing distance refers to the minimum length of translation required to separate two intersecting point sets A and B.

[0099] Based on the one-dimensional collision model and the two-dimensional collision model, the one-line diagram is optimized to obtain a first optimized one-line diagram, and the optimized one-line diagram is obtained based on the first optimized one-line diagram.

[0100] Embodiment 4

[0101] refer to Fig.12 Based on the above embodiment, in this embodiment, the specific steps of obtaining the optimized single line diagram further include:

[0102] Based on the force-directed algorithm, a collision relationship of a graph element model in the first optimized single-line diagram is obtained, node positions of first optimized nodes in the first optimized single-line diagram are initialized based on the collision relationship, and repulsion and attraction between the first optimized nodes are calculated based on the node positions, and the calculation method may be:

[0103] area = W × H;

[0104] Among them, area is the display area, W and H are the width and height of the display area respectively;

[0105]

[0106] Among them, area is the display area, k is the equilibrium distance, also known as the ideal distance, and |v| is the number of nodes in the graph;

[0107]

[0108] Among them, dist(u,v) is the geometric distance between nodes u and v, u.pos x and v.pos x Represents the x coordinates of nodes u and v, respectively, u.pos y and v.pos y Represent the y coordinates of nodes u and v respectively;

[0109] fa(u,v) represents the attraction between nodes u and v;

[0110] fr(u,v) represents the repulsive force between nodes u and v;

[0111] Based on the repulsive force, the attractive force and the preset rules, the node positions are iteratively adjusted using an iterative method such as a cyclic iteration algorithm or a simulated annealing algorithm to obtain a second optimized single-line diagram, and the optimized single-line diagram is obtained based on the second optimized single-line diagram. In this embodiment, the preset rules may include setting a maximum offset of node displacement.

[0112] The force-directed algorithm calculates the velocity and acceleration of the node by considering the interaction of gravity and repulsion between atoms. The movement of the node is similar to the movement of atoms or planets. After continuous iterative calculations, it eventually enters a dynamic equilibrium state. Each iteration is mainly divided into three parts: first, the mutual repulsion between nodes is calculated, then the mutual attraction between nodes connected by edges in the graph is calculated, and finally the attraction and repulsion are combined, and the moving distance is limited by the maximum displacement. When two nodes are in the same position, special processing is required. The FR algorithm will give the two nodes a relatively large exclusion force so that the two nodes can be separated smoothly.

[0113] In the force-directed algorithm, there is oscillation of node displacement, that is, the displacement is too large, exceeding the distance that should be moved, and moving in the opposite direction, which is mainly reflected in the calculation of the attraction of adjacent nodes. For this reason, in this embodiment, a program judgment for controlling oscillation is added through a simulated annealing algorithm. Therefore, when iterating according to the number of cycles, a simulated annealing algorithm is introduced to limit the maximum offset of node displacement, increase the calculation of the distance between adjacent nodes after displacement, and reduce the maximum offset of node displacement according to the number of cycles, which can effectively prevent the oscillation of node displacement.

[0114] In this embodiment, the grid variable method can be used to optimize the calculation method of the repulsive force: the point distribution area is divided into several grids, and only the interaction between the node and the nodes in the adjacent grids is considered when calculating the repulsive force. If k1 represents the ideal radius of the blank area around the node, and d represents the distance between the nodes, the repulsive force calculation formula is as follows:

[0115]

[0116] Among them, fr represents repulsion, u() represents a function that takes 0 or 1, x represents an input parameter, k1 represents the ideal radius of the blank area around the node, and d represents the distance between nodes. u(x) can be understood as if 2k1-d is greater than 0, then u(2k1-d) is equal to 1, otherwise it is equal to 0.

[0117] Embodiment 5

[0118] refer to Figure 13-14 Based on the above embodiment, in this embodiment, the specific steps of obtaining the optimized single line diagram further include:

[0119] The node distance between the second optimized nodes in the second optimized single-line diagram is obtained, and the calculation method thereof can be:

[0120]

[0121] Among them, E s represents the node distance, i and j represent nodes, d(i,j) represents the Euclidean distance between two nodes, s(i,j) represents the natural length of two nodes, k represents the elastic coefficient, and n represents the number of nodes.

[0122] An energy model is constructed based on the node distance; for example:

[0123]

[0124] Where E represents the energy model, r represents the electrostatic force constant between two nodes, and w i and w j Both represent the weight between two nodes.

[0125] Obtain the second data of the energy model, and clean the second data to obtain the third data, such as by extracting the line number, substation and other information of the current line, and eliminating the equipment that does not belong to the current line in the line equipment and line topology relationship; the second data includes line topology information, equipment ledger information, equipment asset information and line contact information; data cleaning ensures that there is no junk data in the line layout process and improves the accuracy of the line.

[0126] Taking the substation as the starting point and the line equipment as the node, a single-line diagram multi-branch model is constructed based on the third data; by constructing a multi-branch tree model, the substation node is used as the root node, and the line multi-branch tree model is constructed in sequence until the topology reaches the end of the line. For example, according to the current line number in the model file, non-current line equipment is filtered, and some virtual nodes are added to model the line data without affecting the overall line topology to ensure the aesthetics of the drawing.

[0127] Traversing the single-line graph multi-branch model, obtaining fourth data, the fourth data including the maximum length of the entitled tree, the longest line node list, the maximum length line and the second coordinate of the maximum length line; obtaining the line node of the single-line graph multi-branch model, obtaining the number of child nodes and the node type of the line node; judging whether the line node has a branch line based on the number of child nodes, and if so, obtaining the first maximum length of the branch line and the node direction of the line node;

[0128] If the node type is an overhead node, the branch line is orthogonalized based on the node direction, the maximum length and the fourth data to obtain a second branch line, and the branch line is updated to the second branch line; if the first node type is a cable line node, the branch line is processed based on the hierarchical layout and the fourth data to obtain a third branch line, and the branch line is updated to the third branch line; a third optimized single-line diagram is obtained based on the single-line diagram multi-branch model, and the optimized single-line diagram is obtained based on the third optimized single-line diagram.

[0129] For example, according to the topological structure, the lines are laid out in sequence, the overhead lines adopt an orthogonal layout, and the ring main unit lines adopt a hierarchical layout. The specific steps are:

[0130] (1) Depth-first traversal obtains the maximum length of the authorized tree and the longest line node list, and caches the maximum length line coordinates;

[0131] (2) Determine whether the node contains a branch line based on the number of child nodes of the line topology node;

[0132] (3) Use the orthogonal layout method to determine the direction of the branch line. If the branch line does not meet the requirements in the orthogonal direction, move the branch line and cache the branch line coordinates;

[0133] (4) Determine the layout node equipment type. If it is an overhead node, calculate the current node coordinates based on the distance between the overhead line elements and the parent node coordinates. If it is a cable line node, use a hierarchical layout to layout the ring main unit line. After the layout is completed, calculate whether it intersects. If it intersects, move the ring main unit and cache the coordinates of the four sides of the hierarchical structure rectangle.

[0134] The above steps are used to lay out the complex distribution network lines, and the line types are distinguished and laid out separately. In order to ensure that there is no overlap or intersection in the complex single-line diagram when drawing the complex lines, the distance between the two graphic elements is calculated through the energy model according to the topological model and equipment type of the complex lines, and the line elements are divided into overhead lines and cable lines according to the type of line elements; for the layout of different line types, the overhead lines are laid out orthogonally to ensure that the overhead lines are horizontal and vertical as a whole; the cable lines are laid out in a hierarchical manner to ensure the hierarchical structure of the lines; among them:

[0135] (1) Orthogonal layout of overhead lines based on the topological model: Based on the topological model, the distance between two graph elements is calculated through the energy model, and then the right tree is traversed in depth first to calculate the longest branch line and cache the branch line coordinates; the line nodes are laid out in sequence. When the number of node child nodes is greater than 2, it means that the node has a branch line. The maximum length of the branch line and the direction of the current node are calculated, and the branch line is orthogonalized. It is calculated whether the branch line intersects with the cached branch line. If a certain direction does not intersect, the straight line is determined as the current direction. If the branches intersect in all orthogonal directions, the branches are moved;

[0136] (2) A hierarchical layout is adopted for the ring main unit: when there is a ring main unit node in the topological structure, the length of the ring main unit node is calculated, and whether the ring main unit branch line intersects with the cached branch line. If they do not intersect, the layout is performed according to this direction. When the ring main unit is laid out, the equipment of the ring main unit outgoing node is laid out in turn according to the outgoing node of the ring main unit, and the coordinates of the ring main unit are calculated. After the layout of the ring main unit is completed, the rectangular frame of the hierarchical layout is cached in the branch line coordinate list to ensure that the subsequent nodes do not intersect with the ring main unit.

[0137] After the layout is completed, the line device nodes are counted and compared with the device nodes in the line model file. If the device nodes are the same, the layout is successful. If there are differences, the layout fails and the failed node content is displayed. Re-parse the graphic file after layout, obtain the device node information of the entire line, cache the node list to the memory, and compare the line list before and after the line layout to verify whether the line layout is successful. The specific steps are as follows:

[0138] After the layout is completed, the laid out nodes are counted, the laid out nodes are compared with the one-line diagram nodes obtained when reading the line, and the one-line diagram nodes are verified. If the laid out nodes are the same as the one-line diagram nodes, it means that the layout is successful. If they are different, it means that there is a problem with the layout, and the problem nodes will be fed back.

[0139] In this embodiment, the specific steps of obtaining the optimized single-line diagram also include: hierarchical diagram drawing technology, which can simplify and organize complex distribution network data and display it in a more intuitive way, making the monitoring and management of the distribution network more convenient and efficient. The steps specifically include:

[0140] (1) Layer classification: Accurately classify the model elements, such as equipment, wire, terminal, etc., and carefully select automation equipment, such as pole-mounted circuit breakers, fault indicators, substations, etc., to provide comprehensive and accurate data support for subsequent layered drawing. (2) Node equipment deletion: Carefully review and delete unnecessary node equipment, such as fuses, wire tools, off-site user access points, multi-level towers, etc., and only retain key equipment to ensure the simplicity and accuracy of the model. (3) Topology connection update: According to the deleted node equipment head and end connection terminals, automatically iterate to the next level of undeleted equipment head connection points, and complete the topology node connection to achieve dynamic update of the topological relationship of the model. (4) Intelligent identification and splicing: Automatically identify and layout equipment, wires and other elements on each layer, realize automatic drawing of layered simple diagrams, and improve the efficiency and accuracy of drawing.

[0141] Embodiment 6

[0142] refer to Figure 15-Figure 21 Based on the above embodiment, in this embodiment, the method further includes:

[0143] Taking the power supply as the starting point, searching the optimized single-line diagram to obtain search data, and based on the search data, obtaining a plurality of buses based on closed bus switches and feeder switches; obtaining bus node associated data and bus branch associated data of the bus; the search data includes search nodes, tie switch information, node information connected to both ends of the tie switch, component information, branch information connected to the components, a first state of the tie switch and a second state of the branch, and marking the search nodes;

[0144] Determine whether each bus is a valid bus, if not, delete the bus; if yes, merge the bus to obtain several electrical islands based on the bus node associated data and the bus branch associated data, analyze each electrical island, and obtain electrical island information;

[0145] The effective bus includes the following situations: the bus connects two different branches; the bus connects a branch and a parallel device; the bus connects a power supply and a parallel device other than the power supply.

[0146] If the topological analysis method is adopted, it mainly includes the matrix method and the tree search method. The tree search method includes the depth-first search algorithm or the breadth-first search algorithm. The graph is traversed to find out its connection relationship and each connected area. In the process of traversal, each node is subjected to busbar analysis, that is, the nodes connected by closed switches are merged into a new busbar. Each busbar is also subjected to electrical island analysis, that is, all buses connected by branches are merged into an electrical island. Finally, the topological analysis of the distribution network is completed.

[0147] A forward topology multi-branch tree model is constructed based on the electrical island information and the busbar; in the distribution network single-line diagram contact diagram model, generally one contact line may have multiple contact switches, such as Fig.17 As shown, there are two tie switches for feeder T1, which are connected to T2 line and T3 line through tie switches 5 and 8 respectively. The specific steps of its construction can be:

[0148] (1) Using the breadth-first search algorithm to search the distribution network starting from the power source, the searched nodes are marked as searched;

[0149] (2) During the search process, the switch information and the node information connected to both ends are saved in the switch node association table;

[0150] (3) During the search process, the data information of the devices such as the line and transformer and the branch information to which they are connected are stored in the node-branch association table;

[0151] (4) During the search process, analyze the switch status and branch status, combine all nodes connected by closed bus switches and feeder switches into a bus, save the bus information and node information in the bus node association table, and save the bus information in the bus information table. At the same time, save the starting node information of the bus. This completes the bus analysis;

[0152] (5) Determine whether the bus is a valid bus. A valid bus includes the following situations: the bus connects two different branches; the bus connects a branch and a parallel device; the bus connects a power supply and a parallel device other than the power supply. If the bus is an invalid bus, delete the bus.

[0153] (6) After completing the busbar analysis, the electrical island needs to be analyzed. Scan the busbar node association table and the node branch association table, and merge the buses connected by branches into one electrical island, that is, save the busbar number belonging to the electrical island in the electrical island bus association table; finally, determine whether the electrical island is a live island or a dead island. A live island is an electrical island with a power supply or an external network incoming line, and current flows through its line, while a dead island does not contain a power supply, so no current flows through the line.

[0154] An electrical island is an area in a power system that is interconnected but isolated from other systems.

[0155] Taking the substation as the starting point, the substation of the interconnection line as the end point, the interconnection switch as the connection point, and the interconnection line connected to the interconnection switch starting from the interconnection switch, the optimized single-line diagram is reversely topologically constructed until the topology reaches the line substation, and a reverse topological multi-branch tree model is constructed;

[0156] For example, the substation node of the distribution network single-line diagram is used as the starting point, the substation of the interconnection line is used as the end point, and the interconnection switch is used as the connection point. The current line uses the forward topology to obtain the line topology model. The interconnection line connected to it takes the interconnection switch as the starting point and performs the reverse topology until the topology reaches the line substation. Fig.18 shown.

[0157] Based on the forward topology multi-tree model and the reverse topology multi-tree model, a first optimal single-line diagram is obtained.

[0158] For example, the overall topology model is abstracted into a tree structure, and abnormal nodes are marked. Dynamic layout is based on the overall topology model of the contact diagram, and the layout is performed from the root node of the tree structure. The entire line layout is completed using algorithms such as boundary detection and orthogonal layout. Based on the cached line model, starting from the substation of the current line model, the contact switch node is iteratively obtained. After the contact line topology is spliced ​​to the contact switch node, the topology model splicing of the entire contact line is obtained. Fig.19 shown.

[0159] Embodiment 7

[0160] refer to Figure 20-21 Based on the above embodiment, in this embodiment, the method further includes:

[0161] S1. Traverse the first optimal single-line diagram to obtain the first maximum line length and the main line corresponding to the first maximum line length; S2. Determine whether there is a branch line at the node on the main line, and if so, execute S3; if not, obtain the third coordinate of the node, end the execution, and obtain the second optimal single-line diagram based on the third coordinate; S3. Traverse the second maximum line length of the branch line and obtain the branch line direction of the branch line; S4. Obtain the fourth coordinate of the branch line node on the branch line, determine whether the third coordinate and the fourth coordinate intersect, and if so, execute S5; if not, cache the fourth coordinate to the cache list, layout the branch line based on the branch line direction, and return to S2; S5. Obtain the fifth coordinate intersecting with the branch line, and move the branch line based on the fifth coordinate and the branch line direction; S6. Return to S2, repeat the execution until the traversal ends, and obtain the second optimal single-line diagram.

[0162] The constructed contact line topology model adopts a dynamic layout strategy, starting from the first node of the topology model, and calculating the maximum line length of the authorized tree through depth-first traversal. The maximum length authorized tree is used as the trunk line, and dynamic layout is performed according to the topological order and equipment type to complete the contact line layout. The specific algorithm steps are as follows:

[0163] Step 1: Depth-first traversal calculates the maximum length of the entitled tree, takes the node with the maximum length as the main line of the line layout, and caches the coordinates of the branch line P(P1(x1,y1),P2(x2,y2));

[0164] Step 2: Check whether there is a branch line at the main line node. If so, execute step 3. Otherwise, directly calculate the node point;

[0165] Step 3: Depth-first traverse the branches to calculate the maximum length of the branches, and use the optimized orthogonal layout algorithm to determine the direction of the branches;

[0166] Step 4: Use vector cross multiplication method to determine whether the branch line coordinates intersect with the cached coordinates;

[0167] The calculation formula can be: (ay*bz-by*0,0*bx-bz*ax,ax*by-bx*ay)=(0,0,ax*by-bx*ay); where a and b represent nodes, and x, y and z represent the coordinates of the nodes on the xyz axis respectively.

[0168] Step 5: If a certain direction does not intersect, add the branch line coordinates to the cache line list, layout the branch line in this direction, iterate and execute step 2, and if they intersect, execute step 6;

[0169] Step 6: Calculate the cached branch line coordinates that the branch line intersects, and move the branch line according to the branch line direction. The movement method can be:

[0170] The branch line is arranged upward, the node X-axis coordinate value remains unchanged, and the branch line is moved to the minimum Y-axis coordinate value.

[0171] The branch line is laid out downward, the node X-axis coordinate value remains unchanged, and the branch line is moved to the maximum Y-axis coordinate value.

[0172] The branch line is laid out to the left, the Y-axis direction value of the node remains unchanged, and the branch line is moved to the minimum X-axis coordinate value.

[0173] The branch line layout is to the right, the node Y-axis direction value remains unchanged, and the branch line is moved to the maximum X-axis coordinate value;

[0174] Step 7: After the branch line is moved, iterate step 2 until the algorithm is completed.

[0175] like Fig. 20 As shown, after the layout of nodes such as P1-P8 is completed, before the layout of the PM node, the branch layout direction can be in direction 1 or direction 2, but the branch in direction 2 intersects with the P5 branch, then the PM branch direction is determined to be direction 1;

[0176] like Fig.21As shown, after the layout of nodes such as P1-P12 is completed, before the PM node is laid out, it is calculated whether the PM branch intersects with the cached branch. If the PM branch intersects with both the P5 branch and the P10 branch, the PM node is moved, and the branch nodes are laid out after the movement is completed.

[0177] According to the above-mentioned dynamic layout algorithm of the contact diagram, after the layout of the entire contact diagram is completed, the contact diagram node list after layout is counted and compared with the element node list obtained before the model file is parsed. If the former and latter lists are the same, the completed contact diagram will be displayed.

[0178] Embodiment 8

[0179] refer to Fig.21 Based on the above embodiment, in this embodiment, the method further includes:

[0180] A force-directed simulated annealing algorithm is used to initialize the first graph model based on the second optimal single-line diagram; based on the first graph model and the connecting switch, the connecting point between the two feeders is obtained, a solution is obtained based on the connecting point, and a solution space is constructed based on the solution; based on the solution space, a splicing objective function is calculated to obtain an objective function value; an energy splicing model is constructed, and based on the energy splicing model and the objective function value, it is determined whether the solution space accepts a new solution, and if so, the solution is updated based on the new solution, and if not, the solution is updated based on a preset probability; based on the updated solution, a third optimal single-line diagram is obtained.

[0181] The force-directed simulated annealing algorithm is used for dynamic layout. The algorithm can automatically identify the elements in the circuit diagram and intelligently adjust their positions to avoid overlapping problems. The application of the force-directed simulated annealing algorithm in the graph-to-model mapping technology improves the quality and efficiency of graph generation and solves the problems of overlapping graph elements and text overlap when mixed lines are connected. At the same time, the greedy strategy and random perturbation are combined to accept inferior solutions with a certain probability, thereby jumping out of the local optimal trap and realizing the search for the global optimal solution. In the process of graph generation, the simulated annealing algorithm can generate a new solution by adding random perturbations to the old solution, and accept the new solution according to certain rules to achieve the purpose of optimizing the splicing of graph-to-model connections.

[0182] The specific steps of the simulated annealing algorithm include: the simulated annealing algorithm is applied to the automatic splicing technology of the distribution network connection diagram, and the stability and reliability of the power grid are improved by optimizing the topological structure of the distribution network. The following is the process of the simulated annealing algorithm to realize the automatic drawing of the distribution network connection diagram:

[0183] (1) Graph model initialization: Set the initial topological nodes, contact node attenuation coefficients, graph model balance conditions, and initial values ​​of attribute parameters. At the same time, the original topological structure of the distribution network feeder is used as the initial solution;

[0184] (2) Constructing the solution space: Based on the original topological structure of the distribution network, the contact points between the two feeders are selected through the tie switch and merged into a new solution. When constructing the solution space, factors such as the connectivity, load balancing and reliability of the distribution network need to be considered. The optimization function is:

[0185] f:x 1 →R + ,x 1 ∈S;

[0186] Where f represents the optimization function, x 1 represents the solution, R + represents the set of positive real numbers, → represents belongs to, and S represents the set of solutions.

[0187] (3) Calculate the splicing objective function: Specifically evaluate the quality and requirements of each contact point. The objective function may include indicators such as the connectivity, load balancing, and reliability of the distribution network feeder model. At the same time, factors such as the security of the model splicing need to be considered. The following is the function for finding the solution to the splicing objective:

[0188]

[0189] Where P(x(0)→x′) represents the probability of accepting the new solution x′, x′ represents the new solution, x(0) represents the initial solution, f(x′) represents the function value of the new solution x′, f(x(0) represents the function value of the initial solution x(0), T 0 represents the initial temperature, and → represents the assignment.

[0190] Constructing the energy splicing model:

[0191]

[0192] Where E represents the energy model, r represents the electrostatic force constant between two nodes, and w i and w j Both represent the weight between two nodes.

[0193] (4) Determine whether to accept the new solution: In each iteration, by comparing the objective function value of the new solution and the current optimal solution, decide whether to accept the new solution and whether it meets the optimal solution of topological connection properties. If the new solution is better than the current optimal solution, then accept the new solution; otherwise, accept the new solution with a certain probability;

[0194] (5) Connection splicing: Analyze all distribution network graphs with connection relationships, and select feeder connection nodes with associated relationships. Through the intelligent combination algorithm of the front and back network topologies, a connection splicing graph model is formed. At the same time, the connection graph splicing is realized according to the optimal solution of the force-directed simulated annealing algorithm.

[0195] Although the preferred embodiments of the present invention 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 that fall within the scope of the present invention.

[0196] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for generating a single line diagram based on a PMS diagram model, characterized in that: The method comprises: Acquire a PMS graphic model file, wherein the PMS graphic model file includes an SVG graphic file and an XML model file; The PMS graphic model file is analyzed to obtain model information, wherein the model information includes device information, substation information, topology information and graphic element information, wherein the topology information includes topological relationship and connection relationship between devices, and the graphic element information includes graphic attributes, application attributes and interaction information; the model information is parsed and verified to obtain automatic verification rules; the PMS graphic model file is verified based on the automatic verification rules to obtain a single-line diagram.

2. The method for generating a single line diagram based on a PMS diagram model according to claim 1, characterized in that: The specific steps of obtaining the automatic verification rules include: Based on the device information and the substation information, the device nodes are hierarchically divided to obtain a hierarchical device node set; based on the element type, the graphic element information is hierarchically divided to obtain a graphic element layer set; the first device quantity and the second device quantity of the hierarchical device node set and the graphic element layer set are respectively obtained; device parameter information is obtained based on the device information; the device node verification rule is generated based on the first device quantity, the second device quantity and the device parameter information; the connection relationship verification rule is generated based on the connection relationship; the graph model topology verification rule is generated based on the topological relationship; the automatic verification rule is obtained based on the graph model topology verification rule, the device node verification rule and the connection relationship verification rule.

3. The method for generating a single line diagram based on a PMS diagram model according to claim 2, characterized in that: The automatic verification rules also include complex topology verification rules. The specific steps of obtaining the complex topology verification rules include: Based on the segmentation switch, the lines in the PMS model file are divided into several sections, each of the sections is traversed to obtain the traversal results, and the branch verification rules are obtained based on the traversal results; all the sections are spliced ​​to obtain the splicing results, and the topology structure verification rules are obtained based on the splicing results; based on the branch verification rules and the topology structure verification rules, the complex topology structure verification rules are obtained.

4. The method for generating a single line diagram based on a PMS diagram model according to claim 1, characterized in that: The method further comprises: Acquire first data of the single-line diagram, the first data including power system topology data, line parameters and standard rule information; construct a topological structure of the power system based on the power system topological data, and obtain a line path and a connection method of the line based on the topological structure and the line parameters; optimize the single-line diagram based on preset constraints, the line path and the connection method to obtain an optimized single-line diagram.

5. The method for generating a single line diagram based on a PMS diagram model according to claim 4, characterized in that: The specific steps to obtain an optimized single-line diagram include: A line spatial position layout is obtained based on the line path and the connection method, a collision detection is performed on the line spatial position layout to obtain a detection result, and the line spatial position layout is adjusted based on the detection result to obtain a one-dimensional collision model; component primitives of the single-line diagram are obtained, a first coordinate of the component primitive is obtained, a 2D model of the component primitive is constructed based on the first coordinate, a 2D spatial position layout is obtained based on the 2D model, and a distance between the 2D models is adjusted based on the 2D spatial position layout to obtain a two-dimensional collision model; based on the one-dimensional collision model and the two-dimensional collision model, the single-line diagram is optimized to obtain a first optimized single-line diagram, and the optimized single-line diagram is obtained based on the first optimized single-line diagram.

6. The method for generating a single line diagram based on a PMS diagram model according to claim 5, characterized in that: The specific steps of obtaining the optimized single-line diagram also include: Acquire the collision relationship of the graphic element model in the first optimized single-line diagram, initialize the node position of the first optimized node in the first optimized single-line diagram based on the collision relationship, and calculate the repulsion and attraction between the first optimized nodes based on the node position; iteratively adjust the node position based on the repulsion, the attraction and preset rules to obtain the second optimized single-line diagram, and obtain the optimized single-line diagram based on the second optimized single-line diagram.

7. The method for generating a single line diagram based on a PMS diagram model according to claim 6, characterized in that: The specific steps of obtaining the optimized single-line diagram also include: Obtain the node distance between the second optimized nodes in the second optimized single-line diagram, and construct an energy model based on the node distance; obtain the second data of the energy model, and clean the second data to obtain the third data; the second data includes line topology information, equipment ledger information, equipment asset information and line contact information; take the substation as the starting point and the line equipment as the node, and construct a single-line diagram multi-branch model based on the third data; traverse the single-line diagram multi-branch model to obtain fourth data, and the fourth data includes the maximum length of the right tree, the longest line node list, the maximum length line and the second coordinate of the maximum length line; obtain the line node of the single-line diagram multi-branch model, and obtain the child node of the line node number and node type; based on the number of child nodes, determine whether there is a branch line at the line node, and if so, obtain the first maximum length of the branch line and the node direction of the line node; if the node type is an overhead node, based on the node direction, the maximum length and the fourth data, orthogonalize the branch line to obtain a second branch line, and update the branch line to the second branch line; if the first node type is a cable line node, based on the hierarchical layout and the fourth data, process the branch line to obtain a third branch line, and update the branch line to the third branch line; obtain a third optimized single-line diagram based on the single-line diagram multi-branch number model, and obtain the optimized single-line diagram based on the third optimized single-line diagram.

8. The method for generating a single line diagram based on a PMS diagram model according to claim 7, characterized in that: The method further comprises: Starting from the power supply, the optimized single-line diagram is searched to obtain search data, and based on the search data, a number of buses are obtained based on closed bus switches and feeder switches; bus node associated data and bus branch associated data of the bus are obtained; the search data includes search nodes, tie switch information, node information connected to both ends of the tie switch, component information, branch information connected to the components, the first state of the tie switch and the second state of the branch, and the search node is marked; it is determined whether each of the buses is a valid bus, and if not, the bus is deleted; if so, based on the bus node associated The data and the bus branch associated data are used to merge the bus to obtain several electrical islands, and each electrical island is analyzed to obtain electrical island information; a forward topology multi-branch tree model is constructed based on the electrical island information and the bus; with the substation as the starting point, the substation of the interconnecting line as the end point, the interconnecting switch as the connection point, and the interconnecting line connected to the interconnecting switch taking the interconnecting switch as the starting point, the optimized single-line diagram is reversely topologically analyzed until the topology reaches the line substation, and a reverse topology multi-branch tree model is constructed; based on the forward topology multi-branch tree model and the reverse topology multi-branch tree model, the first optimal single-line diagram is obtained.

9. The method for generating a single line diagram based on a PMS diagram model according to claim 8, characterized in that: The method further comprises: S1. Traverse the first optimal single line diagram to obtain a first maximum line length and a trunk line corresponding to the first maximum line length; S2, determining whether there is a branch line at the node on the trunk line, and if so, executing S3; if not, obtaining the third coordinate of the node, and the execution ends, obtaining the second optimal single-line diagram based on the third coordinate; S3, traversing the second maximum line length of the branch line, and obtaining the branch line direction of the branch line; S4, obtaining the fourth coordinate of the branch node on the branch line, determining whether the third coordinate and the fourth coordinate intersect, if so, executing S5; if not, caching the fourth coordinate to a cache list, laying out the branch line based on the branch line direction, and returning to S2; S5, obtaining a fifth coordinate intersecting the branch line, and moving the branch line based on the fifth coordinate and the direction of the branch line; S6. Return to S2 and repeat the process until the traversal is completed to obtain the second optimal single-line diagram.

10. The method for generating a single line diagram based on a PMS diagram model according to claim 9, characterized in that: The method further comprises: Based on the second optimal single-line diagram, the first diagram model is initialized; based on the first diagram model and the connecting switch, the connecting point between the two feeders is obtained, the solution is obtained based on the connecting point, and the solution space is constructed based on the solution; based on the solution space, the splicing objective function is calculated to obtain the objective function value; an energy splicing model is constructed, and based on the energy splicing model and the objective function value, it is determined whether the solution space accepts a new solution, and if so, the solution is updated based on the new solution, and if not, the solution is updated based on the preset probability; based on the updated solution, a third optimal single-line diagram is obtained.