Summary of the invention
The technical problem to be solved in the present invention is, at the above-mentioned IO of prior art to point process length consuming time, accuracy rate is low, operation is frequent defective, provide a kind of IO that is used for simulation platform of nuclear power plant to point methods and IO to point apparatus.
The technical solution adopted for the present invention to solve the technical problems is: construct a kind of IO that is used for simulation platform of nuclear power plant to point methods, may further comprise the steps:
Import step: import new IO inventory to database, and in new IO inventory, be provided for the flag information of storage " model tag name ", " expansion control system tag name " and version number;
Step is set: the version number that every line item in the new IO inventory is set is n; Version number is that the IO inventory of the record correspondence of n-1 is old IO inventory;
The contrast step: version number is " the control system tag name " of every line item and the every line item that version number is n-1 of n in the reading database, and respectively according to the numerical values recited of " control system tag name " ordering, and new IO inventory and old IO inventory contrasted one by one, judge the type of every line item and obtain " model tag name ", " expansion control system tag name " and it is stored in corresponding position according to the type of record;
The interface document step of updating: the type according to record is upgraded the used interface document of emulation platform.
IO of the present invention to point methods in, if new IO inventory is importing first, then the n of version number of She Zhiing is 1, described contrast step specifically comprises:
Read " the control system tag name " of every line item in the new IO inventory, and generate " model tag name ", " expansion control system tag name " automatically, and it is stored in corresponding position according to described " control system tag name ".
IO of the present invention to point methods in, the rule of described automatic generation foundation comprises: naming rule, contrast rule, Substitution Rules.
IO of the present invention to point methods in, each row comprises " model tag name ", " expansion control system tag name " in the described interface document, the two by preset characters at interval.
IO of the present invention to point methods in, the type of described record comprises " newly-increased record ", " deletion record ", " constant record ", " change record ", " duplicate record ".
IO of the present invention to point methods in, be " newly-increased record " if in the contrast step, judge the type of record, then read " the control system tag name " of every line item in the new IO inventory, and automatically generate " model tag name ", " expansion control system tag name ", and it is stored in corresponding position according to described " control system tag name ".
IO of the present invention to point methods in, be " constant record " or " change record " if in the contrast step, judge the type of record, then identify this and be recorded as " constant record " or " change record ", and from the record of old IO inventory, obtain corresponding " model tag name ", " expansion control system tag name ", and it is stored in corresponding position.
IO of the present invention to point methods in, if the type of judging record in the step in contrast is " deletion record ", then identifies this and be recorded as " deletion record ", and it is recorded in the relevant data file, so that follow-up analysis.
IO of the present invention to point methods in, if the type of judging record in the step in contrast is " duplicate record ", then identifies this and be recorded as " duplicate record ".
The present invention also provides a kind of IO that is used for simulation platform of nuclear power plant to point apparatus, comprising:
Import the unit: be used to import new IO inventory to database, and in the IO list, keep somewhere the position that is used for storing " model tag name ", " expansion control system tag name " and version number;
The unit is set: the version number that is used for being provided with the every line item of new IO inventory is n; Version number is that the IO inventory of the record correspondence of n-1 is old IO inventory;
The contrast unit: being used for reading database version number is " the control system tag name " of every line item and the every line item that version number is n-1 of n, and respectively according to the numerical values recited of " control system tag name " ordering, and new IO inventory and old IO inventory contrasted one by one, judge the type of every line item and obtain " model tag name ", " expansion control system tag name " and it is stored in corresponding position according to the type of record;
Interface document updating block: be used for upgrading the used interface document of emulation platform according to the type of record.
The invention has the beneficial effects as follows that can realize the automatic contrast that the IO inventory writes down by IO of the present invention to point methods, comparing result is not only relevant with current record, also relevant with a last contrast record, to help to find out different record types such as duplicate record wherein.Can generate " model tag name " and " expansion control system tag name " automatically, reduce the time of artificial contrast, improve accuracy rate, avoid the generation of mistake point.Can also upgrade all interface documents automatically according to comparing result.When having overcome emulation platform and DCS control system and third party's instrument control system integration, the defective of the interface work arduousness that participation contractor too much causes.
Embodiment
Nuclear power station gamut analog machine is the indispensable equipment that photograph is got in nuclear power plant operators training and examination, is that nuclear power engineering is built one of visual plant on the critical path.The hardware system of gamut analog machine comprises computer system, I/O interface system, monitoring power station machine (DAS or DCS system etc.) emulator, console panel platform, trainer station, engineer station or the like.Wherein need to carry out the lot of data communication between computer system, I/O interface system, monitoring power station machine (DAS or the DCS system etc.) emulator.Data wherein promptly refer to the value of the actual physics signal that analog machine is simulated.Each signal has a unique tag name.Four kinds of signal type: AI (analog input signal) have been generally included, DI (digital input signals), AO (analog output signal), DO (digital output signal).Include other information such as signal description, range, dimension in addition.These information derive from the database of monitoring power station machine emulator or I/O interface system usually, and are kept in the IO inventory.Generally speaking, in the emulation platform in employed signal post signature and emulator or the interface system employed signal post signature be inconsistent.Therefore, need carry out IO to point operation.
Fig. 1 is that the IO that is used for simulation platform of nuclear power plant according to one embodiment of the invention is to point methods schematic flow sheet 100.May further comprise the steps:
Import step 101: by IO the importing unit in the point apparatus 500 501 is imported new IO inventory to database, and in new IO inventory, be provided for the flag information of storage " model tag name ", " expansion control system tag name " and version number;
Step 102 is set: by the version number that unit 502 is provided with every line item in the new IO inventory is set is n; Version number is that the IO inventory of the record correspondence of n-1 is old IO inventory;
Contrast step 103: by version number in contrast unit 503 reading databases is " the control system tag name " of every line item and the every line item that version number is n-1 of n, and respectively according to the numerical values recited of " control system tag name " ordering, and new IO inventory and old IO inventory contrasted one by one, judge the type of every line item and obtain " model tag name ", " expansion control system tag name " and it is stored in the relevant position according to the type of record;
Interface document step of updating 104: interface document updating block 504 upgrades the used interface document of emulation platform according to the type of record.
IO provided by the invention mainly is divided into two kinds of situations to the process of point methods 100: submit IO inventory (n equals 1) first to and submit IO inventory (n is greater than 1) to the n time.
In an embodiment of the present invention, import the new IO inventory that imports in the step 101 and be importing first.Then the n of version number of She Zhiing is 1, contrast step 103 specifically comprises: " control system tag name " and other information (such as but not limited to signal description, signal type etc.) of reading every line item in the new IO inventory, and automatically generate " model tag name ", " expansion control system tag name ", and it is stored in corresponding position according to described " control system tag name ".Automatically the rule that generates institute's foundation comprises: naming rule, contrast rule, Substitution Rules.Each row comprises " model tag name ", " expansion control system tag name " in the described interface document, and the two by preset characters at interval.
When submitting the IO inventory first to, because all records all are new, need to start the automatic comparison process of calling the roll, this process is according to the tag name that provides in the IO inventory and other information (such as but not limited to signal description, signal type etc.), generation model tag name and expansion control system tag name (sometimes the tag name of inventory also needs further modification), whole automatic generative process includes three important steps, naming rule contrast, the contrast of contrast rule and Substitution Rules contrast, as shown in Figure 2.In addition, because this moment, interface document did not exist, need to generate interface document, the interface document example is seen Fig. 3.
Naming rule is the relevant regulations of the name form of " control system tag name ".Such as, the naming rule of certain DCS manufacturer is: ABNXXXSSSPPDD, and wherein AB is a bullets, N machine representation group number, XXX representative system name, SSS represents the equipment code name, and PP is a device type, and DD is the state of signal.Among one embodiment, suppose that the control system label is called " AB1DWS003STHI ", can be decomposed into " AB-1-DWS-003-ST-HI ", wherein AB represents entry name, and 1 represents unit No. 1, DWS representative system name, the 003rd, equipment code name, ST are device types, and HI is a state.
According to naming rule, system can identify the corresponding information of signal from " control system tag name ", belong to which system such as this signal, belongs to which unit or the like.We are referred to as the naming rule contrast entire identification process.
The contrast rule is some conversion rules by summary of experience.Information and other information (such as signal instruction, signal type etc.) that the contrast rule reads naming rule contrast generation generate " model tag name " and " expansion control system tag name ".
The contrast Sample Rules is as shown in table 1:
Wherein symbol "+" expression character string connection.
Table 1 contrast Sample Rules
Example: signal " AB1DWS003STHI " meets article one rule, thereby can adopt contrast rule 1 to change and draw model label " tr_DWS003ST.Output_High " by name, the expansion control system label is called " dcsm_di1DWS003STHI.Output ".
And for Substitution Rules, because some situation is random, but the number of times that repeats is a lot, and we adopt the mode of the table of comparisons to replace, and the example of the table of comparisons is as shown in table 2.
Table 2 table of comparisons example
OLKL021JA |
TER001PO |
OLKL023JA |
TER002PO |
OLKL025JA |
TER003PO |
OLKL026JA |
SEL001PO |
OLKL027JA |
SEL002P0 |
OLKL028JA |
SEL003PO |
OLKL029JA |
TER004PO |
OLKL030JA |
TER005PO |
OLKL031JA |
TER006PO |
OLKL032JA |
TER007PO |
Have some signals in the reality, its " control system tag name " do not satisfy the condition of any contrast rule, and at this moment system can adopt Substitution Rules to generate " model tag name " and " expansion control system tag name ".If signal " control system tag name " has satisfied a certain in the contrast rule and generated corresponding " model tag name " and " expansion control system tag name ", promptly skip this step.The Substitution Rules example is as shown in table 3:
Table 3 Substitution Rules example
Example: signal " AB1OLKL021JA HI " does not meet any contrast rule, but article one Substitution Rules that meet table 3, thereby can adopt this Substitution Rules conversion to draw model label " tr_TER001PO.Output_High " by name, the expansion control system label is called " dcsm_di1DWS003STHI.Output ".
Details are as follows (n equals 1) to a step for the IO that inventory is provided first:
Step 1: import the IO inventory in database, and in list, increase by three row, be respectively applied for storage " model tag name ", " expansion control system tag name " and version number (emulation platform needs the control system tag name is carried out some modifications sometimes).
Step 2: read the control system tag name in the each row of data, generate " model tag name " and " expansion control system tag name " according to this title and other relevant information (as signal note, signal type etc.), and be stored in corresponding position.Whole automatic generative process includes three important steps, naming rule contrast, the contrast of contrast rule and Substitution Rules contrast, as shown in Figure 2.
Among Fig. 3, the brk_0LBK001JA.Fault of first row is " a model tag name ", dcsc_inbAB0LBK001JA1_WH is " an expansion control system tag name ", separate with blank character between the two, certainly can also be with other blank character, also can adopt other interface document expression way, the present invention is not limited to this.Wherein the content of symbol " // " back is the notes content of this row.Each row lexical or textual analysis of shown in Figure 3 other is the same, repeats no more.
In another embodiment of the present invention, the IO inventory that imports in the importing step 101 of Fig. 1 is non-importing first, also be that n is greater than 1, with version number is that the IO inventory of n-1 is called old inventory, the version number that imports is that the inventory of n (for example is called new inventory, the version number that imports is 5, and the old list pane this shop that then compares therewith is 4, by that analogy).Owing to upgraded the IO inventory, we need contrast the old and new IO inventory.The process that the old and new IO inventory contrasts automatically is as follows: at first the old and new IO inventory is sorted (such as but not limited to ascending sort) according to the signal post signature, then two inventories are contrasted one by one.Comparing result is not only relevant with currency, also needs relevantly with a last correlative value, finds out repeating a little wherein to help the slip-stick artist.In addition, need upgrade all interface documents, see shown in Figure 4 according to comparing result.
The type of record comprises " newly-increased record ", " deletion record ", " constant record ", " change record ", " duplicate record "." newly-increased record " is meant in the new IO inventory and exists, and non-existent record in the old inventory." deletion record " is meant in the new IO inventory and do not exist, and the record that exists in the old inventory." constant record " is meant all unaltered record of all information." change record " is meant except " model tag name ", " expansion control system tag name " do not change, the record that other information change." duplicate record " is meant two records that " expansion control system tag name " repeats in the new IO inventory.
Be " newly-increased record " if in the contrast step, judge the type of record, then read " control system tag name " and other information (such as but not limited to signal description, signal type etc.) of every line item in the new IO inventory, and generate " model tag name ", " expansion control system tag name " automatically, and it is stored in corresponding position according to described " control system tag name " and other information.
Be " constant record " or " change record " if in the contrast step, judge the type of record, then identify this and be recorded as " constant record " or " change record ", and from the record of old IO inventory, obtain corresponding " model tag name ", " expansion control system tag name ", and it is stored in corresponding position.
Be " deletion record " if in the contrast step, judge the type of record, then identify this and be recorded as " deletion record ", and it is recorded relevant data file (being used for writing down the data file of new and old IO inventory variation), so that follow-up analysis.
If the type of judging record in the contrast step then identifies this and is recorded as " duplicate record " for " duplicate record ".
Details are as follows to the concrete steps of point methods about the IO of the non-IO inventory that provides first:
Step 1: import the IO inventory in database, and flag information is set in list, is respectively applied for storage " model tag name ", " expansion control system tag name " and version number (emulation platform needs the control system tag name is carried out some modifications sometimes).
Step 2: the version number in the each row of data is arranged to n.
Step 3: the record that with version number in the database is n sorts from small to large according to " control system tag name " row string value (numerical value), and current record position i=1 is set.The record that with version number in the database is n-1 sorts from small to large according to " control system tag name " row string value, and it is j=1 that the current record value is set.
Step 4: the i bar record and the version number that read version number and be n are the j bar record of n-1.
Step 5: gone beyond the scope if version number is the j bar record of n-1, then to read all version numbers more than or equal to i be the record of n in circulation, and identify these records and belong to " newly-increased record ", changes step 14 over to.
Step 6: gone beyond the scope if version number is the i bar record of n, then circulating and reading all version numbers more than or equal to j is the record of n-1, and identify these records and belong to " deletion record ", these recorded informations are recorded in the relevant data file, analyze for the model engineering teacher.Change step 14 over to.
Step 7: " the control system tag name " that with version number be i bar record and the i-1 bar record of n compares, if identical then identify i and be recorded as " duplicate record ", the i assignment become i+1, and get back to step 4.
Step 8: " the control system tag name " that will write down j compares with " the control system tag name " that write down i, if identical, then changes step 11 over to; If record j " control system tag name " then changes step 9 over to greater than record i " control system tag name ".Otherwise change step 13 over to.
Step 9: identification record i is " a newly-increased record ".
Step 10: the i assignment is become i+1, forward step 4 to.
Step 11: the information of copy " model tag name " and " expansion control system tag name " two positions is to the corresponding position of record i from record j.
Whether step 12: it is identical with the information (for example signal type, note) of other positions of j relatively to write down i, if identical then identification record i is " a constant record ", otherwise identification record i is " change record ".The i assignment is become i+1, the j assignment is become j+1, forward step 4 to.
Step 13: identification record j is " deletion record ", and it is recorded in the relevant data file, and the j assignment is become j+1, forwards step 4 to.
Step 14: start automatic comparison process, if record is " a newly-increased record ", read " control system tag name " in the each row of data, generate " model tag name " and " expansion control system tag name " according to automatic comparison process, and be stored in corresponding position.If be recorded as " constant record " or " change record ", from the record of version n-1, obtain corresponding " model tag name " and " expansion control system tag name ", and be stored in the relevant position.According to the type of record, upgrade the used interface document of emulation platform.To forming, the centre is with blank character interval, interface document example as shown in Figure 3 by " model tag name " and " expansion control system tag name " for every row in the file.
Fig. 5 is that the IO that is used for simulation platform of nuclear power plant according to one embodiment of the invention is to point apparatus 500 structural representations.IO comprises importing unit 501, unit 502 is set, contrasts unit 503, interface document updating block 504 point apparatus 500.
Import unit 501: be used to import new IO inventory to database, and in the IO list, keep somewhere the position that is used for storing " model tag name ", " expansion control system tag name " and version number;
Unit 502 is set: the version number that is used for being provided with the every line item of new IO inventory is n; Version number is that the IO inventory of the record correspondence of n-1 is old IO inventory;
Contrast unit 503: being used for reading database version number is " the control system tag name " of every line item and the every line item that version number is n-1 of n, and respectively according to the numerical values recited of " control system tag name " ordering, and new IO inventory and old IO inventory contrasted one by one, judge the type of every line item and obtain " model tag name ", " expansion control system tag name " and it is stored in corresponding position according to the type of record;
Interface document updating block 504: be used for upgrading the used interface document of emulation platform according to the type of record.