Background technology
Along with moving forward steadily of China's extra-high voltage alternating current-direct current series-parallel connection bulk power grid construction in recent years, electrical network characteristic sum operation characteristic generation marked change, means " run greatly ", " general overhaul " System Construction needs deepens constantly.China's electrical network will present brand-new network morphology, make the operation and control of electrical network day by day complicated, in the urgent need to developing the intelligent grid scheduling support system adapted with it, the intelligent level of further lifting dispatching of power netwoks, realize multi-stage scheduling Collaboration and the control of bulk power grid total tune, strengthen the accident risk prevention ability of electrical network, improve the ability that bulk power grid is controlled in scheduling.Existing intelligent grid supporting system technology will face a severe challenge, and control the ability of bulk power grid, the ability of carrying out most optimum distribution of resources on a large scale and the integrated operation level dispatched propose new requirement to dispatching of power netwoks.
Because the electrical network scale of intelligent grid supporting system technology monitoring is increasing, need real time data amount to be processed increasing, between multiple dispatching system, need the real time data shared also to get more and more.The construction of large operation architecture makes intelligent grid supporting system technology have very large expansion in acquisition range, service object and functional requirement etc.Existing data acquisition function all can not meet the demand of future development in service mode, collection capacity and management mode, need the research carrying out data acquisition technology in a deep going way, promote the data-handling capacity gathered, further planning and design are carried out to data acquisition function.Use distributed data acquisition function, make the more convenient increase function of data acquisition, more easily expand scale, more simply safeguard, more highly effective gathering data.So, arise at the historic moment based on the intelligent grid supporting system technology of distributed data acquisition system.
But in actual use, intelligent grid supporting system technology is once break down, and the security that intelligent grid runs just cannot be protected.In order to address this problem, redundant configuration is used to the intelligent grid scheduling back-up system based on distributed data acquisition system, active and standby scheduling back-up system is set in intelligent grid, master scheduling back-up system (hereinafter referred to as homophony) and standby scheduling back-up system (adjusting hereinafter referred to as standby) independent operating and redundancy each other.When homophony breaks down, switch in real time, standby tune in time for intelligent grid provides service, can ensure the security that intelligent grid runs.
But, in actual motion, may due to some reasons homophony and standby adjusting data can be caused to gather inconsistent, the reliability of impact standby scheduling back-up system and practicality, and then affect the security of intelligent grid operation.So the synchronizing information problem between active and standby scheduling back-up system, becomes the impact standby scheduling reliability of back-up system and the subject matter of practicality.In the urgent need to setting up necessary synchronous and testing mechanism, realizing the synchronous of image data and consistency detection function, supporting standby quick and smooth of adjusting and being converted to homophony, to ensure the security that intelligent grid runs.
Summary of the invention
For the deficiencies in the prior art, technical matters to be solved by this invention is the active and standby tune synchronous method providing a kind of distributed data acquisition system based on CIM/E file.
For achieving the above object, the present invention adopts following technical scheme:
Based on an active and standby tune synchronous method for the distributed data acquisition system of CIM/E file, comprise the steps:
S1, adopts distributed data acquisition system to carry out data acquisition, the data of collection is deposited in the CIM/E file of active and standby tune;
S2, obtains the record of the online CIM/E file of homophony, and generates intermediate file;
S3, obtains the record of the standby off-line CIM/E file adjusted, and according to configuration file, the record of off-line CIM/E file of standby tune and the record content of intermediate file is compared, according to the record of the standby off-line CIM/E file adjusted of difference update;
S4, upgrades the record of the standby online CIM/E file adjusted according to the record upgrading the off-line CIM/E file that standby is adjusted.
Wherein more preferably, in step s 2, the record of the online CIM/E file of described acquisition homophony, and generate intermediate file and specifically comprise the steps:
S21, reads the record of the channel parameters of link configuration table and the online CIM/E file except some table CIM/E file, generating portion intermediate file (a);
S22, obtains the tunnel name of link configuration table, judges whether it is present in the record of the online CIM/E file of link configuration table, if do not exist, then skips the tunnel name that this tunnel name continues traversal link allocation list, if exist, then turns to step S23;
S23, reads all some table CIM/E files according to the tunnel name of link configuration table, and generates intermediate file (b);
S24, forms intermediate file by intermediate file (a) and intermediate file (b), reference record file during recording synchronism as the standby off-line CIM/E file adjusted.
Wherein more preferably, described configuration file, before the record of online CIM/E file obtaining homophony, needs to be configured according to intelligent grid supporting system technology actual motion;
Described configuration file is for configuring homophony and the standby link corresponding relation adjusted.
Wherein more preferably, in step s3, specifically comprise the steps:
S31, reads the content of corresponding configuration file, obtain need upgrade log file name and record sheet in domain name;
S32, reads the record content of the standby corresponding off-line CIM/E file adjusted;
S33, according to the path of the intermediate file that homophony generates, the intermediate file content needed for reading;
S34, according to the content compared required by configuration file, compares the record content of the described standby corresponding off-line CIM/E file adjusted and described intermediate file content, and upgrades the record content of off-line CIM/E file.
Wherein more preferably, the record content of off-line CIM/E file upgraded mainly comprise:
After the record content of the described standby corresponding off-line CIM/E file adjusted and described intermediate file content being compared, for the record do not had in the standby off-line CIM/E file adjusted, carry out the operation of insertion record; For the record of unnecessary existence in the standby off-line CIM/E file adjusted, carry out deletion record operation; For record content and the distinguishing record of described intermediate file content of the described standby corresponding off-line CIM/E file adjusted, carry out erasable operation.
Wherein more preferably, when the standby link name adjusted and intermediate file link name not to the time in of corresponding transfer link corresponding to configuration file link title to describe, when link describes identical, then two records are as identical recordings, do not carry out renewal rewards theory, when link describes different, then according to not this record in the standby off-line CIM/E file adjusted, carry out insertions record and operate.
Wherein more preferably, in step s 4 which, the record that the described record according to the standby off-line CIM/E file adjusted after renewal upgrades the online CIM/E file of standby tune specifically comprises the steps:
S41, preserves the record of intermediate file and the standby off-line CIM/E file adjusted read; Wherein, two number certificates preserved in the record of the described standby off-line CIM/E file adjusted: the first data and the second data;
S42, obtains the value of corresponding domain in described first data and described first data, the thresholding assignment in the record content of off-line CIM/E file in the first data according to intermediate file;
S43, after all territories needing to change in the first data are all by the thresholding assignment in the record content of off-line CIM/E file, compare the first data and the second data, just carries out renewal rewards theory to the second data, obtain the table of actual modification if unequal;
S44, according to the table of actual modification, upgrades the record of the standby online CIM/E file adjusted.
Wherein more preferably, in step S43, when described first data are equal with described second data, described second data are the table of actual modification, in order to upgrade the record of the standby online CIM/E file adjusted.
The active and standby tune synchronous method of the distributed data acquisition system based on CIM/E file provided by the present invention, intermediate file is generated by the record obtaining the online CIM/E file of homophony, remove the record obtaining the standby off-line CIM/E file adjusted again, according to configuration file, record content in the record of the standby off-line CIM/E file adjusted and intermediate file is compared, carries out according to the concrete difference recorded more afterwards the record upgrading the standby off-line CIM/E file adjusted.Finally come into force be synchronized to the standby online CIM/E file adjusted record in, effectively can ensure the consistance of active and standby tune acquisition configuration information, when needed, make standby adjust can quick and smooth be converted to homophony, ensure that security and the accuracy of information.
Embodiment
Below in conjunction with the drawings and specific embodiments, concrete technology contents of the present invention is further elaborated.
Intelligent grid supporting system technology adopts distributed data acquisition system to carry out data acquisition, fully can gather a large amount of data of bulk power grid.Intelligent grid scheduling back-up system data acquisition subsystem administers and maintains the mass data gathered based on CIM/E file, and the file service provided by intelligent grid scheduling back-up system basic platform carries out the file synchronization of internal system.Conveniently management document information, strengthens, optimizes the management mode of homophony, standby adjusting information synchronism, so needs manage the record that active and standby adjusting data gathers CIM/E file specially, and then realize the synchronous working of active and standby tune recorded information.
As shown in Figure 1, the active and standby tune synchronous method of the distributed data acquisition system based on CIM/E file provided by the invention, with the record content of the online CIM/E file of homophony for standard information, compare, upgrade the recorded information of the standby off-line CIM/E file adjusted, realize the synchronous of active and standby adjusting information.Specifically comprise the steps: first to adopt distributed data acquisition system to carry out data acquisition, the data of collection are deposited in the CIM/E file of active and standby tune; Secondly, by calling the file reading interface of real-time database, obtaining the record of the online CIM/E file of homophony and generating intermediate file, then removing the record obtaining the standby off-line CIM/E file adjusted, by the more new description of configuration file, content is compared to regulation and compares.Carry out according to the concrete difference of record the record upgrading the standby off-line CIM/E file adjusted relatively, finally come into force in the record of the online CIM/E file being synchronized to standby tune, realize the synchronous of active and standby adjusting information.Detailed specific description is done to this process below.
S1, adopts distributed data acquisition system to carry out data acquisition, the data of collection is deposited in the CIM/E file of active and standby tune.
Intelligent grid supporting system technology adopts distributed data acquisition system to carry out data acquisition, fully can gather a large amount of data of bulk power grid, these data is deposited in the CIM/E file of active and standby tune and carry out unifying store and management.
S2, by calling the file reading interface of real-time database, obtaining the record of the online CIM/E file of homophony, and generating intermediate file.
In synchronizing process, before obtaining the record of the online CIM/E file of homophony, need to read the configuration file content set, obtain the record of the online CIM/E file of homophony according to the requirement of configuration file, and then it is synchronous to realize active and standby tune.Configuration file is configured separately, in embodiment provided by the present invention, need to be configured configuration file according to intelligent grid supporting system technology actual motion, determine to need the table (record of CIM/E file) of renewal and the territory in showing.
Configuration file is configured with homophony and the standby link corresponding relation adjusted, after configuration file has configured, according to the content in configuration file, by calling the file reading interface of real-time database, obtain the record of the online CIM/E file of homophony, as shown in Figure 2, by calling the file reading interface of real-time database, obtain the record of the online CIM/E file of homophony, in order to coordinate for transferring in the work of row synchronized update.Wherein, obtain the record of online CIM/E file of homophony, and generate intermediate file and specifically comprise the steps:
S21, reads the record of the channel parameters of link configuration table and the online CIM/E file except some table CIM/E file, generating portion intermediate file a.
In homophony, by the channel parameters of link configuration table and the online CIM/E file generated part intermediate file a except some table CIM/E file, wherein, part intermediate file a comprises link configuration table online CIM/E file, plant stand allocation list online CIM/E file and the online CIM/E file of stipulations table.
S22, obtains the tunnel name of link configuration table, judges whether it is present in the record of the online CIM/E file of link configuration table, if do not exist, then skips the tunnel name that this passage continues traversal link allocation list, if exist, then turns to step S13.
Point table CIM/E file is named with the tunnel name of link configuration table, the record content of each some table CIM/E file is exactly the some table data in this passage, so need the record by the online CIM/E file of link configuration table, carry out the file name of acquisition point table CIM/E file and generate according to fileinfo the intermediate file b that point shows online CIM/E file.
S23, reads all some table CIM/E files according to the tunnel name of link configuration table, and generates intermediate file b.
S24, forms intermediate file by intermediate file a and intermediate file b, reference record file during recording synchronism as the standby off-line CIM/E file adjusted.
S3, obtain the record of the standby off-line CIM/E file adjusted, according to configuration file, the record content in the record of the standby off-line CIM/E file adjusted and intermediate file is compared, carry out according to the concrete difference recorded more afterwards the record upgrading the standby off-line CIM/E file adjusted.
Upgrade according to the record of intermediate file to the standby off-line CIM/E file adjusted that homophony in step S2 generates.Ensure the consistance of the record of the online CIM/E file of it and homophony, and then realize the synchronous of active and standby tune.The standby off-line CIM/E literary composition recording member adjusted is the backup of the record to the standby online CIM/E file adjusted, intermediate file is used first to upgrade the record of the standby off-line CIM/E file adjusted, the record of the standby off-line CIM/E file adjusted after renewal realizes the synchronous of the record of the standby online CIM/E file adjusted again, when efficiently avoid renewal appearance mistake, the operation of the standby tune of impact.Can recover in time renewal mistake.Wherein, carry out upgrading according to the record of documents to the standby off-line CIM/E file adjusted, as shown in Figure 3, specifically comprise the steps:
S31, reads the content of associated profile, obtains the domain name in the CIM/E filename and record sheet that need to upgrade.
Before the record of online CIM/E file obtaining homophony, need to be configured configuration file according to intelligent grid supporting system technology actual motion, determine to need the table (record of CIM/E file) of renewal and the territory in showing.When obtaining the record of the standby off-line CIM/E file adjusted, need the content according to configuration file, obtain the domain name in the CIM/E filename and record sheet that need to upgrade, so that obtain the record of relevant off-line CIM/E file.
S32, calls fetch interface, reads the record content infor1 of the standby relevant off-line CIM/E file adjusted.
S33, according to the path of the intermediate file that homophony generates, the intermediate file content infor2 needed for reading.
S34, according to the content compared required by configuration file, compares infor1 and infor2, and upgrades the record content infor1 of off-line CIM/E file.
According to the content compared required by configuration file, compare infor1 and infor2, and the record content infor1 of off-line CIM/E file is upgraded.Wherein, the record content infor1 of off-line CIM/E file is upgraded and mainly comprises: after infor1 and infor2 is compared, for the record do not had in the standby off-line CIM/E file adjusted, carry out the operation of insertion record; For the record of unnecessary existence in the standby off-line CIM/E file adjusted, carry out deletion record operation; For the distinguishing record of infor1 and infor2, carry out erasable operation.And then ensure the record of online CIM/E file of homophony and the consistance of the record of the standby off-line CIM/E file adjusted.
When the standby intermediate file adjusting use homophony to generate carries out Data Update, possible Problems existing is: if the link name of homophony is not corresponding with the standby link name adjusted, just can not determine two comparisons recorded, when comparing for the record of off-line CIM/E file adjusted and the intermediate file of homophony, will according to not this record in the standby off-line CIM/E file adjusted, and carry out the operation of insertion record, not only upgrade inaccurate, and provide redundant data to standby tune.In order to solve problems, in embodiment provided by the present invention, add the fileinfo describing link corresponding relation in configuration file, what configure in file is that homophony adjusts description corresponding relation corresponding in inconsistency record with standby.When the standby link name adjusted and intermediate file link name not to the time in of corresponding transfer link corresponding to configuration file link title to describe, when link describes identical, then two records are as identical recordings, do not need to carry out renewal rewards theory, when link describes different, then according to not this record in the standby off-line CIM/E file adjusted, and carry out insertions record and operate.So just can determine that two " identical " are recorded as comparison by describing, efficiently avoid the generation upgrading inaccurate situation.
S4, upgrades the record of the online CIM/E file of standby tune according to the record of the standby off-line CIM/E file adjusted after renewal.
After standby tune reads the configuration file and data file having and describe link corresponding relation, by link corresponding relation, the record of the off-line CIM/E file in data file and the relation storehouse of oneself is contrasted, according to the record identification of actual modification relatively, implement the record upgrading the standby online CIM/E file adjusted, and then realize the synchronizing information of active and standby tune.
When upgrading the record of the online CIM/E file of standby tune according to the record of the standby off-line CIM/E file adjusted after renewal, specifically comprise the steps:
S41, preserves the record of intermediate file and the standby off-line CIM/E file adjusted read.Wherein, two number certificates preserved in the record of off-line CIM/E file, is the first data piece1 and the second data piece2, needs the domain name compared to be obtained by intermediate file.
S42, offsets the value obtaining corresponding domain in piece1 and infor1 by structure, the thresholding assignment in the record content infor1 of off-line CIM/E file in piece1.
S43, after the territory of all needs changes of the record piece1 of a table is all completed by the thresholding assignment in infor1, compares piece1 and piece2, just carries out renewal rewards theory to piece2, obtain the table of actual modification if unequal.When piece1 and piece2 is equal, piece2 is as the table of actual modification.
S44, according to the table of actual modification, carries out calling corresponding data verification interface and synchronous Processing Interface, upgrades the record of the standby online CIM/E file adjusted, and then realizes the operation of on-line synchronous of active and standby tune.
In sum, the active and standby tune synchronous method of the distributed data acquisition system based on CIM/E file provided by the present invention, intermediate file is generated by the record obtaining the online CIM/E file of homophony, remove the record obtaining the standby off-line CIM/E file adjusted again, by the more new description of configuration file, compare content to regulation to compare, the record upgrading the standby off-line CIM/E file adjusted is carried out according to the concrete difference of record, finally come into force in the record of the online CIM/E file being synchronized to standby tune, the consistance of active and standby tune acquisition configuration information can be ensured, for standby use of adjusting provides good support.Optimize the Key Performance Indicator such as reliability, available rate, the propagation delay time of real time business, the convergence time of network of standby adjusting data network to close or suitable with homophony.When needed, make standby adjust can quick and smooth be converted to homophony.
Above the active and standby tune synchronous method of the distributed data acquisition system based on CIM/E file provided by the present invention is described in detail.For one of ordinary skill in the art, to any apparent change that it does under the prerequisite not deviating from connotation of the present invention, all by formation to infringement of patent right of the present invention, corresponding legal liabilities will be born.