Methods, apparatus, computer equipment and media for generating power diagram models
By merging and reorganizing relational database schemas in the power system, a power graph model is generated, and closed-state switching nodes are transformed into edge data. This solves the problem of a significant increase in the computational load of the global power grid model and enables fast and accurate power data analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GLOBAL ENERGY INTERCONNECTION RES INST CO LTD
- Filing Date
- 2022-08-23
- Publication Date
- 2026-06-30
Smart Images

Figure CN115374145B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a method, apparatus, computer equipment and medium for generating power diagram models. Background Technology
[0002] The most prominent features of current power grid control systems are "fast and accurate" (or simply fast and accurate). However, in the future, due to the rapid development of centralized and distributed renewable energy sources, in order to achieve coordinated optimization and control of power generation, grid, load, and storage, it is urgently necessary to realize global modeling of the power grid from a holistic perspective of generation, transmission, transformation, distribution, and consumption, constructing a "single map of the entire grid." Therefore, a global perspective is a new characteristic that future power control systems must possess.
[0003] However, to achieve both speed and accuracy while maintaining a "global" foundation, it is necessary to overcome the challenge of a significant increase in computational load for application functions that utilize the entire power grid model and data. To meet the requirements of real-time system operation without compromising accuracy, application functions face even greater challenges in terms of speed in both analytical calculations and power grid response. Summary of the Invention
[0004] To overcome the challenge of significantly increased computational load for applications involving full power grid models and data, and to meet the requirements of real-time system operation without compromising accuracy, thereby improving the speed and efficiency of power data analysis, this invention proposes a method, apparatus, computer equipment, and medium for generating power graph models.
[0005] In a first aspect, the present invention provides a method for generating a power diagram model, comprising:
[0006] Based on the CIM / E relational model of the power system, similar relational schemas in the relational database of the power system are merged and / or reorganized to form a new set of relational schemas.
[0007] The first power graph model is generated based on the new set of relational schemas;
[0008] Obtain the switches that are in a closed state in the first power diagram model;
[0009] The node data corresponding to the switch is transformed into edge data to form a second power graph model, which is then used as the optimized power graph model.
[0010] This invention utilizes the CIM / E relationship model to merge or reorganize similar relationship patterns, reducing data storage pressure and making the storage method of power equipment more closely aligned with physical entities. Simultaneously, it transforms node data corresponding to closed-state switches into edge data, optimizing the power graph model. The time required to traverse the power graph model is proportional to the number of nodes traversed. Transforming closed-state switches from nodes into edges reduces the number of nodes in the power graph model, thereby reducing its size and improving the efficiency of power graph traversal and access, ultimately increasing the speed and efficiency of power data analysis.
[0011] In conjunction with the first aspect, in the first embodiment of the first aspect, the CIM / E relational model includes multiple relation schemas, each containing a primary key. Similar relation schemas in the relational database of the power system are merged and / or reorganized to form a new set of relation schemas, including:
[0012] Merge relation schemas with the same primary key to form a new relation schema. The attributes of the new relation schema are the union of the attributes of the relation schemas with the same primary key.
[0013] In conjunction with the first aspect, in the second embodiment of the first aspect, similar relational schemas in the relational database of the power system are merged and / or reorganized to form a new set of relational schemas, including:
[0014] Identify multiple relational entities that belong to the same physical concept;
[0015] By combining relational entities and their corresponding relational schemas, new entities and new relational schemas are formed. The new relational schemas are used to represent the relationships between the new entities.
[0016] Through the above embodiments, multiple relationships with the same primary key are merged, and multiple relationship entities with the same physical concept are combined, which reduces the pressure of data storage and makes the storage method of objects such as AC and DC lines in the CIM / E relationship model more in line with physical entities.
[0017] In conjunction with the second embodiment of the first aspect, in the third embodiment of the first aspect, the physical concept includes any one or more of the following: AC line combination, two-winding transformer combination, three-winding transformer combination, and DC line combination.
[0018] In conjunction with the first aspect, in the fourth embodiment of the first aspect, the first power graph model represents the inter-node relationships contained in the relational database. Generating the first power graph model based on a new set of relational schemas includes:
[0019] Based on the new set of relation schemas, obtain the primary key and foreign key information from the relational database;
[0020] Based on primary key and foreign key information, the relational database is converted into information about nodes and their attributes, and edges and their attributes.
[0021] Based on the information of nodes and their attributes, and the information of edges and their attributes, two nodes with foreign key references are connected in the first power graph model to form a directed edge.
[0022] Through the above embodiments, power data is extracted from relational databases and mapped to the first power graph model. The power system network topology can be intuitively expressed by graphs and is easy to access in parallel, overcoming the challenge of expressing massive, complex and interconnected data, and is more suitable for large-scale power system relationship analysis.
[0023] In conjunction with the first aspect, in the fifth embodiment of the first aspect, the node data corresponding to the switch is transformed into edge data to form a second power graph model, including:
[0024] Starting with the switch, obtain the physical connection nodes associated with the switch's incoming edges and the physical connection nodes associated with its outgoing edges, thus obtaining the node data associated with the switch's incoming edges and the node data associated with its outgoing edges.
[0025] Perform a Cartesian product of the node data associated with the incoming edge and the node data associated with the outgoing edge to obtain the edge data corresponding to the switch;
[0026] Add edge data corresponding to the switch in the first power graph model, and delete the node data corresponding to the switch to form the second power graph model.
[0027] Through the above embodiments, based on the access and query characteristics of the power graph database, the first power graph model is optimized by changing the model representation type of all closed switches and disconnectors, transforming the node data corresponding to switches in a closed state into edge data. The time required to traverse the power graph model is proportional to the number of nodes traversed. Transforming switches in a closed state from nodes into edges reduces the number of nodes in the power graph model, thereby reducing its size and improving the efficiency of power graph traversal and access.
[0028] Secondly, the present invention provides a power diagram model generation apparatus, the apparatus comprising:
[0029] The merge and reorganize module is used to merge and / or reorganize similar relational patterns in the relational database of the power system based on the CIM / E relational model of the power system, forming a new set of relational patterns.
[0030] Establish a module for generating the first power graph model based on the new set of relational schemas;
[0031] The acquisition module is used to acquire switches that are in a closed state in the first power diagram model;
[0032] The optimization module is used to transform the node data corresponding to the switch into edge data to form a second power graph model, and the second power graph model is used as the optimized power graph model.
[0033] The aforementioned device utilizes the CIM / E relational model to merge or reorganize similar relational patterns, reducing the pressure on data storage and making the storage method of power equipment more closely aligned with physical entities. Simultaneously, it optimizes the power graph model, reduces its size, improves the efficiency of power graph traversal and access, and enhances the speed and efficiency of power data analysis.
[0034] Thirdly, the present invention also provides a computer device, including a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the steps of the power diagram model generation method of the first aspect or any embodiment of the first aspect.
[0035] Fourthly, 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 steps of the power diagram model generation method of the first aspect or any embodiment of the first aspect. Attached Figure Description
[0036] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0037] Figure 1 This is a flowchart of a method for generating a power diagram model according to an exemplary embodiment;
[0038] Figure 2 This is a schematic diagram of a power diagram model generation device according to an exemplary embodiment;
[0039] Figure 3 This is a schematic diagram of the hardware structure of a computer device according to an exemplary embodiment. Detailed Implementation
[0040] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0042] Power graph models based on graph databases are an effective method to improve the speed and efficiency of power data analysis. Power graph models store data using a format including nodes, edges, and attributes, overcoming the challenge of representing massive, complex, and interconnected data. Compared to traditional relational database management systems and other emerging big data products, graph models are more suitable for large-scale power system relational analysis. Due to the development path of power systems and information technology, most power data is still stored in traditional relational databases. Therefore, researching how to extract power data from relational databases and map it to power graph databases to form power graph models has significant practical implications.
[0043] The concept of graph data models originated from graph theory and is a technique that has emerged in recent years for parallel analysis and processing of massive amounts of data. Since the topology of power system networks can be intuitively represented by graphs and is easily accessible in parallel, applying graph data models to power system data storage and analysis is expected to improve the computational efficiency of processing massive amounts of data from large-scale power systems.
[0044] Graph data models are based on graph theory and use attribute graphs to represent data. An attribute graph contains three basic elements: vertices, edges, and properties. A "vertice" defines an entity, such as a plant, electrical component, or equipment, approximating a record in a relational data model. "Edges" between nodes describe the relationships between entities and can be directed or undirected. "Attributes" are labeled on "vertices" or "edges" and represent supplementary information about the entity or its relationships. For example, a "plant node" might contain the following attributes: identifier, original Chinese name, standard full name, plant type, region identifier, total active power, total reactive power, plant longitude, plant latitude, current measurement identifier, grounding switch measurement identifier, generator transformer measurement, and system region.
[0045] This invention provides a method, apparatus, computer equipment, and medium for generating power graph models, based on power data stored in traditional relational databases and the CIM / E relational model, a power system model data description specification, and utilizing graph data technology.
[0046] Figure 1 This is a flowchart of a method for generating a power diagram model according to an exemplary embodiment. Figure 1 As shown, the method for generating the power diagram model includes, but is not limited to, steps S101 to S104.
[0047] In step S101, based on the CIM / E relational model of the power system, similar relational patterns in the relational database of the power system are merged and / or reorganized to form a new set of relational patterns.
[0048] Specifically, in the CIM / E relational model, information about the same concept may be stored in different tables in a relational database. Each table represents a relation schema, and even the same concept may be represented by several relation schemas. Therefore, it is necessary to merge the relation schemas that describe the same concept in the relation schema file.
[0049] In step S102, a first power graph model is generated based on the new set of relational schemas.
[0050] Specifically, based on the new set of relational patterns generated by merging and reorganizing, an initial power graph model, namely the first power graph model, is generated.
[0051] In step S103, the switches in the first power diagram model that are in a closed state are obtained.
[0052] Specifically, in the first power diagram model, the switching states include closed and open states. A closed switch indicates that the circuit is connected, while an open switch indicates that the circuit is open and current cannot flow. The switch can be a circuit breaker, a disconnecting switch, or other switches in the power system.
[0053] In step S104, the node data corresponding to the switch is transformed into edge data to form a second power graph model, which is then used as the optimized power graph model.
[0054] Specifically, the number of switches is several times the number of equipment such as transformers, busbars, generators, and loads. When a switch is in a closed state, it has no practical significance. Therefore, when using a power graph model for power analysis, changing the node data corresponding to a switch in a closed state to edge data helps reduce the size of the power graph model without affecting it.
[0055] This method, utilizing the CIM / E relational model, theoretically ensures the integrity and consistency of the mapping method for generating power graph models from relational databases. Merging or reorganizing similar relational schemas reduces the pressure on data storage and makes the storage method of objects such as AC and DC lines in the CIM / E relational model more closely resemble physical entities. At the same time, it transforms the node data corresponding to switches in a closed state into edge data, thereby optimizing the power graph model, reducing its size, improving the efficiency of power graph traversal and access, and increasing the speed and efficiency of power data analysis.
[0056] In one example, the CIM / E relational model includes multiple relation schemas, each containing a primary key. Similar relation schemas in the relational database of the power system are merged and / or reorganized to form a new set of relation schemas. This includes merging relation schemas with the same primary key to form a new relation schema, where the attributes of the new relation schema are the union of the attributes of the relation schemas with the same primary key. For example, two data tables describing generator static and dynamic parameters can be merged into a single data table.
[0057] In another example, merging and / or reorganizing similar relational schemas in a relational database of a power system to form a new set of relational schemas includes the following steps: identifying multiple relational entities belonging to the same physical concept; combining the relational entities and their corresponding relational schemas to form new entities and new relational schemas, the new relational schemas being used to represent the relationships between the new entities.
[0058] In an optional embodiment, the physical concepts that require multiple relational entity combinations in the CIM / E model include: (1) AC line combination; (2) two-roll transformer combination; (3) three-roll transformer combination; and (4) DC line combination.
[0059] In one optional embodiment, the combination of multiple relational entities includes the combination of multiple relational entities for AC lines. In the CIM / E relational model, an AC line is described by two relations: AC line segment class and AC line endpoint class. The merging rule is as follows: based on the correspondence between the foreign key "AC line segment identifier" in the AC line endpoint class relational entity (including the first endpoint and the last endpoint) and the primary key "AC line segment identifier" in the AC line segment class, the two relational entities, AC line segment class and AC line endpoint class, are connected to generate an AC line class relational entity.
[0060] In one optional embodiment, the combination of multiple relational entities includes a combination of two transformer coils. In the CIM-E relational model, the two transformer coils are described by three relational entities: transformer class, transformer winding class, and transformer tap type class. The merging rule is as follows: based on the correspondence between the foreign keys "transformer identifier" and "tap type identifier" in the transformer winding class relational entity (including high-end winding and low-end winding) and the relevant primary keys in the transformer class relational entity and the tap type class relational entity, the above-mentioned multiple relational entities are connected and combined into a two-coil transformer class relational entity.
[0061] In one optional embodiment, the combination of multiple relational entities includes a three-winding transformer combination. The three-winding transformer in the CIM / E relational model is also described by three relations: transformer class, transformer winding class, and transformer tap type class. Due to the characteristics of the high, medium, and low voltage windings of the three-winding transformer, the merging rule is as follows: based on the correspondence between the foreign keys "transformer identifier" and "tap type identifier" in the transformer winding class relational entity (including high-end, medium-end, and low-end windings) and the relevant primary keys of the transformer class relational entity and the tap type class relational entity, multiple relational entities are connected and combined into high, medium, and low-end equivalent transformer class relational entities.
[0062] In one optional embodiment, the combination of multiple relational entities includes a DC line combination. DC lines in the CIM / E relational model are described using DC line segment classes and DC line endpoint classes. The merging rule is as follows: based on the correspondence between the foreign key "DC line segment identifier" in the DC line endpoint class relational entity (including the first endpoint and the last endpoint) and the primary key "DC line segment identifier" in the DC line segment class, the two relational entities, DC line segment class and DC line endpoint class, are connected to generate a DC line class relational entity.
[0063] In one example, the first power graph model represents the relationships between nodes contained in a relational database. Generating the first power graph model based on a new set of relational schemas includes the following steps:
[0064] First, based on the new set of relation schemas, obtain the primary key and foreign key information from the relational database;
[0065] Then, based on the primary key information and foreign key information, the relational database is converted into information about nodes and their attributes, and information about edges and their attributes;
[0066] Finally, based on the information of nodes and their attributes, and the information of edges and their attributes, two nodes with foreign key references are connected in the first power graph model to form a directed edge.
[0067] In an optional embodiment, similar concepts in the relation schema file are merged to obtain a new set of relation schemas. By analyzing the power database relation schema set, all power relation schemas in the relation schema set are added as nodes to the first power graph, and the nodes are named using the relation schema names. Foreign key references between nodes are searched, and these two nodes are connected in the graph, pointing to the referenced node to form directed edges. The first power graph model is constructed, defining power system equipment such as buses, switches, disconnectors, generators, loads, and lines in CIM / E as vertices, the connecting lines between each device as edges, and the basic characteristics describing each device or connection relationship as attributes of vertices or edges, and these are saved to the graph database.
[0068] Converting relational databases into power graph models allows for intuitive representation and easy parallel access, thereby improving the computational efficiency of processing massive amounts of data in large-scale power systems.
[0069] In one example, based on the query characteristics of graph databases, the first power graph model is optimized to improve the access efficiency of the power graph database while satisfying integrity and consistency. In the power topology, the number of switches is several times the number of equipment such as transformers, buses, generators, and loads. Therefore, when performing power analysis using a power graph model, the node data corresponding to switches in a closed state is transformed into edge data to form a second power graph model. This involves the following steps:
[0070] First, traverse all nodes and find all nodes whose node type is switch;
[0071] Secondly, determine the open or closed state of the switch and filter out the switches that are closed.
[0072] Next, starting with the closed switch, search for all physically connected nodes associated with its incoming edges. All physical connection nodes associated with the outgoing edge
[0073] Finally, perform a Cartesian product on the two sets of physically connected nodes, and then add the edge set corresponding to the switch in the closed state to the first power graph model. Delete the corresponding switch node in the first power diagram model.
[0074] Based on the access and query characteristics of graph databases, by changing the representation type of switches in a closed state, that is, transforming the node data corresponding to the switches into edge data, the size of the power graph model is reduced, thereby improving the efficiency of power graph traversal and access.
[0075] Unlike current graph databases that are node-centric and rely on graph traversal for access and querying, power graph models have two key characteristics for data access and querying. First, vertices can be accessed directly, but edges cannot; edge access requires traversing from the nodes. Second, the time required for a complete graph traversal is directly proportional to the number of hops (the number of edges traversed from the starting vertex to the target vertex); that is, the more nodes and edges in the graph, the longer the access and query time.
[0076] Based on the same inventive concept, embodiments of the present invention also provide a power diagram model generation device, such as... Figure 2 As shown, the device includes:
[0077] The merging and reorganization module 201 is used to merge and / or reorganize similar relational patterns in the relational database of the power system based on the CIM / E relational model of the power system, forming a new set of relational patterns. For details, please refer to the description of step S101 in the above embodiments, which will not be repeated here.
[0078] Module 202 is established to generate a first power graph model based on the new set of relational schemas. For details, please refer to the description of step S102 in the above embodiments, which will not be repeated here.
[0079] The acquisition module 203 is used to acquire the switches in the closed state in the first power diagram model. For details, please refer to the description of step S103 in the above embodiment, which will not be repeated here.
[0080] The optimization module 204 is used to convert the node data corresponding to the switch into edge data to form a second power graph model, and uses the second power graph model as the optimized power graph model. For details, please refer to the description of step S104 in the above embodiment, which will not be repeated here.
[0081] In one example, in the merge and reorganization module 201, the CIM / E relational model includes multiple relation schemas, each containing a primary key. The merge and reorganization module 201 also includes:
[0082] The merge submodule is used to merge relation schemas with the same primary key to form a new relation schema. The attributes of the new relation schema are the union of the attributes of the relation schemas with the same primary key. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0083] In yet another example, the merge and reorganization module 201 also includes:
[0084] The determination submodule is used to identify multiple relational entities belonging to the same physical concept. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0085] The combination submodule is used to combine relational entities and their corresponding relational schemas to form new entities and new relational schemas. The new relational schemas are used to represent the relationships between the new entities. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0086] In one example, within the defined submodule, the physical concepts include any one or more of the following: AC line combination, two-winding transformer combination, three-winding transformer combination, and DC line combination.
[0087] In one example, in the creation module 202, the first power graph model represents the relationships between nodes contained in the relational database. The creation module 202 also includes:
[0088] The first acquisition submodule is used to retrieve primary key and foreign key information from the relational database based on the new relation schema set. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0089] The transformation submodule is used to convert the relational database into information about nodes and their attributes, and edges and their attributes, based on primary key and foreign key information. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0090] The connection submodule is used to connect two nodes with foreign key references in the first power graph model, forming a directed edge, based on the information of the nodes and their attributes, and the information of the edges and their attributes. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0091] In another example, optimization module 204 includes:
[0092] The second acquisition submodule is used to acquire the physical connection nodes associated with the incoming edges and outgoing edges of the switch, starting from the switch, thereby obtaining the node data associated with the incoming edges and outgoing edges of the switch. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0093] The calculation submodule is used to perform a Cartesian product of the node data associated with the incoming edge and the node data associated with the outgoing edge to obtain the edge data corresponding to the switch. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0094] A new submodule is added to the first power graph model to add edge data corresponding to switches and delete node data corresponding to switches, thus forming the second power graph model. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0095] This device, utilizing the CIM / E relational model, theoretically ensures the integrity and consistency of the mapping method for generating power graph models from relational databases; it merges or reorganizes similar relational schemas, reducing the pressure on data storage and making the storage method of objects such as AC and DC lines in the CIM / E relational model more closely match the physical entities; at the same time, it optimizes the power graph model, reduces its size, improves the efficiency of power graph traversal and access, and enhances the speed and efficiency of power data analysis.
[0096] The specific limitations and beneficial effects of the aforementioned device can be found in the limitations of the power diagram model generation method described above, and will not be repeated here. Each of the above modules can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0097] Figure 3 This is a schematic diagram of the hardware structure of a computer device according to an exemplary embodiment. For example... Figure 3 As shown, the device includes one or more processors 310 and a memory 320, which includes persistent memory, volatile memory, and a hard disk. Figure 3 Taking a processor 310 as an example, the device may also include an input device 330 and an output device 340.
[0098] The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.
[0099] Processor 310 can be a Central Processing Unit (CPU). Processor 310 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof. The general-purpose processor can be a microprocessor or any conventional processor.
[0100] The memory 320, as a non-transitory computer-readable storage medium, includes persistent memory, volatile memory, and a hard disk. It can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the power diagram model generation method in this embodiment. The processor 310 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 320, thereby implementing any of the above-mentioned power diagram model generation methods.
[0101] The memory 320 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data that is needed and required. Furthermore, the memory 320 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 320 may optionally include memory remotely located relative to the processor 310, and these remote memories can be connected to the data processing device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0102] Input device 330 can receive input digital or character information, and generate signal inputs related to user settings and function control. Output device 340 may include display devices such as a display screen.
[0103] One or more modules are stored in memory 320, and when executed by one or more processors 310, they perform actions such as... Figure 1 The method shown.
[0104] The above-described product can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in [reference 1]. Figure 1 The relevant descriptions in the illustrated embodiments.
[0105] This invention also provides a non-transitory computer storage medium storing computer-executable instructions that can execute the generation method in any of the above-described method embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.
[0106] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0107] The above are merely specific embodiments of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for generating a power diagram model, characterized in that, The method includes: Based on the CIM / E relational model of the power system, similar relational patterns in the relational database of the power system are merged and / or reorganized to form a new set of relational patterns. A first power graph model is generated based on the new set of relational patterns; Obtain the switches that are in a closed state in the first power diagram model; The node data corresponding to the switch is transformed into edge data to form a second power graph model, and the second power graph model is used as the optimized power graph model. The step of converting the node data corresponding to the switch into edge data to form a second power graph model includes: Taking the switch as the starting node, obtain the physical connection nodes associated with the incoming edge and the physical connection nodes associated with the outgoing edge of the switch, and obtain the node data associated with the incoming edge and the node data associated with the outgoing edge of the switch. Perform a Cartesian product of the node data associated with the incoming edge and the node data associated with the outgoing edge to obtain the edge data corresponding to the switch; Add edge data corresponding to the switch to the first power graph model, and delete node data corresponding to the switch to form a second power graph model.
2. The method according to claim 1, characterized in that, The CIM / E relational model includes multiple relation schemas, each containing a primary key. The merging and / or reorganization of similar relation schemas in the relational database of the power system forms a new set of relation schemas, including: Relationship schemas with the same primary key are merged to form a new relationship schema, wherein the attributes of the new relationship schema are the union of the attributes of the relationship schemas with the same primary key.
3. The method according to claim 1, characterized in that, The merging and / or reorganization of similar relational schemas in the relational database of the power system to form a new set of relational schemas includes: Identify multiple relational entities that belong to the same physical concept; The relational entities and their corresponding relational schemas are combined to form new entities and new relational schemas, which are used to represent the relationships between the new entities.
4. The method according to claim 3, characterized in that, The physical concepts include any one or more of the following: AC line combination, two-winding transformer combination, three-winding transformer combination, and DC line combination.
5. The method according to claim 1, characterized in that, The first power graph model represents the inter-node relationships contained in the relational database. Generating the first power graph model based on the new relational schema set includes: Based on the new set of relational schemas, obtain the primary key and foreign key information from the relational database; Based on the primary key information and foreign key information, the relational database is converted into information about nodes and their attributes, and information about edges and their attributes; Based on the information of the nodes and their attributes, and the information of the edges and their attributes, two nodes with foreign key references are connected in the first power graph model to form a directed edge.
6. A device for generating a power diagram model, characterized in that, The device includes: The merge and reorganize module is used to merge and / or reorganize similar relational patterns in the relational database of the power system based on the CIM / E relational model of the power system, forming a new set of relational patterns. A module is established to generate a first power graph model based on the new set of relational schemas; The acquisition module is used to acquire switches that are in a closed state in the first power diagram model; The optimization module is used to transform the node data corresponding to the switch into edge data to form a second power graph model, and to use the second power graph model as the optimized power graph model.
7. A computer device, characterized in that, The method includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the steps of the power diagram model generation method according to any one of claims 1-5.
8. 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 steps of the power diagram model generation method as described in any one of claims 1-5.