A power system operation state simulation construction method and system based on a graph database
Patent Information
- Application Number
- CN202611091116.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-30
AI Technical Summary
[0006]发明目的:本发明的目的是提供一种基于图数据库的电力系统运行状态模拟构建方法及系统,解决当前电网系统状态模拟在场景管理、响应效率、编辑能力不足的问题
[0037]有益效果:与现有技术相比,本发明具有如下显著优点:1、通过采用图数据库存储电网设备模型与拓扑连接关系,实现了模型拓扑结构表达的直观性,有效解决了传统关系型数据库在设备拓扑查询时因需要根据连接节点号遍历查询所有设备模型表而导致的资源浪费问题;2、通过状态模拟场景的创建与展示可由用户自由选取范围,不受源端系统图形文件是否存在的限制,打破了现有自动成图技术的区域局限;3、通过状态模拟场景数据支持自定义加载,模型及拓扑连接关系可灵活进行编辑操作,有效扩展了状态模拟实用化场景,满足规划分析类业务的精细化需求。
Smart Images

Figure CN123011903A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system information technology, and in particular to a method and system for simulating the operation status of a power system based on a graph database. Background Technology
[0002] Power system state simulation provides crucial technical support for operations such as fault inversion, photovoltaic power generation planning and regulation, and retrofitting planning. However, with the continuous advancement of the integrated construction of the main and distribution power grids and the large-scale integration of new energy sources, the complexity and implementation difficulty of large power grid state simulation modeling have significantly increased.
[0003] On the one hand, the medium-voltage lines of the distribution network continue to extend, the topology of low-voltage distribution areas is gradually improved, and the scale of power grid equipment in large power grid scenarios such as integrated state simulation of main and distribution networks and regional state simulation continues to grow. On the other hand, the performance bottleneck of traditional relational databases in equipment query and correlation retrieval is becoming increasingly prominent.
[0004] On the other hand, the visualization of state simulation results has limitations in scope and effectiveness. Current automatic mapping technology for power systems is still imperfect, mostly limited to mapping designated areas, with manual drawing still being the mainstream method, and the results mainly consisting of single-line diagrams and plant / station diagrams. There is insufficient support for visualization graphics in professional business scenarios such as grid detail maps, interconnection diagrams, and renewable energy consumption calculations, making it difficult to achieve flexible display of customized regional power grid wiring diagrams.
[0005] Furthermore, the state simulation function in existing automation systems mostly relies on the construction of dedicated state simulation states, which does not support multiple users to perform state simulation data setting operations in parallel, cannot load historical models for retrospective analysis, and lacks the ability to add, delete, modify and edit power grid graphics and data models online. This limits the application scenarios of state simulation and makes it difficult to meet the refined and practical needs of planning and analysis businesses. Summary of the Invention
[0006] Purpose of the invention: The purpose of this invention is to provide a method and system for constructing power system operation state simulation based on graph database, so as to solve the problems of insufficient scene management, response efficiency and editing capabilities in the current power grid system state simulation.
[0007] Technical solution: The method for constructing power system operation state simulation based on graph database as described in this invention includes:
[0008] Construct a static power grid model based on a graph database;
[0009] Using the static power grid model as the data foundation, real-time dynamic topology updates of the power grid are performed by accessing real-time remote signaling change information of circuit breakers in the power automation system and model anomaly information of primary equipment in the power automation system.
[0010] Construct a graph database of power grid operation history snapshots;
[0011] Based on historical snapshots or real-time cross-sections based on the real-time dynamic topology of the power grid, add / delete / modify power grid equipment to construct a memory projection map;
[0012] Memory projection maps incorporate historical, real-time, or future predicted / planned runtime data to construct a state simulation runtime and data environment, which, combined with advanced runtime analysis applications, enables state simulation scenarios.
[0013] Furthermore, constructing the static power grid model includes: reading the primary equipment tables from the relational database of each voltage level in the power system; based on the Neo4j graph database model structure, reconstructing the equipment and their connection point numbers in the primary equipment tables into points, reconstructing the connection relationships between equipment and equipment connection point numbers into edges, reconstructing the equipment type and connection point number type into point labels, and reconstructing the inherent attributes of the equipment into attributes of the equipment points; based on the reconstructed points, edges, labels, and attributes, generating a power grid topology graph with equipment as nodes and electrical connection relationships as edges, thus forming the static power grid model.
[0014] Furthermore, the model change information for primary equipment in the power automation system includes:
[0015] Read the device log change message. If the change message is a new addition, add the point of the device in the graph database. Assign the device point attributes and device type labels according to the device log information. Query whether the graph database currently contains a point with the device connection point number. If it does not exist, create the point with the device connection point number. Then create the edge of the static connection relationship label between the device and its connection point number. If the device is a switch type device, create the edge of the dynamic connection relationship according to the real-time remote signaling status query result. If it is not a switch type device, create the edge of the dynamic connection relationship.
[0016] If the change message is deletion, first delete all edges directly connected to the device and its node number in the graph database, then delete the device's nodes, and finally determine whether the node with the connection number of the device has no edge connection with other device nodes after the device is deleted. If there is no connection, delete the node with the connection number. If the change message is modification, if the modified ledger data is the connection number, execute the node number change logic in the deletion and addition logic; otherwise, directly modify the attribute data of the device node.
[0017] Furthermore, based on the model anomaly information of primary equipment in the power automation system, when a new or changed non-switch type device is detected, edges with static and dynamic connection relationship labels are created between the non-switch type device and its connection point number; when a new or changed switch type device is detected, edges with static connection relationship are created between the switch type device and its connection point number, and if the remote signaling status of this device is closed at this time, edges with dynamic connection relationship are created between the switch type device and its connection point number.
[0018] Furthermore, performing real-time dynamic topology updates of the power grid includes:
[0019] Read the real-time remote signaling status of the switch-type device. If the remote signaling status of the switch-type device is "closed" and there is no edge with dynamic connection label between the switch-type device and the device connection point number directly connected through static connection relationship, then create an edge with dynamic connection label between the device and the device connection point number.
[0020] If the remote signaling status of a switch-type device is "closed" and the switch-type device point and its connection point number, which are directly connected through a static connection relationship, contain an edge with a dynamic connection relationship label, then the status remains unchanged.
[0021] If the remote signaling status of a switch-type device is "min" and the switch-type device point and the device connection point number directly connected through a static connection relationship have no dynamic connection relationship label, then the status remains unchanged.
[0022] If the remote signaling status of a switch-type device is "min" and the switch-type device point and its connection point number, which are directly connected through a static connection relationship, have an edge with a dynamic connection relationship label, then delete the edge with the dynamic connection relationship label between the device and its connection point number.
[0023] Furthermore, constructing a graph database of power grid operation history snapshots includes: acquiring network equipment model data and operation status data according to a predetermined cycle, generating network data profile files for the graph database, and storing the profile files as historical snapshots.
[0024] Furthermore, based on historical snapshots or real-time cross-sections, and by overlaying added / deleted / modified power grid equipment, a memory projection map is constructed, including:
[0025] Using power grid equipment in historical snapshots or real-time sections as nodes and connections between devices as edges, graph data is generated by adding / deleting / modifying the nodes and edges corresponding to the power grid equipment.
[0026] By calling the native projection process of the graph database, specified nodes and relationship types in the graph data are mapped into memory to construct a memory projection graph of the entire network or a local area.
[0027] A power system state simulation construction system based on graph database, comprising:
[0028] The model data initialization module is used to generate the initial cross-sections of the graph database model;
[0029] The real-time dynamic topology module of the power grid is used to use the static model of the power grid as the data basis and perform real-time dynamic topology updates of the power grid by accessing the real-time remote signaling change information of circuit breakers in the power automation system and the model change information of primary equipment in the power automation system.
[0030] The historical model cross-section snapshot management module is used to periodically save the entire network data snapshot cross-section, manage its effective life cycle, and manage data recovery and destruction.
[0031] The memory projection graph management module is used to generate, create, and destroy state simulation scenarios for corresponding business scenarios based on the needs of business users.
[0032] The login management and permissions module is used to control user access rights by binding accounts to permissions and roles and assigning different permissions to roles.
[0033] The runtime data management module is used to manage the time-series data stored in the system, including historical runtime data management, typical load management, time-series scenario management, and weather data management functions.
[0034] The state simulation application display module provides users and third-party business systems with a visual display of state simulation scenario data, including state simulation graph loading function, graph editing function, state simulation time series data loading function, state simulation calculation function, and state simulation graph saving function.
[0035] A computer device includes: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs, when executed by the processors, implement the graph database-based power system operation state simulation construction method.
[0036] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for constructing a power system operation state simulation based on a graph database.
[0037] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: 1. By using a graph database to store the power grid equipment model and topology connection relationship, the intuitiveness of the model topology structure expression is achieved, effectively solving the resource waste problem caused by traditional relational databases requiring traversal query of all equipment model tables based on connection node numbers when querying equipment topology; 2. The creation and display of state simulation scenarios can be freely selected by the user, without being limited by the existence of the source system's graphic files, breaking the regional limitations of existing automatic mapping technologies; 3. The state simulation scenario data supports custom loading, and the model and topology connection relationship can be flexibly edited, effectively expanding the practical application scenarios of state simulation and meeting the refined needs of planning and analysis businesses. Attached Figure Description
[0038] Figure 1 This is a flowchart of the present invention;
[0039] Figure 2 This is a schematic diagram of the static topology of the graph database of the present invention;
[0040] Figure 3 This is a schematic diagram of the dynamic topology of the graph database of the present invention;
[0041] Figure 4 This is a diagram illustrating the state simulation operation effect of the state simulation system of the present invention.
[0042] Figure 5 This is a screenshot of the homepage of the state simulation system of the present invention. Detailed Implementation
[0043] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0044] Example 1
[0045] like Figure 1 As shown, the power system operation state simulation construction method based on graph database of the present invention includes:
[0046] S1, Construct a static power grid model based on a graph database;
[0047] The construction of the power grid static model includes: reading the primary equipment table from the relational database of each voltage level of the power system; based on the Neo4j graph database model structure, reconstructing the equipment and its connection point number in the primary equipment table into points, reconstructing the connection relationship between equipment and equipment connection point number into edges (i.e., static connection relationship), reconstructing the equipment type and connection point number type into point labels, and reconstructing the inherent attributes of the equipment (including but not limited to ID, name, voltage level, model, container to which it belongs, switch status, etc.) into attributes of the equipment points; based on the reconstructed points, edges, labels and attributes, generating a power grid topology graph with equipment as nodes and electrical connection relationships as edges, thus forming the power grid static model.
[0048] Among them, the edges corresponding to the static connection relationships between device connection points do not participate in any logical-level topology operations.
[0049] The voltage levels of the power system include, but are not limited to, high voltage 35kV and above, medium voltage 10kV, and low voltage 380 / 220V.
[0050] By establishing unified data standards and specifications, power system equipment from different system data architectures can be integrated. Power system equipment includes, but is not limited to, substation circuit breakers, substation busbars, substation transformers, inter-substation AC lines, 10kV medium-voltage line automation distribution network switches, 10kV distribution network transformers, 10kV distribution network feeder sections, 10kV medium-voltage energy storage stations, 10kV medium-voltage photovoltaic stations, low-voltage integrated terminals, low-voltage smart switches, and low-voltage users.
[0051] Data sources for measurement sections at various voltage levels in the power system include, but are not limited to, EMS systems, electricity consumption information collection systems, distribution automation systems, and distribution network cloud master station systems.
[0052] like Figure 2 The diagram shown illustrates a static topology of a graph database. The construction of a static power grid model based on a graph database follows these rules:
[0053] Node: A node corresponds to a device in the power grid that has a topological connection relationship and its connection point number; among them, the device node is configured with a corresponding tag attribute according to its voltage level and device type, and all nodes are configured with a node number tag attribute to ensure the uniqueness and identifiability of node identification.
[0054] Relationships: The connection relationships between devices and connection node numbers are divided into two categories: static connection relationships and dynamic connection relationships. Static connection relationships are the inherent physical relationships between devices and node numbers, and are stable. Dynamic connection relationships correspond to the conductivity characteristics of devices and are used to characterize whether devices currently have power connection capabilities. Changes in dynamic connection relationships are commonly seen in scenarios such as the opening and closing operations of switchgear.
[0055] Attributes: General attributes for device nodes include, but are not limited to: unique identifier ID, device name, unique identifier ID of its parent container, node number ID, voltage level, and device model. If the device type is a switch, its attributes also include switch remote signaling status; if the device type is a line segment, its attributes also include length, unit impedance, and rated current; if the device type is a load, its attributes also include rated power. Connection point nodes only include the node number ID in their attributes to ensure accurate identification of the connection point number.
[0056] In this embodiment, the correspondence between the relational database device model and the graph database device tags is first established. Then, according to different device types, tabular data is exported from the corresponding data tables in the relational database and a CSV file is generated. Subsequently, the association relationship of all device node numbers is analyzed, and a node number data table file and a data table CSV file of the static connection relationship between devices and node numbers are generated. At the same time, the remote signaling status of all current switching devices is queried, and a data table CSV file of the dynamic connection relationship is generated according to the opening and closing status of the switches. Finally, all tabular data is imported into the graph database through the graph database background data import script to complete the generation of the new database.
[0057] S2 uses the static power grid model as the data foundation and performs real-time dynamic topology updates of the power grid by accessing the real-time remote signaling change information of circuit breakers in the power automation system and the model change information of primary equipment in the power automation system.
[0058] The model change information for primary equipment in the power automation system includes:
[0059] Read the device log change message. If the change message is a new addition, add the point of the device in the graph database. Assign the device point attributes and device type labels according to the device log information. Query whether the graph database currently contains a point with the device connection point number. If it does not exist, create the point with the device connection point number. Then create the edge of the static connection relationship label between the device and its connection point number. If the device is a switch type device, create the edge of the dynamic connection relationship according to the real-time remote signaling status query result. If it is not a switch type device, create the edge of the dynamic connection relationship.
[0060] If the change message is deletion, first delete all edges directly connected to the device and its node number in the graph database, then delete the points of the device, and finally determine whether the point of the device's connection point number has no edge connection relationship with other device points after the device is deleted. If there is no connection relationship, delete the point of the connection point number. If the change message is modification, if the ledger data to be modified is the connection point number, execute the node number change logic in the deletion and addition logic; otherwise, directly modify the attribute data of the device point.
[0061] Based on the model anomaly information of primary equipment in the power automation system, when a new or changed non-switch equipment is detected, edges with static and dynamic connection relationship labels are created between the non-switch equipment and its connection point number; when a new or changed switch equipment is detected, edges with static connection relationship are created between the switch equipment and its connection point number. If the remote signaling status of this equipment is closed at this time, edges with dynamic connection relationship are created between the switch equipment and its connection point number.
[0062] Performing real-time dynamic topology updates to the power grid includes:
[0063] Read the real-time remote signaling status of switch-type devices. If the remote signaling status of the switch-type device is "Closed" and the connection point of the switch-type device directly connected to the device's connection point number via static connection has no dynamic connection relationship label, then create an edge with a dynamic connection relationship label between the device and its connection point number. If the remote signaling status of the switch-type device is "Closed" and the connection point of the switch-type device directly connected to the device's connection point number via static connection has a dynamic connection relationship label, then leave it unchanged. If the remote signaling status of the switch-type device is "Out" and the connection point of the switch-type device directly connected to the device's connection point number via static connection has no dynamic connection relationship label, then leave it unchanged. If the remote signaling status of the switch-type device is "Out" and the connection point of the switch-type device directly connected to the device's connection point number via static connection has a dynamic connection relationship label, then delete the edge with a dynamic connection relationship label between the device and its connection point number. If the device is not a switch-type device, then create an edge with a dynamic connection relationship label between the device and its connection point number. The effect of the dynamic connection relationship label edge is as described above. Figure 3 As shown.
[0064] Switching equipment includes primary equipment with the ability to cut off power supply, such as circuit breakers, disconnectors, grounding disconnectors, and combination switches. Non-switching equipment includes primary equipment that does not have the ability to cut off power supply, such as busbars, line segments, transformers, and loads.
[0065] S3, construct a graph database of power grid operation history snapshots.
[0066] According to a predetermined cycle, acquire the network-wide device model data and operating status data, generate the network-wide data cross-section file of the graph database, and store the cross-section file as a historical snapshot.
[0067] S4 uses historical snapshots or real-time cross-sections based on the real-time dynamic topology of the power grid as a basis to overlay added / deleted / modified power grid equipment and construct a memory projection map.
[0068] Constructing a memory projection graph involves loading and reading power grid devices from historical snapshots or real-time cross-sections as nodes and connections between devices as edges, and then applying addition / deletion / modification operations to the nodes and edges corresponding to the power grid devices to form graph data. Based on the Graph Science algorithm (GDS), a full-network or partial memory projection graph is constructed to achieve lightweight analysis based on data of interest.
[0069] In this embodiment, the baseline data for the memory projection graph can be selected from the model knowledge graph data in the current running state or the knowledge graph data corresponding to historical snapshots. If the historical snapshot knowledge graph is selected as the initial baseline data for the memory projection graph, the historical snapshot database saved in step S3 must be started first, and then the Cypher statement window should be switched to the snapshot database. Subsequently, a virtual projection graph is constructed using the Graph Science (GDS) algorithm library of the Neo4j graph database. The scope of the virtual projection graph is determined according to the user's actual usage scenario. All relevant devices and their node numbers are selected, and the selection logic is based on the device's label attributes, static connection relationships, and dynamic connection relationships to ensure that the projection scope accurately matches the state simulation requirements.
[0070] This embodiment has the ability to add / delete devices and modify the connection relationships between devices in a virtual memory projection graph according to user needs, and also supports modifying the attributes of device nodes. Specifically, in the load transfer state simulation scenario, parameters such as active power, reactive power, and current values in the load device node attributes can be adjusted to simulate the line operation state under high load conditions, providing data support for load transfer scheme optimization; in the distributed renewable energy planning state simulation scenario, renewable energy devices can be added or deleted at key topology nodes of medium-voltage lines or low-voltage distribution areas, and the impact of this operation on the power grid operation in the future period can be simulated and analyzed, providing technical basis for renewable energy planning decisions.
[0071] After the state simulation scenario is created, the virtual projection map can be selectively saved to a file according to actual needs, facilitating subsequent review and retrieval, and improving the reuse efficiency of the state simulation scenario. When the virtual projection map is no longer in use, or has been inactive for a long time, the user can manually initiate a virtual projection map destruction command, or the program can automatically trigger the command to delete the virtual projection map using the graph database Cypher command, effectively releasing system memory usage and ensuring the stable and efficient operation of the entire state simulation system.
[0072] S5 uses memory projection maps to incorporate historical, real-time, or future predicted / planned runtime data to build a state simulation runtime and data environment, and combines advanced runtime analysis applications to realize state simulation scenarios.
[0073] Refer to the system state simulation operation. Figure 4The state simulation operation and data environment includes establishing a data open mechanism, using RESTful as the interface, and adhering to a unified standard for data format to achieve two-way interaction between business applications and state simulation data.
[0074] Example 2
[0075] The power system operation status simulation construction system based on graph database described in this invention is a web application system, accessed using the Chrome browser, and built on the Ruoyi management system. See the system homepage image. Figure 5 The front-end is developed and designed based on the Vue2 framework, and the back-end is developed and designed based on the Spring Boot framework. The interaction between the front-end and back-end is handled by Nginx proxy to solve cross-domain and security protection issues.
[0076] For databases, the relational database uses the MySQL library to store structured data for the power grid model and operational data for the state simulation system ledger; the graph database uses Neo4j to store knowledge graph data for power grid equipment and state simulation scenario construction; and the time series database uses iotdb to store historical operation, future forecasts, typical loads, and custom scenario equipment time series data, including:
[0077] The model data initialization module is used to generate the initial cross-sections of the graph database model;
[0078] Furthermore, the model data initialization module extracts primary equipment model ledger data from the relational databases of various business systems and imports the data into the neo4j graph database according to the data structure specifications of graph databases. Based on the imported data, a static topology knowledge graph of primary power grid equipment is created. In this graph, the connection points between equipment are converted into nodes, the connection relationships between equipment connection points are converted into edges (i.e., static connection relationships), the types of equipment and equipment connection points are converted into labels, and the inherent attributes of equipment (including but not limited to ID, name, voltage level, model, container, switch status, etc.) are converted into attributes of the corresponding equipment nodes, thus completing the construction of the initial model of the graph database.
[0079] The real-time dynamic topology module of the power grid is used to update the real-time dynamic topology of the power grid by using the static model of the power grid as the data basis and by accessing the real-time remote signaling change information of the circuit breaker of the power automation system and the model change information of the primary equipment of the power automation system.
[0080] The historical model cross-section snapshot management module is used to periodically save the entire network data snapshot cross-section, manage its effective life cycle, and manage data recovery and destruction.
[0081] Furthermore, the historical model cross-section snapshot management module automatically backs up the graph database and generates snapshot libraries according to a predetermined cycle. The snapshot library is in a dormant state by default. When an access request is received, the corresponding snapshot library is awakened, and the snapshot library is closed after the access service ends. A snapshot library lifecycle is set, and if the snapshot library retention time exceeds the lifecycle, the snapshot library is automatically deleted to free up memory.
[0082] The snapshot library can be started and stopped at any time. In its dormant state, it only occupies server disk space and does not require additional memory, CPU or other core hardware resources. Therefore, it has the basic conditions for saving a large number of snapshot sections.
[0083] The snapshot saving operation is implemented through the background data operation script of the graph database. The snapshot copying process adopts the background asynchronous running mode. During the copying, the normal business operation of the current running library will not be affected, ensuring the continuity of business processes. After the snapshot copying is completed, the snapshot library automatically stops running to reduce the resource consumption of server memory, CPU and disk I / O, and improve the overall operating efficiency of the system.
[0084] The system records the creation time and expiration time of each snapshot repository and builds a snapshot repository lifecycle management function. This function can periodically check the existence status of snapshot repositories: if a snapshot repository with an expiration time earlier than the current time is detected, the following processing logic is executed: if the snapshot repository is in a dormant state, the snapshot repository and its related records are directly deleted; if the snapshot repository is in a running state, the deletion operation is not performed temporarily, and a second detection process is performed in the next periodic detection task cycle.
[0085] Meanwhile, the system provides a snapshot library list interface, an access request interface, and a close interface, which facilitates the memory projection graph generation module and third-party applications to access and obtain snapshot library-related data, thereby improving the scalability and usability of the snapshot library and supporting multi-scenario business applications.
[0086] The memory projection graph management module is used to generate, create, and destroy state simulation scenarios for corresponding business scenarios based on the needs of business users.
[0087] Furthermore, the memory projection map management module implements full lifecycle management of the memory projection map, specifically including: generating a corresponding memory projection topology map based on the user-specified state simulation range. This memory projection topology map is independent of production data and does not affect the normal operation of the production system; promptly destroying the corresponding memory map when the state simulation process ends or a user's deletion request is received, releasing system memory usage and improving system operating efficiency; and supporting saving memory projection map data to a file for easy subsequent direct reading and calling, improving the reusability of state simulation scenarios.
[0088] The login management and permissions module controls user access rights by binding accounts to permissions and assigning different permissions to roles.
[0089] The specific roles with permissions include:
[0090] Administrator Role: The administrator role has permissions for all system functions, including but not limited to: status simulation application permissions, power grid operation data management permissions, system account maintenance permissions, system menu maintenance permissions, system server parameter monitoring permissions, and log management permissions.
[0091] Data Operation and Maintenance Role: The data operation and maintenance role has certain functional permissions of the system, including: status simulation application permissions and power grid operation data management permissions.
[0092] State simulation application role: The state simulation application role has system state simulation application permissions and some permissions for runtime data management.
[0093] The runtime data management module is used to manage the time-series data stored in the system, including historical runtime data management, typical load management, time-series scenario management, and weather data management functions.
[0094] Historical operation data management function: Supports periodically extracting data from the source automation system / measurement center / data platform and storing it in the iotdb time series database. Supports querying the data integrity rate and detailed data of equipment measurement points by equipment measurement points and by time interval.
[0095] Typical load management function: Supports users to import time-series data of typical load operation scenarios from local according to established file rules, which is used to simulate special operating conditions of equipment during state simulation. The imported time-series data is stored in the iotdb time-series library.
[0096] Time-series scenario management function: It supports users to generate specific state simulation scenario runtime sequence data based on specific state simulation scenario diagrams, which is used for mirror copying and loading of state simulation events. The generated time-series data of multiple devices is stored in the iotdb time-series library.
[0097] Weather data management function: Supports access to historical and recent weather data from external weather systems, providing a data foundation for the output simulation of photovoltaic inverters and wind turbine generators. Weather data is stored in the iotdb time series database.
[0098] The state simulation application display module provides users and third-party business systems with a visual display of state simulation scenario data, including state simulation graph loading function, graph editing function, state simulation time series data loading function, state simulation calculation function, and state simulation graph saving function.
[0099] State simulation graphics loading function: Supports creating in-memory projection maps within the selected power grid structure range based on the original data in the graph database, and displaying them through the system page. Supports loading user-saved historical projection map graphic data files and displaying them through the system page.
[0100] Graphical editing functions: Supports adding new devices, adjusting connection relationships, and adjusting device parameters on loaded graphics. The types of devices that can be added include: line segments, connecting lines, switches, transformers, busbars, loads, etc.; connection relationships refer to the physical static topological connections between devices; device parameters refer to the static parameters of the device itself that affect the simulation analysis of its operating status, such as the length of a line segment and its unit impedance.
[0101] State simulation timing data loading function: Supports selective loading of existing historical running data, typical load data, and timing scenario running data from the timing library. The timing running data will be stored in the device attributes in the memory graph. The timing running data includes: time, current, active power, reactive power, voltage, etc.
[0102] State simulation calculation function: Supports the structured processing of memory graph device information, device parameters, topology connection relationships, and timing data according to the established Protobuf data structure, and sends calculation requests to different state simulation calculation algorithm programs across languages and platforms via file transfer; After the state simulation calculation algorithm program completes the calculation, it generates Protobuf structured data based on established rules. The state simulation calculation function supports parsing the calculation result data and writing the result back to the graph database memory graph, while re-rendering the system page graphical display content.
[0103] State simulation graph saving function: This function supports saving memory graph data to a file, and provides the ability to review and restart the historical state simulation graph.
[0104] Furthermore, the state simulation scenario data interaction module provides visualization capabilities for graph database data and memory projection graphs, which can present clear and accurate state simulation data and topology structures; at the same time, it provides a user-friendly operation interface, which facilitates operation and query by users and third-party business systems, thereby improving the user experience.
[0105] The state simulation scenario data interaction module provides an open interaction mechanism for users and third-party business systems. This open mechanism grants users the right to access and manipulate the virtual memory graph. Specifically, the virtual projection graph is displayed through iframe embedding, and a parent-child component interaction method is used to complete bidirectional data assignment and data acquisition, ensuring the smoothness of the interaction process and the accuracy of data transmission, thereby improving the scalability and usability of the system.
[0106] The present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded onto the processor, it implements the above-described method for simulating and constructing the operating state of a power system based on a graph database.
[0107] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned method for constructing a power system operation state simulation based on a graph database.
[0108] The above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that depart from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A method for constructing a power system operation state simulation based on a graph database, characterized in that, include: Construct a static power grid model based on a graph database; Using the static power grid model as the data foundation, real-time dynamic topology updates of the power grid are performed by accessing real-time remote signaling change information of circuit breakers in the power automation system and model anomaly information of primary equipment in the power automation system. Construct a graph database of power grid operation history snapshots; Based on historical snapshots or real-time cross-sections based on the real-time dynamic topology of the power grid, add / delete / modify power grid equipment to construct a memory projection map; Memory projection graphs incorporate historical, real-time, or future predicted / planned runtime data to construct a state simulation runtime and data environment, which, combined with advanced runtime analysis applications, enables state simulation scenarios.
2. The method for simulating and constructing the operating state of a power system according to claim 1, characterized in that, Constructing a static power grid model includes: reading the primary equipment tables from the relational database of each voltage level in the power system; based on the Neo4j graph database model structure, reconstructing the equipment and their connection point numbers in the primary equipment tables into points, reconstructing the connection relationships between equipment and equipment connection point numbers into edges, reconstructing the equipment type and connection point number type into point labels, and reconstructing the inherent attributes of the equipment into attributes of the equipment points; based on the reconstructed points, edges, labels, and attributes, generating a power grid topology graph with equipment as nodes and electrical connection relationships as edges, thus forming a static power grid model.
3. The method for simulating and constructing the operating state of a power system according to claim 1, characterized in that, The model change information for primary equipment in the power automation system includes: Read the device log change message. If the change message is a new addition, add the point of the device in the graph database. Assign the device point attributes and device type labels according to the device log information. Query whether the graph database currently contains a point with the device connection point number. If it does not exist, create the point with the device connection point number. Then create the edge of the static connection relationship label between the device and its connection point number. If the device is a switch type device, create the edge of the dynamic connection relationship according to the real-time remote signaling status query result. If it is not a switch type device, create the edge of the dynamic connection relationship. If the change message is deletion, first delete all edges directly connected to the device and its node number in the graph database, then delete the device's nodes, and finally determine whether the node with the connection number of the device has no edge connection with other device nodes after the device is deleted. If there is no connection, delete the node with the connection number. If the change message is modification, if the modified ledger data is the connection number, execute the node number change logic in the deletion and addition logic; otherwise, directly modify the attribute data of the device node.
4. The method for simulating and constructing the operating state of a power system according to claim 3, characterized in that, Based on the model anomaly information of primary equipment in the power automation system, when a new or changed non-switch equipment is detected, edges with static and dynamic connection relationship labels are created between the non-switch equipment and its connection point number; when a new or changed switch equipment is detected, edges with static connection relationship are created between the switch equipment and its connection point number. If the remote signaling status of this equipment is closed at this time, edges with dynamic connection relationship are created between the switch equipment and its connection point number.
5. The method for simulating and constructing the operating state of a power system according to claim 1, characterized in that, Performing real-time dynamic topology updates to the power grid includes: Read the real-time remote signaling status of the switch-type device. If the remote signaling status of the switch-type device is "closed" and there is no edge with dynamic connection label between the switch-type device and the device connection point number directly connected through static connection relationship, then create an edge with dynamic connection label between the device and the device connection point number. If the remote signaling status of a switch-type device is "closed" and the switch-type device point and its connection point number, which are directly connected through a static connection relationship, contain an edge with a dynamic connection relationship label, then the status remains unchanged. If the remote signaling status of a switch-type device is "min" and the switch-type device point and the device connection point number directly connected through a static connection relationship have no dynamic connection relationship label, then the status remains unchanged. If the remote signaling status of a switch-type device is "min" and the switch-type device point and its connection point number, which are directly connected through a static connection relationship, have an edge with a dynamic connection relationship label, then delete the edge with the dynamic connection relationship label between the device and its connection point number.
6. The method for simulating and constructing the operating state of a power system according to claim 1, characterized in that, Constructing a graph database of power grid operation history snapshots includes: acquiring network equipment model data and operation status data according to a predetermined cycle, generating network data profile files for the graph database, and storing the profile files as historical snapshots.
7. The method for simulating and constructing the operating state of a power system according to claim 1, characterized in that, Based on historical snapshots or real-time cross-sections, and by overlaying added / deleted / modified power grid equipment, a memory projection map is constructed, including: Using power grid equipment in historical snapshots or real-time sections as nodes and connections between devices as edges, graph data is generated by adding / deleting / modifying the nodes and edges corresponding to the power grid equipment. By calling the native projection process of the graph database, specified nodes and relationship types in the graph data are mapped into memory to construct a memory projection graph of the entire network or a local area.
8. A power system state simulation construction system based on graph database, characterized in that, include: The model data initialization module is used to generate the initial cross-sections of the graph database model; The real-time dynamic topology module of the power grid is used to use the static model of the power grid as the data basis and perform real-time dynamic topology updates of the power grid by accessing the real-time remote signaling change information of circuit breakers in the power automation system and the model change information of primary equipment in the power automation system. The historical model cross-section snapshot management module is used to periodically save the entire network data snapshot cross-section, manage its effective life cycle, and manage data recovery and destruction. The memory projection graph management module is used to generate, create, and destroy state simulation scenarios for corresponding business scenarios based on the needs of business users. The login management and permissions module is used to control user access rights by binding accounts to permissions and roles and assigning different permissions to roles. The runtime data management module is used to manage the time-series data stored in the system, including historical runtime data management, typical load management, time-series scenario management, and weather data management functions. The state simulation application display module provides users and third-party business systems with a visual display of state simulation scenario data, including state simulation graph loading function, graph editing function, state simulation time series data loading function, state simulation calculation function, and state simulation graph saving function.
9. A computer device, characterized in that, include: One or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the power system operation state simulation construction method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the power system operation state simulation construction method according to any one of claims 1-7.
