Method and system for generating incremental diagram of power transmission line diagram for novel power system
By constructing a tree-structured mapping and recursive coordinate layout for power system equipment, the problem of automated mapping of incremental equipment in transmission line diagrams is solved, improving the readability and practicality of the drawings, and making it suitable for power grid expansion in new power systems.
Patent Information
- Application Number
- CN202510874287.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-31
AI Technical Summary
Existing technologies cannot adapt to scenarios where multiple incremental devices need to be newly built under the same equipment when generating power transmission line diagrams, resulting in overlapping device icons or chaotic layout, which affects the readability and usability of the drawings.
By constructing a tree structure mapping of power system equipment, identifying connection relationships, calculating equipment coordinates recursively, determining the main path by combining weight calculations, and adjusting through differentiated layout directions and overlap detection, the automated mapping of incremental equipment is achieved.
It enables automated and intelligent mapping of incremental equipment, improves the readability and engineering practicality of drawings, ensures the accuracy of topology and space utilization, and is suitable for power grid expansion scenarios in complex networks.
Smart Images

Figure CN120874291A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system technology, and in particular relates to a method and system for generating incremental transmission line diagrams for new power systems. Background Technology
[0002] With the intensification of global climate change, reducing greenhouse gas emissions and promoting energy structure transformation have become an international consensus. my country has proposed a "dual-carbon" target, explicitly requiring the construction of a new power system based on new energy sources to address the environmental challenges posed by the traditional fossil fuel-based power structure. Against this backdrop, the demand for large-scale development and grid connection of clean energy sources such as wind and solar power has surged, significantly increasing the complexity of power grid operation and maintenance management. Power grid thematic maps, as a core tool for visual management of the power system, can intuitively present the spatial distribution and connection relationships of electrical equipment, providing crucial support for transmission line planning, equipment maintenance, and dispatching decisions.
[0003] Currently, the generation of transmission line diagrams mainly relies on full-scale mapping technology, which generates complete drawings in one go based on the spatial and electrical connection relationships of existing equipment and through a preset layout algorithm. For example, patent CN113987720A proposes a method for generating incremental single-line diagrams of distribution networks, which dynamically adjusts the layout direction to achieve incremental mapping by identifying the electrical connection relationships of newly added equipment.
[0004] However, the layout direction setting logic of the above method is relatively simple, only supporting fixed-direction expansion based on a single upstream device, and cannot adapt to scenarios where multiple incremental devices need to be built under the same device. For example, when multiple wind farms or photovoltaic power stations need to be connected simultaneously downstream of the same substation, this method may result in overlapping device icons or a chaotic layout, seriously affecting the readability and usability of the drawings. Summary of the Invention
[0005] Purpose of the invention: The purpose of this invention is to provide a method for generating incremental transmission line diagrams for new power systems that allows for the automatic generation of diagrams of incremental equipment in transmission line diagrams by setting multiple layout directions, thereby improving the readability and practicality of the diagrams; on the other hand, it provides a system for generating incremental transmission line diagrams for new power systems.
[0006] Technical solution: The method for generating incremental transmission line diagrams according to the present invention includes the following steps:
[0007] (1) Construct a tree structure mapping of power system equipment, store the connection relationship between each equipment, traverse all connection paths from power supply equipment to terminal equipment, and determine the main path of transmission line according to the preset weight calculation method;
[0008] (2) For existing equipment, calculate its layout direction based on its relative position to the coordinates of upstream equipment; for incremental equipment, set the layout direction based on its index position in the list of subsequent equipment of upstream equipment.
[0009] (3) Based on the coordinate position of the upstream equipment, the equipment coordinate layout is carried out from the end equipment to the power supply equipment in a recursive manner to determine the coordinate position of the current equipment;
[0010] (4) Check whether the outer frame of the equipment overlaps. If it does, stretch the equipment by adjusting the distance between the equipment to eliminate the overlapping phenomenon between the equipment.
[0011] (5) Based on the coordinates of the equipment connected to both ends of the line equipment, determine the terminal coordinates of the line equipment and complete the generation of the transmission line diagram.
[0012] This invention accurately identifies the connection relationships between power equipment through tree structure mapping and path traversal, and determines the main path by combining weight calculation, providing a logical foundation for subsequent layout. Through differentiated layout direction settings, relative coordinate calculations are used for existing equipment, and the direction of incremental equipment is automatically assigned based on index position, ensuring a reasonable arrangement of old and new equipment in the topology. Recursive coordinate layout traces back from the end to the power supply equipment, dynamically calculating equipment positions to ensure the accuracy of the geometric representation of connection relationships. Overlap detection and dynamic stretching adjustment effectively eliminate graphic overlap between equipment, avoiding visual interference. Terminal coordinates automatically generate precise associative lines between equipment and connection points, completing the full mapping from topology to geometry. Its technical effects are: Automated and intelligent mapping of incremental equipment is achieved through a multi-directional layout strategy, optimizing space utilization while ensuring topology correctness; recursive layout and dynamic obstacle avoidance mechanisms significantly improve drawing efficiency and readability in complex networks, especially suitable for power grid expansion scenarios, making the generated transmission line diagrams both engineering practical and visually clear, providing efficient support for power system planning and operation and maintenance.
[0013] Preferably, step 1 includes:
[0014] Using power supply equipment as the root node of the tree structure and terminal equipment as the leaf node, a tree topology structure of power system equipment is constructed, and the connection relationship between each device is stored.
[0015] Starting with the power supply device, the system traverses the tree by setting the level of each subsequent device directly connected to the power supply device to 0, and then increments the level of each subsequent device layer by layer until the end device, in order to determine the hierarchical distribution of all devices in the tree structure.
[0016] By constructing a tree topology with power equipment as the root node, the hierarchical relationship of the equipment is clarified. Combined with breadth-first traversal to mark the equipment level layer by layer (incrementing from 0), the structured storage and fast retrieval of the power system connection relationship are realized. Through hierarchical topology modeling, not only is the power supply path and logical subordination of power equipment reflected intuitively, but it also provides a data foundation for subsequent backbone path weight calculation (such as based on hierarchical depth or load criticality). At the same time, it ensures that the position of incremental equipment in the tree structure can be accurately located when it is connected, thereby supporting the automated decision-making of the layout direction in step 2, and ultimately improving the generation efficiency and topology accuracy of transmission line diagrams in equipment expansion scenarios.
[0017] Preferably, step 2 includes:
[0018] For existing equipment, the layout direction is calculated based on the difference between the current equipment coordinates and the upstream equipment coordinates. If the difference is positive, the first preset direction is adopted; if the difference is negative, the second preset direction is adopted.
[0019] For incremental devices, the following processing procedure is executed:
[0020] Establish a mapping relationship between upstream devices and their downstream device lists;
[0021] If the upstream device of the incremental device is an existing device, the layout direction is determined according to the index position of the current device in its subsequent device list;
[0022] If the upstream device of the incremental device is also an incremental device, then the current device is added to the pending list.
[0023] After completing the incremental device direction settings for all upstream devices as existing devices, the incremental devices in the pending list are processed in a loop, and the layout direction is determined based on their index position in the subsequent device list, until the pending list is empty.
[0024] By dynamically determining the layout direction of existing equipment using differential coordinates (positive / negative differences correspond to preset directions), and combining this with a hierarchical direction decision-making mechanism for incremental equipment (based on the subsequent list index of upstream existing equipment or the cyclic parsing of the queue to be processed), the layout direction of new and old equipment is automatically adapted. The coordinate relationship of existing equipment is used to maintain the visual continuity of existing drawings, and index mapping and queue processing ensure that the direction of incremental equipment is strictly consistent with the topology, solving the layout conflict problem caused by the disorder of equipment direction in incremental scenarios. At the same time, the iterative processing capability of the queue to be processed supports the cascading direction calculation of multi-level incremental equipment, which significantly improves the logical consistency and automation level of drawing during complex power grid expansion.
[0025] Preferably, step 3 includes:
[0026] The rotation angle of the graphic elements is set according to the layout direction of the equipment; a reverse layout algorithm is used to recursively set the coordinates of each device from the end device to the power supply device, wherein:
[0027] For the terminal device, set the coordinates of its upstream device to the origin (0,0), and calculate the coordinates of the current device according to the layout direction using a preset distance formula;
[0028] For non-terminal devices, they are treated as a whole with all downstream devices, and the coordinates of the upstream devices of this whole are used as the origin, and the whole is offset by a preset distance along the layout direction.
[0029] By dynamically setting the rotation angle of primitives based on the layout direction and combining it with a reverse recursive layout algorithm, efficient and accurate positioning of power equipment coordinates is achieved. The accurate positioning of terminal nodes is ensured by calculating the preset distance of terminal equipment with the origin as the reference, while non-terminal equipment adopts an overall offset strategy. This maintains the topological correlation of the equipment group and effectively avoids the cumulative errors that may be caused by forward layout by passing the coordinates layer by layer in a recursive manner. At the same time, the dynamic matching of rotation angle and layout direction ensures the consistency of primitive direction and connection logic, thereby realizing the automated and rational arrangement of equipment coordinates in complex power grid structures, significantly improving the efficiency of drawing and the readability of drawings.
[0030] Preferably, the layout direction includes eight standard directions: horizontal, vertical, and 45° diagonal. The distance calculation method for each direction includes:
[0031] When the layout direction is horizontal to the right
[0032]
[0033] Where w1 is the width of the upstream device, w2 is the width of the current device, and C is a fixed device spacing constant. The layout direction is similar when it is horizontal to the left.
[0034] When the layout direction is vertically downward
[0035]
[0036] Where h1 is the height of the upstream device, h2 is the height of the current device, and C is a constant for the fixed device spacing. The layout direction is similar when it is vertically upward.
[0037] When the layout direction is diagonally downward to the right at 45°
[0038]
[0039] Where w1 is the width of the upstream device, w2 is the width of the current device, h1 is the height of the upstream device, h2 is the height of the current device, and C is a fixed device spacing constant. The layout direction is similar when it is one of the other three diagonal directions.
[0040] By defining eight standard layout directions and customizing distance calculation formulas for different directions, refined layout control of equipment coordinates is achieved. Through multi-directional coverage and differentiated distance calculation, it not only meets the diverse layout requirements of straight lines, corners, and diagonal connections in power line diagrams, but also ensures that equipment maintains a safe distance between devices and avoids graphic overlap by introducing equipment width and height parameters and fixed spacing constants. The trigonometric function adaptation in diagonal directions further improves the coordinate accuracy when diagonally connecting, enabling the generated transmission line diagrams to maintain geometric accuracy and visual standardization even in complex routing scenarios, significantly enhancing the adaptability and engineering practicality of automated mapping.
[0041] Preferably, the coordinate calculation of the overall equipment layout uses the same distance formula as that of a single end device, and the distance is calculated by offsetting the entire equipment group along the upstream equipment layout direction.
[0042] By applying the same standardized distance calculation formula to the entire equipment group as to the end-point equipment and offsetting it along the layout direction of the upstream equipment, a unified coordinate layout for the equipment group is achieved. By reusing the validated end-point equipment distance algorithm, the geometric consistency of the topological relationship within the equipment group is ensured, while the overall offset strategy maintains the precise distance between the equipment group and the upstream equipment, effectively avoiding the cumulative errors that may be caused by calculating each equipment individually. At the same time, this scheme simplifies the layout logic of complex equipment groups, ensuring that both single end-point equipment and multi-level nested equipment groups can achieve accurate positioning based on the same set of direction-distance rules, significantly improving the efficiency of large-scale power grid drawing generation and the overall coordination of the layout structure.
[0043] Preferably, step 4 includes:
[0044] Inspect the outer rectangular frame of the equipment set in different directions for overlay conditions. If overlay conditions are present, handle them as follows:
[0045] The translation direction is selected according to a preset priority order, which is as follows: horizontal to the right, vertical down, horizontal to the left, vertical up, lower right corner 45°, lower left corner 45°, upper right corner 45°, upper left corner 45°;
[0046] Translate the overall outer rectangular frame of the equipment assembly along a selected direction by a fixed translation amount;
[0047] Repeatedly check the pressure cap condition and perform the translation operation until the pressure caps between all devices are completely removed.
[0048] By employing multi-directional outer rectangular frame overlap detection and progressive translation adjustment based on preset priorities, the problem of graphic overlap in equipment layout is effectively solved. By establishing a directional priority mechanism and a fixed-step translation strategy, the overlap phenomenon is eliminated while minimizing drawing deformation, ensuring that the topological relationship between equipment is not disrupted. This solution not only ensures complete elimination of overlap through a cyclic detection-translation mechanism but also maintains the natural trend of the power line diagram using directional priorities, avoiding drawing chaos caused by random adjustments. Ultimately, it achieves an optimized equipment layout that conforms to engineering specifications while maintaining good readability, significantly improving the quality and practicality of automated drawing generation.
[0049] Preferably, step 5 includes:
[0050] Traverse all line devices and obtain the terminal coordinates of the devices connected to both ends of the current line device;
[0051] First, assign the precise terminal coordinates of the connected devices to the corresponding terminals of the line device;
[0052] If the terminal coordinates fail to be obtained, the center coordinates of the connected device will be used as backup coordinates and assigned to the terminal of the line device.
[0053] After setting the terminal coordinates of all line devices, a complete power transmission line connection is generated.
[0054] By employing an intelligent terminal coordinate matching mechanism and full-scale equipment traversal processing, accurate generation of transmission line connection lines is achieved. A dual coordinate protection strategy ensures that connection lines are always correctly anchored to equipment, effectively preventing line breaks caused by missing terminal information. Simultaneously, full-scale traversal processing ensures that all connection lines are dynamically updated according to the latest equipment layout, enabling the generated transmission line diagram to maintain both topological integrity and engineering-grade coordinate accuracy. This significantly improves the practicality and reliability of the drawings in equipment maintenance and system expansion scenarios.
[0055] Secondly, the transmission line diagram incremental diagram generation system of the present invention includes:
[0056] The backbone search module is used to construct a tree structure mapping of power system equipment, store the connection relationships between each device, traverse all connection paths from power source equipment to end device, and determine the backbone path of transmission lines according to a preset weight calculation method.
[0057] The orientation setting module is used to calculate the layout orientation of existing devices based on their relative position to the coordinates of upstream devices; and to set the layout orientation of incremental devices based on their index position in the list of subsequent devices of the upstream devices.
[0058] The device layout module is used to recursively lay out the device coordinates from the end device to the power supply device based on the coordinate positions of the upstream device, and to determine the coordinate position of the current device.
[0059] The overlap detection module is used to detect whether the outer frame of the equipment overlaps. If there is overlap, the distance between the equipment is adjusted to stretch the frame and eliminate the overlap phenomenon.
[0060] The connection line filling module is used to determine the terminal coordinates of the line device based on the coordinates of the devices connected to both ends of the line device, thereby generating the transmission line diagram.
[0061] Thirdly, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program capable of being loaded by the processor and executing the method for generating incremental transmission line diagrams for novel power systems.
[0062] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating incremental transmission line diagrams for novel power systems.
[0063] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: 1. By setting the layout direction and adopting differentiated direction setting rules (existing equipment based on coordinate difference, incremental equipment based on index position), automatic intelligent drawing of incremental equipment in transmission line diagrams is realized, significantly improving the readability and engineering practicality of the drawings, and solving the problem of drawing congestion caused by the single layout direction of traditional methods; 2. Based on priority sorting translation strategy and cyclic detection mechanism, the problem of overlapping equipment outer frames can be effectively identified and eliminated, ensuring clear and orderly equipment layout under complex topology, and improving the neatness and readability of the drawings; 3. By adopting tree structure mapping and reverse recursive layout algorithm, combined with dual modes of single layout of terminal equipment and overall layout of non-terminal equipment, accurate calculation of equipment coordinates is realized, which is particularly suitable for multi-level equipment scenarios in new power systems; 4. Through multiple protection strategies, reliable connection between line equipment and associated equipment is ensured, and a complete line diagram can still be generated even when equipment terminal information is missing, improving the fault tolerance and reliability of the system. Attached Figure Description
[0064] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0065] Figure 2 A flowchart for setting the incremental mapping direction in this invention;
[0066] Figure 3 A schematic diagram showing the horizontal coordinates set to the right in this invention;
[0067] Figure 4 This is a schematic diagram of the vertically downward coordinate system of the present invention;
[0068] Figure 5 A schematic diagram showing the coordinates of the invention at a 45° angle to the lower right corner;
[0069] Figure 6 A coordinate schematic diagram of the overall device of the present invention;
[0070] Figure 7 This is a schematic diagram of the capping solution of the present invention. Detailed Implementation
[0071] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0072] like Figure 1 As shown, this invention provides a method for generating incremental transmission line diagrams for novel power systems, comprising the following steps:
[0073] Step 1: Typically, the equipment on the main transmission line is existing equipment, while the lines containing new equipment are branches. Since a transmission line has only one main trunk, the main trunk and branches are first divided to determine the starting equipment and all terminal equipment. The mapping data includes the connection relationships between existing and new equipment, and the lines are divided based on these relationships.
[0074] (1) Spanning tree structure mapping
[0075] To facilitate data processing, a suitable data structure is first selected to store the connection relationships between devices. The device connection relationships in the transmission line diagram start from the power supply equipment and end at multiple terminal equipment, and their structure is similar to a tree structure in data structures. Therefore, this method selects a tree structure to store this connection relationship. Referring to the tree structure, each device includes upstream devices and downstream devices, which correspond to the parent node and child node of the tree, respectively. This method uses the power supply equipment as the root node and the terminal devices as leaf nodes to map all devices to the tree structure in sequence.
[0076] After constructing the tree structure mapping, the next step is to set the tree's hierarchical mapping. Starting with the power supply device, set the hierarchy of the subsequent devices directly connected to the power supply device to 0, and their subsequent devices to 1, and so on, setting the hierarchy for all devices.
[0077] (2) Search trunk
[0078] Based on the generated tree structure mapping, starting from the power device, all subsequent devices are traversed in sequence to obtain all paths from the power device to the end device, and these paths are saved in traces.
[0079] The weights of all branch paths are calculated, and the line with the highest weight is designated as the main transmission line. The weights are calculated using a combination of the current path's base length and the weighting of the equipment along the path; different equipment has different weights. For example, a transmission line with 4 towers and 3 connecting lines has a base length of 7, a weighting of 30 for each tower, and a weighting of 120 for all 4 towers. Therefore, the final weight score for this line is 127.
[0080] Step 2: To meet users' needs for creating multiple branches during the drawing process, this method, in addition to setting four horizontal and vertical directions, also supports four diagonal layouts at 45°. The flowchart for this part is as follows: Figure 2 As shown. The incremental diagram of transmission lines needs to assign coordinates to incremental equipment while keeping the relative positions of existing equipment unchanged. Therefore, the direction setting includes two categories: existing equipment and incremental equipment.
[0081] (1) Setting the orientation of existing equipment
[0082] For existing equipment, the layout objective is to maintain the relative position of the current equipment and its connected equipment unchanged, and its layout direction can be calculated from the original coordinates. The differences in the x and y directions are calculated based on the coordinates of the current equipment and the upstream equipment, denoted as dx and dy. The layout direction of the existing equipment is obtained based on their positive and negative values.
[0083] Table 1. Mapping Table of Difference Direction
[0084] Positive and negative difference Layout direction dx>0, dy=0 The direction is set to horizontal to the right. dx<0,dy=0 The direction is set to horizontal to the left. dx = 0, dy > 0 The direction is set vertically downwards. dx=0,dy<0 The direction is set vertically upward. dx>0, dy>0 The direction is set to the bottom right corner at 45°. dx>0,dy<0 The direction is set to the top right corner at 45°. dx<0,dy<0 The direction is set to the top left corner at 45°. dx<0,dy>0 The direction is set to the bottom left corner at 45°.
[0085] (2) Incremental device direction setting
[0086] For incremental devices, since they do not have their own coordinates, they need to rely on upstream devices to determine their layout direction. Similar to a tree structure where a parent node may contain multiple child nodes, an upstream device may contain multiple downstream devices. To avoid overlapping layout directions across multiple branches, the order in which downstream devices set their directions needs to be considered. This method achieves this by constructing a map of upstream and downstream device lists.
[0087] Traverse the devices level by level in the tree to get the upstream devices of the current device. Check if the upstream device exists in the key set of the map. If it does not exist, create an empty list of subsequent devices corresponding to the upstream device. If it exists, add the current device to the list of subsequent devices corresponding to the upstream device. Finally, you get a map of all upstream devices and a list of all subsequent devices of a certain upstream device.
[0088] Next, the devices are traversed. First, the upstream device of the current device is obtained, and the index of the current device in the corresponding subsequent device list is obtained through the upstream device. The layout direction of the current incremental device is obtained based on the index.
[0089] Typically, the upstream device of an incremental device is an existing device, i.e., a device whose layout direction is calculated using coordinates. In this case, the layout direction is set according to the index of the current device. The settings for the index and layout direction are shown in the table below.
[0090] Table 2 Index Direction Mapping Table
[0091]
[0092] When the upstream device of an incremental device is also an incremental device, meaning the upstream device also lacks a layout direction, the layout direction cannot be obtained through the index in Table 2. In this case, the current device's direction setting is skipped, and it is added to the pending list. Incremental devices whose upstream device is an existing device are processed first.
[0093] After one iteration, all incremental devices whose upstream devices are existing devices have had their layout directions set, and these incremental devices are added to the pending list. Since the goal of the incremental graph is to place incremental devices into the connection graph of existing devices, there must be at least one incremental device whose upstream device is an existing device. After the previous iteration of setting directions, this incremental device now has a layout direction. The pending list is iterated through, and the direction of the current node is set based on the layout direction of the upstream device and the index of the current device in subsequent devices, as shown in Table 2. If the layout direction is successfully set, the current device is removed from the pending list; if the upstream device does not have a layout direction, the current device is skipped. The loop continues until the pending list is empty, at which point the iteration stops.
[0094] Using the above algorithms, the layout orientation of both existing and new equipment has been set. Next, specific coordinates will be assigned to the equipment on the drawings.
[0095] Step 3: The overall approach to equipment layout is to calculate the required layout coordinates of the current equipment based on the coordinates of the upstream equipment. Step 2 has already set the layout orientation for all equipment. Before placing the equipment on the drawing, the rotation angle of the graphic elements (the equipment's representation on the drawing) must first be set according to the equipment's layout orientation. For example, if the layout orientation of a surge arrester is 45° to the lower right, then the rotation angle of this graphic element is 45° (0° is horizontally to the right). Furthermore, some equipment in transmission line diagrams does not require rotation; its rotation angle should be 0° regardless of the layout orientation. For example, if the layout orientation is also 45° to the lower right, the rotation angle of the tower should be 0°. If the tower graphic element is also rotated 45°, it will appear significantly different from other towers, resulting in an unattractive drawing and negatively impacting the user's reading experience.
[0096] Based on the device layout direction obtained in the previous step, set the coordinates in reverse order from the end devices to the power supply devices. Lay out each end device according to the coordinates of its upstream devices. When laying out an upstream device, treat that upstream device and all its subsequent end devices as a whole and calculate the coordinates of this whole. Repeat this process to set the coordinates of all devices, thus completing the layout. The specific layout algorithm is as follows.
[0097] (1) Layout of a single device
[0098] When placing a single device, the upstream devices of the device to be placed are all devices with coordinates. The coordinates of the device to be placed can be calculated from the placement direction and the coordinates of the upstream devices.
[0099] First, set the coordinates of the upstream device of this device to (0,0). Then, place the current device at a distance along the layout direction. The formula for calculating this distance D is as follows:
[0100] When the layout direction is horizontal to the right
[0101]
[0102] Where w1 is the width of the upstream device, w2 is the width of the current device, and C is a constant representing the fixed device spacing, as shown in the diagram. Figure 3 As shown, the layout is similar when the orientation is horizontal to the left.
[0103] When the layout direction is vertically downward
[0104]
[0105] Where h1 is the height of the upstream device, h2 is the height of the current device, and C is a constant for the fixed device spacing, as shown in the diagram. Figure 4 As shown, the layout direction is similar when it is vertically upward.
[0106] When the layout direction is diagonally downward to the right at 45°
[0107]
[0108] Where w1 is the width of the upstream device, w2 is the width of the current device, h1 is the height of the upstream device, h2 is the height of the current device, and C is a constant for fixed device spacing. (See diagram below.) Figure 5 As shown, the layout is similar when the other three diagonal directions are as shown.
[0109] (2) Overall equipment layout
[0110] Except for the terminal equipment and power supply equipment, all other equipment is laid out using an integrated equipment layout. Similar to the individual equipment layout, the integrated equipment layout treats a group of equipment as a whole, setting the coordinates of the upstream equipment to (0,0), and placing the entire equipment group at a distance along the layout direction of the upstream equipment within this integrated equipment group. The layout direction is horizontal to the right, as shown in the diagram below. Figure 6 As shown, the layout is similar to that of a single device when the layout orientation is other than the orientation.
[0111] Step 4: Since the equipment layout is based on the coordinates of the upstream equipment and the current equipment layout direction, there is no overlap between equipment in the same direction. Create a map of all equipment according to their layout direction and the list of equipment in that direction. Iterate through all equipment according to their layout direction, only checking if there is overlap between equipment in different directions. The handling of overlap includes two steps: overlap detection and overlap resolution.
[0112] (1) Capping test
[0113] For two sets of devices in different directions, obtain the bounding rectangles of all devices in the set, including their labels, and save them to a device bounding list. Iterate through the device bounding lists of the two different directions, checking if any two device bounding rectangles have overlapping covers. If no overlapping covers exist, end the overlapping cover detection and no further steps are needed. Then check if there is overlapping between the overall bounding rectangles of the two sets of devices in different directions. If no overlapping covers exist, end the overlapping cover detection and no further steps are needed.
[0114] (2) Capping solution
[0115] The overall approach to solving the overlay problem is to select a set of overall outer rectangular frames for translation, thereby ensuring the aesthetics of the final image. The translation amount is a constant T1 in both the horizontal and vertical directions, while the diagonal translation amount T2 is obtained using the Pythagorean theorem. Priority is given to translating the overall outer rectangular frames in the horizontal and vertical directions, with the priority order being: horizontal to the right, vertical down, horizontal to the left, and vertical up. The diagonal priority order is: bottom right 45°, bottom left 45°, top right 45°, and top left 45°.
[0116] After determining the layout direction and translation amount of the overall outer rectangle, perform a translation. Then, check again whether there are any caps on the equipment sets in the current two directions. If so, perform a second translation, repeating this process until all caps on the current two directions are resolved. Continue iterating through the equipment sets in the other two directions until all caps are resolved. A translation diagram for this part is shown below. Figure 7 As shown, the dashed rectangle represents the area before the capping process is completed, and the gray rectangle represents the area after the capping process is completed.
[0117] Step 5: Traverse the line devices, find the source and target devices connected to the line devices, obtain the coordinates of the two terminals connected to the line devices, and assign them to the terminals at both ends of the line devices to complete the setting of the line device coordinates. If the setting is unsuccessful, set the coordinates of the line devices based on the coordinates of the connecting point devices, and place all line devices between the point devices to complete the automatic generation of the transmission line diagram under incremental mapping.
[0118] Based on a similar inventive concept, this invention also provides a transmission line diagram incremental diagram generation system corresponding to the aforementioned transmission line diagram incremental diagram generation method, comprising:
[0119] The backbone search module is used to construct a tree structure mapping of power system equipment, store the connection relationships between each device, traverse all connection paths from power source equipment to end device, and determine the backbone path of transmission lines according to a preset weight calculation method.
[0120] The orientation setting module is used to calculate the layout orientation of existing devices based on their relative position to the coordinates of upstream devices; and to set the layout orientation of incremental devices based on their index position in the list of subsequent devices of the upstream devices.
[0121] The device layout module is used to recursively lay out the device coordinates from the end device to the power supply device based on the coordinate positions of the upstream device, and to determine the coordinate position of the current device.
[0122] The overlap detection module is used to detect whether the outer frame of the equipment overlaps. If there is overlap, the distance between the equipment is adjusted to stretch the frame and eliminate the overlap phenomenon.
[0123] The connection line filling module is used to determine the terminal coordinates of the line device based on the coordinates of the devices connected to both ends of the line device, thereby generating the transmission line diagram.
[0124] The present invention also discloses an electronic device.
[0125] Specifically, the electronic device can be a desktop computer, laptop computer, handheld computer, or cloud server, etc. This computer device may include, but is not limited to, a processor and memory. The processor and memory can be connected via a bus or other means. The processor can be a Central Processing Unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, graphics processing units (GPUs), embedded neural network processing units (NPUs) or other dedicated deep learning coprocessors, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0126] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules. The processor executes various functional applications and data processing by running non-transitory software programs, instructions, and modules stored in memory. Memory may include a program storage area and a data storage area. The program storage area may store the control unit and the application program required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, memory may include high-speed random access memory and non-transitory memory. In some embodiments, memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0127] The present invention also discloses a computer-readable storage medium.
[0128] Specifically, the computer-readable storage medium is used to store a computer program, which, when executed by a processor, implements the methods described in the above method implementation.
[0129] Those skilled in the art will understand that all or part of the processes in the methods described above can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
Claims
1. A method for generating incremental transmission line diagrams for new power systems, characterized in that, Includes the following steps: (1) Construct a tree structure mapping of power system equipment, store the connection relationship between each equipment, traverse all connection paths from power supply equipment to terminal equipment, and determine the main path of transmission line according to the preset weight calculation method; (2) For existing equipment, calculate its layout direction based on its relative position to the coordinates of upstream equipment; for incremental equipment, set the layout direction based on its index position in the list of subsequent equipment of upstream equipment. (3) Based on the coordinate position of the upstream equipment, the equipment coordinate layout is carried out from the end equipment to the power supply equipment in a recursive manner to determine the coordinate position of the current equipment; (4) Check whether the outer frame of the equipment overlaps. If it does, stretch the equipment by adjusting the distance between the equipment to eliminate the overlapping phenomenon between the equipment. (5) Based on the coordinates of the equipment connected to both ends of the line equipment, determine the terminal coordinates of the line equipment and complete the generation of the transmission line diagram.
2. The method for generating incremental transmission line diagrams according to claim 1, characterized in that, Step 1 includes: Using power supply equipment as the root node of the tree structure and terminal equipment as the leaf node, a tree topology structure of power system equipment is constructed, and the connection relationship between each device is stored. Starting with the power supply device, the system traverses the tree by setting the level of each subsequent device directly connected to the power supply device to 0, and then increments the level of each subsequent device layer by layer until the end device, in order to determine the hierarchical distribution of all devices in the tree structure.
3. The method for generating incremental transmission line diagrams according to claim 1, characterized in that, Step 2 includes: For existing equipment, the layout direction is calculated based on the difference between the current equipment coordinates and the upstream equipment coordinates. If the difference is positive, the first preset direction is adopted; if the difference is negative, the second preset direction is adopted. For incremental devices, the following processing procedure is executed: Establish a mapping relationship between upstream devices and their downstream device lists; If the upstream device of the incremental device is an existing device, the layout direction is determined according to the index position of the current device in its subsequent device list; If the upstream device of the incremental device is also an incremental device, then the current device is added to the pending list. After completing the incremental device direction settings for all upstream devices as existing devices, the incremental devices in the pending list are processed in a loop, and the layout direction is determined based on their index position in the subsequent device list, until the pending list is empty.
4. The method for generating incremental transmission line diagrams according to claim 1, characterized in that, Step 3 includes: The rotation angle of the graphic elements is set according to the layout direction of the equipment; a reverse layout algorithm is used to recursively set the coordinates of each device from the end device to the power supply device, wherein: For the terminal device, set the coordinates of its upstream device to the origin (0,0), and calculate the coordinates of the current device according to the layout direction using a preset distance formula; For non-terminal devices, they are treated as a whole with all downstream devices, and the coordinates of the upstream devices of this whole are used as the origin, and the whole is offset by a preset distance along the layout direction.
5. The method for generating incremental transmission line diagrams according to claim 4, characterized in that, The layout directions include eight standard directions: horizontal, vertical, and 45° diagonal. The distance calculation methods for each direction are as follows: When the layout direction is horizontal to the right Where w1 is the width of the upstream device, w2 is the width of the current device, and C is a fixed device spacing constant. The layout direction is similar when it is horizontal to the left. When the layout direction is vertically downward Where h1 is the height of the upstream device, h2 is the height of the current device, and C is a constant for the fixed device spacing. The layout direction is similar when it is vertically upward. When the layout direction is diagonally downward to the right at 45° Where w1 is the width of the upstream device, w2 is the width of the current device, h1 is the height of the upstream device, h2 is the height of the current device, and C is a fixed device spacing constant. The layout direction is similar when it is one of the other three diagonal directions.
6. The method for generating incremental transmission line diagrams according to claim 4, characterized in that, The coordinate calculation of the overall equipment layout uses the same distance formula as that of a single end device, and the distance is calculated by offsetting the entire equipment group along the upstream equipment layout direction.
7. The method for generating incremental transmission line diagrams according to claim 1, characterized in that, Step 4 includes: Inspect the outer rectangular frame of the equipment set in different directions for overlay conditions. If overlay conditions are present, handle them as follows: The translation direction is selected according to a preset priority order, which is as follows: horizontal to the right, vertical down, horizontal to the left, vertical up, lower right corner 45°, lower left corner 45°, upper right corner 45°, upper left corner 45°; Translate the overall outer rectangular frame of the equipment assembly along a selected direction by a fixed translation amount; Repeatedly check the pressure cap condition and perform the translation operation until the pressure caps between all devices are completely removed.
8. The method for generating incremental transmission line diagrams according to claim 1, characterized in that, Step 5 includes: Traverse all line devices and obtain the terminal coordinates of the devices connected to both ends of the current line device; First, assign the precise terminal coordinates of the connected devices to the corresponding terminals of the line device; If the terminal coordinates fail to be obtained, the center coordinates of the connected device will be used as backup coordinates and assigned to the terminal of the line device. After setting the terminal coordinates of all line devices, a complete power transmission line connection is generated.
9. A transmission line map incremental generation system for a new type of power system, characterized in that, include: The backbone search module is used to construct a tree structure mapping of power system equipment, store the connection relationships between each device, traverse all connection paths from power source equipment to end device, and determine the backbone path of transmission lines according to a preset weight calculation method. The orientation setting module is used to calculate the layout orientation of existing devices based on their relative position to the coordinates of upstream devices; and to set the layout orientation of incremental devices based on their index position in the list of subsequent devices of the upstream devices. The device layout module is used to recursively lay out the device coordinates from the end device to the power supply device based on the coordinate positions of the upstream device, and to determine the coordinate position of the current device. The overlap detection module is used to detect whether the outer frame of the equipment overlaps. If there is overlap, the distance between the equipment is adjusted to stretch the frame and eliminate the overlap phenomenon. The connection line filling module is used to determine the terminal coordinates of the line device based on the coordinates of the devices connected to both ends of the line device, thereby generating the transmission line diagram.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method for generating incremental transmission line diagrams for novel power systems as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Power distribution network single line diagram incremental diagram generation method and system, storage medium and computing equipment
CN113987720A