CN104133731A - Method and system for correcting data - Google Patents

Method and system for correcting data Download PDF

Info

Publication number
CN104133731A
CN104133731A CN201410384374.8A CN201410384374A CN104133731A CN 104133731 A CN104133731 A CN 104133731A CN 201410384374 A CN201410384374 A CN 201410384374A CN 104133731 A CN104133731 A CN 104133731A
Authority
CN
China
Prior art keywords
data
mirror image
mirror
read
position exchange
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410384374.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.)
Dawning Information Industry Beijing Co Ltd
Original Assignee
Dawning Information Industry Beijing 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 Dawning Information Industry Beijing Co Ltd filed Critical Dawning Information Industry Beijing Co Ltd
Priority to CN201410384374.8A priority Critical patent/CN104133731A/en
Publication of CN104133731A publication Critical patent/CN104133731A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a method and system for correcting data. The method for correcting the data is applied to a Nand Flash memorizer, and comprises the steps that the data in a first mirror image are read in sequence; the data are verified, and whether position exchange happens to the data or not is judged according to the verification result; when the judgment result is that the position exchange occurs, the data in a second mirror image are read, the first mirror image is synchronized through the read data, and the second mirror image is the backup mirror image of the first mirror image. According to the method, the data of the backup mirror image are utilized to restore the mirror image data with the position exchange, the problem that position exchange happens to data in NAND can be solved in time, and the data with the position exchange can be corrected under the condition that a correction algorithm cannot correct the data. The method can correct the data in time under the condition that the position exchange happens to few data, and the accuracy of the data stored in the NAND and system stability are guaranteed.

Description

Data correcting method and system
Technical field
The present invention relates to data processing field, and especially, relate to a kind of data correcting method and system.
Background technology
FLASH storer belongs to the one of memory devices, it is a kind of involatile internal memory, it also can keep muchly data under the condition that there is no electric current supply, storage characteristics is equivalent to hard disk, and this characteristic just FLASH storer is become the basis of the storage medium of all kinds of pocket digital devices.NAND FLASH is widely used in the emerging digital devices such as mobile storage, digital camera, MP3 player, palm PC.Owing to being subject to the drive of the powerful development of digital equipment, NAND FLASH is growing at top speed always.
At present, all FLASH devices are all subject to exchanging the puzzlement of phenomenon, a kind of method that solves exchange phenomenon problem is proposed in prior art, it is rewritten to the data after proofreading and correct in NAND by correcting algorithm in the time that the bit number making a mistake is greater than " bit error thresholds " by the current bit number making a mistake is compared with pre-set " bit error thresholds ".
But when occurring that wrong bit number quantity is excessive, cause correcting algorithm to proofread and correct, said method cannot solve the problem of position exchange so.
In addition; in some cases; only have bit number generation position exchange and these generations bit number quantity exchanging of minority to be less than " bit error thresholds "; these a small amount of bit numbers that position exchange occurs will not be corrected so; although it may not be clearly that the bit number of these a small amount of generation position exchanges changes; if but it occurs on a critical file, this slight hitch may cause system-down, this is also the insurmountable problem of above-mentioned prior art.
There is the bit number of position exchange for NAND in correlation technique very few or too much cause the problem that cannot proofread and correct, not yet propose at present effective solution.
Summary of the invention
For the problem in correlation technique, the present invention proposes a kind of data correcting method and system, can be by utilizing the data of backup image that the method for the data of position exchange mirror image synchronously occurs, realize the problem of data bit exchange in timely correction NAND, and in the situation that correcting algorithm cannot be proofreaied and correct, also can proofread and correct processings to the data that position exchange occurs, even thereby and in the situation that low volume data has occurred to exchange, also can proofread and correct in time ensured to be stored in NAND in the correctness of data and the stability of system.
For realizing above-mentioned technical purpose, according to an aspect of the present invention, provide a kind of data correcting method.
This data correcting method is applied in Nand Flash storer, and this data correcting method comprises:
Read successively the data in first mirror picture;
Described data are carried out to verification, judge according to check results whether described data position exchange occurs;
For be in the situation that, read the data in the second mirror image in judged result, and utilize the described data that read to look like to carry out synchronously to described first mirror, wherein, described the second mirror image is the backup image of described first mirror picture.
Wherein, the quantity of described the second mirror image is one or more, and with described first mirror image position in the same subregion of NAND, and share a subregion head at first mirror picture described in described same subregion and described the second mirror image.
Wherein, read successively the data in described first mirror picture, comprising:
Read subregion header, and point to the start address of described first mirror picture, wherein said subregion header comprise following one of at least: the md5 value of the start address of mirror image, the size of mirror image and mirror image.
Wherein, when described data occur in the situation of position exchange, the maximum number bits that can proofread and correct with correcting algorithm through the bit number of the definite generation position exchange of verification can also be compared, be greater than the described maximum number bits that correcting algorithm can proofread and correct at the bit number of definite generation position exchange, reading out data from described the second mirror image, and utilize the data that read to look like to carry out synchronously to described first mirror.
Wherein, the described data that read from described the second mirror image have identical skew with the data that position exchange occurs in described first mirror picture.
Wherein, this data correcting method further comprises:
After the data of described first mirror picture have all been proofreaied and correct, described the second mirror image is all read, and calculate the md5 value of described the second mirror image after again reading, when md5 value in described md5 value and the subregion head of described the second mirror image after reading again is inconsistent, utilize synchronously described second mirror image of data of the first mirror picture after having proofreaied and correct.
A kind of data correction system is provided according to another aspect of the present invention, has been applied in Nand Flash storer, this data correction system comprises:
Read module for reading successively the data of first mirror picture, and reads the data in the second mirror image in the situation that there is position exchange;
Correction verification module, for the data of described first mirror picture are carried out to verification, judges according to check results whether described data position exchange occurs;
Synchronization module, for utilizing the data of described the second mirror image reading to look like to carry out synchronously to described first mirror in the situation that there is position exchange;
Wherein, the backup image that described the second mirror image is described first mirror picture.
Wherein, described read module is further used for reading subregion header, and points to the start address of described first mirror picture, and after the data of described first mirror picture have all been proofreaied and correct, described the second mirror image is all read, and calculate the md5 value of described the second mirror image after again reading;
Wherein said subregion header comprise following one of at least: the md5 value of the start address of mirror image, the size of mirror image and mirror image.
Wherein, described correction verification module is further used for occurring in the situation of position exchange when described data, determine the bit number that position exchange occurs in described first mirror picture, and the maximum number bits that the bit number of definite generation position exchange can be proofreaied and correct with correcting algorithm is compared, and, described synchronization module is for being greater than the described maximum number bits that correcting algorithm can proofread and correct for the bit number of definite generation position exchange at comparative result, reading out data from described the second mirror image, and utilize the data that read to look like to carry out synchronously to described first mirror.
Wherein, described synchronization module is further used for md5 value in described md5 value and the subregion head of described the second mirror image after reading again when inconsistent, utilizes synchronously described second mirror image of data of the first mirror picture after having proofreaied and correct.
The present invention passes through, utilize the data of backup image to recover the method for the data that exchange mirror image in position occurs, can proofread and correct in time data in NAND the problem that position exchanges occurs, and in the situation that cannot proofreading and correct, correcting algorithm also can proofread and correct processing to the data that position exchange occurs, even and if in the situation that position exchange has occurred low volume data, the present invention also can proofread and correct in time, has ensured to be stored in the correctness of data and the stability of system in NAND.
Brief description of the drawings
Fig. 1 is the process flow diagram of the data correcting method that provides according to the embodiment of the present invention;
Fig. 2 is the overall flow figure of the data correcting method of the present invention's one specific embodiment;
Fig. 3 is the block diagram of the data correction system that provides according to the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain, belongs to the scope of protection of the invention.
According to embodiments of the invention, a kind of data correcting method is provided, be applied in Nand Flash storer.
As shown in Figure 1, this data correcting method comprises:
Step S101, reads the data in first mirror picture successively;
Step S103, carries out verification to data, judges according to check results whether data position exchange occurs;
Step S105, for be in the situation that, reads the data in the second mirror image in judged result, and utilizes the data that read to look like to carry out synchronously to first mirror, and wherein, the second mirror image is the backup image of first mirror picture.
And the quantity of the second mirror image is one or more, and with first mirror image position in the same subregion of NAND, and first mirror picture and the second mirror image share a subregion head in same subregion.
Wherein, step S101, the data that read successively in first mirror picture further comprise: read subregion header, and point to the start address of first mirror picture, wherein subregion header comprise following one of at least: the md5 value of the start address of mirror image, the size of mirror image and mirror image.
In addition, when data occur in the situation of position exchange, the maximum number bits that can proofread and correct with correcting algorithm through the bit number of the definite generation position exchange of verification is compared, be greater than the maximum number bits that correcting algorithm can proofread and correct at the bit number of definite generation position exchange, reading out data from the second mirror image, and utilize the data that read to look like to carry out synchronously to first mirror.
Wherein, the data that read from the second mirror image have identical skew with the data that position exchange occurs in first mirror picture.
In addition, after the data of first mirror picture have all been proofreaied and correct, the second mirror image is all read, and calculate the md5 value of the second mirror image after again reading, when md5 value in md5 value and the subregion head of the second mirror image after reading again is inconsistent, utilize the data of the first mirror picture after having proofreaied and correct to carry out synchronous the second mirror image, so also can ensure the correctness of the second mirror image.
In order more clearly to understand the present invention, with a specific embodiment, the present invention will be described below.
As shown in Figure 2 the process flow diagram of the present invention's one specific embodiment, its step is as follows:
(1) read subregion header, the start address of two mirror images that obtain comprising in this subregion, the md5 value of the size of mirror image and mirror image is also pointed to the start address of first mirror picture;
(2) from NAND, read successively the data of first mirror image;
(3) data are carried out to verification;
(4) if there is not the phenomenon of position exchange, jump to (2);
(5) phenomenon exchanging if there is position, compare according to the bit number of the definite generation position exchange of verification and the maximum number bits that correcting algorithm can be proofreaied and correct, judge whether to exceed the maximum number bits that correcting algorithm can be proofreaied and correct, if do not exceeded, by correcting algorithm, the data after proofreading and correct are written back in NAND, then jump to (2);
(6) if exceeded the maximum number bits that correcting algorithm can be proofreaied and correct, be synchronized to first mirror image from the same position reading out data of second mirror image.Although also there will be situation about cannot proofread and correct during from second mirror image reading out data, but two mirror images occur that the probability that same skew cannot proofread and correct is very low simultaneously, in using if actual, find this phenomenon, need in subregion, increase an identical mirror image, the second mirror image is that backup image and the backup image of first mirror picture can be multiple again;
(7) proofread and correct successively the data of first mirror image until finish;
(8) directly read the total data of second mirror image, calculate md5 value according to the data that read;
(9) the md5 value of preserving in the md5 value of second mirror image recalculating and subregion head is compared, if inconsistent, first the data of mirror image after just now proofreading and correct are synchronized in second mirror image.
According to embodiments of the invention, a kind of data correction system is provided, be applied in Nand Flash storer.
As shown in Figure 3, this data correction system comprises:
Read module 31 for reading successively the data of first mirror picture, and reads the data in the second mirror image in the situation that there is position exchange;
Correction verification module 32, for the data of first mirror picture are carried out to verification, judges according to check results whether data position exchange occurs;
Synchronization module 33, for utilizing the data of the second mirror image reading to look like to carry out synchronously to first mirror in the situation that there is position exchange;
Wherein, the second mirror image is the backup image of first mirror picture.
Wherein, read module 31 is further used for reading subregion header, and points to the start address of first mirror picture, and after the data of first mirror picture have all been proofreaied and correct, the second mirror image is all read, and calculates the md5 value of the second mirror image after again reading;
Wherein subregion header comprise following one of at least: the md5 value of the start address of mirror image, the size of mirror image and mirror image.
Wherein, correction verification module 32 is further used for occurring in the situation of position exchange when data, determine the bit number that position exchange occurs in first mirror picture, and the maximum number bits that the bit number of definite generation position exchange can be proofreaied and correct with correcting algorithm is compared, and, synchronization module 33 is for being greater than the maximum number bits that correcting algorithm can proofread and correct for the bit number of definite generation position exchange at comparative result, reading out data from the second mirror image, and utilize the data that read to look like to carry out synchronously to first mirror.
Wherein, synchronization module 33 is further used for: when md5 value in md5 value and the subregion head of the second mirror image after reading again is inconsistent, and synchronous second mirror image of data of the first mirror picture after utilization has been proofreaied and correct.
In sum, by means of technique scheme of the present invention, the present invention passes through, recover the method for the data that position exchange occurs and proofread and correct by correcting algorithm in the time that a generation bit number exchanging is less than the maximum number bits that correcting algorithm can proofread and correct when there are to utilize when the bit number of position exchange is greater than the maximum number bits that correcting algorithm can proofread and correct the data of backup image in NAND, realize data in timely correction NAND and occurred the problem that position exchanges, just adopt correlation technique to proofread and correct as long as there is the phenomenon of position exchange, the correctness of data and the stability of system in NAND are ensured to be stored in.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a data correcting method, is characterized in that, is applied in Nand Flash storer, and described method comprises:
Read successively the data in first mirror picture;
Described data are carried out to verification, judge according to check results whether described data position exchange occurs;
For be in the situation that, read the data in the second mirror image in judged result, and utilize the described data that read to look like to carry out synchronously to described first mirror, wherein, described the second mirror image is the backup image of described first mirror picture.
2. data correcting method according to claim 1, it is characterized in that, the quantity of described the second mirror image is one or more, and with described first mirror image position in the same subregion of NAND, and share a subregion head at first mirror picture described in described same subregion and described the second mirror image.
3. data correcting method according to claim 1, is characterized in that, reads successively the data in described first mirror picture, comprising:
Read subregion header, and point to the start address of described first mirror picture, wherein said subregion header comprise following one of at least: the md5 value of the start address of mirror image, the size of mirror image and mirror image.
4. data correcting method according to claim 1, it is characterized in that, when described data occur in the situation of position exchange, the maximum number bits that can proofread and correct with correcting algorithm through the bit number of the definite generation position exchange of verification is compared, be greater than the described maximum number bits that correcting algorithm can proofread and correct at the bit number of definite generation position exchange, reading out data from described the second mirror image, and utilize the data that read to look like to carry out synchronously to described first mirror.
5. data correcting method according to claim 1, is characterized in that, the described data that read from described the second mirror image have identical skew with the data that position exchange occurs in described first mirror picture.
6. data correcting method according to claim 1, is characterized in that, described data correcting method further comprises:
After the data of described first mirror picture have all been proofreaied and correct, described the second mirror image is all read, and calculate the md5 value of described the second mirror image after again reading, when md5 value in described md5 value and the subregion head of described the second mirror image after reading again is inconsistent, utilize synchronously described second mirror image of data of the first mirror picture after having proofreaied and correct.
7. a data correction system, is characterized in that, is applied in Nand Flash storer, and described data correction system comprises:
Read module for reading successively the data of first mirror picture, and reads the data in the second mirror image in the situation that there is position exchange;
Correction verification module, for the data of described first mirror picture are carried out to verification, judges according to check results whether described data position exchange occurs;
Synchronization module, for utilizing the data of described the second mirror image reading to look like to carry out synchronously to described first mirror in the situation that there is position exchange;
Wherein, the backup image that described the second mirror image is described first mirror picture.
8. data correction system according to claim 7, it is characterized in that, described read module is further used for: read subregion header, and point to the start address of described first mirror picture, and after the data of described first mirror picture have all been proofreaied and correct, described the second mirror image is all read, and calculate the md5 value of described the second mirror image after again reading;
Wherein said subregion header comprise following one of at least: the md5 value of the start address of mirror image, the size of mirror image and mirror image.
9. data correction system according to claim 7, it is characterized in that, described correction verification module is further used for occurring in the situation of position exchange when described data, determine the bit number that position exchange occurs in described first mirror picture, and the maximum number bits that the bit number of definite generation position exchange can be proofreaied and correct with correcting algorithm is compared, and, described synchronization module is for being greater than the described maximum number bits that correcting algorithm can proofread and correct for the bit number of definite generation position exchange at comparative result, reading out data from described the second mirror image, and utilize the data that read to look like to carry out synchronously to described first mirror.
10. data correction system according to claim 7, it is characterized in that, described synchronization module is further used for: when md5 value in described md5 value and the subregion head of described the second mirror image after reading again is inconsistent, utilize synchronously described second mirror image of data of the first mirror picture after having proofreaied and correct.
CN201410384374.8A 2014-08-06 2014-08-06 Method and system for correcting data Pending CN104133731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410384374.8A CN104133731A (en) 2014-08-06 2014-08-06 Method and system for correcting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410384374.8A CN104133731A (en) 2014-08-06 2014-08-06 Method and system for correcting data

Publications (1)

Publication Number Publication Date
CN104133731A true CN104133731A (en) 2014-11-05

Family

ID=51806416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410384374.8A Pending CN104133731A (en) 2014-08-06 2014-08-06 Method and system for correcting data

Country Status (1)

Country Link
CN (1) CN104133731A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339525A (en) * 2008-08-22 2009-01-07 北京星网锐捷网络技术有限公司 Method, system and equipment for error detection to data
US20100011276A1 (en) * 2008-07-11 2010-01-14 Genesys Logic, Inc. Storage device for refreshing data pages of flash memory based on error correction code and method for the same
CN101901169A (en) * 2010-03-23 2010-12-01 成都市华为赛门铁克科技有限公司 Scanner and method
CN102073563A (en) * 2011-02-23 2011-05-25 深圳市江波龙电子有限公司 Flash memory equipment, and method and system for managing storage blocks in same
CN102200937A (en) * 2011-05-31 2011-09-28 深圳创维-Rgb电子有限公司 Method, device and television system for reading data in not-and (NAND) flash memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100011276A1 (en) * 2008-07-11 2010-01-14 Genesys Logic, Inc. Storage device for refreshing data pages of flash memory based on error correction code and method for the same
CN101339525A (en) * 2008-08-22 2009-01-07 北京星网锐捷网络技术有限公司 Method, system and equipment for error detection to data
CN101901169A (en) * 2010-03-23 2010-12-01 成都市华为赛门铁克科技有限公司 Scanner and method
CN102073563A (en) * 2011-02-23 2011-05-25 深圳市江波龙电子有限公司 Flash memory equipment, and method and system for managing storage blocks in same
CN102200937A (en) * 2011-05-31 2011-09-28 深圳创维-Rgb电子有限公司 Method, device and television system for reading data in not-and (NAND) flash memory

Similar Documents

Publication Publication Date Title
US8650463B2 (en) Solid state drive and method of controlling an error thereof
CN103745753A (en) Error correction method and system based on flash memory
JP2011048725A (en) Nonvolatile memory device and nonvolatile memory controller
CN103955430A (en) Data management method and apparatus in flash memory storage device
CN105740088B (en) Flash memory data error correction method and device
US9384144B1 (en) Error detection using a logical address key
CN103136108B (en) Flash memory devices and method for reading data thereof
US20200233590A1 (en) Offloading device maintenance to an external processor in low-latency, non-volatile memory
CN105808371A (en) Data backup and recovery method, control chip and storage device
US9524212B2 (en) Method, device and operating system for processing and using burn data of NAND flash
US20150006999A1 (en) Flash memory apparatus, memory controller and method for controlling flash memory
CN104360957A (en) Method for maintaining flash memory wear leveling
JP4866107B2 (en) Nonvolatile memory device and write determination method thereof
CN106910528A (en) A kind of optimization method and device of solid state hard disc data routing inspection
US9639441B2 (en) Solid-state storage system, apparatus and method of writing data
CN103617260A (en) Index generation method and device for repeated data deletion
CN105869675A (en) Semiconductor device and operating method thereof
CN105280239A (en) Method and device for dynamically realizing ECC check codes of solid state drives
US9754682B2 (en) Implementing enhanced performance with read before write to phase change memory
CN108108263B (en) Data processing method and device for solid state disk
CN113223583A (en) Method for rereading data in NAND Flash bad block, electronic equipment and storage medium
CN101634938A (en) Data migration method and data migration device of solid state disk and solid state disk
CN106919474A (en) A kind of data cached guard method and device
CN105575439B (en) Method for correcting failure of storage unit and memory
CN111857603A (en) Data processing method and related device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141105