CN109918228A - A kind of data power-down retaining method and system - Google Patents

A kind of data power-down retaining method and system Download PDF

Info

Publication number
CN109918228A
CN109918228A CN201910081089.1A CN201910081089A CN109918228A CN 109918228 A CN109918228 A CN 109918228A CN 201910081089 A CN201910081089 A CN 201910081089A CN 109918228 A CN109918228 A CN 109918228A
Authority
CN
China
Prior art keywords
data
backup
area
backup area
data block
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
Application number
CN201910081089.1A
Other languages
Chinese (zh)
Other versions
CN109918228B (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.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN201910081089.1A priority Critical patent/CN109918228B/en
Publication of CN109918228A publication Critical patent/CN109918228A/en
Application granted granted Critical
Publication of CN109918228B publication Critical patent/CN109918228B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Power Sources (AREA)

Abstract

The present invention provides a kind of data power-down retaining method and systems, and wherein method includes: that the real time data for needing power down to keep is divided into multiple data blocks;In a manner of period backup, multiple data blocks is sequentially backed up into nonvolatile memory, the backup procedure of each data block is as follows in batches: current data block is backed up to the second backup area of nonvolatile memory;Current data block is after the completion of the second backup area backs up, then current data block is backed up to the first backup area of nonvolatile memory;Current data block empties the data stored in the second backup area after the completion of the first backup area backs up, and backs up and uses for subsequent data chunk.Data power-down retaining method provided by the invention and system, as long as portion is slightly larger than the memory space in the real time data area for needing power down to keep, it can be achieved with the double copies power down to real time data to keep, and Backup Data also has the function of power down holding when power down occurring at no point in the update process, it is at low cost, good reliability.

Description

A kind of data power-down retaining method and system
Technical field
The present invention relates to field of computer technology, in particular to a kind of data power-down retaining method and system.
Background technique
Generally, the power down that control system requires to have data is kept, i.e., the data for needing power down to keep is backuped to one Kind can in the nonvolatile memory that keeps of power down, such as: MRAM (Magnetic Random Access Memory, it is non-volatile The magnetic RAM of property), FLASH (flash memory) etc..
It is compared, nonvolatile memory General Spatial with DDR (Double Data Rate, synchronous DRAM) Less, and execution speed is slower, so the real time data of control system is usually run on DDR, and power down will be needed to keep The real time data period backups to nonvolatile memory.
Currently, having following two data power-down retaining method in control system: the data power-down retaining method singly backed up With the data power-down retaining method of complete double copies.Wherein, the data power-down retaining method singly backed up is to needing power down to keep Data only back up on nonvolatile memory a, therefore only need a data space.But it this singly backs up Method, if power down occurs during carrying out data preservation, corresponding storing data will fail, and reliability is lower.It is completely double The data power-down retaining method of backup is completely the same to needing the data of power down holding to back up on nonvolatile memory Two parts.In this way, if power down occurs, another backup area data are also effective, power on when backuping to a power down holding memory block After remain to restore, that is, realize that complete data keep function.But this method needs two parts and need to keep data space size Consistent memory space, the storage equipment for needing the power down of large capacity to keep, higher cost.
Based on this, lack a kind of low cost in the prior art, combines the data suitable for control system of reliability Power down keeps technology.
Summary of the invention
To solve the problems, such as that existing data power-down retaining method reliability is low and at high cost, the present invention proposes a kind of data Power-down retaining method and system can be limited in the memory space of the nonvolatile memory with power down holding function Under, it is only necessary to memory space is greater than the data space that need to be kept, and the double copies of data can be realized.
Data power-down retaining method provided by the invention, which comprises the following steps:
The real time data for needing power down to keep is divided into multiple data blocks;
In a manner of period backup, the multiple data block is sequentially backed up into nonvolatile memory, every number in batches It is as follows according to the backup procedure of block:
Current data block is backed up to the second backup area of the nonvolatile memory;Current data block is described second After the completion of backup area backup, then current data block is backed up to the first backup area of the nonvolatile memory;Current data Block empties the data stored in second backup area after the completion of first backup area backs up, and backs up for subsequent data chunk It uses.
As an embodiment, data power-down retaining method provided by the invention, further comprising the steps of:
First backup area and second backup area are set in the nonvolatile memory;Wherein, described first is standby The size in part area is greater than or equal to the size for the real time data Operational Zone for needing power down to keep;First backup area includes multiple points The size of section, the fragment area is identical as the size of the data block;The size of second backup area is greater than or equal to institute State the size of data block.
As an embodiment, according to the capacity of first backup area and address, the second backup area capacity and The multiple data block is sequentially backed up to nonvolatile memory by address and backup serial number in batches.
As an embodiment, in a manner of period backup, the multiple data block is sequentially backed up in batches non- Volatile memory, comprising the following steps:
After real time data backup cycle reaches, the data block that currently needs to back up according to backup order number matches and this Data block corresponding fragment area in first backup area;
The data effective marker of second backup area is set in vain, then the data block copy to described second is backed up After the completion of copy, the data effective marker of second backup area is set to effectively for area;
The data effective marker in fragment area corresponding in first backup area is set in vain, extremely by the data block copy Corresponding fragment area in first backup area, and the data effective marker in the fragment area is set to effectively;
In the data block after the completion of first backup area backs up, the data effective marker of second backup area is set It is invalid.
As an embodiment, data power-down retaining method of the invention, further comprising the steps of:
After system electrification, whether each data block for detecting the first backup area backup is all effective;If so, using institute The Backup Data for stating the first backup area is restored;If it is not, the valid data block for then first backup area being used to back up and institute The Backup Data for stating the second backup area is restored.
As an embodiment, the valid data block and second backup area backed up using first backup area Backup Data restored, comprising the following steps:
Obtain the data effective marker in each fragment area of first backup area, the data effective marker of the second backup area, with And backup serial number;
If the data effective marker of second backup area be it is effective, according to backup serial number, by second backup area Data copy into first backup area corresponding fragment area, copy after the completion of will be corresponding point in first backup area The data effective marker of section is set to effectively, and the second backup area data effective marker is set in vain;
By the data copy in all effective fragment areas of first backup area to the region of real time data.
Correspondingly, a kind of data power down provided by the invention keeps system, including data block division module and data backup Module;
The data division module, for the real time data for needing power down to keep to be divided into multiple data blocks;
The data backup module, in such a way that the period backs up, the multiple data block sequentially to be backed up in batches The backup procedure of nonvolatile memory, each data block is as follows:
Current data block is backed up to the second backup area of the nonvolatile memory;Current data block is described second After the completion of backup area backup, then current data block is backed up to the first backup area of the nonvolatile memory;Current data Block empties the data stored in second backup area after the completion of first backup area backs up, and backs up for subsequent data chunk It uses.
As an embodiment, data power down provided by the invention keeps system, further includes memory setup module;
The memory setup module, for first backup area and described second to be arranged in the nonvolatile memory Backup area;Wherein, the size of first backup area is greater than or equal to the size for the real time data Operational Zone for needing power down to keep;Institute Stating the first backup area includes multiple fragment areas, and the size in the fragment area is identical as the size of the data block;Described second is standby The size in part area is greater than or equal to the size of the data block.
As an embodiment, the data backup module is according to the capacity of first backup area and address, The multiple data block is sequentially backed up to non-volatile memories by the capacity of two backup areas and address and backup serial number in batches Device.
As an embodiment, the data backup module includes matching unit, backup units, a Secondary Backup Unit and end unit;
The matching unit, for currently being needed according to backup order number matches standby after real time data backup cycle reaches Data block and the data block corresponding fragment area in first backup area of part;
First backup units, for the data effective marker of second backup area to be set in vain, then by the number According to block copy to second backup area, after the completion of copy, the data effective marker of second backup area is set to effectively;
The Secondary Backup unit, for the data effective marker in fragment area corresponding in first backup area to be set to In vain, by the data block copy into first backup area corresponding fragment area, and by the data effective marker in the fragment area It is set to effectively;
The end unit, for after the completion of first backup area backs up, described second to be backed up in the data block The data effective marker in area is set in vain.
As an embodiment, data power down of the invention keeps system, it further include data recovery module;
The data recovery module, each data block for upon power-up of the system, detecting the first backup area backup are No whole is effective;If so, being restored using the Backup Data of first backup area;If it is not, then standby using described first The valid data block of part area backup and the Backup Data of second backup area are restored.
As an embodiment, the data recovery module includes acquiring unit, copy cell and restores single Member;
The acquiring unit, for obtaining data effective marker, second backup area in each fragment area of first backup area Data effective marker and backup serial number;
The copy cell, if the data effective marker for second backup area be it is effective, according to backup serial number, By the data copy of second backup area into first backup area corresponding fragment area, by described first after the completion of copy The data effective marker in corresponding fragment area is set to effectively in backup area, and the second backup area data effective marker is set to nothing Effect;
The recovery unit, for by the data copy in all effective fragment areas of first backup area to real time data Region.
The beneficial effect of the present invention compared with the prior art is:
Data power-down retaining method provided by the invention and system, do not need two parts it is completely the same with real time data size Backup area, as long as a memory space slightly larger than the real time data area for needing power down to keep, can be achieved with to real time data Double copies power down is kept, and when power down occurs at no point in the update process for Backup Data also has the function of power down holding, at low cost, can It is good by property.
Detailed description of the invention
Fig. 1 is the flow diagram for the data power-down retaining method that the embodiment of the present invention one provides;
Fig. 2 is that the embodiment of the present invention one provides the structural schematic diagram of the data storage area in data power-down retaining method;
Fig. 3 is that the embodiment of the present invention one provides the real time data backup flow diagram in data power-down retaining method;
Fig. 4 is provided in data power-down retaining method for the embodiment of the present invention one and is powered on data recovery flow diagram;
Fig. 5 is the structural schematic diagram that data power down provided by Embodiment 2 of the present invention keeps system.
Specific embodiment
Below in conjunction with attached drawing, the technical characteristic and advantage above-mentioned and other to the present invention are clearly and completely described, Obviously, described embodiment is only section Example of the invention, rather than whole embodiments.
The invention proposes a kind of novel double copies data power down to keep technology, makes keeping depositing for function with power down In the case that the memory space of reservoir is limited, as long as memory space is greater than the data space that need to be kept, the double of data can be realized Backup has complete power down and keeps function.
Referring to Fig. 1, the embodiment of the present invention one provides a kind of data power-down retaining method, comprising the following steps:
S100, the real time data for needing power down to keep is divided into multiple data blocks;
S200, by the period backup in a manner of, multiple data blocks are sequentially backed up into nonvolatile memory, every number in batches It is as follows according to the backup procedure of block:
Current data block is backed up to the second backup area of nonvolatile memory;Current data block is standby in the second backup area After the completion of part, then current data block is backed up to the first backup area of nonvolatile memory;Current data block is in the first backup After the completion of area's backup, the data stored in the second backup area are emptied, backs up and uses for subsequent data chunk.
The present invention uses nonvolatile memory as the medium of power down holding data first.Due to nonvolatile memory Execution speed with respect to DDR, there are many gaps, therefore the real time data Operational Zone in the present invention is DDR, and power down holding area is Nonvolatile memory.Real time data on DDR is backed up to non-volatile memories in such a way that the period backs up by the present invention in batches Device, specific backup procedure are as follows:
Assuming that real time data is divided into 6 pieces of data blocks, the first backup area is similarly divided into 6 fragment areas.If current Period needs to back up the 4th piece of data block, then the 4th piece of data block of real time data is first backuped to the second backup area, after the completion, then 4th piece of data block of real time data is backuped to the 4th piece of fragment area of the first backup area.Deng the 4th block number in the first backup area After the completion of backing up according to block, the 4th piece of data block stored in the second backup area is emptied.Next and so on, back up the 5th block number According to block.
If 6 pieces of data blocks all successfully backup to the first backup area, the memory space of the first backup area is only taken up.It is standby Part during, also only need the memory space more slightly larger than real time data, do not need two parts it is completely the same with real time data size Backup area.If a certain piece in 6 pieces of data blocks of backup area there is power down during backuping to the first backup area, standby second The data block that can be also given for change in part area in the first backup area backup failure greatly improves on the basis of saving memory space Reliability.
It is corresponding to power on recovery operation are as follows:
After powering on, check whether the data block of each fragment area storage of the first backup area is effective, if effectively thening be used directly First backup area is restored.The data block of one piece of fragment area storage is invalid if it exists, then the data in this fragment area use second The Backup Data of backup area replaces, i.e., the Backup Data of the valid data block and the second backup area that are backed up using the first backup area into Row restores.
Data power-down retaining method provided by the invention does not need 2 parts of backup areas completely the same with real time data size, As long as portion can be achieved with falling the double copies of real time data slightly larger than the memory space in the real time data area for needing power down to keep Electricity is kept, and when power down occurs at no point in the update process for Backup Data also has the function of power down holding, at low cost, good reliability.
Data power-down retaining method provided in this embodiment, in the process of running, including following data area: need power down to protect The real time data Operational Zone held, the first backup area, the second backup area.Wherein real time data Operational Zone is in DDR, the first backup area With the second backup area in the nonvolatile memories such as MRAM.
As an embodiment, data power-down retaining method provided by the invention, further comprising the steps of:
First backup area and the second backup area are set in the nonvolatile memory;Wherein, the size of the first backup area is big In or equal to need power down keep real time data Operational Zone size;First backup area includes multiple fragment areas, fragment area it is big It is small identical as the size of data block;The size of second backup area is greater than or equal to the size of data block.
The size for the data block that user can be divided according to the real time data for needing power down to keep removes the first backup area of setting With the second backup area, can also be gone to divide according to the size of the memory space of the nonvolatile memory of actual use needs power down to protect The real time data held.
As shown in Fig. 2, the first backup area is divided into N number of fragment area, the size of the first backup area is kept with power down is needed Real time data Operational Zone size is identical, can also be slightly larger, is backed up with the real time data for ensuring that power down is needed to keep first It can be backed up completely in area.Second backup area, as interim backup area, size and the first backup area segmentation after obtain one The size in a fragment area is identical, and is greater than or equal to the size of data block, to ensure that a data block can be backed up completely.
Further, in step S200, according to the capacity and ground of the capacity of the first backup area and address, the second backup area Multiple data blocks are sequentially backed up to nonvolatile memory by location and backup serial number in batches.
Wherein the capacity of the first backup area and address, the capacity of the second backup area and address are curable, after powering on every time It only needs to read, does not need to repeat to configure.Load when powering on obtains power down holding area data, controls information according to backup area, really How fixed number evidence loads.
By taking MRAM as an example, backup area control information may include capacity and the address, the second backup area of the first backup area Whether whether effective and the second backup area is effective in each fragment area of capacity and address, backup serial number and the first backup area.In real time Data backup procedure is as shown in Figure 3, comprising the following steps:
S210, after real time data backup cycle reaches, the data block that currently needs to back up according to backup order number matches, with And the data block corresponding fragment area in the first backup area;
S220, the data effective marker of the second backup area is set in vain, then by the data block copy to the second backup area; If backup serial number has been N-1, it is set to 0, otherwise backup serial number adds 1;After the completion of copy, the data of the second backup area there is into criterion Will is set to effectively;
S230, the data effective marker in fragment corresponding in the first backup area area is set in vain, by the data block copy The corresponding fragment area into the first backup area, and the data effective marker in the fragment area is set to effectively;
S240, in the data block after the completion of the first backup area backs up, the data effective marker of the second backup area is set to In vain.
Using above-mentioned real time data backup procedure, if the power down except entire backup procedure, data are restored when powering on Using the data of the first backup area.If power down when backuping to the second backup area in real time data backup procedure, powers on When data restore use the first backup area data.If falling in real time data backup procedure when backuping to the first backup area Electricity, then data are restored using effective data in the first backup area when powering on, and invalid data use second in the first backup area Backup area data replace.
It is corresponding that power on recovery process as shown in Figure 4, comprising the following steps:
S310, it obtains backup area and controls information, comprising: is the data effective marker in each fragment area of the first backup area, second standby The data effective marker and backup serial number in part area;
S320, control information judges whether the second backup area data are effective according to backup area;
If the data effective marker of S330, the second backup area be it is effective, according to backup serial number, by the number of the second backup area According to corresponding fragment area in the first backup area is copied to, the data in fragment corresponding in the first backup area area are had after the completion of copy Valid flag is set to effectively, and the second backup area data effective marker is set in vain;
If the data effective marker of S340, the second backup area be it is invalid, by all effective fragment areas of the first backup area Data copy is to the corresponding region of real time data.
If the data effective marker in all fragment areas of S350, the first backup area is all that effectively, backup serial number is set to 0, otherwise backup serial number is set to the invalid fragment area most started, and specific recovery process is as follows:
Assuming that the first backup area corresponding with real time data has 6 fragment areas: 0,1,2,3,4,5, the number of the first backup area According to be effectively, before power down Backup Data be previous cycle 3,4,5 and power down final cycle 0,1,2;Then real time data Restore order are as follows: 0,1,2,3,4,5;Backup serial number is set to 0.
Assuming that the first backup area corresponding with real time data has 6 fragment areas: 0,1,2,3,4,5, the first backup area does not have All effective, Backup Data is the 0,1,2 and second backup area of 4,5 and power down final cycle of previous cycle before power down;Then The recovery order of real time data are as follows: the 0,1,2, second backup area, 4,5;Backup serial number 3.
Based on the same inventive concept, the present invention also provides a kind of data power down to keep system, the system and aforementioned data Power-down retaining method principle is identical, and the implementation of the system can refer to preceding method realization, repeats place, no longer redundant later.
Referring to Fig. 5, data power down provided by Embodiment 2 of the present invention keeps system, including 100 He of data block division module Data backup module 200.Wherein, data division module 100 is used to the real time data for needing power down to keep being divided into multiple data Block;Data backup module 200 is used to that multiple data blocks sequentially to be backed up to non-volatile memories in batches in a manner of period backup The backup procedure of device, each data block is as follows:
Current data block is backed up to the second backup area of nonvolatile memory;Current data block is standby in the second backup area After the completion of part, then current data block is backed up to the first backup area of nonvolatile memory;Current data block is in the first backup After the completion of area's backup, the data stored in the second backup area are emptied, backs up and uses for subsequent data chunk.
Further, data power down provided by the invention keeps system, further includes memory setup module 300.Memory Setup module 300 for being arranged the first backup area and the second backup area in the nonvolatile memory;Wherein, first backup area Size is greater than or equal to the size for the real time data Operational Zone for needing power down to keep;First backup area includes multiple fragment areas, fragment The size in area and the size of data block are identical;The size of second backup area is greater than or equal to the size of data block.
Data backup module 200 according to the capacity of the first backup area and address, the capacity of the second backup area and address and Multiple data blocks are sequentially backed up to nonvolatile memory by backup serial number in batches.
Further, data backup module 200 includes matching unit 210, backup units 220, a Secondary Backup units 230 and end unit 240.Matching unit 210 is used for after real time data backup cycle reaches, according to backup order number matches The data block and the data block for currently needing to back up corresponding fragment area in the first backup area;First backup units 220 are used It is set in vain in by the data effective marker of the second backup area, then by the data block copy to the second backup area, after the completion of copy, The data effective marker of second backup area is set to effectively;Secondary Backup unit 230 is used for corresponding point in the first backup area The data effective marker of section is set in vain, by the data block copy into the first backup area corresponding fragment area, and by this point The data effective marker of section is set to effectively;End unit 240 is used in the data block after the completion of the first backup area backs up, will The data effective marker of second backup area is set in vain.
Further, it further includes data recovery module 300 that above-mentioned data power down, which keeps system,.Data recovery module 300 is used In upon power-up of the system, whether each data block of detection the first backup area backup is all effective;If so, using the first backup area Backup Data restored;If it is not, the backup number of the valid data block and the second backup area then backed up using the first backup area According to being restored.
Data recovery module 300 includes acquiring unit 310, copy cell 320 and recovery unit 330.Acquiring unit 310 for obtaining the data effective marker in each fragment area of the first backup area, the data effective marker of the second backup area and backup Serial number;If copy cell 320 for the second backup area data effective marker be it is effective, it is standby by second according to backup serial number The data copy in part area corresponding fragment area into the first backup area, by fragment corresponding in the first backup area area after the completion of copy Data effective marker be set to effectively, the second backup area data effective marker is set in vain;Recovery unit 330 is used for first The data copy in all effective fragment areas of backup area is to the region of real time data.
Data power down provided by the invention keeps system, does not need two parts of backups completely the same with real time data size Area can be achieved with as long as a memory space slightly larger than the real time data area for needing power down to keep to the double standby of real time data Part power down is kept, and when power down occurs at no point in the update process for Backup Data also has the function of power down holding, at low cost, reliability It is good.
Particular embodiments described above has carried out further the purpose of the present invention, technical scheme and beneficial effects It is described in detail, it should be understood that the above is only a specific embodiment of the present invention, the protection being not intended to limit the present invention Range.It particularly points out, to those skilled in the art, all within the spirits and principles of the present invention, that is done any repairs Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (12)

1. a kind of data power-down retaining method, which comprises the following steps:
The real time data for needing power down to keep is divided into multiple data blocks;
In a manner of period backup, the multiple data block is sequentially backed up into nonvolatile memory, each data block in batches Backup procedure it is as follows:
Current data block is backed up to the second backup area of the nonvolatile memory;Current data block is in second backup After the completion of area's backup, then current data block is backed up to the first backup area of the nonvolatile memory;Current data block exists After the completion of the first backup area backup, the data stored in second backup area are emptied, backs up and uses for subsequent data chunk.
2. data power-down retaining method according to claim 1, which is characterized in that further comprising the steps of:
First backup area and second backup area are set in the nonvolatile memory;Wherein, first backup area Size be greater than or equal to need power down keep real time data Operational Zone size;First backup area includes multiple fragments The size in area, the fragment area is identical as the size of the data block;The size of second backup area is greater than or equal to described The size of data block.
3. data power-down retaining method according to claim 1, which is characterized in that according to the capacity of first backup area With address, the capacity of the second backup area and address and backup serial number, the multiple data block is sequentially backed up in batches non-easy The property lost memory.
4. data power-down retaining method according to any one of claims 1 to 3, which is characterized in that the side backed up with the period The multiple data block is sequentially backed up to nonvolatile memory by formula in batches, comprising the following steps:
After real time data backup cycle reaches, the data block and the data that currently need to back up according to backup order number matches Block corresponding fragment area in first backup area;
The data effective marker of second backup area is set in vain, then by the data block copy to second backup area, After the completion of copy, the data effective marker of second backup area is set to effectively;
The data effective marker in fragment area corresponding in first backup area is set in vain, by the data block copy to described Corresponding fragment area in first backup area, and the data effective marker in the fragment area is set to effectively;
In the data block after the completion of first backup area backs up, the data effective marker of second backup area is set to nothing Effect.
5. data power-down retaining method according to claim 4, which is characterized in that further comprising the steps of:
After system electrification, whether each data block for detecting the first backup area backup is all effective;If so, using described The Backup Data of one backup area is restored;If it is not, the valid data block and described the then backed up using first backup area The Backup Data of two backup areas is restored.
6. data power-down retaining method according to claim 5, which is characterized in that backed up using first backup area The Backup Data of valid data block and second backup area is restored, comprising the following steps:
Obtain the data effective marker in each fragment area of first backup area, data effective marker, the Yi Jibei of the second backup area Part serial number;
If the data effective marker of second backup area be it is effective, according to backup serial number, by the number of second backup area According to corresponding fragment area in first backup area is copied to, copy is after the completion by fragment area corresponding in first backup area Data effective marker be set to effectively, the second backup area data effective marker is set in vain;
By the data copy in all effective fragment areas of first backup area to the region of real time data.
7. a kind of data power down keeps system, which is characterized in that including data block division module and data backup module;
The data division module, for the real time data for needing power down to keep to be divided into multiple data blocks;
The data backup module, it is non-easy in such a way that the period backs up, the multiple data block sequentially to be backed up in batches The property lost memory, the backup procedure of each data block are as follows:
Current data block is backed up to the second backup area of the nonvolatile memory;Current data block is in second backup After the completion of area's backup, then current data block is backed up to the first backup area of the nonvolatile memory;Current data block exists After the completion of the first backup area backup, the data stored in second backup area are emptied, backs up and uses for subsequent data chunk.
8. data power down according to claim 7 keeps system, which is characterized in that further include memory setup module;
The memory setup module, for first backup area and second backup to be arranged in the nonvolatile memory Area;Wherein, the size of first backup area is greater than or equal to the size for the real time data Operational Zone for needing power down to keep;Described One backup area includes multiple fragment areas, and the size in the fragment area is identical as the size of the data block;Second backup area Size be greater than or equal to the data block size.
9. data power down according to claim 7 keeps system, which is characterized in that the data backup module is according to The capacity of first backup area and address, the capacity of the second backup area and address and backup serial number, the multiple data block is pressed Sequence backs up to nonvolatile memory in batches.
10. data power down according to any one of claims 7 to 9 keeps system, which is characterized in that the data backup mould Block includes matching unit, a backup units, Secondary Backup unit and end unit;
The matching unit, for currently needing to back up according to backup order number matches after real time data backup cycle reaches Data block and the data block corresponding fragment area in first backup area;
First backup units, for the data effective marker of second backup area to be set in vain, then by the data block It is copied to second backup area, after the completion of copy, the data effective marker of second backup area is set to effectively;
The Secondary Backup unit, for the data effective marker in fragment area corresponding in first backup area to be set to nothing Effect, by the data block copy into first backup area corresponding fragment area, and the data effective marker in the fragment area is set It is effective;
The end unit is used in the data block after the completion of first backup area backs up, by second backup area Data effective marker is set in vain.
11. data power down according to claim 10 keeps system, which is characterized in that further include data recovery module;
Whether the data recovery module, each data block for upon power-up of the system, detecting the first backup area backup are complete Portion is effective;If so, being restored using the Backup Data of first backup area;If it is not, then using first backup area The Backup Data of the valid data block of backup and second backup area is restored.
12. data power down according to claim 11 keeps system, which is characterized in that the data recovery module, including Acquiring unit, copy cell and recovery unit;
The acquiring unit, for obtaining the data effective marker in each fragment area of first backup area, the number of the second backup area According to effective marker and backup serial number;
The copy cell, if the data effective marker for second backup area be it is effective, according to backup serial number, by institute The data copy of the second backup area corresponding fragment area into first backup area is stated, is backed up after the completion of copy by described first The data effective marker in corresponding fragment area is set to effectively in area, and the second backup area data effective marker is set in vain;
The recovery unit, for by the data copy in all effective fragment areas of first backup area to the area of real time data Domain.
CN201910081089.1A 2019-01-28 2019-01-28 Data power failure maintaining method and system Active CN109918228B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910081089.1A CN109918228B (en) 2019-01-28 2019-01-28 Data power failure maintaining method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910081089.1A CN109918228B (en) 2019-01-28 2019-01-28 Data power failure maintaining method and system

Publications (2)

Publication Number Publication Date
CN109918228A true CN109918228A (en) 2019-06-21
CN109918228B CN109918228B (en) 2021-01-12

Family

ID=66960946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910081089.1A Active CN109918228B (en) 2019-01-28 2019-01-28 Data power failure maintaining method and system

Country Status (1)

Country Link
CN (1) CN109918228B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110515542A (en) * 2019-07-30 2019-11-29 华为技术有限公司 Date storage method, calculates equipment, storage system and storage medium at device
CN113434338A (en) * 2021-06-25 2021-09-24 苏州伟创电气科技股份有限公司 Fault-tolerant method, device and equipment for data storage and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719422A (en) * 2005-08-18 2006-01-11 北京中星微电子有限公司 Virtual access method of storage document data
CN1991775A (en) * 2005-12-28 2007-07-04 英业达股份有限公司 Protection method for caching data of memory system
CN103531234A (en) * 2012-07-06 2014-01-22 河南思维自动化设备股份有限公司 Power-down protection method in write operation process of NandFlash memory
CN106407050A (en) * 2016-10-20 2017-02-15 厦门科华恒盛股份有限公司 Data storage method
CN106569748A (en) * 2016-10-27 2017-04-19 南方电网科学研究院有限责任公司 Data processing method and device for Flash file system
CN106919474A (en) * 2015-12-28 2017-07-04 中移(苏州)软件技术有限公司 A kind of data cached guard method and device
US20170277464A1 (en) * 2016-03-28 2017-09-28 SK Hynix Inc. Nonvolatile memory module and operating method for the same
US20180173580A1 (en) * 2016-12-19 2018-06-21 Chris Pavlas Methods and apparatus to recover a processor state during a system failure or security event
CN109254879A (en) * 2018-09-27 2019-01-22 南方电网科学研究院有限责任公司 A kind of data processing method, system, device and readable storage medium storing program for executing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719422A (en) * 2005-08-18 2006-01-11 北京中星微电子有限公司 Virtual access method of storage document data
CN1991775A (en) * 2005-12-28 2007-07-04 英业达股份有限公司 Protection method for caching data of memory system
CN103531234A (en) * 2012-07-06 2014-01-22 河南思维自动化设备股份有限公司 Power-down protection method in write operation process of NandFlash memory
CN106919474A (en) * 2015-12-28 2017-07-04 中移(苏州)软件技术有限公司 A kind of data cached guard method and device
US20170277464A1 (en) * 2016-03-28 2017-09-28 SK Hynix Inc. Nonvolatile memory module and operating method for the same
CN106407050A (en) * 2016-10-20 2017-02-15 厦门科华恒盛股份有限公司 Data storage method
CN106569748A (en) * 2016-10-27 2017-04-19 南方电网科学研究院有限责任公司 Data processing method and device for Flash file system
US20180173580A1 (en) * 2016-12-19 2018-06-21 Chris Pavlas Methods and apparatus to recover a processor state during a system failure or security event
CN109254879A (en) * 2018-09-27 2019-01-22 南方电网科学研究院有限责任公司 A kind of data processing method, system, device and readable storage medium storing program for executing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110515542A (en) * 2019-07-30 2019-11-29 华为技术有限公司 Date storage method, calculates equipment, storage system and storage medium at device
CN110515542B (en) * 2019-07-30 2021-08-31 华为技术有限公司 Data storage method and device, computing equipment, storage system and storage medium
US11809738B2 (en) 2019-07-30 2023-11-07 Huawei Technologies Co., Ltd. Data storage method and apparatus, computing device, storage system, and storage medium
CN113434338A (en) * 2021-06-25 2021-09-24 苏州伟创电气科技股份有限公司 Fault-tolerant method, device and equipment for data storage and storage medium

Also Published As

Publication number Publication date
CN109918228B (en) 2021-01-12

Similar Documents

Publication Publication Date Title
CN101483067B (en) Flash memory data writing method and flash memory controller
CN102043727B (en) Method and device for recovering solid-state hard disc mapping table
US8286028B2 (en) Backup method and disk array apparatus
CN102591807B (en) Processing method for power down and abnormal writing of solid state disc and system
US6990603B2 (en) Method and apparatus for securing volatile data in power failure in systems having redundancy
CN100440156C (en) Method, system and article of manufacture for metadata replication and restoration
CN102508785B (en) A kind of abrasion equilibrium method and device
CN103164345B (en) Solid-state storage device meets with the date storage method after power-off
US9021141B2 (en) Data storage controller and method for exposing information stored in a data storage controller to a host system
CN109582217A (en) Data storage device and method for writing data into memory device
CN104077197B (en) System recovery method, device, solid state hard disc and electronic equipment
CN103092765B (en) Solid-state memory system, device and method for writing data
CN101963891A (en) Method and device for data storage and processing, solid-state drive system and data processing system
WO2010006301A1 (en) Battery-less cache memory module with integrated backup
CN101198939A (en) Flash memory management method that is resistant to data corruption by power loss
CN101923448A (en) Method for reading and writing conversion layer of NAND flash memory
CN104281538A (en) Storage device capacity expanding and snapping method and storage devices
US8074104B2 (en) Controlling apparatus and controlling method
US20180276092A1 (en) Recovering using write data stored by a powerloss data protection technique
CN104094240A (en) Preventing hybrid memory module from being mapped
TWI765368B (en) Memory device equipped with data protection scheme
CN109918228A (en) A kind of data power-down retaining method and system
CN102789422B (en) The method for writing data of solid state hard disc
CN111221750B (en) Data processing method of solid-state storage device
CN113031851B (en) Data snapshot method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant