CN101216789A - Data update method, device and system - Google Patents

Data update method, device and system Download PDF

Info

Publication number
CN101216789A
CN101216789A CNA2008100003697A CN200810000369A CN101216789A CN 101216789 A CN101216789 A CN 101216789A CN A2008100003697 A CNA2008100003697 A CN A2008100003697A CN 200810000369 A CN200810000369 A CN 200810000369A CN 101216789 A CN101216789 A CN 101216789A
Authority
CN
China
Prior art keywords
data
storage medium
updated
backup
write
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
CNA2008100003697A
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.)
Fujian Star Net Communication Co Ltd
Original Assignee
Fujian Star Net Communication 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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CNA2008100003697A priority Critical patent/CN101216789A/en
Publication of CN101216789A publication Critical patent/CN101216789A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a data updating method, a device and a system for ensuring the data integrity during the data updating process, wherein the data updating method includes the following steps: the data to be updated which is memorized in a first storage medium is read and modified in a second storage medium with volatility, thus the updating data is obtained after being modified; the updating data is backed-up in a third storage medium which is nonvolatile; if current failure occurs when the updating data in the second storage medium is utilized to update the data to be updated in the first storage medium, the backup data which is backed-up in the third storage medium is written to the first storage medium.

Description

Data-updating method, Apparatus and system
Technical field
The present invention relates to electronic applications, relate in particular to data-updating method, Apparatus and system.
Background technology
When the switch that test is produced, wherein one test technology is 24 hours roasting machine technology: in specific environment, treat the test cross circulation of changing planes and carry out some aging and durability tests, test continues 24 hours at least; After test was finished each time, test result will be saved in the nonvolatile random access memory flash memory (Flash) of switch, so that the production test personnel check and judge according to test result whether this switch is qualified with the form of record.
For Flash, owing to can not be that unit makes amendment to the data of its storage, and normally be that unit comes the data of its stored are made amendment with the sector with the byte, therefore if desired the data of Flash stored are made amendment, then need be by internal memory:
At first the data read to be updated in the Flash is arrived internal memory, revise described data then in internal memory, will revise the more new data that obtains after these data more at last and write Flash, wherein internal memory is a volatile memory, and after outage, the data of its storage will be lost.
Fig. 1 upgrades the process flow diagram of the data of storing among the Flash for prior art, if the sector at data to be updated place is called destination sector, then as known in the figure, the described flow process of upgrading the data of storing among the Flash is:
Step 101 reads the data to be updated of destination sector among the Flash, and deposits in the internal memory;
Step 102 is revised the described data to be updated that deposit at internal memory, obtains more new data;
Step 103, the data to be updated of destination sector storage among the deletion Flash;
Step 104 writes destination sector with described more new data.
Owing to when interior existence is cut off the power supply, will lose the data of its storage, therefore, might cause loss of data based on the data of aforesaid way online updating Flash stored:
Cut off the power supply in A point to a certain moment between the B point, will make renewal loss of data in the internal memory, and all or part of deletion of data to be updated of destination sector at this moment, and more new data does not all write destination sector as yet, therefore will influence the integrality of data among the Flash.
For switch test, the process of new test record being added to data in the process of Flash and the above-mentioned renewal Flash is similar: at first several thousand test records with some sectors stored read out, then in conjunction with new test record, form amended test record, and write this sector, if therefore in ablation process, cut off the power supply, then might make existing test record lose, thereby need test again, increase testing cost, reduce the problem of testing efficiency.
In addition for the similar storage medium of Flash, for example compact flash cards etc. can not be the more storage medium of new data of unit with the byte, and the system that uses these storage medium stores data, all kinds of embedded systems such as switch for example, when carrying out Data Update, above-mentioned similar problem is arranged all generally.
Summary of the invention
The embodiment of the invention provides data-updating method, Apparatus and system, to guarantee the integrality of data in data updating process.
The embodiment of the invention provides a kind of data-updating method, comprises step: the data read to be updated that will be stored in first storage medium is made amendment in volatibility second storage medium, obtains amended more new data; With described renewal data backup in non-volatile the 3rd storage medium; If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described second storage medium, after follow-up powering on, the Backup Data of described backup in the 3rd storage medium write first storage medium.
The embodiment of the invention also provides a kind of data update apparatus, comprising: the data modification unit, be used for the data read to be updated that is stored in first storage medium is made amendment in volatibility second storage medium, and obtain amended more new data; The data backup unit is used for described renewal data backup at non-volatile the 3rd storage medium; Data write unit, be used for if cut off the power supply in the process of the data to be updated in utilizing renewal Data Update first storage medium of described second storage medium, after follow-up powering on, the Backup Data of described backup in the 3rd storage medium write first storage medium.
The embodiment of the invention also provides a kind of data update system, comprising: be used to store first storage medium of data to be updated, volatibility second storage medium, data update apparatus and non-volatile the 3rd storage medium; Wherein data update apparatus is used for the data read to be updated that is stored in first storage medium is made amendment in second storage medium, obtains amended more new data; And with described renewal data backup in the 3rd storage medium; If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described second storage medium, after follow-up powering on, the Backup Data of described backup in the 3rd storage medium write first storage medium.
The embodiment of the invention also provides a kind of data-updating method, comprises step: will be stored in data backup to be updated in first storage medium in non-volatile second storage medium; Data read described to be updated in first storage medium is made amendment in volatibility the 3rd storage medium, obtain amended more new data; If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described the 3rd storage medium, after follow-up powering on, the Backup Data of described backup in second storage medium write first storage medium.
The embodiment of the invention also provides a kind of data update apparatus, comprising: the data backup unit is used for and will be stored in the data backup to be updated of first storage medium in non-volatile second storage medium; The data modification unit is used for the data read described to be updated of first storage medium is made amendment in volatibility the 3rd storage medium, obtains amended more new data; Data write unit, be used for if cut off the power supply in the process of the data to be updated in utilizing renewal Data Update first storage medium of described the 3rd storage medium, after follow-up powering on, the Backup Data of described backup in second storage medium write first storage medium.
The embodiment of the invention also provides a kind of data update system, comprise: first storage medium that is used to store data to be updated, volatibility the 3rd storage medium, data update apparatus and non-volatile second storage medium, wherein data update apparatus is used for and will be stored in the data backup to be updated of first storage medium in second storage medium; And, obtain amended more new data with making amendment in data read to the three storage mediums described to be updated in first storage medium; If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described the 3rd storage medium, after follow-up powering on, the Backup Data of described backup in second storage medium write first storage medium.
The embodiment of the invention is in the process of carrying out Data Update, by backing up data to be updated and/or backup updating data, even make the situation that outage in data updating process, occurs, also because described data to be updated and/or more new data back up, thereby guaranteed the integrality of data, thereby avoided adopting the available data renewal technology to carry out the sorts of systems of Data Update, has the variety of issue that causes owing to data are imperfect, for example in the test process of switch, need test again because data are imperfect, cause testing cost to increase, reduce the problem of testing efficiency.
Description of drawings
Fig. 1 upgrades the process flow diagram of the data of storing among the Flash for prior art;
Fig. 2 is the process flow diagram of first kind of data-updating method of embodiment of the invention proposition;
Fig. 3 is the implementation process synoptic diagram of first embodiment of the invention;
Fig. 4 is the structural representation of first kind of data update system of embodiment of the invention proposition;
Fig. 5 is the process flow diagram of second kind of update scheme of embodiment of the invention proposition;
Fig. 6 is the implementation process synoptic diagram of second embodiment of the invention;
Fig. 7 is the structural representation of second kind of data update system of embodiment of the invention proposition.
Embodiment
The problem of mentioning at background technology, the embodiment of the invention proposes: upgrade in the process of Flash destination sector data to be updated, by the data to be updated of destination sector and/or the renewal data in the internal memory are backuped in the non-volatile memory medium, to between the B point, cut off the power supply at A even make, cause upgrading in the internal memory loss of data, when making the data of destination sector imperfect, then can be with the data to be updated or the new data more of backup, be written to destination sector, guarantee the integrality of the data of Flash storage.The embodiment of the invention can not carry out can realizing the integrity protection of data in the data updating process under the situation of any hardware modifications like this with on other sectors in Flash of the renewal data backup in data to be updated and/or the internal memory in addition.
For example suppose in the data that begin to delete destination sector among the Flash, to in the internal memory more new data all write in the process of destination sector and cut off the power supply, then the data of destination sector are imperfect at this moment, and upgrade loss of data in the internal memory.Under backup updating data conditions, after re-powering, can delete the incomplete data of destination sector like this, the Backup Data of new data is more write destination sector, can guarantee the integrality of destination sector data equally.
Below in conjunction with accompanying drawing, respectively concrete the elaboration in the embodiment of the invention in the backup updating data conditions and back up under the data conditions to be updated, carried out the process of Data Update.
First kind of scheme: backup updating data.
Be called first storage medium if will store the storage medium (for example storage medium such as Flash) of data to be updated, the volatile storage medium (for example storage medium such as internal memory) that will be used for the storage update data is called second storage medium, the non-volatile memory medium of the Backup Data of storage update data is called the 3rd storage medium, then this scheme is described below:
Fig. 2 is the process flow diagram of first kind of data-updating method of embodiment of the invention proposition, and as known in the figure, the flow process of first kind of data-updating method comprises:
Step 1 is made amendment the data read to be updated that is stored in first storage medium in volatibility second storage medium, obtain amended more new data;
Described modification comprises adds new data, deleted data, revises the operations such as numerical value of data.
Step 2, with described renewal data backup in non-volatile the 3rd storage medium;
Wherein according to actual conditions, when first storage medium is non-volatile memory medium, can select first storage medium to be used for the backup updating data, also can select other non-volatile memory mediums to come the backup updating data, be that non-volatile the 3rd storage medium can be same storage medium or different storage mediums with first storage medium, only need reach and get final product in the purpose of non-volatile memory medium upgrading data backup.
Step 3 if cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described second storage medium, after follow-up powering on, writes first storage medium with the Backup Data of described backup in the 3rd storage medium.
Wherein the renewal process of step 3 can be the data to be updated of deleting earlier in first storage medium, again the more new data in second storage medium is write first storage medium, this moment, this renewal process was in the data to be updated that begin to delete in first storage medium, to the process that the more new data in second storage medium is all write first storage medium; If first storage medium possesses following characteristic: when the storage area that stores data writes data, the data that write can cover original data, then need not to delete the data to be updated in first storage medium, write direct and get final product, described renewal process was the more new data in second storage medium was begun to write first storage medium this moment, to the ablation process that all writes first storage medium.
In this step, cut off the power supply, after follow-up the powering on, need judge outage and whether occur in said process, to determine whether that Backup Data is write first storage medium.
Because before outage occurs in the renewal process of step 3, first storage medium will store complete data to be updated; After outage occurs in described renewal process, first storage medium will store complete more new data; When outage occurs in the described renewal process, owing to be in renewal process, first storage medium will can not store complete data to be updated, also can not store complete more new data.
Therefore in the process of Data Update, cut off the power supply, then after follow-up powering on, can judge whether outage occurs in the renewal process of step 3 by following process:
Judge whether first storage medium stores complete data to be updated or complete more new data, if store complete data to be updated or complete more new data, show that then outage does not occur in the renewal process in the step 3, otherwise, do not store complete more new data and complete data to be updated if judge first storage medium, then can judge outage and occurring in the renewal process in the step 3.
The judgement of data integrity can be accomplished in several ways, for example special format, use check code or the use signature etc. by detecting data.
This is external Backup Data in non-volatile the 3rd storage medium is write first storage medium before, may also need to delete the data to be updated of not deleted in first storage medium, the partial update data that perhaps write, and then more the Backup Data of new data writes.Certainly this is optional, because first storage medium may possess such characteristic: when the storage area that stores data writes data, the data that write can cover original data, promptly need not to delete this storage area legacy data, can write new data.
Set forth first kind of technical scheme with specific embodiment below:
Embodiment one
For corresponding with background technology, select Flash as first storage medium, data storage to be updated is called destination sector in the sector of this Flash; Select internal memory as volatibility second storage medium, select in addition to upgrade data backup another sector at this Flash, be called the alternate sector, promptly selecting non-volatile the 3rd storage medium and first storage medium is same storage medium.
Fig. 3 is the implementation process synoptic diagram of first embodiment of the invention, and in conjunction with this figure as can be known, the process that embodiment one carries out Data Update comprises:
Step 201, with the data read to be updated of destination sector to internal memory;
Step 202 is revised data to be updated in internal memory, obtain more new data;
Step 203 will be upgraded the alternate sector of data backup in Flash;
If this alternate sector has stored Backup Data, the Backup Data deletion of this alternate sector will be able to be upgraded data again and will be backuped to this alternate sector.
Step 204, the data of wiping destination sector;
Step 205, the more new data with in the internal memory writes destination sector.
If, cut off the power supply beginning to carry out above-mentioned steps 204 to the process of completing steps 205, then after follow-up powering on, can take following data recovery measure, guarantee the integrality of data:
Whether the data of judging destination sector are complete; And
Under incomplete situation, the data of deletion destination sector; And
The Backup Data of alternate sector is write destination sector.
Described with the Backup Data in the alternate sector write destination sector can but be not limited to read the destination sector from internal memory again by Backup Data is read internal memory, for example can also directly Backup Data be written to destination sector from the alternate sector by DMA.
By said process, the data integrity of destination sector just can be guaranteed.
If the generation outage causes the renewal loss of data in the internal memory before the C point, then also deletion of the data in the destination sector, the integrality of data is guaranteed.
If the generation outage causes the renewal loss of data in the internal memory between C point and D point, though the Backup Data of storage update data integrity not also in alternate sector this moment then, but same owing to the data of also not deleting destination sector, so the integrality of data still can be guaranteed.
If cut off the power supply at the D point, then the data of destination sector are complete, but the alternate sector has stored the more Backup Data of new data, therefore at this moment both the Backup Data of alternate sector can be write destination sector, can this Backup Data not write destination sector yet, no matter adopt any processing mode, all guaranteed the integrality of data.
Guarantee if desired also Backup Data to be write destination sector in the outage of D point in this case, then can in the data recovery measure, increase following step:
Under the situation of judging the destination sector data integrity, continue to judge whether the alternate sector has stored the more Backup Data of new data, if then Backup Data is write destination sector.
Wherein judge the alternate sector whether stored the Backup Data of new data more mode can for:
Whether the data of judging the alternate sector are complete, and under complete situation, the time of which modification of data of judgement alternate sector and destination sector is later, if the data modification time of alternate sector is later, can determine that so the alternate sector has stored the more Backup Data of new data.
If cause renewal loss of data in the internal memory to outage takes place between the E point at the D point, the data of judging destination sector this moment are imperfect, so the data of alternate sector are write destination sector, because at this moment the alternate sector has stored the more Backup Data of new data, therefore by this Backup Data is written to destination sector, also guaranteed the integrality of data.
Step 205 is that the more new data in the internal memory is write destination sector in addition, and in fact, since will upgrade data backup in the alternate sector, then step 205 also can be written to destination sector with the Backup Data of alternate sector, realizes the purpose of Data Update equally.
Embodiment one is by backing up new data more in data updating process, avoided in data updating process, cutting off the power supply in the prior art, may cause data in EMS memory to be lost, cause the incomplete problem of data in the destination sector, guaranteed the data integrity of destination sector in the data updating process.
At first kind of scheme, the embodiment of the invention has proposed first kind of data update system and data update apparatus, to guarantee the integrality of data in the data updating process, wherein said data update apparatus is the executive agent of above-mentioned flow process, step etc., on physical entity to microprocessor etc. should be arranged.For simplicity, embodiment of the invention unification is called data update apparatus.
Fig. 4 is the structural representation of first kind of data update system of embodiment of the invention proposition, and as known in the figure, this system comprises first storage medium 10 that is used to store data to be updated, volatibility second storage medium 20, and non-volatile the 3rd storage medium 30, and
Data update apparatus 40 is used for the data read to be updated that is stored in first storage medium 10 is made amendment in second storage medium 20, obtains amended more new data; And with described renewal data backup in the 3rd storage medium 30; If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium 10 in utilizing described second storage medium 20, after follow-up powering on, the Backup Data of described backup in the 3rd storage medium 30 write first storage medium 10.
Wherein said first storage medium 10 and the 3rd storage medium 30 can be same storage medium, also can be different storage mediums.
In addition, by this Fig. 4 as can be known, data update apparatus 40 comprises:
Data modification unit 41 is used for the data read to be updated that is stored in first storage medium 10 is made amendment in volatibility second storage medium 20, obtains amended more new data;
Data backup unit 42 is used for described renewal data backup at non-volatile the 3rd storage medium 30;
Data write unit 43, be used for if cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium 10 that utilizes described second storage medium 20, after follow-up powering on, the Backup Data of described backup in the 3rd storage medium 30 write first storage medium 10.
In addition because before Backup Data being write first storage medium 10, may also need the data to be updated of not deleted with in first storage medium 10, the partial update data deletion that has perhaps write, so data update apparatus 40 can also comprise:
Data delete unit 44 is used for deleting the data to be updated of not deleted in first storage medium 10 before data write unit 43 writes first storage medium 10 with described Backup Data, perhaps has been written to the partial update data in first storage medium 10.
First kind of data update apparatus 40 that the embodiment of the invention proposes, more new data backs up in data updating process, realized the purpose that guarantees data integrity, the incomplete problem of data that the loss of data that may bring when having avoided adopting prior art to carry out Data Update causes.
Second kind of scheme backs up data to be updated
In this programme, by backing up the integrality that data to be updated guarantee data.After data updating process backs up data to be updated, even beginning to delete data to be updated, to will be more new data all write in the process of storage medium at data to be updated place, causing upgrading loss of data owing to cut off the power supply, and data to be updated by all or part of deletion, under the situation that more new data does not also all write, can be written to the storage medium at data to be updated place by Backup Data, guarantee the integrality of data data to be updated.
Be called first storage medium if will store the storage medium (for example storage medium such as Flash) of data to be updated, the volatile storage medium (for example storage medium such as internal memory) that the non-volatile memory medium that will be used to store the Backup Data of data to be updated is called second storage medium and will be used for the storage update data is called the 3rd storage medium, then this scheme is described below:
Fig. 5 is the process flow diagram of second kind of update scheme of embodiment of the invention proposition, and as known in the figure, the flow process of second kind of scheme comprises:
Step a will be stored in data backup to be updated in first storage medium in non-volatile second storage medium;
Step b makes amendment the data read described to be updated in first storage medium in volatibility the 3rd storage medium, obtain amended more new data;
Step c if cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described the 3rd storage medium, after follow-up powering on, writes first storage medium with the Backup Data of described backup in second storage medium.
Similar with scheme one, among the step c, cut off the power supply, after follow-up the powering on, also need to judge outage and whether occur in said process, to determine whether that Backup Data is write first storage medium, wherein judging means can adopt and scheme one similar means, repeats no more herein.
Similar with scheme one in addition, before Backup Data is write first storage medium, may also need to delete the data to be updated of not deleted in first storage medium, the partial update data that perhaps write, and then more the Backup Data of new data writes.Certainly this is optional.
Set forth second kind of scheme below by specific embodiment:
Embodiment two
Still suppose the sector of data storage to be updated in Flash, be called destination sector, promptly first storage medium is Flash; With the another one sector of data backup to be updated at this Flash, be called the alternate sector, promptly non-volatile second storage medium also is this Flash, in this external renewal process, data read to be updated is revised in internal memory, and promptly volatibility the 3rd storage medium is an internal memory.
Fig. 6 is the implementation process synoptic diagram of second embodiment of the invention, and as known in the figure, the process that this embodiment carries out Data Update is:
Step 301, with the data read to be updated of destination sector to internal memory;
Step 302 is with the alternate sector of data backup to be updated in Flash;
If this alternate sector has stored Backup Data, the Backup Data deletion of this alternate sector can be backuped to this alternate sector with data to be updated again.
Step 303 is revised data to be updated in internal memory, obtain more new data;
Step 304, the data of wiping destination sector;
Step 305, the more new data with in the internal memory writes destination sector.
If, cut off the power supply beginning to carry out above-mentioned steps 304 to the process of completing steps 305, then after follow-up powering on, also can take above-mentioned data recovery measure, guarantee the integrality of data:
Whether the data of judging destination sector are complete; And
Under incomplete situation, the data of deletion destination sector; And
The Backup Data of alternate sector is write destination sector.
By said process, the data integrity of destination sector can be guaranteed.
If outage causes the loss of data in the internal memory before the F point, then because also do not begin to delete the data to be updated in the destination sector this moment, the data of destination sector are kept perfectly.
If cause renewal loss of data in the internal memory in F point to outage between the G point, then the data of destination sector are imperfect at this moment, but the alternate sector stores the Backup Data of data integrity to be updated, so by the incomplete data of deletion destination sector, and Backup Data write destination sector, can guarantee the integrality of destination sector data.
Embodiment two is by backup data to be updated, even make and cut off the power supply in data updating process, then because backed up data to be updated, by after follow-up powering on, carries out the data recovery, can guarantee the integrality of destination sector data.
At second kind of Data Update scheme that the embodiment of the invention proposes, the embodiment of the invention has also proposed second kind of data update system and data update apparatus, to guarantee the integrality of data in the data updating process.
Fig. 7 is the structural representation of second kind of data update system of embodiment of the invention proposition, as known in the figure, described system comprises first storage medium 50 that is used to store data to be updated, non-volatile second storage medium 60 and volatibility the 3rd storage medium 70, and
Data update apparatus 80 is used for and will be stored in the data backup to be updated of first storage medium 50 in second storage medium 60; And, obtain amended more new data with making amendment in data read to the described to be updated three storage mediums 70 in first storage medium 50; If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium 50 in utilizing described the 3rd storage medium 70, after follow-up powering on, the Backup Data of described backup in second storage medium 60 write first storage medium 50.
Wherein said first storage medium 50 and second storage medium 60 can be same storage medium, also can be different storage mediums.
In addition, equally by this Fig. 7 as can be known, second kind of data update apparatus 80 comprises:
Data backup unit 81 is used for and will be stored in the data backup to be updated of first storage medium 50 in non-volatile second storage medium 60;
Data modification unit 82 is used for the data read described to be updated of first storage medium 50 is made amendment in volatibility the 3rd storage medium 70, obtains amended more new data;
Data write unit 83, be used for if cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium 50 that utilizes described the 3rd storage medium 70, after follow-up powering on, the Backup Data of described backup in second storage medium 60 write first storage medium 50.
In addition because before Backup Data being write first storage medium 50, may also need the data to be updated of not deleted with in first storage medium 50, the partial update data deletion that has perhaps write, so data update apparatus 80 can also comprise:
Data delete unit 84 is used for deleting the data to be updated of not deleted in first storage medium 50 before data write unit 83 writes first storage medium 50 with described Backup Data, perhaps has been written to the partial update data in first storage medium 50.
Second kind of data update apparatus 80 that the embodiment of the invention proposes, realized in data updating process, data to be updated being backed up, realized the purpose that guarantees data integrity, the loss of data that may bring when having avoided adopting prior art to carry out Data Update causes the incomplete problem of data in the destination sector.
Storage medium such as Flash is widely used in embedded system in addition, in embedded system, when data-updating method by prior art or device come more new data, can not guarantee owing to data integrity probably, bring various losses, especially those use Flash to preserve the embedded system of running log, because every log record is smaller, a sector often comprises thousands of records, and write frequent, it is easier because system's power down makes daily record lose, cause all kinds of losses, for example the described needs of background technology are tested switch again, increase the switch test cost, reduce problems such as testing efficiency, therefore embedded system adopts the data update apparatus that the embodiment of the invention proposes, method or system carry out Data Update, it is imperfect to solve above-mentioned data, especially can solve the problem that the log record of the whole sector that causes because of power down is all lost, thereby also just also can avoid above-mentioned loss, test for switch, can reduce testing cost, increase testing efficiency.
The embodiment of the invention can realize the integrity protection of data in the data updating process like this under the situation of not carrying out any hardware modifications with data backup on the same storage medium at data to be updated place in addition.
And the embodiment of the invention is by in the operation of bottom hardware; back up data to be updated or new data more; need not in embedded system, to introduce any file system; if and when having file system to exist; need not the existing file system is carried out any improvement, can realize the integrity protection of data, mode is easy; processing ease, and saved the resource of embedded system.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (12)

1. a data-updating method is characterized in that, comprising:
The data read to be updated that is stored in first storage medium is made amendment in volatibility second storage medium, obtain amended more new data;
With described renewal data backup in non-volatile the 3rd storage medium;
If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described second storage medium, after follow-up powering on, the Backup Data of described backup in the 3rd storage medium write first storage medium.
2. the method for claim 1 is characterized in that, described Backup Data is write first storage medium before, also comprise:
Delete the data to be updated of not deleted in first storage medium; Perhaps
Deletion has been written to the partial update data in first storage medium.
3. method as claimed in claim 1 or 2 is characterized in that, described first storage medium is same storage medium or different storage mediums with the 3rd storage medium.
4. a data update apparatus is characterized in that, comprising:
The data modification unit is used for the data read to be updated that is stored in first storage medium is made amendment in volatibility second storage medium, obtains amended more new data;
The data backup unit is used for described renewal data backup at non-volatile the 3rd storage medium;
Data write unit, be used for if cut off the power supply in the process of the data to be updated in utilizing renewal Data Update first storage medium of described second storage medium, after follow-up powering on, the Backup Data of described backup in the 3rd storage medium write first storage medium.
5. device as claimed in claim 4, it is characterized in that, also comprise data delete unit, be used for before data write unit writes first storage medium with described Backup Data, delete the data to be updated of not deleted in first storage medium, perhaps be written to the partial update data in first storage medium.
6. a data update system comprises first storage medium that is used to store data to be updated, and volatibility second storage medium and data update apparatus is characterized in that, also comprises non-volatile the 3rd storage medium, wherein:
Described data update apparatus is used for the data read to be updated that is stored in first storage medium is made amendment in second storage medium, obtains amended more new data; And with described renewal data backup in the 3rd storage medium; If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described second storage medium, after follow-up powering on, the Backup Data of described backup in the 3rd storage medium write first storage medium.
7. a data-updating method is characterized in that, comprising:
To be stored in data backup to be updated in first storage medium in non-volatile second storage medium;
Data read described to be updated in first storage medium is made amendment in volatibility the 3rd storage medium, obtain amended more new data;
If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described the 3rd storage medium, after follow-up powering on, the Backup Data of described backup in second storage medium write first storage medium.
8. method as claimed in claim 7 is characterized in that, described Backup Data is write first storage medium before, also comprise:
Delete the data to be updated of not deleted in first storage medium; Perhaps
Deletion has been written to the partial update data in first storage medium.
9. as claim 7 or 8 described methods, it is characterized in that described first storage medium is same storage medium or different storage mediums with second storage medium.
10. a data update apparatus is characterized in that, comprising:
The data backup unit is used for and will be stored in the data backup to be updated of first storage medium in non-volatile second storage medium;
The data modification unit is used for the data read described to be updated of first storage medium is made amendment in volatibility the 3rd storage medium, obtains amended more new data;
Data write unit, be used for if cut off the power supply in the process of the data to be updated in utilizing renewal Data Update first storage medium of described the 3rd storage medium, after follow-up powering on, the Backup Data of described backup in second storage medium write first storage medium.
11. device as claimed in claim 10, it is characterized in that, also comprise data delete unit, be used for before data write unit writes first storage medium with described Backup Data, delete the data to be updated of not deleted in first storage medium, perhaps be written to the partial update data in first storage medium.
12. a data update system comprises first storage medium that is used to store data to be updated, volatibility the 3rd storage medium and data update apparatus is characterized in that, also comprise non-volatile second storage medium, wherein:
Data update apparatus is used for and will be stored in the data backup to be updated of first storage medium in second storage medium; And, obtain amended more new data with making amendment in data read to the three storage mediums described to be updated in first storage medium; If cut off the power supply in the process of the data to be updated in renewal Data Update first storage medium in utilizing described the 3rd storage medium, after follow-up powering on, the Backup Data of described backup in second storage medium write first storage medium.
CNA2008100003697A 2008-01-08 2008-01-08 Data update method, device and system Pending CN101216789A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008100003697A CN101216789A (en) 2008-01-08 2008-01-08 Data update method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008100003697A CN101216789A (en) 2008-01-08 2008-01-08 Data update method, device and system

Publications (1)

Publication Number Publication Date
CN101216789A true CN101216789A (en) 2008-07-09

Family

ID=39623225

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008100003697A Pending CN101216789A (en) 2008-01-08 2008-01-08 Data update method, device and system

Country Status (1)

Country Link
CN (1) CN101216789A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611186A (en) * 2012-03-08 2012-07-25 华为技术有限公司 Power supply method and power supply device
CN103617053A (en) * 2013-11-13 2014-03-05 深圳创维数字技术股份有限公司 Method and device for upgrading software
CN103685074A (en) * 2012-09-11 2014-03-26 英业达科技有限公司 Rack-mounted server system and method for automatically managing rack configuration information
CN106453099A (en) * 2016-10-21 2017-02-22 杭州华三通信技术有限公司 Flow table information recovery method and device
CN109240940A (en) * 2018-09-03 2019-01-18 军创(厦门)自动化科技有限公司 A kind of large capacity NAND Flash data storage method
CN109726264A (en) * 2019-01-16 2019-05-07 北京百度网讯科技有限公司 Method, apparatus, equipment and the medium updated for index information
CN110008059A (en) * 2019-02-20 2019-07-12 深圳市汇顶科技股份有限公司 Data-updating method, device and the storage medium of non-volatile memory medium
CN110333883A (en) * 2019-05-31 2019-10-15 厦门网宿有限公司 A kind of method and device updating perdurable data
CN112596672A (en) * 2020-12-18 2021-04-02 珠海格力电器股份有限公司 Storage processing method and device of main control chip, processor and electronic equipment
WO2022057933A1 (en) * 2020-09-21 2022-03-24 华为技术有限公司 Application running method and apparatus, and a computer device
WO2022261823A1 (en) * 2021-06-15 2022-12-22 华为技术有限公司 Data storage method and related device

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611186A (en) * 2012-03-08 2012-07-25 华为技术有限公司 Power supply method and power supply device
US9588542B2 (en) 2012-09-11 2017-03-07 Inventec (Pudong) Technology Corporation Rack server system and method for automatically managing rack configuration information
CN103685074A (en) * 2012-09-11 2014-03-26 英业达科技有限公司 Rack-mounted server system and method for automatically managing rack configuration information
CN103685074B (en) * 2012-09-11 2016-09-28 英业达科技有限公司 Rack-mounted server system and the method automatically managing frame configuration information
CN103617053A (en) * 2013-11-13 2014-03-05 深圳创维数字技术股份有限公司 Method and device for upgrading software
CN106453099B (en) * 2016-10-21 2021-05-14 新华三技术有限公司 Flow table information recovery method and device
CN106453099A (en) * 2016-10-21 2017-02-22 杭州华三通信技术有限公司 Flow table information recovery method and device
CN109240940A (en) * 2018-09-03 2019-01-18 军创(厦门)自动化科技有限公司 A kind of large capacity NAND Flash data storage method
CN109726264A (en) * 2019-01-16 2019-05-07 北京百度网讯科技有限公司 Method, apparatus, equipment and the medium updated for index information
CN109726264B (en) * 2019-01-16 2022-02-25 北京百度网讯科技有限公司 Method, apparatus, device and medium for index information update
CN110008059A (en) * 2019-02-20 2019-07-12 深圳市汇顶科技股份有限公司 Data-updating method, device and the storage medium of non-volatile memory medium
CN110008059B (en) * 2019-02-20 2021-05-11 深圳市汇顶科技股份有限公司 Data updating method and device for nonvolatile storage medium and storage medium
CN110333883A (en) * 2019-05-31 2019-10-15 厦门网宿有限公司 A kind of method and device updating perdurable data
WO2022057933A1 (en) * 2020-09-21 2022-03-24 华为技术有限公司 Application running method and apparatus, and a computer device
CN112596672A (en) * 2020-12-18 2021-04-02 珠海格力电器股份有限公司 Storage processing method and device of main control chip, processor and electronic equipment
CN112596672B (en) * 2020-12-18 2022-08-02 珠海格力电器股份有限公司 Storage processing method and device of main control chip, processor and electronic equipment
WO2022261823A1 (en) * 2021-06-15 2022-12-22 华为技术有限公司 Data storage method and related device

Similar Documents

Publication Publication Date Title
CN101216789A (en) Data update method, device and system
CN103299276B (en) The software upgrading process of embedded equipment
CN106095620B (en) A kind of development approach of built-in Linux partition holding
KR100975164B1 (en) Internal maintenance schedule request for non-volatile memory system
US20080177961A1 (en) Partial Backup and Restore with Backup Versioning
CN102165422B (en) Firmware update device and method
CN100511166C (en) High-speed storage device and method for high-speed updating data
CN100442247C (en) Method, system and computer program for data management on storage medium
CN101763295B (en) Data backup method, data backup device, backup item erasing method, backup item erasing device, data recovery method and data recovery device
CN102063380B (en) Method and device for writing data in non-volatile memory
CN102081577A (en) Data storage structure of Flash memory and data manipulation mode thereof
CN101344868B (en) Data backup and acquiring method and device
WO2008026466A1 (en) File system
CN100389406C (en) Method for operating data in non-volatile storage in embedded system
CN103268294A (en) Operation method of access data and data processing equipment
CN105468544B (en) Method and device for realizing power-down prevention file system and power-down prevention file system
JPH09506460A (en) Safe updating method for EEPROM memory
CN1936853A (en) Data cut-off protection and repairing method of inlaid apparatus
CN108958978A (en) A kind of MCU data reconstruction method and system
CN1924821A (en) Firmware renewing system and method
CN103430178A (en) Method, apparatus and product of data updating
CN104036823A (en) Symmetrical Data Replication For Failure Management In Non-volatile Memory Systems
CN101923500A (en) Backup and update method and device of bootstrap program in embedded equipment
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment
EP2267725A1 (en) Memory device for managing the recovery of a non volatile memory

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

Open date: 20080709