Distribution network equipment topology coloring method and device based on distribution cloud master station and graph database

文档序号:1861320 发布日期:2021-11-19 浏览:7次 中文

阅读说明:本技术 一种基于配电云主站及图数据库的配电网设备拓扑着色方法及装置 (Distribution network equipment topology coloring method and device based on distribution cloud master station and graph database ) 是由 周福 胡振洲 谭晶 单新文 陶定元 陈凯旋 吕非 何鸣一 马德超 靳晶 孙保华 于 2021-07-29 设计创作,主要内容包括:本发明公开了一种基于配电云主站及图数据库的配电网拓扑着色方法及装置,该方法包括从配电云主站实时库中抽取配电云主站模型与关系并存储在图数据库中,采用图形数据科学算法库中的弱连通组件算法计算云主站拓扑的连通性,并将计算的连通组件作为图数据库节点属性写入图数据库中,通过分析连通组件的电源信息,进行拓扑着色计算。当开关变位时触发局部拓扑着色分析计算,以及当电网模型发生变化时,更新图数据库,并对受影响静态连通组件及受影响节点重新进行局部拓扑着色分析计算。(The invention discloses a power distribution network topology coloring method and device based on a power distribution cloud master station and a graph database. And triggering local topology coloring analysis and calculation when the switch is displaced, updating the graph database when the power grid model is changed, and performing local topology coloring analysis and calculation again on the influenced static connected components and the influenced nodes.)

1. A power distribution network equipment topology coloring method based on a power distribution cloud master station and a graph database is characterized by comprising the following steps:

performing graph database modeling on the power distribution network electrical equipment based on the power distribution cloud master station real-time library model to generate a graph model;

performing global topology coloring calculation and local topology coloring calculation based on the graph model,

wherein the local topology coloring calculation comprises:

when the model in the real-time library of the power distribution cloud master station is monitored to be changed, model change local topology coloring calculation is carried out on the number of the affected static connected components and the nodes;

and the number of the first and second groups,

when the switch deflection of the power distribution cloud master station is monitored, switch deflection local topology coloring calculation is carried out on the serial number of the static communicating assembly to which the deflection switch belongs.

2. The method for coloring the topology of the power distribution network equipment based on the power distribution cloud master station and the graph database according to claim 1, wherein the graph database modeling is performed on the power distribution network electrical equipment, and comprises the following steps:

extracting a power distribution network electrical equipment model from a power distribution cloud master station real-time library;

modeling the extracted electrical equipment model in a graph database according to the equipment type,

modeling specific electrical equipment as graph nodes, modeling electrical equipment attributes as graph node attributes, and modeling relationships between the electrical equipment and the equipment as connection relationships;

the electrical device attributes include a device ID, a device name, a switch state, a topology coloring value, and an electrical terminal connection node number.

3. The method for coloring topology of power distribution network equipment based on the power distribution cloud master station and the graph database as claimed in claim 2, wherein graph nodes of the same equipment type are labeled with a table name, and wherein a DEVICE parent label is added to a conductive equipment class.

4. The method for coloring the topology of the power distribution network equipment based on the power distribution cloud master station and the graph database as claimed in claim 2, wherein the graph database is a Neo4j graph database.

5. The method for coloring the topology of the power distribution network equipment based on the power distribution cloud master station and the graph database according to claim 1, wherein the global topology coloring calculation comprises the following steps:

performing global topological connected component calculation, including performing global static connected component calculation and global dynamic connected component calculation;

and the number of the first and second groups,

and topology coloring is carried out on the global topology connected component.

6. The method for coloring topology of distribution network equipment based on distribution cloud master station and graph database according to claim 5,

performing global static connectivity component computations, including: on the basis of a graph model, all graph nodes with types as connection relations are taken to form anonymous graph objects, the on-off state of a switch is not considered, a static connected component is obtained through calculation by using a weak connected component algorithm in a GDS algorithm library, and the serial number of the static connected component is written into a graph database as the attribute of the graph nodes;

performing global dynamic connectivity component computations, including: and traversing the static communicating assemblies in sequence, taking the switch on-off state into consideration, taking one static communicating assembly, removing graph nodes with the switch-off state as the opening state, and reusing the weak communicating assembly algorithm to obtain the dynamic communicating assembly.

7. The method for coloring topology of power distribution network equipment based on the power distribution cloud master station and the graph database according to claim 6, wherein the global static connectivity component calculation is performed at initialization and then periodically.

8. The method of claim 6, wherein the global static connectivity components are numbered in the calculation based on graph node device IDs,

in the calculation process, the static connected component number always takes the minimum device ID of all graph nodes in the same group.

9. The method for topology coloring of power distribution network equipment based on a power distribution cloud master station and a graph database according to claim 5, wherein the topology coloring of the global topology connection component comprises:

setting the node color of the switching state in the static communication component as a power failure color and updating the power failure color into a graph database;

sequentially traversing each dynamic communication component, inquiring a graph database, checking whether a node with a label as a main network bus is included, inquiring whether the voltage value of the node is greater than 0, judging whether the dynamic communication component is electrified, and distributing topology colors according to power supply information;

comparing the assigned topological color values to color values stored by the dynamic connectivity component in the graph database;

and writing the difference color values as node attributes into a graph database to finish topology coloring calculation.

10. The method for coloring the topology of the power distribution network equipment based on the power distribution cloud master station and the graph database according to claim 2, wherein model change local topology coloring calculation comprises the following steps:

monitoring the change condition of the power distribution network electrical equipment model in a power distribution cloud master station real-time library in real time;

performing incremental model processing according to the model change message, and updating the graph model in the graph database; the incremental model processing comprises: if electrical equipment is newly added to the real-time base of the power distribution cloud master station, a corresponding graph model is newly established; if the real-time base of the power distribution cloud master station deletes the electrical equipment, deleting the corresponding graph model in the graph database; if the electrical equipment model in the power distribution cloud master station real-time library changes, deleting the corresponding graph model and then building a new graph model;

inquiring the updated graph database, and acquiring the number and the nodes of the affected static connected components;

calculating to obtain a new local static connected component number based on the affected static connected component and the graph object constructed by the affected nodes, and modifying the number value of the original static connected component in the graph database;

and traversing the new static connected components to perform dynamic connected component calculation and topology coloring calculation.

11. The method for coloring the topology of the power distribution network equipment based on the power distribution cloud master station and the graph database according to claim 1, wherein the calculation for coloring the local topology with the switch displacement comprises the following steps:

monitoring switch displacement messages of the power distribution cloud master station in real time, and writing the switch state as graph node attributes into a graph database in real time;

inquiring the number of the static communication component to which the displacement switch belongs from the graph database;

and carrying out local topology coloring calculation on the static connected component to which the displacement switch belongs.

12. The utility model provides a distribution network equipment topology coloring device based on distribution cloud master station and picture database which characterized in that includes:

the graph model module is used for performing graph database modeling on the power distribution network electrical equipment based on the power distribution cloud master station real-time library model to generate a graph model;

the topology coloring calculation module is used for carrying out global topology coloring calculation and local topology coloring calculation based on the graph model;

the topology coloring computation module comprises:

the communication component calculation module is used for carrying out global static communication component calculation and global dynamic communication component calculation;

the topology coloring calculation module is used for carrying out topology coloring based on the static communication component and the dynamic communication component;

the model change local topology analysis module is used for numbering the affected static connected components and nodes after the model changes in the real-time library of the power distribution cloud master station, performing static connected component calculation and dynamic connected component calculation again, and triggering topology coloring calculation;

the switch deflection local topology analysis module is used for acquiring the serial number of the static communication assembly to which the deflection switch belongs when the switch deflection of the power distribution cloud master station is monitored, and triggering topology coloring calculation on the static communication assembly to which the deflection switch belongs.

13. The topology coloring device for distribution network equipment based on distribution cloud master station and graph database according to claim 12, further comprising:

the incremental model calculation module is used for monitoring the change condition of the power distribution network electrical equipment model in the power distribution cloud master station real-time library in real time; performing incremental model processing according to the model change message; the incremental model processing comprises: if electrical equipment is newly added to the real-time base of the power distribution cloud master station, a corresponding graph model is newly established; if the real-time base of the power distribution cloud master station deletes the electrical equipment, deleting the corresponding graph model in the graph database; and if the electrical equipment model in the power distribution cloud master station real-time library changes, deleting the corresponding graph model and then building a new graph model.

Technical Field

The invention relates to the technical field of distribution network topology analysis, in particular to a distribution network equipment topology coloring method and device based on a distribution cloud master station and a graph database.

Background

The topology coloring of the power distribution network cloud master station is characterized in that an electrical equipment model in the power distribution network cloud master station is extracted, states of electrification, power failure, grounding and the like of various electrical equipment are determined according to the electrical connection relation of the equipment and the real-time states of circuit breakers and switch equipment in combination with the condition of power connection, and the states are marked by different colors, namely the topology coloring function.

Most of the existing topology coloring functions of the power distribution network are based on a relational database, and topology analysis is carried out by adopting an extensive and deep searching method, so that topology coloring of power distribution network equipment is completed.

The topology coloring calculation is divided into static topology calculation and dynamic topology coloring calculation, wherein the static topology calculation is to divide the whole power grid diagram into a plurality of static connected components and store the serial numbers without considering the on-off state of a switch; the dynamic topology coloring calculation includes global topology coloring and local (real-time) topology coloring on the basis of a static connected component after considering the on-off state of a switch, wherein the global topology coloring is initialized coloring or periodic coloring when a project is started; local (real-time) topology coloring is triggered by a remote signaling deflection or a model change event, namely when the running state of the power grid equipment is changed, the electrified state of the local electrical equipment is changed, and the electrified state of each equipment in the affected part of the power grid needs to be recalculated in real time.

Disclosure of Invention

The invention aims to provide a power distribution network equipment topology coloring method and device based on a power distribution cloud master station and a graph database, which are used for solving the problem of topology coloring performance of mass equipment of the power distribution cloud master station.

In order to achieve the purpose, the technical scheme adopted by the invention is as follows:

the invention provides a power distribution network equipment topology coloring method based on a power distribution cloud master station and a graph database, which comprises the following steps:

performing graph database modeling on the power distribution network electrical equipment based on the power distribution cloud master station real-time library model to generate a graph model;

performing global topology coloring calculation and local topology coloring calculation based on the graph model,

wherein the local topology coloring calculation comprises:

when the model in the real-time library of the power distribution cloud master station is monitored to be changed, model change local topology coloring calculation is carried out on the number of the affected static connected components and the nodes;

and the number of the first and second groups,

when the switch deflection of the power distribution cloud master station is monitored, switch deflection local topology coloring calculation is carried out on the serial number of the static communicating assembly to which the deflection switch belongs.

Further, graph database modeling is carried out on the power distribution network electrical equipment, and the graph database modeling comprises the following steps:

extracting a power distribution network electrical equipment model from a power distribution cloud master station real-time library;

modeling the extracted electrical equipment model in a graph database according to the equipment type,

modeling specific electrical equipment as graph nodes, modeling electrical equipment attributes as graph node attributes, and modeling relationships between the electrical equipment and the equipment as connection relationships;

the electrical device attributes include a device ID, a device name, a switch state, a topology coloring value, and an electrical terminal connection node number.

Further, graph nodes of the same DEVICE type are labeled with names as tag identifications, wherein the DEVICE parent tag is added to the conductive DEVICE class.

Further, the graph database is a Neo4j graph database.

Further, performing a global topology coloring calculation, comprising:

performing global topological connected component calculation, including performing global static connected component calculation and global dynamic connected component calculation;

and the number of the first and second groups,

and topology coloring is carried out on the global topology connected component.

Further, performing global static connectivity component calculation, comprising: on the basis of a graph model, all graph nodes with types as connection relations are taken to form anonymous graph objects, the on-off state of a switch is not considered, a static connected component is obtained through calculation by using a weak connected component algorithm in a GDS algorithm library, and the serial number of the static connected component is written into a graph database as the attribute of the graph nodes;

performing global dynamic connectivity component computations, including: and traversing the static communicating assemblies in sequence, taking the switch on-off state into consideration, taking one static communicating assembly, removing graph nodes with the switch-off state as the opening state, and reusing the weak communicating assembly algorithm to obtain the dynamic communicating assembly.

Further, the global static connected component calculation is performed at initialization and then periodically.

Further, the global static connectivity component is numbered based on the graph node device ID at the time of computation,

in the calculation process, the static connected component number always takes the minimum device ID of all graph nodes in the same group.

Further, the topology coloring of the global topology connected component includes:

setting the node color of the switching state in the static communication component as a power failure color and updating the power failure color into a graph database;

sequentially traversing each dynamic communication component, inquiring a graph database, checking whether a node with a label as a main network bus is included, inquiring whether the voltage value of the node is greater than 0, judging whether the dynamic communication component is electrified, and distributing topology colors according to power supply information;

comparing the assigned topological color values to color values stored by the dynamic connectivity component in the graph database;

and writing the difference color values as node attributes into a graph database to finish topology coloring calculation.

Further, performing model change local topology coloring calculation, including:

monitoring the change condition of the power distribution network electrical equipment model in a power distribution cloud master station real-time library in real time;

performing incremental model processing according to the model change message, and updating the graph model in the graph database; the incremental model processing comprises: if electrical equipment is newly added to the real-time base of the power distribution cloud master station, a corresponding graph model is newly established; if the real-time base of the power distribution cloud master station deletes the electrical equipment, deleting the corresponding graph model in the graph database; if the electrical equipment model in the power distribution cloud master station real-time library changes, deleting the corresponding graph model and then building a new graph model;

inquiring the updated graph database, and acquiring the number and the nodes of the affected static connected components;

calculating to obtain a new local static connected component number based on the affected static connected component and the graph object constructed by the affected nodes, and modifying the number value of the original static connected component in the graph database;

and traversing the new static connected components to perform dynamic connected component calculation and topology coloring calculation.

Further, the method for calculating the coloring of the switch deflection local topology comprises the following steps:

monitoring switch displacement messages of the power distribution cloud master station in real time, and writing the switch state as graph node attributes into a graph database in real time;

inquiring the number of the static communication component to which the displacement switch belongs from the graph database;

and carrying out local topology coloring calculation on the static connected component to which the displacement switch belongs.

The invention provides a device for coloring topology of power distribution network equipment based on a power distribution cloud master station and a graph database, which comprises the following components:

the graph model module is used for performing graph database modeling on the power distribution network electrical equipment based on the power distribution cloud master station real-time library model to generate a graph model;

the topology coloring calculation module is used for carrying out global topology coloring calculation and local topology coloring calculation based on the graph model;

the topology coloring computation module comprises:

the communication component calculation module is used for carrying out global static communication component calculation and global dynamic communication component calculation;

the topology coloring calculation module is used for carrying out topology coloring based on the static communication component and the dynamic communication component;

the model change local topology analysis module is used for numbering the affected static connected components and nodes after the model changes in the real-time library of the power distribution cloud master station, performing static connected component calculation and dynamic connected component calculation again, and triggering topology coloring calculation;

the switch deflection local topology analysis module is used for acquiring the serial number of the static communication assembly to which the deflection switch belongs when the switch deflection of the power distribution cloud master station is monitored, and triggering topology coloring calculation on the static communication assembly to which the deflection switch belongs.

Further, the method also comprises the following steps:

the incremental model calculation module is used for monitoring the change condition of the power distribution network electrical equipment model in the power distribution cloud master station real-time library in real time; performing incremental model processing according to the model change message; the incremental model processing comprises: if electrical equipment is newly added to the real-time base of the power distribution cloud master station, a corresponding graph model is newly established; if the real-time base of the power distribution cloud master station deletes the electrical equipment, deleting the corresponding graph model in the graph database; and if the electrical equipment model in the power distribution cloud master station real-time library changes, deleting the corresponding graph model and then building a new graph model.

The invention has the beneficial effects that:

the invention provides a power distribution network topology coloring method and device based on a power distribution cloud master station and a graph database, which adopt a graph database technology to realize storage, query and analysis of the contact relationship of electrical equipment, obtain more excellent topology data management efficiency than the electrical equipment stored in a relational database, seamlessly embed analysis calculation in a graph database query language, realize a calculation mode taking data as a center, greatly reduce the time overhead of topology data exchange such as data reading-in, result writing-back and the like, on the basis, divide the power grid contact relationship through a contact area and a topology coloring value, realize that the topology change caused by real-time changes of power grids such as abnormal equipment, remote signaling displacement and the like is controlled in a local range, further improve the real-time topology analysis efficiency, and finally realize the packaging of real-time topology common services of the power grids based on a graph data calculation algorithm suitable for the power distribution network, and providing the topological calculation analysis calculation power of the power distribution network for the external system.

Drawings

FIG. 1 is a schematic flow chart of a topology coloring method for power distribution network equipment based on a power distribution cloud master station and a graph database according to the present invention;

FIG. 2 is a schematic diagram of a global topology coloring computation flow according to the present invention;

FIG. 3 is a schematic view of coloring of switch-index local topology according to the present invention;

FIG. 4 is a schematic view of coloring of a local topology of a model change in the present invention.

FIG. 5 is a schematic diagram of the present invention for modeling graph data.

Detailed Description

The invention is further described below. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.

The embodiment of the invention provides a power distribution network equipment topology coloring method based on a power distribution cloud master station and a graph database, which is shown in figure 1 and comprises the following steps:

step 1), performing graph database modeling on the power distribution network electrical equipment;

step 2), storing the graph model after modeling into a graph database;

step 3), carrying out global topology coloring calculation and local topology coloring calculation based on the graph model,

wherein the local topology coloring calculation comprises:

when the model in the real-time library of the power distribution cloud master station is monitored to be changed, model change local topology coloring calculation is carried out on the number of the affected static connected components and the nodes;

and the number of the first and second groups,

when the switch deflection of the power distribution cloud master station is monitored, switch deflection local topology coloring calculation is carried out on the serial number of the static communicating assembly to which the deflection switch belongs.

As an implementation manner of the embodiment of the invention, graph database modeling is performed on the power distribution network electrical equipment, and the specific operation process comprises the following steps:

step 1.1), extracting a whole-network electrical equipment model from a real-time library of a power distribution cloud master station,

the model includes, but is not limited to, DEVICE models such as a main network BREAKER (BREAKER), a main network switch (disconnect), a main network bus (busbaremission), a distribution network switch (DMS _ CB _ DEVICE), a distribution network switch (DMS _ disconnect _ DEVICE), a distribution network FEEDER (DMS _ FEEDER _ DEVICE), a FEEDER segment (DMS _ separation _ DEVICE), a distribution network load (DMS _ LD _ DEVICE), and a distribution network transformer (DMS _ TR _ DEVICE).

Step 1.2), modeling the extracted electrical equipment model in a graph database according to the equipment type,

the specific equipment is modeled as graph nodes, and the equipment attributes (including equipment ID, equipment name, switch state, topological coloring value and electric terminal connecting node number) are modeled as graph node attributes.

The nodes of the same type are marked as label identifications, wherein the conducting DEVICE type is added with a DEVICE father label, for example, the labels of the distribution network switch are two, one is the DEVICE father label, and the other is the DMS _ CB _ DEVICE label.

The device-to-device relationship is modeled as a connected relationship (: CONNECT _ WITH).

For example, two conductive DEVICE nodes are newly added, one of the DEVICEs is a switch, the node is required to simultaneously contain DMS _ CB _ DEVICE and DEVICE labels, and the node attribute 'DEVICE name' is 'switch A'; the other DEVICE is a distribution network feeder segment, the node comprises DMS _ SECTION _ DEVICE and DEVICE labels, the node attribute is 'DEVICE name' is 'cable B', and a new addition relationship (: CONNECT _ WITH) is connected WITH 'switch A' and 'cable B', as shown in figure 5.

CREATE (n: DMS _ CB _ DEVICE: DEVICE (name: 'switch A')) RETURN n;

CREATE (n: DMS _ SECTION _ DEVICE: DEVICE (name: 'Cable B')) RETURN n;

MATCH (a: DEVICE (name: 'switch A')), (B: DEVICE (name: 'cable B')) create (a) - [ r: CONNECT _ WITH ] - > (B) return a, B, r;

the connection relationship created above uses the DEVICE parent tag, which has the advantage that relationships between different child DEVICE types can be created.

As an implementation of the embodiment of the present invention, the modeled graph model is stored in the Neo4j graph database.

As an implementation manner of the embodiment of the invention, after the model in the real-time library of the power distribution cloud master station changes, the model transaction notification service monitors the change, performs incremental model processing according to a specific model change message, and updates the graph model in Neo4 j.

The incremental model processing comprises operations of addition, deletion and modification, wherein the modification operation is simplified into the operation of deletion before addition; for example, if a new device is added to the real-time library of the power distribution cloud master station, the incremental model processing module needs to synchronously create the device node and the edge associated with the device in Neo4j, and the creation of the edge is calculated by the device attribute connection point; when a device is deleted in the live library, the incremental model processing module needs to synchronously delete the edges of the node associated with all the nodes in Neo4 j. And the newly added (deleted) node and the two end nodes of the newly added (deleted) edge jointly form an affected node, and the static communication component to which the affected node belongs is analyzed and calculated by the local topology of the model change.

As an implementation mode of the embodiment of the invention, after a graph model in Neo4j is updated, a Neo4j graph database is queried, the number and the nodes of the affected static connected components are obtained, and model change local topology analysis calculation is triggered.

As an implementation manner of the embodiment of the invention, the Flink stream processing application monitors the switch shift message of the power distribution cloud master station in real time, writes the switch state as the node attribute into the graph database in real time, queries the serial number of the static communication component to which the shift switch belongs from the graph database, and triggers the analysis and calculation of the switch shift local topology.

As an implementation manner of the embodiment of the present invention, the global topology coloring calculation, referring to fig. 2, includes two parts, namely, a global topology connected component calculation and a topology coloring calculation.

The global topological connected component calculation is divided into global static connected component calculation and global dynamic connected component calculation.

Wherein the global static connectivity component is calculated as: on the basis of a graph data model modeled by Neo4j, all nodes WITH the types of connection relationships (: CONNECT _ WITH) are taken to form an anonymous Neo4j graph object, the switch on-off state is not considered, a static connected component is obtained by calculation through a weak connected component algorithm (WCC) in a GDS algorithm library, and the number of the static connected component is written into a Neo4j graph database as a node attribute.

The global static connected component calculation is carried out during initialization, and then the calculation can be carried out periodically, so that the correctness of the global static component is ensured.

The global static connected components are numbered based on the node ID during calculation, and in order to make the number of the connected components relatively fixed, the number of the connected components always takes the minimum equipment ID of all nodes in the same group.

The following is the static connectivity component calculates the detailed parameter configuration using the WCC algorithm Write mode. Wherein nodeQuery defines all nodes participating in the computation; relationship quick defines all relations participating in calculation; defining the node initialization number during calculation by the seedProperty, and taking the minimum value as the number of the connected component in the calculation result; writeProperty defines the properties of the connected component number store for which the computation is complete. "$ nodeCql" means to take the value of variable nodeCql, "$ relationship shipCql" means to take the value of variable relationship shipCql.

Define nodeCql variable: MATCH (n: DEVICE) return id (n) AS id, n.id AS seed Id

Defining a relationshipQuery variable:

MATCH(a:DEVICE)-[r:CONNECT_WITH]-(b:DEVICE)RETURN id(a)AS source,id(b)AS target

performing static connectivity component calculation: call gds

nodeQuery:$nodeCql,

relationshipQuery:“$relationshipCql”,

writeProperty:'component_id',

seedProperty:'seedId'})

yield nodePropertiesWritten,componentCount,computeMillis,createMillis;

The global dynamic connectivity component is calculated as: and traversing the static communicating assemblies in sequence, taking the opening and closing states of the switches into consideration, taking one static communicating assembly, removing the node with the opening and closing state as the opening state, and reusing a weak communicating assembly algorithm (WCC) to obtain the dynamic communicating assembly.

The following is an algorithm process for performing dynamic connected component calculation on a single static connected component, and when a node and an edge are defined, a node whose switch state is an open state needs to be removed, where "n.point" is a node attribute, and identifies a switch state (0 or 1), and a node whose point is defined as 1 or does not exist (for example, a feeder line segment) is a closed state node.

Define nodeCql variable: MATCH (n: DEVICE { component _ id: $ component _ id }) wireless EXISTS (n.point) or n.point ═ 1return id (n) AS id;

defining a relationshipQuery variable: MATCH (a: DEVICE { component _ id: $ component _ id }) - [ r: CONNECT _ width ] - (b: DEVICE { component _ id: $ component _ id }) where (not EXISTS (a. point) or a. point 1) and (not EXISTS (b. point) or b. point 1) RETURN id (a) AS source, id (b) AS target;

performing dynamic connectivity component calculations: call gds

nodeQuery:$nodeCql,

relationshipQuery:$relationshipCql,

writeProperty:'dyn_component_id'

})yield nodePropertiesWritten,componentCount,computeMillis,createMillis;

The topology coloring calculation is that firstly, the node color of the switching state in the static communication component is set as a power failure color and is updated into a graph database; and then traversing each dynamic communicating component in sequence, inquiring the graph database, checking whether a node with a label as a main network bus is included, inquiring whether the voltage value of the node is greater than 0, judging whether the communicating component is electrified, distributing topology colors according to power supply information, comparing the color values with the old color values in Neo4j, writing the difference color values into Neo4j as node attributes, and finishing topology coloring calculation. The external application can query the topological coloration value of any electrical device through the microservice.

As an implementation manner of the embodiment of the present invention, the switch deflection local topology coloring calculation is, as shown in fig. 3, specifically, after the switch is deflected, a message sent by a Flink switch deflection processing module is monitored, a static connected component to which a deflection switch belongs is obtained, and the local topology coloring calculation is performed on the static connected component according to the topology coloring calculation method.

As an implementation manner of the embodiment of the present invention, model change local topology coloring calculation is performed, as shown in fig. 4, specifically, after a cloud master station real-time library model changes, a static connected component number and affected node information affected by the model change are obtained, a new local static connected component number is obtained by calculation based on a graph object constructed by the affected static connected component and the affected node, a number value of an original static connected component in a Neo4j graph database is modified, then dynamic connected component calculation is performed, and topology coloring calculation is performed.

A second embodiment of the present invention provides a power distribution network device topology coloring apparatus based on a power distribution cloud master station and a graph database, including:

the graph model module is used for performing graph database modeling on the power distribution network electrical equipment based on the power distribution cloud master station real-time library model to generate a graph model;

the topology coloring calculation module is used for carrying out global topology coloring calculation and local topology coloring calculation based on the graph model;

the topology coloring computation module comprises:

the communication component calculation module is used for carrying out global static communication component calculation and global dynamic communication component calculation;

the topology coloring calculation module is used for carrying out topology coloring based on the static communication component and the dynamic communication component;

the model change local topology analysis module is used for numbering the affected static connected components and nodes after the model changes in the real-time library of the power distribution cloud master station, performing static connected component calculation and dynamic connected component calculation again, and triggering topology coloring calculation;

the switch deflection local topology analysis module is used for acquiring the serial number of the static communication assembly to which the deflection switch belongs when the switch deflection of the power distribution cloud master station is monitored, and triggering topology coloring calculation on the static communication assembly to which the deflection switch belongs.

The embodiment of the invention also comprises the following steps:

the incremental model calculation module is used for monitoring the change condition of the power distribution network electrical equipment model in the power distribution cloud master station real-time library in real time; performing incremental model processing according to the model change message; the incremental model processing comprises: if electrical equipment is newly added to the real-time base of the power distribution cloud master station, a corresponding graph model is newly established; if the real-time base of the power distribution cloud master station deletes the electrical equipment, deleting the corresponding graph model in the graph database; and if the electrical equipment model in the power distribution cloud master station real-time library changes, deleting the corresponding graph model and then building a new graph model.

It is to be noted that the apparatus embodiment corresponds to the method embodiment, and the implementation manners of the method embodiment are all applicable to the apparatus embodiment and can achieve the same or similar technical effects, so that the details are not described herein.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种电网实时图并行计算方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!