CN102110032A - Method and device for improving reliability of configuration file - Google Patents

Method and device for improving reliability of configuration file Download PDF

Info

Publication number
CN102110032A
CN102110032A CN 201110046973 CN201110046973A CN102110032A CN 102110032 A CN102110032 A CN 102110032A CN 201110046973 CN201110046973 CN 201110046973 CN 201110046973 A CN201110046973 A CN 201110046973A CN 102110032 A CN102110032 A CN 102110032A
Authority
CN
China
Prior art keywords
file
configuration information
configuration file
backed
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 201110046973
Other languages
Chinese (zh)
Inventor
曹云
胡扬忠
邬伟琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN 201110046973 priority Critical patent/CN102110032A/en
Publication of CN102110032A publication Critical patent/CN102110032A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Retry When Errors Occur (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method for improving the reliability of a configuration file. The method comprises the following steps: successfully reading configuration information from a main configuration file or a backup configuration file in the system starting process, and configuring the system according to the configuration information; triggering to write the set configuration information to the main configuration file when a preset period is completed and a preset parameter storage flag indicates the configuration information to be stored; determining that no abnormal restart occurs in the process for writing the set configuration information into the main configuration file, determining that the writing is successful, and writing the set configuration information into the backup configuration file after the set configuration file is successfully written into the main configuration file. The invention also provides a device for improving the reliability of the configuration file. The method and the device can reduce the writing times of the same configuration file, lower the probability of damage to the same configuration file, and improve the reliability of the configuration file.

Description

A kind of method and device that improves the configuration file reliability
Technical field
The present invention relates to computer technology, particularly a kind of method and device that improves the configuration file reliability.
Background technology
Configuration file is the file that is used for the operating important configuration information of saved system; In order to guarantee the reliability of system, data were not lost on the storage medium of characteristic after configuration file generally was stored in and has power down, such as: flash memory (flash memory) or EEPROM (Electrically Erasable Programmable Read Only Memo) (Electrically Erasable Programmable Read-Only Memory, EEPROM).
Existing embedded digital watch-dog is when work, the system that runs on the embedded monitoring equipment can write the configuration information that the user is provided with in the configuration file, and configuration file is stored in the flash memory or EEPROM of this equipment, and after the user was provided with configuration information at every turn, the system that runs on this equipment will carry out the preservation of a configuration file.When the each start-up system of embedded monitoring equipment, the configuration information that the user was provided with before system can read from the configuration file of having preserved and start is to move under certain pattern according to above-mentioned important configuration information.
If in preserving the process of configuration file, when situation that system exception that equipment sudden power or system mistake cause restarts took place, because the configuration file of preserving is not write on the storage medium by complete, this configuration file was destroyed; After the system on the embedded digital watch-dog of running on started once more, system can't read the configuration information that the user is provided with from the configuration file that has destroyed, the system recovery default parameters, and be configured according to default parameters.Like this, the configuration information that the user was provided with before system exception is restarted is lost, needs the user to reset configuration information.Existing embedded digital watch-dog is in preserving the configuration file process, and system exception is restarted and caused the configuration file preserved destroyed easily.
In the existing method that system is configured, system exception is restarted and is caused configuration file destroyed easily, after each configuration file is destroyed, the user needs system is reconfigured, system will carry out the action of write-once configuration file, like this, the existing method that system is configured need be carried out multiple write operations to same configuration file; And data are not lost the storage medium of characteristic after having power down, and along with the increase of writing indegree to same storage space, its reliability is reducing gradually; When continually the same storage space of storage medium being carried out write operation, the reliability of total system is also reducing gradually like this.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method that improves the configuration file reliability, this method can reduce the indegree of writing to same configuration file, reduces the ruined probability of same configuration file, improves the reliability of configuration file.
The object of the present invention is to provide a kind of device that improves the configuration file reliability, this device can reduce the indegree of writing to same configuration file, reduces the ruined probability of same configuration file, improves the reliability of configuration file.
For achieving the above object, technical scheme of the present invention specifically is achieved in that
A kind of method that improves the configuration file reliability, this method comprises:
In system starting process, from master configuration file or backed-up config file, successfully read configuration information, and utilize described configuration information that system is configured;
In system's operational process, preserve the zone bit indication when needing to preserve configuration information reaching preset period and default parameter, trigger the configuration information that will be provided with and write described master configuration file; Write in the described master configuration file process at configuration information and to judge abnormal restarting does not take place described setting, then confirm successfully to write, and after the configuration information with described setting successfully writes described master configuration file, the configuration information of described setting is write described backed-up config file.
Preferably, the described configuration information that successfully reads from master configuration file or backed-up config file further comprises afterwards:
If from master configuration file, successfully read configuration information, then utilize master configuration file to upgrade backed-up config file; If from backed-up config file, successfully read configuration information, then utilize backed-up config file to upgrade master configuration file.
Preferably, describedly in system starting process, further comprise:
If from described master configuration file and described backed-up config file, all successfully do not read configuration information, then default parameters is write described master configuration file and described backed-up config file, and utilize described default parameters that system is configured.
Preferably, describedly in system's operational process, further comprise:
Do not preserve the zone bit indication when need not to preserve configuration information reaching preset period or default parameter, after system is in normal rebooting status, triggers the configuration information that will be provided with and write described master configuration file.
Preferably, described triggering further comprises before the configuration information that is provided with is write described master configuration file: to described master configuration file and described backed-up config file, and the operation of shielding except that the configuration information that writes setting;
Described configuration information with described setting further comprises after writing described backed-up config file: eliminate the masking operation to described master configuration file and described backed-up config file.
A kind of device that improves the configuration file reliability, this device comprises: in order to preserve memory module, trigger module, control module and the timing module that master configuration file, backed-up config file and parameter are preserved zone bit;
Described timing module is when reaching preset period, and generation is held instruction and exported described control module to;
Described trigger module is after system enters start-up course, and the output initialization directive that is triggered is to described control module; After system entered operational process, the output operating instruction that is triggered was to described control module;
Described control module successfully reads configuration information according to the initialization directive that receives in master configuration file from described memory module or the backed-up config file, utilize described configuration information that system is configured;
Described control module is according to the operating instruction that receives, from described memory module, read parameter and preserve zone bit, after the indication of described parameter preservation zone bit needs to preserve configuration information, confirm to receive to hold instruction, the configuration information of setting is write the master configuration file of described memory module; Write in the described master configuration file process at configuration information and to judge abnormal restarting does not take place described setting, then confirm successfully to write, and after the configuration information that will be provided with successfully writes master configuration file, the configuration information of described setting is write the backed-up config file of described memory module.
Preferably, described control module from described memory module master configuration file or backed-up config file in successfully read configuration information after, when being further used for confirming from master configuration file, successfully to read configuration information, utilize master configuration file to upgrade backed-up config file; When affirmation is successfully read configuration information from backed-up config file, utilize backed-up config file to upgrade master configuration file.
Preferably, described control module further is stored in default parameters described memory module;
Described control module does not all successfully read configuration information from described master configuration file and described backed-up config file, then read default parameters from described memory module, default parameters is write the master configuration file and the backed-up config file of described memory module, and utilize described default parameters that system is configured.
In the said apparatus, described trigger module comprises:
First trigger element is triggered after system enters start-up course, produces initialization directive and exports described control module to;
Second trigger element is triggered after system enters operational process, produces operating instruction and exports described control module to.
Preferably, described trigger module further comprises the 3rd trigger element;
Described the 3rd trigger element is triggered after system enters normal rebooting status, produces normal instruction of restarting and exports described control module to;
Described control module is preserved the zone bit indication in described parameter and be need not to preserve configuration information or do not receive when holding instruction, and further according to the normal instruction of restarting that receives, the configuration information that is provided with is write the master configuration file of memory module.
As seen from the above technical solutions, the invention provides a kind of method and device that improves the configuration file reliability, in system starting process, by to the reading of the configuration information preserved in master configuration file and the backed-up config file, obtain the configuration information of non-default parameters from one of them of above-mentioned two configuration files; In system's operational process, in master configuration file and backed-up config file, write configuration information, to guarantee having at least a configuration file in the process that system starts once more, to provide the configuration information of the required non-default parameters of system configuration.Adopt method and system of the present invention, can reduce the indegree of writing, reduce the ruined probability of same configuration file, improve the reliability of configuration file, and then improve the reliability of system same configuration file.
Description of drawings
The method flow diagram that Fig. 1 is configured system when system start-up for the present invention.
The method flow diagram of when Fig. 2 moves in system for the present invention configuration information being preserved.
Fig. 3 improves the structural representation of the device of configuration file reliability for the present invention.
Embodiment
For make purpose of the present invention, technical scheme, and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
The unloading phase that a kind of method that improves the configuration file reliability of the present invention comprising and the operation phase; The unloading phase, adopt the present invention when system start-up, the method that system is configured to be handled; In the operation phase, the method for when adopting the present invention to move in system configuration information being preserved is handled.
For sake of clarity, earlier the running status that runs on the system on the embedded digital watch-dog is described, the state that the system of user's setting is restarted is defined as the normal rebooting status of system, and under this state, system can preserve important data and configuration information before restarting; With restarting of causing of the sudden power of the equipment of system operation and system mistake causes restarts and be defined as the system exception rebooting status, under this state, because restarting of system is paroxysmal, system can't preserve important data and configuration information before restarting, and may cause losing of important data and configuration information.
Master configuration file of mentioning among the present invention and backed-up config file can determine according to the creation-time of configuration file, such as: the configuration file that will create earlier is decided to be master configuration file, and the configuration file that the back is created is decided to be backed-up config file.
The method flow diagram that Fig. 1 is configured system when system start-up for the present invention.Now in conjunction with Fig. 1, the method that the present invention is configured when the system start-up describes, and is specific as follows:
Step 101: judge whether from master configuration file, successfully to read configuration information, if, execution in step 102, otherwise execution in step 103;
From master configuration file, read configuration information, and judge and whether successfully to read, if success proves that then master configuration file is not destroyed in the process of preserving configuration information, execution in step 102; Otherwise, proving master configuration file generation systems abnormal restarting in the process of preserving configuration information, master configuration file is destroyed, execution in step 103.
According to the build-in attribute of configuration file, when preserving entire arrangement information in configuration file, configuration file is not destroyed, and the configuration information in the configuration file can intactly be read out, and confirms to read success this moment; When the configuration information of preserving in configuration file was imperfect, configuration file was destroyed, and the configuration information in the configuration file can not intactly be read out, and can't realize the configuration to system.Can from foregoing as can be known, intactly be read according to the configuration information in the configuration file, judge whether to read success, the concrete method that adopts existing integrality to judge determines whether the configuration information in the configuration file is intactly read.
Step 102: utilize master configuration file to upgrade backed-up config file, execution in step 106 afterwards;
In this step, under the situation that has backed-up config file, the configuration information that will successfully read from master configuration file writes backed-up config file, to upgrade the information of preserving in the backed-up config file, makes master configuration file and backed-up config file keep synchronously; Do not exist under the situation of backed-up config file, create a backed-up config file earlier, the configuration information that will successfully read from master configuration file writes backed-up config file again.
Step 103: judge whether from backed-up config file, successfully to read configuration information, if, execution in step 104, otherwise execution in step 105;
From backed-up config file, read configuration information, and judge and whether successfully to read, if success proves that then backed-up config file is not destroyed in the process of preserving configuration information, execution in step 104; Otherwise, proving backed-up config file generation systems abnormal restarting in the process of preserving configuration information, backed-up config file is destroyed, execution in step 105.
It is identical with method in the step 101 to judge whether to read successful method, does not repeat them here.
Step 104: utilize backed-up config file to upgrade master configuration file, execution in step 107 afterwards;
In this step, the configuration information that will successfully read from backed-up config file writes master configuration file, to upgrade the configuration information of preserving in the master configuration file, make master configuration file recover destroyed preceding information, backed-up config file and master configuration file keep synchronously.
Step 105: default parameters is write master configuration file and backed-up config file;
In this step, under master configuration file and all ruined situation of backed-up config file, can't from master configuration file and backed-up config file, successfully read configuration information, when perhaps starting for the first time in system, the situation that does not have master configuration file and backed-up config file can't read configuration information from master configuration file and backed-up config file.
For above-mentioned first kind of situation, the present invention directly writes default parameters master configuration file and backed-up config file; For above-mentioned second kind of situation, the present invention creates master configuration file earlier, creates backed-up config file again, after creating configuration file, default parameters is write master configuration file and backed-up config file.
Default parameters of the present invention is identical with existing default parameters, does not repeat them here.
Step 106: utilize default parameters that system is configured, execution in step 108 afterwards;
Utilize default parameters can adopt the existing systems collocation method among the present invention, do not repeat them here the method that system is configured.
Step 107: utilize the configuration information that successfully reads that system is configured;
Utilize configuration information can adopt the existing systems collocation method among the present invention, do not repeat them here the method that system is configured.
Step 108: finish.
The method flow diagram of when Fig. 2 moves in system for the present invention configuration information being preserved.Now in conjunction with Fig. 2, the method for when the present invention is moved in system configuration information being preserved describes, and is specific as follows:
Step 201: preserve zone bit according to default parameter and judge whether to preserve configuration information, if, execution in step 202, otherwise execution in step 203;
In advance parameter is preserved zone bit and carry out the assignment setting, judge whether to preserve parameter according to the assignment of this zone bit, such as: parameter is preserved zone bit be preset as very, then this zone bit indication needs preservation configuration information; Parameter is preserved zone bit be preset as vacation, then this zone bit indication need not to preserve configuration information.
Step 202: judge whether to reach preset period, if, execution in step 204, otherwise execution in step 203:
In order to reduce the number of times that writes configuration information, improve the reliability of system, can further preserve configuration information according to preset period, such as: preset period can be made as 30 seconds.
Step 203: judge whether to receive normal instruction of restarting, if, execution in step 204, otherwise execution in step 201;
Do not preserve the zone bit indication when need not to preserve configuration information reaching preset period or parameter, system is after being in normal rebooting status, produce a normal instruction of restarting, so that system no longer is configured the information preservation according to preset period and parameter preservation zone bit, but according to normal instruction of restarting, preserve configuration information immediately, improved the reliability of configuration file.
Step 204: to master configuration file and backed-up config file, the operation of shielding except that the configuration information that writes setting;
In order to guarantee in the process of preserving the configuration information that is provided with, avoid user's being provided with once more to the configuration information of system to the integrality of the configuration information preserved and the influence of correctness, concerning master configuration file and backed-up config file, any operation of shielding except that this writes the configuration information of setting.
Screen method of the present invention can adopt the existing method that locks to realize, does not repeat them here.
Step 205: judge whether that the configuration information that will be provided with successfully writes master configuration file, if, execution in step 206, otherwise execution in step 208;
The configuration information that is provided with is write master configuration file, and judge whether abnormal restarting takes place in ablation process, if abnormal restarting does not take place, then confirm successfully to write execution in step 206, otherwise execution in step 207.
Wherein, the configuration information of setting can be temporarily stored in the internal memory of system; When writing master configuration file, from the internal memory of system, read temporary configuration information.
Step 206: judge whether that the configuration information that will be provided with successfully writes backed-up config file, if, execution in step 207, otherwise execution in step 208;
No matter whether the configuration information that is provided with is successfully write backed-up config file, at this moment, has a configuration file at least, it is master configuration file, successfully the configuration information that is provided with is preserved, so that when system starts once more, can successfully read configuration information from one of them of two configuration files.
Write by judgement in the process of configuration information whether abnormal restarting has taken place, confirm whether successfully write,, then confirm successfully to write if abnormal restarting does not take place in system; Otherwise system's generation abnormal restarting writes failure, and the system finishing operational process prepares to enter start-up course.
Step 207: eliminate masking operation, execution in step 201 to master configuration file and backed-up config file;
This step is back execution of successful preservation of having finished the configuration information of this setting; The method of elimination masking operation of the present invention can adopt existing unlock method, and just the inverse operation of existing locking method is no longer given unnecessary details unlock method at this.
Step 208: eliminate masking operation, execution in step 209 to master configuration file and backed-up config file;
This step is in success execution after master configuration file or backed-up config file write configuration information, that is to say, in master configuration file or backed-up config file, writing in the process of configuration information, abnormal restarting has taken place in system, at this moment, the system finishing operational process prepares to enter start-up course.
The method of the elimination masking operation of this step is identical with the method for the elimination masking operation of step 207, does not repeat them here.
Step 209: finish.
Fig. 3 improves the structural representation of the device of configuration file reliability for the present invention.Now in conjunction with Fig. 3, the device that the present invention is improved the configuration file reliability describes, and is specific as follows:
The device that the present invention improves the configuration file reliability comprises: memory module 30, trigger module 31, control module 32 and timing module 33.
Memory module 30 is preserved zone bit in order to preserve default parameters, master configuration file, backed-up config file and parameter.Wherein, master configuration file and backed-up config file are in order to preserve configuration information; Parameter is preserved zone bit and is used to preserve a default assignment, and this assignment is used to indicate whether needs preservation configuration information.
Trigger module 31 is after system enters start-up course, and the output initialization directive that is triggered is to control module 32; After system entered operational process, the output operating instruction that is triggered was to control module 32; Enter normal rebooting status in system, the normal instruction of restarting of output that is triggered is to control module 32.
Timing module 33 is when reaching preset period, and generation is held instruction and exported control module 32 to.Wherein, preset period can be provided with according to the performance of system and user's demand.
Control module 32 successfully reads configuration information according to the initialization directive that receives in master configuration file from memory module 30 or the backed-up config file, utilize configuration information that system is configured; When successfully not reading configuration information, the default parameters that memory module 30 is preserved writes master configuration file and the backed-up config file in the memory module 30, and utilizes default parameters that system is configured.Wherein, control module 32 reads configuration information earlier from master configuration file when reading configuration information from two configuration files of memory module 30, when successfully not reading configuration information from master configuration file, read configuration information again from backed-up config file.
Control module 32 is after successfully reading configuration information from master configuration file or backed-up config file, when being further used for confirming from master configuration file, successfully to read configuration information, utilize master configuration file to upgrade backed-up config file, when affirmation is successfully read configuration information from backed-up config file, utilize backed-up config file to upgrade master configuration file.Like this, even if in process to master configuration file and backed-up config file write operation, because abnormal restarting has been destroyed one of them configuration file, in the initialization procedure after startup, still has a configuration file that the configuration information of non-default parameters can be provided.
Control module 32 is according to the operating instruction that receives, from memory module 30, read parameter and preserve zone bit, after the indication of parameter preservation zone bit needs to preserve configuration information, judge whether to receive and hold instruction, hold instruction if receive, then the configuration information that is provided with is write the master configuration file of memory module 30; Preserving the zone bit indication in parameter need not to preserve configuration information or does not receive and hold instruction, judge whether to receive normal instruction of restarting, if receive normal instruction of restarting, the configuration information that is provided with is write the master configuration file of memory module 30, if do not receive normal instruction of restarting, then continue from memory module 30, to read parameter and preserve zone bit, and judge whether parameter preservation zone bit indicates the preservation configuration information.
Control module 32 is after the configuration information that will be provided with successfully writes master configuration file, further the configuration information that is provided with is write the backed-up config file of memory module 30, after successfully writing backed-up config file, continuation is read parameter and is preserved zone bit from memory module 30, and judges whether parameter preservation zone bit indicates the preservation configuration information; When successfully not writing master configuration file or successfully not writing backed-up config file, system is in the abnormal restarting state, waits for receiving initialization directive.
Control module 32 is when writing the configuration information of setting in master configuration file of preserving to memory module 30 or the backed-up config file, shielding is to any operation of above-mentioned two configuration files except that the configuration information that writes setting earlier, after the operation of the configuration information that finishes to write setting, eliminate masking operation to above-mentioned two configuration files; Like this, can prevent in the process of preserving the configuration information that is provided with the ruined situation of the configuration file that maloperation causes, the integrality and the correctness of raising configuration file.Equally, when control module 32 is changed in the assignment of the parameter preservation zone bit that memory module 30 is preserved, also can shield other operations of parameter being preserved zone bit earlier, after the assignment that this time is provided with to be written, eliminate the masking operation of parameter being preserved zone bit again.
Wherein, trigger module 31 comprises first trigger element 311 and second trigger element 312; Trigger module also can further comprise the 3rd trigger element 313.
First trigger element 311 is triggered after system enters start-up course, produces initialization directive and exports control module 32 to.First trigger element 311 can be by the concrete interface relevant with initialization of system call, realizes the action that is triggered, and then produces initialization directive.
Second trigger element 312 is triggered after system enters operational process, produces operating instruction and exports control module 32 to.Second trigger element 312 can by system call concrete with preserve the relevant interface of configuration information, realize the action that is triggered and then generation operating instruction.
The 3rd trigger element 313 is triggered after system enters normal rebooting status, produces normal instruction of restarting and exports control module 32 to.The 3rd trigger element 313 can be by the concrete interface relevant with preserving configuration information immediately of system call, realizes the action that is triggered, and then produces normal instruction of restarting.
In the above-mentioned preferred embodiment of the present invention, the unloading phase that the layoutprocedure of system being comprised and the operation phase; The unloading phase, the configuration information that utilizes two configuration files to preserve carries out system configuration; In the operation phase, two configuration files are configured the preservation of information; The present invention mainly adopts two configuration files that configuration information is preserved in the operation phase, like this, even in the process that configuration information is preserved, because one of them configuration file that causes of abnormal restarting is damaged, required configuration information unloading phase that the present invention can realizing that another configuration file provides system to enter once more, reduced the indegree of writing, reduced the ruined probability of same configuration file, improved the reliability of system same configuration file.In addition, in the system start-up stage, after from a configuration file, successfully having read configuration information, the configuration file that configuration information is successfully read in utilization upgrades another configuration file, like this, even in the operation phase, master configuration file is because abnormal restarting is destroyed, still preserved the configuration information of the preceding system of abnormal restarting in the backed-up config file, after system starts once more, system still can return to the configuration before the abnormal restarting, rather than the configuration of the most original default parameters correspondence, further with high the reliability of system.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (10)

1. a method that improves the configuration file reliability is characterized in that, this method comprises:
In system starting process, from master configuration file or backed-up config file, successfully read configuration information, and utilize described configuration information that system is configured;
In system's operational process, preserve the zone bit indication when needing to preserve configuration information reaching preset period and default parameter, trigger the configuration information that will be provided with and write described master configuration file; Write in the described master configuration file process at configuration information and to judge abnormal restarting does not take place described setting, then confirm successfully to write, and after the configuration information with described setting successfully writes described master configuration file, the configuration information of described setting is write described backed-up config file.
2. method according to claim 1 is characterized in that, the described configuration information that successfully reads from master configuration file or backed-up config file further comprises afterwards:
If from master configuration file, successfully read configuration information, then utilize master configuration file to upgrade backed-up config file; If from backed-up config file, successfully read configuration information, then utilize backed-up config file to upgrade master configuration file.
3. method according to claim 1 and 2 is characterized in that, describedly further comprises in system starting process:
If from described master configuration file and described backed-up config file, all successfully do not read configuration information, then default parameters is write described master configuration file and described backed-up config file, and utilize described default parameters that system is configured.
4. method according to claim 1 and 2 is characterized in that, describedly further comprises in system's operational process:
Do not preserve the zone bit indication when need not to preserve configuration information reaching preset period or default parameter, after system is in normal rebooting status, triggers the configuration information that will be provided with and write described master configuration file.
5. method according to claim 4, it is characterized in that, described triggering further comprises before the configuration information that is provided with is write described master configuration file: to described master configuration file and described backed-up config file, and the operation of shielding except that the configuration information that writes setting;
Described configuration information with described setting further comprises after writing described backed-up config file: eliminate the masking operation to described master configuration file and described backed-up config file.
6. a device that improves the configuration file reliability is characterized in that, this device comprises: in order to preserve memory module, trigger module, control module and the timing module that master configuration file, backed-up config file and parameter are preserved zone bit;
Described timing module is when reaching preset period, and generation is held instruction and exported described control module to;
Described trigger module is after system enters start-up course, and the output initialization directive that is triggered is to described control module; After system entered operational process, the output operating instruction that is triggered was to described control module;
Described control module successfully reads configuration information according to the initialization directive that receives in master configuration file from described memory module or the backed-up config file, utilize described configuration information that system is configured;
Described control module is according to the operating instruction that receives, from described memory module, read parameter and preserve zone bit, after the indication of described parameter preservation zone bit needs to preserve configuration information, confirm to receive to hold instruction, the configuration information of setting is write the master configuration file of described memory module; Write in the described master configuration file process at configuration information and to judge abnormal restarting does not take place described setting, then confirm successfully to write, and after the configuration information that will be provided with successfully writes master configuration file, the configuration information of described setting is write the backed-up config file of described memory module.
7. device according to claim 6, it is characterized in that, described control module from described memory module master configuration file or backed-up config file in successfully read configuration information after, when being further used for confirming from master configuration file, successfully to read configuration information, utilize master configuration file to upgrade backed-up config file; When affirmation is successfully read configuration information from backed-up config file, utilize backed-up config file to upgrade master configuration file.
8. according to claim 6 or 7 described devices, it is characterized in that described control module further is stored in default parameters described memory module;
Described control module does not all successfully read configuration information from described master configuration file and described backed-up config file, then read default parameters from described memory module, default parameters is write the master configuration file and the backed-up config file of described memory module, and utilize described default parameters that system is configured.
9. according to claim 6 or 7 described devices, it is characterized in that described trigger module comprises:
First trigger element is triggered after system enters start-up course, produces initialization directive and exports described control module to;
Second trigger element is triggered after system enters operational process, produces operating instruction and exports described control module to.
10. device according to claim 9 is characterized in that described trigger module further comprises the 3rd trigger element;
Described the 3rd trigger element is triggered after system enters normal rebooting status, produces normal instruction of restarting and exports described control module to;
Described control module is preserved the zone bit indication in described parameter and be need not to preserve configuration information or do not receive when holding instruction, and further according to the normal instruction of restarting that receives, the configuration information that is provided with is write the master configuration file of memory module.
CN 201110046973 2011-02-23 2011-02-23 Method and device for improving reliability of configuration file Pending CN102110032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110046973 CN102110032A (en) 2011-02-23 2011-02-23 Method and device for improving reliability of configuration file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110046973 CN102110032A (en) 2011-02-23 2011-02-23 Method and device for improving reliability of configuration file

Publications (1)

Publication Number Publication Date
CN102110032A true CN102110032A (en) 2011-06-29

Family

ID=44174201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110046973 Pending CN102110032A (en) 2011-02-23 2011-02-23 Method and device for improving reliability of configuration file

Country Status (1)

Country Link
CN (1) CN102110032A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955840A (en) * 2016-01-27 2016-09-21 上海华测导航技术股份有限公司 Receiver configuration file management method
CN106919424A (en) * 2017-02-27 2017-07-04 烽火通信科技股份有限公司 Profile management systems and management method in a kind of ONU of PON
CN108038028A (en) * 2017-12-13 2018-05-15 江苏神州信源系统工程有限公司 File backup method, device and file recovery method, device
WO2018120100A1 (en) * 2016-12-30 2018-07-05 深圳配天智能技术研究院有限公司 Power-off protection method and device, and computer
CN108418720A (en) * 2018-04-24 2018-08-17 深圳市菲菱科思通信技术股份有限公司 A kind of restoration methods, device and the routing device of routing device configuration information
CN110018918A (en) * 2018-01-10 2019-07-16 中兴通讯股份有限公司 Restorative procedure, device, mobile terminal and the storage medium of terminal abnormal
CN110719341A (en) * 2018-07-12 2020-01-21 中兴通讯股份有限公司 Data processing method and device, DHCP server and storage medium
CN112822570A (en) * 2020-12-30 2021-05-18 凌云天博光电科技股份有限公司 PON configuration file missing recovery method and device based on network management system
CN112968970A (en) * 2021-02-26 2021-06-15 杭州迪普信息技术有限公司 Configuration information backup method and device and network equipment
CN115002190A (en) * 2022-05-27 2022-09-02 努比亚技术有限公司 Function configuration file regulation and control method, device and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1400531A (en) * 2001-08-03 2003-03-05 华为技术有限公司 Processing method of rapid memory file
US20030135663A1 (en) * 2002-01-16 2003-07-17 Sun Microsystems, Inc. Method, system, and program for including device parameters from a device driver in a configuration file
CN1466030A (en) * 2002-06-28 2004-01-07 联想(北京)有限公司 Method for preventing destroying file system in abnormal power cutting off
JP2005301560A (en) * 2004-04-09 2005-10-27 Nec Corp Cluster file server
CN1749968A (en) * 2004-09-13 2006-03-22 日本电气英富醍株式会社 Recovery of duplex data system after power failure
CN101577143A (en) * 2009-06-19 2009-11-11 华为技术有限公司 Method, device and system for storing files

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1400531A (en) * 2001-08-03 2003-03-05 华为技术有限公司 Processing method of rapid memory file
US20030135663A1 (en) * 2002-01-16 2003-07-17 Sun Microsystems, Inc. Method, system, and program for including device parameters from a device driver in a configuration file
CN1466030A (en) * 2002-06-28 2004-01-07 联想(北京)有限公司 Method for preventing destroying file system in abnormal power cutting off
JP2005301560A (en) * 2004-04-09 2005-10-27 Nec Corp Cluster file server
CN1749968A (en) * 2004-09-13 2006-03-22 日本电气英富醍株式会社 Recovery of duplex data system after power failure
CN101577143A (en) * 2009-06-19 2009-11-11 华为技术有限公司 Method, device and system for storing files

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955840A (en) * 2016-01-27 2016-09-21 上海华测导航技术股份有限公司 Receiver configuration file management method
CN109496299A (en) * 2016-12-30 2019-03-19 深圳配天智能技术研究院有限公司 A kind of power-off protection method, device and computer
WO2018120100A1 (en) * 2016-12-30 2018-07-05 深圳配天智能技术研究院有限公司 Power-off protection method and device, and computer
CN106919424A (en) * 2017-02-27 2017-07-04 烽火通信科技股份有限公司 Profile management systems and management method in a kind of ONU of PON
CN108038028B (en) * 2017-12-13 2021-03-23 北信源系统集成有限公司 File backup method and device and file restoration method and device
CN108038028A (en) * 2017-12-13 2018-05-15 江苏神州信源系统工程有限公司 File backup method, device and file recovery method, device
CN110018918A (en) * 2018-01-10 2019-07-16 中兴通讯股份有限公司 Restorative procedure, device, mobile terminal and the storage medium of terminal abnormal
WO2019137280A1 (en) * 2018-01-10 2019-07-18 中兴通讯股份有限公司 Terminal anomaly repair method, apparatus, mobile terminal, and storage medium
CN108418720A (en) * 2018-04-24 2018-08-17 深圳市菲菱科思通信技术股份有限公司 A kind of restoration methods, device and the routing device of routing device configuration information
CN110719341A (en) * 2018-07-12 2020-01-21 中兴通讯股份有限公司 Data processing method and device, DHCP server and storage medium
CN112822570A (en) * 2020-12-30 2021-05-18 凌云天博光电科技股份有限公司 PON configuration file missing recovery method and device based on network management system
CN112968970A (en) * 2021-02-26 2021-06-15 杭州迪普信息技术有限公司 Configuration information backup method and device and network equipment
CN112968970B (en) * 2021-02-26 2023-04-07 杭州迪普信息技术有限公司 Configuration information backup method and device and network equipment
CN115002190A (en) * 2022-05-27 2022-09-02 努比亚技术有限公司 Function configuration file regulation and control method, device and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN102110032A (en) Method and device for improving reliability of configuration file
KR100758292B1 (en) A method for renovating the computer operating system
US8683457B1 (en) Updating firmware of an electronic device by storing a version identifier in a separate header
CN101882085B (en) System starting method and embedded equipment
CN101593083B (en) device, computer and method for protecting and restoring computer configuration information
CN109032632B (en) FOTA upgrading method, wireless communication terminal and storage medium
CN106020865A (en) System upgrading method and device
CN102722394B (en) Start upgrading method of embedded equipment
CN101923473B (en) Embedded electronic device and method for updating firmware thereof
CN102023908A (en) Method and device for backing up boot program
CN104216800A (en) Automatic system fault recovering method and device based on data redundancy
CN101344868B (en) Data backup and acquiring method and device
CN103729264A (en) Method for backing up and restoring Windows virtual machine system disk
CN110647333A (en) Firmware upgrading method and equipment configured to upgrade firmware therein
CN105138433A (en) Backup method for UBIFS file system in embedded type Linux operating system
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN111143132B (en) BIOS recovery method, device, equipment and readable storage medium
CN103530138A (en) Method and device for protecting file system data based on embedded LINUX
CN102024502A (en) Flash device testing method and device as well as board and network equipment
CN115793985A (en) Safe storage method, device, equipment and storage medium
CN109582332B (en) System upgrading method and device for Internet camera
CN112433739B (en) Firmware upgrading method
CN105718330A (en) Linux system backup data recovery method and device
JP2006277078A (en) Log information management device, method and program
CN113190256B (en) Upgrading method, device and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110629