Generation method and system of power distribution network topological graph, and storage medium
By rendering the power distribution network line model on the map and combining node coordinates and standard span constraints, the problem of the inability to integrate network structure diagrams and geographic maps in existing technologies is solved. This enables the display of the connection relationship and actual distribution of power grid equipment, simplifies the update process, and supports the visualization of dependencies.
Patent Information
- Application Number
- CN202511546204.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-02-17
AI Technical Summary
Existing methods for generating power distribution network topology maps cannot simultaneously ensure electrical readability and geographical accuracy, resulting in the inability to directly integrate network structure maps and geographical maps. Users need to manually switch between the two views for comparison, making the update process cumbersome.
By reading the element information from the design model file, a power distribution network line model is generated, and a topology map is rendered on the map. Combining node coordinates and standard span constraints, the connection relationship and actual distribution of power grid equipment are displayed, integrating network structure diagrams and geographic maps.
It enables the display of the connection relationships and actual distribution of power grid equipment on the same map, prevents overlap, supports the visualization of dependencies, and simplifies the update process.
Smart Images

Figure CN121543230A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid technology, and specifically to a method, system, and storage medium for generating distribution network topology diagrams. Background Technology
[0002] A topology diagram is a graphical representation of the relationships between elements in a network, system, or structure. It displays these relationships through nodes (usually representing elements or locations) and edges (representing connections or relationships between elements). Distribution network design typically involves numerous devices and complex connections; to more clearly illustrate the relationships between elements in a distribution network, a topology diagram is used to show the connections between the various devices.
[0003] Existing methods for generating distribution network topology diagrams mainly fall into three categories:
[0004] The first type is the map overlay method based on GIS geographic coordinates: the line-equipment coordinates exported from SCADA / EMS are directly drawn on the electronic map, and then the line is straightened by manual dragging.
[0005] The second type is the automatic layout method based on graph theory grid arrangement: with substations as nodes and feeders as edges, after establishing an adjacency matrix, the node coordinates v are calculated in one go using force-oriented, layered or grid constraint algorithms to generate a single-line diagram or ring network diagram.
[0006] The third type is the model-driven method based on CIM / SVG models: first, the CIM / XML file is parsed to extract objects and connection relationships, then the SVG primitive library is called to instantiate device symbols, and finally the vector image is output according to the principle of horizontal and vertical alignment and no intersection or overlap.
[0007] Specifically, existing methods for generating distribution network topology maps mainly have the following problems:
[0008] Network structure diagrams (Category II and III) and geographic maps (Category I) represent two technical approaches. Network structure diagrams (single-line diagrams / ring network diagrams) only recognize connection relationships, and their original data comes from the topology table (Node-Edge list) of EMS / PMS, containing little or no coarse-grained coordinates. Geographic maps (GIS maps) prioritize surveying-grade coordinate accuracy, with data sourced from land surveying or on-site GPS measurements, and connection relationships are manually added and supplemented afterward.
[0009] The core of a network structure diagram is electrical readability, which means that busbars are aligned, feeder directions are consistent, and there are minimal intersections, while coordinates are allowed to drift arbitrarily. The core of a geographic diagram is geographic fidelity, which means that poles and towers must be located on the roadside and power distribution rooms must be within the red line. Whether electrical lines intersect is not within the scope of assessment.
[0010] The network structure diagram outputs SVG / CIM vectors without a projected coordinate system, making it impossible to overlay with tile maps. The geographic map outputs Shapefile / GeoJSON with projection. Although GIS layers can store connection relationships through extended fields, such attributes are not mandatory requirements for surveying and mapping deliverables. In actual production, they are often missing or only record physical connections, and electrical node numbers are not strictly aligned, making them difficult to directly use by graph theory algorithms. The incompatibility of the two file formats forces the front-end to choose between two options: either load a pure geographic pole layer or a pure logical single-line map. Due to the lack of a unified electrical-geographic semantic mapping layer, the existing front-end needs to load two services separately, making it impossible to directly complete topology analysis and geographic measurement on the same layer simultaneously. Users still need to manually switch between the two views for comparison.
[0011] When updates are needed, the network structure map is created by the scheduler pulling lines in EMS, saving, and recreating the map; the geographic map is created by the surveying team going to the site to measure the coordinates of new towers, and then going through the surveying, review, and data entry process.
[0012] In terms of data source, processing purpose, output format, and update mechanism, the network structure diagram and the geographic map are misaligned. Summary of the Invention
[0013] The purpose of this application is to provide a method for generating a power distribution network topology map, which can display both the connection relationship of power grid equipment and the actual distribution of power grid equipment on the map, thereby realizing the fusion of network structure map and geographical map.
[0014] To solve the above-mentioned technical problems, the solution adopted in this application is as follows:
[0015] A method for generating a power distribution network topology diagram, the implementation process of which is as follows:
[0016] Read the feature information for constructing the topology map from the design model file. The feature information includes the features and their corresponding feature attributes, and store the feature information in a structured manner.
[0017] Based on the element information, generate and store the power distribution network line model data.
[0018] Load the map control, call the line model data, render the distribution network line model on the map control, and visualize the topology diagram.
[0019] The elements include: devices that serve as nodes in the topology graph and power distribution lines that serve as connecting lines in the topology graph.
[0020] As a specific implementation plan, the element information also includes the element attributes corresponding to each element, and the elements and element attributes are mapped and stored; when rendering on the map control, the rendering is performed based on the node coordinates and standard range constraints in the element attributes.
[0021] As a specific implementation plan, element attributes include: node attributes, connection attributes, and dependency attributes;
[0022] Node attributes include: node number, node type, node coordinates, and node symbol;
[0023] Connection attributes include: connector number, connector type, standard span, connection symbol, front end coordinates, and back end coordinates.
[0024] As a specific implementation plan, the process of generating power distribution network line model data based on element information includes: traversing element information, calculating and selecting the node with the lowest in-degree based on connection relationships and configuring it as the starting reference point of the topology graph, marking and storing the node used as the starting reference point; constructing and storing all line models based on the starting reference point.
[0025] The critical path model is selected from all route models, marked, and stored. When rendering on the map control, the critical path model is used as the first route model to be rendered, and then other route models are rendered.
[0026] As a specific implementation plan, the method for generating the circuit model is as follows:
[0027] Step S1: When generating the line model, based on the connection relationship, generate a line model including the start point and the end point one by one in the form of node-connector-node, and assign the nodes and connecting lines on the line model to the occupied mark and store them;
[0028] Step S2: Based on the nodes on the generated line model, use them as the starting point of other line models. Read the connection relationship with the nodes on the line model as the preceding nodes. After filtering out the nodes and connecting lines corresponding to the occupied markers, generate a line model including the starting point and the ending point one by one according to the node-connecting line-node form. Repeat step S2 to generate all line models.
[0029] As one specific implementation, rendering the critical path model on the map control includes the following process:
[0030] Step A1: Call the critical path model, and based on the coordinate attributes in the node corresponding to the starting reference point in the critical path model, render it to the corresponding coordinate projection of the map control to generate node symbols.
[0031] Step A2: Starting from the node corresponding to the starting reference point, read the connecting line in the critical path model whose front-end coordinates are the same as the coordinates of the node corresponding to the starting reference point;
[0032] Step A3: Based on the coordinates of the front end and the back end of the connecting line, calculate the original azimuth angle of the connecting line and compare it with the reference drawing line of the node as the starting point. Determine whether the comparison deviation is within the tolerance range. If yes, align the connecting line to the reference drawing line and render the connecting line with the path of the reference drawing line as the standard. If no, render the connecting line on the map according to the original azimuth angle of the connecting line. The geometric length of the rendered connecting line is constrained by the standard span or the difference between the front end coordinates and the back end coordinates.
[0033] Step A4: Record the map display coordinates of the endpoint of the connector line rendered on the map control; compare the map display coordinates with the node coordinates corresponding to the node connected to the end of the connector line in the feature information, and determine whether the map display coordinates are within the tolerance range of the node coordinates. If yes, proceed to step A5; otherwise, output a warning message.
[0034] Step A5: Based on the coordinates displayed on the map, render the node symbols corresponding to the nodes connected to the back end of the connecting line on the map control, and use them as the new starting point to repeat steps A3-A5 until the critical path model is fully rendered on the map control.
[0035] During the above process, nodes, connecting lines, and line models that have been rendered on the map control will be marked as occupied.
[0036] As one specific implementation method, rendering an unmarked route model on a map control includes: for each node on the already rendered path, rendering the unrendered route model starting from each node. The implementation process is as follows:
[0037] Step B1: Read the connection relationship of the starting node, obtain the number of connecting lines corresponding to the node. When any node has at least two connecting lines, filter out the occupied connecting lines, calculate the deviation between the remaining connecting lines and the baseline drawing line of the starting node, and determine whether the deviation is within the tolerance range. If yes, proceed to step B2. If no, render the connecting lines on the map based on the actual front and back coordinates of the connecting lines.
[0038] Step B2: Determine if the number of connecting lines within the same tolerance range is 1. If yes, align the connecting line to the baseline drawing line and render the connecting line using the path of the baseline drawing line as the standard. If no, proceed to step B3.
[0039] Step B3: Align the connecting line with the smallest deviation from the baseline drawing line to the baseline drawing line, and render the connecting line using the path of the baseline drawing line as the standard;
[0040] Step B4: Group the unrendered connecting lines in the node connection line into four quadrants with the origin as the origin, count the number of connecting lines in each quadrant, and calculate the display azimuth angle of each quadrant based on the number of connecting lines in a 90° range. According to the principle of proximity, match the connecting line with the display azimuth angle in the quadrant one by one, and determine the tolerance between the display azimuth angle of each connecting line and the original azimuth angle calculated based on the coordinates of the front end and the back end of the connecting line. If it is within the tolerance range, render the connecting line according to the display azimuth angle. If it is outside the tolerance range, render the connecting line according to the original azimuth angle.
[0041] Step B5: Record the map display coordinates of the endpoint of the connector line rendered on the map control; compare the map display coordinates with the node coordinates corresponding to the node connected to the end of the connector line in the feature information, and determine whether the map display coordinates are within the tolerance range of the node coordinates. If yes, proceed to step B6; otherwise, output a warning message.
[0042] Step B6: Based on the coordinates displayed on the map, render the node symbols corresponding to the nodes connected to the back end of the connecting lines on the map control, and use them as the new starting point to repeat steps B1-B6 until all line models are rendered on the map control.
[0043] As one specific implementation, the elements also include dependencies between devices and power lines, as well as dependencies between devices, as additional information in the topology diagram;
[0044] Feature attributes also include: dependency attributes;
[0045] Dependency attributes include: dependency number, dependency type, standard file size, and dependency symbol;
[0046] When rendering a topology map on a map, dependency symbols are rendered on the map based on dependencies and dependency attributes. These dependency symbols are visually connected between nodes with dependencies and between nodes and connecting lines.
[0047] The visible location of the dependent symbol on the map, the geometric length of the representation, and the coordinates in the dependent attribute and node attribute are all considered.
[0048] A power distribution network topology generation system, characterized in that it includes an element reading unit, a structured storage unit, a topology generation unit, and a line model generation unit;
[0049] The feature reading unit is used to read feature information after the design model file is input and store it in the structured storage unit;
[0050] The route model generation unit retrieves feature information from the structured storage unit, generates all route models, and stores them in the structured storage unit.
[0051] The topology map generation unit retrieves route model information and feature information from the structured storage unit and generates a visual topology map on the loaded map control according to the prescribed topology map generation method.
[0052] A storage medium, serving as a carrier, stores instructions for a method of generating a power distribution network topology as described above.
[0053] The present invention has the following beneficial effects:
[0054] This invention enables the display of both the connection relationships of power grid equipment and the actual distribution of power grid equipment on a map, thereby achieving the fusion of network structure map and geographic map.
[0055] In this invention, by introducing dependencies, the connection relationships between devices and between devices and power lines can be displayed in the topology diagram.
[0056] In this invention, the process of rendering on the map can achieve anti-overlap. Attached Figure Description
[0057] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0059] It should be understood that although the terms first, second, etc., may be used herein to describe various modules, these modules should not be limited by these terms. These terms are only used to distinguish one module from another. For example, a first module may be referred to as a second module, and similarly, a second module may be referred to as a first module, without departing from the scope of the exemplary embodiments of the invention.
[0060] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.
[0061] First, let's clarify the meaning of the technical terms in the following embodiments:
[0062] [Dependency Relationship] indicates that some equipment must depend on another equipment to exist; they cannot be set up independently. For example, pole-mounted equipment, guy wires, and struts cannot exist independently and need to be installed on poles or towers; non-portal crossarms need to be installed on the downstream line, and fault indicators need to be installed on overhead lines or cables.
[0063] Example
[0064] like Figure 1 As shown, the first aspect of this embodiment provides a method for generating a distribution network topology diagram, the implementation of which includes the following steps:
[0065] Step S100: Obtain information on each element and its attributes based on the design data, and store them in a structured manner; the element information includes nodes formed by equipment, power distribution lines that reflect the connection relationship between nodes, and dependent elements that reflect the dependency relationship between nodes and between nodes and power distribution lines; that is, dependent elements include node dependency that reflects the dependency relationship between nodes; and line dependency that reflects the dependency relationship between nodes and power distribution lines.
[0066] Specifically, in this step, feature information and its attributes are obtained through feature layers, which include node type layers, connection relationship layers, and dependency relationship layers.
[0067] Users use power distribution design software to save the designed power grid data in corresponding layers. By reading the node type layer, the user obtains the element data that serves as the node. By reading the connection relationship layer, the user obtains the power distribution lines that reflect the connection relationships between nodes. By reading the dependency relationship layer, the user obtains the dependency elements that reflect the dependency relationships between nodes or between nodes and power distribution lines.
[0068] For example, node type layer information includes: poles, electrical equipment, cable wells, meters, and portal crossarm layers. These can exist independently or be connected to other nodes through connection relationship layers.
[0069] For example, the connection relationship layer information includes: service line, cable, overhead line, and special guy wire layers, which are used to connect each node and record the connection relationship and the information of the connected nodes.
[0070] For example, dependency layer information includes: pole-mounted equipment, guy wires, struts, fault indicators, and non-gantry crossarm layers, which must depend on node type layers or line layers.
[0071] Furthermore, the attributes of node elements include, but are not limited to, one or more of the following: node number, node type, node coordinates, node symbol for node presentation, and priority value;
[0072] The attributes of connection elements include, but are not limited to, one or more of the following: connection line number, connection line type, standard span, power direction (power direction is represented by an arrow symbol in the drawing), coordinates of the front end of the connection line, and coordinates of the rear end of the connection line.
[0073] The attributes of a dependent element include, but are not limited to, one or more of the following: dependency number, dependency type, dependent party number in the dependency relationship, and dependent party number in the dependency relationship;
[0074] When the dependent party and / or the dependent party are nodes, the dependent party number and the dependent party number are the node numbers; when the dependent party and / or the dependent party are power distribution lines, the dependent party number and the dependent party number are the connection line numbers.
[0075] Step S200: Traverse all feature information and their attributes, calculate the in-degree of each node, select the starting reference point of the topology map from several nodes, and mark and save it.
[0076] Furthermore, the specific implementation process of this step is as follows:
[0077] Step S201: Traverse the connecting elements and their attributes to obtain the topological order between two nodes with a connection relationship. The node that appears earlier is marked as the preceding node, and the node that appears later is marked as the ending node.
[0078] In this step, the order of connections is identified by the power flow direction or the node number sequence.
[0079] Step S202: For each node, calculate the number of times it has been a subsequent node, which is the in-degree;
[0080] Step S203: Traverse each node and identify whether there is a node with an in-degree of zero. If so, proceed to step S204; otherwise, proceed to step S205.
[0081] Step S204: Identify the number of nodes with an in-degree of zero, and determine whether the number of nodes is 1. If yes, configure it as the starting reference point; otherwise, configure the node with the highest priority value among the nodes with an in-degree of zero as the starting reference point.
[0082] Step S205: Identify the lowest in-degree value and its corresponding number of nodes, and determine whether the number of nodes is 1. If yes, configure it as the starting reference point; if no, configure the node with the highest priority value among the nodes with the lowest in-degree value as the starting reference point.
[0083] Specifically, in step S200, the priority value of a node is set according to priority rules, such as priority for pole and tower equipment, and priority for equipment of the same type with a smaller index value.
[0084] Step S300: Based on the nodes serving as starting reference points and their connecting elements, construct at least two route models and identify the critical path models in the route models; each route model includes a starting reference point and an ending point; the nodes serving as starting reference points and the nodes serving as ending points are directly connected by connecting lines or connected through other nodes and connecting lines; save all route models and mark and save the critical path models.
[0085] The specific implementation process of this step is as follows:
[0086] Step S301: Traverse the element information to obtain several minimum line units that start from the previous node, end at the next node, and have a connection between the previous and next nodes.
[0087] Step S302: Starting from the initial reference point, the smallest line unit is used as the initial smallest line unit. The obtained smallest line units are connected sequentially according to the principle of connecting the beginning and the end. The starting point of the previous smallest line unit is used as the ending point of the next smallest line unit. This process is repeated until there are no unconnected smallest line units, thus forming a series of ordered line models. The ending point of the last connected smallest line unit is the end point of the line model.
[0088] Step S303: Traverse each route model, read the number of nodes for each route model, and determine whether the route model with the most nodes is only one. If so, configure the route model with the most nodes as the critical path model; otherwise, calculate the weight values of at least two route models with the most nodes, and configure the route model with the highest weight value as the critical path model.
[0089] In this step, the weight value is the span or voltage; the span or voltage of all connecting lines in a circuit model are superimposed, and the higher the value, the higher the weight value.
[0090] Step S410: Mark and store the obtained route model and critical path model;
[0091] Step S410: Render each route model onto the map control and output the topology map.
[0092] The specific implementation process of this step is as follows:
[0093] Step S410: Render the critical path model on the map;
[0094] Step S420: Render other unrendered route models on the map;
[0095] Step S430: Read the dependencies and their attributes. On all the route models that have been rendered on the map, based on the node coordinates, dependent party number, dependent party number, node coordinates, standard span constraints, obvious dependency symbols and unrendered node symbols.
[0096] In steps S410-S430, nodes, connecting lines, line models, and dependencies that have been rendered on the map control will be marked as occupied in real time.
[0097] The specific implementation process of step S410 is as follows:
[0098] Step S411: Call the critical path model, and based on the coordinate attributes in the node corresponding to the starting reference point in the critical path model, render it to the corresponding coordinate projection of the map control to generate node symbols.
[0099] Step S412: Starting from the node corresponding to the starting reference point, read the connecting line in the critical path model whose front-end coordinates are the same as the coordinates of the node corresponding to the starting reference point;
[0100] Step S413: Based on the coordinates of the front end and the back end of the connecting line, calculate the original azimuth angle of the connecting line and compare it with the reference drawing line of the node as the starting point. Determine whether the comparison deviation is within the tolerance range. If yes, align the connecting line to the reference drawing line and render the connecting line with the path of the reference drawing line as the standard. If no, render the connecting line on the map according to the original azimuth angle of the connecting line. The geometric length of the rendered connecting line is constrained by the standard span or the difference between the front end coordinates and the back end coordinates.
[0101] Step S414: Record the map display coordinates of the endpoint of the connecting line rendered on the map control; compare the map display coordinates with the node coordinates corresponding to the node connected to the end of the connecting line in the feature information, and determine whether the map display coordinates are within the tolerance range of the node coordinates. If yes, proceed to step S415; otherwise, output a warning message.
[0102] Step S415: Based on the coordinates displayed on the map, render the node symbols corresponding to the nodes connected to the back end of the connecting line on the map control, and use them as the new starting point to repeat steps S413-S415 until the critical path model is fully rendered on the map control.
[0103] The specific implementation process of step S420 is as follows:
[0104] Step S421: For each node on the rendered path, take each node as the starting point, read the connection relationship of the corresponding node, obtain the number of connecting lines corresponding to the node, when any node has at least two connecting lines, filter out the occupied connecting lines, calculate the deviation between the remaining connecting lines and the baseline drawing line of the node as the starting point, and determine whether the deviation is within the tolerance range; if yes, proceed to step S422; if no, render the connecting lines on the map according to the actual front-end coordinates and back-end coordinates of the connecting lines.
[0105] Step S422: Determine whether the number of connecting lines within the same tolerance range is 1. If yes, align the connecting line to the reference drawing line and render the connecting line based on the path of the reference drawing line. If no, proceed to step S423.
[0106] Step S423: Align the connecting line with the smallest deviation from the baseline drawing line to the baseline drawing line, and render the connecting line using the path of the baseline drawing line as the standard;
[0107] Step S424: Group the unrendered connecting lines in the node connection line into four quadrants with the starting point as the origin, count the number of connecting lines in each quadrant, and calculate the display azimuth angle of each line based on the number of connecting lines, dividing the range into 90° intervals. According to the principle of proximity, match the connecting lines with the display azimuth angles in the quadrant one by one, and determine the tolerance between the display azimuth angle of each connecting line and the original azimuth angle calculated based on the coordinates of the front end and the back end of the connecting line. If it is within the tolerance range, render the connecting line according to the display azimuth angle; if it is outside the tolerance range, render the connecting line according to the original azimuth angle.
[0108] Step S425: Record the map display coordinates of the endpoint of the connection line rendered on the map control; compare the map display coordinates with the node coordinates corresponding to the node connected to the end of the connection line in the feature information, and determine whether the map display coordinates are within the tolerance range of the node coordinates. If yes, proceed to step S426; otherwise, output a warning message.
[0109] Step S426: Based on the coordinates displayed on the map, render the node symbols corresponding to the nodes connected to the back end of the connecting line on the map control, and use them as the new starting point to repeat steps S421-S426 until all line models are rendered on the map control.
[0110] In some embodiments, in step S420, before rendering each connecting line on the map control, the map display coordinates of the endpoints of connecting lines marked as occupied are traversed. By using spatial indexing, it is determined whether there is an occupied node that intersects with the endpoint of the connecting line. If so, based on the map display coordinates of the front end and the map display coordinates of the back end of the connecting line, a linear interpolation algorithm is used to find an interpolation point on the line segment formed by the connecting line as the map display coordinates of the endpoint of the connecting line. If not, new map display coordinates are generated based on the actual rendering endpoint.
[0111] The implementation process of step S430 is as follows:
[0112] S431: Traverse the dependent elements to obtain all dependencies and determine whether the dependency is a node dependency or a line dependency; if it is a node dependency, proceed to step S432; if it is a line dependency, proceed to step S433.
[0113] Specifically, in this step, the dependency relationship is determined by identifying the attributes of both parties in the dependency relationship. When a power distribution line appears in the dependency relationship, the dependency relationship is an online dependency.
[0114] Step S432: On the map control, render the dependent party based on the map display coordinates of the dependent party, so that the map display coordinates of the dependent party are consistent with the map display coordinates of the dependent party, and store them;
[0115] Step S433: Based on the map display coordinates at the front end of the connector and the map display coordinates at the back end of the connector, a linear interpolation algorithm is used to find an interpolation point on the line segment formed by the connector as the map display coordinates of the dependent party; on the map control, the corresponding node of the dependent party is rendered according to the map display coordinates and stored.
[0116] One specific implementation scheme of the linear interpolation algorithm used in this invention is as follows:
[0117] The map display coordinates at the front end and the map display coordinates at the back end of the connecting line are used to calculate line segments, and the calculated line segments are scaled down proportionally according to a preset ratio.
[0118] Based on the map display coordinates of the front end of the line segment and the connector after the calculation is reduced, the map display coordinates of the front end of the connector are used as one segment of the line segment, the coordinates of the other segment of the line segment are calculated, and they are used as the map display coordinates of the corresponding node of the dependent party and stored.
[0119] In the invention, the data structure database stores both the actual coordinates and the map-displayed coordinates for each node coordinate, the front coordinate of the connector, and the back coordinate of the connector; for some nodes, the front coordinates of the connector, and the back coordinates of the connector, the actual coordinates and the map-displayed coordinates are the same.
[0120] The second aspect of this embodiment provides a power distribution network topology generation system, including an element reading unit, a structured storage unit, a topology generation unit, and a line model generation unit;
[0121] The feature reading unit is used to read feature information after the design model file is input and store it in the structured storage unit;
[0122] The route model generation unit retrieves feature information from the structured storage unit, generates all route models, and stores them in the structured storage unit.
[0123] The topology map generation unit retrieves route model information and feature information from the structured storage unit and generates a visual topology map on the loaded map control according to the prescribed topology map generation method.
[0124] The third aspect of this embodiment provides a distribution network topology generation apparatus. Taking the apparatus as an electronic device as an example, it includes: a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the distribution network topology generation method as described in the first aspect of the embodiment.
[0125] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0126] In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. For example, the processor may not be limited to microprocessors of the STM32F105 series, reduced instruction set computer (RISC) microprocessors, x86 architecture processors, or processors with integrated neural network processing units (NPUs). The transceiver may be, but is not limited to, a Wi-Fi transceiver, a Bluetooth transceiver, a General Packet Radio Service (GPRS) transceiver, a ZigBee (a low-power LAN protocol based on the IEEE 802.15.4 standard) transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. Furthermore, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.
[0127] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0128] The fourth aspect of this embodiment provides a storage medium storing instructions containing the method for generating a distribution network topology diagram as described in the first aspect of the embodiment. That is, the storage medium stores instructions that, when executed on a computer, perform the method for generating a distribution network topology diagram as described in the first aspect of the embodiment.
[0129] The storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives and / or Memory Sticks, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0130] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0131] The fifth aspect of this embodiment provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the method for generating a power distribution network topology as described in the first aspect of this embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0132] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating a power distribution network topology map, characterized by, The implementation process is as follows: From the design model file, read the element information for building the topological graph, the element information includes elements and their corresponding element attributes, and store the element information in a structured manner; Based on the element information, generate the distribution network line model data, and store it; Load the map control, call the line model data, render the line model of the distribution network on the map control, and visually output the topological graph; The elements include: devices as nodes of the topological graph, and distribution lines as connecting lines of the topological graph.
2. The method of claim 1, wherein, The element information also includes element attributes corresponding to each element, and the elements and element attributes are stored in a mapping manner; when rendering on the map control, rendering is performed based on the node coordinates in the element attributes and the constraint of the standard span.
3. The method of claim 2, wherein, The element attributes include: node attributes, connection attributes, and dependency attributes; The node attributes include: node number, node type, node coordinates, and node symbol; The connection attributes include: connection line number, connection line type, standard span, connection symbol, front end coordinates, and rear end coordinates.
4. The method of claim 1, wherein, based on the element information, the process of generating the distribution network line model data includes: traversing the element information, calculating and filtering out the node with the lowest in-degree based on the connection relationship, and configuring the node as the starting reference point of the topological graph, marking and storing the node as the starting reference point, and based on the starting reference point, building all line models starting from it and storing them; From all the line models, filter out the key path model for marking and storing; when rendering on the map control, take the key path model as the first rendered line model, and then render other line models. The method for generating the line model is as follows:
5. The method of claim 1, wherein, Step S1: When generating the line model, based on the connection relationship, generate a line model including a starting point and an ending point in the form of node-connection line-node one by one, and give the nodes and connection lines on the line model an occupied mark, and store them; Step S2: Based on each node on the generated line model, take it as the starting point of other line models, read the connection relationship with the node as the front node, filter out the nodes and connection lines corresponding to the occupied mark, and then generate a line model including a starting point and an ending point in the form of node-connection line-node one by one according to the node-connection line-node form, and repeat step S2 to generate all line models. When rendering the key path model on the map control, the following processes are included:
6. The method of claim 1, wherein, Step A1: Call the key path model, take the node corresponding to the starting reference point in the key path model as the starting point, render it to the corresponding coordinate projection of the map control according to the coordinate attribute in the node attribute, and generate the node symbol; Step A2: Take the node corresponding to the starting reference point as the starting point, read the connection line with the same front end coordinates and starting reference point node coordinates in the key path model; Step A3: Based on the front end coordinates and rear end coordinates of the connection line, calculate the original azimuth of the connection line, and compare it with the node reference drawing line as the starting point to determine whether the deviation is within the tolerance range; if yes, align the connection line to the reference drawing line, and render the connection line based on the path of the reference drawing line. If not, the connection line is rendered on the map according to the original azimuth angle of the connection line; The geometric length of the connection line rendering is constrained by the standard range or the difference between the front-end coordinate and the rear-end coordinate; Step A4: Record the map display coordinates of the connection line end point rendered on the map control; Compare the map display coordinates with the node coordinates corresponding to the node connected by the rear end of the connection line in the feature information, and determine whether the map display coordinates are within the tolerance range of the node coordinates. If yes, execute step A5; if not, output a warning prompt; Step A5: Render the node symbol corresponding to the node connected by the rear end of the connection line on the map control according to the map display coordinates, and repeat steps A3-A5 with the node symbol as the new starting point until the critical path model is completely rendered on the map control; In the above process, the nodes, connection lines and line model that have been rendered on the map control are marked as occupied.
7. The method of claim 6, wherein, The rendering of the unmarked line model on the map control includes: for each node on the rendered path, taking each node as the starting point to render the unrendered line model, and the implementation process is as follows: Step B1: Read the connection relationship of the starting node to obtain the number of connection lines corresponding to the node. When there are at least two connection lines on any node, exclude the occupied connection lines, calculate the deviation between the remaining connection lines and the reference drawing line of the node as the starting point, and determine whether the deviation is within the tolerance range. If yes, execute step B2, if not, render the connection line on the map according to the actual front-end coordinate and rear-end coordinate of the connection line; Step B2: Determine whether the number of connection lines within the same tolerance range is 1. If yes, align the connection line to the reference drawing line, and render the connection line based on the path of the reference drawing line. If not, execute step B3; Step B3: Align the connection line with the smallest deviation to the reference drawing line, and render the connection line based on the path of the reference drawing line; Step B4: Group the unrendered connection lines in the node connection line end into four quadrants with the starting point as the origin, count the number of connection lines in each quadrant, and calculate the display azimuth angle based on the number of connection lines with 90° range division. According to the nearest principle, match the connection line with the display azimuth angle in the quadrant one by one, and compare the display azimuth angle of each connection line with the original azimuth angle calculated based on the front-end coordinate and rear-end coordinate of the connection line. If it is within the tolerance range, render the connection line according to the display azimuth angle; if it is outside the tolerance range, render the connection line according to the original azimuth angle; Step B5: Record the map display coordinates of the connection line end point rendered on the map control; Compare the map display coordinates with the node coordinates corresponding to the node connected by the rear end of the connection line in the feature information, and determine whether the map display coordinates are within the tolerance range of the node coordinates. If yes, execute step B6; if not, output a warning prompt; Step B6: Render the node symbol corresponding to the node connected by the rear end of the connection line on the map control according to the map display coordinates, and repeat steps B1-B6 with the node symbol as the new starting point until all line models are rendered on the map control.
8. The method of claim 1, wherein, The elements also include dependency relationships between the devices and the power distribution lines and dependency relationships between the devices as additional information of the topology graph; The element attributes also include dependency attributes; the dependency attributes include node dependencies and line dependencies; The dependency attributes include dependency numbers, dependency types, standard spans, and dependency symbols; When rendering the topology graph on the map, based on the dependency relationships and the dependency attributes, dependency symbols are rendered on the map, which visualize connections between nodes with dependency relationships, between nodes and connecting lines; The visual positions and the presented geometric lengths of the dependency symbols on the map are constrained by the standard spans in the dependency attributes and the coordinates in the node attributes.
9. A power distribution network topology map generation system, characterized by, The method includes an element reading unit, a structured storage unit, a topology graph generating unit, and a line model generating unit; The element reading unit is configured to read element information from a design model file and store the element information in the structured storage unit; The line model generating unit is configured to call the element information from the structured storage unit, generate all line models, and store the line models in the structured storage unit; The topology graph generating unit is configured to call the line model information and the element information from the structured storage unit, generate a visual topology graph on a loaded map control according to a specified topology graph generation manner.
10. A storage medium, characterized by A carrier stores instructions for implementing the method of claim 1-8.