CN107679107B - Graph database-based power grid equipment reachability query method and system - Google Patents

Graph database-based power grid equipment reachability query method and system Download PDF

Info

Publication number
CN107679107B
CN107679107B CN201710823452.3A CN201710823452A CN107679107B CN 107679107 B CN107679107 B CN 107679107B CN 201710823452 A CN201710823452 A CN 201710823452A CN 107679107 B CN107679107 B CN 107679107B
Authority
CN
China
Prior art keywords
connected component
component index
index tree
power grid
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710823452.3A
Other languages
Chinese (zh)
Other versions
CN107679107A (en
Inventor
刘思言
柴博
周爱华
高昆仑
郑浩
戴江鹏
潘静
裘洪彬
张波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
State Grid Anhui Electric Power Co Ltd
Global Energy Interconnection Research Institute
Original Assignee
State Grid Corp of China SGCC
State Grid Anhui Electric Power Co Ltd
Global Energy Interconnection Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Anhui Electric Power Co Ltd, Global Energy Interconnection Research Institute filed Critical State Grid Corp of China SGCC
Priority to CN201710823452.3A priority Critical patent/CN107679107B/en
Publication of CN107679107A publication Critical patent/CN107679107A/en
Application granted granted Critical
Publication of CN107679107B publication Critical patent/CN107679107B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Supply And Distribution Of Alternating Current (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a graph database-based power grid equipment reachability query method and a graph database-based power grid equipment reachability query system, wherein the power grid equipment reachability query method comprises the following steps: establishing a graph model of physical connection of the power grid equipment according to the topological connection relation among the power grid equipment to obtain an initial connected component index tree; searching a nearest common ancestor node between two power grid devices according to the initial connected component index tree, and judging whether the nearest common ancestor node is a non-root node or not; and when the nearest common ancestor node is a non-root node, determining that the two power grid devices can be reached. The power grid equipment reachability query method provided by the invention realizes the reachability query function of the power grid equipment and improves the reachability query efficiency of the power grid equipment.

Description

Graph database-based power grid equipment reachability query method and system
Technical Field
The invention relates to the field of power topology data query, in particular to a graph database-based power grid equipment reachability query method and system.
Background
With the development of smart grid technology, a large number of primary grid devices are put into use, and the explosive increase of the device quantity brings a serious challenge to the management and query of the grid devices and the topological connection thereof. Meanwhile, a rapid analysis method for equipment accessibility is urgently needed for applications such as reconstruction of a power distribution network, detection and adjustment of an operation mode, auxiliary decision-making of fault treatment and the like. However, the conventional relational database is inefficient in realizing functions such as large-scale graph data storage and topology analysis, and no reachability analysis algorithm designed for device topology is available at present.
Disclosure of Invention
The invention aims to solve the technical problems that the existing relational database is low in efficiency in realizing the reachability analysis of large-scale graph data and lacks a reachability analysis algorithm designed aiming at equipment topology.
According to a first aspect, an embodiment of the present invention provides a graph database-based power grid device reachability query method, including: establishing a graph model of physical connection of the power grid equipment according to the topological connection relation among the power grid equipment to obtain an initial connected component index tree; searching a nearest common ancestor node between two power grid devices according to the initial connected component index tree, and judging whether the nearest common ancestor node is a non-root node or not; and when the nearest common ancestor node is a non-root node, determining that the two power grid devices can be reached.
Optionally, when the nearest common ancestor node is not a non-root node, it is determined that the two grid devices are unreachable.
Optionally, after a graph model of physical connection of the grid devices is established, and an initial connected component index tree is obtained, and before a closest common ancestor node between the two grid devices is found according to the initial connected component index tree, the grid device reachability query method further includes: when the graph model changes the topology, updating the initial connected component index tree to generate a connected component index tree after the topology is changed; and replacing the initial connected component index tree by the connected component index tree after the topology is changed.
Optionally, updating the initial connected component index tree includes: searching a currently running version along a directed edge representing topology change operation in the version diagram of the initial connected component index tree to obtain the connected component index tree after the topology is changed; when the version index node corresponding to the currently running version exists, the connected component index tree after the topology is changed is a connected component index tree taking the version index node as a root node; and when the version index node does not exist, establishing a newly added version graph, wherein the connected component index tree after the topology is changed is the corrected connected component index tree of the newly added node.
Optionally, updating the initial connected component index tree, further includes: correcting the connected component index tree of the newly added node, including: and searching a corresponding subgraph of the nearest common ancestor node of which the edge to be deleted is connected with the two power grid devices in the connected component index tree of the newly added node, and performing depth-first search on a connected component index subtree of the corresponding subgraph to obtain the connected component index tree with the changed topology.
According to a second aspect, an embodiment of the present invention provides a grid device reachability query system based on a graph database, including: the power grid equipment graph model building module is used for building a graph model of physical connection of the power grid equipment according to the topological connection relation of the power grid equipment to obtain an initial connected component index tree; the reachability detection module is used for searching a nearest common ancestor node between the two power grid devices according to the initial connected component index tree and judging whether the nearest common ancestor node is a non-root node or not; and when the nearest common ancestor node is a non-root node, determining that the two power grid devices can be reached.
Optionally, when the reachability detection module determines that the nearest common ancestor node is not a non-root node, it is determined that the two grid devices are unreachable.
Optionally, the grid device reachability query system further includes: an initial connected component index tree updating module, configured to update the initial connected component index tree when the graph model changes topology, and generate a connected component index tree after topology is changed; and replacing the initial connected component index tree by the connected component index tree after the topology is changed.
Optionally, the initial connected component index tree updating module includes: a topology-changed connected component index tree obtaining sub-module, configured to search a currently running version in a version diagram of the initial connected component index tree along a directed edge representing a topology change operation, to obtain a topology-changed connected component index tree; when the version index node corresponding to the currently running version exists, the connected component index tree after the topology is changed is a connected component index tree taking the version index node as a root node; and when the version index node does not exist, establishing a newly added version graph, wherein the connected component index tree after the topology is changed is the corrected connected component index tree of the newly added node.
Optionally, the initial connected component index tree updating module further includes: the correction submodule is used for correcting the connected component index tree of the newly added node; and searching a corresponding subgraph of the nearest common ancestor node of which the edge to be deleted is connected with the two power grid devices in the connected component index tree of the newly added node, and performing depth-first search on a connected component index subtree of the corresponding subgraph to obtain the connected component index tree with the changed topology.
According to a third aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the power grid device reachability query method of the first aspect or any one of the alternatives of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the power grid device reachability query method of the first aspect or any one of the alternatives of the first aspect.
According to the graph database-based power grid equipment reachability query method and system, the reachability of the two equipment can be judged by searching whether a nearest common ancestor node of the two equipment nodes is a non-root node in the connected component index tree, so that the reachability query function of the power grid equipment is realized, and the efficiency is greatly improved when large-scale graph data and intensive reachability query tasks are faced; and when the operation mode of the power grid system is changed and the graph model changes the topology, the new index information can be generated by updating the initial connected component index tree to provide efficient reachability query, so that the adaptivity and the real-time performance of the reachability query method of the power grid equipment are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a graph database-based power grid device reachability query method according to embodiment 1 of the present invention;
fig. 2 is a schematic diagram of an actual connection of the power grid devices in embodiment 1 of the present invention;
FIG. 3 is a diagram of a connected component index tree according to embodiment 1 of the present invention;
FIG. 4 is another schematic diagram of the actual connection of the devices in embodiment 1 of the present invention;
FIG. 5 is another diagram of a connected component index tree according to embodiment 1 of the present invention;
fig. 6 is another flowchart of a graph database-based grid device reachability query method according to embodiment 1 of the present invention;
FIG. 7 is a flowchart of updating an initial connected component index tree according to embodiment 1 of the present invention;
FIG. 8 is a schematic diagram of an operation mode version diagram in embodiment 1 of the present invention
Fig. 9A is a schematic structural diagram of a grid device reachability query system based on a graph database according to embodiment 2 of the present invention;
fig. 9B is another schematic structural diagram of the grid device reachability query system based on the graph database according to embodiment 2 of the present invention;
fig. 10 is a schematic structural diagram of an initial connected component index tree updating module in embodiment 2 of the present invention;
fig. 11 is a schematic structural diagram of an electronic device in embodiment 3 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1
The embodiment of the invention provides a graph database-based power grid equipment reachability query method, the flow of which is shown in figure 1, and the power grid equipment reachability query method comprises the following steps:
step S1: and establishing a graph model of the physical connection of the power grid equipment according to the topological connection relation among the power grid equipment to obtain an initial connected component index tree.
Step S2: searching a nearest common ancestor node between two power grid devices according to the initial connected component index tree, and judging whether the nearest common ancestor node is a non-root node or not; and when the nearest common ancestor node is a non-root node, the two power grid devices are judged to be reachable.
The power grid equipment reachability query method provided by the embodiment of the invention realizes the reachability query function of the power grid equipment and improves the query efficiency.
In a preferred embodiment, when the nearest common ancestor node is not a non-root node, it is determined that the two grid devices are unreachable.
Specifically, in an embodiment, the graph model in step S1 is divided into a power grid device topology graph model, a connected component index tree model, and a version graph model. The power grid equipment topological graph model is unique, a connected component index tree with the node as a root exists for each node in the version graph model, and leaf nodes of all the connected index trees contain and only contain all equipment nodes in the power grid topological graph model.
Furthermore, the initial connected component index tree can be obtained by performing depth-first search in a power grid topological graph, each non-root node in the initial connected component index tree is a connected component in the device topological graph of the corresponding version graph, and directed edges exist among child nodes of the root node in the initial connected component index tree to represent the relationship among a plurality of connected components.
Specifically, in one embodiment, fig. 2 is an exemplary diagram of the topology model of the power grid device, where nodes with numbers represent actual devices with physical entities and edges represent physical connections between the physical devices. Fig. 3 is an initial connected component index tree of the physical topology of the grid device of fig. 2, in which nodes a and B represent connected components shown by the dotted line range where the corresponding letter is located in the device topology (fig. 2), that is, node a represents a connected component formed by nodes 1, 2, 3, and 4, and node B represents a connected component formed by nodes 5, 6, and 7. In fig. 3, the R node is a connected component node of the whole graph, and V0 is a root node of the connected component index tree. In fig. 2, the nodes other than the root node V0 are connected component nodes. The solid lines in the index tree of connected components represent dependencies, and the child nodes are the subsets of connected components represented by the parent node. The initial connected component index tree can be realized by the existing algorithms such as simple depth-first search or Tarjan algorithm. For example, in FIG. 3, the nearest common ancestor of device node 1 and device node 3 is node A, and node A is a non-root node, then the two devices are reachable from each other. After edges 1-5 are deleted and the connected component index tree is maintained, the device topology is as shown in fig. 4, the connected component index tree is as shown in fig. 5, node V2 is the root node of the connected component index tree at this time, and the nearest common ancestor of device node 1 and device node 7 is node V2, so that the two devices are not reachable with each other.
In a preferred embodiment, as shown in fig. 6, after a graph model of physical connections of the grid devices is established and an initial connected component index tree is obtained, and before a nearest common ancestor node between two grid devices is searched according to the initial connected component index tree, the grid device reachability query method further includes:
step S3: when the graph model changes the topology, updating the initial connected component index tree to generate a connected component index tree after the topology is changed; and replacing the initial connected component index tree by the connected component index tree after the topology is changed.
Specifically, as shown in fig. 7, updating the initial connected component index tree mainly includes the following steps:
step S31: searching a currently running version along a directed edge representing topology change operation in the version diagram of the initial connected component index tree to obtain the connected component index tree after the topology is changed; when a version index node corresponding to a currently running version exists, the connected component index tree after the topology is changed is a connected component index tree taking the version index node as a root node; and when the version index node does not exist, establishing a newly added version graph, wherein the connected component index tree after the topology is changed is the corrected connected component index tree of the newly added node.
Further, the version graph is a directed acyclic graph, which has a unique source node and the source node is an initial version node, the directed edge represents an edge in the topology graph of the device through addition and deletion, and a version corresponding to a directed exit node of the version graph can be converted into a version corresponding to an entry node.
Specifically, in an embodiment, fig. 4 is a topology diagram formed by deleting edges 1-5 from the device topology diagram shown in fig. 2, and fig. 5 is a corresponding connected component index tree. Fig. 8 is version nodes of different versions of the power grid topology), each node in the graph represents one version of the device topology, and each directed edge represents a delete edge operation corresponding to a difference between the two versions. For example, the device network topology shown in fig. 2 corresponds to the V0 node in fig. 8, while the device network topology shown in fig. 4 corresponds to the V2 node in fig. 8.
Further, as shown in fig. 7, updating the initial connected component index tree further includes:
step S32: correcting the connected component index tree of the newly added node, including: and searching a corresponding subgraph of the nearest common ancestor node of the two power grid devices connected with the edge to be deleted in the newly added node connected component index tree, and performing depth-first search on a connected component index subtree of the corresponding subgraph to obtain the connected component index tree after the topology is changed.
Specifically, in one embodiment, as shown in fig. 8, V0 is the parent node of V2, and the connected component index tree corresponding to fig. 3 is the prototype tree of V2 version. If the nearest common ancestor of the node 1 and the node 5 is R, the reconstructed connected component index tree has the edge between the two sub-connected components a and B of R deleted, and the connected component tree of the V2 version is shown in fig. 5.
According to the graph database-based power grid equipment reachability query method, the reachability query function of the power grid equipment is achieved, and the reachability query efficiency is improved; and when the operation mode of the power grid system is changed, the new index information is generated by updating the initial connected component index tree to provide efficient reachability query, so that the adaptivity and the real-time performance of the reachability query method of the power grid equipment are improved.
Example 2
An embodiment of the present invention provides a grid device reachability query system based on a graph database, as shown in fig. 9A, including: the power grid equipment graph model building module 1 is used for building a graph model of physical connection of power grid equipment according to the topological connection relation of the power grid equipment to obtain an initial connected component index tree; the reachability detection module 2 is used for searching a nearest common ancestor node between the two power grid devices according to the initial connected component index tree and judging whether the nearest common ancestor node is a non-root node; and when the nearest common ancestor node is a non-root node, the two power grid devices are judged to be reachable.
The graph database-based power grid equipment reachability query system provided by the embodiment of the invention has the function of power grid equipment reachability query and improves reachability query efficiency.
In a preferred embodiment, when the reachability detection module 2 determines that the nearest common ancestor node is not a non-root node, it determines that the two grid devices are unreachable.
In a preferred embodiment, as shown in fig. 9B, the grid device reachability query system further includes: an initial connected component index tree updating module 3, configured to update the initial connected component index tree when the graph model changes topology, and generate a connected component index tree after topology is changed; and replacing the initial connected component index tree by the connected component index tree after the topology is changed.
Further, as shown in fig. 10, the initial connected component index tree updating module 3 includes: a topology-changed connected component index tree obtaining sub-module 31, configured to search a currently running version in the version map of the initial connected component index tree along a directed edge indicating a topology change operation, so as to obtain a topology-changed connected component index tree; when a version index node corresponding to a currently running version exists, the connected component index tree after the topology is changed is a connected component index tree taking the version index node as a root node; and when the version index node does not exist, establishing a newly added version graph, wherein the connected component index tree after the topology is changed is the corrected connected component index tree of the newly added node.
Further, as shown in fig. 10, the initial connected component index tree updating module 3 further includes: a modification submodule 32, configured to modify the connected component index tree of the newly added node; and searching a corresponding subgraph of the nearest common ancestor node of the edge to be deleted, which is connected with the two power grid devices, in the connected component index tree of the newly added node, and performing depth-first search on a connected component index subtree of the corresponding subgraph to obtain the connected component index tree after the topology is changed.
According to the graph database-based power grid equipment reachability query system, the reachability query function of the power grid equipment is achieved through the power grid equipment graph model building module 1 and the reachability detection module 2, the reachability query efficiency of the system is improved, and efficient reachability query can be provided when the operation mode of the power grid system is changed through the setting of the initial connected component index tree updating module 3, so that the adaptivity and the real-time performance of the power grid equipment reachability query system are improved.
Example 3
An embodiment of the present invention provides a non-transitory computer storage medium, where a computer-executable instruction is stored, and the computer-executable instruction may execute the graph database-based power grid device reachability query method in any embodiment 1 described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a flash Memory (FlashMemory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Example 4
An embodiment of the present invention provides an electronic device for executing a power grid device reachability query method, a schematic structural diagram of which is shown in fig. 11, where the electronic device includes: one or more processors 410 and a memory 420, with one processor 410 being an example in fig. 11.
The electronic device performing the power grid device reachability query method may further include: an input device 430 and an output device 440.
The processor 410, the memory 420, the input device 430, and the output device 440 may be connected by a bus or other means, as exemplified by the bus connection in fig. 11.
Processor 410 may be a Central Processing Unit (CPU). The Processor 410 may 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. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 420 is a non-transitory computer readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the power grid device reachability query method in the embodiment of the present application, and the processor 410 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 420, that is, implementing the power grid device reachability query method in the above method embodiment.
The memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the processing device of the grid equipment reachability inquiry, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 420 may optionally include memory located remotely from processor 410, which may be connected to a grid device reachability query facility over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the processing device of the grid equipment reachability inquiry operation. The output device 440 may include a display device such as a display screen.
One or more modules are stored in the memory 420, which when executed by the one or more processors 410 perform the method shown in fig. 1.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Details of the technique not described in detail in the present embodiment may be specifically referred to the relevant description in the embodiments shown in fig. 1 to 8.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (12)

1. A graph database-based power grid equipment reachability query method is characterized by comprising the following steps:
establishing a graph model of physical connection of the power grid equipment according to the topological connection relation among the power grid equipment to obtain an initial connected component index tree;
searching a nearest common ancestor node between two power grid devices according to the initial connected component index tree, and judging whether the nearest common ancestor node is a non-root node or not;
and when the nearest common ancestor node is a non-root node, determining that the two power grid devices can be reached.
2. The graph database-based grid device reachability query method according to claim 1, wherein when said nearest common ancestor node is not a non-root node, then it is determined that said two grid devices are unreachable.
3. The graph database-based power grid device reachability query method according to claim 1, wherein after the graph model of the physical connection of the power grid devices is established and the initial connected component index tree is obtained, before the nearest common ancestor node between the two power grid devices is searched according to the initial connected component index tree, the power grid device reachability query method further comprises:
when the graph model changes the topology, updating the initial connected component index tree to generate a connected component index tree after the topology is changed;
and replacing the initial connected component index tree by the connected component index tree after the topology is changed.
4. The graph database-based grid device reachability query method according to claim 3, wherein updating the initial connected component index tree comprises:
searching a currently running version along a directed edge representing topology change operation in the version diagram of the initial connected component index tree to obtain the connected component index tree after the topology is changed;
when the version index node corresponding to the currently running version exists, the connected component index tree after the topology is changed is a connected component index tree taking the version index node as a root node;
and when the version index node corresponding to the currently running version does not exist, establishing a newly added version graph, wherein the connected component index tree after the topology is changed is the corrected connected component index tree of the newly added node.
5. The graph database-based grid device reachability query method according to claim 4, wherein updating said initial connected component index tree further comprises:
correcting the connected component index tree of the newly added node, including:
and searching a corresponding subgraph of the nearest common ancestor node of which the edge to be deleted is connected with the two power grid devices in the connected component index tree of the newly added node, and performing depth-first search on a connected component index subtree of the corresponding subgraph to obtain the connected component index tree with the changed topology.
6. A graph database-based power grid equipment reachability query system, comprising:
the power grid equipment graph model building module (1) is used for building a graph model of physical connection of power grid equipment according to the topological connection relation of the power grid equipment to obtain an initial connected component index tree;
the reachability detection module (2) is used for searching a nearest common ancestor node between the two power grid devices according to the initial connected component index tree and judging whether the nearest common ancestor node is a non-root node;
and when the nearest common ancestor node is a non-root node, determining that the two power grid devices can be reached.
7. The grid device reachability query system according to claim 6, wherein the reachability detection module (2) determines that the two grid devices are unreachable when the nearest common ancestor node is not the root node.
8. The graph database-based grid device reachability query system of claim 6, further comprising: an initial connected component index tree updating module (3) for updating the initial connected component index tree when the graph model changes the topology to generate a connected component index tree after the topology is changed; and replacing the initial connected component index tree by the connected component index tree after the topology is changed.
9. The graph database-based grid device reachability query system according to claim 8, wherein said initial connected component index tree update module (3) comprises: a connected component index tree after topology change obtaining submodule (31) for searching a currently running version in the version diagram of the initial connected component index tree along a directed edge representing topology change operation to obtain a connected component index tree after topology change;
when the version index node corresponding to the currently running version exists, the connected component index tree after the topology is changed is a connected component index tree taking the version index node as a root node;
and when the version index node corresponding to the currently running version does not exist, establishing a newly added version graph, wherein the connected component index tree after the topology is changed is the corrected connected component index tree of the newly added node.
10. The graph database-based grid device reachability query system according to claim 9, wherein said initial connected component index tree update module (3) further comprises: a correction submodule (32) for correcting the connected component index tree of the newly added node;
and searching a corresponding subgraph of the nearest common ancestor node of which the edge to be deleted is connected with the two power grid devices in the connected component index tree of the newly added node, and performing depth-first search on a connected component index subtree of the corresponding subgraph to obtain the connected component index tree with the changed topology.
11. A non-transitory computer readable storage medium storing computer instructions that, when executed by a processor, implement the power grid device reachability query method of any one of claims 1-5.
12. An electronic device, comprising: at least one processor (410); and a memory (420) communicatively coupled to the at least one processor (410),
the memory (420) stores instructions executable by the at least one processor (410), the instructions being executable by the at least one processor (410) to cause the at least one processor (410) to perform the power grid device reachability query method of any one of claims 1-5.
CN201710823452.3A 2017-09-13 2017-09-13 Graph database-based power grid equipment reachability query method and system Active CN107679107B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710823452.3A CN107679107B (en) 2017-09-13 2017-09-13 Graph database-based power grid equipment reachability query method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710823452.3A CN107679107B (en) 2017-09-13 2017-09-13 Graph database-based power grid equipment reachability query method and system

Publications (2)

Publication Number Publication Date
CN107679107A CN107679107A (en) 2018-02-09
CN107679107B true CN107679107B (en) 2020-10-27

Family

ID=61135726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710823452.3A Active CN107679107B (en) 2017-09-13 2017-09-13 Graph database-based power grid equipment reachability query method and system

Country Status (1)

Country Link
CN (1) CN107679107B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634987A (en) * 2018-11-22 2019-04-16 全球能源互联网研究院有限公司 The querying method and device of power grid chart database
CN110543494B (en) * 2019-08-19 2023-03-24 湖南麟淇网络科技股份有限公司 Method for constructing reachable graph based on cache table
CN115809533A (en) * 2022-12-21 2023-03-17 上海博般数据技术有限公司 Graph database-based power grid topology splicing method and using method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441681A (en) * 2008-12-24 2009-05-27 东南大学 Property analysis method and system of general-purpose Petri net based on quasi-perfect finite reachable tree
CN102929697A (en) * 2012-10-09 2013-02-13 Tcl集团股份有限公司 State machine, scheduling method and device and universal serial bus (USB) media play control device
CN103824234A (en) * 2014-03-18 2014-05-28 国家电网公司 Blocking and hierarchical structure based power distribution system reliability evaluation method
CN106815657A (en) * 2017-01-05 2017-06-09 国网福建省电力有限公司 A kind of power distribution network bi-level programming method for considering timing and reliability
CN107153647A (en) * 2016-03-02 2017-09-12 奇简软件(北京)有限公司 Carry out method, device, system and the computer program product of data compression

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140136468A1 (en) * 2012-11-14 2014-05-15 Robust Links, LLC Quantitative assessment of similarity of categorized data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441681A (en) * 2008-12-24 2009-05-27 东南大学 Property analysis method and system of general-purpose Petri net based on quasi-perfect finite reachable tree
CN102929697A (en) * 2012-10-09 2013-02-13 Tcl集团股份有限公司 State machine, scheduling method and device and universal serial bus (USB) media play control device
CN103824234A (en) * 2014-03-18 2014-05-28 国家电网公司 Blocking and hierarchical structure based power distribution system reliability evaluation method
CN107153647A (en) * 2016-03-02 2017-09-12 奇简软件(北京)有限公司 Carry out method, device, system and the computer program product of data compression
CN106815657A (en) * 2017-01-05 2017-06-09 国网福建省电力有限公司 A kind of power distribution network bi-level programming method for considering timing and reliability

Also Published As

Publication number Publication date
CN107679107A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
US8396852B2 (en) Evaluating execution plan changes after a wakeup threshold time
CN110515973B (en) Data query optimization method, device, equipment and storage medium
CN107251021B (en) Filtering data lineage graph
CN107679107B (en) Graph database-based power grid equipment reachability query method and system
CN111324577B (en) Yml file reading and writing method and device
CN111125199B (en) Database access method and device and electronic equipment
CN114491200A (en) Method and device for matching heterogeneous interest points based on graph neural network
EP3955256A1 (en) Non-redundant gene clustering method and system, and electronic device
CN111475511A (en) Data storage method, data access method, data storage device, data access device and data access equipment based on tree structure
CN108959571B (en) SQL statement operation method and device, terminal equipment and storage medium
CN110795431A (en) Environment monitoring data processing method, device, equipment and storage medium
CN108549688B (en) Data operation optimization method, device, equipment and storage medium
CN110399534B (en) Terminal performance report generation method, device, equipment and storage medium
CN106991195B (en) Distributed subgraph enumeration method
CN111563094A (en) Data query method and device, electronic equipment and computer-readable storage medium
CN107644103B (en) Method and system for storing traceable information source information
CN112835905B (en) Array type column indexing method, device, equipment and storage medium
CN106844377B (en) Processing method and device of multidimensional database
CN114048219A (en) Graph database updating method and device
CN108108472B (en) Data processing method and server
US20170139969A1 (en) Method for filtering and analyzing big data, electronic device, and non-transitory computer-readable storage medium
CN113076330A (en) Query processing method and device, database system, electronic equipment and storage medium
Sagharichian et al. A fast method to exactly calculate the diameter of incremental disconnected graphs
CN111930718B (en) Node adjustment method and device for configuration management database
US11740867B2 (en) Data sorting method, apparatus and device, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 102209 18 Riverside Avenue, Changping District science and Technology City, Beijing

Applicant after: Global energy Internet Institute, Inc.

Applicant after: State Grid Corporation of China

Applicant after: State Grid Anhui Electric Power Company

Address before: 102209 18 Riverside Avenue, Changping District science and Technology City, Beijing

Applicant before: Global energy Internet Institute, Inc.

Applicant before: State Grid Corporation of China

Applicant before: State Grid Anhui Electric Power Company

GR01 Patent grant
GR01 Patent grant