CN113435009A - Spark flow graph combination-based power grid equipment topology coloring method and device - Google Patents

Spark flow graph combination-based power grid equipment topology coloring method and device Download PDF

Info

Publication number
CN113435009A
CN113435009A CN202110591580.6A CN202110591580A CN113435009A CN 113435009 A CN113435009 A CN 113435009A CN 202110591580 A CN202110591580 A CN 202110591580A CN 113435009 A CN113435009 A CN 113435009A
Authority
CN
China
Prior art keywords
distribution network
power distribution
topological
topology
island
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.)
Granted
Application number
CN202110591580.6A
Other languages
Chinese (zh)
Other versions
CN113435009B (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.)
Nari Technology Co Ltd
NARI Nanjing Control System Co Ltd
Original Assignee
Nari Technology Co Ltd
NARI Nanjing Control System Co Ltd
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 Nari Technology Co Ltd, NARI Nanjing Control System Co Ltd filed Critical Nari Technology Co Ltd
Priority to CN202110591580.6A priority Critical patent/CN113435009B/en
Publication of CN113435009A publication Critical patent/CN113435009A/en
Application granted granted Critical
Publication of CN113435009B publication Critical patent/CN113435009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02HEMERGENCY PROTECTIVE CIRCUIT ARRANGEMENTS
    • H02H7/00Emergency protective circuit arrangements specially adapted for specific types of electric machines or apparatus or for sectionalised protection of cable or line systems, and effecting automatic switching in the event of an undesired change from normal working conditions
    • H02H7/26Sectionalised protection of cable or line systems, e.g. for disconnecting a section on which a short-circuit, earth fault, or arc discharge has occured
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J13/00Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network
    • H02J13/00006Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by information or instructions transport means between the monitoring, controlling or managing units and monitored, controlled or operated power network element or electrical equipment
    • H02J13/00007Circuit arrangements for providing remote indication of network conditions, e.g. an instantaneous record of the open or closed condition of each circuitbreaker in the network; Circuit arrangements for providing remote control of switching means in a power distribution network, e.g. switching in and out of current consumers by using a pulse code signal carried by the network characterised by information or instructions transport means between the monitoring, controlling or managing units and monitored, controlled or operated power network element or electrical equipment using the power network as support for the transmission
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for ac mains or ac distribution networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/04Power grid distribution networks
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2203/00Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
    • H02J2203/20Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
    • 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
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • 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
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/20Systems supporting electrical power generation, transmission or distribution using protection elements, arrangements or systems
    • 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
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/40Display of information, e.g. of data or controls
    • 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
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
    • 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
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S40/00Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
    • Y04S40/12Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them characterised by data transport means between the monitoring, controlling or managing units and monitored, controlled or operated electrical equipment
    • Y04S40/121Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them characterised by data transport means between the monitoring, controlling or managing units and monitored, controlled or operated electrical equipment using the power network as support for the transmission

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Computer Hardware Design (AREA)
  • Power Engineering (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention discloses a Spark flow graph combination-based power grid equipment topology coloring method and device. When the power grid topology is analyzed and calculated, the power grid topology is divided into static topology (switch on/off is not considered) and dynamic topology (switch real-time switch on/off state is considered); the topology coloring is based on the static topology island, the spark streaming flow calculation technology is adopted to shift in real time according to the starting equipment, the electrified state of the static topology island is recalculated in parallel, and the topology coloring is carried out on the power grid equipment according to different power source states of the connected island. The invention solves the technical problems of high complexity and low real-time performance of large-scale power grid model topology calculation.

Description

Spark flow graph combination-based power grid equipment topology coloring method and device
Technical Field
The invention relates to the technical field of power grid topology analysis, in particular to a power grid equipment topology coloring method and device based on Spark flow graph merging.
Background
The topology coloring of the power system can determine the states of electrification, power failure, grounding and the like of various electrical equipment in the system according to the electrical connection relation of the equipment, the real-time states of circuit breakers and switch equipment, the condition of power connection, the grounding condition and the closed-loop operation condition, and displays the result on a human-computer interface by different colors, namely according to the coloring function of a topology island: dead island: the uncharged elements are collectively represented in one color; a grounding island: the ground elements are collectively represented in one color; a live island: the normally charged elements are respectively represented by different colors according to different voltage levels, and different colors can be configured for each island under the condition that a plurality of live islands are formed by splitting a power grid.
The topology coloring can be triggered by an event, namely when the running state of the power grid is changed, and a part of electrical elements and electrical equipment are uncharged or are electrified, the electrified state of each equipment of the power system can be calculated according to the switch real-time remote signaling deflection.
At present, the method for identifying the power system topological island mainly comprises a depth search method, an extent search method and the like. The depth/breadth search principle is simple, but the method is slightly insufficient for a complex network; the calculation efficiency of a large power grid is low, and the instantaneity is not strong.
Disclosure of Invention
The invention aims to provide a method and a device for coloring topology of power grid equipment based on Spark flow graph merging, which are used for solving the problems of large scale of topology of a power distribution network, high calculation cost and low speed.
The technical scheme adopted by the invention is as follows:
the invention provides a grid equipment topology coloring method based on Spark flow graph merging, which comprises the following steps:
preprocessing a power distribution network real-time library model to obtain original graph model data;
constructing a power distribution network topological graph based on the original graph model data;
calculating a static topological island of the power distribution network based on the topological graph of the power distribution network;
calculating a dynamic topological island of the power distribution network based on the static topological island of the power distribution network;
and topology coloring is carried out based on the static topology island and the dynamic topology island of the power distribution network.
Further, the preprocessing is performed on the power distribution network real-time library model to obtain original graph model data, and the method comprises the following steps:
acquiring model data from a power distribution network real-time base; the model data comprises equipment table information and domain information related to the topology of the power distribution network;
according to the equipment table information, disassembling double-node equipment, multi-node equipment and single-node equipment into double-node equipment; the Terminal at the other end of the single-node equipment is completed with-1;
aggregating equipment terminals Terminal in all the equipment tables, and re-doing the Terminal as vertex data, wherein the vertex attribute defaults to 1;
aggregating all the devices in the device table as edge data, and using the device attributes as edge attributes;
the vertex data and edge data constitute the original graph model data.
Further, the method for constructing the distribution network topological graph based on the original graph model data comprises the following steps:
abstracting a device Terminal in original graph model data into a graph Vertex;
abstracting equipment in original graph model data into an Edge of a graph;
and constructing a distribution network topological graph by using a Graphx constructor and Vertex and Edge.
Further, the calculating the static topological island of the power distribution network based on the topological graph of the power distribution network includes:
and running a connected component algorithm of Graphx on a topological graph of the power distribution network, wherein the edges of the single-node equipment are in a non-connected state, the edges of the multi-node equipment are in a connected state, and the interconnected equipment forms a connected region which is used as a static topological island of the power distribution network and is cached in the Redis cluster.
Further, the method also comprises the following steps:
and calculating the static topological islands of the power distribution network at regular time, updating the version numbers of the static topological islands of the power distribution network, sequentially increasing the version numbers of the static topological islands of the power distribution network, caching the static topological islands of the power distribution network with the version number difference smaller than 3 in the Redis cluster, and regularly cleaning the static topological islands of the power distribution network with overdue versions.
Further, the method also comprises the following steps:
adopting spark streaming to consume the change message of the power distribution network system model in the Kafka message middleware Topic in real time;
and recalculating the static topological island of the power distribution network when the model of the power distribution network system is changed, updating the version number of the static topological island of the power distribution network and caching the version number into the Redis cluster.
Further, the calculating a dynamic topology island of the power distribution network based on the static topology island of the power distribution network includes:
the method comprises the steps that equipment in a static topological island obtains a remote signaling state from a Redis cluster, and the static topological island is converted into a topological graph with a switch state through a Graphx conversion operator;
and judging the device remote signaling value and the device type attribute in the topological graph, wherein the edges of the graph are in a connected state when the remote signaling is switched on, the edges of the graph are in a non-connected state when the remote signaling is switched off, and the power supply and the single-node device are in a non-connected state, and performing Graphx connected component algorithm calculation again to obtain the dynamic topological island of the power distribution network.
Further, topology coloring is carried out based on the power distribution network static topology island and the power distribution network dynamic topology island, and the topology coloring comprises global topology coloring and real-time topology coloring;
the global topology coloring includes:
constructing a topological graph based on all the static topological islands, and calculating the dynamic topological islands of the power distribution network;
traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network; the power supply states comprise a live state, a grounding state and a power failure state;
the real-time topology coloring comprises:
consuming the power distribution system switch displacement information in the Kafka message middleware in real time, constructing a topological graph on the basis of a static topological island to which a switch belongs, and calculating a dynamic topological island of the power distribution network;
and traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network.
Further, the method also comprises the following steps:
and performing topology coloring in parallel by adopting multiple threads, wherein each thread processes at least one static topology island.
Another aspect of the present invention provides a device for coloring topology of power grid devices based on Spark flow graph merging, including:
the preprocessing module is used for preprocessing the power distribution network real-time library model to obtain original graph model data;
the graph module is used for constructing a power distribution network topological graph based on the original graph model data;
the first calculation module is used for calculating a static topological island of the power distribution network based on the topological graph of the power distribution network;
the second calculation module is used for calculating a dynamic topological island of the power distribution network based on the static topological island of the power distribution network;
and the number of the first and second groups,
and the coloring module is used for carrying out topology coloring based on the static topology island and the dynamic topology island of the power distribution network.
Further, the preprocessing module is specifically configured to,
acquiring model data from a power distribution network real-time base; the model data comprises equipment table information and domain information related to the topology of the power distribution network;
according to the equipment table information, disassembling double-node equipment, multi-node equipment and single-node equipment into double-node equipment; the Terminal at the other end of the single-node equipment is completed with-1;
aggregating equipment terminals Terminal in all the equipment tables, and re-doing the Terminal as vertex data, wherein the vertex attribute defaults to 1;
aggregating all the devices in the device table as edge data, and using the device attributes as edge attributes;
the vertex data and edge data constitute the original graph model data.
Further, the first calculation module is specifically configured to,
and running a connected component algorithm of Graphx on a topological graph of the power distribution network, wherein the edges of the single-node equipment are in a non-connected state, the edges of the multi-node equipment are in a connected state, and the interconnected equipment forms a connected region which is used as a static topological island of the power distribution network and is cached in the Redis cluster.
Further, the second calculation module is specifically configured to,
the method comprises the steps that equipment in a static topological island obtains a remote signaling state from a Redis cluster, and the static topological island is converted into a topological graph with a switch state through a Graphx conversion operator;
and judging the device remote signaling value and the device type attribute in the topological graph, wherein the edges of the graph are in a connected state when the remote signaling is switched on, the edges of the graph are in a non-connected state when the remote signaling is switched off, and the power supply and the single-node device are in a non-connected state, and performing Graphx connected component algorithm calculation again to obtain the dynamic topological island of the power distribution network.
Further, the staining module is specifically configured to,
constructing a topological graph based on all the static topological islands, and calculating the dynamic topological islands of the power distribution network;
traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network; the power supply states comprise a live state, a grounding state and a power failure state;
and the number of the first and second groups,
consuming the power distribution system switch displacement information in the Kafka message middleware in real time, constructing a topological graph on the basis of a static topological island to which a switch belongs, and calculating a dynamic topological island of the power distribution network;
and traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network.
The invention has the beneficial effects that:
the method fully combines the technical characteristics of Spark flow calculation and graph calculation, and during the analysis and calculation of the power grid topology, the power grid topology is divided into static topology without considering the on-off state of a switch and dynamic topology calculation with considering the real-time on-off state of the switch; the topology coloring is based on the static topology island, the live state of the static topology island is recalculated in parallel according to the real-time displacement of the starting equipment, and the topology coloring is carried out on the power grid equipment according to different power states of the connected island. The invention solves the technical problems of high complexity and low real-time performance of large-scale power grid model topology calculation.
Drawings
Fig. 1 is a flowchart of a topology coloring method for a power grid device based on Spark flow graph merging according to the present invention;
FIG. 2 is a static and dynamic topology computation implementation architecture of the present invention;
FIG. 3 is a schematic diagram of static topology calculation according to the present invention;
FIG. 4 is a diagram illustrating dynamic topology calculation and topology coloring according to the present invention.
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 invention provides a method for calculating a power distribution network topology island by adopting a data structure of a graph, the power distribution network is divided into unconnected subgraphs, namely static topology islands, by adopting a graph connection component algorithm, and topology coloring is dynamically calculated by depending on the static topology islands.
The distribution network topology calculation selects Graphx as a graph calculation framework, the Graphx is an API component of Spark, belongs to a distributed attribute graph (both a vertex and an edge have attributes) structure, and supports graph and distributed graph calculation. The graph x power distribution network topological graph abstracts power grid equipment as an edge of the graph, namely mapping power grid equipment ID to the edge ID of the graph, and mapping power grid equipment attribute to the edge attribute of the graph; the Terminal of the power grid equipment is abstracted to be a graph top point; and enabling the vertexes and edges of the graph power distribution network topological graph to correspond to the equipment in the power grid topology one by one.
The static topological island division adopts a Graphx connected component algorithm, a group of connected nodes are found in an undirected graph, wherein all nodes in the same group form a connected component, and the minimum vertex identification of the component is taken as a connected component identification, namely the static topological island. The static topological island is cached in a Redis cluster, and graph transaction problems are solved by adopting a topological island version management strategy.
The dynamic topological island calculation is based on the static topological island, the used algorithms are slightly different, the opening and closing states of the power grid equipment need to be considered, when the original connected component calculation is iterated, the attribute of the remote signaling value of the power grid equipment is added and judged, the remote signaling closing considers that the edge of the graph is in the connected state, and the remote signaling opening considers that the edge of the graph is in the disconnected state, namely, the improved connected component algorithm is adopted. And topology coloring, namely determining the electrified, power-off and grounding states of the electric island equipment according to the power supply point and voltage states in the dynamic topology island, and caching the color value.
Based on this, an embodiment of the present invention provides a grid device topology coloring method based on Spark flow graph merging, which is composed of two parts, namely static topology calculation and dynamic topology coloring, and is shown in fig. 2. Calculating a full quantity and an increment model by using the static topology, and caching the static topology island into a Redis cluster; and the dynamic topology coloring calculates the color of the topology island according to the real-time state of the equipment, caches the state of the topology equipment and the color value of the topology equipment to the Redis cluster.
The specific implementation process, as shown in fig. 1, includes:
preprocessing a power distribution network real-time library model; and acquiring model data from a real-time library by analyzing table information and domain information which are configured in the XML file and relate to the topology calculation of the power distribution network, and aggregating the model data to obtain vertex and edge data which are needed for constructing a Graphx graph object and are called as original graph model data.
Constructing a power distribution network topological graph based on the original graph model data; and abstracting the power grid equipment in the original graph model data into an Edge (Edge) of a graph, and abstracting a Terminal into a graph Vertex (Vertex) to construct a graph object.
Calculating a static topological island of the power distribution network based on the topological graph of the power distribution network; the topological graph of the power distribution network is segmented into topological subgraphs, namely static topological islands, by using a Graphx connected component algorithm, the static topological islands are cached in the Redis cluster, and graph transaction consistency is ensured through a topological island version management strategy.
Calculating the change of the power distribution network model in real time; and when the model changes, recalculating the static topological island and caching the static topological island into the Redis cluster.
Calculating a dynamic topological island of the power distribution network based on the static topological island; and calculating an electric island, namely a dynamic topological island, by using an improved Graphx communication component algorithm on the basis of the static topological island in combination with the switch on-off position in the Redis cluster.
Performing topology coloring calculation based on the static topology island and the dynamic topology island; the method comprises global topology coloring and real-time topology coloring, wherein the states of electrification, power failure, grounding and the like of each electrical device in the dynamic topology island are determined according to the power supply point and the electrification state of the power supply point, and are marked by different colors.
As an embodiment of the invention, the power distribution network real-time library model is preprocessed, and the operation is as follows:
analyzing equipment table information and domain information which are configured in the XML file and relate to the power distribution network topology, and acquiring model data from a power distribution network real-time base;
disassembling double-node, multi-node and single-node equipment into double-node equipment; the Terminal of the other Terminal of the single-node equipment is completed by-1, and the single-node equipment is regarded as a disconnected state during topology calculation;
aggregating the Terminal of the power grid equipment in all the tables, removing the duplication to be used as vertex data VertexRDD of the graph, and setting the vertex attribute as default 1; and aggregating the power grid device relations (source terminals and target terminals) in all the tables as edge data EdgeRDD of the graph, and using the device attributes as edge attributes.
The equipment terminals Terminal are the end points of the two ends of the power distribution network equipment and are used for connecting the nodes of the circuit.
As an embodiment of the invention, a power distribution network topological graph is constructed based on original graph model data, and the specific operations are as follows:
abstracting a device Terminal in original graph model data into a graph Vertex (Vertex);
abstracting equipment in original graph model data into graph edges (edges);
and constructing a distribution network topological graph by using a Graphx constructor and Vertex and Edge. Graph x is a distributed graph processing framework for graph computation and graph mining provided by the Spark platform. Edge/Vertex is a constituent member of the graph data structure, abstracted in Spark as EdgeRDD/Vertex rdd.
As an embodiment of the invention, a static topological island of the power distribution network is calculated based on a topological graph of the power distribution network, a full-quantity calculation topological model is used during initialization, and timing full-quantity topological calculation and dynamic incremental topological calculation are supported; and generating a new version of static topology island by topology calculation each time, dividing a communication area according to a specific rule and caching, and updating the version of the static topology island.
Referring to fig. 3, the method specifically includes:
and running a connected component algorithm of Graphx on a topological graph of the power distribution network, wherein the edges of the single-node equipment are in a non-connected state, the edges of the multi-node equipment are in a connected state, and the interconnected equipment forms a connected area, namely a static topological island.
The static topological islands are stored, model support is provided for dynamic topological calculation, cache is achieved in the Redis cluster, and access efficiency is improved.
The static topological island is used at the same time in scenes such as model change, dynamic topological calculation and the like, and a topological island version control strategy is adopted to ensure the consistency of graph transactions; and the version numbers of the static topological islands are sequentially increased, the difference value of the Redis cluster cache version numbers of the static topological islands is less than 3, and the overdue version static topological islands are regularly cleaned.
And (4) performing static topological island calculation at regular time to ensure the data quasi-consistency of the graph model.
As an embodiment of the present invention, the real-time calculation of the power distribution network model changes is performed, and referring to fig. 3 in particular, it means that,
based on Kafka message middleware, spark streaming consumes the power distribution network system model change message in Topic of Kafka in real time;
recalculating the static topological island when the model changes, and caching the new static topological island into a Redis cluster;
and updating the current static topological island version number book mark.
Spark streaming is a streaming framework of Spark, supports data acquisition from multiple data sources, and has the characteristics of high throughput, distribution and high fault tolerance.
As an embodiment of the invention, a dynamic topological island of a power distribution network is calculated based on a static topological island, and the current electrical equipment operation state in all latest version static topological island models needs to be obtained during initialization and cached; the method comprises the steps that the sparkStreaming real-time consumption switch shifts, Graphx calculates static topological islands to which switches with state changes exist in each batch, meanwhile, a plurality of graph calculation threads are started to recalculate states of the static topological islands, topological color values are analyzed, and the topological color values are cached in a Redis cluster.
Referring to fig. 4, the details are as follows:
after the device in the static topological island acquires a remote signaling state from the Redis cluster, the static topological island is converted into a topological graph with a switch state through a Graphx conversion operator;
and on the basis of a Graphx connection component algorithm, increasing and judging a remote signaling value and a device type attribute of the power grid device, considering the edges of the graph as a connection state by remote signaling switching-on, considering the edges of the graph as a disconnection state by remote signaling switching-off, considering the edges of the graph as a disconnection state (a non-connection state) by the power supply and the single-node device, and performing Graphx connection component algorithm calculation again to obtain the dynamic topology island.
As an embodiment of the present invention, the dynamic topology coloring is performed based on the static topology islands and the dynamic topology islands, referring to fig. 4, which includes:
and determining the electrified, grounded and power failure states of the power grid equipment in the dynamic topological island according to the power supply state, and giving a specific color value to the dynamic topological island according to the power grid equipment state.
After dynamic topology calculation, a static topological island is divided into a plurality of dynamic topological islands; and if the dynamic topological island comprises a power supply point and the power supply point is electrified, the dynamic topological island is in an electrified state and is colored. The power grid equipment and the dynamic topological island are in an inclusion relationship, and the island coloring is realized by coloring more equipment in the island.
And the global topology coloring is used for constructing a topological graph on the basis of all the static topological islands and performing dynamic topological island and color calculation. Firstly, calculating dynamic topological islands according to an improved graph component algorithm, then traversing each dynamic topological island, determining the electrified state of each dynamic topological island (the equipment state in the same dynamic topological island is the same) according to whether the dynamic topological island contains a power supply and the power supply state, and then endowing the equipment in the dynamic topological islands with specific color values.
And (3) real-time topology coloring real-time consumption of the power distribution system switch displacement message in the Kafka message middleware, constructing a topological graph based on the static topological island to which the switch belongs, and performing dynamic topological island and color calculation.
The topology coloring adopts Spark stream calculation technology, multithreading submission graph calculation tasks are used, each thread processes 1 or more static topology islands, different threads use different Spark scheduling resource pools, fair competition calculation resources are used, and static topology island colors are calculated in parallel in a large batch.
Another embodiment of the present invention provides a power grid device topology coloring apparatus based on Spark flow graph merging, including:
the preprocessing module is used for preprocessing the power distribution network real-time library model to obtain original graph model data;
the graph module is used for constructing a power distribution network topological graph based on the original graph model data;
the first calculation module is used for calculating a static topological island of the power distribution network based on the topological graph of the power distribution network;
the second calculation module is used for calculating a dynamic topological island of the power distribution network based on the static topological island of the power distribution network;
and the number of the first and second groups,
and the coloring module is used for carrying out topology coloring based on the static topology island and the dynamic topology island of the power distribution network.
In the embodiment of the present invention, the preprocessing module is specifically configured to,
acquiring model data from a power distribution network real-time base; the model data comprises equipment table information and domain information related to the topology of the power distribution network;
according to the equipment table information, disassembling double-node equipment, multi-node equipment and single-node equipment into double-node equipment; the Terminal at the other end of the single-node equipment is completed with-1;
aggregating equipment terminals Terminal in all the equipment tables, and re-doing the Terminal as vertex data, wherein the vertex attribute defaults to 1;
aggregating all the devices in the device table as edge data, and using the device attributes as edge attributes;
the vertex data and edge data constitute the original graph model data.
In the embodiment of the present invention, the first calculating module is specifically configured to,
and running a connected component algorithm of Graphx on a topological graph of the power distribution network, wherein the edges of the single-node equipment are in a non-connected state, the edges of the multi-node equipment are in a connected state, and the interconnected equipment forms a connected region which is used as a static topological island of the power distribution network and is cached in the Redis cluster.
In the embodiment of the present invention, the second calculating module is specifically configured to,
the method comprises the steps that equipment in a static topological island obtains a remote signaling state from a Redis cluster, and the static topological island is converted into a topological graph with a switch state through a Graphx conversion operator;
and judging the device remote signaling value and the device type attribute in the topological graph, wherein the edges of the graph are in a connected state when the remote signaling is switched on, the edges of the graph are in a non-connected state when the remote signaling is switched off, and the power supply and the single-node device are in a non-connected state, and performing Graphx connected component algorithm calculation again to obtain the dynamic topological island of the power distribution network.
In the embodiment of the invention, the coloring module is specifically used for,
constructing a topological graph based on all the static topological islands, and calculating the dynamic topological islands of the power distribution network;
traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network; the power supply states comprise a live state, a grounding state and a power failure state;
and the number of the first and second groups,
consuming the power distribution system switch displacement information in the Kafka message middleware in real time, constructing a topological graph on the basis of a static topological island to which a switch belongs, and calculating a dynamic topological island of the power distribution network;
and traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network.
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.

Claims (14)

1. A power grid equipment topology coloring method based on Spark flow graph merging is characterized by comprising the following steps:
preprocessing a power distribution network real-time library model to obtain original graph model data;
constructing a power distribution network topological graph based on the original graph model data;
calculating a static topological island of the power distribution network based on the topological graph of the power distribution network;
calculating a dynamic topological island of the power distribution network based on the static topological island of the power distribution network;
and topology coloring is carried out based on the static topology island and the dynamic topology island of the power distribution network.
2. The Spark flow graph merging-based power grid equipment topology coloring method according to claim 1, wherein the preprocessing the real-time base model of the power distribution network to obtain original graph model data comprises:
acquiring model data from a power distribution network real-time base; the model data comprises equipment table information and domain information related to the topology of the power distribution network;
according to the equipment table information, disassembling double-node equipment, multi-node equipment and single-node equipment into double-node equipment; the Terminal at the other end of the single-node equipment is completed with-1;
aggregating equipment terminals Terminal in all the equipment tables, and re-doing the Terminal as vertex data, wherein the vertex attribute defaults to 1;
aggregating all the devices in the device table as edge data, and using the device attributes as edge attributes;
the vertex data and edge data constitute the original graph model data.
3. The method for coloring topology of power grid equipment based on Spark flow graph merging according to claim 2, wherein the constructing a topology graph of a power distribution network based on original graph model data comprises:
abstracting a device Terminal in original graph model data into a graph Vertex;
abstracting equipment in original graph model data into an Edge of a graph;
and constructing a distribution network topological graph by using a Graphx constructor and Vertex and Edge.
4. The method for coloring topology of power grid equipment based on Spark flow graph merging according to claim 1, wherein the calculating static topology islands of the power distribution network based on the topology graph of the power distribution network comprises:
and running a connected component algorithm of Graphx on a topological graph of the power distribution network, wherein the edges of the single-node equipment are in a non-connected state, the edges of the multi-node equipment are in a connected state, and the interconnected equipment forms a connected region which is used as a static topological island of the power distribution network and is cached in the Redis cluster.
5. The method for coloring topology of grid devices based on Spark flow graph merging according to claim 4, further comprising:
and calculating the static topological islands of the power distribution network at regular time, updating the version numbers of the static topological islands of the power distribution network, sequentially increasing the version numbers of the static topological islands of the power distribution network, caching the static topological islands of the power distribution network with the version number difference smaller than 3 in the Redis cluster, and regularly cleaning the static topological islands of the power distribution network with overdue versions.
6. The method for coloring topology of grid devices based on Spark flow graph merging according to claim 4, further comprising:
adopting spark streaming to consume the change message of the power distribution network system model in the Kafka message middleware Topic in real time;
and recalculating the static topological island of the power distribution network when the model of the power distribution network system is changed, updating the version number of the static topological island of the power distribution network and caching the version number into the Redis cluster.
7. The Spark flow graph merging-based power grid equipment topology coloring method according to claim 4, wherein the calculating a dynamic topology island of a power distribution network based on the static topology island of the power distribution network comprises:
the method comprises the steps that equipment in a static topological island obtains a remote signaling state from a Redis cluster, and the static topological island is converted into a topological graph with a switch state through a Graphx conversion operator;
and judging the device remote signaling value and the device type attribute in the topological graph, wherein the edges of the graph are in a connected state when the remote signaling is switched on, the edges of the graph are in a non-connected state when the remote signaling is switched off, and the power supply and the single-node device are in a non-connected state, and performing Graphx connected component algorithm calculation again to obtain the dynamic topological island of the power distribution network.
8. The Spark flow graph merging-based power grid equipment topology coloring method according to claim 7, wherein topology coloring is performed based on a power distribution network static topology island and a power distribution network dynamic topology island, and comprises global topology coloring and real-time topology coloring;
the global topology coloring includes:
constructing a topological graph based on all the static topological islands, and calculating the dynamic topological islands of the power distribution network;
traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network; the power supply states comprise a live state, a grounding state and a power failure state;
the real-time topology coloring comprises:
consuming the power distribution system switch displacement information in the Kafka message middleware in real time, constructing a topological graph on the basis of a static topological island to which a switch belongs, and calculating a dynamic topological island of the power distribution network;
and traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network.
9. The Spark flow graph merging-based power grid device topology coloring method according to claim 8, further comprising:
and performing topology coloring in parallel by adopting multiple threads, wherein each thread processes at least one static topology island.
10. Electric wire netting equipment topology coloring device based on Spark flow graph amalgamation, its characterized in that includes:
the preprocessing module is used for preprocessing the power distribution network real-time library model to obtain original graph model data;
the graph module is used for constructing a power distribution network topological graph based on the original graph model data;
the first calculation module is used for calculating a static topological island of the power distribution network based on the topological graph of the power distribution network;
the second calculation module is used for calculating a dynamic topological island of the power distribution network based on the static topological island of the power distribution network;
and the number of the first and second groups,
and the coloring module is used for carrying out topology coloring based on the static topology island and the dynamic topology island of the power distribution network.
11. The Spark flow graph merging-based power grid device topology coloring apparatus according to claim 10, wherein the preprocessing module is specifically configured to,
acquiring model data from a power distribution network real-time base; the model data comprises equipment table information and domain information related to the topology of the power distribution network;
according to the equipment table information, disassembling double-node equipment, multi-node equipment and single-node equipment into double-node equipment; the Terminal at the other end of the single-node equipment is completed with-1;
aggregating equipment terminals Terminal in all the equipment tables, and re-doing the Terminal as vertex data, wherein the vertex attribute defaults to 1;
aggregating all the devices in the device table as edge data, and using the device attributes as edge attributes;
the vertex data and edge data constitute the original graph model data.
12. The Spark flow graph merging-based power grid device topology coloring apparatus according to claim 10, wherein the first calculating module is specifically configured to,
and running a connected component algorithm of Graphx on a topological graph of the power distribution network, wherein the edges of the single-node equipment are in a non-connected state, the edges of the multi-node equipment are in a connected state, and the interconnected equipment forms a connected region which is used as a static topological island of the power distribution network and is cached in the Redis cluster.
13. The Spark flow graph merging-based power grid device topology coloring apparatus according to claim 12, wherein the second calculating module is specifically configured to,
the method comprises the steps that equipment in a static topological island obtains a remote signaling state from a Redis cluster, and the static topological island is converted into a topological graph with a switch state through a Graphx conversion operator;
and judging the device remote signaling value and the device type attribute in the topological graph, wherein the edges of the graph are in a connected state when the remote signaling is switched on, the edges of the graph are in a non-connected state when the remote signaling is switched off, and the power supply and the single-node device are in a non-connected state, and performing Graphx connected component algorithm calculation again to obtain the dynamic topological island of the power distribution network.
14. The Spark flow graph merging-based power grid device topology coloring apparatus according to claim 12, wherein the coloring module is specifically configured to,
constructing a topological graph based on all the static topological islands, and calculating the dynamic topological islands of the power distribution network;
traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network; the power supply states comprise a live state, a grounding state and a power failure state;
and the number of the first and second groups,
consuming the power distribution system switch displacement information in the Kafka message middleware in real time, constructing a topological graph on the basis of a static topological island to which a switch belongs, and calculating a dynamic topological island of the power distribution network;
and traversing the dynamic topological island of the power distribution network, and giving a specific color value to the dynamic topological island according to the power state in the dynamic topological island of the power distribution network.
CN202110591580.6A 2021-05-28 2021-05-28 Power grid equipment topology coloring method and device based on Spark flow diagram merging Active CN113435009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110591580.6A CN113435009B (en) 2021-05-28 2021-05-28 Power grid equipment topology coloring method and device based on Spark flow diagram merging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110591580.6A CN113435009B (en) 2021-05-28 2021-05-28 Power grid equipment topology coloring method and device based on Spark flow diagram merging

Publications (2)

Publication Number Publication Date
CN113435009A true CN113435009A (en) 2021-09-24
CN113435009B CN113435009B (en) 2023-06-16

Family

ID=77803127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110591580.6A Active CN113435009B (en) 2021-05-28 2021-05-28 Power grid equipment topology coloring method and device based on Spark flow diagram merging

Country Status (1)

Country Link
CN (1) CN113435009B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756897A (en) * 2023-08-17 2023-09-15 南京大全电气研究院有限公司 Automatic topology coloring method and device for power system and electronic equipment
CN117332541A (en) * 2023-11-14 2024-01-02 国网智能电网研究院有限公司 Method, device, equipment and medium for temporal management of power grid data based on graph calculation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339800A (en) * 2016-08-23 2017-01-18 济南大学 Method of quickly analyzing topology of large grid based on Graphx
CN111969601A (en) * 2020-08-13 2020-11-20 国网山东省电力公司 Power grid topology analysis method based on block ring network model

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339800A (en) * 2016-08-23 2017-01-18 济南大学 Method of quickly analyzing topology of large grid based on Graphx
CN111969601A (en) * 2020-08-13 2020-11-20 国网山东省电力公司 Power grid topology analysis method based on block ring network model

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756897A (en) * 2023-08-17 2023-09-15 南京大全电气研究院有限公司 Automatic topology coloring method and device for power system and electronic equipment
CN116756897B (en) * 2023-08-17 2023-10-20 南京大全电气研究院有限公司 Automatic topology coloring method and device for power system and electronic equipment
CN117332541A (en) * 2023-11-14 2024-01-02 国网智能电网研究院有限公司 Method, device, equipment and medium for temporal management of power grid data based on graph calculation

Also Published As

Publication number Publication date
CN113435009B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
CN105045970B (en) Analogue system and its implementation based on Unity dynamic generation three-dimensional scenic
CN105006017B (en) Three-dimensional scenic emulation mode is generated based on Unity dynamic techniques
CN1097246C (en) Method of initializing and updating network model
WO2018082364A1 (en) Method and device for analyzing power-off range of power distribution network, and computer storage medium
CN113435009A (en) Spark flow graph combination-based power grid equipment topology coloring method and device
CN108228724A (en) Power grid GIS topology analyzing method and storage medium based on chart database
CN107527112B (en) Method and equipment for determining shortest path between power equipment
CN103699960B (en) A kind of medium voltage distribution power grid operation state visualization method
CN107611962A (en) Network system branch road searching method, system and electronic equipment
JP2020527925A (en) Power distribution methods and electronic devices used in multi-machine parallel power electronic transformers
CN104967115A (en) Distributed cluster-type network topology coloring method for power system
CN111931318A (en) Power supply path analysis method and system based on graph calculation
CN111969601A (en) Power grid topology analysis method based on block ring network model
CN113704046A (en) Fault alarm processing method and device, equipment and storage medium
CN111984611A (en) Online automatic processing and sharing method for power grid information model and application end
CN111914376B (en) Automatic construction method and device for power grid bus mode diagram and storage medium
CN104573208A (en) GIS (Geographic Information System)-based distribution network wiring diagram mapping method
CN108111578A (en) The method of distribution terminal data acquisition platform access terminal equipment based on NIO
CN103593249B (en) A kind of HA method for early warning and virtual resource manager
CN109508354A (en) A kind of parallel processing system (PPS)
CN111643906B (en) Information processing method and device and computer readable storage medium
CN115000949A (en) Power distribution network modeling method, device, equipment and storage medium
CN109992497A (en) A kind of distribution power automation terminal standard testing use-case updates the method and system of publication
CN114358566A (en) Line loss management method and device based on topology rectification, storage medium and equipment
Wu et al. Distribution network topology modelling and automatic mapping based on CIM and GIS

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
GR01 Patent grant
GR01 Patent grant