CN1855059A - Method for accessing data file of telecommunication apparatus - Google Patents
Method for accessing data file of telecommunication apparatus Download PDFInfo
- Publication number
- CN1855059A CN1855059A CN 200510034347 CN200510034347A CN1855059A CN 1855059 A CN1855059 A CN 1855059A CN 200510034347 CN200510034347 CN 200510034347 CN 200510034347 A CN200510034347 A CN 200510034347A CN 1855059 A CN1855059 A CN 1855059A
- Authority
- CN
- China
- Prior art keywords
- data
- file
- directory
- end sequence
- data directory
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method for storing data file in communication device includes generating two data catalogue to store data file, adding start sequence file and end sequence file in each data catalogue and storing file under each data catalogue by revising said sequence file the storing data file, judging whether data file is valid or not according to start sequence file and end sequence file then judging whether data file under two said data catalogues is the same or not and obtaining data if data file under two said data catalogues is the same.
Description
Technical field:
The present invention relates to the preservation of data file in the communication field.
Background technology:
The carrier-class communication apparatus requires equipment to have very high reliability usually, and the normal operation of communication apparatus be unable to do without data, comprise the configuration information of equipment, user's configuration information etc., these data with the form of file, need be kept in the non-volatile storage medias such as hard disk or FLASH usually.Cause communication apparatus to restart if abnormal conditions such as power down, system exception, deadlock take place, communication apparatus must the data file from be stored in non-volatile storage media in the data of reading and saving recover normal operation.Therefore, the preservation of data file is a very important function of communication apparatus.Data are kept at and usually occur in the user in the data file and by modes such as webmaster, TELNET or WEB communication apparatus is carried out data configuration, perhaps need in the communication apparatus operational process important thing that takes place is recorded the medium situation of non-volatile storage media.In the equipment normal course of operation, the storage of data is normally without any problem.If yet communication apparatus is saving the data in fortuitous events such as power down takes place in the process of data file, just may cause some data file preservation imperfect, thereby cause the data consistency that is kept in each data file not enough.When communication apparatus re-powered operation, equipment can't obtain conforming data in the data file from be kept at non-volatile storage media, has influenced the normal operation of communication apparatus.
Summary of the invention:
The technical matters that the present invention solves is to propose a kind of method of preserving data file, when fortuitous event such as power down takes place in communication apparatus is being preserved the process of data to data file, equipment can the data file from non-volatile storage media recover conforming data during electrifying startup once more, thereby guarantees that communication apparatus can normally move during electrifying startup once more.
Technical scheme of the present invention is:
Be used to preserve data file 1.1 create two data catalogues in non-volatile storage media, the data file of preserving under these two data catalogues under normal circumstances is duplicate;
1.2 in each data directory, need to increase beginning sequential file and two data files of ends file sequence the data file of preservation except preserving communication apparatus itself;
1.3 data file is saved in the data directory, handles according to following steps:
1.3.1 revise beginning sequential file and storage in the data directory 1;
1.3.2 the data file that memory communicating equipment need be preserved is to data directory 1;
1.3.3 revise end sequence file and storage in the data directory 1;
1.3.4 revise beginning sequential file and storage in the data directory 2;
1.3.5 the data file that memory communicating equipment need be preserved is to data directory 2;
1.3.6 revise end sequence file and storage in the data directory 2;
1.4 communication apparatus obtains data file and handles according to the following steps from data directory:
1.4.1 it is whether effective: if effectively, then carry out 1.4.2 according to the data file in beginning sequential file in the data directory 1 and the end sequence file judgment data catalogue 1; If invalid, then carry out 1.4.5;
1.4.2 it is whether effective: if effectively, then carry out 1.4.3 according to the data file in beginning sequential file in the data directory 2 and the end sequence file judgment data catalogue 2; If invalid, then carry out 1.4.4;
1.4.3, judge whether the data file of storing under two data catalogues is identical:, then carry out 1.4.6 if identical according to the beginning file sequence of data directory 1 and data directory 2, the relation of end sequence file; If different, then carry out 1.4.4;
1.4.4 the data file under the data directory 1 is all copied to below the data directory 2, carries out 1.4.6 then;
1.4.5 the data file under the data directory 2 is all copied to below the data directory 1, carries out 1.4.6 then;
1.4.6 communication apparatus obtains system data from data directory 1 read data files, begins operate as normal then.
The present invention can guarantee in store all the time active data file in the communication apparatus, and can both obtain the data that system's operation needs during each communication apparatus electrifying startup from up-to-date active data file.Even when fortuitous event such as power down, system exception, deadlock takes place in communication apparatus is being preserved the process of data to data file, the equipment that also can guarantee can the data file from non-volatile storage media recover conforming data during electrifying startup once more, thereby guarantees that communication apparatus can normally move during electrifying startup once more.
Description of drawings:
Fig. 1 be in the prior art in non-volatile storage media storing data files organize synoptic diagram;
Fig. 2 be of the present invention in non-volatile storage media storing data files organize synoptic diagram;
Fig. 3 is the program flow diagram of storing data files of the present invention to non-volatile storage media;
Fig. 4 be of the present invention when the communication apparatus electrifying startup two data catalogues from non-volatile storage media obtain up-to-date active data and as required two data catalogues are carried out synchronous program flow diagram.
Embodiment:
The present invention is described in further detail below in conjunction with accompanying drawing.
Fig. 1 be usually adopt in the prior art in non-volatile storage media (for example hard disk or FLASH etc.) storing data files organize synoptic diagram.In Fig. 1, data file 1, data file 2 ... data file N is the data file of storing the system data that guarantees that the normal operation of communication apparatus is required.Present communication apparatus is only preserved a piece of data usually in data directory, promptly different system datas is kept at respectively in the file.In the equipment normal course of operation, the storage of data is normally without any problem.If yet communication apparatus is saving the data in fortuitous events such as power down takes place in the process of data file, just may cause some data file preservation imperfect, thereby cause the data consistency that is kept in each data file not enough.When communication apparatus re-powered operation, equipment can't obtain conforming data in the data file from be kept at non-volatile storage media, has influenced the normal operation of communication apparatus.
Fig. 2 be of the present invention in non-volatile storage media storing data files organize synoptic diagram.In Fig. 2, data file 1, data file 2 ... data file N is the data file of storing the system data that guarantees that the normal operation of communication apparatus is required.The present invention sets up two data catalogues in communication apparatus, be used to preserve two piece of data, promptly can obtain in the data file of any data of system in two data catalogues.Simultaneously, in order to increase the validity of the data file in the data catalogue is judged, we increase two files newly at each data directory: beginning sequential file and end sequence file, thereby and the relation that can adopt certain general algorithm computation to begin sequence and end sequence file judge the validity of the data file under this data directory.
Fig. 3 is the program flow diagram of storing data files of the present invention to non-volatile storage media.For the convenience of describing, we suppose that communication apparatus always obtains data from the data directory 1 and carries out system start-up in the data file of storage.At first execution in step 301 is revised beginning sequential file and the storage in the data directory 1, execution in step 302 data storage that communication apparatus need be preserved is in the data file of data directory 1 again, and execution in step 303 is revised end sequence file and the storage in the data directories 1 then.After having carried out step 301,302,303, the data of equipment have been complete to be kept in the data file of data directory 1.And then execution in step 304 is revised beginning sequential file and the storage in the data directory 2, execution in step 305 data storage that communication apparatus need be preserved is in the data file of data directory 2 again, and execution in step 306 is revised end sequence file and the storage in the data directories 2 then.After having carried out step 304,305,306, the data of equipment have been complete to be kept in the data file of data directory 2.
Generally speaking, the order of two data catalogues of communication apparatus operation is not at random, such as first service data catalogue 1, the service data catalogue 2 again, show in the process flow diagram of Fig. 3, be exactly first execution in step 301, step 302 and step 303, and then execution in step 304, step 305 and step 306.Therefore, if the data file of two data catalogues is all effectively still inconsistent, the data file of data directory 1 is up-to-date.The order of supposing communication apparatus service data catalogue is at random, both possible first service data catalogue 1 is service data catalogue 2 again, showing in the process flow diagram of Fig. 3, is exactly first execution in step 301, step 302 and step 303, and then execution in step 304, step 305 and step 306; Also possible first service data catalogue 2 is service data 1 again, shows in the process flow diagram of Fig. 3, and be exactly first execution in step 304, step 305 and step 306, and then execution in step 301, step 302 and step 303.We can be by the suitable method of setting, the beginning file sequence of comparing data catalogue 1 and data directory 2, the relation of end sequence file, thus the data file of judging under which data directory is up-to-date.
Fig. 4 be of the present invention when the communication apparatus electrifying startup two data catalogues from non-volatile storage media obtain up-to-date active data and as required two data catalogues are carried out synchronous program flow diagram.We suppose that still communication apparatus always obtains data from the data directory 1 and carries out system start-up in the data file of storage, and storage during data according to the flow process of Fig. 3 at first with data storage in the data file of data directory 1, and then with data storage in the data file of data directory 2.At first the beginning sequential file and the end sequence file of execution in step 401 reading of data catalogues 1, execution in step 402 then, and whether the data file that beginning sequential file from data directory 1 and end sequence file can be judged in the data directory 1 is effective.The method of judging is introduced in the back.If effectively, execution in step 403; If invalid, execution in step 408 all copies to the data file under the data directory 2 below the data directory 1.For the success that guarantees that better data are duplicated, all data files under can first deleted data catalogue 1, and then duplicate.Execution in step 403, behind the beginning sequential file and end sequence file of reading of data catalogue 2, whether execution in step 404 is effective according to the data of data file storage in beginning sequential file and the end sequence file judgment data catalogue 2: if effectively, execution in step 405; If invalid, execution in step 407 all copies to the data file under the data directory 1 below the data directory 2.For the success that guarantees that better data are duplicated, all data files under can first deleted data catalogue 2, and then duplicate.Execution in step 405 according to the beginning file sequence of data directory 1 and data directory 2, the relation of end sequence file, judges whether the data file of storing under two data catalogues is identical.The method of judging is introduced in the back.If the data file in two data catalogues is consistent, then execution in step 406, and the data file in the reading of data catalogue 1 is obtained system data, and system begins operate as normal; If it is inconsistent, since we suppose storage during data at first with data storage in the data file of data directory 1, therefore the data in the data file of data directory 1 are newer than the data in the data file of data directory 2, execution in step 407 all copies to the data file under the data directory 1 below the data directory 2.For the success that guarantees that better data are duplicated, all data files under can first deleted data catalogue 2, and then duplicate.After execution in step 407 or the step 408, realized under two data catalogues data file synchronously, promptly the data file under two data catalogues is on all four, concrete operation is: 1) duplicate the beginning sequential file; 2) data file of copying and saving system service data; 3) duplicate the end sequence file.For the success that guarantees that better data are duplicated, can delete all data files under the destination data catalogue earlier, and then duplicate.Execution in step 406 then, and the data file in the reading of data catalogue 1 is obtained system data, and system begins operate as normal.During the equipment electrifying startup first time, may without any data file, started system according to default configuration data or empty data, when then for the first time storing data, at first need to create two data catalogues, and in two data catalogues, create beginning sequential file and end sequence file respectively, for example we can store an integer to beginning sequential file and end sequence file, and sequence number is initialized as 0; When carrying out concrete data file storage then, according to program flow diagram storage data shown in Figure 3.
Whether effective method can have much according to the data in beginning sequential file and the end sequence file judgment data catalogue, as long as beginning sequential file and end sequence file storage be can discern, comparable content, whether the data that get final product in the judgment data catalogue according to some general algorithms effective.
Be that example describes with a kind of simple method below: all preserve an identical integer with the end sequence file at the beginning sequential file; When carrying out the operation of data storage, the integer of beginning sequential file and end sequence file storage all adds 1 at every turn.Under the normal condition, the content of beginning sequential file, end sequence file is duplicate.If accidents such as power down take place during with the data file of data storage in certain data directory in equipment, when equipment once more during electrifying startup, the beginning sequential file in these data and the content of end sequence file are inconsistent, promptly two integers are unequal, thereby know that the data file in this data directory is unavailable.In system work process, unusually cause equipment to restart even in the process of storage data, take place, according to program circuit graphic operation shown in Figure 3, it is duplicate can guaranteeing to have at least a beginning sequential file, the content of end sequence file under the data catalogue, and promptly the data file under this data directory is effective.Just occur in data storage in the data file of one of them data directory and when preparing data storage in the data file of another data directory even equipment restarts, by comparing the beginning sequential file under two data catalogues, data file and the data file under the data directory 2 that can judge under the data directory 1 are inconsistent, because we suppose earlier data storage in the data file of data directory 1, restart the back system at equipment and can find that the integer of the beginning sequential file in the ratio of integers data directory 2 of the beginning sequential file in the data directory 1 is big, the content that the data file in the data directory 1 is described is up-to-date.If the order of communication facilities service data catalogue is at random, the data file which data directory is the size of integer that also can be by beginning sequential file storage in two data catalogues relatively can judge is up-to-date.
According to top introduction, thereby equally also can whether equate to judge whether the data file of storing under two data catalogues is identical by judging the integer of preserving in two beginning sequential files under the data catalogue and the end sequence file.
Claims (5)
1, a kind of method of in communication facilities, preserving data file, step comprises:
Be used to preserve data file 1.1 create two data catalogues in non-volatile storage media, the data file of preserving under these two data catalogues under normal circumstances is duplicate;
1.2 in each data directory, need to increase beginning sequential file and two data files of ends file sequence the data file of preservation except preserving communication apparatus itself;
1.3 data file is saved in the data directory, handles according to following steps:
1.3.1 revise beginning sequential file and storage in the data directory 1;
1.3.2 the data file that memory communicating equipment need be preserved is to data directory 1;
1.3.3 revise end sequence file and storage in the data directory 1;
1.3.4 revise beginning sequential file and storage in the data directory 2;
1.3.5 the data file that memory communicating equipment need be preserved is to data directory 2;
1.3.6 revise end sequence file and storage in the data directory 2;
1.4 communication apparatus obtains data file and handles according to the following steps from data directory:
1.4.1 it is whether effective: if effectively, then carry out 1.4.2 according to the data file in beginning sequential file in the data directory 1 and the end sequence file judgment data catalogue 1; If invalid, then carry out 1.4.5;
1.4.2 it is whether effective: if effectively, then carry out 1.4.3 according to the data file in beginning sequential file in the data directory 2 and the end sequence file judgment data catalogue 2; If invalid, then carry out 1.4.4;
1.4.3, judge whether the data file of storing under two data catalogues is identical:, then carry out 1.4.6 if identical according to the beginning file sequence of data directory 1 and data directory 2, the relation of end sequence file; If different, then carry out 1.4.4;
1.4.4 the data file under the data directory 1 is all copied to below the data directory 2, carries out 1.4.6 then;
1.4.5 the data file under the data directory 2 is all copied to below the data directory 1, carries out 1.4.6 then;
1.4.6 communication apparatus obtains system data from data directory 1 read data files, begins operate as normal then.
2, the described method of preserving data file in communication facilities of claim 1 is characterized in that described data directory 1 is any in two data catalogues.
3, the described method of in communication facilities, preserving data file of claim 1, it is characterized in that, whether effective method is data file in the described judgment data catalogue: in each data directory, all preserve an identical integer at the beginning sequential file with the end sequence file earlier, the each modification when beginning sequential file and end sequence file, all on the basis of former integer, add 1, if the beginning sequential file is identical with integer in the end sequence file, file in this data directory is effective, otherwise invalid.
4, the described method of in communication facilities, preserving data file of claim 1, it is characterized in that, judge whether identical method is the data file of storing under two data catalogues: earlier preserve identical integer in the beginning sequential file in two data catalogues and the end sequence file, the each modification when beginning sequential file and end sequence file, all on the basis of former integer, add 1, if the integer in the beginning sequential file of two data catalogues is identical, then the data file under two data catalogues is identical, otherwise inequality.
5, the described method of preserving data file in communication facilities of claim 1 is characterized in that, in the time of below the data file below data directory 1 all copies to data directory 2, and the All Files under the first deleted data catalogue 2, and then duplicate; Or below the data file under the data directory 2 all being copied to data directory 1 time, the All Files under the first deleted data catalogue, and then duplicate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2005100343479A CN100407158C (en) | 2005-04-21 | 2005-04-21 | Method for accessing data file of telecommunication apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2005100343479A CN100407158C (en) | 2005-04-21 | 2005-04-21 | Method for accessing data file of telecommunication apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1855059A true CN1855059A (en) | 2006-11-01 |
CN100407158C CN100407158C (en) | 2008-07-30 |
Family
ID=37195244
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2005100343479A Active CN100407158C (en) | 2005-04-21 | 2005-04-21 | Method for accessing data file of telecommunication apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100407158C (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092719A (en) * | 2011-10-28 | 2013-05-08 | 浙江大华技术股份有限公司 | Power-off protection method for file system |
CN109104481A (en) * | 2018-08-07 | 2018-12-28 | Oppo(重庆)智能科技有限公司 | file integrity detection method, file integrity detection device and terminal device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5675725A (en) * | 1993-07-19 | 1997-10-07 | Cheyenne Advanced Technology Limited | Computer backup system operable with open files |
US6317844B1 (en) * | 1998-03-10 | 2001-11-13 | Network Appliance, Inc. | File server storage arrangement |
CA2434644A1 (en) * | 2003-06-30 | 2004-12-30 | Archidata Inc. | System for the certification of plans and specifications produced by construction professionals and clients |
US20050081099A1 (en) * | 2003-10-09 | 2005-04-14 | International Business Machines Corporation | Method and apparatus for ensuring valid journaled file system metadata during a backup operation |
-
2005
- 2005-04-21 CN CN2005100343479A patent/CN100407158C/en active Active
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092719A (en) * | 2011-10-28 | 2013-05-08 | 浙江大华技术股份有限公司 | Power-off protection method for file system |
CN103092719B (en) * | 2011-10-28 | 2016-09-07 | 浙江大华技术股份有限公司 | A kind of power-off protection method of file system |
CN109104481A (en) * | 2018-08-07 | 2018-12-28 | Oppo(重庆)智能科技有限公司 | file integrity detection method, file integrity detection device and terminal device |
CN109104481B (en) * | 2018-08-07 | 2021-09-21 | Oppo(重庆)智能科技有限公司 | File integrity detection method, file integrity detection device and terminal equipment |
Also Published As
Publication number | Publication date |
---|---|
CN100407158C (en) | 2008-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7185165B2 (en) | Invariant memory page pool and implementation thereof | |
AU2001296665B2 (en) | System for identifying common digital sequences | |
AU2005284737B2 (en) | Systems and methods for searching and storage of data | |
US7134041B2 (en) | Systems and methods for data backup over a network | |
US8548953B2 (en) | File deduplication using storage tiers | |
US7251749B1 (en) | Efficient true image recovery of data from full, differential, and incremental backups | |
US7934064B1 (en) | System and method for consolidation of backups | |
US7444361B2 (en) | File folding technique | |
US8024383B2 (en) | Fat directory structure for use in transaction safe file | |
KR101421364B1 (en) | Processing device and write method | |
JP2004500648A (en) | Management method of differential backup system in client server environment | |
WO2010022099A2 (en) | Recovery of a computer that includes virtual disks | |
AU2001296665A1 (en) | System for identifying common digital sequences | |
CN101051285A (en) | File matching method in computer network data backup | |
US20040143609A1 (en) | System and method for data extraction in a non-native environment | |
CN112800019A (en) | Data backup method and system based on Hadoop distributed file system | |
US7581135B2 (en) | System and method for storing and restoring a data file using several storage media | |
US8170991B1 (en) | Method and apparatus for managing image data on a sequential storage device | |
CN115061630A (en) | Data migration method, device, equipment and medium | |
US20120290540A1 (en) | Database recovery by container | |
CN1855059A (en) | Method for accessing data file of telecommunication apparatus | |
EP2402861A1 (en) | Storage system | |
US7685186B2 (en) | Optimized and robust in-place data transformation | |
CN113419897A (en) | File processing method and device, electronic equipment and storage medium thereof | |
US11204893B2 (en) | Methods for facilitating efficient storage operations using variable length encoded segment maps for deduplicated objects and devices thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |