Summary of the invention
It is an object of the invention to overcome the deficiencies of the prior art and provide a kind of power grid forecast failure based on exchange files
Parallel parsing calculation method improves the on-line analysis calculating speed of static security analysis function.
The present invention solves its realistic problem and adopts the following technical solutions to achieve:
A kind of electric network fault parallel parsing calculation method based on exchange files, comprising the following steps:
Step 1, before calculating, establish task list, computing resource table, establish system failure collection;According to participation computing resource
Server establishes computing resource information, calculating task information;
Step 2 runs total task schedule process in task scheduling server, transports in every wheel static security analysis function
When the row period arrives, increases new power grid static security analysis in task list and calculate general assignment, and according to static security analysis
The general assignment that calculates of forecast failure resolve into the specific parallel computation task of each computing resource, be written to computing resource table
In, and prepare to calculate data;
Step 3, on computing resource server, computing resource finger daemon is each according to what is updated in concurrent computation resource table
The task of computing resource distributes state, starts corresponding computing resource calculation procedure;
Step 4, in task scheduling server, wait next static security analysis calculating cycle arrive when, return is held
Row step 2.
Moreover, the specific steps of the step 1 include:
(1-1) establishes task list, comprising: task name, task type, task start personnel, task calculating module, task meter
Calculate function, task time-out time, task computation family, task current state, task status variation markers, the task start time,
Task completion time, task complete ratio, task current operational information;
(1-2) establishes computing resource table, comprising: resource name, Resource Server title, resource module title, resource module
Whether function title puts into operation, Resource Calculation module process, Resource Calculation task status, the resource same day frequency of failure, wherein
" Resource Calculation task status " can be with are as follows: " free time ", " publication is completed ", " calculate and complete ", " calculating failure ", "abnormal";
(1-3) establishes the record of computing resource table, is denoted as set R=according to the number of servers n for participating in parallel computation
{ Ri, i=1 ..., n }, n are the number of servers using technology of configuration, that is, concurrent computation resource quantity;And to each
The resource tasks state of computing resource REi is initially set to " free time ";
(1-4) establishes electric network fault set according to grid condition, is denoted as NF={ NFx, x=1 ..., n2 }, and n2 is maximum
Number of faults;
Moreover, the specific steps of the step 2 include:
(2-1) firstly generates the model file Fz of electric network swim calculating, and file includes the connection relationship of each branch in power grid
And the trend of each node injects data, model file is stored using compress mode;
(2-2) scanography computing resource table finds the resource that all resource tasks states are set to " free time ", is recorded as
Set RE={ REi, i=1 ..., n1 }, total quantity n1;
(2-3) automatically generates n2 calculating subtask: TF={ TFj, j=1 ..., n2 } according to electric network fault set NF,
Distribution method is according to equalitarian distribution method, each calculating number of faults for calculating subtask and undertaking are as follows: n3=n2/n1+1;n3
The calculating number of faults undertaken for each calculating subtask;To generate each assignment file TFile for calculating subtask, it is denoted as
Include interior n3 failure in TFF={ TFFj, j=1 ..., n2 }, each file TFFj, is denoted as TFFj-k, k=1 ..., n3, text
Part uses the text file of E language description, includes resource state information and forecast failure collection information;
(2-4) carries out task distribution to each calculating subtask TFj in set TF;
(2-5) scanography computing resource table R judges the resource tasks state of each resource Ri in table;
Moreover, the specific steps of step 2 (2-3) step include:
(2-3-1) generates the resource state information in TFFj file, class name calsc_info, and the following table of attribute is retouched
It states;Each subtask corresponds to data line in data block calsc_info;
(2-3-2) generates the forecast failure information class name flt_info in TFFj file, the following table description of attribute;Each
Forecast failure TFFj-k corresponds to data line in data block flt_info;
Moreover, the specific steps of (2-4) step of the step 2 include:
(2-4-1) scanography computing resource table R finds the resource that some resource tasks state is set to " free time ", record
For Ri;
Subtask TFj is distributed to computing resource Ri by (2-4-2), and method is: sending tide to the server of computing resource Ri
Flow calculation model file Fz, calculation document TFFj, the resource tasks state of juxtaposition computing resource Ri are set to " publication is completed ";
Moreover, the specific steps of (2-5) step of the step 2 include:
(2-5-1) returns resource Ri calculated result file FRsti if resource tasks state is " calculate and complete "
It receives, i.e., destination file FRsti is transferred in task scheduling server, and the content in each destination file is shown man-machine
On interface;After the completion of destination file FRsti recycling, the resource tasks state for being placed in resource Ri is set to " free time ";
(2-5-2) holds the subtask TFj for distributing to the resource if resource tasks state is " calculating failure " again
(2-4) step of row step 2 carries out calculating task and redistributes;The calculating frequency of failure m on the resource Ri same day is carried out simultaneously tired
Add, when m is less than specified frequency of failure threshold value N, the calculating task state for setting resource Ri is " free time ";When m is more than or equal to N
When, the calculating task state for setting resource Ri is "abnormal", and resource Ri is no longer participate in the same day subsequent calculating task;
Moreover, the specific steps of the step 3 include:
(3-1) in computing resource table, the resource tasks state of the corresponding resource record Ri of current server is sentenced
Disconnected, if the calculating task state of resource is " publication is completed ", startup separator analytical calculation process is calculated, and is walked after execution
Rapid 3 (3-2) step;Otherwise any step is not executed;
(3-2) reads in the model file Fz that newest received electric network swim calculates, and forms power grid computation model;
(3-3) reads in newest received assignment file TFFj, to wherein each failure TFFj-k, executes following steps:
The branch or node failure is arranged in (3-3-1) simulation in electric network model;
(3-3-2) carries out electric network swim calculating, if calculated successfully, executes step (3-3-3), if calculating failure, directly
It meets (3-6) for executing step 3 and terminates calculating;
The out-of-limit situation of branch, node of (3-3-3) according to power grid after calculation of tidal current statistic record failure, forms and calculates
As a result TFFRsti is stored into calculator memory table;
(3-3-4) restores the branch of fault setting and node state is original state;
(3-3-5) return step 3-3-1) until the completion of whole calculation of fault;
After the completion of (3-4) whole calculation of fault, calculated result is generated, the calculated result file of current computing resource Ri is written
In FRsti;
The failure that (3-4-1) generates in calculated result file Frsti causes the more limit information, class name of voltage: falt_v_
Rst, it is as follows comprising attribute information;Each failure causes one of the out-of-limit corresponding falt_v_rst data block of voltage to record;
The failure that (3-4-2) generates in calculated result file Frsti causes the more limit information of branch, class name: falt_q_
Rst, it is as follows comprising attribute information;Each failure causes one of the out-of-limit corresponding falt_q_rst data block of branch to record;
The resource tasks state of the corresponding computing resource Ri of current server is set to " calculate and complete " by (3-5), and is returned
(3-1) of step 3;
It is by the write-in computing resource Ri task status of the corresponding computing resource Ri of current server after (3-6) calculating failure
" calculating failure ", and (3-1) of return step 3.
The advantages of the present invention:
1, a kind of electric network fault parallel parsing calculation method based on exchange files of the invention, parallel computation environment system
It is divided into " man-machine interface ", " task management ", " computing resource " three level compositions.Man-machine interface be responsible for configure computing resource table,
Task list data;" task management " operates on primary server, and " computing resource " can be multiple servers, on every server
" accident analysis " computing function is installed, parallel computation may be implemented in multiple servers.Task management layer and computing resource layer pass through
File transmits interaction data, while task management layer also can receive the message of man-machine interface transmission, responds human-computer interaction.It is right
" accident analysis " module drives calculating task with the task list of network share, using input, output file as data interaction Jie
Matter.This method can shorten " accident analysis " and calculate total duration, and the on-line analysis for improving static security analysis function calculates speed
Degree.
2, the present invention in task scheduling server memory by defining task list, computing resource table, by defining E file
As the data interaction medium of input and output, task scheduling server is unified to be allocated and issues to task, while more meters
Resource Server parallel computation is calculated, greatly shortens and calculates the time;The on-line analysis for improving static security analysis function calculates
Speed meets minute grade calculating demand;And then improve the stabilization of power grid.
Specific embodiment
The embodiment of the present invention is described in further detail below in conjunction with attached drawing:
Electric power system data markup language --- E linguistic norm (hereinafter referred to as " E language ") is in IEC61970-301 electricity
On the basis of the object-oriented of Force system common data model CIM (Common Information Model) is abstract, exist for CIM
The new and effective electric power system data markup language of prepared one kind of efficiency defect when being described in a manner of XML.E language
Data file includes annotation (optional), system statement, data block start mark, data block head definition, data block, end of data block
The parts such as label.It is generally divided into class name definition, attribute definition etc.;State Grid Corporation of China's company standard " Q-GDW-215-2008 electricity
Force system data markup language --- E linguistic norm " the specified in more detail describing mode of E language, specific format be defined as follows:
1) it annotates
Annotation is the optional part of E language, is started by double slashes " // " guidance.Annotation may alternatively appear in appointing for data file
Meaning place, both can independent a line, the rear portion for also allowing to be expert at.
2) system is stated
E language system statement be located at data block front end, by left angle brackets add exclamation side by side " <!" guidance start, by exclamation
Add right angle bracket side by side "!> " label terminate.Illustrate the application system title, the E language version of use that generate data in system statement
Originally, character set and versions of data.Particular content in label is as follows:
A) System=application system title.Refer to the application system title for generating notebook data.
B) Version=E language version.Refer to E language version used by encapsulation notebook data.Due to the hair of E language itself
Exhibition, syntax rule
It may change with symbol, this version information can be used for the difference of procedure identification language itself.
C) Code=character set title.Refer to character set used in this document.
D) Data=versions of data.Refer to version locating for notebook data.Since application demand changes, its envelope of the data of same classification
Assembling structure may will do it local expansion, modification or simplification, this version information can be used for the subtle of procedure identification data itself
Difference.
Divided between above each section with space, and can be extended according to system situation.The following are a system sound
Bright practical sample: <!System=SYS Version=1.0 Code=UTF-8 Data=1.0!>
3) data block starting and ending
The starting of E language data block angle brackets "<class name>" or "<class name:: physical name>" indicate that end of data block is used
In angle brackets plus monocline thick stick "</class name >" or "</class name ::entity name >" indicate." class name:: physical name " in, the former number
According to the class of data in block object, the latter indicates the ownership object of data data in block.
4) data block head defines
Data block head definition with address character " " mark, for showing the basic structure of data: i.e. horizontal tabular form, single-column type or
Multi-column type.The specific label that data block head defines is as follows: single-address, which accords with "@", indicates that the basic structure of data is horizontal tabular form, language
Method are as follows: 1 attribute-name of@serial number attribute-name, 2 attribute-name 3 ... "@", serial number are divided using space between each attribute-name, and serial number also can be used
Data ID indicates (similarly hereinafter), and single-column type is similar with processing mode of the multi-column type structure for serial number.The data block of horizontal tabular form structure
In each object accounts for a line, each attribute accounts for a column, be suitable for table class data or attribute is less and object is more data.
5) data block
Data block is made of multiple data lines, and each data line is guided by pound sign " # ".Between each data value in data line
Divided by space.It is corresponded according to capable expression way and data block head definition.The first row of data block is always in " # " heel
One or more spaces, behind space plus serial number, such as " #10 ", making serial number individually becomes a column.The serial number indicates current row data at this
Sequence in data block, is numbered with 1.Serial number is followed by starting data value sequence behind a space.
Text interaction in the present invention is all using E language description, and what definition data block used is all horizontal tabular form, i.e., often
A class is all a table, has different attributes in each table.
A kind of electric network fault parallel parsing calculation method based on exchange files, comprising the following steps:
Step 1, before calculating, establish task list, computing resource table, establish system failure collection;Task list, computing resource table
It establishes in the memory of server, other Resource Servers can be by network interface access task list and computing resource table
Data;Computing resource information, calculating task information are established according to computing resource server is participated in;
The specific steps of the step 1 include:
(1-1) establishes task list (DEF_TASK), includes: task name, is appointed at task type (automatic to calculate, artificial to calculate)
Be engaged in starting personnel, task calculating module, task computation function, task time-out time, task computation family, task current state,
Task status changes markers, task start time, task completion time, task completion ratio, task current operational information;
(1-2) establishes computing resource table (DEF_CALSC), comprising: resource name, Resource Server title, resource module name
Claim, resource module function title, whether put into operation, Resource Calculation module process, Resource Calculation task status, the mistake of the resource same day
Number is lost, wherein " Resource Calculation task status " can be with are as follows: " free time ", " publication is completed ", " calculate and complete ", " calculating failure ",
"abnormal";
(1-3) establishes the record of computing resource table, is denoted as set R=according to the number of servers n for participating in parallel computation
{ Ri, i=1 ..., n }, n are the number of servers using technology of configuration, that is, concurrent computation resource quantity;And to each
The resource tasks state of computing resource REi is initially set to " free time ";
(1-4) establishes electric network fault set according to grid condition, is denoted as NF={ NFx, x=1 ..., n2 }, and n2 is maximum
Number of faults;
Step 2 runs total task schedule process in task scheduling server, transports in every wheel static security analysis function
When the row period arrives, increases new power grid static security analysis in task list and calculate general assignment, and according to static security analysis
The general assignment that calculates of forecast failure resolve into the specific parallel computation task of each computing resource, be written to computing resource table
In, and prepare to calculate data;
As shown in Figure 1, the specific steps of the step 2 include:
(2-1) firstly generates the model file Fz of electric network swim calculating, and file includes the connection relationship of each branch in power grid
And the trend of each node injects data, model file is stored using compress mode;
(2-2) scanography computing resource table finds the resource that all resource tasks states are set to " free time ", is recorded as
Set RE={ REi, i=1 ..., n1 }, total quantity n1;
(2-3) automatically generates n2 calculating subtask: TF={ TFj, j=1 ..., n2 } according to electric network fault set NF,
Distribution method is according to equalitarian distribution method, each calculating number of faults for calculating subtask and undertaking are as follows: n3=n2/n1+1;n3
The calculating number of faults undertaken for each calculating subtask;To generate each assignment file TFile for calculating subtask, it is denoted as
Include interior n3 failure in TFF={ TFFj, j=1 ..., n2 }, each file TFFj, is denoted as TFFj-k, k=1 ..., n3, text
Part uses the text file of E language description, includes resource state information and forecast failure collection information;
The specific steps of step 2 (2-3) step include:
(2-3-1) generates the resource state information in TFFj file, class name (calsc_info), and the following table of attribute is retouched
It states;Each subtask corresponds to data line in data block calsc_info;
Serial number |
Attribute |
Data type |
Explanation |
1 |
Resource module title |
Character string |
|
2 |
Resource status |
Shaping |
|
3 |
Current calculating task ID |
Long shaping |
|
4 |
Current calculating task function |
Character string |
|
5 |
Current calculating task starts the time |
Shaping |
|
6 |
The current calculating task end time |
Shaping |
|
7 |
Current calculating task completes ratio |
Floating type |
|
(2-3-2) generates the forecast failure information class name (flt_info) in TFFj file, the following table description of attribute;Often
A forecast failure TFFj-k corresponds to data line in data block flt_info;
(2-4) carries out task distribution to each calculating subtask TFj in set TF;
The specific steps of (2-4) step of the step 2 include:
(2-4-1) scanography computing resource table R finds the resource that some resource tasks state is set to " free time ", record
For Ri;
Subtask TFj is distributed to computing resource Ri by (2-4-2), and method is: sending tide to the server of computing resource Ri
Flow calculation model file Fz, calculation document TFFj, the resource tasks state of juxtaposition computing resource Ri are set to " publication is completed ";
(2-5) scanography computing resource table R judges the resource tasks state of each resource Ri in table;
The specific steps of (2-5) step of the step 2 include:
(2-5-1) returns resource Ri calculated result file FRsti if resource tasks state is " calculate and complete "
It receives, i.e., destination file FRsti is transferred in task scheduling server, and the content in each destination file is shown man-machine
On interface (destination file format is referring to step 3));After the completion of destination file FRsti recycling, it is placed in the resource tasks of resource Ri
State is set to " free time ";
(2-5-2) holds the subtask TFj for distributing to the resource if resource tasks state is " calculating failure " again
(2-4) step of row step 2 carries out calculating task and redistributes;The calculating frequency of failure m on the resource Ri same day is carried out simultaneously tired
Add, when m is less than specified frequency of failure threshold value N, the calculating task state for setting resource Ri is " free time ";When m is more than or equal to N
When, the calculating task state for setting resource Ri is "abnormal", and resource Ri is no longer participate in the same day subsequent calculating task;
Step 3, on computing resource server, computing resource finger daemon is each according to what is updated in concurrent computation resource table
The task of computing resource distributes state, starts corresponding computing resource calculation procedure.
As shown in Fig. 2, the specific steps of the step 3 include:
(3-1) in computing resource table, the resource tasks state of the corresponding resource record Ri of current server is sentenced
Disconnected, if the calculating task state of resource is " publication is completed ", startup separator analytical calculation process is calculated, and is walked after execution
Rapid 3 (3-2) step;Otherwise any step is not executed;
(3-2) reads in the model file Fz that newest received electric network swim calculates, and forms power grid computation model;
(3-3) reads in newest received assignment file TFFj, to wherein each failure TFFj-k, executes following steps:
The branch or node failure is arranged in (3-3-1) simulation in electric network model;
(3-3-2) carries out electric network swim calculating, if calculated successfully, executes step (3-3-3), if calculating failure, directly
It meets (3-6) for executing step 3 and terminates calculating;
The out-of-limit situation of branch, node of (3-3-3) according to power grid after calculation of tidal current statistic record failure, forms and calculates
As a result TFFRsti is stored into calculator memory table;
(3-3-4) restores the branch of fault setting and node state is original state;
(3-3-5) return step 3-3-1) until the completion of whole calculation of fault.
After the completion of (3-4) whole calculation of fault, calculated result is generated, the calculated result file of current computing resource Ri is written
In FRsti;
The failure that (3-4-1) generates in calculated result file Frsti causes the more limit information, class name of voltage: falt_v_
Rst, it is as follows comprising attribute information;Each failure causes one of the out-of-limit corresponding falt_v_rst data block of voltage to record;
Serial number |
Attribute |
Data type |
Explanation |
1 |
Failure ID |
Long shaping |
|
2 |
Failure title |
Character string |
|
3 |
Failure causes more upper limit bus quantity |
Shaping |
|
4 |
Highest gets over upper limit bus title |
Character string |
|
5 |
Highest gets over upper limit bus voltage value |
Floating type |
|
6 |
Failure causes more lower limit bus quantity |
Shaping |
|
7 |
Minimum more lower limit bus title |
Character string |
|
8 |
Minimum more lower limit bus voltage value |
Floating type |
|
The failure that (3-4-2) generates in calculated result file Frsti causes the more limit information of branch, class name: falt_q_
Rst, it is as follows comprising attribute information;Each failure causes one of the out-of-limit corresponding falt_q_rst data block of branch to record.
Serial number |
Attribute |
Data type |
Explanation |
1 |
Failure ID |
Long shaping |
|
2 |
Failure title |
Character string |
|
3 |
Failure causes the out-of-limit quantity of branch |
Shaping |
|
4 |
Highest gets over upper limit branch title |
Character string |
|
5 |
Highest, which gets over upper limit Branch Power Flow, work value |
Floating type |
|
6 |
Highest gets over upper limit Branch Power Flow without work value |
Floating type |
|
The resource tasks state of the corresponding computing resource Ri of current server is set to " calculate and complete " by (3-5), and is returned
(3-1) of step 3;
It is by the write-in computing resource Ri task status of the corresponding computing resource Ri of current server after (3-6) calculating failure
" calculating failure ", and (3-1) of return step 3;
Step 4, in task scheduling server, wait next static security analysis calculating cycle arrive when, return is held
Row step 2.
The working principle of the invention is:
A kind of electric network fault parallel parsing calculation method based on exchange files proposed by the present invention, the present invention be by
Task list, computing resource table are defined in task scheduling server memory, by defining E file as the data interaction of input and output
Medium, task scheduling server is unified to be allocated and issues to task, while more computing resource server parallel computations, greatly
Big shortening calculates the time;The on-line analysis calculating speed for improving static security analysis function, meeting minute grade calculating needs
It asks;And then improve the stabilization of power grid.
It is emphasized that embodiment of the present invention be it is illustrative, without being restrictive, therefore the present invention includes
It is not limited to embodiment described in specific embodiment, it is all to be obtained according to the technique and scheme of the present invention by those skilled in the art
Other embodiments, also belong to the scope of protection of the invention.