Disclosure of Invention
In order to solve the problems of complex standardized design and high difficulty of the strategy table in the prior art, the invention provides the method and the system for the normalized design of the stability control strategy based on the XML, which can subdivide the constraint conditions and strategy measures corresponding to the stability control strategy, and use the universal structured XML language to perform the normalized design on the stability control strategy table, thereby reducing the problems of complex standardized design and high difficulty of the strategy table.
In order to achieve the technical purpose, the invention provides the following technical scheme:
a stability control strategy normalization design method based on XML comprises the following steps:
acquiring stability control data and a stability control strategy, classifying the stability control strategy, and performing structured modeling through an XML (extensive markup language) language based on a classification result to obtain a strategy table structured model;
and obtaining the strategy information of the stability control strategy file, and compiling the strategy information by using the strategy table structured model based on the stability control data to form a normalized strategy table.
Optionally, the stability control data includes an element table, a policy fixed value table, an operation mode table, and a fault table.
Optionally, the obtaining process of the element table and the policy fixed value table includes:
collecting stable control master station information, wherein the stable control master station information comprises access interval information, channel information and fixed value information;
and sorting the stable control master station information to obtain an element table and a strategy fixed value table.
Optionally, the process of acquiring the operation mode table and the fault table includes:
and collecting a stability control strategy file of a stability control master station, searching for operation mode information and section information by searching keywords in the stability control strategy file, and sorting the operation mode information and the section information to obtain an operation mode table and a section table.
Optionally, the process of classifying the stability control strategy includes:
classifying the constraint conditions and the strategy measures;
the constraint conditions comprise operation modes, section power, fault conditions, protection actions, bus conditions and receiving commands;
the strategy measures are divided into designated execution, capacity execution, quantity execution and remote commands;
the constraint conditions and the strategy measures form the stability control strategy.
Optionally, the process of forming the normalized policy table includes:
obtaining strategy information of a stability control file, performing entry processing on the strategy information, subdividing constraint conditions and strategy conditions in the strategy information based on entry processing results, and compiling the constraint conditions and the strategy conditions in the strategy information one by using a strategy table structured model according to stability control data to form a normalized strategy table.
Optionally, the writing process of writing the constraint conditions and the policy conditions in the policy information item by using the policy table structured model includes:
and adjusting the writing format of the constraint conditions and the strategy conditions in the strategy information by using a strategy table structured model, extracting keywords of the strategy table structured model, searching the keywords based on the model keywords for the strategy data, writing the strategy data into the adjustment result based on the model keyword search result, and forming the normalized strategy table.
In order to better realize the technical purpose, the invention also provides a stability control strategy normalization design system based on the XML, which comprises an acquisition module and a processing module;
the acquisition module is used for acquiring stability control data and a stability control strategy, classifying the stability control strategy, and performing structured modeling through an XML (extensive markup language) language based on a classification result to obtain a strategy table structured model;
the processing module is used for obtaining the strategy information of the stability control strategy file, and compiling the strategy information by using the strategy table structured model based on the stability control data to form a normalized strategy table.
Optionally, the obtaining module includes a first obtaining module and a second obtaining module.
The first acquisition module is used for acquiring stable control master station information, wherein the stable control master station information comprises access interval information, channel information and fixed value information;
the second acquisition module is used for acquiring a stability control strategy file of the stability control master station, searching the operation mode information and the section information by searching keywords of the stability control strategy file, and sorting the operation mode information and the section information to obtain an operation mode table and a section table.
Optionally, the first processing module is configured to obtain policy information of the stability control file, perform entry processing on the policy information, subdivide constraint conditions and policy conditions in the policy information based on entry processing results, and write the constraint conditions and policy conditions in the policy information one by using a policy table structured model according to the stability control data to form a normalized policy table.
The invention has the following technical effects:
the strategy information is subdivided and sorted, a plurality of strategy tables with different structures which are divided according to the operation mode or the fault category are subjected to normalized design according to a general structured XML language, the problems of complex and difficult standardized design of the strategy tables can be reduced, the difference between different stability control devices can be further reduced, the standardized implementation of the stability control devices is facilitated, and good strategy interface support is provided for the stability control related automation software.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problems of complex standardized design, high difficulty and the like of a policy table in the prior art, the invention provides the following scheme:
example one
As shown in FIG. 1, the invention discloses a stability control strategy normalization design method based on XML, comprising the following steps:
s1, extracting access interval, channel and fixed value information of the stability control master station to form an element table and a strategy fixed value table; the stability control system generally assigns a strategy at a main station, and the main station can access a local interval and can also access other sub-stations or execution stations through an optical fiber channel.
The method comprises the steps of extracting local interval information accessed by a stable control main station to form a local element list and a local total amount, extracting channel information accessed by the stable control main station to form a remote element list and a remote total amount, and extracting strategy constant value information of the stable control main station to form a strategy constant value list. Each element and policy constant value is assigned a unique identification ID for describing the associated element and constant value of the policy entry. The component table byte and the policy fixed value table are shown in table 1 and table 2, respectively, where table 1 is the component table, and table 2 is the policy fixed value table:
TABLE 1
TABLE 2
S2, extracting relevant operation modes and section information in the stability control strategy file, determining the operation logic of each mode and section, and forming a mode table and a section table; the stability control system strategy compiling unit indicated by the stability control strategy file is a document which describes the stability control strategy function and requirements, and the document content generally adopts the form of a strategy table.
The operation mode and section information corresponding to the stability control strategy are found in the stability control strategy file by adopting the conventional keyword searching method for the stability control strategy file, so that a mode table and a section table are formed. And each operation mode and section is assigned with a unique identification ID for describing the operation mode and section condition associated with the strategy entry. The operation mode table modetable and the section table sectable are respectively shown in table 3 and table 4, where table 3 is the operation mode table and table 4 is the section table:
TABLE 3
TABLE 4
Step S3, classifying the various information of the existing stability control strategy, and carrying out structural modeling by using an XML language;
although the stability control system strategy has the characteristics of customization, diversification and coordination of multiple stations, multiple manufacturers and multiple devices, after summary and induction, each strategy of the stability control system consists of two parts, namely constraint conditions and strategy measures. The constraints can be divided into: the operation mode, section power, fault condition, protection action, bus condition and receiving command. The policy measures can be divided into: four types of designated execution, capacity execution, quantity execution and remote command are adopted. The description of the classification of the constraint conditions and the policy measures are shown in tables 5 and 6, respectively, where table 5 is a constraint condition classification table, and table 6 is a policy measure classification table:
TABLE 5
TABLE 6
After structured modeling is performed by using an XML language, generating a policy table structured model as shown in table 7, wherein the table 7 is a policy table structured model table;
TABLE 7
And S4, extracting the strategy information in the stability control strategy file, performing entry processing, subdividing the constraint condition information and the execution measure information of each strategy, and compiling the constraint conditions and the execution measures of the stability control strategy one by using the strategy table structured model of S3 to form a normalized strategy table.
Step S4 specifically includes searching all policy entries in the stability control policy file by using a keyword search method, extracting detailed logic descriptions following the policy conditions and policy measures, compiling the constraint conditions and execution measures of the stability control policy item by item according to the classification model established in step S3, and forming a normalized policy table.
And classifying the acquired strategy measure information, including adopting a keyword search method for the strategy measure information, searching keywords corresponding to the keyword identifications in the strategy measure information, and classifying the strategy measure information into corresponding classifications according to the types corresponding to the keyword identifications.
The structure of the policy table Tactics is shown in table 8, where table 8 is a policy table, and the constraint condition Criteria and the execution action are shown in tables 9 and 10, respectively, where table 9 is a constraint condition table, and table 10 is a policy action table; in the writing, writing is required to be performed according to a group element structure, the group element structure is shown in table 11, and table 11 is a group element (root element) structure table:
TABLE 8
TABLE 9
Watch 10
TABLE 11
The final policy table file generated in step S4 includes file version information and a check code. The structure of the root node element as Template is shown in table 12, and table 12 is the table of root node elements in xml:
TABLE 12
To illustrate the above in more detail, the present invention is further set forth as follows:
step 1: extracting access interval, channel and fixed value information of the stable control master station to form an element table, a channel table and a strategy fixed value table;
according to the access information and the channel information of the stability control device, a local element, a remote element and a fixed value table are formed as shown in tables 13 and 14, wherein table 13 is a specific example table of the local element and the remote element, and table 14 is a specific example table of the strategy fixed value:
watch 13
TABLE 14
Step 2: extracting relevant operation modes and section information in the stability control strategy file, determining the operation logic of each mode and section, and forming a mode table and a section table;
analyzing the stability control strategy file, extracting the operation mode and section information, and forming a local element, a remote element and a fixed value table such as table 15 and table 16, wherein table 15 is an operation mode specific example table, and table 16 is a section specific example table:
watch 15
TABLE 16
And step 3: classifying various information of the existing stability control strategy, and performing structured modeling by using an XML language;
each strategy of the stability control device consists of two parts, namely constraint conditions and strategy measures. The constraints can be divided into: the operation mode, section power, fault condition, protection action, bus condition and receiving command. The policy measures can be divided into: the four types of the remote switching commands are switched according to the appointed switching, the capacity switching, the number switching and the remote switching.
And 4, step 4: extracting strategy information in the stability control strategy file, performing entry processing, subdividing constraint condition information and execution measure information of each strategy, writing the constraint conditions and the execution measures of the stability control strategy one by using a structural classification model of XML (extensive makeup language), and forming a normalized strategy table.
Extracting the policy information in the policy file, and generating a policy table as shown in table 17, where table 17 is a policy specific example table.
TABLE 17
Taking an overload of one of the main transformers 1 as an example, the programming policy table is shown in fig. 2:
example two
The invention also provides a stability control strategy normalization design system based on the XML, which comprises an acquisition module and a processing module; the acquisition module is used for acquiring stability control data and a stability control strategy, classifying the stability control strategy, and performing structured modeling through an XML (extensive markup language) language based on a classification result to obtain a strategy table structured model; the processing module is used for obtaining the strategy information of the stability control strategy file, and compiling the strategy information by using the strategy table structured model based on the stability control data to form a normalized strategy table.
Optionally, the obtaining module includes a first obtaining module and a second obtaining module.
The first acquisition module is used for acquiring stable control master station information, wherein the stable control master station information comprises access interval information, channel information and fixed value information;
the second acquisition module is used for acquiring a stability control strategy file of the stability control master station, searching the operation mode information and the section information by searching keywords of the stability control strategy file, and sorting the operation mode information and the section information to obtain an operation mode table and a section table.
Optionally, the first processing module is configured to obtain policy information of the stability control file, perform entry processing on the policy information, subdivide constraint conditions and policy conditions in the policy information based on entry processing results, and write the constraint conditions and policy conditions in the policy information one by using a policy table structured model according to the stability control data to form a normalized policy table. The system corresponds to the above method steps, and is not described herein.
The foregoing illustrates and describes the principles, general features, and advantages of the present invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.