Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of method that realizes configuration data conformance, and many parts of configuration datas when making system start-up in the system are consistent.
A kind of method that realizes configuration data conformance in the system that the embodiment of the invention provides, the configuration data in the system are kept in N the memory device simultaneously, and wherein, described N is greater than 1, and described method comprises:
In the process of system start-up, read the configuration data in the described N memory device respectively;
Relatively whether the N part configuration data that is read is consistent, when inconsistent, switches to the mode of operation of selecting the desired configuration data, selects a configuration data for the user from N part configuration data;
With configuration data and the selected configuration data conformance in described N part memory device.
Based on technique scheme, the embodiment of the invention also provides a kind of device that is used for realization system configuration data conformance, comprising:
Reading unit is used for the process in system start-up, reads the configuration data that is kept at simultaneously in the described N memory device from N memory device respectively; Wherein, described N is greater than 1;
Comparing unit, whether by N part configuration data that described reading unit read consistent, obtain comparative result if being used for comparison;
Control unit, be used for when the comparative result of described comparing unit for not the time, send selection instruction;
Selected cell is used for after receiving the selection instruction of described control unit, switches to the mode of operation of selecting configuration data, selects a configuration data for the user from N part configuration data;
Lock unit is after being used to receive the configuration data of user's selection, with configuration data and the selected configuration data conformance in described N part memory device.
Based on technique scheme, the embodiment of the invention also provides a kind of system that is used for realization system configuration data conformance, comprising:
N memory device is used for preserving simultaneously configuration data, and wherein, described N is greater than 1;
Control appliance, be used for after system start-up, the N part configuration data that relatively reads from a described N memory device is when described N part configuration data is inconsistent, switch to the mode of operation of selecting configuration data, from described N part configuration data, select a configuration data for the user; And with configuration data and selected configuration data conformance in described N part memory device.
Compared with prior art, the embodiment of the invention has the following advantages:
The embodiment of the invention is when the N part configuration data that reads is inconsistent, can switch to the mode of operation of selecting the desired configuration data, the user can select portion from N part configuration data under this mode of operation, further be unified into inconsistent N part configuration data identical for system with selected configuration data, make N part configuration data conformance, thereby system can normally be started under the condition of configuration data conformance, make the user can long-rangely finish the selection of desired configuration data, and need not to carry out to the scene again breakdown maintenance, therefore shorten the start-up time of system, also saved human cost.
Embodiment
Below in conjunction with accompanying drawing the embodiment of the embodiment of the invention is done further and to be elaborated.
As shown in Figure 1, realize the FB(flow block) of the method embodiment of configuration data conformance in the system for the present invention is a kind of, configuration data can be kept at respectively in four memory devices among this embodiment, after system start-up, need carry out verification to these four parts of configuration datas, when inconsistent, specify wherein portion as the desired configuration data by the user, and replace other configuration datas of three parts, described method comprises:
S101: system powers on and starts, the operations such as loading of each module in the executive system in start-up course.
S102: from described four memory devices, read corresponding configuration data respectively.
S103: relatively whether four parts of configuration data contents that read are consistent, wherein, can be by relatively whether the check code of four parts of configuration datas is consistent respectively, whether the last holding time of perhaps more described four parts of configuration datas is consistent, the version number of perhaps more described four parts of configuration datas whether method such as unanimity determines whether the content of four parts of configuration datas is consistent, when above-mentioned one or more comparative results when being inconsistent, then carry out S104; Otherwise, carry out S108.
S104: described system stops start-up course, carries out S105 simultaneously.
S105: described system switches to the mode of operation that the user selects configuration data, to wait for that the user selects a configuration data from described four parts of configuration datas.Wherein, the mode of operation of described selection configuration data can be safe mode commonly used, a user interface of selecting configuration data for the user can be provided under safe mode, in this user interface, can provide function of checking configuration data and the function of selecting configuration data to the user, make the user can in this user interface, check the content and the attribute of every part of configuration data, and can therefrom select a configuration data.
Wherein, the configuration data in the described user interface can present to the user by the sign of each configuration data, and the user can or choose sign to select the configuration data of respective identification correspondence by input in user interface; Certainly also can or choose sign to check the configuration data of respective identification correspondence by input.Wherein, described sign can be the title of the title of configuration data or sequence number or configuration data place memory device or sequence number etc.
S106: according to the configuration data that the user selects, from four parts of memory devices, derive selected configuration data in described mode of operation, use web browser or order line that described configuration data is sent to respectively in described four parts of memory devices then.
S107: the described configuration data that described four parts of memory devices will be received is replaced original configuration data.Then, use the new configuration data after replacing to re-execute described S101.
S108: described system continues to carry out follow-up start-up course, normally starts.
The foregoing description can be when system start-up, when detecting four parts of configuration datas when inconsistent, make system switch to the mode of operation of selecting configuration data, wait for that the user selects a configuration data in this mode of operation, then described four parts of configuration datas are all replaced to selected configuration data, guaranteeing four parts of configuration data conformances, thereby the assurance system can normally start afterwards.The foregoing description is when four parts of required configuration datas of system start-up are inconsistent, need not the user and just can make the allocation data recovering unanimity automatically, and then guaranteed the normal startup of system, saved manpower and time cost to field service, and realize simple, easy to operate.
In addition, configuration data described in the foregoing description is not limited only to four parts, can also for other greater than any umber of 1, described umber can specifically be provided with according to actual conditions according to the specific requirement to the fail safe of system.
Wherein, in above-mentioned S105, the user selects in the process of configuration data in described mode of operation, described system can also provide debug command N part configuration data to be checked when selecting for the user to the user, detailed process is for example: system when receive user's input check certain configuration data adjust order after, present the described related content of adjusting the configuration data of appointment in the order to the user; Perhaps, the user can also export to four parts of configuration datas on certain scan tool earlier and check.
In addition, the unification of method realization in using above-mentioned S106 and S107 to four parts of configuration datas, can also use following method to realize the consistent of configuration data: in S106, can also be according to user-selected configuration data, with first memory device at described configuration data place as main storage device, other three parts of memory devices are from memory device, use described main storage device and other respectively from the intercommunication passage between the memory device, with the configuration data in the described main storage device by described passage send to described three parts from memory device.In S107, from memory device the configuration data of receiving is replaced original configuration data for described three parts.
In addition, on the basis of the foregoing description, the embodiment of the invention can also derive selected configuration data and preserve, with the fail safe of the configuration data in the assurance system.
In addition, in above-mentioned S107, after having replaced original configuration data, when re-executing described S101 and carry out the startup once more of system, can power on to system again, and can under the situation that system does not cut off the power supply, directly reload each module of system.
On the basis of technique scheme, the invention also discloses a kind of system embodiment that is used for realization system configuration data conformance, as shown in Figure 2, structured flowchart for a kind of system embodiment of the present invention, described system comprises: control system 201, and storage system 202, wherein, to be kept at respectively in four parts of memory devices 2021 with a kind of configuration data in the described storage system 202, described four parts of memory devices 2021 can adopt Raid1 or Raid10 technology to store.Wherein, described memory device 2021 can be stored the equipment of data for disk or safety box dish etc.Described control system 201 can also be made of the double-control system of a redundancy two identical controllers 2011, and the auxiliary mutually Control work of finishing system is with the fail safe and the reliability of the described control system 201 of further raising.
In the start-up course of described system after powering on, controller 2011 in the described control system 201 reads corresponding configuration data respectively from four memory devices 2021 of described storage system 202, whether detect described four parts of configuration data contents then consistent, wherein, whether the check code that described controller 2011 can be by four parts of configuration datas relatively or the version number of last time of preserving or each configuration data be consistent, if it is inconsistent that one or more comparative results are arranged, judge that then configuration data is inconsistent.When detection obtains four parts of configuration datas when incomplete same, the described system of then described controller 2011 instructions stops start-up course, and switches to the mode of operation that the user selects configuration data.
Wherein, described mode of operation can present a user interface that is used to select configuration data to the user for safe mode commonly used under described safe mode, the user can be from described user interface, check four parts of configuration datas, and therefrom select a as desirable configuration data.
After described controller 2011 is known user-selected configuration data, with configuration data and the selected configuration data conformance in four memory devices 2021 in the described storage system 202.Wherein, can use web browser or order line, from the N part configuration data that is read, selected configuration data be sent to respectively in described four memory devices 2021; Perhaps described controller 2011 can also send to selected configuration data in other three memory devices 2021 from first memory device 2021 at place by the intercommunication passage between this equipment and other memory devices.
After described memory device 2021 has been finished preservation to selected configuration data, the described system of described controller 2011 instructions re-powers, perhaps under the situation that system does not cut off the power supply, reload each module, use the configuration data after upgrading to carry out the startup of system.
The described control system 201 of the foregoing description is when detecting four parts of configuration datas when inconsistent, command system switches to the mode of operation of selecting configuration data, select a configuration data by the user, and make in the system four parts of configuration datas and the selected configuration data conformance that goes out, thereby the assurance system can normally start afterwards, and realize simple, easy to operate.
Based on technique scheme, the embodiment of the invention also discloses a kind of device that is used for realization system configuration data conformance that is applied in the control system, described device can be integrated on the controller of control system, as shown in Figure 3, be a kind of structured flowchart that installs embodiment of the present invention, described device comprises: reading unit 301, comparing unit 302, control unit 303, selected cell 304 and lock unit 305, wherein
Described reading unit 301 is used for the process at system's electrifying startup, reads the configuration data that is kept at simultaneously in these memory devices from several memory devices respectively.Wherein, the number of described memory device is greater than 1, and in the present embodiment, for convenience of description, establishing is put data and is kept at simultaneously in four memory devices, and at this moment, 301 of described reading units read and obtain four parts of configuration datas.
Described comparing unit 302, whether consistent, obtain comparative result if being used for relatively four parts of configuration datas obtaining from described reading unit 301.Wherein, whether described comparing unit 302 can consistent by the time of version number, check code or the last preservation of more described four parts of configuration datas respectively, and then judges whether the content that draws described configuration data is consistent.
Described control unit 303, be used for when the comparative result of learning described comparing unit 302 for not the time, send selection instruction, to instruct described selected cell 304 to select; Otherwise, instruct described system to continue to carry out follow-up normal startup.
Described selected cell 304 is used for after the selection instruction of receiving described control unit 303, and system is switched to the mode of operation of selecting configuration data, selects a configuration data for the user from described four parts of configuration datas under this mode of operation; Wherein, described mode of operation can be safe mode, can present a user interface that is used to select configuration data to the user under this pattern, the user can check the content and the attribute information of described four parts of configuration datas in described user interface, and makes a choice.
Wherein, the configuration data in the described user interface can present to the user by the sign of each configuration data, and the user can or choose sign to select the configuration data of respective identification correspondence by input in user interface; Certainly also can or choose sign to check the configuration data of respective identification correspondence by input.Wherein, described sign can be the title of the title of configuration data or sequence number or configuration data place memory device or sequence number etc.
Described lock unit 305 after being used to receive the configuration data of user's selection, keeps the configuration data in described N part memory device and selected configuration data conformance.
The described control unit 303 of the foregoing description is when learning that four parts of configuration datas are inconsistent, Instruction Selection unit 304 switches to system the mode of operation of selecting configuration data, under this pattern, select a desirable configuration data by the user, and then four parts of configuration datas are kept and selected configuration data conformance, thereby the assurance system can normally start afterwards, shortened the time of system start-up, but also the workman personnel have been saved to on-site maintenance, manpower and time cost have been saved, and realize simple, easy to operate.
Wherein, in order to make four configuration data conformances in the memory device, described lock unit 305 can be saved in the configuration data of selecting in four memory devices, as shown in Figure 4 simultaneously, on the basis of above-mentioned device embodiment shown in Figure 3, described lock unit 305 comprises:
The first synchronous subelement 3051 after being used to receive the configuration data of user's selection, uses web browser or order line with described configuration data, sends to respectively in described four memory devices in the storage system.
Perhaps, described lock unit 305 is substituted into selected configuration data in other three memory devices except that the memory device at this configuration data place, as shown in Figure 5, on the basis of above-mentioned device embodiment shown in Figure 3, described lock unit 305 comprises:
The second synchronous subelement 3052, after being used to receive the configuration data of user's selection, in first memory device at described configuration data place, by the intercommunication passage between this first memory device and other memory devices, selected configuration data is sent to respectively in the memory device at other three parts of configuration data places and preserve.
Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills promptly can understand and implement under the situation of not paying performing creative labour.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Above-described embodiment of the present invention does not constitute the qualification to protection range of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.