CN113672775A - Parallel computing method for real-time graph of power grid - Google Patents

Parallel computing method for real-time graph of power grid Download PDF

Info

Publication number
CN113672775A
CN113672775A CN202110903298.7A CN202110903298A CN113672775A CN 113672775 A CN113672775 A CN 113672775A CN 202110903298 A CN202110903298 A CN 202110903298A CN 113672775 A CN113672775 A CN 113672775A
Authority
CN
China
Prior art keywords
power grid
directed graph
computing
formulas
parallel
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.)
Pending
Application number
CN202110903298.7A
Other languages
Chinese (zh)
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.)
China Southern Power Grid Digital Grid Technology Guangdong Co ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute 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 Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202110903298.7A priority Critical patent/CN113672775A/en
Publication of CN113672775A publication Critical patent/CN113672775A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The application relates to a parallel computing method for a real-time graph of a power grid. The method comprises the following steps: performing modular processing on the power system according to the topological relation of the power grid, and determining a power grid calculation formula corresponding to each module; constructing a target directed graph according to the incidence relation among the power grid calculation formulas; the nodes in the target directed graph correspond to the power grid calculation formulas, and the directed edges in the target directed graph correspond to the incidence relations between the power grid calculation formulas; and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas. By adopting the method, the calculation efficiency can be improved, and the real-time requirement of the power system can be met.

Description

Parallel computing method for real-time graph of power grid
Technical Field
The application relates to the technical field of computing, in particular to a power grid real-time graph parallel computing method.
Background
Formula calculation in the power grid is an important component of power grid monitoring, and provides data support for real-time monitoring and real-time alarming. With the rapid development of the power system, the structure is increasingly complex, the scale is increasingly enlarged, and therefore, the formulas in the power system are more and more.
At present, a serial formula calculation mode is adopted for power grid monitoring. However, the method cannot meet the real-time requirement of the power system, and for the frequently fluctuating power grid, the response speed of the real-time event is slow, and the missed judgment and the erroneous judgment of the power grid event and the error and the delay of monitoring and controlling all bring potential risks to the power system.
Disclosure of Invention
In view of the above, it is necessary to provide a power grid real-time graph parallel computing method capable of improving the computing speed and meeting the real-time requirement of the power system.
A power grid real-time graph parallel computing method comprises the following steps:
performing modular processing on the power system according to the topological relation of the power grid, and determining a power grid calculation formula corresponding to each module;
constructing a target directed graph according to the incidence relation among a plurality of power grid calculation formulas; nodes in the target directed graph correspond to the power grid calculation formulas, and directed edges in the target directed graph correspond to incidence relations between the power grid calculation formulas;
and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the constructing a target directed graph according to the association relationship among the multiple power grid calculation formulas includes:
initializing a plurality of power grid calculation formulas, and determining the incidence relation between every two power grid calculation formulas according to the initialization result;
constructing an initial directed graph according to incidence relations among a plurality of power grid calculation formulas;
and performing ring detection on the initial directed graph, and obtaining a target directed graph according to a detection result.
In one embodiment, initializing the multiple power grid calculation formulas, and determining an association relationship between every two power grid calculation formulas according to an initialization result includes:
assigning real-time data in each power grid calculation formula according to a preset database;
and determining the incidence relation between every two power grid calculation formulas according to the relation between the real-time data in the power system.
In one embodiment, the performing loop detection on the initial directed graph and obtaining the target directed graph according to the detection result includes:
detecting whether the initial directed graph has a loop by using a preset algorithm;
and if the initial directed graph has a ring, modifying the initial directed graph to obtain an acyclic target directed graph.
In one embodiment, the preset algorithm includes using a DFS algorithm with a depth parameter, and the detecting whether the initial directed graph has a loop by using the preset algorithm includes:
determining any node as an initial node, and searching adjacent points of each node from the initial node;
if the adjacent point is detected to be marked, determining that the initial directed graph has a ring;
if the adjacent point is detected to be unmarked, marking the adjacent point and continuing searching until all nodes with communication paths between the initial directed graph and the initial node are marked;
if the unmarked nodes still exist in the initial directed graph, any unmarked node is determined as a new initial node, and detection marking is carried out from the new initial node.
In one embodiment, the determining a parallel computation model according to the target directed graph, and performing parallel computation on the power grid computation formulas by using the parallel computation model to obtain computation results corresponding to the power grid computation formulas includes:
generating priorities corresponding to the power grid calculation formulas according to directed edges of the target directed graph;
grouping a plurality of power grid calculation formulas according to the priority and the nodes of the target directed graph to obtain a parallel calculation model;
distributing all the groups of the parallel computing model to a plurality of processors according to a preset strategy, and performing parallel computing on the power grid computing formulas by the plurality of processors to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the parallel computation of the grid computation formula by the multiple processors includes:
and performing parallel calculation on the power grid calculation formula by using a preset parallel forward-backward flow-replacing algorithm through a plurality of processors.
A grid real-time graph parallel computing apparatus, the apparatus comprising:
the formula determination module is used for performing modular processing on the power system according to the power grid topological relation and determining a power grid calculation formula corresponding to each module;
the directed graph construction module is used for constructing a target directed graph according to incidence relations among a plurality of power grid calculation formulas; nodes in the target directed graph correspond to the power grid calculation formulas, and directed edges in the target directed graph correspond to incidence relations between the power grid calculation formulas;
and the parallel computing module is used for determining a parallel computing model according to the target directed graph and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the directed graph building module includes:
the initialization submodule is used for initializing a plurality of power grid calculation formulas and determining the incidence relation between every two power grid calculation formulas according to the initialization result;
the construction submodule is used for constructing an initial directed graph according to incidence relations among a plurality of power grid calculation formulas;
and the ring detection submodule is used for carrying out ring detection on the initial directed graph and obtaining a target directed graph according to a detection result.
In one embodiment, the initialization submodule is specifically configured to assign values to real-time data in each power grid calculation formula according to a preset database; and determining the incidence relation between every two power grid calculation formulas according to the relation between the real-time data in the power system.
In one embodiment, the ring detection submodule is specifically configured to detect whether the initial directed graph has a ring by using a preset algorithm; and if the initial directed graph has a ring, modifying the initial directed graph to obtain an acyclic target directed graph.
In one embodiment, the preset algorithm includes using a DFS algorithm with a depth parameter, and the ring detection submodule is specifically configured to determine any node as a start node, and search for an adjacent point of each node from the start node; if the adjacent point is detected to be marked, determining that the initial directed graph has a ring; if the adjacent point is detected to be unmarked, marking the adjacent point and continuing searching until all nodes with communication paths between the initial directed graph and the initial node are marked; if the unmarked nodes still exist in the initial directed graph, any unmarked node is determined as a new initial node, and detection marking is carried out from the new initial node.
In one embodiment, the parallel computing module includes:
the priority generation submodule is used for generating the priority corresponding to each power grid calculation formula according to the directed edge of the target directed graph;
the grouping submodule is used for grouping the plurality of power grid calculation formulas according to the priority and the nodes of the target directed graph to obtain a parallel calculation model;
and the parallel computing submodule is used for distributing all the groups of the parallel computing model to the processors according to a preset strategy, and the processors perform parallel computing on the power grid computing formulas to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the parallel computation submodule is specifically configured to perform parallel computation on a power grid computation formula by using a preset parallel forward-backward flow algorithm through a plurality of processors.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
performing modular processing on the power system according to the topological relation of the power grid, and determining a power grid calculation formula corresponding to each module;
constructing a target directed graph according to the incidence relation among a plurality of power grid calculation formulas; nodes in the target directed graph correspond to the power grid calculation formulas, and directed edges in the target directed graph correspond to incidence relations between the power grid calculation formulas;
and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
performing modular processing on the power system according to the topological relation of the power grid, and determining a power grid calculation formula corresponding to each module;
constructing a target directed graph according to the incidence relation among a plurality of power grid calculation formulas; nodes in the target directed graph correspond to the power grid calculation formulas, and directed edges in the target directed graph correspond to incidence relations between the power grid calculation formulas;
and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
According to the power grid real-time graph parallel computing method, the power system is subjected to modular processing according to the power grid topological relation, and power grid computing formulas corresponding to the modules are determined; constructing a target directed graph according to the incidence relation among a plurality of power grid calculation formulas; and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas. According to the embodiment of the disclosure, the computer device adopts the parallel computing model to perform parallel computing on the power grid computing formula, and compared with the serial computing in the prior art, the computing time can be shortened, and the computing efficiency can be improved, so that the real-time requirement of the power system is met, and the problems of missed judgment and erroneous judgment of the power grid event, errors and delay of monitoring control and the like caused by the slow response speed of the real-time event are avoided.
Drawings
FIG. 1 is a diagram of an application environment of a parallel computing method for a real-time graph of a power grid in an embodiment;
FIG. 2 is a schematic flow chart of a parallel computing method for a real-time graph of a power grid in one embodiment;
FIG. 3 is a schematic flow chart diagram illustrating the steps for constructing a target directed graph in one embodiment;
FIG. 4 is a schematic flow chart diagram illustrating the parallel computing steps in one embodiment;
FIG. 5 is a block diagram of a parallel computing device for a real-time grid diagram according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The power grid real-time graph parallel computing method can be applied to the application environment shown in fig. 1. The application environment includes a data acquisition device 101 and a computer device 102. The data collection device 101 is used to collect real-time data of each power device in the power system, such as voltage, current, impedance, and power. The computer device 102 communicates with the data acquisition device 101 through a network, acquires real-time data of each power device from the data acquisition device 101, and performs parallel calculation on a power grid calculation formula according to the real-time data. The data acquisition device 101 may be, but is not limited to, various sensors and measuring devices; the computer device 102 may be a personal computer, a notebook computer, a tablet computer, and a server.
In one embodiment, as shown in fig. 2, a parallel computing method for a real-time graph of a power grid is provided, which is described by taking the method as an example applied to the computer device in fig. 1, and includes the following steps:
step 201, performing modular processing on the power system according to the power grid topological relation, and determining a power grid calculation formula corresponding to each module.
The computer equipment acquires the power grid topological relation of the power system in advance. For example, the obtained grid topology relationship includes: device a1 is connected to device a2, device a2 is also connected to devices a4, a 5; device B1 is connected to devices B2, B3, and device B2 is also connected to device B4.
Before the parallel computation of the real-time graph of the power grid is carried out, the modules of the power system are divided according to the topological relation of the power grid to obtain a plurality of modules, and then the power grid computing formulas corresponding to the modules are determined.
Optionally, the power system is divided into modules, and a multi-layer k-way division algorithm of METIS can be adopted.
Optionally, the plurality of modules obtained by module division may include: a plurality of sub-modules and a common connection module, wherein the plurality of sub-modules are all connected with the common connection module. Moreover, the number of connecting edges among the submodules is minimum, and the number of nodes in each submodule is equivalent. And the nodes in each sub-module correspond to the power grid calculation formulas one by one.
In one embodiment, if the common connection module does not exist after the module is divided, the division result is corrected. The correction mode can comprise the following steps: at least one node in a connecting edge spanning two sub-modules is determined to be a common connecting module. The correction mode is not limited in the embodiment of the disclosure, and can be set according to actual conditions.
Step 202, constructing a target directed graph according to the incidence relation among the power grid calculation formulas.
And the directed edges in the target directed graph correspond to the incidence relation between the power grid calculation formulas.
And after the power grid calculation formulas corresponding to the modules are determined, determining the incidence relation among the multiple power grid calculation formulas according to the relation between the parallel calculation sequence of the power grid real-time graph and the data.
For example, the same data is assigned in the grid calculation formula M1 and referred to in the grid calculation formula M2, and the grid calculation formula M2 can be calculated only by calculating the grid calculation formula M1 first, so that the grid calculation formula M2 is calculated after calculating the grid calculation formula M1 according to the association relationship between the grid calculation formula M1 and the grid calculation formula M2.
After the incidence relations among the power grid calculation formulas are determined, the power grid calculation formulas are determined as nodes, the incidence relations among the power grid calculation formulas are determined as directed edges, and all the directed edges are inserted into an adjacency table, so that a target directed graph representing the incidence relations among the power grid calculation formulas can be constructed. In practical application, the target directed graph may also be constructed in other manners, which is not limited in the embodiment of the present disclosure.
And 203, determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by using the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
After the computer device constructs the target directed graph, a power grid calculation formula which needs to be calculated sequentially and a power grid calculation formula which can be calculated in parallel can be determined according to the target directed graph, so that a parallel calculation model is determined. Then, the computer device may perform parallel computation on the multiple power grid computing formulas by using a parallel computing model to obtain computing results corresponding to the power grid computing formulas.
According to the power grid real-time graph parallel computing method, the power system is subjected to modular processing according to the power grid topological relation, and power grid computing formulas corresponding to the modules are determined; constructing a target directed graph according to the incidence relation among a plurality of power grid calculation formulas; and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas. According to the embodiment of the disclosure, the computer device adopts the parallel computing model to perform parallel computing on the power grid computing formula, and compared with the serial computing in the prior art, the computing time can be shortened, and the computing efficiency can be improved, so that the real-time requirement of the power system is met, and the problems of missed judgment and erroneous judgment of the power grid event, errors and delay of monitoring control and the like caused by the slow response speed of the real-time event are avoided.
In an embodiment, as shown in fig. 3, the step of constructing the target directed graph according to the association relationship between the grid computing formulas may include:
step 301, initializing a plurality of power grid calculation formulas, and determining an association relationship between every two power grid calculation formulas according to an initialization result.
The computer equipment can assign values to the real-time data in the calculation formulas of the power grids according to a preset database; and then, determining the incidence relation between every two power grid calculation formulas according to the relation between the real-time data in the power system.
For example, the grid computing formula M1 is assigned according to the preset database, and the grid computing formula M2 requires real-time data of one of the assignments to compute, so that the correlation between the grid computing formula M1 and the grid computing formula M2 may be determined as computing the grid computing formula M1 and then computing the grid computing formula M2.
And 302, constructing an initial directed graph according to the incidence relation among the power grid calculation formulas.
And the computer equipment determines the power grid calculation formulas as nodes and determines the incidence relation among the power grid calculation formulas as directed edges to construct an initial directed graph.
And 303, performing ring detection on the initial directed graph, and obtaining a target directed graph according to a detection result.
The computer equipment detects whether the initial directed graph has a loop by using a preset algorithm; and if the initial directed graph has a ring, modifying the initial directed graph to obtain an acyclic target directed graph.
In one embodiment, the preset algorithm includes using a DFS algorithm with a depth parameter, and the process of detecting whether the initial directed graph has a loop may include: determining any node as an initial node, and searching adjacent points of each node from the initial node; if the adjacent point is detected to be marked, determining that the initial directed graph has a ring; if the adjacent point is detected to be unmarked, marking the adjacent point and continuing searching until all nodes with communication paths between the initial directed graph and the initial node are marked; if the unmarked nodes still exist in the initial directed graph, any unmarked node is determined as a new initial node, and detection marking is carried out from the new initial node.
It is understood that if the directed graph has a loop, it may cause the computation to fall into a dead loop.
In the embodiment, a plurality of power grid calculation formulas are initialized, and the incidence relation between every two power grid calculation formulas is determined according to the initialization result; constructing an initial directed graph according to incidence relations among a plurality of power grid calculation formulas; and performing ring detection on the initial directed graph, and obtaining a target directed graph according to a detection result. By the aid of the method and the device, the target directed graph without the loop is constructed, a parallel computing model can be determined conveniently according to the target directed graph subsequently, and computing can be prevented from being trapped in endless loops.
In an embodiment, as shown in fig. 4, the step of determining a parallel computation model according to the target directed graph, and performing parallel computation on the grid computation formulas by using the parallel computation model to obtain computation results corresponding to the grid computation formulas may include:
and step 401, generating priorities corresponding to the grid computing formulas according to the directed edges of the target directed graph.
Because the directed edges in the target directed graph correspond to the incidence relations between the power grid calculation formulas, the calculation sequence among the power grid calculation formulas can be determined according to the directed edges of the target directed graph, and the priorities corresponding to the power grid calculation formulas can be generated according to the calculation sequence.
For example, it is determined according to the directed edge of the target directed graph that the grid computing formula M2 can be computed only if the grid computing formula M1 needs to be computed first, and when the priorities corresponding to the grid computing formula M1 and the grid computing formula M2 are generated, it may be determined that the priority corresponding to the grid computing formula M1 is higher than the priority corresponding to the grid computing formula M2.
And 402, grouping a plurality of power grid calculation formulas according to the priority and the nodes of the target directed graph to obtain a parallel calculation model.
After determining the priority corresponding to each grid calculation formula, the computer device may group the multiple grid calculation formulas according to the priority corresponding to each grid calculation formula and each grid calculation formula in the target directed graph, and form a parallel calculation model from the multiple groups obtained by the grouping.
For example, node O1 in the target directed graph is connected to node O2, node O2 is also connected to nodes O4, O5; node P1 is connected to nodes P2, P3, and node P2 is also connected to node P4, so nodes O1, O2, O4 and O5 are grouped into one group, and nodes P1, P2, P3 and P4 are grouped into another group.
Optionally, mutually-referenced power grid calculation formulas do not exist between each two groups, or the power grid calculation formulas with reference relations correspond to different priorities. The embodiment of the present disclosure does not limit the packet, and may be set according to actual situations.
And 403, distributing all the groups of the parallel computing model to a plurality of processors according to a preset strategy, and performing parallel computing on the power grid computing formulas by the plurality of processors to obtain computing results corresponding to the power grid computing formulas.
Wherein the predetermined policy is a measure of equalizing computational load of the plurality of processors.
After the parallel computing model is determined, the computer equipment allocates all groups in the parallel computing model to the processors according to a preset strategy, and the processors perform parallel computing on the power grid computing formulas to obtain computing results corresponding to the power grid computing formulas. The processors may be located in the same computer device or in different computer devices.
For example, group 1 is assigned to processor X1, group 2 is assigned to processor X2, group 3 is assigned to processor X3; alternatively, group 1, group 2 are assigned to processor X1, group 3 is assigned to processor X2, and group 4 is assigned to processor X3. The embodiment of the present disclosure does not limit the preset policy.
In one embodiment, the process of performing parallel computation of the grid computation formula by a plurality of processors may include: and performing parallel calculation on the power grid calculation formula by using a preset parallel forward-backward flow-replacing algorithm through a plurality of processors.
In practical application, the parallel forward-backward flow-replacing algorithm is used for calculating the power of each node in a target directed graph in the forward calculation process, wherein the power comprises active power and reactive power; in the reverse calculation process, the voltage of each node in the target directed graph is calculated, and the two calculation processes are interacted in a bidirectional mode until a convergence condition is reached. And if the difference between the current calculation result and the last calculation result is smaller than a preset difference threshold value in the calculation process, determining convergence and finishing the calculation. The embodiment of the present disclosure does not limit the preset difference threshold.
Other algorithms can also be used for parallel calculation of the power grid calculation formula, which is not limited in the embodiment of the disclosure.
In the embodiment, the priority corresponding to each power grid calculation formula is generated according to the directed edge of the target directed graph; grouping a plurality of power grid calculation formulas according to the priority and the nodes of the target directed graph to obtain a parallel calculation model; distributing all the groups of the parallel computing model to a plurality of processors according to a preset strategy, and performing parallel computing on the power grid computing formulas by the plurality of processors to obtain computing results corresponding to the power grid computing formulas. According to the embodiment of the disclosure, the parallel computing model is obtained according to the target directed graph, and then the groups in the parallel computing model are distributed to different processors for parallel computing.
It should be understood that, although the steps in the flowcharts of fig. 2 to 4 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 to 5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 5, there is provided a grid real-time graph parallel computing apparatus, including:
the formula determining module 501 is configured to perform modular processing on the power system according to the power grid topological relation, and determine a power grid calculation formula corresponding to each module;
the directed graph building module 502 is configured to build a target directed graph according to incidence relations among a plurality of power grid computing formulas; nodes in the target directed graph correspond to the power grid calculation formulas, and directed edges in the target directed graph correspond to incidence relations between the power grid calculation formulas;
the parallel computing module 503 is configured to determine a parallel computing model according to the target directed graph, and perform parallel computing on the power grid computing formulas by using the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the directed graph construction module 502 includes:
the initialization submodule is used for initializing a plurality of power grid calculation formulas and determining the incidence relation between every two power grid calculation formulas according to the initialization result;
the construction submodule is used for constructing an initial directed graph according to incidence relations among a plurality of power grid calculation formulas;
and the ring detection submodule is used for carrying out ring detection on the initial directed graph and obtaining a target directed graph according to a detection result.
In one embodiment, the initialization submodule is specifically configured to assign values to real-time data in each power grid calculation formula according to a preset database; and determining the incidence relation between every two power grid calculation formulas according to the relation between the real-time data in the power system.
In one embodiment, the ring detection submodule is specifically configured to detect whether the initial directed graph has a ring by using a preset algorithm; and if the initial directed graph has a ring, modifying the initial directed graph to obtain an acyclic target directed graph.
In one embodiment, the preset algorithm includes using a DFS algorithm with a depth parameter, and the ring detection submodule is specifically configured to determine any node as a start node, and search for an adjacent point of each node from the start node; if the adjacent point is detected to be marked, determining that the initial directed graph has a ring; if the adjacent point is detected to be unmarked, marking the adjacent point and continuing searching until all nodes with communication paths between the initial directed graph and the initial node are marked; if the unmarked nodes still exist in the initial directed graph, any unmarked node is determined as a new initial node, and detection marking is carried out from the new initial node.
In one embodiment, the parallel computing module 503 includes:
the priority generation submodule is used for generating the priority corresponding to each power grid calculation formula according to the directed edge of the target directed graph;
the grouping submodule is used for grouping the plurality of power grid calculation formulas according to the priority and the nodes of the target directed graph to obtain a parallel calculation model;
and the parallel computing submodule is used for distributing all the groups of the parallel computing model to the processors according to a preset strategy, and the processors perform parallel computing on the power grid computing formulas to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the parallel computation submodule is specifically configured to perform parallel computation on a power grid computation formula by using a preset parallel forward-backward flow algorithm through a plurality of processors.
For specific limitations of the power grid real-time graph parallel computing device, reference may be made to the above limitations of the power grid real-time graph parallel computing method, which is not described herein again. All or part of the modules in the power grid real-time graph parallel computing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing the parallel computing data of the real-time graph of the power grid. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a grid real-time graph parallel computing method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
performing modular processing on the power system according to the topological relation of the power grid, and determining a power grid calculation formula corresponding to each module;
constructing a target directed graph according to the incidence relation among a plurality of power grid calculation formulas; nodes in the target directed graph correspond to the power grid calculation formulas, and directed edges in the target directed graph correspond to incidence relations between the power grid calculation formulas;
and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
initializing a plurality of power grid calculation formulas, and determining the incidence relation between every two power grid calculation formulas according to the initialization result;
constructing an initial directed graph according to incidence relations among a plurality of power grid calculation formulas;
and performing ring detection on the initial directed graph, and obtaining a target directed graph according to a detection result.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
assigning values according to real-time data in each power grid calculation formula of a preset database;
and determining the incidence relation between every two power grid calculation formulas according to the relation between the real-time data in the power system.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
detecting whether the initial directed graph has a loop by using a preset algorithm;
and if the initial directed graph has a ring, modifying the initial directed graph to obtain an acyclic target directed graph.
In one embodiment, the preset algorithm comprises using a DFS algorithm with a depth parameter, and the processor when executing the computer program further performs the steps of:
determining any node as an initial node, and searching adjacent points of each node from the initial node;
if the adjacent point is detected to be marked, determining that the initial directed graph has a ring;
if the adjacent point is detected to be unmarked, marking the adjacent point and continuing searching until all nodes with communication paths between the initial directed graph and the initial node are marked;
if the unmarked nodes still exist in the initial directed graph, any unmarked node is determined as a new initial node, and detection marking is carried out from the new initial node.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
generating priorities corresponding to the power grid calculation formulas according to directed edges of the target directed graph;
grouping a plurality of power grid calculation formulas according to the priority and the nodes of the target directed graph to obtain a parallel calculation model;
distributing all the groups of the parallel computing model to a plurality of processors according to a preset strategy, and performing parallel computing on the power grid computing formulas by the plurality of processors to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and performing parallel calculation on the power grid calculation formula by using a preset parallel forward-backward flow-replacing algorithm through a plurality of processors.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
performing modular processing on the power system according to the topological relation of the power grid, and determining a power grid calculation formula corresponding to each module;
constructing a target directed graph according to the incidence relation among a plurality of power grid calculation formulas; nodes in the target directed graph correspond to the power grid calculation formulas, and directed edges in the target directed graph correspond to incidence relations between the power grid calculation formulas;
and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the computer program when executed by the processor further performs the steps of:
initializing a plurality of power grid calculation formulas, and determining the incidence relation between every two power grid calculation formulas according to the initialization result;
constructing an initial directed graph according to incidence relations among a plurality of power grid calculation formulas;
and performing ring detection on the initial directed graph, and obtaining a target directed graph according to a detection result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
assigning real-time data in each power grid calculation formula according to a preset database;
and determining the incidence relation between every two power grid calculation formulas according to the relation between the real-time data in the power system.
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting whether the initial directed graph has a loop by using a preset algorithm;
and if the initial directed graph has a ring, modifying the initial directed graph to obtain an acyclic target directed graph.
In one embodiment, the preset algorithm comprises using a DFS algorithm with a depth parameter, the computer program when executed by the processor further realizing the steps of:
determining any node as an initial node, and searching adjacent points of each node from the initial node;
if the adjacent point is detected to be marked, determining that the initial directed graph has a ring;
if the adjacent point is detected to be unmarked, marking the adjacent point and continuing searching until all nodes with communication paths between the initial directed graph and the initial node are marked;
if the unmarked nodes still exist in the initial directed graph, any unmarked node is determined as a new initial node, and detection marking is carried out from the new initial node.
In one embodiment, the computer program when executed by the processor further performs the steps of:
generating priorities corresponding to the power grid calculation formulas according to directed edges of the target directed graph;
grouping a plurality of power grid calculation formulas according to the priority and the nodes of the target directed graph to obtain a parallel calculation model;
distributing all the groups of the parallel computing model to a plurality of processors according to a preset strategy, and performing parallel computing on the power grid computing formulas by the plurality of processors to obtain computing results corresponding to the power grid computing formulas.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and performing parallel calculation on the power grid calculation formula by using a preset parallel forward-backward flow-replacing algorithm through a plurality of processors.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A power grid real-time graph parallel computing method is characterized by comprising the following steps:
performing modular processing on the power system according to the topological relation of the power grid, and determining a power grid calculation formula corresponding to each module;
constructing a target directed graph according to the incidence relation among the power grid calculation formulas; the nodes in the target directed graph correspond to the power grid calculation formulas, and the directed edges in the target directed graph correspond to the incidence relations between the power grid calculation formulas;
and determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
2. The method according to claim 1, wherein the constructing a target directed graph according to the incidence relation among the plurality of grid computing formulas comprises:
initializing a plurality of power grid calculation formulas, and determining the incidence relation between every two power grid calculation formulas according to the initialization result;
constructing an initial directed graph according to incidence relations among a plurality of power grid calculation formulas;
and performing ring detection on the initial directed graph, and obtaining the target directed graph according to a detection result.
3. The method according to claim 2, wherein initializing the plurality of grid computing formulas and determining the association relationship between every two grid computing formulas according to the initialization result comprises:
assigning real-time data in each power grid calculation formula according to a preset database;
and determining the incidence relation between every two power grid calculation formulas according to the relation between the real-time data in the power system.
4. The method according to claim 2, wherein the performing loop detection on the initial directed graph and obtaining the target directed graph according to a detection result comprises:
detecting whether the initial directed graph has a loop or not by using a preset algorithm;
and if the initial directed graph has a ring, modifying the initial directed graph to obtain the target directed graph without the ring.
5. The method according to claim 4, wherein the preset algorithm comprises using a DFS algorithm with a depth parameter, and the detecting whether the initial directed graph has a loop by using the preset algorithm comprises:
determining any node as an initial node, and searching adjacent points of each node from the initial node;
if the adjacent point is detected to be marked, determining that the initial directed graph has a ring;
if the adjacent point is detected to be unmarked, marking the adjacent point and continuing searching until all nodes with communication paths between the initial directed graph and the initial node are marked;
if the unmarked nodes still exist in the initial directed graph, determining any unmarked node as a new initial node, and starting to detect and mark from the new initial node.
6. The method according to claim 1, wherein the determining a parallel computation model according to the target directed graph, and performing parallel computation of the power grid computation formulas by using the parallel computation model to obtain computation results corresponding to each of the power grid computation formulas comprises:
generating priorities corresponding to the power grid calculation formulas according to the directed edges of the target directed graph;
grouping a plurality of power grid computing formulas according to the priorities and the nodes of the target directed graph to obtain the parallel computing model;
distributing all the groups of the parallel computing model to a plurality of processors according to a preset strategy, and performing parallel computing on the power grid computing formulas by the processors to obtain computing results corresponding to the power grid computing formulas.
7. The method of claim 6, wherein the parallel computation of the grid computation formula by the plurality of processors comprises:
and performing parallel calculation on the power grid calculation formula by the plurality of processors by using a preset parallel forward-backward flow-replacing algorithm.
8. An apparatus for parallel computation of a real-time graph of a power grid, the apparatus comprising:
the formula determination module is used for performing modular processing on the power system according to the power grid topological relation and determining a power grid calculation formula corresponding to each module;
the directed graph construction module is used for constructing a target directed graph according to incidence relations among a plurality of power grid calculation formulas; the nodes in the target directed graph correspond to the power grid calculation formulas, and the directed edges in the target directed graph correspond to the incidence relations between the power grid calculation formulas;
and the parallel computing module is used for determining a parallel computing model according to the target directed graph, and performing parallel computing on the power grid computing formulas by adopting the parallel computing model to obtain computing results corresponding to the power grid computing formulas.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110903298.7A 2021-08-06 2021-08-06 Parallel computing method for real-time graph of power grid Pending CN113672775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110903298.7A CN113672775A (en) 2021-08-06 2021-08-06 Parallel computing method for real-time graph of power grid

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110903298.7A CN113672775A (en) 2021-08-06 2021-08-06 Parallel computing method for real-time graph of power grid

Publications (1)

Publication Number Publication Date
CN113672775A true CN113672775A (en) 2021-11-19

Family

ID=78541769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110903298.7A Pending CN113672775A (en) 2021-08-06 2021-08-06 Parallel computing method for real-time graph of power grid

Country Status (1)

Country Link
CN (1) CN113672775A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116167289A (en) * 2023-04-26 2023-05-26 南方电网数字电网研究院有限公司 Power grid operation scene generation method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156782A (en) * 2011-04-14 2011-08-17 国电南瑞科技股份有限公司 Graph theory-based formula parallel calculation management method for electric power system
CN108879691A (en) * 2018-06-21 2018-11-23 清华大学 A kind of method and device that extensive continuous tide calculates
CN110222372A (en) * 2019-05-08 2019-09-10 中国水利水电科学研究院 A kind of Flow of River water quality real-time predicting method and device based on data assimilation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156782A (en) * 2011-04-14 2011-08-17 国电南瑞科技股份有限公司 Graph theory-based formula parallel calculation management method for electric power system
CN108879691A (en) * 2018-06-21 2018-11-23 清华大学 A kind of method and device that extensive continuous tide calculates
CN110222372A (en) * 2019-05-08 2019-09-10 中国水利水电科学研究院 A kind of Flow of River water quality real-time predicting method and device based on data assimilation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
高原 等: "基于图论的电力系统公式并行计算实现方法", 科技创新与生产力, no. 06, pages 77 - 81 *
高原 等: "基于集群的电力系统公式分布式计算方法", 江苏科技信息, no. 25, pages 55 - 58 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116167289A (en) * 2023-04-26 2023-05-26 南方电网数字电网研究院有限公司 Power grid operation scene generation method and device, computer equipment and storage medium
CN116167289B (en) * 2023-04-26 2023-09-15 南方电网数字电网研究院有限公司 Power grid operation scene generation method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108228442B (en) Abnormal node detection method and device
KR101680481B1 (en) Indoor network map matching system and indoor network map matching method
CN110380903B (en) Power communication network fault detection method, device and equipment
CN113672775A (en) Parallel computing method for real-time graph of power grid
CN112769869A (en) SDN network security prediction method based on Bayesian attack graph and corresponding system
CN113282805A (en) IPv6 address pattern mining method and device, electronic equipment and storage medium
Shahraki et al. An outlier detection method to improve gathered datasets for network behavior analysis in IoT
CN106155985A (en) A kind of shortage of data fill method based on adjacent data feature
CN101237357B (en) Online failure detection method for industrial wireless sensor network
CN106682514B (en) System calling sequence feature pattern set generation method based on subgraph mining
CN117237678B (en) Method, device, equipment and storage medium for detecting abnormal electricity utilization behavior
CN114281256A (en) Data synchronization method, device, equipment and medium based on distributed storage system
CN113094899A (en) Random power flow calculation method and device, electronic equipment and storage medium
CN114827929A (en) Multi-sensor network collaborative deployment method and device based on improved particle swarm optimization
CN113992541A (en) Network flow measuring method, system, computer equipment, storage medium and application
CN112797976A (en) Positioning detection method and device, computer equipment and readable storage medium
CN109561498B (en) Sensor node distributed positioning method based on improved Newton method
CN116794510A (en) Fault prediction method, device, computer equipment and storage medium
CN108133234B (en) Sparse subset selection algorithm-based community detection method, device and equipment
CN111614318B (en) Method and device for detecting direct-current side current fault of photovoltaic system
CN115933597A (en) Parameter setting method and system of control system and computer equipment
CN110035405A (en) A kind of efficient fusion method of Multisensor Distributed based on random set theory
Gu et al. Improving throughput and reliability of distributed scientific workflows for streaming data processing
Bouchoucha et al. Finding link topology of large scale networks from anchored hop count reports
JP2014025915A (en) Method and apparatus for occupation detection

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230423

Address after: Full Floor 14, Unit 3, Building 2, No. 11, Middle Spectra Road, Huangpu District, Guangzhou, Guangdong 510700

Applicant after: China Southern Power Grid Digital Grid Technology (Guangdong) Co.,Ltd.

Address before: Room 86, room 406, No.1, Yichuang street, Zhongxin Guangzhou Knowledge City, Huangpu District, Guangzhou City, Guangdong Province

Applicant before: Southern Power Grid Digital Grid Research Institute Co.,Ltd.