CN106354580A - Data recovery method and device - Google Patents

Data recovery method and device Download PDF

Info

Publication number
CN106354580A
CN106354580A CN201510423400.8A CN201510423400A CN106354580A CN 106354580 A CN106354580 A CN 106354580A CN 201510423400 A CN201510423400 A CN 201510423400A CN 106354580 A CN106354580 A CN 106354580A
Authority
CN
China
Prior art keywords
data block
data
block
bit flipping
copy
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.)
Withdrawn
Application number
CN201510423400.8A
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.)
Xian Zhongxing New Software Co Ltd
Original Assignee
Xian Zhongxing New Software 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 Xian Zhongxing New Software Co Ltd filed Critical Xian Zhongxing New Software Co Ltd
Priority to CN201510423400.8A priority Critical patent/CN106354580A/en
Priority to PCT/CN2016/090131 priority patent/WO2017012507A1/en
Publication of CN106354580A publication Critical patent/CN106354580A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

A data recovery method comprises the following steps: when the data in the data block flips, copy the correct data processed with ECC to the first data block/or the second data block; among which the first data block and the second data block are continuous clean block; erase the data in the flipping data block; copy the data in the first data block and the second data block to the flipping data block processed by erasing operation. The invention also provides anther data recovery device.

Description

A kind of data reconstruction method and device
Technical field
The present invention relates to data reconstruction method during a kind of data recovery technique, more particularly, to nand flash data block generation bit flipping and device.
Background technology
Development with electronic industrial technology, the function of electronic product is more and more abundanter, intelligent product is increasingly becoming main flow, and this just can have higher requirement by memorizer to electronic product, such as requires can possess the features such as small size, Large Copacity, low cost, high efficiency, life-span length by memorizer.Current with non-flash (nand flash) due to possessing above-mentioned advantage, in built-in field, application is widely.
Although nand flash having significantly a little when using, its shortcoming also can affect the reliability of data storage, and such as nand flash is possible to bad block, bit flipping phenomenon in use.For bad block management, most built-in system software has more perfect handling process.And bit flipping phenomenon, then the correctness of data can only be ensured by error checking and correction (ecc, error correcting code).
For hardware ecc function, during data write flash, calculate check value and write the spare area of page according to the data of write page inside flash, data is written into main data area simultaneously.When reading data, if data there occurs bit flipping, return to driver by ecc check errors and by correct data;Data check function is then realized by software ecc by software.Although the verification of ecc ensure that the correctness of data, actually data recovery is not carried out to the memory area that bit flipping occurs, therefore once there is bit flipping, by the whole life cycle with product.Physical characteristics due to nand flash, the quantity of bit flipping has the probability of expansion, therefore, if require higher electronic product can not effectively and timely solve the problems, such as the data recovery of the memory area of bit flipping to system reliability, it will the consequence of bringing on a disaster property.
Content of the invention
In view of this, embodiment of the present invention expectation provides a kind of data reconstruction method and device, can effectively solve the problems, such as bit flipping, realizes the data recovery of the memory area of bit flipping it is ensured that the reliability of the data of flash memory block.
For reaching above-mentioned purpose, the technical scheme is that and be achieved in that:
Embodiments provide a kind of data reconstruction method, methods described includes:
When the data in data block occurs bit flipping, the just data carrying out error checking and correct after (ecc) is copied to the first data block and/or the second data block;Wherein, described first data block and the second data block are the good block of continuous clean;
There is the data in the data block of bit flipping in erasing;
By the data copy in the first data block or the second data block in the data block of the described generation bit flipping carrying out after erasing operation.
In such scheme, before copying the just data after carrying out ecc to the first data block and/or the second data block, methods described also includes: the data in erasing the first data block and/or the second data block.
In such scheme, described the just data carrying out after ecc is copied to the first data block and/or the second data block includes:
The just data that data in the data block that bit flipping occurs is carried out obtaining after ecc copies the first data block and/or the second data block to by page (page).
In such scheme, when copying the just data carrying out after ecc to the first data block and the second data block, described second data block is the Backup Data block of the first data block;
Correspondingly, the described data block by the data copy in the first data block or the second data block to the described generation bit flipping carrying out after erasing operation includes:
Judge the first data block whether still preferably block, when the first data block preferably block, by the data copy in described first data block in the data block of the described generation bit flipping carrying out after erasing operation;When described first data block is changed into bad block, by the data copy in described second data block in the data block of the described generation bit flipping carrying out after erasing operation.
In such scheme, methods described also includes:
The address that the data block of bit flipping occurs is copied to the 3rd data block and/or the 4th data block, and passes through the 3rd data block and/or the 4th data block, record data recovering process.
In such scheme, methods described also includes: when occurring to interrupt during data recovery, after reopening, read the address of data block and the data recovery process that bit flipping occurs before interrupting in the 3rd data block or the 4th data block, and the address according to the data block that bit flipping occurs before described interruption and data recovery process, proceed data recovery operation.
In such scheme, when the address of the data block by there is bit flipping copies the 3rd data block and the 4th data block to, and during by the 3rd data block and the 4th data block record data recovering process, described 4th several piece is the Backup Data block of the 3rd data block;
Correspondingly, described read interrupt in the 3rd data block or the 4th data block before occur the address of data block of bit flipping and data recovery process to include:
Judge the 3rd data block whether still preferably block, when described 3rd data block preferably block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 3rd data block;When described 3rd data block is changed into bad block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 4th data block.
The embodiment of the present invention additionally provides a kind of Data Recapture Unit, and described device includes: the first copy module, the second erasing module, the second copy module, wherein,
Described first copy module, for when the data in data block occurs bit flipping, the just data carrying out error checking and correct after (ecc) being copied to the first data block and/or the second data block;Wherein, described first data block and the second data block are the good block of continuous clean;
, there is the data in the data block of bit flipping for erasing in described second erasing module;
Described second copy module, for by the data copy in the first data block or the second data block to described carry out after erasing operation generation bit flipping data block in.
In such scheme, described device also includes the first erasing module, for the data before copying the just data after carrying out ecc to the first data block and/or the second data block, in erasing the first data block and/or the second data block.
In such scheme, described first copy module specifically for: the data just data that carries out obtaining after ecc in the data block that bit flipping occurs is copied to the first data block and/or the second data block by page (page).
In such scheme, when the described first copy module copies the just data carrying out error checking and correct after (ecc) to the first data block and the second data block, described second copy module specifically for: judge the first data block whether still preferably block, when described first data block preferably block, by the data copy in described first data block in the data block of the described generation bit flipping carrying out after erasing operation;When described first data block is changed into bad block, by the data copy in described second data block in the data block of the described generation bit flipping carrying out after erasing operation.
In such scheme, described device also includes the 3rd copy module, and the address for the data block by there is bit flipping copies the 3rd data block and/or the 4th data block to, and passes through the 3rd data block and/or the 4th data block, record data recovering process.
In such scheme, described device also includes interruption processing module, during for occurring to interrupt during data recovery, after reopening, read the address of data block and the data recovery process that bit flipping occurs before interrupting in the 3rd data block or the 4th data block, and the address according to the data block that bit flipping occurs before described interruption and data recovery process, proceed data recovery operation.
In such scheme, when the described 3rd copy module copies the address that the data block of bit flipping occurs to the 3rd data block and the 4th data block, and during by the 3rd data block and the 4th data block record data recovering process, described interruption processing module specifically for: judge the 3rd data block whether still preferably block, when described 3rd data block preferably block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 3rd data block;When described 3rd data block is changed into bad block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 4th data block.
Data reconstruction method and device that the embodiment of the present invention is provided, when the data in data block occurs bit flipping, the just data carrying out error checking and correct after (ecc) are copied to the first data block and/or the second data block;There is the data in the data block of bit flipping in erasing;By the data copy in the first data block or the second data block in the data block of the described generation bit flipping carrying out after erasing operation.The data convert being so capable of the data block will there is bit flipping arrives correct data, realizes occurring the data recovery of the memory area of bit flipping, effective solves the problems, such as bit flipping it is ensured that the reliability of the data of flash memory block.
Brief description
Fig. 1 is embodiment of the present invention data reconstruction method application scenarios schematic diagram;
Fig. 2 is the embodiment of the present invention one data reconstruction method schematic flow sheet;
Fig. 3 is the embodiment of the present invention two data reconstruction method schematic flow sheet;
Fig. 4 is embodiment of the present invention Data Recapture Unit structural representation.
Specific embodiment
In the embodiment of the present invention, when the data in data block occurs bit flipping, the just data carrying out error checking and correct after (ecc) is copied to the first data block and/or the second data block;There is the data in the data block of bit flipping in erasing;By the data copy in the first data block or the second data block in the data block of the described generation bit flipping carrying out after erasing operation.
In the embodiment of the present invention, described data reconstruction method is deployed in the driver of nand flash, opens nand flash data when core (kernel) config option and recovers macro switch, then open data recovery function described in the embodiment of the present invention.
Because bit flipping phenomenon can be detected by reading nand flash status register numerical value when carrying out read operation, therefore data reconstruction method described in the embodiment of the present invention is taking read operation as a example.Fig. 1 is data reconstruction method application scenarios schematic diagram described in the embodiment of the present invention, as shown in Figure 1, in the case of opening hardware ecc, upper level applications (app) are when carrying out read operation to nand flash, first read out the just data after carrying out ecc, then read the status register value of nand flash again, judge whether data there occurs bit flipping.If the status register instruction data of flash there occurs bit flipping phenomenon, and the bit number that bit flipping occurs in the range of the checking feature of ecc, then starts Data Recovery Process described in the embodiment of the present invention.
Below in conjunction with the accompanying drawings and specific embodiment, the enforcement to technical solution of the present invention is described in further detail.Fig. 2 is the embodiment of the present invention one data reconstruction method schematic flow sheet, as shown in Fig. 2 the present embodiment data reconstruction method comprises the following steps:
Step 201: when there is bit flipping in the data in data block, the data in erasing the first data block and/or the second data block;
Wherein, described first data block and the second data block are continuously good block;
Specifically, when there is bit flipping in the data in data block, erasing specified partition one of (as Free Partition) or the two continuously data in good block, such as the first data block and/or the second data block, to ensure the pure property of the first data block and/or the second data block memory space.
Step 202: the just data carrying out after ecc is copied to the first data block and/or the second data block;
Wherein, described first data block and the second data block are the good block of continuous clean;
In the embodiment of the present invention, described the just data carrying out after ecc is copied to the first data block and/or the second data block includes: the just data that the data in the data block that bit flipping occurs is carried out obtaining after ecc copies the first data block and/or the second data block to by page (page);
Specifically, reading by page occurs the data block of bit flipping to carry out the just data obtaining after ecc, and the data reading is write in the first data block and/or the second data block in specified partition.In the embodiment of the present invention, because the data of a page only has 2kb, therefore, read data from the data block that bit flipping occurs by page and can effectively reduce the occupancy to Installed System Memory.
As shown in fig. 1, in described first data block and the second data block two continuously good block, wherein, when the just data carrying out after ecc being copied to the first data block and the second data block in step 202, described second data block is the Backup Data block of described first data block, prevents the first data block to be changed into bad block during using.
Step 203: erasing occurs the data in the data block of bit flipping;
In the embodiment of the present invention, erasing operation is executed to data block bit flipping it is ensured that there is all skies of data in the data block of bit flipping, behavior eliminates bit flipping phenomenon.
Step 204: by the data copy in the first data block or the second data block in the data block of the described generation bit flipping carrying out after erasing operation;
When, in step 202, when the just data carrying out after ecc is copied to the first data block and the second data block, described second data block is the Backup Data block of the first data block;In this step, first determine whether the first data block whether still preferably block, when described first data block preferably block, by the data copy in described first data block in the data block of the described generation bit flipping carrying out after erasing operation;When described first data block is changed into bad block, by the data copy in described second data block in the data block of the described generation bit flipping carrying out after erasing operation.
In the embodiment of the present invention, when the Backup Data block that described second data block is the first data block, can with prioritizing selection by the data copy in the first data block to described carry out after erasing operation generation bit flipping data block in;During copy function is carried out to the first data block, if it find that described first data block is bad block, then by the data copy in the second data block in the data block of the described generation bit flipping carrying out after erasing operation.Under normal circumstances, the first data block and the second data block probability very little for bad block simultaneously, are negligible.
In the embodiment of the present invention, methods described also includes:
Step 205: the data in erasing the first data block and/or the second data block.
In the embodiment of the present invention, when complete in step 204 by the data copy in the first data block or the second data block to described carry out erasing operation after generation bit flipping data block in operation after, erasing the first data block and/or the second data block in data;If step 204 executes failure, repeated execution of steps 204;During implementing, can be with the execution frequency threshold value of setting steps 204, as when step 204 execution still cannot complete for five times by the data copy in the first data block or the second data block to described carry out erasing operation after generation bit flipping data block in, then show and copy unsuccessfully.
Impact in order to prevent aborted from data recovery procedure described in the embodiment of the present invention is caused in the embodiment of the present invention, methods described also includes: the data in erasing the 3rd data block and the 4th data block, the address that the data block of bit flipping occurs is copied to the 3rd data block and/or the 4th data block, and pass through the 3rd data block and/or the 4th data block, record data recovering process;When occurring to interrupt during data recovery, after reopening, read the address of data block and the data recovery process that bit flipping occurs before interrupting in the 3rd data block or the 4th data block, and the address according to the data block that bit flipping occurs before described interruption and data recovery process, proceed data recovery operation.
In the embodiment of the present invention, described aborted is possible to because powered-off fault leads to it is also possible to the interruption that leads to of other unknown causes.
For example, when the address of the data block by there is bit flipping copies the 3rd data block and the 4th data block to, and in the case of by the 3rd data block and the 4th data block record data recovering process, described read interrupt in the 3rd data block or the 4th data block before occur the address of data block of bit flipping and data recovery process to include: judge the 3rd data block whether still preferably block, when described 3rd data block preferably block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 3rd data block;When described 3rd data block is changed into bad block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 4th data block.
Fig. 3 is the embodiment of the present invention two data reconstruction method schematic flow sheet, as shown in Figure 3, in the embodiment of the present invention, second data block is the Backup Data block of the first data block, 4th data block is the Backup Data block of the 3rd data block, for the impact preventing aborted from data recovery procedure described in the embodiment of the present invention is caused, embodiment of the present invention methods described also includes: the data in erasing the 3rd data block and the 4th data block, the address that the data block of bit flipping occurs is copied to the 3rd data block and the 4th data block, and pass through the 3rd data block and the 4th data block, record data recovering process;When occurring to interrupt during data recovery, after reopening, read the address of data block and the data recovery process that bit flipping occurs before interrupting in the 3rd data block or the 4th data block, and the address according to the data block that bit flipping occurs before described interruption and data recovery process, proceed data recovery operation.
Specifically, restoration methods described in the embodiment of the present invention two comprise the following steps:
Step 301: read the just data after carrying out ecc;
Step 302: judge whether data block there occurs bit flipping;When there is bit flipping, execution step 303;Otherwise, execution step 317;
In this step, read the status register value of nand flash, judge whether data there occurs bit flipping
Step 303: read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 3rd data block/the 4th data block;
In this step, first determine whether the 3rd data block whether still preferably block, when described 3rd data block preferably block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 3rd data block;When described 3rd data block is changed into bad block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 4th data block.
Step 304: judge whether interrupt in last data recovery procedure;When not occurring in last data recovery procedure to interrupt, execution step 305;Otherwise, execution step 306;
In the embodiment of the present invention, judge whether interrupt in last data recovery procedure by described data recovery process;
Step 305: enter row address and replace, the address of the data block that will carry out data recovery replaces with this to be needed to carry out the address of the data block of data recovery;And execution step 309;
In this step, do not interrupt due in last data recovery procedure, be then not required to last process is processed, enter row address and replace, the address of the data block that will carry out data recovery replaces with this to be needed to carry out the address of the data block of data recovery, and execution step 309;
Step 306: judge the state occurring in last data recovery procedure to interrupt, when the state occurring in last data recovery procedure to interrupt is to copy the just data carrying out after ecc during the first data block and the second data block to, when i.e. last time interrupts interrupting for copy, execution step 307;When the state occurring in last data recovery procedure to interrupt is that erasing occurs during the data in the data block of bit flipping, when that is, last time interrupts interrupting for erasing, execute 309;
Step 307: enter row address and replace, the address carrying out the data block of data recovery is replaced with the address of the data block of last time undone data recovery;And execution step 309;
In this step, due to occur in last data recovery procedure interrupt state be the just data carrying out after ecc is copied to the first data block and the second data block during, i.e. copy procedure does not complete, therefore, in this step, enter row address to replace, the address of the data block that will carry out data recovery replaces with the address of the data block of last time undone data recovery.
Step 308: enter row address and replace, the address of the data block that will carry out data recovery replaces with the address of the data block of last time undone data recovery;And execution step 311;
In this step, during state due to occurring in last data recovery procedure to interrupt is the data that erasing occurs in the data block of bit flipping, i.e. erase process does not complete, therefore, in this step, enter row address to replace, the address of the data block that will carry out data recovery replaces with the address of the data block of last time undone data recovery.
Step 309: search for two groups of continuously good blocks: the first data block and the second data block in Free Partition, and carry out erasing operation;
In this step, wipe the data in the first data block and the second data block, to ensure the pure property of the first data block and the second data block memory space.
Step 310: the just data carrying out after ecc is copied to the first data block and the second data block;
In this step, the just data that the data in the data block that bit flipping occurs is carried out obtaining after ecc copies the first data block and the second data block to by page (page);Because the data of a page only has 2kb, therefore, read data from the data block that bit flipping occurs by page and can effectively reduce the occupancy to Installed System Memory.Wherein second data block is the Backup Data block of the first data block, prevents the first data block to be changed into bad block during using.
Step 311: erasing occurs the data in the data block of bit flipping;
In this step, erasing operation is executed to data block bit flipping it is ensured that there is all skies of data in the data block of bit flipping, behavior eliminates bit flipping phenomenon.
Step 312: by the data copy in the first data block or the second data block in the data block of the described generation bit flipping carrying out after erasing operation;
In this step, first determine whether the first data block whether still preferably block, when described first data block preferably block, by the data copy in described first data block in the data block of the described generation bit flipping carrying out after erasing operation;When described first data block is changed into bad block, by the data copy in described second data block in the data block of the described generation bit flipping carrying out after erasing operation.During implementing, can with prioritizing selection by the data copy in the first data block to described carry out after erasing operation generation bit flipping data block in;During copy function is carried out to the first data block, if it find that described first data block is bad block, then by the data copy in the second data block in the data block of the described generation bit flipping carrying out after erasing operation.Under normal circumstances, the first data block and the second data block probability very little for bad block simultaneously, are negligible.
Step 313: judge whether the step in the data block of the described generation bit flipping carrying out after erasing operation is successful by the data copy in the first data block or the second data block;When will be successful for the step in the data block of the described generation bit flipping carrying out after erasing operation for the data copy in the first data block or the second data block, execution step 314, otherwise, return to step 312;
In the embodiment of the present invention, if step 312 executes failure, repeated execution of steps 312;During implementing, can be with the execution frequency threshold value of setting steps 312, such as when step 312 executes five times still Cannot complete the data copy in the first data block or the second data block in the data block of the described generation bit flipping carrying out after erasing operation, then show and copy unsuccessfully.
Step 314: the data in erasing the first data block and the second data block;
Step 315: judge whether all data recovery procedures complete, when undone all data recovery procedures complete, execution step 316, otherwise, execution step 317;
Step 316: enter row address and replace, the address of the data block that will carry out data recovery replaces with the address of the data block of data recovery to be carried out next time;Return to step 309;
In this step, the data handling procedure that may not completed for last time before interrupting due to step 309 to step 314, it is also likely to be that this occurs the corresponding data procedures of bit flipping, therefore, now in step 315, need to judge whether all data recovery procedures complete, if the data handling procedure that step 309 did not completed to step 314 for last time before interrupting, after this generation bit flipping is then described, not yet carry out data recovery, accordingly, it would be desirable to enter row address replace, and return to step 309, carry out this data recovery procedure.
Step 317: this flow process terminates.
The embodiment of the present invention additionally provides a kind of Data Recapture Unit, Fig. 4 is embodiment of the present invention Data Recapture Unit structural representation, as shown in figure 4, described device includes: the first erasing module 41, first copy module 42, second erasing module 43, second copy module 44, wherein
Described first erasing module 41, for when the data in data block occurs bit flipping, wiping the data in the first data block and/or the second data block;
Wherein, described first data block and the second data block are continuously good block;Described second data block can be the Backup Data block of described first data block, prevent the first data block to be changed into bad block during using.
Specifically, when there is bit flipping in the data in data block, described first erasing module 41 wipes data continuously in good block for the specified partition one of (as Free Partition) two, as the first data block and the second data block, to ensure the pure property of the first data block and/or the second data block memory space.
Described first copy module 42, for copying the just data carrying out error checking and correct after (ecc) to the first data block and/or the second data block;
Wherein, described first data block and the second data block are the good block of continuous clean;
In the embodiment of the present invention, described first copy module 42 specifically for: the data just data that carries out obtaining after ecc in the data block that bit flipping occurs is copied to the first data block and/or the second data block by page (page).
Specifically, described first copy module 42 is read by page and occurs the data block of bit flipping to carry out the just data obtaining after ecc, and the data reading is write in the first data block and/or the second data block in specified partition.In the embodiment of the present invention, because the data of a page only has 2kb, therefore, read data from the data block that bit flipping occurs by page and can effectively reduce the occupancy to Installed System Memory.
, there is the data in the data block of bit flipping for erasing in described second erasing module 43;
In the embodiment of the present invention, described second erasing module 43 executes erasing operation to data block bit flipping it is ensured that there is all skies of data in the data block of bit flipping, and behavior eliminates bit flipping phenomenon.
Described second copy module 44, for by the data copy in the first data block or the second data block to described carry out after erasing operation generation bit flipping data block in;
In the embodiment of the present invention, when the first copy module 42 copies the just data carrying out after ecc to the first data block and the second data block, described second data block is the Backup Data block of the first data block;Described second copy module 44 specifically for: first determine whether the first data block whether still preferably block, when described first data block preferably block, by the data copy in described first data block in the data block of the described generation bit flipping carrying out after erasing operation;When described first data block is changed into bad block, by the data copy in described second data block in the data block of the described generation bit flipping carrying out after erasing operation;
In the embodiment of the present invention, when the Backup Data block that described second data block is the first data block, described second copy module 44 can with prioritizing selection by the data copy in the first data block to described carry out after erasing operation generation bit flipping data block in;During copy function is carried out to the first data block, if it find that described first data block is bad block, then by the data copy in the second data block in the data block of the described generation bit flipping carrying out after erasing operation.Under normal circumstances, the first data block and the second data block probability very little for bad block simultaneously, are negligible.
In the embodiment of the present invention, described device also includes the 3rd erasing module 45, for wiping the data in the first data block and/or the second data block;
In the embodiment of the present invention, described device also includes the 3rd copy module 46, interruption processing module 47, wherein, the address that described 3rd copy module 46 is used for the data block by there is bit flipping copies the 3rd data block and/or the 4th data block to, and pass through the 3rd data block and/or the 4th data block, record data recovering process;
Described interruption processing module 47, during for occurring to interrupt during data recovery, after reopening, read the address of data block and the data recovery process that bit flipping occurs before interrupting in the 3rd data block or the 4th data block, and the address according to the data block that bit flipping occurs before described interruption and data recovery process, proceed data recovery operation.
In the embodiment of the present invention, when the described 3rd copy module 46 copies the address that the data block of bit flipping occurs to the 3rd data block and the 4th data block, and in the case of by the 3rd data block and the 4th data block record data recovering process, described interruption processing module 47 specifically for: judge the 3rd data block whether still preferably block, when described 3rd data block preferably block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 3rd data block;When described 3rd data block is changed into bad block, read the address of data block and the data recovery process that bit flipping occurs before interrupting in described 4th data block.
Fig. 4 and shown in Data Recapture Unit in each processing module realize function, can refer to the associated description of aforementioned data restoration methods and understand.Skilled artisan would appreciate that, in Data Recapture Unit shown in Fig. 4, the function of each processing module can be realized by running on the program on processor, also can be realized by specific logic circuit, such as: can be realized by central processing unit (cpu), microprocessor (mpu), digital signal processor (dsp) or field programmable gate array (fpga).
It should be understood that disclosed method and device in several embodiments provided by the present invention, can realize in other way.Device embodiment described above is only schematically, for example, the division of described module, it is only a kind of division of logic function, actual can have other dividing mode, such as when realizing: multiple module or components can combine, or is desirably integrated into another system, or some features can ignore, or do not execute.In addition, the communication connection each other of shown or discussed each ingredient can be by some interfaces, the INDIRECT COUPLING of equipment or module or communication connection, can be electrical, machinery or other forms.
The above-mentioned module illustrating as separating component can be or may not be physically separate, as the part that module shows can be or may not be physical module, you can with positioned at a place it is also possible to be distributed on multiple mixed-media network modules mixed-medias;The purpose to realize this embodiment scheme for the part or all of module therein can be selected according to the actual needs.
In addition, each functional module in various embodiments of the present invention can be fully integrated in a processing module or each module individually as a module it is also possible to two or more modules are integrated in a module;Above-mentioned integrated module both can be to be realized in the form of hardware, it would however also be possible to employ the form that hardware adds software function module is realized.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can be completed by the related hardware of programmed instruction, aforesaid program can be stored in computer read/write memory medium, this program upon execution, executes the step including said method embodiment;And aforesaid storage medium includes: movable storage device, read only memory (rom, read-only memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
Or, if the above-mentioned integrated module of the embodiment of the present invention realized using in the form of software function module and as independent production marketing or use when it is also possible to be stored in a computer read/write memory medium.Based on such understanding, what the technical scheme of the embodiment of the present invention substantially contributed to prior art in other words partly can be embodied in the form of software product, this computer software product is stored in a storage medium, including some instructions with so that computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment methods described of the present invention.And aforesaid storage medium includes: movable storage device, rom, magnetic disc or CD etc. are various can be with the medium of store program codes.
The present invention is data reconstruction method described in example, device only taking above-described embodiment as a example, but it is not limited only to this, it will be understood by those within the art that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent to wherein some or all of technical characteristic;And these modifications or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit protection scope of the present invention.

Claims (14)

1. a kind of data reconstruction method is it is characterised in that methods described includes:
When the data in data block occurs bit flipping, error checking will be carried out and just correct after (ecc) Exact figures evidence copies the first data block and/or the second data block to;Wherein, described first data block and the second data Block is the good block of continuous clean;
There is the data in the data block of bit flipping in erasing;
By the data copy in the first data block or the second data block to the described generation position carrying out after erasing operation In the data block of upset.
2. according to claim 1 method it is characterised in that by the just data after carrying out ecc Before copying the first data block and/or the second data block to, methods described also includes: erasing the first data block and / or the second data block in data.
3. according to claim 1 method it is characterised in that described will carry out the positive exact figures after ecc According to copying the first data block to and/or the second data block includes:
Data in the data block that bit flipping occurs is carried out the just data obtaining after ecc by page (page) Copy the first data block and/or the second data block to.
4. according to claim 1 method it is characterised in that when by just data after carrying out ecc When copying the first data block and the second data block to, described second data block is the Backup Data of the first data block Block;
Correspondingly, described by the data copy in the first data block or the second data block to described carry out erasing behaviour The data block of the generation bit flipping after work includes:
Judge the first data block whether still preferably block, when the first data block preferably block, by the described first number According to the data copy in block in the data block of the described generation bit flipping carrying out after erasing operation;When described When one data block is changed into bad block, the data copy in described second data block is carried out after erasing operation to described Generation bit flipping data block in.
5. according to Claims 1-4 any one methods described it is characterised in that methods described also includes:
The address that the data block of bit flipping occurs is copied to the 3rd data block and/or the 4th data block, and passes through 3rd data block and/or the 4th data block, record data recovering process.
6. according to claim 5 method it is characterised in that methods described also includes: work as data recovery During when occurring to interrupt, after reopening, read before interrupting in the 3rd data block or the 4th data block There is the address of data block and the data recovery process of bit flipping, and according to before described interruption, bit flipping occurs The address of data block and data recovery process, proceed data recovery operation.
7. according to claim 6 method it is characterised in that when will occur bit flipping data block ground Location copies the 3rd data block and the 4th data block to, and passes through the 3rd data block and the 4th data block record data During recovering process, described 4th several piece is the Backup Data block of the 3rd data block;
Correspondingly, described reading interrupts the front data block that bit flipping occurs in the 3rd data block or the 4th data block Address and data recovery process include:
Judge the 3rd data block whether still preferably block, when described 3rd data block preferably block, read described There is the address of data block and the data recovery process of bit flipping before interrupting in 3rd data block;When described When three data blocks are changed into bad block, read the ground of the data block that bit flipping occurs before interrupting in described 4th data block Location and data recovery process.
8. a kind of Data Recapture Unit is it is characterised in that described device includes: first copy module, second Erasing module, the second copy module, wherein,
Described first copy module, for when the data in data block occurs bit flipping, carrying out mistake inspection Look into and correct the just data after (ecc) and copy the first data block and/or the second data block to;Wherein, institute Stating the first data block and the second data block is the good block of continuous clean;
, there is the data in the data block of bit flipping for erasing in described second erasing module;
Described second copy module, for by the data copy in the first data block or the second data block to described Carry out in the data block of the generation bit flipping after erasing operation.
9. according to claim 8 device it is characterised in that described device also includes the first erasing module, For, before copying the just data after carrying out ecc to the first data block and/or the second data block, wiping Except the data in the first data block and/or the second data block.
10. according to claim 8 device it is characterised in that described first copy module specifically for: The just data that data in the data block that bit flipping occurs is carried out obtaining after ecc is copied by page (page) To the first data block and/or the second data block.
11. according to claim 8 device it is characterised in that when described first copy module will carry out When just data after error checking and correction (ecc) copies the first data block and the second data block to, institute State the second copy module specifically for: judge the first data block whether still preferably block, when described first data Block preferably block when, by the data copy in described first data block to the described generation position carrying out after erasing operation In the data block of upset;When described first data block is changed into bad block, by the data in described second data block Carry out described in copying in the data block of the generation bit flipping after erasing operation.
12. according to Claim 8 to 11 any one described devices it is characterised in that described device also includes 3rd copy module, the address for the data block by there is bit flipping copies the 3rd data block and/or the 4th to Data block, and pass through the 3rd data block and/or the 4th data block, record data recovering process.
13. according to claim 12 described device it is characterised in that described device also includes interrupt processing mould Block, for during data recovery occur interrupt when, after reopening, read the 3rd data block or There is the address of data block and the data recovery process of bit flipping before interrupting in 4th data block, and according to institute State the address of data block and the data recovery process that bit flipping occurs before interrupting, proceed data recovery behaviour Make.
14. will occur it is characterised in that working as described 3rd copy module according to claim 13 described device The address of the data block of bit flipping copies the 3rd data block and the 4th data block to, and by the 3rd data block and During the 4th data block record data recovering process, described interruption processing module specifically for: judge the 3rd data Block whether still preferably block, when described 3rd data block preferably block, reads in described 3rd data block and interrupts The front address of data block that bit flipping occurs and data recovery process;When described 3rd data block is changed into bad block When, read and before interrupting in described 4th data block, occur the address of data block of bit flipping and data recovery to enter Journey.
CN201510423400.8A 2015-07-17 2015-07-17 Data recovery method and device Withdrawn CN106354580A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510423400.8A CN106354580A (en) 2015-07-17 2015-07-17 Data recovery method and device
PCT/CN2016/090131 WO2017012507A1 (en) 2015-07-17 2016-07-15 Data recovery method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510423400.8A CN106354580A (en) 2015-07-17 2015-07-17 Data recovery method and device

Publications (1)

Publication Number Publication Date
CN106354580A true CN106354580A (en) 2017-01-25

Family

ID=57833708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510423400.8A Withdrawn CN106354580A (en) 2015-07-17 2015-07-17 Data recovery method and device

Country Status (2)

Country Link
CN (1) CN106354580A (en)
WO (1) WO2017012507A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083478A (en) * 2018-01-25 2019-08-02 力瑞信(深圳)科技有限公司 A kind of data reconstruction method, data recovery system and solid state hard disk

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367717B (en) * 2020-02-20 2022-08-16 广州安凯微电子股份有限公司 Electronic equipment recovery method, device and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025715A (en) * 2007-03-07 2007-08-29 北京飞天诚信科技有限公司 Power-fail protection method based on two continuous logical blocks for non-volatile memory
CN101777013A (en) * 2009-01-12 2010-07-14 成都市华为赛门铁克科技有限公司 Solid state disk and data read-write method
CN102141943A (en) * 2010-01-28 2011-08-03 建兴电子科技股份有限公司 Flash memory device and data protection method thereof
CN102203740A (en) * 2011-05-27 2011-09-28 华为技术有限公司 Data processing method, device and system
CN103530242A (en) * 2012-07-06 2014-01-22 河南思维自动化设备股份有限公司 Method for power down protection in write operation process of NandFlash memory

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923896A (en) * 2009-06-12 2010-12-22 威刚科技(苏州)有限公司 Electronic storage device and error correcting method thereof
CN103226528A (en) * 2012-01-31 2013-07-31 上海华虹集成电路有限责任公司 Multi-channel Nandflash controller

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025715A (en) * 2007-03-07 2007-08-29 北京飞天诚信科技有限公司 Power-fail protection method based on two continuous logical blocks for non-volatile memory
CN101777013A (en) * 2009-01-12 2010-07-14 成都市华为赛门铁克科技有限公司 Solid state disk and data read-write method
CN102141943A (en) * 2010-01-28 2011-08-03 建兴电子科技股份有限公司 Flash memory device and data protection method thereof
CN102203740A (en) * 2011-05-27 2011-09-28 华为技术有限公司 Data processing method, device and system
CN103530242A (en) * 2012-07-06 2014-01-22 河南思维自动化设备股份有限公司 Method for power down protection in write operation process of NandFlash memory

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083478A (en) * 2018-01-25 2019-08-02 力瑞信(深圳)科技有限公司 A kind of data reconstruction method, data recovery system and solid state hard disk
CN110083478B (en) * 2018-01-25 2024-04-19 东莞力晶科技有限公司 Data recovery method, data recovery system and solid state disk

Also Published As

Publication number Publication date
WO2017012507A1 (en) 2017-01-26

Similar Documents

Publication Publication Date Title
CN102023815B (en) RAID is realized in solid-state memory
CN102012847B (en) Improved disk array reconstruction method
EP2857971B1 (en) Method and device for repairing error data
US8812910B2 (en) Pilot process method for system boot and associated apparatus
CN106463179A (en) Method, apparatus and system for handling data error events with memory controller
CN103415840A (en) Error management across hardware and software layers
CN103970481A (en) Method and device for reconstructing memory array
CN102043689B (en) Fault tolerance design method for solid-state memory device
JP2014120179A (en) Salvaging event trace information in power loss interruption scenarios
JP6290934B2 (en) Programmable device, error holding system, and electronic system apparatus
CN103713969A (en) Method and device for improving reliability of solid state disk
CN105808371A (en) Data backup and recovery method, control chip and storage device
CN108228396A (en) For handling the method and apparatus of the mistake of driver
TW201603030A (en) Method for preventing read-disturb, memory control circuit unit and memory storage apparatus
CN106445720A (en) Memory error recovery method and device
CN103247345A (en) Quick-flash memory and detection method for failure memory cell of quick-flash memory
CN102541690A (en) Intelligent card and method for recovering data
CN105005453A (en) Bad block management system for satellite-based NAND FLASH solid memory
CN106227625A (en) The restoration methods of a kind of flash data damaged because of power down and system
US9280301B2 (en) Method and device for recovering erroneous data
US20140372833A1 (en) Data protecting method, memory controller and memory storage device
TW201407614A (en) Data storing method, and memory controller and memory storage apparatus using the same
CN106354580A (en) Data recovery method and device
CN105094684A (en) Reuse method and system for problematic disks in disk array system
CN111045858A (en) Bad channel processing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20170125