CN102402468B - A kind of data backup loading method of embedded device and data backup charger - Google Patents

A kind of data backup loading method of embedded device and data backup charger Download PDF

Info

Publication number
CN102402468B
CN102402468B CN201010284954.1A CN201010284954A CN102402468B CN 102402468 B CN102402468 B CN 102402468B CN 201010284954 A CN201010284954 A CN 201010284954A CN 102402468 B CN102402468 B CN 102402468B
Authority
CN
China
Prior art keywords
backup
backup data
file
data file
data
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.)
Active
Application number
CN201010284954.1A
Other languages
Chinese (zh)
Other versions
CN102402468A (en
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.)
Mid Star Technology Ltd By Share Ltd
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CN201010284954.1A priority Critical patent/CN102402468B/en
Publication of CN102402468A publication Critical patent/CN102402468A/en
Application granted granted Critical
Publication of CN102402468B publication Critical patent/CN102402468B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of data backup loading method and device of embedded device, described method comprises: select a backup data file in the many parts of backup data files stored from nandflash, load first data block; Described backup data file comprises multiple data block, and the relevant block between this backup data file can be replaced mutually; Select another backup data file in the many parts of backup data files stored from nandflash, load next data block; Until files loading is complete.The data file (as run program file or resource file) of the present invention to backup employs the method that block is replaced, make the replacement of calling program more flexible, the utilization rate of the stand-by program simultaneously made improves, and the efficiency of backup significantly improves, and can reduce backup number.Further, present invention adds the chance mechanism of Backup Data, make the read-write of Backup Data relatively average, the bad block rate of Long-Time Service obviously declines.

Description

A kind of data backup loading method of embedded device and data backup charger
Technical field
The present invention relates to decoding technique field, particularly relate to a kind of data backup loading method and data backup charger of embedded device.
Background technology
Along with the development of informationization technology, embedded system has become the very popular topic of current I T industrial community one.Because it is efficient, low cost, high reliability, the series of advantages such as abundant code and application program extensibility, portability, more and more become the main force of industrial system and civil systems at present, especially, in geo-informatization system, the concept of embedded system (embedded device) is applied to more and more.
The data of general embedded device (such as, application working procedure and resource file) all can be stored in nandflash, along with embedded system (embedded device) is to the increase of data storage requirement, present embedded device more applies MLCnandfiash.
SLC and MLC is the abbreviation of SingleLayerCell single layer cell and Multi-LevelCell multilevel-cell respectively, and the feature of SLC is that cost is high, capacity is little, speed is fast, and the feature of MLC is capacity, and large cost is low, but speed is slow.Each unit of MLC is 2bit, and much more whole one times of relative SLC, capacity is large, low price.But, because the data deposited in each MLC memory cell is more, structure relative complex, along with the number of times of read-write increases, the probability of makeing mistakes can increase.So just there will be program and resource file to be easy to destroy, and these files are once destroyed, be fatal to whole embedded system, therefore prior art is in order to revise these read-write errors, usually all can back up accordingly with regard to program and resource file.
Existing backup scenario usually uses and run program file is backed up many parts, resource file backs up many parts, when mistake appears in first part of file of working procedure, then reads second part of file of working procedure, when mistake appears in the first backup of resource file, then read the second backup of resource file.
Such scheme no doubt can realize data backup, solve the problem worked as file and occur mistake, but it exists some drawbacks, as follows:
One, if the number ratio of run program file and resource file backup is more, then occupies more storage space, compares waste, reduce performance; If but backup negligible amounts, then once certain block mistake of stand-by program, whole stand-by program just all cannot use, then still may occur the vicious situation of file, cause whole embedded device to use.
Its two, when being loaded with backup file, need to carry out CRC check to this backup file, to guarantee that it is no problem, but common run program file and resource file data amount larger, then the verification of whole stand-by program is time-consuming, effort.
In a word, the technical matters needing those skilled in the art urgently to solve at present is exactly: the data backup loading scheme that how innovatively can propose a kind of embedded device, the utilization rate of Backup Data is improved, and the efficiency of backup significantly improves, and can reduce backup number.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of data backup loading method and device of embedded device, in order to solve the inefficient problem of Backup Data in prior art, can Backup Data utilization rate improve, the efficiency of backup significantly improves, and can reduce backup number.
In order to solve the problem, the invention discloses a kind of data backup loading method of embedded device, described method comprises: select a backup data file in the many parts of backup data files stored from nandflash, load first data block; Described backup data file comprises multiple data block, and the relevant block between this backup data file can be replaced mutually; Select another backup data file in the many parts of backup data files stored from nandflash, load next data block; Until files loading is complete.
Preferably, described backup data file is working procedure backup file or resource backup file.
Preferably, described method also comprises: carry out CRC check to data block to be loaded, if verification is correct, then loads; Otherwise, reselect a backup data file.
Preferably, the mode of described another backup data file of selection is Stochastic choice or selects in order.
Preferably, Stochastic choice can be carried out in the following manner: the value obtained random function is got more than N, using this remainder as the foundation selecting backup data file; Wherein, N is the backup quantity of backup data file.
According to another embodiment of the present invention, also disclose a kind of data backup charger of embedded device, described method comprises:
Memory module, for storing many parts of backup data files in nandfiash; Described backup data file comprises multiple data block, and the relevant block between this backup data file can be replaced mutually;
Select module, for selecting a backup data file in many parts of backup data files storing from nandflash;
Load-on module, for by selecting module to determine a backup data file, loads first data block; Then, by selecting module to determine another backup data file, next data block is loaded; Until files loading is complete.
Preferably, described backup data file is working procedure backup file or resource backup file.
Preferably, this data backup charger can also comprise: correction verification module, for carrying out CRC check to data block to be loaded, if verification is correct, then notifies that load-on module loads; Otherwise notice load-on module reselects a backup data file,
Preferably, the mode of described another backup data file of selection is Stochastic choice or selects in order.
Preferably, described selection module specifically comprises:
Remainder submodule, the value for obtaining random function is got more than N; Wherein, N is the backup quantity of backup data file;
Determine submodule, for using this remainder as the foundation selecting backup data file, determine required backup data file.
Compared with prior art, the present invention has the following advantages:
The data file (as run program file or resource file) of the present invention to backup employs the method that block is replaced, make the replacement of calling program more flexible, the utilization rate of the stand-by program simultaneously made improves, and the efficiency of backup significantly improves, and can reduce backup number.
Further, present invention adds the chance mechanism of Backup Data, make the read-write of Backup Data relatively average, the bad block rate of Long-Time Service obviously declines;
In addition, in the loading procedure of program, the block of CRC check mistake is less, and the operational efficiency of program also significantly improves.
Accompanying drawing explanation
Fig. 1 is the data backup loading method process flow diagram of a kind of embedded device of the present invention;
Fig. 2 is that of backup file of the present invention stores schematic diagram;
Fig. 3 is the process flow diagram of the data backup loading method of the another kind of embedded device of the present invention;
Fig. 4 is the structural representation of the data backup charger of a kind of embedded device of the present invention.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
One of core concept of the present invention is: the present invention uses block to replace backup mode, namely the block that between stand-by program or resource, logic is identical can at random be replaced, mutually as the 1st block of the 1st stand-by program and the 1st block of the 2nd stand-by program can be replaced mutually; The present invention simultaneously realizes the random Exchange rings of each backup file, namely during loading procedure, be not start to load at the 1st stand-by program or resource, but by random loading mechanism, select arbitrary stand-by program or resource to start to load, namely can get the 1st logical block from the 2nd stand-by program, then at the 2nd block to fetch logic in the 1st stand-by program, then get the 3rd logical block the 4th backup, the rest may be inferred, is combined into a complete working procedure or resource.
With reference to Fig. 1, show the data backup loading method embodiment of a kind of embedded device of the present invention, described method specifically comprises:
Select a backup data file in step 101, many parts of backup data files storing from nandflash, load first data block; Described backup data file comprises multiple data block, and the relevant block between this backup data file can be replaced mutually;
For embedded system, usually required data file can be divided into run program file and resource file, and namely backup data file of the present invention can be working procedure backup file or resource backup file.In actual applications, the present invention can carry out selection for working procedure backup file and load, and also can carry out selection for resource backup file and load, and certainly, the two is all association usually.In embodiment below illustrates, stand-by program or resource backup printed words may be adopted to be described.
With reference to Fig. 2, one that shows backup file of the present invention stores schematic diagram, the working procedure of embedded device and resource are all stored on nandflash, each program and resource have N part to back up, each stand-by program or resource are stored in continuously on nandflash and (eliminate the bad block of nandflash here), such as, a backup file in Fig. 2 comprises n blcok.The content that this makes it possible to the logical block ensureing each stand-by program or resource is identical, is convenient to replace.In the earlier stored backup file information of each backup file, record the memory location of each backup file.
Select another backup data file in step 102, many parts of backup data files storing from nandflash, load next data block; Until files loading is complete.
In a preferred embodiment of the invention, also comprise and CRC check is carried out to data block to be loaded, if verification is correct, then load; Otherwise, reselect a backup data file.Because load time and do not know that this data block is bad, so can by CRC check to determine whether this data block exists mistake, if there is no mistake, then directly load, if verification is not passed through, M the data block (this data block to be loaded) that current backup data file is then described is bad, therefore needs to reselect a backup data file.
After reselecting a backup data file, still to carry out CRC check to its M data block (this data block to be loaded), if verification is correct, then load; Otherwise, continue to reselect a backup data file.
In a preferred embodiment of the invention, the mode of described another backup data file of selection is Stochastic choice; Certainly, also can for select in order.
Have in the prior art and much realize random scheme, the present invention can adopt, and, the present invention this also provide one preferably, better simply realization.Concrete, first can obtain a value by random function, then obtained value got to (ensureing like this to exceed backup quantity) more than N, the foundation using this remainder as selection backup data file; Wherein, N is the backup quantity of backup data file.
With reference to Fig. 3, show the working procedure backup loading method embodiment of the another kind of embedded device of the present invention, described method specifically comprises:
Step 301, embedded device bring into operation;
Step 302, boot loader; Such as, by the bootstrap loader of bootloader;
Step 303, loading procedure can obtain the information of stand-by program from preset address, such as, and the quantity of stand-by program and memory address etc.;
Step 304, foundation backup information back up loading at random;
Step 305, load next logical block (if start load, then load first block);
Whether step 306, judge to load and terminate, namely to judge in backup file whether also there is the logical block that can load, if do not had, then explanation loading, whole loadeds if finishing, then can end operation;
If step 307 finds to there is the logical block that can load in the backup file of current selection, then illustrate that backup file has not read, then obtain random archive index, in this stand-by program, load required M logical block (M, from 1, superposes after each execution);
Whether the block CRC that step 308, judgement load is correct;
If step 309 is correct, then load this logical block to the memory field run; And return step 305, load next logical block;
If step 310 CRC check is incorrect, then carry out block replacement, namely Stochastic choice is carried out to other stand-by programs except this backup;
Step 311, for select stand-by program continue loading M logical block (namely the index value of logical block is constant), return step 308, CRC check carried out to M logical block of the new stand-by program that this is added in.
Circulation performs above-mentioned steps, until all load end, embedded device can carry out having run based on correct run program file and resource file.Certainly, the file data run in its internal memory is combined by the different pieces of information block of multiple backup file to obtain.
With reference to Fig. 4, show the data backup charger embodiment of a kind of embedded device of the present invention, it specifically can comprise:
Memory module 401, for storing many parts of backup data files in nandflash; Described backup data file comprises multiple data block, and the relevant block between this backup data file can be replaced mutually; Described backup data file is working procedure backup file or resource backup file.
Select module 402, for selecting a backup data file in many parts of backup data files storing from nandflash; The mode of described another backup data file of selection is Stochastic choice or selects in order.
Load-on module 403, for by selecting module to determine a backup data file, loads first data block; Then, by selecting module to determine another backup data file, next data block is loaded; Until files loading is complete.
In a preferred embodiment of the invention, also comprising correction verification module 404, for carrying out CRC check to data block to be loaded, if verification is correct, then notifying that load-on module 403 loads; Otherwise notice load-on module 403 reselects a backup data file,
The present invention preferably adopts the mode of Stochastic choice, like this, can realize the average reading of backup file data block, instead of the frequent data block reading certain several backup file, like this, the read-write between backup file can be made relatively average, reduce bad block rate.
When adopting Stochastic choice mode, described selection module specifically can comprise:
Remainder submodule, the value for obtaining random function is got more than N; Wherein, N is the backup quantity of backup data file;
Determine submodule, for using this remainder as the foundation selecting backup data file, determine required backup data file.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Above the data backup loading method of a kind of embedded device provided by the present invention and data backup charger are described in detail, apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. a data backup loading method for embedded device, is characterized in that, described method comprises:
Stochastic choice backup data file in the many parts of backup data files stored from nandflash, loads first data block; Described backup data file comprises multiple data block, and the relevant block between this backup data file can be replaced mutually; Wherein, described many parts of backup data files are stored on nandflash respectively continuously;
Select another backup data file in the many parts of backup data files stored from nandflash, load next data block; Until files loading is complete;
CRC check is carried out to data block to be loaded, if verification is correct, then loads; Otherwise, reselect a backup data file.
2. the method for claim 1, is characterized in that, described backup data file is working procedure backup file or resource backup file.
3. the method for claim 1, is characterized in that, the mode of described another backup data file of selection is Stochastic choice or selects in order.
4. method as claimed in claim 3, is characterized in that, carry out Stochastic choice in the following manner:
The value obtained random function gets the remainder of N, using this remainder as the foundation selecting backup data file; Wherein, N is the backup quantity of backup data file.
5. a data backup charger for embedded device, is characterized in that, described device comprises:
Memory module, for storing many parts of backup data files in nandflash; Described backup data file comprises multiple data block, and the relevant block between this backup data file can be replaced mutually; Wherein, described many parts of backup data files are stored on nandflash respectively continuously;
Select module, for Stochastic choice backup data file in many parts of backup data files storing from nandflash;
Load-on module, for by selecting module to determine a backup data file, loads first data block; Then, by selecting module to determine another backup data file, next data block is loaded; Until files loading is complete;
Correction verification module, for carrying out CRC check to data block to be loaded, if verification is correct, then notifies that load-on module loads; Otherwise notice load-on module reselects a backup data file.
6. data backup charger as claimed in claim 5, it is characterized in that, described backup data file is working procedure backup file or resource backup file.
7. data backup charger as claimed in claim 5, it is characterized in that, the mode of described another backup data file of selection is Stochastic choice or selects in order.
8. data backup charger as claimed in claim 5, it is characterized in that, described selection module specifically comprises:
Remainder submodule, the value for obtaining random function gets the remainder of N; Wherein, N is the backup quantity of backup data file;
Determine submodule, for using this remainder as the foundation selecting backup data file, determine required backup data file.
CN201010284954.1A 2010-09-16 2010-09-16 A kind of data backup loading method of embedded device and data backup charger Active CN102402468B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010284954.1A CN102402468B (en) 2010-09-16 2010-09-16 A kind of data backup loading method of embedded device and data backup charger

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010284954.1A CN102402468B (en) 2010-09-16 2010-09-16 A kind of data backup loading method of embedded device and data backup charger

Publications (2)

Publication Number Publication Date
CN102402468A CN102402468A (en) 2012-04-04
CN102402468B true CN102402468B (en) 2016-01-20

Family

ID=45884696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010284954.1A Active CN102402468B (en) 2010-09-16 2010-09-16 A kind of data backup loading method of embedded device and data backup charger

Country Status (1)

Country Link
CN (1) CN102402468B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473098A (en) 2013-09-10 2013-12-25 华为技术有限公司 Starting method of boot program and relevant device
CN111078307A (en) * 2019-12-19 2020-04-28 迈普通信技术股份有限公司 Starting method and device of embedded equipment, embedded equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6487561B1 (en) * 1998-12-31 2002-11-26 Emc Corporation Apparatus and methods for copying, backing up, and restoring data using a backup segment size larger than the storage block size
CN1794190A (en) * 2004-12-22 2006-06-28 国际商业机器公司 Method for storing and restoring a data file using several storage media
CN101118508A (en) * 2007-08-24 2008-02-06 成都索贝数码科技股份有限公司 Safety storage method for data
CN101241457A (en) * 2007-02-09 2008-08-13 国际商业机器公司 Destage management method and system of redundant data copies

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6487561B1 (en) * 1998-12-31 2002-11-26 Emc Corporation Apparatus and methods for copying, backing up, and restoring data using a backup segment size larger than the storage block size
CN1794190A (en) * 2004-12-22 2006-06-28 国际商业机器公司 Method for storing and restoring a data file using several storage media
CN101241457A (en) * 2007-02-09 2008-08-13 国际商业机器公司 Destage management method and system of redundant data copies
CN101118508A (en) * 2007-08-24 2008-02-06 成都索贝数码科技股份有限公司 Safety storage method for data

Also Published As

Publication number Publication date
CN102402468A (en) 2012-04-04

Similar Documents

Publication Publication Date Title
EP2294510B1 (en) Method and apparatus for error correction according to erase counts of a solid-state memory
CN103632722B (en) Memory system, program method thereof, and computing system including the same
CN109901794B (en) Apparatus and method for operating garbage collection using host idleness
CN101923448A (en) Method for reading and writing conversion layer of NAND flash memory
CN101515276B (en) Method for write operation of file data, and recovery method and recovery system for file data
CN103415840A (en) Error management across hardware and software layers
WO2006052321A2 (en) System and method of reading non-volatile computer memory
US20090328057A1 (en) System and method for reservation station load dependency matrix
CN1567262A (en) On-line data backup method based on data volume snapshot
CN102239477A (en) Continuous address space in non-volatile-memories (nvm) using efficient management methods for array deficiencies
CN101782871A (en) Information processing device, processor and memory management method
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
US20200310926A1 (en) Apparatus and method for reducing cell disturb in an open block of a memory system during a receovery procedure
CN103366831A (en) Detection method for memory
CN102096557A (en) Capacity expansion method, device and system for independent redundant array of inexpensive disc (RAID)
CN107729174B (en) Memory device, method of storing data thereof, and controller thereof
US20150199152A1 (en) Method of managing redundant array of independent disks (raid) groups in a solid state disk array
CN105573680A (en) Storage method and device for replicated data
TW201321978A (en) Electronic system and memory managing method thereof
CN102402468B (en) A kind of data backup loading method of embedded device and data backup charger
WO2005088448A1 (en) Method and apparatus for reliable in-place update
CN101246429A (en) Electronic systems using flash memory modules as main storage and related system booting methods
CN101086715A (en) Method and device for reading CPU code
CN105302679A (en) Detection method and system for intelligent terminal storage stability
CN102681918B (en) Data storage and backup method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C53 Correction of patent for invention or patent application
CB03 Change of inventor or designer information

Inventor after: Zhang Yinong

Inventor after: Ai Guo

Inventor before: Ai Guo

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: AI GUO TO: ZHANG YINONG AI GUO

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20171221

Address after: 100083 Haidian District, Xueyuan Road, No. 35, the world building, the second floor of the building on the ground floor, No. 16

Patentee after: Zhongxing Technology Co., Ltd.

Address before: 100083 Haidian District, Xueyuan Road, No. 35, the world building, the second floor of the building on the ground floor, No. 16

Patentee before: Beijing Vimicro Corporation

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100083 Haidian District, Xueyuan Road, No. 35, the world building, the second floor of the building on the ground floor, No. 16

Patentee after: Mid Star Technology Limited by Share Ltd

Address before: 100083 Haidian District, Xueyuan Road, No. 35, the world building, the second floor of the building on the ground floor, No. 16

Patentee before: Zhongxing Technology Co., Ltd.