Method and system for automatically generating single line diagram of power distribution network
Through the hierarchical path determination method based on grid topological data, the problem of low efficiency of traditional manual drawing of single-line diagrams of distribution networks is solved, and the rapid and accurate generation of single-line diagrams of distribution networks is achieved, which improves the reliability and stability of grid operation.
Patent Information
- Application Number
- CN202411956303.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-28
- Publication Date
- 2025-04-22
AI Technical Summary
Traditional manual drawing of single-line diagrams of distribution networks is inefficient, and existing automation technologies also have problems with inefficiency.
Through the hierarchical path determination method based on grid topological data, the main line, first-level branch line and second-level branch line route paths are gradually determined to generate a single-line diagram of the distribution network.
It improves the drawing efficiency of single-line diagram of the distribution network, reduces the cumbersome manual sorting and layout process, enhances the accuracy and reliability of the diagram, and reduces the fault location and repair time.
Smart Images

Figure CN119863542A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of automatic layout of distribution network single-line diagrams, and more specifically, to an automatic generation method and system of distribution network single-line diagrams. Background Art
[0002] The single-line diagram of the distribution network is a graphical way to show the topological relationship and belonging relationship of the power equipment within the power supply range of a feeder. The single-line diagram of the distribution network can be used in various distribution network application systems such as production planning and real-time scheduling. In the power grid scheduling system, the topological description of the power equipment is related to the point (node), and the related power equipment includes switches, distribution transformers, poles, CT, PT, knife switches, etc.; the relationship between the equipment is connected by lines (line), and the related power equipment includes overhead lines, cables, etc., thus forming a diagram with node-line as the basic topological description.
[0003] The distribution network single-line diagram can also provide an intuitive display of the equipment connection and operating status in the power grid operation. The staff can use this function to conveniently manage, monitor and analyze relevant data. However, the traditional manual drawing of drawings is repetitive and inefficient; some existing simple distribution network single-line diagram generation technologies still have the problem of low efficiency. Summary of the invention
[0004] The purpose of the present disclosure is to provide a method and system for automatically generating a single-line diagram of a distribution network, so as to improve the efficiency of drawing the single-line diagram of the distribution network.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a method for automatically generating a single-line diagram of a power distribution network, comprising: Determine a plurality of connection relationship lines based on the power grid topology data, and determine a trunk line based on the plurality of connection relationship lines; the trunk line includes a plurality of main line nodes; Determine a primary branch line path corresponding to each main line node based on the main line; the primary branch line path includes a plurality of branch line nodes; determine a secondary branch line path corresponding to each branch line node based on the primary branch line path; A single-line diagram of a distribution network is generated based on the trunk line, the primary branch line path, and the secondary branch line path.
[0006] A second aspect of the embodiments of the present disclosure provides a system for automatically generating a single-line diagram of a power distribution network, comprising: A trunk line layout module, used to determine a plurality of connection relationship lines based on the power grid topology data, and determine a trunk line based on the plurality of connection relationship lines; the trunk line includes a plurality of main line nodes; A branch line layout module, used to determine the primary branch line path corresponding to each main line node based on the main line; the primary branch line path includes multiple branch line nodes; based on the primary branch line path, determine the secondary branch line path corresponding to each branch line node; A single-line diagram generating module is used to generate a single-line diagram of a distribution network based on the trunk line, the primary branch line path and the secondary branch line path.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned method for automatically generating a single-line diagram of a distribution network when executing the computer program.
[0008] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for automatically generating a single-line diagram of a distribution network are implemented.
[0009] The beneficial effect of the automatic generation method and system of a distribution network single-line diagram provided by the embodiment of the present disclosure is that: based on the power grid topology data, the main line and the branch line paths at all levels are sequentially determined to generate the distribution network single-line diagram, which can quickly sort out the power grid structure, avoid the tedious manual sorting and layout process, and reduce the drawing time. And the process operation is standardized and can be reused, which effectively improves the drawing efficiency of the distribution network single-line diagram.
[0010] This hierarchical method of determining line paths is conducive to improving the accuracy of single-line diagram generation and reducing problems such as line connection errors or omissions, thereby providing a reliable basis for distribution network troubleshooting, effectively shortening fault location and repair time, and improving the reliability and stability of power grid operation.
[0011] The disclosed embodiment has good scalability. When faced with distribution network upgrades or new lines and equipment, new elements can be easily integrated into the single-line diagram generation process, reducing the difficulty of updating and maintaining the single-line diagram, and facilitating long-term planning and efficient management of the distribution network. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1A schematic diagram of a flow chart of a method for automatically generating a single-line diagram of a distribution network provided in an embodiment of the present disclosure; Figure 2 A schematic diagram of connection relationship circuits provided for an embodiment of the present disclosure; Figure 3 A schematic diagram of a branch line bus type (antenna) layout provided in an embodiment of the present disclosure; Figure 4 A schematic diagram of a branch line star (radiation) layout provided in an embodiment of the present disclosure; Figure 5 A schematic diagram of a trunk line layout provided in an embodiment of the present disclosure; Figure 6 A schematic diagram of a branch line layout provided in an embodiment of the present disclosure; Figure 7 A schematic diagram of a branch line bus layout provided by another embodiment of the present disclosure; Figure 8 A structural block diagram of a system for automatically generating a single-line diagram of a distribution network provided by an embodiment of the present disclosure; Fig. 9 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0014] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0015] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0016] Please refer to Figure 1 , Figure 1 A schematic flow chart of a method for automatically generating a single-line diagram of a distribution network provided in an embodiment of the present disclosure, the method may include S101 to S103.
[0017] S101: Determine a plurality of connection relationship lines based on power grid topology data, and determine a trunk line based on the plurality of connection relationship lines. The trunk line includes a plurality of main line nodes.
[0018] In this embodiment, multiple connection relationship lines are determined based on the power grid topology data, including: A plurality of nodes and a first identification of each node are determined based on the power grid topology data. The first identification includes a node index and a node access status.
[0019] A connection path corresponding to each node is determined based on the first identifier of each node.
[0020] A plurality of connection relationship lines are determined based on the connection path corresponding to each node.
[0021] In this embodiment, each node represents that there is a device at the node. The power grid topology data is a data description of the physical connection relationship between the various electrical components in the distribution network. The power grid topology data may include the transmission path of electric energy in the power grid and the way in which the various components are connected to each other, presenting the overall architecture of the power grid. Multiple main line nodes constitute the trunk line, and each node represents a key device or line branch point connected to the trunk line. The connection relationship line is a line concept abstracted from the power grid topology data, which represents the direct connection path between the various electrical components. The node index is a serial number that uniquely identifies the node, and the node access status can include visited and unvisited.
[0022] In this embodiment, determining a plurality of connection relationship lines based on the power grid topology data may include: The device information and the connection relationship information between the devices are determined based on the power grid topology data.
[0023] The line path is calculated based on the device information and the connection relationship information between the devices to obtain the connection relationship line with the target device as the starting point.
[0024] In this embodiment, the line path calculation process may include: Line path concept: all connection paths connecting the current node to the end node (i.e., the node without subsequent connection points).
[0025] The line path information of each node is determined based on the depth-first traversal algorithm, and data processing is performed on the line path information of each node.
[0026] The connection relationship line of the node is determined based on the processed line path information.
[0027] In this embodiment, data processing of line path information of each node may include: The line path information of each node is merged, sorted and short lines are removed to obtain the processed line path information.
[0028] Exemplarily, determining the line path information of each node based on the depth-first traversal algorithm may include: treating the branches and other nodes contained in each node as a tree with the node as the root, and searching for all line paths from its root to the end node in a depth-first traversal manner, that is: Select a starting node as the current node and mark the current node as visited; Traverse all unvisited adjacent nodes of the current node; For each unvisited adjacent node, recursively call the depth-first traversal algorithm and use the node as the new current node; When all adjacent nodes have been visited, return to the previous layer for recursive calls.
[0029] After all the line paths are obtained according to the above method, all the line paths are sorted according to the path length. According to the connection relationship information contained in the line path, the corresponding short lines are removed and sorted again, and the connection path of each node is calculated. The main line and the end point branch are determined based on the connection paths of all nodes. Among them, the short line refers to the path with a shorter length (less than the preset length) in the line path, which is usually the middle part of a line path, that is, the middle part of a topological data, which needs to be removed during statistics.
[0030] For example, Figure 2 As shown, a device of a specified type can be used as a starting point to calculate all the connection relationship lines of the starting point. For example, the first connection relationship line includes node A, node B, node C, node D, etc., the second connection relationship line includes node A1, node B1, node C1, and the third connection relationship line includes node A1 and node B1.
[0031] S102: Determine the primary branch line path corresponding to each main line node based on the main line. The primary branch line path includes multiple branch line nodes. Determine the secondary branch line path corresponding to each branch line node based on the primary branch line path.
[0032] In this embodiment, determining the primary branch line path corresponding to each main line node based on the main line may include: If the position of the main line node in the main trunk line is an odd number, the primary branch line path corresponding to the main line node is laid out upward based on the main line node.
[0033] If the position of the main line node in the main trunk line is an even number, the primary branch line path corresponding to the main line node is laid out downward based on the main line node.
[0034] Exemplarily, the main line nodes on the trunk line are circulated starting from the starting node, and the first-level branch line path of the node device is calculated with the retrieved node device as the starting point in turn. The coordinate positions of the node devices on the first-level branch line path are set in turn by laying out the odd-numbered branches upward and the even-numbered branches downward. Specifically, the layout of the first-level branch line path is completed by drawing it in a vertical branch line style.
[0035] In this embodiment, determining the secondary branch line path corresponding to each branch node based on the primary branch line path may include: If the position of the branch node in the primary branch line path is an odd number, the secondary branch line path corresponding to the branch node is laid out to the right based on the branch node.
[0036] If the position of the branch node in the primary branch line path is an even number, the secondary branch line path corresponding to the branch node is laid out to the left based on the branch node.
[0037] Exemplarily, the branch nodes in the primary branch line path are circulated starting from the starting device in the branch node to calculate the secondary branch line path. Specifically, the coordinate positions of the branch nodes in the primary branch line path are set in sequence by arranging the odd bits to the right and the even bits to the left. This is done until all node devices complete the position calculation and the branch line layout is completed.
[0038] S103: Generate a single-line diagram of the distribution network based on the trunk line, the primary branch line path, and the secondary branch line path.
[0039] In this embodiment, a distribution network single-line diagram is generated based on the trunk line, the primary branch line path and the secondary branch line path, including: The first single line diagram is formed based on the trunk line, the primary branch line path and the secondary branch line path. The first single line diagram includes a plurality of first lines.
[0040] The line crossing information is determined based on the endpoint coordinates of any two first lines in the first single-line diagram.
[0041] The line straddling information is determined based on first vectors corresponding to any two first lines in the first single-line diagram.
[0042] The first single-line diagram is adjusted based on the line crossing information and the line straddling information to obtain a distribution network single-line diagram.
[0043] In this embodiment, the first single-line diagram is first constructed based on the trunk line, the first-level branch line path, and the second-level branch line path. At this time, the first single-line diagram is a preliminary single-line diagram obtained by simply combining the main line and the direct line. There may still be line crossing problems and line overlapping problems in the first single-line diagram. Considering these problems, it is necessary to optimize the layout of the first single-line diagram. Specifically, the device position and connection position in the first single-line diagram can be retrieved, the line crossing and the crossing between the line and the device can be determined, and the line crossing layout processing can be performed to optimize the layout result.
[0044] Exemplary, line crossing problem processing: through the rapid exclusion test method and the straddle test method, the line crossing and line crossing conditions of the first line are calculated, and the problem can be processed by increasing the line offset or increasing the line crossing and line crossing points.
[0045] Line offset calculation: calculate the branch line occupancy data, set the x-axis data for each node and compare it with the x-axis data of the main line starting point. When it is greater than the x value corresponding to the main line starting point, increase the main line node offset and reposition it during the subsequent main line node and line layout.
[0046] Exemplarily, determining the line intersection information based on the endpoint coordinates of any two first lines in the first single-line diagram may include: a fast exclusion experiment: determining whether the projections of the starting point and the end point of the first line on the x-axis and y-axis coordinates overlap, and if there is no overlap, the lines do not intersect. Comparing the endpoint coordinates of any two first lines, if the following condition constraints are met, it is considered that the two first lines do not intersect, thereby eliminating the possibility of line intersection.
[0047] The constraints are:
[0048]
[0049]
[0050]
[0051] Here, let the rectangle with line segment P1P2 as the diagonal be R, let the rectangle with line segment Q1Q2 as the diagonal be T, represents the x value of the left side of rectangle R, represents the x value of the right side of rectangle T, represents the x value of the left side of rectangle T, represents the x value of the right side of rectangle R, Represents the upper y value of rectangle R, Represents the y value below the rectangle T, Represents the upper y value of rectangle T, Indicates the bottom y value of rectangle R.
[0052] Exemplarily, determining the line straddling information based on the first vectors corresponding to any two first lines in the first single-line diagram may include: determining the line straddling information of any two first lines in the first single-line diagram based on a straddling calculation formula. The straddling calculation formula is based on a cross multiplication operation of vectors, and its basic idea is: if one line crosses over another line, then the two endpoints of the line are distributed on both sides of the crossed line segment.
[0053] The calculation formula for straddle is:
[0054] Among them, × represents vector cross product, and ⋅ represents vector dot product. The geometric meaning of the straddle calculation formula is that if the directions of the cross product results of two vectors are consistent (that is, the dot product results of the two vectors are greater than 0), then the two vectors are located on both sides of the same straight line. Therefore, when the above straddle calculation formula is established, it can be determined that the first line P1P2 intersects with the first line Q1Q2.
[0055] like Figure 3 As shown, the line offset problem is handled by calculating the layout positions of all branch line nodes in the branch line section, calculating the rectangular frame range occupied by a single group of branches, looping the main line nodes on the main line, setting the position of each main line node to extend in the horizontal direction (i.e., left and right direction), and processing by increasing the spacing between each group of branches. Among them, a single group of branches refers to the set of all branches starting from a certain node on the main line. The calculation method of the rectangular frame: loop all nodes of the group of branches to obtain the position, take the leftmost value minX, the rightmost value maxX, the top value minY, and the bottom value maxY of all nodes, and combine them into a rectangular frame with (minX, minY) and (maxX, maxY) as endpoints.
[0056] From the above, it can be concluded that the generation of the distribution network single-line diagram by sequentially determining the main line and branch line paths at all levels based on the power grid topology data can quickly sort out the power grid structure, avoid the tedious manual sorting and layout process, and reduce the drawing time. Moreover, the process operation is standardized and can be reused, which effectively improves the drawing efficiency of the distribution network single-line diagram.
[0057] The hierarchical method of determining line paths and determining connection relationship lines and trunk lines through a depth-first traversal algorithm based on power grid topology data can systematically sort out the power grid structure, which is conducive to improving the accuracy and completeness of single-line diagram generation, reducing problems such as line connection errors or omissions, thereby providing a reliable basis for distribution network fault detection, effectively shortening fault location and repair time, and improving the reliability and stability of power grid operation.
[0058] The first-level branch lines and the second-level branch lines are laid out based on the parity of the main line nodes and branch line nodes, making the branch line layout regular and orderly, avoiding confusion and overlap, improving the aesthetics and readability of the single-line diagram, and making it easier for operation and maintenance personnel to clearly identify the line direction and equipment connection relationship, which helps to quickly locate fault points and perform daily operation and maintenance operations.
[0059] The intersection and straddle information judgment and optimization processing are carried out by using the line endpoint coordinates and vectors, which effectively solves the layout problems such as line intersection and overlap, and improves the quality of the single-line diagram. Accurate single-line diagrams can serve as a powerful basis for distribution network planning, transformation and dispatching operations, ensuring the safe and efficient operation of the distribution network and improving the reliability and stability of power supply.
[0060] The disclosed embodiment has good scalability. When faced with distribution network upgrades or new lines and equipment, new elements can be easily integrated into the single-line diagram generation process, reducing the difficulty of updating and maintaining the single-line diagram, and facilitating long-term planning and efficient management of the distribution network.
[0061] In one embodiment of the present disclosure, determining a trunk line based on a plurality of connection relationship lines includes: Data filtering is performed on multiple connection relationship lines to obtain multiple target connection relationship lines.
[0062] A trunk line is determined based on the path lengths of a plurality of target connection relationship lines.
[0063] In this embodiment, filtering data on the multiple connection relationship lines may include filtering duplicate data on the multiple connection relationship lines to obtain multiple target connection relationship lines that do not contain duplicate data.
[0064] Determining a trunk line based on the path lengths of a plurality of target connection relationship lines may include: Based on multiple target connection relationship lines, a path with the largest path length is selected as a trunk line.
[0065] In this embodiment, after the trunk line is determined, the coordinate positions of the nodes (equipment) on the trunk line on the drawing are set in sequence, and the trunk line layout is completed based on the horizontal straight line style.
[0066] In this embodiment, the path lengths of multiple target connection relationship lines can be calculated based on a path length calculation formula, and the path length calculation formula is:
[0067] Where: L(pi) represents the path length of the target connection relationship line pi, d(vj, vj+1) represents the distance between adjacent nodes, Represents a node.
[0068] In this embodiment, selecting a path with the largest path length as a trunk line based on multiple target connection relationship lines may include:
[0069] in: represents the path with the largest path length, Indicates multiple target connection relationship lines.
[0070] This embodiment can effectively remove duplicate data interference and accurately locate the main line by filtering the data of the connection relationship lines and determining the main line based on the path length, so as to facilitate the subsequent reasonable layout of node coordinates and drawing of the main line layout, improve the accuracy and efficiency of line planning and drawing, and optimize the overall layout process.
[0071] In one embodiment of the present disclosure, determining a primary branch line path corresponding to each main line node based on the main line includes: A plurality of first branch lines corresponding to each main line node is determined based on the main trunk line.
[0072] If the number of the plurality of first branch lines is less than or equal to the first number, the plurality of first branch lines are laid out and drawn based on the cross-shaped positions to obtain a primary branch line path corresponding to each main line node.
[0073] If the number of the plurality of first branch lines is greater than the first number and less than or equal to the second number, the plurality of first branch lines are laid out and drawn based on unilateral connection of the lines to obtain a primary branch line path corresponding to each main line node.
[0074] If the number of the plurality of first branch lines is greater than the second number, the plurality of first branch lines are laid out and drawn based on the bilateral connection of the lines to obtain a primary branch line path corresponding to each main line node.
[0075] like Figure 3 As shown, in this embodiment, a branch bus type (antenna) layout method is provided to efficiently layout the branch line. The branch bus type (antenna) layout is a special layout method used to deal with too many branches in a single node. Specifically, the position and length of the hanging wire (bus) are calculated according to the number of branches, so that the branch node connection lines are scattered. According to the drawing aesthetic design, if there are less than 3 branch nodes, the "M" position layout can be used. If there are 3-6 branch nodes, the line single-side hanging layout can be used. If there are more than 6 branch nodes, the line double-side hanging layout can be used. Figure 3 This is an example of a single-line diagram that uses the branch line bus type (antenna) layout method, in which the distribution transformer is a type of equipment.
[0076] Exemplarily, the layout process is as follows: Calculate the number of branches connecting a single node, set the first number to 3, and the second number to 6. If the number of branches is less than 3, use the "M" position layout; if the number of branches is greater than 3 and less than or equal to 6, use the line single-side hanging layout; if the number of branches is greater than 6, use the line double-side hanging layout.
[0077] Among them, the "M" position layout is drawn: based on the connection direction of the current node as the drawing direction, increase the preset node spacing, and calculate the final position information. If the direction has been occupied by other nodes (that is, a device has already used the position information of this angle), use a 45-degree clockwise rotation and increase the preset distance between nodes to calculate the final position information.
[0078] Line unilateral hanging layout drawing: count the number of branches connected to the current node, determine the length of the line required for hanging, and calculate the line position information; loop all branch devices connected to the current node, starting from the center point of the line, increase the node preset spacing to the starting point of the line to layout the first connection node, increase the device preset spacing of 2 times to the end point of the line to layout the second connection device, and arrange them in sequence. Specifically, odd-numbered devices are closer to the starting point of the line, and even-numbered devices are closer to the end point of the line. The layout sequence number is the moving distance.
[0079] The node coordinate position calculation formula is as follows:
[0080]
[0081] Among them, x0 and y0 represent the initial position coordinates of the node, that is, the position of the starting node of the branch line, and index is the order of the mounted devices. The index is used to calculate the parity by bitwise AND operation to determine whether to move forward or backward. It is a rounding up function, and x1 and y1 represent the new position coordinates.
[0082] pass Get the distance between the attachment position and the starting point. This product is the spacing vector, which is added to the initial position to calculate the new position x1, y1.
[0083] Line bilateral hooking layout drawing: count the number of branches connected to the current node, determine the line length required for hooking, and calculate the line position information; loop the node branch equipment, take the center point of the line as the starting point, increase the preset spacing of the equipment to the starting point of the line to layout the first and second connected equipment, increase the preset spacing of the equipment to the end point of the line by 2 times to layout the third and fourth connected equipment, and arrange them in sequence, that is, the odd-numbered equipment is close to the starting point of the line, and the even-numbered equipment is close to the end point of the line. The layout sequence number (divided by 2 and rounded up) is the moving distance. The sequence number modulo 4, the result is 0 or 1, a group of equipment is arranged facing each other; the sequence number modulo 4, the result is 2 or 3, another group of equipment is arranged facing each other.
[0084] The node coordinate position calculation formula is as follows:
[0085]
[0086] Among them, x2 and y2 represent the initial position coordinates of the node, that is, the position of the starting node of the branch line. Index1 is the order of the mounted devices. Use index1 to calculate the parity of the node by bitwise AND operation to determine the x-axis direction. Use index1 and 4 modulus division to group again and determine the y-axis direction. Round up to get the distance between the attachment position and the starting point. This product is the spacing vector, which is added to the initial position to calculate the new position x3, y3.
[0087] In this embodiment, determining the primary branch line path corresponding to each main line node based on the main line includes: A plurality of second branch lines corresponding to each main line node is determined based on the main trunk line.
[0088] If the number of the plurality of second branch lines is less than or equal to the third number, the plurality of second branch lines are laid out and drawn based on the cross-shaped positions to obtain a primary branch line path corresponding to each main line node.
[0089] If the number of the plurality of second branch lines is greater than the third number, the plurality of second branch lines are laid out and drawn based on star radiation to obtain a primary branch line path corresponding to each main line node.
[0090] like Figure 4 As shown, in this embodiment, a branch star (radial) layout method is provided to efficiently layout branch lines. The branch star (radial) layout is a special layout method used to deal with too many branches in a single node. Specifically, the rotation angle of each branch is calculated based on the number of branches, and the overlapping of branch positions is considered. Multiple branches are distributed based on the clock direction. According to the aesthetic design of the drawing, if there are less than 3 branch nodes, the "M" position layout can be used. If there are more than 3 branch nodes, they are arranged clockwise with the connected device (that is, the current node) as the center.
[0091] For example, the process of branch line star (radiation) layout is as follows: Calculate the number of branches connected to the current node, and set the third number to 3. If there are less than 3 branch nodes, you can use the "M" shape layout. If there are more than 3 nodes, arrange them clockwise with the connected device (that is, the current node) as the center.
[0092] "M" position layout drawing: Use the connection direction of the current device as the drawing direction, increase the preset distance between devices, and calculate the position information. If the direction has been occupied by other devices (that is, a device has already used the position information of this angle), use a 45-degree clockwise rotation direction and increase the preset distance between devices to calculate the position information.
[0093] Clockwise (radial) arrangement: Set the initial direction angle to 0 degrees, calculate the rotation angle of each branch according to the number of connected branch nodes, and arrange the nodes by increasing the rotation angle in a clockwise direction with the connected node as the center. The layout position of the nodes needs to be calculated in different quadrants of the rectangular coordinate system. The calculation formula is as follows: Quadrant 1:
[0094]
[0095] Quadrant II:
[0096]
[0097] Quadrant III:
[0098]
[0099] Quadrant 4:
[0100]
[0101] Among them, (x4, y4), (x6, y6), (x8, y8), and (x10, y10) represent the initial position coordinates of the first quadrant, the second quadrant, the third quadrant, and the fourth quadrant, respectively, that is, the starting node position of the branch line.
[0102] Distance represents the device spacing. The offset angle of each device is calculated. In the four quadrants of the coordinate axis, the sine and cosine functions are used to calculate the vector spacing on the x and y axes respectively, and added to the initial position to calculate the new positions of the first, second, third and fourth quadrants (x5, y5), (x7, y7), (x9, y9), and (x11, y11).
[0103] Exemplarily, the distribution network topology data is obtained: the JSON file containing the equipment information and topological relationship data is parsed, and the graphic metadata including the starting point equipment, tower equipment, transformer equipment and line connection are split out for subsequent layout calculation.
[0104] like Figure 5 As shown, calculate all device connection paths starting from the starting device (corresponding to the starting node), take the longest line as the main line, refer to the power drawing specifications, take the starting device as the center point, and lay out the main line to the right.
[0105] like Figure 6 As shown, the main line nodes on the main line are circulated in sequence, and the device connection path starting from the main line node is calculated, and the branch lines are laid out with odd-numbered bits upward and even-numbered bits downward.
[0106] like Figure 7 As shown, branch bus type (antenna) layout: when the number of device connection paths (i.e. branch lines) of a node is more than 3, that is, when there are more than 3 connected devices, a bus type layout can be used. With the current node as the center, a line segment is drawn as the bus, and the connected devices are arranged in a unidirectional or bidirectional manner.
[0107] like Figure 4 As shown, branch star (radial) layout: When a node has more than 3 device connection paths (i.e. branch lines), that is, more than 3 mounted devices, a star layout can also be used, with the current node as the center and the mounted devices evenly distributed in a clockwise direction.
[0108] After the layout result is processed by cross-line drawing and line offset, the corresponding Scalable Vector Graphics (SVG) code is converted to generate an SVG file for drawing by the front-end graphic component. SVG is an XML application that can represent graphic information in a concise and portable form. The advantages of SVG are: scalability, can be enlarged without reducing image quality, can be printed with high quality at any resolution, text is optional and searchable, etc., which can easily display the location and connection relationship of power grid equipment.
[0109] This embodiment determines the path of the first-level branch line corresponding to the main line node through a variety of methods, and adopts layout methods such as M-shaped position, single-side line hanging, double-side line hanging and star radiation according to the number of branches. It can effectively deal with the situation where there are too many branches in a single node, so that the branch node connection lines are distributed. It not only takes into account the aesthetics of the drawing, but also ensures the scientificity and accuracy of the layout through accurate node coordinate position calculation formulas, improves the rationality and efficiency of the line layout, reduces interference and overlap between lines, helps to improve the stability and maintainability of the overall line system, and optimizes the network architecture design and planning process.
[0110] In one embodiment of the present disclosure, determining a plurality of connection relationship lines based on power grid topology data includes: The device information and device connection relationship information are determined based on the power grid topology data.
[0111] Node attribute data is determined based on the device information.
[0112] Node topology association data is determined based on device connection relationship information.
[0113] A plurality of connection relationship lines are determined based on the node attribute data and the node topology association data.
[0114] For example, the layout of the single-line diagram of the distribution network needs to be based on the topological structure relationship of the distribution network equipment. In order to facilitate data normalization and data analysis and processing, a data specification definition can be formulated. The power grid data specification definition can include a graphic element type definition and a graphic specification definition.
[0115] As shown in Table 1, Table 1 is the definition of the graphic element standard.
[0116] Table 1 Definition of graphic element specifications
[0117] Graphic specification definition: Data is divided into device information and device connection relationship information. Device information can include device label information and attribute information, such as type, associated device information, number, name and other extended information. Device connection relationship information is used to identify the connection relationship between devices. Device connection relationship information is also node topology association data, which can include line label information and attribute information, such as starting node information, end node information and other business extension information.
[0118] This embodiment clearly distinguishes between device information and device connection relationship information, which is conducive to the refined management and efficient use of data, makes the data processing process clearer, improves the accuracy and speed of data analysis, and thus provides a reliable data basis for the generation of single-line diagrams. Formulating data specification definitions realizes the standardization of data, facilitates the unified processing and analysis of data, and reduces compatibility issues caused by differences in data formats when data is exchanged between different departments or systems, thereby improving versatility and scalability.
[0119] Corresponding to the above embodiment, a method for automatically generating a single-line diagram of a distribution network is provided. Figure 8 This is a structural block diagram of a system for automatically generating a single-line diagram of a power distribution network provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 8 The automatic generation system 20 of the single-line diagram of the distribution network includes: a trunk line layout module 21, a branch line layout module 22 and a single-line diagram generation module 23.
[0120] The trunk line layout module 21 is used to determine a plurality of connection relationship lines based on the power grid topology data, and determine the trunk line based on the plurality of connection relationship lines. The trunk line includes a plurality of main line nodes.
[0121] The branch line layout module 22 is used to determine the primary branch line path corresponding to each main line node based on the main line. The primary branch line path includes multiple branch line nodes. Based on the primary branch line path, the secondary branch line path corresponding to each branch line node is determined.
[0122] The single-line diagram generating module 23 is used to generate a single-line diagram of the distribution network based on the trunk line, the primary branch line path and the secondary branch line path.
[0123] In one embodiment of the present disclosure, the trunk line layout module 21 is specifically used to determine multiple nodes and a first identifier of each node based on the power grid topology data. The first identifier includes a node index and a node access status.
[0124] A connection path corresponding to each node is determined based on the first identifier of each node.
[0125] A plurality of connection relationship lines are determined based on the connection path corresponding to each node.
[0126] In an embodiment of the present disclosure, the trunk line layout module 21 is further configured to filter data of a plurality of connection relationship lines to obtain a plurality of target connection relationship lines.
[0127] A trunk line is determined based on the path lengths of a plurality of target connection relationship lines.
[0128] In one embodiment of the present disclosure, the single-line diagram generation module 23 is specifically configured to form a first single-line diagram based on the trunk line, the primary branch line path and the secondary branch line path. The first single-line diagram includes a plurality of first lines.
[0129] The line crossing information is determined based on the endpoint coordinates of any two first lines in the first single-line diagram.
[0130] The line straddling information is determined based on first vectors corresponding to any two first lines in the first single-line diagram.
[0131] The first single-line diagram is adjusted based on the line crossing information and the line straddling information to obtain a distribution network single-line diagram.
[0132] In one embodiment of the present disclosure, the branch line layout module 22 is specifically configured to determine a plurality of first branch line lines corresponding to each main line node based on the main line line.
[0133] If the number of the plurality of first branch lines is less than or equal to the first number, the plurality of first branch lines are laid out and drawn based on the cross-shaped positions to obtain a primary branch line path corresponding to each main line node.
[0134] If the number of the plurality of first branch lines is greater than the first number and less than or equal to the second number, the plurality of first branch lines are laid out and drawn based on unilateral connection of the lines to obtain a primary branch line path corresponding to each main line node.
[0135] If the number of the plurality of first branch lines is greater than the second number, the plurality of first branch lines are laid out and drawn based on the bilateral connection of the lines to obtain a primary branch line path corresponding to each main line node.
[0136] In an embodiment of the present disclosure, the branch line layout module 22 is further configured to determine a plurality of second branch line routes corresponding to each main line node based on the main line route.
[0137] If the number of the plurality of second branch lines is less than or equal to the third number, the plurality of second branch lines are laid out and drawn based on the cross-shaped positions to obtain a primary branch line path corresponding to each main line node.
[0138] If the number of the plurality of second branch lines is greater than the third number, the plurality of second branch lines are laid out and drawn based on star radiation to obtain a primary branch line path corresponding to each main line node.
[0139] In an embodiment of the present disclosure, the trunk line layout module 21 is further configured to determine device information and device connection relationship information based on power grid topology data.
[0140] Node attribute data is determined based on the device information.
[0141] Node topology association data is determined based on device connection relationship information.
[0142] A plurality of connection relationship lines are determined based on the node attribute data and the node topology association data.
[0143] See also Fig. 9 , Fig. 9 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Fig. 9 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of the modules in the above-mentioned system embodiments, such as Figure 8 The functions of modules 21 to 23 are shown.
[0144] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0145] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
[0146] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0147] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of a method for automatically generating a single-line diagram of a distribution network provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device 300 described in the embodiments of the present disclosure, which will not be repeated here.
[0148] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0149] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0150] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0152] In the several embodiments provided in the present application, it should be understood that the disclosed electronic device and method can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.
[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.
[0154] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0155] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for automatically generating a single-line diagram of a distribution network, characterized in that: include: Determine a plurality of connection relationship lines based on the power grid topology data, and determine a trunk line based on the plurality of connection relationship lines; The trunk line includes a plurality of trunk nodes; Determine the primary branch line path corresponding to each main line node based on the main line route; The primary branch line path includes a plurality of branch nodes; Determine a secondary branch line path corresponding to each branch line node based on the primary branch line path; A single-line diagram of a distribution network is generated based on the trunk line, the primary branch line path, and the secondary branch line path.
2. The method for automatically generating a single-line diagram of a power distribution network according to claim 1, characterized in that: The determining of a plurality of connection relationship lines based on the power grid topology data comprises: Determine a plurality of nodes and a first identification of each node based on the power grid topology data; the first identification includes a node index and a node access status; Determine a connection path corresponding to each node based on the first identifier of each node; A plurality of connection relationship lines are determined based on the connection path corresponding to each node.
3. The method for automatically generating a single-line diagram of a power distribution network according to claim 1, characterized in that: The determining of the trunk line based on the multiple connection relationship lines includes: Performing data filtering on the multiple connection relationship lines to obtain multiple target connection relationship lines; A trunk line is determined based on the path lengths of a plurality of target connection relationship lines.
4. The method for automatically generating a single-line diagram of a power distribution network according to claim 1, characterized in that: The generating of a single-line diagram of a distribution network based on the trunk line, the primary branch line path and the secondary branch line path comprises: A first single line diagram is formed based on the trunk line, the primary branch line path and the secondary branch line path; the first single line diagram includes a plurality of first lines; Determine line crossing information based on the endpoint coordinates of any two first lines in the first single-line diagram; Determine line straddling information based on first vectors corresponding to any two first lines in the first single-line diagram; The first single-line diagram is adjusted based on the line crossing information and the line straddling information to obtain a distribution network single-line diagram.
5. The method for automatically generating a single-line diagram of a power distribution network according to claim 1, characterized in that: The determining, based on the trunk line, a primary branch line path corresponding to each main line node comprises: Determine a plurality of first branch lines corresponding to each main line node based on the main line; If the number of the plurality of first branch lines is less than or equal to the first number, the plurality of first branch lines are laid out and drawn based on the cross-shaped positions to obtain a primary branch line path corresponding to each main line node; If the number of the plurality of first branch lines is greater than the first number and less than or equal to the second number, the plurality of first branch lines are laid out and drawn based on line unilateral attachment to obtain a primary branch line path corresponding to each main line node; If the number of the plurality of first branch lines is greater than the second number, the plurality of first branch lines are laid out and drawn based on the bilateral connection of the lines to obtain a primary branch line path corresponding to each main line node.
6. The method for automatically generating a single-line diagram of a power distribution network according to claim 1, characterized in that: The determining, based on the trunk line, a primary branch line path corresponding to each main line node comprises: Determine a plurality of second branch lines corresponding to each main line node based on the main line; If the number of the plurality of second branch lines is less than or equal to the third number, the plurality of second branch lines are laid out and drawn based on the cross-shaped positions to obtain a primary branch line path corresponding to each main line node; If the number of the plurality of second branch lines is greater than the third number, the plurality of second branch lines are laid out and drawn based on star radiation to obtain a primary branch line path corresponding to each main line node.
7. The method for automatically generating a single-line diagram of a power distribution network according to claim 1, characterized in that: The determining of a plurality of connection relationship lines based on the power grid topology data comprises: Determine device information and device connection relationship information based on power grid topology data; Determine node attribute data based on the device information; Determine node topology association data based on the device connection relationship information; A plurality of connection relationship lines are determined based on the node attribute data and the node topology association data.
8. A system for automatically generating a single-line diagram of a distribution network, characterized in that: include: A trunk line layout module, used to determine a plurality of connection relationship lines based on the power grid topology data, and determine a trunk line based on the plurality of connection relationship lines; The trunk line includes a plurality of trunk nodes; A branch line layout module, used to determine the primary branch line path corresponding to each main line node based on the main line route; The primary branch line path includes a plurality of branch nodes; Determine a secondary branch line path corresponding to each branch line node based on the primary branch line path; A single-line diagram generating module is used to generate a single-line diagram of a distribution network based on the trunk line, the primary branch line path and the secondary branch line path.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method for automatically drawing fault studying and judging topological graph of power distribution network
CN121051917A
A method for automatically drawing a fault analysis topology graph of a power distribution network
CN121051917B