A new automatic drawing method for power distribution network diagram

The automatic drawing scheme of power distribution network diagrams combined with multiple algorithms solves the problem of long time-consuming and unsatisfactory results in automatic drawing of power distribution network diagrams, and achieves fast, efficient and accurate generation of distribution network diagrams, which is suitable for modern power grid management needs. .

CN118395656BActive Publication Date: 2024-10-25JIANGSU BINGXIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410831976.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-25
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

The existing technology has the problems of long time consumption and unsatisfactory results in the automatic drawing of power distribution network diagrams, and it is difficult to meet the high requirements of modern power grid management.

Method used

An automatic power distribution network diagram drawing scheme using a combination of multiple algorithms is used to analyze the topological relationships and configuration information input by the user, use the loop algorithm and the multi-condition joint algorithm to perform substation layout and line processing, and combine the Floyd-Warshall algorithm to optimize line planning to achieve Efficient calculation and beautiful display of data.

Benefits of technology

Significantly improve the drawing efficiency and drawing quality, the calculation amount is reduced by 40%, the drawing efficiency is increased by 30%, the generation time is reduced from minutes to seconds, the line layout is clearer and more intuitive, it can adapt to diversified data, the fault tolerance rate is improved, and it is applicable For concurrent requests from multiple users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118395656B_ABST
    Figure CN118395656B_ABST
Patent Text Reader

Abstract

The present invention discloses a novel automatic drawing method for power distribution network diagrams, which parses the input information and configuration information with topological relationships input by the user, and the drawing module encapsulates the input information and configuration information into drawing objects of the corresponding mode with reference to the characteristics of the factory mode in the design mode; then, data type conversion and data cleaning are performed; next, the data is passed into the processing chain in the drawing object, and the data is calculated and processed through different processing chains, and finally encapsulated into an output format file and output to the user. This solution optimizes performance, drawing effect and occupancy of computing resources, so that the generation of most power distribution network graphics can be completed in about one second, and the drawing effect is good, without manual adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of power distribution network, and in particular relates to a novel automatic drawing method for power distribution network diagram. Background Art

[0002] As an indispensable management tool in the power industry, the distribution network diagram can help power engineers and decision makers understand and control complex power systems, thereby improving the efficiency and reliability of power supply. With the development of the market, the requirements for drawing distribution network diagrams, especially the clarity, accuracy and generation speed of the graphics, are constantly increasing.

[0003] The prior art discloses some methods dedicated to developing more efficient and accurate automatic drawing methods for distribution network diagrams. Reference 1 (He Xiongkun. Research on the application of big data technology in automatic drawing of distribution network single-line diagrams [J]. Power Big Data, 2020, (5): 54-63.) proposes a single-line diagram automatic drawing method that combines big data technology and machine learning technology. This method can effectively process large-scale power system data and automatically generate single-line diagrams using machine learning algorithms. However, the running speed of this method and the clarity of the generated graphics still need to be improved.

[0004] Reference 2 (ZHANG Jianmin, ZHANG Jianguang, CHEN Shiyun, et al. Single-line Diagram of Substation Centralized Distribution Network Part one Diagram-Data Model Based on Generic Switching Station [J]. Automation of Electric Power Systems, 2019, 43(18): 102-110. DOI: 10.7500 / AEPS20180826004.) and reference 3 (ZHAN Jianmin, ZHANG Jianguang, CHEN Shiyun, et al. Single-line Diagram of Substation Centralized Distribution Network Part one Diagram-Data Model Based on Generic Switching Station [J]. Automation of Electric Power Systems, 2019, 43(18): 102-110. DOI: 10.7500 / AEPS20180826004.) conducted in-depth discussions on the application of the generalized switchgear diagram-data model in the power industry. They used the model to abstract and simplify the power system to improve the efficiency and accuracy of graphics generation. However, this method has a high degree of abstraction of the power system and may not accurately reflect the actual state of the power system.

[0005] Reference 4 (Chen Bing, Zhao Xiaoxu, Shi Weicheng, Ma Haitao, Wang Haowei, Da Tao. Implementation of automatic grid-based distribution network mapping [J]. Electric Power Engineering Technology, 2017, 36(6): 100-105) proposed a grid-based distribution network automatic drawing method. This method uses the topological structure of the power system to map the various parts of the power system to the grid, and then uses the gridding algorithm to automatically generate the distribution network diagram. The advantage of this method is that it can generate clear graphics, but its running speed is slow and may require a lot of computing resources.

[0006] Although these research results have improved the automatic drawing process of distribution network diagrams to some extent, they have not fundamentally solved the problem of high-performance and high-quality automatic drawing of power distribution network diagrams. In the face of the high requirements of modern power grid management, how to solve the problems of long time consumption and unsatisfactory effect of automatic drawing of power distribution network diagrams is still an urgent problem to be solved in the current power industry.

[0007] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0008] The main objective of the present invention is to solve the problems existing in the traditional method of drawing a power distribution network diagram and meet the actual needs of daily business.

[0009] To achieve the above-mentioned purpose, the present invention provides a novel automatic drawing method for power distribution network diagram, which parses the input information and configuration information with topological relationship input by the user, and the drawing module encapsulates the input information and configuration information into a drawing object of the corresponding mode with reference to the characteristics of the factory mode in the design mode; performs data type conversion and data cleaning operations; passes the data into the processing chain in the drawing object, and calculates and processes the data through different processing chains; encapsulates the data into an output format file and outputs it to the user; the specific steps of different processing chains are as follows:

[0010] S1 parameter preprocessing: used to parse and convert the input substation topology data in JSON format for subsequent analysis and application;

[0011] S2 Substation layout processing: Place the main substation in the center of the canvas, and evenly and randomly distribute other auxiliary substations around the canvas. Divide the area into equal parts, and then randomly select a location in each area to place an auxiliary substation. The return algorithm is used to calculate the final location.

[0012] S3 Substation coordinate fine-tuning processing: used to make appropriate adjustments to the substation layout to avoid mutual overlap between substations;

[0013] S4 In-station switch layout processing: The location of the in-station switches is arranged according to the actual association relationship of the power equipment and the relevant information is calculated;

[0014] S5 off-site switch point processing: The off-site switches are evenly distributed between the connected main station and auxiliary station by dividing the area, and the positions are calculated by a multi-condition joint algorithm;

[0015] S6 Station switch orientation processing: the orientation of each station switch is consistent with the orientation of the tie switch, and the text is displayed completely;

[0016] S7 wiring processing: For each pair of master stations, auxiliary stations and off-site switches that need to be connected, the Floyd-Warshall algorithm is used to find an initial path, which is composed of a series of horizontal and vertical line segments; different specifications of line processing algorithms are used for fine-tuning according to the connection relationship and position relationship;

[0017] S8 line labeling processing: label each line, including the line name and voltage information;

[0018] S9 Line Rectangle Processing: Display each line in the form of a rectangular strip, and the width of the line indicates the voltage or current of the line;

[0019] S10 color processing: assign different colors to different types of devices and lines;

[0020] S11 Anchor point processing: add anchor points at the turning point and end point of the line;

[0021] S12 Resize recovery: During the dynamic processing of different data in the two processing chains of "substation layout" and "substation coordinate fine-tuning", if the data calculation exceeds the set threshold, scaling will be performed at this time; if the canvas is scaled during the substation layout and substation coordinate fine-tuning steps, this step needs to restore it to the original size;

[0022] S13 text processing: add text descriptions to devices and lines, including device names and voltage information;

[0023] S14 output processing: convert the processed data into JSON format and output it to the front end for display.

[0024] The present invention proposes a new automatic distribution network diagram drawing solution based on a combination of multiple algorithms. This solution effectively combines the advantages of multiple algorithms and adopts the most suitable algorithm to process each link in the graphics generation process, thereby solving the outstanding problems. It optimizes the performance, graphics effect and computing resource usage, so that most power distribution network graphics can be generated in about one second, with good graphics effect and no manual adjustment.

[0025] The effects of the circular algorithm and the multi-condition joint algorithm are improved: the amount of calculation is reduced by 40%. When processing data under different conditions, the algorithm is more flexible and efficient, the mapping efficiency is increased by 30%, and the calculation time is reduced from minutes to seconds.

[0026] Improved line processing algorithm: The aesthetics of the resulting image is improved by 30%, and the line layout is clearer and more intuitive. Adapting to 5 special data connection relationships makes the algorithm more versatile and can process diverse data without affecting aesthetics and efficiency.

[0027] Fine-tuning algorithm effect improvement: The fault tolerance rate is improved, making the algorithm more robust in handling incomplete or abnormal data. During the fine-tuning process, more attention is paid to the optimization of aesthetics, which improves the visual effect of the final image.

[0028] Preferably, in the above technical solution, the loop algorithm in the substation layout processing in S2 generates 8 different combinations through 4 groups of random Boolean numbers, and performs loop layout corresponding to different combinations according to the substation set in each map, ensuring the data relationship while leaving enough space for routing. When the number of substations is less than 5, a triangular layout is adopted, and when the number of substations is greater than or equal to 5, a loop layout is adopted; this more effectively displays the mapping effect. The distance and location of the station will be calculated through the contact relationship to ensure that the algorithm has enough space for processing and calculation afterwards.

[0029] Preferably, in the above technical solution, the specific process of the return algorithm is:

[0030] S2.1 extracts the substation list according to the cleaned metadata, and determines whether the substation list size is 0; if not, it ends directly and enters the next processing chain;

[0031] S2.2 If the substation list is greater than 0, enter the calculation stage;

[0032] The S2.3 calculation stage mainly deals with some parameters:

[0033] maxWidth: Calculate the maximum width value based on the number of substations and the number of external tie switches;

[0034] yNum: Get the Y-axis difference between the maximum and minimum points randomly obtained by the previous processing chain;

[0035] xNum: Gets the X-axis difference between the maximum and minimum points randomly obtained in the previous processing chain;

[0036] proportion: the coefficient obtained by multiplying the number of off-site tie switches by the threshold after mathematical calculation;

[0037] widthValue: The width of the rectangle occupied by the substation in the layout is obtained based on mathematical calculations;

[0038] moderate: The coefficient of the canvas is obtained based on the comparison;

[0039] proportionValue: the threshold proportion coefficient calculated in the algorithm based on the number of substations and the number of off-station tie switches;

[0040] moderateWidth: The width of the canvas when calculating in the algorithm;

[0041] moderateHeight: The height of the canvas when calculating in the algorithm;

[0042] S2.4 After the calculation is successful, the substation layout is carried out, and the substation list number num is processed according to the substation list after the main station: if num is equal to 1, the upper and lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results; if num is equal to 2, the upper and lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results; if num is equal to 3, the upper two lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results; if num is greater than or equal to 4 and less than or equal to 21, the circular distribution arrangement method is selected according to the four groups of random numbers, and the groups are arranged according to the number, and finally the coordinates of all substations are calculated according to the results; if num is greater than 21, the random mapping method is used for the mouth layout, and the coordinates of all substations are calculated according to the results;

[0043] After S2.5 processing, coordinate information statistics are performed and the process ends, and the next processing chain is entered.

[0044] Preferably, in the above technical scheme, the multi-condition joint algorithm in the off-site switch layout processing in S5 is that after the substation is laid out, the connecting switches associated with the substation are screened out according to the connection relationship and grouped, and then calculations are performed after grouping: sorting is performed according to the sorting algorithm based on the position relationship, the number of associations, the routing space and the cost, and then the most suitable placement rule for the current space is selected in order for layout. At this time, the layout will be fine-tuned according to the negative feedback processing of the already laid data to leave enough space for the line; finally, inspection and processing are performed to ensure that the layout is reasonable. If an abnormality occurs, random layout is adopted.

[0045] Preferably, in the above technical solution, the multi-condition joint algorithm process is specifically as follows:

[0046] S5.1 determines whether it is a multi-layer layout, and the judgment is based on the processing results when cleaning the data; S5.2 if it is a multi-layer layout, multi-layer layout processing is performed, and then the next processing chain is entered;

[0047] S5.3 If it is not a multi-layer layout, extract the substation list based on the cleaned metadata, and enter different processing functions according to the number of substation lists:

[0048] If num is equal to 1, enter the dealOnlySub function;

[0049] If num is equal to 2, enter the dealTwoSub function;

[0050] If num is equal to 3, enter the dealThreeSub function;

[0051] If num is greater than or equal to 4 and less than or equal to 21, enter the dealFourSub function;

[0052] If num is greater than or equal to 22, the random position exchange method is used for layout, and the process ends and enters the next processing chain;

[0053] The dealOnlySub function and the dealTwoSub function need to calculate the x-coordinate, y-coordinate, single offset and total offset value of the off-station switch, then traverse the calculated tie switch list, process the coordinates of the tie switches and assign them, and finally execute the addSet method. After the traversal is completed, enter the next processing chain;

[0054] The dealThreeSub function and dealFourSub function need to sort and group the tie switches first and perform two-layer loops. Then, they need to calculate the x-coordinate, y-coordinate, offset single offset and width total offset of the off-station switch. Then, they need to traverse the calculated tie switch list and process and assign the coordinates of the tie switches. Finally, they need to execute the addSet method. After the traversal is completed, they will enter the next processing chain.

[0055] The four functions "dealOnlySub", "dealTwoSub", "dealThreeSub" and "dealFourSub" here are different calculation logic functions designed by the multi-conditional joint algorithm for different data differences, so as to obtain better layout effects.

[0056] Preferably, in the above technical solution, in S7, data preprocessing is performed before the line processing algorithm is performed, and the positions of the previously deployed points are counted for spatial calculation; data preprocessing is hierarchical grouping according to the existing data layout relationship, and different layers and different groups perform different routing logic processing; the outer layer substation and the connecting switch routing adopt sequential routing, while ensuring the correctness of the connection and reducing the number of inflection points and intersections; the connecting switch and the main station connection will be judged and automatically classified for routing, and different directions have different outgoing line logics; each line will have a self-checking process after routing to ensure the rationality of the line; each substation line group will be calculated after processing to ensure that the line will be reasonably spaced out later. While the lines of different layers do not interfere, the mapping effect can be more effectively guaranteed.

[0057] Preferably, in the above technical solution, the line processing algorithm flow in S7 is specifically as follows: S7.1 processes the cleaned metadata, calculates the position relationship between all points, and then determines whether the number of substations is greater than 21;

[0058] S7.2 If the number of substations is greater than 21, all lines are shuffled and traversed, and all preset line types and related possible lines of a line are obtained to check whether there is overlap. If there is overlap, a calculation is performed to obtain more complex line conditions again and then determine whether there is overlap until non-overlapping lines are obtained; the position information of non-overlapping lines is recorded and stored in the verification layer, and the next loop is repeated until the traversal is completed, and the line processing algorithm is terminated to enter the next processing chain;

[0059] S7.3 If the number of substations is less than 21, obtain all lines connected to the secondary station, and traverse and process all lines in the secondary station according to the secondary station list: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the type of the two end points of the line, and then calculate and record all the turning point positions of the current line; process the position information of all lines of the secondary station to the verification layer, and then determine whether the position of all lines of the secondary station is a multi-layer layout;

[0060] S7.4 If all line positions of the secondary station are multi-layered, obtain all outer lines connected to the main station and traverse and process: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the type of the two end points of the line, and then calculate and verify all the turning points of the current line. After passing, record them, and finally update the track position information;

[0061] S7.5 processes the chaotic layers on the left and right sides and the lines on the same side on the left and right sides, and finally obtains the inner layer line and performs a loop calculation: calculates the position according to the line type and obtains the corresponding track position, obtains the offset position according to the line end point type, and then calculates and verifies all the turning points of the current line. After passing the verification, the track position information is recorded and updated; until the loop ends, the line processing algorithm ends and enters the next processing chain;

[0062] S7.6 If the positions of all lines of the secondary station are not in a multi-layer layout, obtain all the inner lines connected to the main station and sort them in groups to ensure that the line track sequence is unilaterally increasing; then traverse all lines in order and calculate: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the type of the two end points of the line, and then calculate the position check of all turning points of the current line. After passing the check, record and update the track position information; until the traversal is completed, end the line processing algorithm and enter the next processing chain.

[0063] Preferably, in the above technical solution, the wiring processing in S7 is fine-tuned using a fine-tuning algorithm: different fine-tuning processes are performed in substations, off-site switches, and lines. By calculating whether there is overlap, whether it causes subsequent impact, and whether the spacing is reasonable, different fine-tuning algorithms are used for fine-tuning according to their properties and influencing factors. The final drawing helps to optimize the drawing effect.

[0064] Preferably, in the above technical solution, the off-site switch layout fine-tuning algorithm process is specifically as follows:

[0065] S7.7 determines whether the off-station switch layout is a multi-layer layout;

[0066] S7.8 If the off-station switch layout is a multi-layer layout, the tie switches are grouped and sorted according to the tie relationship of the tie switches and the starting and ending position information of the lines, and divided into 8 levels through left-right and top-bottom layouts. The tie switches are classified according to different levels, and the offset value, x coordinate, y coordinate and width value of the tie switches are obtained by calculating the position of the level;

[0067] S7.9 If the layout of the off-station switch is not a multi-layer layout, fine-tuning shall be performed based on the spacing relationship between the upper and lower positions;

[0068] S7.10 calculates and resets the tie switch coordinates based on the data and records the relevant data, completing the fine-tuning of the off-station switch layout;

[0069] The fine-tuning algorithm process of substation layout is as follows:

[0070] S7.11 determines whether the substation layout is a multi-layer layout;

[0071] S7.12 If the substation layout is a multi-layer layout, the offset value is calculated, all substations are obtained for loop traversal, the substation position is calculated through the data and the offset value, and the coordinate position of the relevant elements and the line is reset; after processing, the coordinate information is counted and the process ends, and the next processing chain is entered;

[0072] S7.13 If the substation layout is not a multi-layer layout, obtain the outer substation for x-axis offset, calculate the substation position through data and offset value, and reset the coordinate position of related elements and lines; after processing, perform coordinate information statistics and end, and enter the next processing chain.

[0073] Compared with the prior art, the present invention has the following beneficial effects:

[0074] The present invention uses a combination of multiple algorithms, utilizes a circular algorithm to perform the initial layout of power plants, utilizes a multi-condition joint algorithm to perform equipment layout, and adopts an algorithm based on the cost exchange idea to perform line planning, thereby successfully improving drawing efficiency and ensuring the quality of the generated distribution network diagram. The present invention provides a faster, more effective, and more accurate solution, successfully solves a series of problems in traditional power distribution network diagram drawing methods, and has broad application prospects and value. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 It is the overall flow chart of the present invention;

[0076] Figure 2 This is the flow chart of the return algorithm;

[0077] Figure 3 Layout flow chart for multiple conditions of contact switch;

[0078] Figure 4 It is the flow chart of line processing algorithm;

[0079] Figure 5 Flowchart of the fine-tuning algorithm. DETAILED DESCRIPTION

[0080] The specific embodiments of the present invention are described in detail below, but it should be understood that the protection scope of the present invention is not limited by the specific embodiments.

[0081] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0082] Glossary of relevant technical terms:

[0083] Controlled randomness: is a strategy where randomness is intentionally introduced and controlled within certain limits to achieve a specific goal. In computer science and mathematics, controlled randomness is often used in optimization problems, especially those that may get stuck in local optimal solutions. By introducing controlled randomness, the algorithm can not only accept solutions that are better than the current solution, but also accept solutions that are worse than the current solution with a certain probability. In this way, the algorithm is less likely to get stuck in a local optimal solution, because even if a local optimal solution is found, it is still possible to choose a worse solution and continue searching from there. This strategy can increase the probability of the algorithm finding the global optimal solution.

[0084] The Floyd-Warshall algorithm is a classic graph theory algorithm that solves the "shortest path problem for all pairs of points". In its working process, it finds a shortest path for each pair of vertices (i.e., the starting point and the end point) in the graph. Based on the principles of dynamic programming, the Floyd-Warshall algorithm determines the shortest path by comparing all possible paths. It finds the shortest path by gradually "improving" the prediction of the path length until no more improvement can be made.

[0085] Configuration file: A configuration file is a specific type of file used to store system or application settings. Users or administrators can modify and manage the behavior of the software by editing the configuration file. In the present invention, users can customize the style of the generated power distribution network diagram by modifying the configuration file, thereby meeting personalized needs and improving the user experience.

[0086] Concurrent processing: Concurrent processing is a processing method in a computer system, which means that the system has the ability to process multiple tasks at the same time. In the present invention, this concurrent processing capability is used to support multiple users to generate power distribution network diagrams at the same time, which improves the system's response speed and service capabilities and enhances the user experience.

[0087] Master station and auxiliary station: In the power system, the master station usually refers to the main substation or distribution station, which are important nodes in the power system. In this invention, the auxiliary station refers to other power stations connected to the master station. The concepts of master station and auxiliary station are used to construct and describe the structure of the power distribution network diagram to clearly represent the layout and operation status of the power system.

[0088] Off-site switch: Off-site switch is a device installed in the power system, which is mainly used to control the flow of current, so as to ensure the safety and stable operation of the system. In the present invention, the distribution of off-site switches is treated as a key element in the generation of power distribution network diagram, and its location and status will directly affect the details and accuracy of the distribution network diagram.

[0089] Example 1

[0090] In order to achieve the purpose of the present invention, the following technical scheme is adopted: Figure 1 As shown:

[0091] First, the input information with topological relationship and configuration information entered by the user are parsed, and the corresponding mode of the drawing object is generated through the drawing factory. Then, data type conversion and data cleaning are performed to ensure the correctness and consistency of the data. Next, the data is passed to the processing chain in the drawing object, and the data is calculated and processed through different processing chains. Finally, it is encapsulated into an output format file and output to the user. The specific steps are as follows:

[0092] Parameter preprocessing: Parameter preprocessing is an important step in the data processing process, which involves parsing and converting the input substation topology data in JSON format for subsequent analysis and application.

[0093] Substation layout processing: Place the main substation in the center of the canvas, and distribute other auxiliary substations evenly and randomly around the canvas. Divide the area into equal parts, and then randomly select a location in each area to place the auxiliary substation. The return algorithm is used to calculate the final location.

[0094] Substation coordinate fine-tuning: This step is to avoid mutual overlap between substations, and appropriate adjustments will be made to the substation layout.

[0095] Switch location processing within the station: The location of switches within the station is arranged and relevant information is calculated based on the actual association relationship of the power equipment.

[0096] Off-site switch distribution processing: The off-site switches are evenly distributed between the connected main station and auxiliary stations. This is also achieved by dividing the area and calculating the position through a multi-condition joint algorithm.

[0097] Switch orientation processing within the station: Determine the orientation of each switch within the station. It is necessary to ensure that it is consistent with the orientation of the contact switch while also considering that the text can be displayed completely.

[0098] Wiring processing: For each pair of main stations, auxiliary stations and off-site switches that need to be connected, use the Floyd-Warshall algorithm to find an initial path to ensure that the found path is composed of a series of horizontal and vertical straight line segments. Then, fine-tune the line processing algorithms of different specifications according to the connection relationship and position relationship.

[0099] Line labeling: Label each line, including line name, voltage and other information.

[0100] Line rectangle processing: Display each line in the form of a rectangular strip. The width of the line can represent the voltage or current of the line.

[0101] Color processing: Assign different colors to different types of devices and lines to facilitate user differentiation.

[0102] Anchor point processing: Add anchor points at the turning points and end points of the line to facilitate manual adjustments by users.

[0103] Resize recovery: If the canvas was scaled in the previous step, this step needs to restore it to its original size.

[0104] Text processing: Add text descriptions to devices and lines, including device name, voltage and other information.

[0105] Output processing: Convert the processed data into JSON format and output it to the front end for display.

[0106] The algorithm has achieved optimizations in terms of performance, graphics quality and usage of computing resources, so that most power distribution network graphics can be generated in about one second with good graphics quality and without the need for manual adjustment.

[0107] Specifically, the mapping performance is optimized through the following efficient algorithm steps:

[0108] Controlled random layout: The substation is evenly laid out around the grid using a “controlled random” approach, which maximizes the efficiency of the layout process while ensuring layout rules.

[0109] Layout off-site switches nearby: Layout off-site switches nearby so that they are as close to the substations they are connected to as possible, reducing the complexity of the line and improving the efficiency of generating graphics.

[0110] Reasonable routing: During the routing process, try to ensure that the lines are evenly distributed and avoid the phenomenon of lines crossing the graphics elements, which improves the readability and aesthetics of the graphics.

[0111] Master station switch translation: For the off-site switches connected to the intermediate master station itself, they are translated upward and downward respectively to leave more horizontal routing space for the lines, thereby avoiding crossing and overlapping of the lines.

[0112] Optimize the spacing between off-site switches: Under the premise of avoiding line overlap, appropriately reduce the spacing between off-site switches to reduce the complexity and congestion of the graphics and improve the readability of the graphics.

[0113] Back-type algorithm: Figure 2As shown in the figure, 8 different combinations are generated through 4 sets of random Boolean numbers. Different combinations of substations are arranged according to the set of substations in each map, ensuring the data relationship while leaving enough space for routing. When the number of substations is less than 5, a triangular layout is adopted, and when the number of substations is greater than or equal to 5, a circular layout is adopted, which is more effective in showing the map effect. The distance and location of the stations will be calculated through the contact relationship to ensure that the algorithm has enough space for processing and calculation.

[0114] Specific return algorithm process:

[0115] First, extract the substation list based on the cleaned metadata, and determine whether the substation list size is 0. If not, directly end and enter the next processing chain.

[0116] If the substation list is greater than 0, the calculation phase begins.

[0117] The calculation phase mainly deals with some parameters:

[0118] maxWidth: The maximum width is calculated based on the number of substations and the number of external tie switches.

[0119] yNum: Gets the Y-axis difference between the maximum and minimum points randomly obtained by the previous processing chain.

[0120] xNum: Gets the X-axis difference between the maximum and minimum points randomly obtained in the previous processing chain.

[0121] proportion: The coefficient obtained by multiplying the number of off-site tie switches by the threshold after mathematical calculation.

[0122] widthValue: The width of the rectangle occupied by the substation in the layout is obtained based on mathematical calculations.

[0123] moderate: The coefficient of the canvas based on the comparison.

[0124] proportionValue: The threshold proportion coefficient calculated in the algorithm based on the number of substations and the number of off-station tie switches.

[0125] moderateWidth: The width of the canvas during calculations in the algorithm.

[0126] moderateHeight: The height of the canvas when calculating in the algorithm.

[0127] After the calculation is successful, the substation layout is carried out, and the substation list is processed according to the number num of substations after the main station: if num is equal to 1, the upper and lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results. If num is equal to 2, the upper and lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results. If num is equal to 3, the upper two lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results. If num is greater than or equal to 4 and less than or equal to 21, the circular distribution arrangement method is selected according to the four groups of random numbers, and the groups are arranged according to the number, and finally the coordinates of all substations are calculated according to the results. If num is greater than 20, the random mapping method is used for the mouth layout, and the coordinates of all substations are calculated according to the results.

[0128] After processing, the coordinate information is counted and the process ends, entering the next processing chain.

[0129] Tie switch multi-condition algorithm: Figure 3 As shown in the figure: After the substation is laid out, the substation-related tie switches are first selected according to the tie relationship and grouped. After grouping, calculations are performed: sorting is performed according to the position relationship, number of associations, routing space, and cost. After sorting, the most suitable placement rule for the current space is selected in order for point distribution. At this time, the point distribution will be fine-tuned according to the data of the deployed points for negative feedback processing to leave enough space for the line. Finally, the point distribution is checked to ensure that the point distribution is reasonable. If there is an abnormality, random point distribution is used.

[0130] Tie switch multi-condition layout process:

[0131] First, determine whether it is a multi-layer layout, based on the processing results of cleaning data. If it is, perform multi-layer layout processing, and end to enter the next processing chain.

[0132] Otherwise, the substation list is extracted based on the cleaned metadata, and different processing functions are entered according to the number of substation lists:

[0133] If num is equal to 1, enter the dealOnlySub function.

[0134] If num is equal to 2, enter the dealTwoSub function.

[0135] If num is equal to 3, enter the dealThreeSub function.

[0136] If num is greater than or equal to 4 and less than or equal to 21, enter the dealFourSub function.

[0137] If num is greater than or equal to 22, the random position exchange method is used for layout, and the process ends and enters the next processing chain.

[0138] The dealOnlySub function is similar to the dealTwoSub function. Both functions need to calculate the x-coordinate, y-coordinate, single offset and total offset of the off-station switch. Then, the calculated tie switch list is traversed and the coordinates of the tie switches are processed and assigned. Finally, the addSet method is executed. After the traversal is completed, the next processing chain is entered.

[0139] The dealThreeSub function is similar to the dealFourSub function. It needs to sort and group the tie switches and loop twice. Then it calculates the x-coordinate, y-coordinate, offset single offset and width total offset of the off-station switch. Then it traverses the calculated tie switch list and processes and assigns the coordinates of the tie switches. Finally, it executes the addSet method. After the traversal, it enters the next processing chain. The four functions "dealOnlySub", "dealTwoSub", "dealThreeSub" and "dealFourSub" here are different calculation logic functions designed by this algorithm for different data differences, so as to obtain better layout effects.

[0140] Line processing algorithms such as Figure 4 :Before the line processing algorithm is implemented, data preprocessing is performed, and the locations of previously deployed points are counted for spatial calculation. The line processing algorithm begins by layering and grouping according to the existing data layout relationship, and different layers and groups perform different routing logic processing. The outer layer substation and the contact switch are routed sequentially to ensure the correctness of the connection while reducing the number of inflection points and intersections. The connection between the contact switch and the main station will be judged and automatically classified for routing, and different directions will have different outgoing line logics. After each line is routed, there will be a self-check process to ensure the rationality of the line; after each substation line group is processed, the space will be calculated to ensure that the line is reasonably spaced out later. While the lines of different layers do not interfere with each other, the mapping effect can be more effectively guaranteed.

[0141] The line processing algorithm flow is as follows Figure 4 :

[0142] First, the cleaned metadata is processed to calculate the positional relationship between all points, and then it is determined whether the number of substations is greater than 21.

[0143] If so, all routes are shuffled and traversed to obtain all preset route types and related possible routes for a route, and then check whether there is overlap. If so, calculate and re-obtain more complex route conditions and then judge whether there is overlap until the optimal route is obtained. Then record the route location information and store it in the verification layer, loop the next one until the traversal is completed, and end the route processing algorithm to enter the next processing chain.

[0144] If not, obtain all lines connected to the secondary station, and traverse all lines in the secondary station according to the secondary station list: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the type of the two end points of the line, and then calculate and record all the turning point positions of the current line. Then process the position information of all lines in the secondary station to the verification layer, and then determine whether it is multi-layer processing. If it is a multi-layer layout, obtain all the outer lines connected to the main station and traverse and process: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the type of the two end points of the line, and then calculate all the turning point positions of the current line. After passing, record, and finally update the track position information.

[0145] Then process the chaotic layers on the left and right sides and the lines on the same side on the left and right sides, and finally obtain the inner layer lines and loop calculation: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the line end point type, calculate the position check of all inflection points of the current line, record it after passing, and finally update the track position information. Until the end of the loop, the line processing algorithm ends and enters the next processing chain. If it is not a multi-layer layout, obtain all the inner lines connected to the main station, and sort them in groups to ensure that the line track sequence is unilaterally increasing. Then traverse all lines in order and calculate: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the line end point type, calculate the position check of all inflection points of the current line, record it after passing, and finally update the track position information. Until the traversal ends, the line processing algorithm ends and enters the next processing chain.

[0146] Fine-tuning algorithms such as Figure 5 :Different fine-tuning processing will be performed on substations, off-site switches and lines. By calculating whether there is overlap, whether it causes subsequent impact, whether the spacing is reasonable, etc., different fine-tuning algorithms are used for fine-tuning processing according to their specific properties and influencing factors. The final map helps to optimize the mapping effect.

[0147] Fine-tuning algorithm flow Figure 5 :

[0148] First, fine-tune the contact switch to determine whether it is a multi-layer layout.

[0149] If it is a multi-layer layout, it will be grouped and sorted according to the contact relationship of the tie switches, the starting and ending positions of the lines, and then layered, divided into 8 levels through left and right, up and down layouts, and then the tie switches will be classified according to different levels, and the position of the level will be calculated to obtain the offset value, x coordinate, y coordinate and width value of the tie switch. If it is not a multi-layer layout, it will be fine-tuned according to the relationship between the upper and lower position spacing.

[0150] Calculate and reset the tie switch coordinates based on the data and record the relevant data, thus completing the fine-tuning process of the tie switch.

[0151] Then the substation is fine-tuned to determine whether it is a multi-layer layout.

[0152] If it is a multi-layer layout, the offset value is calculated, and then all substations are obtained for loop traversal. The substation location is calculated through the data and offset value, and the coordinate positions of related elements and lines are reset. If not, the outer substation is obtained for x-axis offset, and the substation location is calculated through the data and offset value, and the coordinate positions of related elements and lines are reset. After processing, the coordinate information is counted and the process ends, and the next processing chain is entered.

[0153] The following are the effects of the present invention:

[0154] Improve work efficiency and cost-effectiveness: Most power distribution network graphics can be generated in about one second, with good graphics effect and no manual adjustment. The loop algorithm and multi-condition joint algorithm reduce the amount of calculation by 40%. When processing data under different conditions, the algorithm is more flexible and efficient, the graphics efficiency is increased by 30%, and the calculation time is reduced from minutes to seconds.

[0155] Ensure graphic quality and reduce subsequent adjustments: The line processing algorithm improves the aesthetics of the finished image by 30%, and the line layout is clearer and more intuitive. Adapting to 5 special data connection relationships makes the algorithm more versatile and can handle diverse data without affecting aesthetics and efficiency. Fine-tuning algorithm effect improvement: The fault tolerance rate is improved, making the algorithm more robust for incomplete or abnormal data. In the fine-tuning process, more attention is paid to the optimization of aesthetics, which improves the visual effect of the final image.

[0156] Highly customized user experience: The present invention allows users to customize the style of the generated power distribution network diagram by editing the configuration file, including the display method of the lines, the layout method of the distribution stations, etc. The customizability enables users to generate graphics according to their own work habits and needs, thereby improving work efficiency.

[0157] Powerful concurrent processing capability: The present invention can effectively support concurrent requests from multiple users, and can maintain a fast response speed even when multiple users are generating graphics at the same time, showing excellent concurrent processing capability. This greatly improves the service capability of the system, and can provide a satisfactory user experience in both large-scale and high-concurrency application scenarios.

[0158] Flexibility with low hardware requirements: The present invention can adapt to the actual conditions and needs of various power users, thus greatly broadening its scope of application and market prospects.

[0159] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A new automatic drawing method for power distribution network diagram, which parses the input information and configuration information with topological relationship input by the user. The drawing module encapsulates the input information and configuration information into a drawing object of the corresponding mode with reference to the characteristics of the factory mode in the design mode; performs data type conversion and data cleaning operations; passes the data into the processing chain in the drawing object, and calculates and processes the data through different processing chains; encapsulates it into an output format file and outputs it to the user, Features: The specific steps of the different processing chains are as follows: S1 parameter preprocessing: used to parse and convert the input substation topology data in JSON format for subsequent analysis and application; S2 Substation layout processing: Place the main substation in the center of the canvas, and evenly and randomly distribute other auxiliary substations around the canvas. Divide the area into equal parts, and then randomly select a location in each area to place an auxiliary substation. The return algorithm is used to calculate the final location. S3 Substation coordinate fine-tuning processing: used to make appropriate adjustments to the substation layout to avoid mutual overlap between substations; S4 In-station switch layout processing: The location of the in-station switches is arranged according to the actual association relationship of the power equipment and the relevant information is calculated; S5 off-site switch point processing: The off-site switches are evenly distributed between the connected main station and auxiliary station by dividing the area, and the positions are calculated by a multi-condition joint algorithm; S6 Station switch orientation processing: the orientation of each station switch is consistent with the orientation of the tie switch, and the text is displayed completely; S7 wiring processing: For each pair of master stations, auxiliary stations and off-site switches that need to be connected, the Floyd-Warshall algorithm is used to find an initial path, which is composed of a series of horizontal and vertical line segments; different specifications of line processing algorithms are used for fine-tuning according to the connection relationship and position relationship; S8 line labeling processing: label each line, including the line name and voltage information; S9 Line Rectangle Processing: Display each line in the form of a rectangular strip, and the width of the line indicates the voltage or current of the line; S10 color processing: assign different colors to different types of devices and lines; S11 Anchor point processing: add anchor points at the turning point and end point of the line; S12 Resize recovery: If the canvas is scaled during the substation layout and substation coordinate fine-tuning steps, this step requires recovery to the original size. S13 text processing: add text descriptions to devices and lines, including device names and voltage information; S14 output processing: convert the processed data into JSON format and output it to the front end for display; the specific process of the return algorithm is as follows: S2.1 extracts the substation list according to the cleaned metadata, and determines whether the substation list size is 0; if not, it ends directly and enters the next processing chain; S2.2 If the substation list is greater than 0, enter the calculation stage; The S2.3 calculation stage mainly deals with some parameters: maxWidth: Calculate the maximum width value based on the number of substations and the number of external tie switches; yNum: Get the Y-axis difference between the maximum and minimum points randomly obtained by the previous processing chain; xNum: Gets the X-axis difference between the maximum and minimum points randomly obtained in the previous processing chain; proportion: the coefficient obtained by multiplying the number of off-site tie switches by the threshold after mathematical calculation; widthValue: The width of the rectangle occupied by the substation in the layout is obtained based on mathematical calculations; moderate: The coefficient of the canvas is obtained based on the comparison; proportionValue: the threshold proportion coefficient calculated in the algorithm based on the number of substations and the number of off-station tie switches; moderateWidth: The width of the canvas when calculating in the algorithm; moderateHeight: The height of the canvas when calculating in the algorithm; S2.4 After the calculation is successful, the substation layout is carried out, and the substation list number num is processed according to the substation list after the main station: if num is equal to 1, the upper and lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results; if num is equal to 2, the upper and lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results; if num is equal to 3, the upper two lower distribution arrangement method is selected according to the four groups of random numbers, and the coordinates of all substations are calculated according to the results; if num is greater than or equal to 4 and less than or equal to 21, the circular distribution arrangement method is selected according to the four groups of random numbers, and the groups are arranged according to the number, and finally the coordinates of all substations are calculated according to the results; if num is greater than 21, the random mapping method is used for the mouth layout, and the coordinates of all substations are calculated according to the results; After S2.5 processing, coordinate information statistics are performed and the process ends, and the next processing chain is entered; The specific process of the multi-condition joint algorithm is as follows: S5.1 determines whether it is a multi-layer layout, and the judgment is based on the processing results when cleaning the data; S5.2 If it is a multi-layer layout, then multi-layer layout processing is performed, and then the next processing chain is entered after the end; S5.3 If it is not a multi-layer layout, extract the substation list based on the cleaned metadata, and enter different processing functions according to the number of substation lists: If num is equal to 1, enter the dealOnlySub function; If num is equal to 2, enter the dealTwoSub function; If num is equal to 3, enter the dealThreeSub function; If num is greater than or equal to 4 and less than or equal to 21, enter the dealFourSub function; If num is greater than or equal to 22, the random position exchange method is used for layout, and the process ends and enters the next processing chain; The four functions dealOnlySub, dealTwoSub, dealThreeSub and dealFourSub are different calculation logic functions designed by the multi-conditional joint algorithm for different data differences; The dealOnlySub function and the dealTwoSub function need to calculate the x-coordinate, y-coordinate, single offset and total offset value of the off-station switch, then traverse the calculated tie switch list, process the coordinates of the tie switches and assign them, and finally execute the addSet method. After the traversal is completed, enter the next processing chain; The dealThreeSub function and dealFourSub function need to sort and group the tie switches and perform two-layer loops first, then calculate the x-coordinate, y-coordinate, offset single offset and width total offset of the off-station switch, then traverse the calculated tie switch list and process and assign the coordinates of the tie switches, and finally execute the addSet method. After the traversal is completed, enter the next processing chain; The specific flow of the line processing algorithm in S7 is as follows: S7.1 processes the cleaned metadata, calculates the positional relationship between all points, and then determines whether the number of substations is greater than 21; S7.2 If the number of substations is greater than 21, all lines are shuffled and traversed, and all preset line types and related possible lines of a line are obtained to check whether there is overlap. If there is overlap, a calculation is performed to obtain more complex line conditions again and then determine whether there is overlap until non-overlapping lines are obtained; the position information of non-overlapping lines is recorded and stored in the verification layer, and the next loop is repeated until the traversal is completed, and the line processing algorithm is terminated to enter the next processing chain; S7.3 If the number of substations is less than 21, obtain all lines connected to the secondary station, and traverse and process all lines in the secondary station according to the secondary station list: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the type of the two end points of the line, and then calculate and record all the turning point positions of the current line; Process the location information of all lines of the secondary station to the verification layer, and then determine whether the location of all lines of the secondary station is a multi-layer layout; S7.4 If all line positions of the secondary station are multi-layered, obtain all outer lines connected to the main station and traverse and process: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the type of the two end points of the line, and then calculate and verify all the turning points of the current line. After passing, record them, and finally update the track position information; S7.5 processes the left and right chaotic layers and the left and right lines on the same side, and finally obtains the inner layer line and performs a loop calculation: calculates the position according to the line type and obtains the corresponding track position, obtains the offset position according to the line end point type, and then calculates and verifies the position of all turning points of the current line. After passing, records and updates the track position information; Until the loop ends, the line processing algorithm ends and enters the next processing chain; S7.6 If the positions of all lines of the secondary station are not in a multi-layer layout, obtain all the lines in the inner layer connected to the main station, and sort them in groups to ensure that the line track sequence is unilaterally increasing; then traverse all lines in order and calculate: calculate the position according to the line type and obtain the corresponding track position, obtain the offset position according to the type of the two end points of the line, and then calculate and verify all the turning points of the current line. After passing, record and update the track position information; Until the traversal is completed, the line processing algorithm ends and enters the next processing chain; The fine-tuning of wiring processing in S7 adopts a fine-tuning algorithm: the corresponding fine-tuning processing is carried out in the substation, the switch outside the station and the line, by calculating whether there is overlap, whether it causes subsequent impact, and whether the spacing is reasonable, and the corresponding fine-tuning algorithm is used to perform fine-tuning processing according to the attributes and influencing factors; The fine-tuning algorithm process of the off-site switch layout is as follows: S7.7 determines whether the off-station switch layout is a multi-layer layout; S7.8 If the off-station switch layout is a multi-layer layout, the tie switches are grouped and sorted according to the tie relationship of the tie switches and the starting and ending position information of the lines, and divided into 8 levels through left-right and top-bottom layouts. The tie switches are classified according to different levels, and the offset value, x coordinate, y coordinate and width value of the tie switches are obtained by calculating the position of the level; S7.9 If the layout of the off-station switch is not a multi-layer layout, fine-tuning shall be performed based on the spacing relationship between the upper and lower positions; S7.10 calculates and resets the tie switch coordinates based on the data and records the relevant data, completing the fine-tuning of the off-station switch layout; The fine-tuning algorithm process of substation layout is as follows: S7.11 determines whether the substation layout is a multi-layer layout; S7.12 If the substation layout is a multi-layer layout, the offset value is calculated, all substations are obtained for loop traversal, the substation position is calculated through the data and the offset value, and the coordinate position of the relevant elements and the line is reset; after processing, the coordinate information is counted and the process ends, and the next processing chain is entered; S7.13 If the substation layout is not a multi-layer layout, obtain the outer substation for x-axis offset, calculate the substation position through data and offset value, and reset the coordinate position of related elements and lines; after processing, perform coordinate information statistics and end, and enter the next processing chain.

2. According to the new automatic drawing method of power distribution network diagram according to claim 1, Features: The circular algorithm in the substation layout processing in S2 generates 8 different combinations through 4 groups of random Boolean numbers, and performs circular layout corresponding to different combinations according to the substation sets in each map, ensuring the data relationship while leaving enough space for routing. When the number of substations is less than 5, a triangular layout is adopted, and when the number of substations is greater than or equal to 5, a circular layout is adopted; the distance and position of the substations will be calculated through the contact relationship.

3. According to the new automatic drawing method of power distribution network diagram described in claim 1, Features: The multi-condition joint algorithm in S5 is to select the interconnecting switches associated with the substation according to the interconnection relationship after the substation is laid out, and then group them. After grouping, calculations are performed: sorting algorithms are used to sort according to positional relationships, number of associations, routing space, and cost. After sorting, the most suitable placement rules for the current space are selected in order for point distribution. The point distribution is fine-tuned and feedback is processed based on the data of the deployed points. Finally, an inspection is performed, and if any abnormality occurs, random point distribution is used.

4. According to the new automatic drawing method of power distribution network diagram described in claim 1, Features: In S7, data preprocessing is performed before the line processing algorithm is performed, and the positions of previously deployed points are counted for spatial calculation; Data preprocessing is to divide the data into layers and groups according to the existing data layout relationship, and different layers and groups are processed with different routing logics. The outer layer substation and interconnection switch routing adopts sequential routing to ensure the correctness of the connection while reducing the number of turning points and crossings. The interconnection switch and the main station connection will be judged and automatically classified for routing, and different directions have different outgoing line logics. After each line is routed, self-inspection is performed to ensure the rationality of the line. The space is calculated after processing the line group of each substation.