A Modeling Method and System for a Distribution Network Graph Model Based on a Graph Database
By adopting the distribution grid diagram model modeling method based on graph database in power grid management, the problem of low efficiency in traditional databases when processing power grid topological data is solved, efficient data query and complex analysis are realized, and the efficiency of grid management and optimization is improved.
Patent Information
- Application Number
- CN202410598656.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Traditional relational databases are not efficient when processing power grid topology data, making it difficult to achieve real-time updates and complex analysis, limiting the efficiency of power grid scheduling and management.
The distribution network graph model modeling method based on graph database is adopted to construct the graph database model through the principles of node granularity and relational granularity, and fine-grained parallel network topology modeling and optimization analysis are carried out.
It improves the query efficiency and complex analysis capabilities of power grid data, shortens data processing time, and improves the efficiency of power grid management and optimization.
Smart Images

Figure CN118445959B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distribution network modeling, and particularly to a method and system for modeling a distribution network graph model based on a graph database. Background Art
[0002] The power system is a typical highly complex network system, and its data structure has a high degree of connectivity and network complexity. In this context, the real-time update, query, and analysis of the power grid model are particularly important. However, the traditional relational database is not efficient in retrieving topological data and processing large-scale network data, and it is difficult to handle the dynamic changes of the power grid topology, which restricts the efficiency of power grid dispatching and management.
[0003] With the rise of graph computing, graph databases have begun to attract people's attention due to their excellent ability to process connected data. Graph databases can effectively manage and quickly query densely connected data nodes, and are particularly suitable for processing network structure data. In the power system, the connectivity of the power grid and the complexity of the power grid structure make graph databases an ideal choice. It can provide a more natural way to express and store the topological structure of the power grid, improve query efficiency, and support more complex network analysis.
[0004] However, there are significant problems in applying graph databases to distribution network models in the prior art. For example, in the invention patent with the application number 2023111983689, no processing is done on the nodes and related data in the distribution network. Instead, each device and node is mapped to the graph database one by one, covering enterprise asset equipment, users, and distributed power sources completely. However, due to the large amount of data in the distribution network, it is extremely complex to implement and takes a long time. Summary of the Invention
[0005] Object of the Invention: To overcome the deficiencies of difficult implementation and long time consumption in the above-mentioned prior art, the present invention provides a method and system for modeling a distribution network graph model based on a graph database.
[0006] Technical Solution: According to the first aspect of the present invention, a method for modeling a distribution network graph model based on a graph database is provided. The method includes the following steps:
[0007] S1 Analyze the principles of modeling the distribution network graph model of the graph database under the framework of the relationship moderation principle and the node granularity principle; the node granularity principle means that the selected nodes should be able to fully represent independent entities or concepts, have unique attributes or identifiers, and have specific roles and clear meanings in the graph; the relationship granularity principle requires that the selected relationships should not only clearly define the connection methods between entities, but also support data query and analysis;
[0008] S2 performs subgraph partitioning on the network topology of the power system, forming two search stages: the calculation bus and the electrical island. The calculation bus is formed by a set of physical nodes connected by closed switches and disconnecting switches, while the electrical island is composed of a set of calculation buses connected by branch elements;
[0009] S3 adopts a fine-grained parallel network topology method for the power system to perform distribution network topology modeling. The parallel network topology analysis of the power system includes a bus search stage and an electrical island search stage;
[0010] S4 optimizes and analyzes the distribution network topology model constructed in step S3.
[0011] Furthermore, it includes:
[0012] In step S1, the principles of graph database distribution network graph model modeling specifically include:
[0013] Under this modeling framework, equipment entities, connection nodes, and equipment terminals in the distribution network are all described as nodes in the graph database and mapped using Neo4j's node objects. Each node has a unique equipment ID attribute to distinguish different equipment objects; these node objects correspond to the equipment in the CIM model, ensuring the scalability and flexibility of the model. Each node has labels and attributes. Node types are distinguished by one or more labels, and one or more attributes are presented in the form of key-value pairs. Through the above modeling method, the physical and logical structures of the distribution network are accurately mapped, and at the same time, strong data support is provided, facilitating effective query and analysis.
[0014] Furthermore, it includes:
[0015] Step S2 specifically includes:
[0016] Equipment in the distribution network obtains labels and storage attributes through the graph database. According to the IEC-61970-301 standard, the equipment parameter model realizes an accurate mapping with actual distribution network equipment, facilitating the sharing of information of different data models and supporting in-depth topology analysis of the distribution network;
[0017] The topology analysis of the distribution network relies on graph partitioning technology and the boundary scan protocol BSP model for parallel processing, converting the physical nodes of the power grid into calculation bus models, accelerating the process of power grid analysis and optimization calculation; Graph partitioning technology enables the system to divide a large power grid into small, manageable parts, while the BSP model provides a parallel computing framework;
[0018] By removing the subgraph connection edges, the formation of the connected components of the power grid is achieved, which further promotes the two-stage network topology analysis, and then forms the stage of calculating the busbars and the stage of forming the electrical islands. The graph partitioning in each stage generates independent subgraphs, making the network topology analysis a phased graph partitioning problem with specific constraints.
[0019] Furthermore, it includes:
[0020] The specific steps of step S3 include:
[0021] First, in the busbar search stage, the calculating busbars are formed by finding the set of physical nodes connected by switches and disconnectors in the closed state. This process involves identifying these connection points and then marking the vertices of the calculating busbar class in the graph database.
[0022] Secondly, in the electrical island search stage, the electrical islands are formed by the set of calculating busbars connected by the branch elements of transformers and lines. This process includes tracing from the vertices of the branch elements to the endpoints, which belong to a certain vertex of the calculating busbar class, and then creating the edges of the calculating branch class connecting these vertices in the graph database.
[0023] Furthermore, it includes:
[0024] In step S4, the distribution network topology model constructed in step S3 is optimized and analyzed, including:
[0025] Substituting the planning and selection scenarios of the large-scale power grid power supply transfer scheme into the distribution network topology model for model optimization analysis. The specific optimization analysis includes: the simplification of the single-line diagram of the regional power grid and its model implementation in the graph database, and the division of the fault impact area and the planning of the power supply transfer path based on this model.
[0026] Furthermore, it includes:
[0027] The simplification of the single-line diagram of the regional power grid and its model implementation in the graph database include:
[0028] Node simplification and classification, that is, in the process of modeling the regional power grid, all power supply points are classified as A nodes, switches are classified as B nodes, and other equipment, including loads, are marked as C nodes. This classification simplifies the power grid structure and makes the data easier to process in the graph database.
[0029] Furthermore, it includes:
[0030] The division of the fault impact area includes:
[0031] When a power supply point fails, two strategies are adopted to determine the scope of the fault impact:
[0032] Strategy 1: Use Depth-First Search (DFS) or Breadth-First Search (BFS) to traverse all nodes connected to the faulty power supply point, and construct the largest connected subgraph that reflects the scope of the fault impact;
[0033] Strategy 2: In the graph database, partition all the largest connected subgraphs of the overall network graph, and query which connected subgraph the faulty power supply point falls into;
[0034] For line faults, it is necessary to re-partition the largest connected subgraphs of the entire regional power grid map, and determine the connected subgraph where the faulty node is located by checking whether each subgraph contains a power supply node.
[0035] Furthermore, it includes:
[0036] For the planning of the power transfer path, the Dijkstra algorithm is used to calculate the shortest path to ensure rapid power restoration in case of power supply point or line faults and reduce the impact of power outages. The specific planning includes:
[0037] Case 1: When powering a single node, calculate the shortest paths from all power sources to the target node through the Dijkstra algorithm, and select the shortest route among them as the power transfer circuit route;
[0038] Case 2: When powering a connected area, abstract the area as a large node, convert the edges connecting the area into edges connecting the large node and the external power grid, and then apply the Dijkstra algorithm to find the shortest path from the external power source to the large node as the power transfer circuit route.
[0039] On the other hand, the present invention also provides a power distribution network graph model modeling system based on a graph database. The system includes:
[0040] A model principle determination module, used to analyze the principles of modeling the power distribution network graph model in the graph database under the framework of the relationship moderation principle and the node granularity principle; the node granularity principle means that the selected nodes should be able to fully represent independent entities or concepts, have unique attributes or identifiers, and have specific roles and clear meanings in the graph; the relationship granularity principle requires that the selected relationships not only clearly define the connection methods between entities, but also support data query and analysis;
[0041] A network topology partitioning module, used to partition the network topology of the power system into two search stages: the calculation bus and the electrical island. The calculation bus is formed by a set of physical nodes connected by closed switches and disconnectors, and the electrical island is composed of a set of calculation buses connected by branch elements;
[0042] The distribution network topology model construction module is used to perform distribution network topology modeling by adopting a fine-grained parallel network topology method for power systems. The parallel network topology analysis of power systems includes a bus search stage and an electrical island search stage;
[0043] The model optimization module is used to optimize and analyze the constructed distribution network topology model.
[0044] Finally, the present invention also provides a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the distribution network graph model modeling method based on the graph database as described above are implemented.
[0045] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0046] The present invention proposes a distribution network graph model modeling method based on a graph database. This method can effectively utilize the advantages of the graph database, including efficient topology data retrieval and excellent scalability. In specific research, the modeling of the distribution network first follows the original CIM (Common Information Model) specification of the power grid. Considering the integrity and consistency of power grid data, the model is constructed through fine steps. This method not only classifies nodes, optimizes the data storage structure, but also improves the efficiency of operating complex power grid data. Among them, the fine-grained parallel network topology modeling method enables the model processing to be efficiently executed in a parallel computing environment, and is particularly suitable for large-scale power grid systems. Through this technology, queries and analyses that take several hours or even longer in the prior art can be completed within a few minutes, and the retrieval efficiency is extremely high. In addition, the model optimization and analysis part also involves model adjustment based on specific operation scenarios (such as large-scale power supply plan planning and selection), providing an example of practical application and demonstrating the actual effect and application potential of the method.
[0047] This series of innovative technical methods not only provides a good topology data foundation and efficient query performance for subsequent business scenario analyses, is of great significance for improving the efficiency and accuracy of current power grid management, but also greatly promotes the development pace of the intelligence and automation of power systems. This distribution network graph model modeling method based on a graph database provides a new perspective and technical support for the future of power systems, and is an important part of the development of the power industry towards a more efficient and intelligent direction. Description of the Drawings
[0048] Figure 1 are the node labels of various types of equipment objects in the distribution network in the Neo4j graph database according to the embodiments of the present invention;
[0049] Figure 2It is a schematic diagram of the subgraph division of the distribution network according to the embodiments of the present invention;
[0050] Figure 3 It is a schematic diagram of the connected components of the distribution network according to the embodiments of the present invention;
[0051] Figure 4 It is a calculation bus search graph based on the BSP model according to the embodiments of the present invention;
[0052] Figure 5 It is a calculation bus model diagram according to the embodiments of the present invention;
[0053] Figure 6 It is a modeling diagram of a certain regional power grid according to the embodiments of the present invention;
[0054] Figure 7 It is a division diagram of the power outage impact area according to the embodiments of the present invention;
[0055] Figure 8 It is a flowchart of a method for modeling a distribution network graph model based on a graph database according to the embodiments of the present invention. Specific embodiments
[0056] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0057] Embodiment 1
[0058] According to the first aspect of the present invention, a method for modeling a distribution network graph model based on a graph database is provided. The method includes the following steps:
[0059] S1 Analyze the principles of modeling the distribution network graph model in the graph database under the framework of the relationship moderation principle and the node granularity principle; the node granularity principle means that the selected nodes should be able to fully represent independent entities or concepts, have unique attributes or identifiers, and have specific roles and clear meanings in the graph; the relationship granularity principle requires that the selected relationships not only need to clearly define the connection methods between entities, but also support data query and analysis;
[0060] S2 Perform subgraph division on the network topology of the power system to form two search stages of calculation buses and electrical islands. Among them, the calculation buses are formed by a set of physical nodes connected by closed switches and disconnectors, and the electrical islands are composed of a set of calculation buses connected by branch elements;
[0061] S3 uses a fine-grained power system parallel network topology method for distribution network topology modeling. The power system parallel network topology analysis includes a bus search stage and an electrical island search stage;
[0062] S4 optimizes and analyzes the distribution network topology model constructed in step S3.
[0063] Specifically, as described above, as Figure 8 shown, a method for modeling a distribution network graph model based on a graph database according to the present invention includes the following steps:
[0064] Step 1, analyze the principles of distribution network topology modeling in the graph database;
[0065] Step 2, divide subgraphs and extract connected components;
[0066] Step 3, use a fine-grained parallel network topology method for distribution network topology modeling;
[0067] Step 4, taking the planning and selection scenario of a large-scale power grid power supply transfer scheme as an example, optimize and analyze the distribution network graph model.
[0068] Further, in step 1, analyze the principles of distribution network topology modeling in the graph database.
[0069] The distribution network modeling method based on the graph database adopts the node and relationship granularity principle to ensure that the model can not only represent independent device entities and concepts, but also support data query and analysis requirements. In this method, each device, connection node, and device terminal of the distribution network are mapped to node objects in the graph database Neo4j. Each object has its unique device ID attribute, which is convenient for the system to identify different device entities. These node objects directly correspond to the devices in the CIM model, ensuring the scalability and flexibility of the model. Each node can be assigned multiple labels to distinguish node types and contains multiple attributes, which are presented in the form of key-value pairs, thus accurately reflecting the physical and logical structure of the distribution network.
[0070] Through this modeling method, more efficient query, analysis, and processing of distribution network management and optimization are realized, demonstrating the flexibility and scalability of the graph database in distribution network modeling.
[0071] Further, in step 2, divide subgraphs and extract connected components;
[0072] The devices of the distribution network, such as bus segments, circuit breakers, etc., obtain labels and storage attributes through the graph database. According to the IEC-61970-301 standard, the device parameter model realizes an accurate mapping with the actual distribution network devices, facilitating the sharing of information of different data models and supporting in-depth topology analysis of the distribution network.
[0073] The topological analysis of the distribution network relies on the parallel processing of graph partitioning technology and the boundary scan protocol (BSP) model, converting the physical nodes of the power grid into bus models for calculation, which accelerates the process of power grid analysis and optimization calculation. The graph partitioning technology enables the system to divide the large-scale power grid into small, manageable parts, while the BSP model provides a parallel computing framework.
[0074] By removing the subgraph connection edges, the connected components of the power grid are formed, thus promoting the two-stage network topological analysis: the stage of forming calculation buses and the stage of forming electrical islands. The graph partitioning in each stage generates independent subgraphs, making the network topological analysis a phased graph partitioning problem with specific constraints.
[0075] In summary, the subgraph partitioning of the network topology of the power system aims to represent the power grid as a graph G=(V, E), and by removing the connection edges between subgraphs, divide it into smaller connected components or subgraphs Vi,..., Vp for easy management and optimization. This phased graph partitioning process mainly includes two stages: forming calculation buses and electrical islands. Calculation buses are formed by a set of physical nodes connected by closed switches and disconnect switches, while electrical islands are composed of a set of calculation buses connected by branch components such as transformers and lines.
[0076] Through this analysis, more accurate decisions can be made based on the detailed topological information of the power grid, effectively simplifying the complexity of large-scale power systems, ensuring the stability and efficiency of the power grid, and reducing operation and maintenance costs at the same time.
[0077] Furthermore, in step 3, a fine-grained parallel network topology method is used for the topology modeling of the distribution network;
[0078] With accurate topological information, power grid management and optimization decisions are more precise, effectively simplifying the complexity of large-scale systems, optimizing operation and maintenance costs. The distribution network topology modeling is divided into bus search and electrical island search steps, that is, the purpose of these two stages is to simplify and effectively handle the complexity of large-scale power systems, improve the accuracy of decisions, ensure the stability and efficiency of the power grid, and reduce operation and maintenance costs at the same time:
[0079] (1) Bus search
[0080] Using the BSP model, buses are composed of vertices connected by closed switches and cannot be connected by other branch components. For example, when the switch in the substation is closed, a calculation bus is formed. The process includes: initialization, assigning an identifier to each vertex; sending messages, evaluating the edge status and sending messages along the closed edges; receiving and processing messages, updating and sending a new BID if the new BID is smaller; status judgment, ending when all are dormant; marking the buses in the graph database; ending the process.
[0081] (2) Electrical island search
[0082] Trace the connection points of transformers and lines to the bus vertices, create new branch - type edges to connect and calculate the buses, form a network model diagram composed of buses and branches, identify the electrical islands, and provide data and decision - making basis for system optimization. This model also facilitates network analysis and fault diagnosis, improving the efficiency and reliability of the power grid.
[0083] Furthermore, in step 4, taking the scenario of the planning and selection of large - scale power grid power - transfer schemes as an example, optimize and analyze the distribution network graph model.
[0084] Simplify the nodes in the single - line diagram of the regional power grid and model them in the graph database.
[0085] The graph database supports real - time query of power grid nodes, which helps to accurately divide the fault - affected areas. For power outages, the operations are divided into two cases:
[0086] (1) When a power supply point fails, determine the maximum connected sub - graph of the fault point. The methods include traversing the connected nodes from the fault point using DFS or BFS strategies, or querying the connected sub - graph where the fault point is located in the database. The former has a lower time complexity and saves server resources.
[0087] (2) When a line or node failure causes a break, re - divide the maximum connected sub - graph of the regional power grid and determine the fault area by judging the power supply nodes in the connected sub - graph.
[0088] During power outages or maintenance, the power - transfer operation needs to use the Dijkstra algorithm to plan the shortest path. There are two scenarios: for single - node power supply, traverse to find the shortest power - transfer circuit route; for power supply to a connected area, regard the area as a large node and find the shortest path as the power - transfer circuit route. This path planning ensures rapid power restoration during faults / maintenance, reduces the impact of power outages, and the Dijkstra algorithm improves the power grid's response ability and stable operation.
[0089] In order to make the content of the present invention easier to be clearly understood, the following further elaborates on the present invention in detail according to specific embodiments and in combination with the accompanying drawings.
[0090] The distribution network modeling based on the graph database is based on the node - granularity principle, that is, the selected nodes should be able to fully represent independent entities or concepts, have independent attributes or identifiers, play specific roles in the graph, and have clear meanings. In addition, the relationship - granularity principle emphasizes that the selected relationships not only need to clearly explain the connection methods between entities, but also support the needs of data query and analysis. According to this principle, the relationships in the graph database are used to elaborate the mutual connections between various equipment objects, and are expressed by mapping the reference attributes connecting nodes and equipment terminals into the relationship data between nodes in the graph model.
[0091] Under this framework, the nodes of the graph database are designed to describe the equipment entity objects, connection nodes, and equipment terminal nodes in the distribution network. In the CIM model, each equipment node, connection node, and equipment terminal node is described by a Neo4j node object; these node objects have a unique equipment ID attribute to ensure that the system can distinguish different equipment objects. The node objects in Neo4j correspond one-to-one with the equipment in the CIM model, thus ensuring the scalability and flexibility of the graph model. Each Neo4j node has the characteristics of labels and attributes. Each node can be assigned one or more labels to distinguish the node type, and can also contain one or more attributes, presented in the form of key-value pairs. This modeling method can not only accurately map the physical and logical structures of the distribution network, but also provide powerful data support for efficient query and analysis. This graph database-based modeling method provides a new solution path for distribution network management and optimization due to its flexibility and scalability.
[0092] During the process of loading the data model, the CIM / E file is parsed to generate the vertex and edge datasets in the graph database and store them accordingly. From the CIM / E file, according to the predefined data model, 19 types of vertex datasets can be directly extracted, including: region, base voltage, substation, voltage level, bus section, synchronous generator, AC line, AC line section, AC line endpoint, DC line, DC line endpoint, converter, load, transformer, transformer winding, transformer tap type, shunt compensator, series compensator, and bay. These vertex datasets are arranged into independent data files. In particular, for the vertex of the physical node type that is not clearly classified as an object class in the CIM / E exchange file, it is necessary to scan all the objects containing the physical node attributes in the CIM / E file and extract the relevant attributes from them to form a set of physical node data. By this method, it is ensured that the necessary data is accurately and efficiently extracted from the source file and effectively stored in the graph database for subsequent query, analysis, and application. By accurately extracting and properly managing the data, the access efficiency and usage value of the data are improved, providing a solid foundation for in-depth analysis and decision support.
[0093] All kinds of equipment in the distribution network, such as bus sections, circuit breakers, isolators, wire sections, fuses, power transformers, connection nodes, and equipment terminals, are given corresponding labels, such as Figure 1As shown. The specific attribute values of each device are stored in the node attributes. In addition, other data models, such as the device parameter model, also adhere to the IEC-61970-301 standard and can be accurately mapped to the actual devices in the distribution network. Through this mapping relationship, the structural parameters of the grid topology devices can be quickly obtained and these information are saved as attributes in the corresponding device node attributes. This not only realizes the information sharing between different data models, but also facilitates in-depth topological analysis of the distribution network in subsequent work.
[0094] Network topology analysis involves the process of converting the physical node model of the power grid into a bus model for calculation according to the states of switches and circuit breakers. Using the constructed graph database model, through the combination of graph partitioning technology and the boundary scan protocol (BSP) model, this method realizes the parallel processing of power network topology analysis. This process transforms the physical connection structure of the power system by using the information in the grid graph database to make it suitable for subsequent power grid analysis and optimization calculations. Under this framework, graph partitioning technology allows the system to divide a large power network into smaller, manageable parts, while the BSP model provides an effective parallel computing framework to accelerate the process of topological analysis.
[0095] According to Figure 2 the example of, by removing the connecting edges between subgraphs, the connected components of the power grid can be formed. The goal of the graph partitioning problem is to divide G into smaller components. Given G=(V, E) and a positive integer p, find subsets of V, V i ,…,V p . As Figure 3 shown. Each V is a part of the partition, called a subgraph of G. Just as Figure 3 shown. The network topology analysis of the power system is usually carried out in two stages: the first stage is used to form the calculation buses, while the second stage is used to form the electrical islands. In this process, the calculation buses are composed of the set of physical nodes connected by switches and disconnectors in the closed state, and the electrical islands are composed of the set of calculation buses connected by branch elements such as transformers and lines. The graph partitioning in each stage will form independent subgraphs. Thus, the network topology analysis is transformed into a phased graph partitioning problem that satisfies specific constraints.
[0096] Thus, when conducting power grid management and optimization, more accurate decisions can be made based on detailed topological information, effectively handling and simplifying the complexity of large-scale power systems, thereby reducing operation and maintenance costs while ensuring the stability and efficiency of the power grid.
[0097] The fine-grained parallel network topology method for distribution network topology modeling is mainly divided into two steps: bus search and electrical island search.
[0098] (1) Busbar Search
[0099] Calculate the busbar as a subgraph of G, which consists of vertices connected by closed switches and disconnectors, and these vertices cannot be interconnected by branch components such as transformers or lines. In Substation 2, when switches CB10, CB11, CB12, and CB13 are in the closed state, the BSP model is used in G to perform connectivity exploration to form the calculated busbar, and the process is shown in Figure 4 . Among them, the gray nodes are dormant, the white ones are active nodes, and the initial physical node identifiers (BIDs) of vertices CN9, CN10, CN11, and CN12 are 9, 10, 11, and 12 respectively. The basic steps are as follows:
[0100] Step 1: Initialization, assign a globally unique identifier BID to each vertex.
[0101] Step 2: Send the first message. Each node evaluates the type and status of its outgoing edges. If the outgoing edge is a closed switch or disconnector, send a message containing the BID along this edge and enter the dormant state.
[0102] Step 3: Message reception and processing. The vertex receives messages from other vertices, parses out the BID; if the received BID is less than the current vertex's BID, update the vertex's BID and activate it, and continue to send the updated BID along the outgoing edge.
[0103] Step 4: Vertex status judgment. If all vertices are dormant, go to Step 5; otherwise, go back to Step 3.
[0104] Step 5: Add vertices of the calculated busbar class to the graph database.
[0105] Step 6: End the process.
[0106] After constructing the calculated busbar, use branch components such as transformers and lines for connectivity. The specific process is as follows:
[0107] Step 1:: Starting from the vertices of branch components such as transformers and lines, trace along their outgoing edges to the endpoints, which are node-class vertices, and then find the vertices of the calculated busbar class corresponding to these nodes.
[0108] Step 2: Create new edges of the calculated branch (BCH) class in the graph database, and these edges connect the vertices of the calculated busbar found in Step 1.
[0109] After executing these steps, a network model graph composed of calculated busbars and calculated branches will be formed, as shown in Figure 5 . The electrical island consists of a set of calculated busbars connected by these calculated branches and serves as a subgraph of the calculated busbar model graph.
[0110] In this way, we can clearly distinguish and identify each electrical island based on the physical and logical connections in the power grid, further providing data support and decision-making basis for system maintenance and optimization. In addition, this model diagram is also convenient for analyzing complex networks and fault diagnosis, improving the operation efficiency and reliability of the power grid.
[0111] Taking the scenario of planning and selecting the power supply transfer scheme for a large-scale power grid as an example:
[0112] The nodes in the single-line diagram of the regional power grid are simplified and modeled in the graph database. All power supply points are classified as node A, all switches are classified as node B, and all other devices (including loads) are uniformly labeled as node C. The simplified node distribution is as Figure 6 shown, including a total of 10 power supply points, that is, node A; 16 switches, that is, node B; and 16 other types of devices, that is, node C.
[0113] Utilizing the performance advantages of the graph database, it can effectively support real-time queries of nodes in the power grid, thereby achieving an accurate division of the area affected by power grid faults. For the division of the power outage affected area, the scheme can operate according to the following two situations. For details, see Figure 7 .
[0114] (1) When a fault occurs at a certain power supply point, determine the largest connected subgraph where the power supply point is located. This process can be achieved by two methods:
[0115] The first method is to start from the faulty power supply point and use the depth-first search (DFS) or breadth-first search (BFS) strategy to traverse all the nodes connected to this power supply point, thereby constructing the largest connected subgraph reflecting the scope of the fault impact.
[0116] The second method is to divide all the largest connected subgraphs of the overall network diagram in the graph database and query which connected subgraph the faulty power supply point falls into to determine the scope of the fault impact.
[0117] Compared with the latter method, the first method is more superior in terms of time complexity, with fewer nodes to traverse, thus saving a large amount of server resources.
[0118] (2) If a certain line is disconnected or a node on the line fails, resulting in a circuit break, at this time, it is necessary to re-divide the largest connected subgraph of the entire regional power grid diagram. Determine the connected subgraph where the faulty node is located by checking whether each connected subgraph contains a power supply node. If a certain connected subgraph does not contain any power supply nodes, then this connected subgraph represents the area affected by the fault.
[0119] When a power outage occurs due to a fault or maintenance at a power supply point, node, or line, the transfer power supply operation becomes a necessary measure. To achieve the optimal transfer power supply path planning, the Dijkstra single-source-to-target shortest path algorithm can be used. This algorithm is based on a greedy strategy and can effectively calculate the shortest paths from a single source node to other nodes in the graph.
[0120] When specifically planning the transfer power supply operation, consider the following two scenarios:
[0121] (1) When power supply is required for a single node, use the Dijkstra algorithm to traverse all power source points in the graph, find all paths connected to the target node, and select the shortest path as the transfer power supply line.
[0122] (2) If power supply transfer is required for a connected area, first abstract the area as a large single node through graph database technology. Then, convert all edges connected to this area into edges connecting the large node and the external power grid. By applying the Dijkstra algorithm, explore all paths from external power source points to this large node, and finally select the shortest path among them as the transfer power supply line.
[0123] Through such a path planning method, it can be ensured that power can be restored quickly and efficiently in case of a fault or maintenance, minimizing the impact of power outages on residents and enterprises in the area. In addition, the efficiency of the Dijkstra algorithm has important application value in power grid management. It not only provides a systematic path planning tool but also provides technical support for the stable operation of the power grid and the improvement of emergency response capabilities.
[0124] Embodiment 2
[0125] Based on Embodiment 1, a power distribution network graph model modeling system based on a graph database is provided. The system includes:
[0126] A model principle determination module for analyzing the principles of modeling the power distribution network graph model in the graph database under the framework of the relationship moderation principle and the node granularity principle; the node granularity principle is that the selected nodes should be able to fully represent independent entities or concepts, have unique attributes or identifiers, and have specific roles and clear meanings in the graph; the relationship granularity principle requires that the selected relationships not only clearly define the connection methods between entities but also support data query and analysis;
[0127] A network topology division module for dividing the network topology of the power system into subgraphs, forming two search stages: the calculation bus and the electrical island. The calculation bus is formed by a set of physical nodes connected by closed switches and disconnectors, and the electrical island is composed of a set of calculation buses connected by branch elements;
[0128] A distribution network topology model construction module, which is used to perform distribution network topology modeling by adopting a fine-grained power system parallel network topology method. The power system parallel network topology analysis includes a bus search stage and an electrical island search stage;
[0129] A model optimization module, which is used to optimize and analyze the constructed distribution network topology model.
[0130] Other technical features of this system are similar to the corresponding method, and the applicant will not elaborate here.
[0131] Finally, the present invention also provides a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned distribution network graph model modeling method based on a graph database are implemented.
[0132] An embodiment of the present application provides a structure of a computer device. The computer device includes: a processor, a memory, and a computer program stored on the memory and executable on the processor; the computer device can store multiple instructions, and the instructions are suitable for being loaded and executed by the processor to perform the above Figures 1 to 8 method steps of the above-mentioned embodiment. The specific execution process can be referred to Figures 1 to 8 the specific description of the above-mentioned embodiment, and will not be elaborated here.
[0133] The embodiment of the present application also provides a storage medium. The storage medium can store multiple instructions, and the instructions are suitable for being loaded and executed by the processor to perform the detection method steps. The specific execution process can be referred to the Figures 1 to 8 specific description of the above-mentioned embodiment, and will not be elaborated here.
[0134] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0136] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these changes and modifications.
Claims
1. A distribution network graph modeling method based on a graph database, characterized in that: The method comprises the following steps: S1 Analyze the principles of modeling the distribution network graph model in the graph database under the framework of the principle of relationship moderation and the principle of node granularity; the node granularity principle is that the selected nodes should be able to fully represent independent entities or concepts, have unique attributes or identifiers, and have specific roles and clear meanings in the graph; the principle of relationship moderation requires that the selected relationships not only clearly define the connection between entities, but also support data query and analysis; In step S1, the principles of modeling the distribution network graph model in the graph database specifically include: Under this modeling framework, the equipment entities, connection nodes and equipment terminals in the distribution network are described as nodes in the graph database and mapped using Neo4j node objects. Each node has a unique device ID attribute to distinguish different equipment objects. These node objects correspond to the devices in the CIM model, ensuring the scalability and flexibility of the model. Each node has a label and attributes, and the node type is distinguished by one or more labels, and one or more attributes are presented in the form of key-value pairs. Through the above modeling method, the physical and logical structures of the distribution network are accurately mapped, and strong data support is provided to facilitate effective query and analysis. S2 divides the network topology of the power system into subgraphs to form two search stages: calculation bus and electrical island. The calculation bus is formed by a set of physical nodes connected by closed switches and circuit breakers, while the electrical island is composed of a set of calculation buses connected by branch elements. Step S2 specifically includes: All devices in the distribution network obtain labels and storage attributes through the graph database. According to the IEC-61970-301 standard, the device parameter model realizes accurate mapping with the actual distribution network devices, facilitates the sharing of information of different data models, and supports in-depth topological analysis of the distribution network; The topological analysis of the distribution network relies on the parallel processing of graph segmentation technology and boundary scan protocol BSP model, which converts the physical nodes of the power grid into bus models for calculation, accelerating the process of power grid analysis and optimization calculation; the graph segmentation technology allows the system to divide large power grids into small parts that are easy to manage, while the boundary scan protocol BSP model provides a parallel computing framework; By removing the connecting edges of the subgraphs, the connected components of the power grid are realized, which promotes the two-stage network topology analysis, thereby forming the stage of calculating the busbar and the stage of forming the electrical island. Each stage of graph partitioning will produce an independent subgraph, making the network topology analysis a staged graph partitioning problem with specific constraints; S3 adopts a fine-grained power system parallel network topology method to model the distribution network topology. The power system parallel network topology analysis includes a bus search stage and an electrical island search stage. Step S3 specifically includes: First, the bus search phase forms a computational bus by finding a set of physical nodes connected by switches and circuit breakers in a closed state. This process involves identifying these connection points and then identifying the vertices of the computational bus class in the graph database. Secondly, the electrical island search phase forms an electrical island through the set of computational buses connected by the branch elements of the transformer and the line. This process includes tracing from the vertices of the branch elements to the endpoints, which belong to a certain computational bus class vertex, and then creating computational branch class edges connecting these vertices in the graph database; S4 optimizes and analyzes the distribution network topology model constructed in step S3.
2. The distribution network graph modeling method based on graph database according to claim 1 is characterized in that: In step S4, the distribution network topology model constructed in step S3 is optimized and analyzed, including: The planning and selection scenarios of large-scale power grid power transfer schemes are substituted into the distribution network topology model for model optimization analysis. The optimization analysis specifically includes: simplified processing of the regional power grid single-line diagram and its model implementation in the graph database, as well as division of fault-affected areas and planning of power transfer paths based on this model.
3. The distribution network graph modeling method based on graph database according to claim 2 is characterized in that: The simplified processing of the regional power grid single-line diagram and its model implementation in the graph database include: Node simplification and classification, that is, in the process of modeling the regional power grid, all power supply points are classified as A nodes, switches are classified as B nodes, and other equipment, including loads, are marked as C nodes. This classification simplifies the grid structure and makes data easier to process in the graph database.
4. The distribution network graph modeling method based on graph database according to claim 3 is characterized in that: The division of the fault impact area includes: When a power supply point failure occurs, two strategies are used to determine the impact range of the failure: Strategy 1: Use depth-first search (DFS) or breadth-first search (BFS) to traverse all nodes connected to the faulty power supply point and construct the largest connected subgraph that reflects the impact range of the fault. Strategy 2: Divide the overall network graph into all the largest connected subgraphs in the graph database, and query which connected subgraph the faulty power supply point falls into; For line faults, the entire regional power grid graph needs to be re-divided into the largest connected subgraphs, and the connected subgraph where the faulty node is located is determined by checking whether each subgraph contains a power supply node.
5. The distribution network graph modeling method based on graph database according to claim 4 is characterized in that: The planning of the power transfer path adopts the Dijkstra algorithm to calculate the shortest path to ensure that power supply can be quickly restored when a power supply point or line fails, thereby reducing the impact of power outages. The specific planning includes: Scenario 1: When supplying power to a single node, the Dijkstra algorithm is used to calculate the shortest paths from all power supply points to the target node, and the shortest route is selected as the power transfer route; Scenario 2: When supplying power to a connected area, the area is abstracted as a large node, and the edges connecting the area are converted into edges connecting the large node and the external power grid. The Dijkstra algorithm is then applied to find the shortest path from the external power source to the large node as the power transfer route.
6. A distribution network graph modeling system based on a graph database, characterized in that: The system includes: The model principle determination module is used to analyze the modeling principles of the distribution network graph model of the graph database under the framework of the relationship moderation principle and the node granularity principle; the node granularity principle is that the selected nodes should be able to fully represent independent entities or concepts, have unique attributes or identifiers, and have specific roles and clear meanings in the graph; the relationship moderation principle requires that the selected relationships should not only clearly define the connection between entities, but also support data query and analysis; The principles of modeling the distribution network graph model in the graph database specifically include: Under this modeling framework, the equipment entities, connection nodes and equipment terminals in the distribution network are described as nodes in the graph database and mapped using Neo4j node objects. Each node has a unique device ID attribute to distinguish different equipment objects. These node objects correspond to the devices in the CIM model, ensuring the scalability and flexibility of the model. Each node has a label and attributes, and the node type is distinguished by one or more labels, and one or more attributes are presented in the form of key-value pairs. Through the above modeling method, the physical and logical structures of the distribution network are accurately mapped, and strong data support is provided to facilitate effective query and analysis. The network topology partitioning module is used to partition the network topology of the power system into sub-graphs to form two search stages: calculation bus and electrical island. The calculation bus is formed by a set of physical nodes connected by closed switches and circuit breakers, while the electrical island is composed of a set of calculation buses connected by branch elements. All devices in the distribution network obtain labels and storage attributes through the graph database. According to the IEC-61970-301 standard, the device parameter model realizes accurate mapping with the actual distribution network devices, facilitates the sharing of information of different data models, and supports in-depth topological analysis of the distribution network; The topological analysis of the distribution network relies on the parallel processing of graph segmentation technology and boundary scan protocol (BSP) model, which converts the physical nodes of the power grid into bus models for calculation, thus accelerating the process of power grid analysis and optimization calculation. Graph segmentation technology allows the system to divide large power grids into small parts that are easy to manage, while the BSP model provides a parallel computing framework. By removing the connecting edges of the subgraphs, the connected components of the power grid are realized, which promotes the two-stage network topology analysis, thereby forming the stage of calculating the busbar and the stage of forming the electrical island. Each stage of graph partitioning will produce an independent subgraph, making the network topology analysis a staged graph partitioning problem with specific constraints; A distribution network topology model building module, used for performing distribution network topology modeling by adopting a fine-grained power system parallel network topology method, wherein the power system parallel network topology analysis includes a busbar search phase and an electrical island search phase; First, the bus search phase forms a computational bus by finding a set of physical nodes connected by switches and circuit breakers in a closed state. This process involves identifying these connection points and then identifying the vertices of the computational bus class in the graph database. Secondly, the electrical island search phase forms an electrical island through the set of computational buses connected by the branch elements of the transformer and the line. This process includes tracing from the vertices of the branch elements to the endpoints, which belong to a certain computational bus class vertex, and then creating computational branch class edges connecting these vertices in the graph database; The model optimization module is used to optimize and analyze the constructed distribution network topology model.
7. A computer device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the distribution network graph modeling method based on the graph database as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Graph data model-based power grid topology service method, device and system
CN113849944A
Rapid construction method and equipment for real-time topology of power grid
CN115774915A