Data storage method, device and platform for power grid calculation and deduction generality service
By constructing a power grid topology diagram and partitioning the storage based on node attributes and similarities, the problems of low data query efficiency and poor system stability in the power grid business service system are solved, and efficient data query and stable calculation across systems are achieved.
Patent Information
- Application Number
- CN202510705099.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-16
AI Technical Summary
In the power grid business service system, the storage properties and format differences of graph data lead to low query speed, redundant design and compatibility issues, affecting server resources and system stability. Frequent switching of query operations causes system lag and reduces overall computing efficiency.
Build a power grid topology diagram, partition and store it based on node attributes and similarities, obtain power grid resource data and historical operation data, establish a graph data model, and partition and store it based on the topology and similarity of the nodes to achieve efficient query and storage of cross-system data.
It realizes the unified graph data construction and storage of data between different power grid business service systems, improves the system stability and computing efficiency of cross-system power grid computing and deduction common services, reduces the storage resource switching operations during data query, and improves data query speed.
Smart Images

Figure CN120653805A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data storage method, device and platform for common services for power grid computing and deduction. Background Art
[0002] In recent years, the exponential growth of components in power systems has made their operation more complex. The integration of numerous power devices has generated massive amounts of power business data, making efficient use of this data crucial for predicting power system trends. Graph data, which intuitively represents relationships between entities through nodes and edges, not only efficiently handles complex network analysis and relationship queries but also flexibly adapts to changes in data structure, effectively addressing the challenges of representing high-dimensional data in power grid operations.
[0003] Currently, in actual power grid business scenarios, graph data in different business service systems suffer from issues such as low query speed, redundant design, and compatibility due to differences in storage properties and formats. This puts tremendous pressure on the server's memory and computing resources, affecting data query speed and reducing system stability. Frequent switching query operations between different business service systems can easily cause system freezes and reduce overall computing efficiency. Summary of the Invention
[0004] In order to overcome the above-mentioned problems of low query efficiency, poor system stability and low overall computing efficiency when performing data queries in different power grid business service systems, the present invention provides a data storage method, device and platform for common services for power grid computing and deduction.
[0005] In one aspect, the present invention provides a data storage method for common services for power grid computing and deduction, comprising:
[0006] Obtain grid resource data from different grid business service systems, real-time measurement data of each link of the grid, and historical operation data of each link of the grid;
[0007] Constructing a power grid topology diagram corresponding to the power grid physical model based on the power grid resource data; adding node attributes to the power grid topology diagram based on the real-time measurement data of each link of the power grid and the historical operation data of each link of the power grid to obtain a graph data model of the power grid;
[0008] Partitioning each node in the graph data model based on the topology and node similarity of each node in the graph data model;
[0009] Partitioning and storing the data in the graph data model based on the partitioning result, so as to provide a common service for power grid calculation and deduction by calling the partitioned stored data;
[0010] The node similarity is determined based on the connection path and node attributes of each node in the graph data model.
[0011] Optionally, the power grid resource data includes status of each power grid physical device and connection status between each power grid physical device; and constructing a power grid topology diagram corresponding to the power grid physical model based on the power grid resource data includes:
[0012] The substation bus in the physical model of the power grid is used as a root node, and each power device in the physical model of the power grid is used as a child node; each node in the power grid topology diagram is constructed based on the status of each physical device of the power grid;
[0013] Using the power lines and device switches connecting the power devices in the physical model of the power grid as edges between the child nodes, and constructing edges between the nodes in the power grid topology diagram based on the connection between the physical devices of the power grid;
[0014] Based on the current flow direction between the physical devices of the power grid, the direction of the edge between the nodes in the power grid topology diagram is determined to obtain the directed edge between the nodes in the power grid topology diagram;
[0015] Based on the nodes and the directed edges between the nodes in the power grid topology diagram, a power grid topology diagram corresponding to the power grid physical model is obtained.
[0016] Optionally, the adding node attributes to the power grid topology diagram based on the real-time measurement data of each link of the power grid and the historical operation data of each link of the power grid to obtain a graph data model of the power grid includes:
[0017] Adding node measurement attributes to corresponding nodes in the power grid topology diagram based on real-time measurement data of each link of the power grid;
[0018] Adding node historical operation attributes to corresponding nodes in the power grid topology diagram based on historical operation data of each link of the power grid;
[0019] The node measurement attributes and the node historical operation attributes respectively include time attributes.
[0020] Optionally, the topology of each node includes the number of connected edges and interaction conditions of each node; the node similarity includes distance similarity and attribute similarity; and partitioning each node in the graph data model based on the topology and node similarity of each node in the graph data model includes:
[0021] Filtering main category nodes from the graph data model based on the number of connecting edges of each node in the graph data model;
[0022] For nodes other than the main category nodes, based on the interaction between each other node and each main category node, each other node is assigned to the node category set corresponding to the matching main category node, thereby obtaining a preliminary partitioning result for each node in the graph data model;
[0023] The preliminary partitioning result is optimized based on the distance similarity and attribute similarity of each node in the graph data model to obtain the partitioning result of each node in the graph data model.
[0024] Optionally, optimizing the preliminary partitioning result based on the distance similarity and attribute similarity of each node in the graph data model to obtain a partitioning result for each node in the graph data model includes:
[0025] For a node pair consisting of any two nodes in different initial partitions in the preliminary partitioning result, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node;
[0026] Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs;
[0027] Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained;
[0028] Merging and / or splitting the preliminary partitioning results based on the similarity of each node pair to obtain a partitioning result for each node in the graph data model;
[0029] The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
[0030] Optionally, optimizing the preliminary partitioning result based on the distance similarity and attribute similarity of each node in the graph data model to obtain a partitioning result for each node in the graph data model includes:
[0031] For each node in the graph data model, determine the intra-region similarity of the node based on the similarity between the node and its adjacent nodes in the partition to which it belongs; determine the intra-graph similarity of the node based on the similarity between the node and its adjacent nodes in the graph data model;
[0032] Determine the metric value of the node belonging to the current partition based on the ratio of the intra-region similarity of the node to the intra-graph similarity; for each partition, determine the average metric value of the current partition based on the average metric value of each node in the partition belonging to the current partition;
[0033] Determining an optimization strategy for the preliminary partitioning result with the goal of maximizing the average metric value of each partition;
[0034] Optimizing the preliminary partitioning result based on the optimization strategy to obtain a partitioning result for each node in the graph data model;
[0035] The similarity between the node and its adjacent nodes is determined based on the distance similarity and attribute similarity between the node and its adjacent nodes.
[0036] Optionally, before determining the intra-region similarity of the node based on the similarity between the node and adjacent nodes in the partition to which it belongs, the method further includes:
[0037] For each node pair consisting of a node and its adjacent node in the graph data model, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node;
[0038] Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs;
[0039] Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained;
[0040] The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
[0041] Optionally, the similarity of the node pair is as follows:
[0042] Similarity(x,y)=α*Similarity D (x,y)+(1-α)*Similarity P (x,y);
[0043]
[0044] Among them, Similarity(x,y) is the similarity of the node pair (x,y), α is the weight coefficient, Similarity D (x,y) is the distance similarity of the node pair (x,y), Similarity P(x,y) is the attribute similarity of the node pair (x,y); S(x,y) represents the least common superclass of the node pair (x,y), and D(S(x,y)) represents the depth of the least common superclass of the node pair (x,y); D(x) represents the path length between node x and the root node, and D(y) represents the path length between node y and the root node; P(x) and P(y) represent the number of attributes of the node category set to which node x and node y belong, respectively; C(P(x), P(y)) represents the number of common attributes in the node category set to which node x and node y belong.
[0045] Optionally, before partitioning each node in the graph data model based on the topology and node similarity of each node in the graph data model, the method further includes:
[0046] The node information and edge information in the graph data model are converted into a specified graph data format based on triples.
[0047] Optionally, partitioning and storing the data in the graph data model based on the partitioning result includes:
[0048] Divide the storage space of the target database into storage areas based on the partitioning results;
[0049] The data in different partitions in the partition result are serialized and stored in corresponding storage areas.
[0050] Optionally, the power grid calculation and deduction common service includes a power grid simulation analysis service and / or a power grid deduction and prediction service.
[0051] On the other hand, the present invention also provides a data storage method and device for common services for power grid computing and deduction, comprising:
[0052] Data acquisition module, used to obtain grid resource data from different grid business service systems, real-time measurement data of various links in the grid, and historical operation data of various links in the grid;
[0053] a graph model construction module for constructing a power grid topology diagram corresponding to the power grid physical model based on the power grid resource data; adding node attributes and edge attributes to the power grid topology diagram based on the real-time measurement data of each link of the power grid and the historical operation data of each link of the power grid to obtain a graph data model of the power grid;
[0054] A partition storage module is configured to partition each node in the graph data model based on the topology and node similarity of each node in the graph data model; partition the data in the graph data model based on the partitioning results, so as to provide common power grid calculation and deduction services by calling the partitioned stored data;
[0055] The node similarity is determined based on the connection path and node attributes of each node in the graph data model.
[0056] Optionally, the power grid resource data includes the status of each physical device of the power grid and the connection status between each physical device of the power grid; the graph model construction module includes a topology graph construction submodule, and the topology graph construction submodule includes:
[0057] A node construction subunit is used to take the substation bus in the physical model of the power grid as a root node and each power device in the physical model of the power grid as a child node; and to construct each node in the power grid topology diagram based on the status of each physical device of the power grid;
[0058] an edge construction subunit, configured to use the power lines and device switches connecting the power devices in the physical model of the power grid as edges between the subnodes, and to construct edges between the nodes in the power grid topology diagram based on the connection between the physical devices of the power grid; determine the direction of the edges between the nodes in the power grid topology diagram based on the current flow between the physical devices of the power grid, and obtain directed edges between the nodes in the power grid topology diagram;
[0059] The graph construction subunit is used to obtain a power grid topology diagram corresponding to the power grid physical model based on the nodes and the directed edges between the nodes in the power grid topology diagram.
[0060] Optionally, the graph model construction module includes an attribute adding submodule, and the attribute adding submodule is used to:
[0061] Adding node measurement attributes to corresponding nodes in the power grid topology diagram based on real-time measurement data of each link of the power grid;
[0062] Adding node historical operation attributes to corresponding nodes in the power grid topology diagram based on historical operation data of each link of the power grid;
[0063] The node measurement attributes and the node historical operation attributes respectively include time attributes.
[0064] Optionally, the topology of each node includes the number of connected edges and interaction conditions of each node; the node similarity includes distance similarity and attribute similarity; the partition storage module includes a node partition submodule, and the node partition submodule includes:
[0065] a node category screening subunit, configured to screen out main category nodes from the graph data model based on the number of connected edges of each node in the graph data model;
[0066] a preliminary partitioning subunit, configured to assign, for each node other than the main category node, to a node category set corresponding to a matching main category node based on the interaction between each other node and each main category node, thereby obtaining a preliminary partitioning result for each node in the graph data model;
[0067] The optimization partitioning subunit is used to optimize the preliminary partitioning result based on the distance similarity and attribute similarity of each node in the graph data model to obtain the partitioning result of each node in the graph data model.
[0068] Optionally, the optimization partition subunit is specifically used to:
[0069] For a node pair consisting of any two nodes in different initial partitions in the preliminary partitioning result, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node;
[0070] Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs;
[0071] Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained;
[0072] Merging and / or splitting the preliminary partitioning results based on the similarity of each node pair to obtain a partitioning result for each node in the graph data model;
[0073] The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
[0074] Optionally, the optimization partition subunit is specifically used to:
[0075] For each node in the graph data model, determine the intra-region similarity of the node based on the similarity between the node and its adjacent nodes in the partition to which it belongs; determine the intra-graph similarity of the node based on the similarity between the node and its adjacent nodes in the graph data model;
[0076] Determine the metric value of the node belonging to the current partition based on the ratio of the intra-region similarity of the node to the intra-graph similarity; for each partition, determine the average metric value of the current partition based on the average metric value of each node in the partition belonging to the current partition;
[0077] Determining an optimization strategy for the preliminary partitioning result with the goal of maximizing the average metric value of each partition;
[0078] Optimizing the preliminary partitioning result based on the optimization strategy to obtain a partitioning result for each node in the graph data model;
[0079] The similarity between the node and its adjacent nodes is determined based on the distance similarity and attribute similarity between the node and its adjacent nodes.
[0080] Optionally, the optimization partition subunit is further configured to:
[0081] For each node pair consisting of a node and its adjacent node in the graph data model, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node;
[0082] Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs;
[0083] Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained;
[0084] The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
[0085] Optionally, the similarity of the node pair is as follows:
[0086] Similarity(x,y)=α*Similarity D (x,y)+(1-α)*Similarity P (x,y);
[0087]
[0088] Among them, Similarity(x,y) is the similarity of the node pair (x,y), α is the weight coefficient, Similarity D (x,y) is the distance similarity of the node pair (x,y), Similarity P(x,y) is the attribute similarity of the node pair (x,y); S(x,y) represents the least common superclass of the node pair (x,y), and D(S(x,y)) represents the depth of the least common superclass of the node pair (x,y); D(x) represents the path length between node x and the root node, and D(y) represents the path length between node y and the root node; P(x) and P(y) represent the number of attributes of the node category set to which node x and node y belong, respectively; C(P(x), P(y)) represents the number of common attributes in the node category set to which node x and node y belong.
[0089] Optionally, the partition storage module includes:
[0090] The format conversion submodule is used to convert the node information and edge information in the graph data model into a specified graph data format based on triples.
[0091] Optionally, the partition storage module includes a storage submodule, and the storage submodule is used to:
[0092] Divide the storage space of the target database into storage areas based on the partitioning results;
[0093] The data in different partitions in the partition result are serialized and stored in corresponding storage areas.
[0094] Optionally, the power grid calculation and deduction common service includes a power grid simulation analysis service and / or a power grid deduction and prediction service.
[0095] On the other hand, the present invention also provides a common service platform for power grid calculation and deduction, including: a data storage device as described in any one of the above items.
[0096] On the other hand, the present invention also provides an electronic device, comprising: at least one processor and a memory; the memory and the processor are connected via a bus;
[0097] The memory is used to store one or more programs;
[0098] When the one or more programs are executed by the at least one processor, any one of the above methods is implemented.
[0099] On the other hand, the present invention further provides a readable storage medium having an execution program stored thereon, and when the execution program is executed, any one of the methods described above is implemented.
[0100] Compared with the prior art, the present invention has the following beneficial effects:
[0101] The present invention provides a data storage method and device for common services for power grid calculation and deduction. By acquiring power grid resource data, real-time measurement data of various links of the power grid and historical operation data of various links of the power grid from different power grid business service systems, a power grid topology structure diagram corresponding to the physical model of the power grid is constructed based on the power grid resource data; node attributes are added to the power grid topology structure diagram based on the real-time measurement data of various links of the power grid and the historical operation data of various links of the power grid to obtain a graph data model of the power grid, and data is stored based on the graph data model, thereby realizing unified graph data construction and storage of data in different power grid business service systems, breaking down the data barriers between different power grid business service systems, realizing efficient query and storage of cross-system data, and improving the system stability of cross-system common services for power grid calculation and deduction.
[0102] The present invention partitions each node in a graph data model based on the topology of each node and the node similarity in the graph data model; partitions and stores the data in the graph data model based on the partitioning results, so as to provide a common service for power grid calculation and deduction by calling the partitioned stored data; utilizes the topology of the graph data model and the connection paths and attribute similarities of each node to partition the nodes, and divides nodes with high similarity into the same storage area to reduce the storage resource switching operation during the data query process, thereby further improving the data query speed and the stability of the cross-system power grid calculation and deduction common service, and improving the overall computing efficiency of the common service. BRIEF DESCRIPTION OF THE DRAWINGS
[0103] Figure 1 This is a flow chart of a data storage method for common services for power grid computing and deduction according to the present invention;
[0104] Figure 2 A schematic diagram of a minimum common superclass corresponding to a graph data model of the present invention;
[0105] Figure 3 This is a schematic diagram of the structural framework of a common service platform for power grid calculation and deduction according to the present invention;
[0106] Figure 4 This is a structural block diagram of an electronic device of the present invention. DETAILED DESCRIPTION
[0107] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0108] Example 1
[0109] The present invention provides a data storage method for common services for power grid calculation and deduction, the schematic diagram of which is as follows: Figure 1 As shown, the method includes:
[0110] Step S110, acquiring grid resource data from different grid business service systems, real-time measurement data of various grid links, and historical operation data of various grid links;
[0111] Step S120: constructing a power grid topology diagram corresponding to the power grid physical model based on the power grid resource data; adding node attributes to the power grid topology diagram based on the real-time measurement data of each link of the power grid and the historical operation data of each link of the power grid to obtain a graph data model of the power grid;
[0112] Step S130, partitioning each node in the graph data model based on the topology and node similarity of each node in the graph data model;
[0113] Step S140 , partitioning and storing the data in the graph data model based on the partitioning result, so as to provide a common service for power grid calculation and deduction by calling the partitioned stored data.
[0114] In this example embodiment, different power grid business service systems may be systems with different data sources in the power system, and different power grid business service systems may include a power grid enterprise-level measurement center, a power grid resource business middle platform, a power grid data middle platform, etc. The power grid enterprise-level measurement center is used to aggregate real-time measurement data from various links of the power grid. The real-time measurement data from various links of the power grid may include electricity, non-electricity and carbon collection measurement data from various links of the power grid; the power grid resource business middle platform is used to store power grid resource data, such as power grid topology data, the status of various power grid physical devices, and the connection status between various power grid physical devices. The power grid data middle platform is used to aggregate historical operation data from various links of the power grid. The historical operation data from various links of the power grid may include historical operation data of various links of the power grid (such as power grid operation data), historical user data (such as historical electricity consumption behavior, electricity consumption, etc.), and historical equipment data (historical equipment operation status, historical equipment maintenance, fault information, etc.). Node similarity is determined based on the connection path and node attributes of each node in the graph data model. The common services for power grid calculation and deduction may include power grid simulation and analysis services and / or power grid deduction and prediction services. These common services require the integration of data from multiple power grid business service systems to implement and support the invocation of upper-layer applications. The present invention can effectively break through the data barriers between different power grid business service systems, effectively realize the data association between various power grid data business systems, extract data as needed to the platform for calculation and analysis, thereby avoiding the problem of data silos and breaking through data barriers between systems. By matching node partitions with storage partitions, load balancing of the storage process is achieved, thereby improving data storage and query efficiency.
[0115] In some embodiments, the step of constructing a power grid topology diagram corresponding to the power grid physical model based on the power grid resource data in S120 includes:
[0116] The substation bus in the physical model of the power grid is used as a root node, and each power device in the physical model of the power grid is used as a child node; each node in the power grid topology diagram is constructed based on the status of each physical device of the power grid;
[0117] Using the power lines and device switches connecting the power devices in the physical model of the power grid as edges between the child nodes, and constructing edges between the nodes in the power grid topology diagram based on the connection between the physical devices of the power grid;
[0118] Based on the current flow direction between the physical devices of the power grid, the direction of the edge between the nodes in the power grid topology diagram is determined to obtain the directed edge between the nodes in the power grid topology diagram;
[0119] Based on the nodes and the directed edges between the nodes in the power grid topology diagram, a power grid topology diagram corresponding to the power grid physical model is obtained.
[0120] In this example implementation, considering that all types of power grid data are generated based on the physical model of the power grid, a graph model can be constructed based on the physical model of the power grid. Power grid resource data includes the status of each physical device in the power grid and the connections between them. Power grid physical devices can be various types of power equipment, such as generators, transformers, various switches, and various detection equipment. The physical model of the power grid describes the connection relationships between physical devices in the power grid and also includes descriptions of the physical properties of components such as these devices. The physical model of the power grid can be converted into a power grid topology based on the status of each physical device and the connections between them. Specifically, the substation busbar is abstracted as the root node, power equipment such as circuit breakers, transformers, and loads are abstracted as child nodes, and power lines (such as overhead lines and cable lines) and equipment switches (such as outgoing switches, section switches, and tie switches) are abstracted as edges. The direction of the connecting edges between nodes is then determined based on the actual current flow in the power grid, forming directed edges. This constructs the actual power grid into a graph model G = (V, E), where V is the set of nodes and E is the set of edges, resulting in a power grid topology graph.
[0121] In some embodiments, the adding node attributes to the power grid topology diagram based on the real-time measurement data of each link of the power grid and the historical operation data of each link of the power grid to obtain the graph data model of the power grid includes:
[0122] Adding node measurement attributes to corresponding nodes in the power grid topology diagram based on real-time measurement data of each link of the power grid;
[0123] Based on the historical operation data of each link of the power grid, node historical operation attributes are added to the corresponding nodes in the power grid topology diagram.
[0124] In this example implementation, because the real-time measurement data and historical operation data of the power grid are both generated based on the physical model of the power grid, the real-time measurement data and historical operation data of each link in the power grid can be added to the power grid topology diagram constructed based on the physical model of the power grid. Specifically, the real-time measurement data and historical operation data of each link in the power grid can be added to the power grid topology diagram as different node attribute data. Each node attribute can be configured with multiple data attributes. The node measurement attributes and node historical operation attributes each include a time attribute. This allows data to be categorized and stored based on the time attribute.
[0125] In some embodiments, before partitioning the nodes in the graph data model based on the topology and node similarity of the nodes in the graph data model, the method further includes:
[0126] The node information and edge information in the graph data model are converted into a specified graph data format based on triples.
[0127] In this example embodiment, the specified graph data format can be a data format that facilitates graph data storage, such as the RDF graph data format. The information corresponding to nodes V and edges E in a power grid topology graph can be converted into the RDF graph data format. Specifically, the power grid data is described using triples (S, P, O). Each triple can correspond to a column in table data, with S, P, and O representing subject, predicate, and object, respectively. Node V can be represented as subject and object, and edge E can be represented as predicate. A tree structure can then be used to encode the relationships between the triples' ontology concepts for easier storage.
[0128] In some implementations, partitioning each node in the graph data model based on the topology and node similarity of each node in the graph data model in S130 includes:
[0129] Filtering main category nodes from the graph data model based on the number of connecting edges of each node in the graph data model;
[0130] For nodes other than the main category nodes, based on the interaction between each other node and each main category node, each other node is assigned to the node category set corresponding to the matching main category node, thereby obtaining a preliminary partitioning result for each node in the graph data model;
[0131] The preliminary partitioning result is optimized based on the distance similarity and attribute similarity of each node in the graph data model to obtain the partitioning result of each node in the graph data model.
[0132] In this example embodiment, in order to achieve load balancing of the storage process, the graph data model to be stored is partitioned to facilitate partitioned storage of data. The topology of each node includes the number of connected edges and the interaction of each node. Considering that nodes with a large number of connected edges may have a high query frequency, nodes with a number of connected edges exceeding a certain threshold can be treated as a node category separately, thereby obtaining multiple main category nodes, that is, multiple node categories. For other nodes in the graph data model except the main category nodes, they can be classified into the node category set that interacts most frequently with the main category nodes (such as the highest interaction frequency), that is, each other node is classified into the node category set corresponding to the main category node with which it interacts most frequently. When the interaction frequency with multiple main category nodes is comparable, random matching and partitioning can be performed, or matching and partitioning can be performed based on the node data in each node category set. For example, the current node is classified into a node category set with a smaller number of nodes to balance the capacity of each node category set. When each node in the graph data model is divided into the corresponding category set, the preliminary partitioning of the node is completed. Exemplarily, the preliminary partitioning process can first construct a type set, set a threshold for the number of edges connecting each subject in the RDF graph, extract nodes with a number of edges exceeding the threshold as a category, and assign the objects to the most matching category set based on the frequency of interaction between the category subject and its connected objects when the disconnector is open or closed, completing the initial partitioning of the graph data. Node similarity includes distance similarity and attribute similarity. Distance similarity is determined based on the node connection path, while attribute similarity is determined based on the number and content of the node's attributes. After completing the initial partitioning, the initial partitioning results are adjusted based on the distance similarity and attribute similarity of the nodes to group nodes with high similarity for storage, thereby improving storage and query efficiency in the database.
[0133] In an example implementation, optimizing the preliminary partitioning result based on the distance similarity and attribute similarity of each node in the graph data model to obtain the partitioning result of each node in the graph data model includes:
[0134] For a node pair consisting of any two nodes in different initial partitions in the preliminary partitioning result, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node;
[0135] Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs;
[0136] Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained;
[0137] The preliminary partitioning results are merged and / or split based on the similarity of each node pair to obtain a partitioning result for each node in the graph data model.
[0138] In this example embodiment, the least common superclass is the longest connection path with the same node category and node order, obtained by performing a preceding node search on both nodes in a node pair. The connection path does not include the starting node. In other words, the least common superclass can be determined between nodes of the same category or between nodes of different categories. Figure 2 As shown in the figure, let the black nodes be category 1, the white nodes be category 2, and the diagonally filled nodes be category 3. Then node A is category 1 and node B is category 2. For node pairs (A, B) of different node categories, start searching forward from each node A and B of the node pair (A, B) and find the longest common path between the two nodes as the minimum common superclass of the node pair, as shown in the figure. Figure 2 The path in the dashed box is the minimum common superclass of the node pair (A, B) found. The same path refers to the connection path with the same node order and node category. The depth of the minimum common superclass refers to the length of the path of the minimum common superclass, for example, Figure 2 The depth of the least common superclass of the node pair (A, B) is 2. For any inter-class node pairs in two preliminary partitions in the preliminary partitioning results, distance similarity can be calculated using the depth of the corresponding least common superclass and the path length from each node to the root node. Distance similarity is used to characterize path similarity within the two preliminary partitions. Attribute similarity is determined by the number or content of shared attributes between the node pairs. The distance similarity and attribute similarity of the node pairs are weighted and fused to obtain the similarity of the node pairs. Two preliminary partitions with high similarity can be merged. When the similarity values of node pairs within a preliminary partition are dispersed, the nodes in the current preliminary partition can be split into categories. The similarity values can be divided into segments, and similarity values in the same segment can be split into a new category to obtain a new partitioning result. The preliminary partitioning results can be adjusted based on similarity (such as splitting and / or merging) to achieve more detailed similarity-based partitioning and improve data storage and query efficiency.
[0139] In another example implementation, optimizing the preliminary partitioning result based on the distance similarity and attribute similarity of each node in the graph data model to obtain the partitioning result of each node in the graph data model includes:
[0140] For each node in the graph data model, determine the intra-region similarity of the node based on the similarity between the node and its adjacent nodes in the partition to which it belongs; determine the intra-graph similarity of the node based on the similarity between the node and its adjacent nodes in the graph data model;
[0141] Determine the metric value of the node belonging to the current partition based on the ratio of the intra-region similarity of the node to the intra-graph similarity; for each partition, determine the average metric value of the current partition based on the average metric value of each node in the partition belonging to the current partition;
[0142] Determining an optimization strategy for the preliminary partitioning result with the goal of maximizing the average metric value of each partition;
[0143] The preliminary partitioning result is optimized based on the optimization strategy to obtain the partitioning result of each node in the graph data model.
[0144] In this example embodiment, the similarity between the node and its adjacent nodes is determined based on the distance similarity and attribute similarity between the node and its adjacent nodes. For each node, the similarity between the node and each adjacent node in the partition to which it belongs can be calculated separately, and the sum of the similarities between the node and each adjacent node in the partition to which it belongs is used as the intra-region similarity of the node. At the same time, the similarity between the node and each adjacent node of the node in the graph data model is calculated separately, and the similarity between the node and all adjacent nodes is summed to obtain the intra-graph similarity of the node. The ratio of the intra-region similarity of the node to the intra-graph similarity is then used as the measure of the node belonging to the current partition; the average measure of the current partition is determined based on the average measure of the nodes in the partition belonging to the current partition; and the optimization strategy of the preliminary partitioning result is determined with the goal of maximizing the average measure of each partition. For example, the objective function of the optimization process is as follows:
[0145]
[0146] Among them, O(l) represents the optimization strategy, R(v i ,l i ) represents node v i Belongs to partition l i The measurement value, ε is the preset measurement threshold, V j represents the set of nodes in the jth partition, and |·| represents the modulo operation. The initial partitioning result can be used as the initial condition to find an optimization strategy by maximizing the objective function to achieve optimal partitioning.
[0147] Exemplarily, the process of calculating the similarity between each node and its adjacent nodes is similar to the process of calculating the similarity of the node pairs consisting of any two nodes in different initial partitions mentioned above, specifically including: for each node and its adjacent node in the graph data model, based on the depth of the minimum common superclass between the node pair and the path length from each node in the node pair to the root node, determining the distance similarity of the node pair; based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs, determining the attribute similarity of the node pair; based on weighted fusion of the distance similarity and attribute similarity of the node pair, obtaining the similarity of the node pair.
[0148] For example, distance similarity measures the similarity between nodes using distance. Distance similarity is positively correlated with the depth of the least common superclass between the node pairs and negatively correlated with their respective depths. Attribute similarity measures similarity with the help of the number of common attributes. The more common attributes, the higher the attribute similarity. Attribute similarity is proportional to the number of common attributes of the node pair and inversely proportional to the difference in the number of attributes. The present invention combines distance similarity and attribute similarity to calculate the similarity of node pairs. Specifically, for node pairs consisting of any two nodes in different initial partitions in the preliminary partitioning results and node pairs consisting of each node and its adjacent nodes, the similarity calculation process of the corresponding node pairs is the same, as shown below:
[0149] Similarity(x,y)=α*Similarity D (x,y)+(1-α)*Similarity P (x,y);
[0150]
[0151] Among them, Similarity(x,y) is the similarity of the node pair (x,y), α is the weight coefficient, Similarity D (x,y) is the distance similarity of the node pair (x,y), Similarity P(x,y) represents the attribute similarity of the node pair (x,y); S(x,y) represents the least common superclass of the node pair (x,y); and D(S(x,y)) represents the depth of the least common superclass of the node pair (x,y); d(x) represents the path length between node x and the root node, and D(y) represents the path length between node y and the root node; P(x) and P(y) represent the number of attributes in the node category set to which nodes x and y belong, respectively; and C(P(x), P(y)) represents the number of common attributes in the node category set to which nodes x and y belong. The node pair (x,y) can be any two nodes in different initial partitions in the preliminary partitioning results, or it can be a node pair consisting of each node and its adjacent nodes.
[0152] In an example implementation, the partitioning and storing of the data in the graph data model based on the partitioning result in S140 includes:
[0153] Divide the storage space of the target database into storage areas based on the partitioning results;
[0154] The data in different partitions in the partition result are serialized and stored in corresponding storage areas.
[0155] In this example implementation, after node partitioning, the partitioning results are used to divide storage space, and the graph data for each partition is serialized and stored in the corresponding storage area. This allows for more efficient storage and querying of graph data. The graph data is stored according to the optimal partitioning scheme, for example, serialized and stored in an HBase database, completing the task of distributed storage of graph data and providing data support for subsequent call queries.
[0156] While structured data excels in storage and querying, it fails to fully consider the inherent connections and network structure between data when handling highly complex and dynamically changing data relationships, leading to limitations in expressing complex relationships and internal features. Graph data models can intuitively represent relationships between entities through nodes and edges. They can not only efficiently handle complex network analysis and relationship queries, but also flexibly adapt to changes in data structure, effectively addressing the challenges of high-dimensional data representation in power grid operations. Currently, in actual power grid operations, graph data is dispersed across different business systems, presenting issues such as heteronymous storage attributes, redundancy, and dimensional differences, placing significant pressure on server memory and computing resources. Furthermore, complex relationships between data are difficult to standardize through clear data flow methods, making it difficult to effectively guarantee data quality and data fusion, limiting the overall effectiveness of subsequent data processing.
[0157] To address the above issues, the present invention conducts research on graph data storage methods for common power grid computing and deduction services. This aims to break down data barriers between systems and enhance the overall effectiveness of power grid computing and deduction services by designing a graph data storage method for power grid computing and deduction. The flow, processing, and storage of graph data in common power grid computing and deduction services are standardized, clarified through a clear data flow method, and graph data is efficiently queried and stored, thereby improving the overall effectiveness of power grid computing and deduction services and providing support for actual power grid business scenarios. This effectively breaks down data barriers between systems. By studying graph data partitioning, the present invention fully considers graph data node information during partition storage, ensuring that data with high node similarity is partitioned into the same partition. By introducing distance similarity and attribute similarity during graph data storage, this avoids the problem of unbalanced load during storage and query, which results in increased runtime, caused by partitioning data with high node similarity into different partitions. By distributing graph data according to the optimal partitioning scheme after partitioning, the storage and query efficiency in the database is improved, supporting the efficient call processing of subsequent graph data.
[0158] Example 2
[0159] Based on the same inventive concept, the present invention also provides a data storage device for common services for power grid calculation and deduction, including:
[0160] Data acquisition module, used to obtain grid resource data from different grid business service systems, real-time measurement data of various links in the grid, and historical operation data of various links in the grid;
[0161] a graph model construction module for constructing a power grid topology diagram corresponding to the power grid physical model based on the power grid resource data; adding node attributes and edge attributes to the power grid topology diagram based on the real-time measurement data of each link of the power grid and the historical operation data of each link of the power grid to obtain a graph data model of the power grid;
[0162] A partition storage module is configured to partition each node in the graph data model based on the topology and node similarity of each node in the graph data model; partition the data in the graph data model based on the partitioning results, so as to provide common power grid calculation and deduction services by calling the partitioned stored data;
[0163] The node similarity is determined based on the connection path and node attributes of each node in the graph data model.
[0164] In a possible implementation, the power grid resource data includes the status of each physical device in the power grid and the connection status between the physical devices in the power grid; the graph model construction module includes a topology graph construction submodule, and the topology graph construction submodule includes:
[0165] A node construction subunit is used to take the substation bus in the physical model of the power grid as a root node and each power device in the physical model of the power grid as a child node; and to construct each node in the power grid topology diagram based on the status of each physical device of the power grid;
[0166] an edge construction subunit, configured to use the power lines and device switches connecting the power devices in the physical model of the power grid as edges between the subnodes, and to construct edges between the nodes in the power grid topology diagram based on the connection between the physical devices of the power grid; determine the direction of the edges between the nodes in the power grid topology diagram based on the current flow between the physical devices of the power grid, and obtain directed edges between the nodes in the power grid topology diagram;
[0167] The graph construction subunit is used to obtain a power grid topology diagram corresponding to the power grid physical model based on the nodes and the directed edges between the nodes in the power grid topology diagram.
[0168] In a possible implementation, the graph model construction module includes an attribute adding submodule, and the attribute adding submodule is used to:
[0169] Adding node measurement attributes to corresponding nodes in the power grid topology diagram based on real-time measurement data of each link of the power grid;
[0170] Adding node historical operation attributes to corresponding nodes in the power grid topology diagram based on historical operation data of each link of the power grid;
[0171] The node measurement attributes and the node historical operation attributes respectively include time attributes.
[0172] In a possible implementation, the topology of each node includes the number of connected edges and interaction conditions of each node; the node similarity includes distance similarity and attribute similarity; the partition storage module includes a node partition submodule, and the node partition submodule includes:
[0173] a node category screening subunit, configured to screen out main category nodes from the graph data model based on the number of connected edges of each node in the graph data model;
[0174] a preliminary partitioning subunit, configured to assign, for each node other than the main category node, to a node category set corresponding to a matching main category node based on the interaction between each other node and each main category node, thereby obtaining a preliminary partitioning result for each node in the graph data model;
[0175] The optimization partitioning subunit is used to optimize the preliminary partitioning result based on the distance similarity and attribute similarity of each node in the graph data model to obtain the partitioning result of each node in the graph data model.
[0176] In a possible implementation manner, the optimization partition subunit is specifically configured to:
[0177] For a node pair consisting of any two nodes in different initial partitions in the preliminary partitioning result, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node;
[0178] Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs;
[0179] Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained;
[0180] Merging and / or splitting the preliminary partitioning results based on the similarity of each node pair to obtain a partitioning result for each node in the graph data model;
[0181] The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
[0182] In a possible implementation, the optimization partition subunit is specifically configured to:
[0183] For each node in the graph data model, determine the intra-region similarity of the node based on the similarity between the node and its adjacent nodes in the partition to which it belongs; determine the intra-graph similarity of the node based on the similarity between the node and its adjacent nodes in the graph data model;
[0184] Determine the metric value of the node belonging to the current partition based on the ratio of the intra-region similarity of the node to the intra-graph similarity; for each partition, determine the average metric value of the current partition based on the average metric value of each node in the partition belonging to the current partition;
[0185] Determining an optimization strategy for the preliminary partitioning result with the goal of maximizing the average metric value of each partition;
[0186] Optimizing the preliminary partitioning result based on the optimization strategy to obtain a partitioning result for each node in the graph data model;
[0187] The similarity between the node and its adjacent nodes is determined based on the distance similarity and attribute similarity between the node and its adjacent nodes.
[0188] In a possible implementation manner, the optimization partition subunit is further configured to:
[0189] For each node pair consisting of a node and its adjacent node in the graph data model, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node;
[0190] Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs;
[0191] Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained;
[0192] The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
[0193] In a possible implementation, the similarity of the node pairs is as follows:
[0194] Similarity(x,y)=α*Similarity D (x,y)+(1-α)*Similarity P (x,y);
[0195]
[0196] Among them, Similarity(x,y) is the similarity of the node pair (x,y), α is the weight coefficient, Similarity D (x,y) is the distance similarity of the node pair (x,y), Similarity P (x,y) is the attribute similarity of the node pair (x,y); S(x,y) represents the least common superclass of the node pair (x,y), and D(S(x,y)) represents the depth of the least common superclass of the node pair (x,y); D(x) represents the path length between node x and the root node, and D(y) represents the path length between node y and the root node; P(x) and P(y) represent the number of attributes of the node category set to which node x and node y belong, respectively; C(P(x), P(y)) represents the number of common attributes in the node category set to which node x and node y belong.
[0197] In a possible implementation, the partition storage module includes:
[0198] The format conversion submodule is used to convert the node information and edge information in the graph data model into a specified graph data format based on triples.
[0199] In a possible implementation, the partition storage module includes a storage submodule, and the storage submodule is configured to:
[0200] Divide the storage space of the target database into storage areas based on the partitioning results;
[0201] The data in different partitions in the partition result are serialized and stored in corresponding storage areas.
[0202] In a possible implementation, the power grid computing and deduction common service includes a power grid simulation and analysis service and / or a power grid deduction and prediction service.
[0203] Example 3
[0204] Based on the same inventive concept, the present invention also provides a common service platform for power grid calculation and deduction, including: a data storage device as described in any one of Example 2.
[0205] In this exemplary embodiment, the data storage device of the present invention can be used as a power grid information database, such as Figure 3 As shown, the power grid information database is placed in the data layer to build a common service platform for power grid calculation and deduction. The power grid calculation and deduction common service platform can include a three-layer structure of data layer, calculation and deduction layer and application layer. It is based on the real-time measurement data of the power grid from the enterprise-level measurement center, and is integrated with the electrical topology data from the power grid resource business middle platform and the historical operation of the power grid from the data middle platform (including graph data model construction and node partitioning). After that, it is written into the local power grid information database (that is, partition storage) and uploaded to the memory data cache of the calculation and deduction layer as needed. At the same time, the meteorological data of the meteorological data service center is uploaded to the memory data cache as needed. The technical middle platform is used to store various intelligent algorithms and models for simulation analysis and deduction calculations. The technical middle platform uploads the intelligent algorithm model to the calculation and deduction algorithm library of the calculation and deduction platform layer as needed to provide support for upper-layer services. The in-memory data cache and computational deduction algorithm library are used for simulation calculations and predictive analysis to process graph data information. The obtained grid operation status results are written to the grid information database for subsequent grid simulation and deduction services. The final data analysis results are stored in the simulation and deduction result library on demand. The service supports calls from the upper application layer and provides support for specific business scenarios at the application layer. Business scenarios at the application layer can include regional grid status estimation, operational weakness analysis, power supply path search, and random fault handling plan generation.
[0206] The common service platform framework for power grid calculation and deduction regulates the complex relationships between data through clear data flow and processing procedures. It can effectively realize the data association between various power grid data business systems, extract data as needed into the platform for calculation and analysis, thereby avoiding the problem of data islands and breaking down the data barriers between systems.
[0207] Example 4
[0208] like Figure 4 As shown, the present invention also provides an electronic device, which may be a computer, a single-chip microcomputer, a smart mobile device, or the like. The electronic device in this embodiment may include a processor, a memory, a transceiver component, and the like. The memory, processor, and transceiver component are connected via a bus; the memory may be used to store an execution program, which may include instructions; and the processor may be used to execute the instructions stored in the memory. The memory may also be used to store data, which may be accessed and / or modified during the execution of the instructions.
[0209] The processor may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the storage medium to implement the corresponding method flow or corresponding function, so as to realize the steps of a data storage method for common services for power grid computing and deduction in the above-mentioned embodiment.
[0210] Example 5
[0211] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space. These instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The processor loads and executes one or more instructions stored in the storage medium, which can implement the steps of a data storage method for common services for power grid computing and deduction in the above embodiment.
[0212] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0213] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0214] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0215] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0216] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit its scope of protection. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art may still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the scope of protection of the pending claims.
Claims
1. A data storage method for common services of power grid computing and deduction, characterized in that: include: Obtain grid resource data from different grid business service systems, real-time measurement data of each link of the grid, and historical operation data of each link of the grid; Constructing a power grid topology diagram corresponding to the power grid physical model based on the power grid resource data; Adding node attributes to the power grid topology diagram based on real-time measurement data of each link of the power grid and historical operation data of each link of the power grid to obtain a graph data model of the power grid; Partitioning each node in the graph data model based on the topology and node similarity of each node in the graph data model; Partitioning and storing the data in the graph data model based on the partitioning result, so as to provide a common service for power grid calculation and deduction by calling the partitioned stored data; The node similarity is determined based on the connection path and node attributes of each node in the graph data model.
2. The method according to claim 1, characterized in that The grid resource data includes the status of each grid physical device and the connection status between each grid physical device; the grid topology diagram corresponding to the grid physical model is constructed based on the grid resource data, including: The substation bus in the physical model of the power grid is used as a root node, and each power device in the physical model of the power grid is used as a child node; each node in the power grid topology diagram is constructed based on the status of each physical device of the power grid; Using the power lines and device switches connecting the power devices in the physical model of the power grid as edges between the child nodes, and constructing edges between the nodes in the power grid topology diagram based on the connection between the physical devices of the power grid; Based on the current flow direction between the physical devices of the power grid, the direction of the edge between the nodes in the power grid topology diagram is determined to obtain the directed edge between the nodes in the power grid topology diagram; Based on the nodes and the directed edges between the nodes in the power grid topology diagram, a power grid topology diagram corresponding to the power grid physical model is obtained.
3. The method according to claim 2, characterized in that The method of adding node attributes to the power grid topology diagram based on the real-time measurement data of each link of the power grid and the historical operation data of each link of the power grid to obtain a graph data model of the power grid includes: Adding node measurement attributes to corresponding nodes in the power grid topology diagram based on real-time measurement data of each link of the power grid; Adding node historical operation attributes to corresponding nodes in the power grid topology diagram based on historical operation data of each link of the power grid; The node measurement attributes and the node historical operation attributes respectively include time attributes.
4. The method according to claim 2, characterized in that The topology of each node includes the number of connected edges and the interaction between each node; the node similarity includes distance similarity and attribute similarity; Partitioning each node in the graph data model based on the topology and node similarity of each node in the graph data model includes: Filtering main category nodes from the graph data model based on the number of connecting edges of each node in the graph data model; For nodes other than the main category nodes, based on the interaction between each other node and each main category node, each other node is assigned to a node category set corresponding to the matching main category node, thereby obtaining a preliminary partitioning result for each node in the graph data model; The preliminary partitioning result is optimized based on the distance similarity and attribute similarity of each node in the graph data model to obtain the partitioning result of each node in the graph data model.
5. The method according to claim 4, characterized in that The preliminary partitioning result is optimized based on the distance similarity and attribute similarity of each node in the graph data model to obtain a partitioning result for each node in the graph data model, including: For a node pair consisting of any two nodes in different initial partitions in the preliminary partitioning result, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node; Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs; Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained; Merging and / or splitting the preliminary partitioning results based on the similarity of each node pair to obtain a partitioning result for each node in the graph data model; The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
6. The method according to claim 4, characterized in that The preliminary partitioning result is optimized based on the distance similarity and attribute similarity of each node in the graph data model to obtain a partitioning result for each node in the graph data model, including: For each node in the graph data model, determine the intra-region similarity of the node based on the similarity between the node and its adjacent nodes in the partition to which it belongs; determine the intra-graph similarity of the node based on the similarity between the node and its adjacent nodes in the graph data model; Determine the metric value of the node belonging to the current partition based on the ratio of the intra-region similarity of the node to the intra-graph similarity; for each partition, determine the average metric value of the current partition based on the average metric value of each node in the partition belonging to the current partition; Determining an optimization strategy for the preliminary partitioning result with the goal of maximizing the average metric value of each partition; Optimizing the preliminary partitioning result based on the optimization strategy to obtain a partitioning result for each node in the graph data model; The similarity between the node and its adjacent nodes is determined based on the distance similarity and attribute similarity between the node and its adjacent nodes.
7. The method according to claim 6, characterized in that Before determining the intra-region similarity of the node based on the similarity between the node and the adjacent nodes in the partition to which it belongs, the method further includes: For each node pair consisting of a node and its adjacent node in the graph data model, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node; Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs; Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained; The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
8. The method according to claim 5 or 7, characterized in that The similarity of the node pairs is as follows: Similarity(x,y)=α*Similarity D (x,y)+(1-α)*Similarity P (x,y); Among them, Similarity(x,y) is the similarity of the node pair (x,y), α is the weight coefficient, Similarity D (x,y) is the distance similarity of the node pair (x,y), Similarity P (x,y) is the attribute similarity of the node pair (x,y); S(x,y) represents the least common superclass of the node pair (x,y), and D(S(x,y)) represents the depth of the least common superclass of the node pair (x,y); D(x) represents the path length between node x and the root node, and D(y) represents the path length between node y and the root node; P(x) and P(y) represent the number of attributes of the node category set to which node x and node y belong, respectively; C(P(x), P(y)) represents the number of common attributes in the node category set to which node x and node y belong.
9. The method according to claim 3, characterized in that Before partitioning each node in the graph data model based on the topology and node similarity of each node in the graph data model, the method further includes: The node information and edge information in the graph data model are converted into a specified graph data format based on triples.
10. The method according to claim 1, characterized in that Partitioning and storing the data in the graph data model based on the partitioning result includes: Divide the storage space of the target database into storage areas based on the partitioning results; The data in different partitions in the partition result are serialized and stored in corresponding storage areas.
11. The method according to claim 1, wherein The common power grid calculation and deduction services include power grid simulation and analysis services and / or power grid deduction and prediction services.
12. A data storage device for common services of power grid calculation and deduction, characterized in that: include: Data acquisition module, used to obtain grid resource data from different grid business service systems, real-time measurement data of various links in the grid, and historical operation data of various links in the grid; A graph model construction module, configured to construct a grid topology graph corresponding to a grid physical model based on the grid resource data; Adding node attributes and edge attributes to the power grid topology diagram based on the real-time measurement data of each link of the power grid and the historical operation data of each link of the power grid to obtain a graph data model of the power grid; A partition storage module, configured to partition each node in the graph data model based on the topology and node similarity of each node in the graph data model; Partitioning and storing the data in the graph data model based on the partitioning result, so as to provide a common service for power grid calculation and deduction by calling the partitioned stored data; The node similarity is determined based on the connection path and node attributes of each node in the graph data model.
13. The device according to claim 12, characterized in that The grid resource data includes the status of each grid physical device and the connection status between each grid physical device; the graph model construction module includes a topology graph construction submodule, and the topology graph construction submodule includes: A node construction subunit is used to take the substation bus in the physical model of the power grid as the root node and each power device in the physical model of the power grid as a child node; and to construct each node in the power grid topology diagram based on the status of each physical device of the power grid; an edge construction subunit, configured to use the power lines and device switches connecting the power devices in the physical model of the power grid as edges between the child nodes, and to construct edges between the nodes in the power grid topology diagram based on the connection between the physical devices of the power grid; determine the direction of the edges between the nodes in the power grid topology diagram based on the current flow between the physical devices of the power grid, and obtain directed edges between the nodes in the power grid topology diagram; The graph construction subunit is used to obtain a power grid topology diagram corresponding to the power grid physical model based on the nodes and the directed edges between the nodes in the power grid topology diagram.
14. The device according to claim 13, characterized in that The graph model construction module includes an attribute adding submodule, which is used to: Adding node measurement attributes to corresponding nodes in the power grid topology diagram based on real-time measurement data of each link of the power grid; Adding node historical operation attributes to corresponding nodes in the power grid topology diagram based on historical operation data of each link of the power grid; The node measurement attributes and the node historical operation attributes respectively include time attributes.
15. The device according to claim 13, characterized in that The topology of each node includes the number of connected edges and the interaction between each node; the node similarity includes distance similarity and attribute similarity; The partition storage module includes a node partition submodule, and the node partition submodule includes: a node category screening subunit, configured to screen out main category nodes from the graph data model based on the number of connected edges of each node in the graph data model; a preliminary partitioning subunit, configured to assign, for each node other than the main category node, to a node category set corresponding to a matching main category node based on the interaction between each other node and each main category node, thereby obtaining a preliminary partitioning result for each node in the graph data model; The optimization partitioning subunit is used to optimize the preliminary partitioning result based on the distance similarity and attribute similarity of each node in the graph data model to obtain the partitioning result of each node in the graph data model.
16. The device according to claim 15, characterized in that The optimized partition subunit is specifically used for: For a node pair consisting of any two nodes in different initial partitions in the preliminary partitioning result, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node; Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs; Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained; Merging and / or splitting the preliminary partitioning results based on the similarity of each node pair to obtain a partitioning result for each node in the graph data model; The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
17. The device according to claim 15, characterized in that The optimized partition subunit is specifically used for: For each node in the graph data model, determine the intra-region similarity of the node based on the similarity between the node and its adjacent nodes in the partition to which it belongs; determine the intra-graph similarity of the node based on the similarity between the node and its adjacent nodes in the graph data model; Determining a metric value of the node belonging to the current partition based on a ratio of the node's intra-region similarity to the node's intra-graph similarity; For each partition, the average metric value of the current partition is determined based on the average metric value of each node in the partition belonging to the current partition; Determining an optimization strategy for the preliminary partitioning result with the goal of maximizing the average metric value of each partition; Optimizing the preliminary partitioning result based on the optimization strategy to obtain a partitioning result for each node in the graph data model; The similarity between the node and its adjacent nodes is determined based on the distance similarity and attribute similarity between the node and its adjacent nodes.
18. The device according to claim 17, characterized in that The optimized partition subunit is further configured to: For each node pair consisting of a node and its adjacent node in the graph data model, determining the distance similarity of the node pair based on the depth of the least common superclass between the node pair and the path length from each node in the node pair to the root node; Determining attribute similarity of the node pair based on the number of common attributes of the node category set to which each node in the node pair belongs and the number of attributes of the node category set to which each node belongs; Based on the weighted fusion of the distance similarity and attribute similarity of the node pair, the similarity of the node pair is obtained; The minimum common superclass is the longest connection path with the same node category and node order obtained by performing a preceding node search on the two nodes in the node pair.
19. The device according to claim 16 or 18, characterized in that The similarity of the node pairs is as follows: Similarity(x,y)=α*Similarity D (x,y)+(1-α)*Similarity P (x,y); Among them, Similarity(x,y) is the similarity of the node pair (x,y), α is the weight coefficient, Similarity D (x,y) is the distance similarity of the node pair (x,y), Similarity P (x,y) is the attribute similarity of the node pair (x,y); S(x,y) represents the least common superclass of the node pair (x,y), and D(S(x,y)) represents the depth of the least common superclass of the node pair (x,y); D(x) represents the path length between node x and the root node, and D(y) represents the path length between node y and the root node; P(x) and P(y) represent the number of attributes of the node category set to which node x and node y belong, respectively; C(P(x), P(y)) represents the number of common attributes in the node category set to which node x and node y belong.
20. The device according to claim 14, characterized in that The partition storage module includes: The format conversion submodule is used to convert the node information and edge information in the graph data model into a specified graph data format based on triples.
21. The device according to claim 12, characterized in that The partition storage module includes a storage submodule, and the storage submodule is used to: Divide the storage space of the target database into storage areas based on the partitioning results; The data in different partitions in the partition result are serialized and stored in corresponding storage areas.
22. The device according to claim 12, characterized in that The common power grid calculation and deduction services include power grid simulation and analysis services and / or power grid deduction and prediction services.
23. A common service platform for power grid calculation and deduction, characterized by: include: The data storage device according to any one of claims 12 to 22.
24. An electronic device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the method according to any one of claims 1 to 11 is implemented.
25. A readable storage medium, characterized in that An execution program is stored thereon, and when the execution program is executed, the method according to any one of claims 1 to 11 is implemented.
