CN103092727A - Data error correction method and device on flash storage medium - Google Patents

Data error correction method and device on flash storage medium Download PDF

Info

Publication number
CN103092727A
CN103092727A CN2013100199909A CN201310019990A CN103092727A CN 103092727 A CN103092727 A CN 103092727A CN 2013100199909 A CN2013100199909 A CN 2013100199909A CN 201310019990 A CN201310019990 A CN 201310019990A CN 103092727 A CN103092727 A CN 103092727A
Authority
CN
China
Prior art keywords
user data
metadata
data
host sectors
error correction
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
CN2013100199909A
Other languages
Chinese (zh)
Other versions
CN103092727B (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.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment 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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN201310019990.9A priority Critical patent/CN103092727B/en
Publication of CN103092727A publication Critical patent/CN103092727A/en
Application granted granted Critical
Publication of CN103092727B publication Critical patent/CN103092727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a data error correction method and a device on a flash storage medium and relates to the field of data storage. The data error correction method and the device on the flash storage medium are used for improving error correcting accuracy of data on the flash storage medium. Metadata which correspond to user data are written into a physical main sector and a physical backup sector. When the user data is read, the metadata in the physical main sector and the physical backup sector can conduct automatic error correction processing, and the metadata obtained by the automatic error correction processing conduct error correction to the user data. The data error correction method and the device on the flash storage medium can improve error correction accuracy of the data on the flash storage medium.

Description

Data error-correcting method on the Flash storage medium and device
Technical field
The present invention relates to field of data storage, relate in particular to data error-correcting method and device on a kind of Flash storage medium.
Background technology
The Flash chip is widely used in all kinds of embedded devices at present, and general service comprises the storing software version, records running log etc.Show as the Flash chip and bit (bit) bit flipping occurs owing to having certain error probability in long-term, the frequent use procedure of the storage medium of Flash chip, makeing mistakes, therefore need to carry out necessary protection for user demand.
For the data fault-tolerant method under the different application scene, difference is arranged also, the below introduces three kinds of schemes:
The first, for the storing software version and the application scenarios of high reliability request is arranged, existing scheme is direct two parts of softwares of storage on the Flash chip mostly, judge the software that uses which version by algorithm flow, and flow process as shown in Figure 1.After system starts, software to version one carries out validity calculating, judges according to result of calculation whether the software of version one is available, if available, load and move the software of version one, otherwise, the software of version two is carried out validity calculating, judge according to result of calculation whether the software of version two is available, if available, load and move the software of version two, otherwise this flow process finishes.
Wherein, the judgement of the validity of version software specifically can be used cyclic redundancy check (CRC) (Cyclic Redundancy Check, the CRC) method for version software, and this method is pure application layer protection mechanism.
Second, use for simple log store, because the writing of Flash chip, read operation are very frequent, the degree of wear to the Flash chip is higher, in order to tackle mistake, existing Flash chip driver program generally all is divided into the Flash chip several standard-sized physical locations, common is 512 bytes, this physical location is called physical sector (sector), physics sector computing error correction (Error Checking and Correcting for the storage user data, ECC) code, be kept at the ECC code in independent physics sector.Calculate the ECC code during user's data writing and be saved in special-purpose physics sector, using the ECC code of preserving to carry out the ECC error correction to the data that needs read during user's reading out data, the data after error correction are returned to the user.
Write the flow process of user data as shown in Fig. 2 A, when needs write user data, distribute physics sector according to the size of user data, calculate the ECC code according to the size of physics sector, user data is written in the physics sector of distribution, and the ECC code that calculates is written in special-purpose sector.
Read the flow process of user data as shown in Fig. 2 B, when needs read user data, read user data from physics sector, and read the ECC code from special-purpose sector, the ECC code that use reads carries out the ECC error correction to the user data that reads out, and the user data after error correction is submitted to the user.
the 3rd, for the application scenarios that uses the complicated sector management algorithms such as file system, the file system aspect is used logic sector (logic sector) numbering, the bottom layer driving aspect is used physical sector (physics sector) numbering, in order to realize good abrasion equilibrium scheduling algorithm, need to set up index relative, when file system reads the logic sector of appointment, bottom layer driving software need to be by tabling look-up with the corresponding physics sector of logic sector address computation out, thereby reading out data, need simultaneously to preserve logic sector numbering and the use state of the current correspondence of each physics sector, after restarting, the system of being convenient to recovers the corresponding relation of logic sector and physics sector, to preserve the physics sector counterlogic sector of institute numbering, the data of the information such as the ECC code of physics sector state and physics sector are called metadata, and the data that the user who needs on physics sector to preserve is imported into are called user data.
As can be seen from Figure 3, each is for the physics sector(1 that stores user data~(1~N), metadata is used for describing the current operating position of the physics sector that stores user data, the logic sector numbering of correspondence and the ECC code of physics sector N) corresponding metadata.Wherein metadata itself also will take physics sector and stores.
In system starting process, by the metadata on scanning physics sector, thereby can set up the corresponding relation of physics sector and logic sector, in use, the relation of logic sector and physics sector can be constantly updated along with the variation of data storage location.
In realizing process of the present invention, the inventor finds to exist in prior art following technical matters:
Existing scheme one requires the User Exploitation software flow participate in to select version, and is opaque to the user, guarantees data correctness by application layer fully, increases the personal code work complexity, and can only sentence mistake can not error correction.
Existing scheme two is identical in metadata part essence with scheme three, just can support sector administrative mechanism more flexibly owing to comprising more multivariate data information in scheme three, but all there is major defect in they in the data security scheme: be at first that metadata itself for key does not have mechanism for correcting errors, after appearring in metadata, mistake can cause the serious consequences such as data corruption, next is that ECC code book body error correcting capability is limited, the size of each physics sector is 512 bytes (byte), can only the limited bit number of error correction, the error correction ratio is very low.
Summary of the invention
The embodiment of the present invention provides data error-correcting method and the device on a kind of Flash storage medium, is used for improving the error correction accuracy rate of the data on the Flash storage medium.
Data error-correcting method on a kind of Flash storage medium, described Flash storage medium comprise physics host sectors and physical backup sector, each physics host sectors corresponding physical backup sector, and the method comprises:
The user data that writes for needs distributes the physics host sectors, and determines metadata corresponding to described user data, and this metadata comprises the data of using when described user data is carried out error correction; Described user data is write the physics host sectors of distribution, described metadata is write for the physics host sectors of Preservation Metadata write physical backup sector corresponding to this physics host sectors as the second metadata as the first metadata and with described metadata;
Read the first metadata from the physics host sectors that is used for Preservation Metadata, read the second metadata from physical backup sector corresponding to this physics host sectors; The first metadata and the second metadata that read are carried out from correction process, obtain trinary data; Read user data from the physics host sectors of preserving user data, use trinary data to carry out error correction to the user data that reads.
A kind of device that comprises the Flash storage medium, described Flash storage medium comprise physics host sectors and physical backup sector, each physics host sectors corresponding physical backup sector, and this device also comprises:
Data write unit is used to the user data that need to write to distribute the physics host sectors, and determines metadata corresponding to described user data, and this metadata comprises the data of using when described user data is carried out error correction; Described user data is write the physics host sectors of distribution, described metadata is write for the physics host sectors of Preservation Metadata write physical backup sector corresponding to this physics host sectors as the second metadata as the first metadata and with described metadata;
Data-reading unit is used for reading the first metadata from the physics host sectors that is used for Preservation Metadata, reads the second metadata from physical backup sector corresponding to this physics host sectors; The first metadata and the second metadata that read are carried out from correction process, obtain trinary data; Read user data from the physics host sectors of preserving user data, use trinary data to carry out error correction to the user data that reads.
In the scheme that the embodiment of the present invention provides, the user data that writes for needs distributes the physics host sectors, and determines metadata corresponding to this user data, and this metadata comprises the data of using when this user data is carried out error correction; This user data is write the physics host sectors of distribution, this metadata is write for the physics host sectors of Preservation Metadata write physical backup sector corresponding to this physics host sectors as the second metadata as the first metadata and with described metadata; Read the first metadata from the physics host sectors that is used for Preservation Metadata, read the second metadata from physical backup sector corresponding to this physics host sectors; The first metadata and the second metadata that read are carried out from correction process, obtain trinary data; Read user data from the physics host sectors of preserving user data, use trinary data to carry out error correction to the user data that reads.Because metadata also mistake may occur, therefore in this programme by metadata being write simultaneously physics host sectors and physical backup sector, when reading user data, metadata in physics host sectors and physical backup sector can be carried out from correction process, to reduce correct metadata as far as possible, the metadata that re-uses after correction process is carried out error correction to the user data that reads, can avoid the consequence that causes user data to be made mistakes due to metadata error as far as possible, thereby improve the error correction accuracy rate of the data on the Flash storage medium.
Description of drawings
Fig. 1 is data fault-tolerant scheme schematic flow sheet of the prior art;
Fig. 2 A is that data of the prior art write schematic flow sheet;
Fig. 2 B is that data of the prior art read schematic flow sheet;
Fig. 3 is metadata of the prior art and storage of subscriber data schematic diagram;
The method flow schematic diagram that Fig. 4 provides for the embodiment of the present invention;
Fig. 5 A is that the user data in the embodiment of the present invention writes schematic flow sheet;
Fig. 5 B is that the user data in the embodiment of the present invention reads schematic flow sheet;
Fig. 5 C is the metadata store schematic diagram in the embodiment of the present invention;
Fig. 5 D is that the metadata in the embodiment of the present invention reads schematic flow sheet;
Fig. 5 E is the data self-picketing cross-flow journey schematic diagram in the embodiment of the present invention;
The apparatus structure schematic diagram that Fig. 6 provides for the embodiment of the present invention.
Embodiment
In order to improve the error correction accuracy rate of the data on the Flash storage medium, the embodiment of the present invention provides the data error-correcting method on a kind of Flash storage medium.In this method, the metadata that user data is corresponding writes physics host sectors and physical backup sector simultaneously, when reading user data, the metadata in physics host sectors and physical backup sector is carried out from correction process, use the metadata that obtains from correction process to carry out error correction to user data.
Referring to Fig. 4, the data error-correcting method on the Flash storage medium that the embodiment of the present invention provides comprises the following steps:
Step 40: the user data that writes for needs distributes the physics host sectors, and determines metadata corresponding to this user data, and this metadata comprises the data of using when this user data is carried out error correction; This user data is write the physics host sectors of distribution, this metadata is write for the physics host sectors of Preservation Metadata as the first metadata, and this metadata write physical backup sector corresponding to this physics host sectors as the second metadata;
Step 41: read the first metadata from the physics host sectors that is used for Preservation Metadata, read the second metadata from physical backup sector corresponding to this physics host sectors; The first metadata and the second metadata that read are carried out from correction process, obtain trinary data; Read user data from the physics host sectors of preserving user data, use trinary data to carry out error correction to the user data that reads.
Concrete, the metadata that user data is corresponding can comprise the ECC code; Accordingly, in step 41, use trinary data to carry out error correction to the user data that reads, specific implementation is: use the ECC code in the trinary data that obtains after correction process to carry out the ECC error correction to the user data that reads.Further, the metadata that user data is corresponding can also comprise the numbering of the logic sector that physics host sectors that user data distributes is corresponding and be the service marking of the physics host sectors of this user data distribution.
Concrete, in step 40, for the user data that need to write distributes the physics host sectors, specific implementation can adopt one of following method:
Method one: the size of the user data that writes as required is that user data distributes the physics host sectors, so that the total amount of data that the physics host sectors of distributing can be stored is not less than the data volume of this user data;
Method two: the size of the user data that writes as required is user data assignment logic sector, so that the total amount of data that the physics host sectors corresponding to logic sector of distributing can be stored is not less than the data volume of this user data; By searching the mapping table of logic sector and physical sector, determine the physics host sectors corresponding to logic sector of distribution, the physics host sectors of determining is distributed to user data.
Adopting said method for the moment, the metadata that user data is corresponding comprises the ECC code; When adopting method two, the numbering of the logic sector that the physics host sectors that the metadata that user data is corresponding comprises the ECC code, distribute for this user data is corresponding and be the service marking of the physics host sectors of this user data distribution (i.e. this physics host sectors whether be used sign).
Better, when user data being write the physics host sectors of distribution, this user data can also be write the corresponding physical backup of the physics host sectors sector of distribution.
Accordingly, after the ECC code in step 41 in use the trinary data that obtains after correction process carries out the ECC error correction to the user data that reads, if the user data that obtains after the ECC error correction is returned in ECC error correction success; If ECC error correction failure, read user data from physical backup sector corresponding to the physics host sectors of preserving user data, ECC code in the trinary data that use obtains after correction process carries out the ECC error correction to the user data that reads from the physical backup sector, if ECC error correction success, return to the user data that obtains after the ECC error correction, if ECC error correction failure, the user data that will read from the physics host sectors and the user data that reads from the physical backup sector carry out from correction process, and return to the user data that obtains after correction process.
Above-mentioned first metadata that will read and the second metadata are carried out from correction process, and specific implementation can be as follows: will read the first metadata and the corresponding bit position of the second metadata carry out position or operation, obtain trinary data.such as, the first metadata that reads and the second metadata all comprise respectively the ECC code, each ECC code comprises 3 bits, first bit of one of them ECC code and first bit of another ECC code are carried out position or operation, obtain first bit of the ECC code after correction process, second bit of one of them ECC code and second bit of another ECC code are carried out position or operation, obtain second bit of the ECC code after correction process, the 3rd bit of one of them ECC code and the 3rd bit of another ECC code are carried out position or operation, obtain the 3rd bit of the ECC code after correction process, so far, obtained after correction process, the ECC code that comprises three bits.for another example, the first metadata that reads and the second metadata all comprise respectively the ECC code, the service marking of the numbering of logic sector and physics host sectors, each ECC code, the service marking of the numbering of logic sector and physics host sectors all comprises 3 bits, first bit of one of them ECC code and first bit of another ECC code are carried out position or operation, obtain first bit of the ECC code after correction process, second bit of one of them ECC code and second bit of another ECC code are carried out position or operation, obtain second bit of the ECC code after correction process, the 3rd bit of one of them ECC code and the 3rd bit of another ECC code are carried out position or operation, obtain the 3rd bit of the ECC code after correction process, so far, obtained after correction process, the ECC code that comprises three bits, first bit of the numbering of first bit of the numbering of one of them logic sector and another logic sector is carried out position or operation, obtain first bit of the numbering of the logic sector after correction process, second bit of the numbering of second bit of the numbering of one of them logic sector and another logic sector carried out position or operation, obtain second bit of the numbering of the logic sector after correction process, the 3rd bit of the numbering of the 3rd bit of the numbering of one of them logic sector and another logic sector carried out position or operation, obtain the 3rd bit of the numbering of the logic sector after correction process, so far, obtained after correction process, the numbering that comprises the logic sector of three bits, first bit of the service marking of first bit of the service marking of one of them physics host sectors and another physics host sectors is carried out position or operation, obtain first bit of the service marking of the physics host sectors after correction process, second bit of the service marking of second bit of the service marking of one of them physics host sectors and another physics host sectors carried out position or operation, obtain second bit of the service marking of the physics host sectors after correction process, the 3rd bit of the service marking of the 3rd bit of the service marking of one of them physics host sectors and another physics host sectors carried out position or operation, obtain the 3rd bit of the service marking of the physics host sectors after correction process, so far, obtained after correction process, the service marking that comprises the physics host sectors of three bits.
The above-mentioned user data that will read from the physics host sectors and the user data that reads from the physical backup sector carry out from correction process, specific implementation can be as follows: position or operation are carried out in the corresponding bit position of the user data that will read from the physics host sectors and the user data that reads from the physical backup sector, obtain the user data after correction process.such as, the user data that reads comprises 3 bits, first bit of one of them user data and first bit of another user data are carried out position or operation, obtain first bit of the user data after correction process, second bit of one of them user data and second bit of another user data are carried out position or operation, obtain second bit of the user data after correction process, the 3rd bit of one of them user data and the 3rd bit of another user data are carried out position or operation, obtain the 3rd bit of the user data after correction process, so far, obtained after correction process, the user data that comprises three bits.
The below is specifically described the present invention:
Embodiment one:
The present embodiment is realized the transparent storage backup to user data.In order to realize data backup, physics sector need to be divided into two parts, a part is the physics master sector that externally can present, another part is the physical backup sector that backup is used.Each physics master sector has the physical backup sector of unique correspondence, and physical backup sector is invisible to the user, and physical backup sector and physics master sector have fixing offset relationship on flash.
As shown in Fig. 5 A, it is as follows that data write flow process:
Step 501: when the user needed data writing, the size of the user data that writes as required was that user data distributes the physics host sectors, distributed simultaneously the right to use of physical backup sector corresponding to this physics host sectors;
Step 502: calculate the ECC code according to sector-size;
Step 503: the user data that needs are write writes physics host sectors and the physical backup sector corresponding to this physics host sectors of distribution simultaneously;
Step 504: the ECC code that calculates is write simultaneously the physics host sectors that is exclusively used in Preservation Metadata and write physical backup sector corresponding to this physics host sectors as the 2nd ECC code as an ECC code and with the ECC code that calculates.
As shown in Fig. 5 B, it is as follows that data read flow process:
Step 511: read an ECC code from the physics host sectors that is exclusively used in Preservation Metadata;
Step 512: read the 2nd ECC code from physical backup sector corresponding to the physics host sectors that is exclusively used in Preservation Metadata;
Step 513: an ECC code and the 2nd ECC code that will read carry out from correction process, obtain the 3rd ECC code;
Step 514: read user data from the physics host sectors of preserving user data;
Step 515: use the 3rd ECC code that obtains after correction process to carry out the ECC error correction to the user data that reads;
Step 516: judge whether the ECC error correction is successful, if, arrive step 521, otherwise, to step 517;
Step 517: read user data from physical backup sector corresponding to the physics host sectors of preserving user data;
Step 518: use the 3rd ECC code obtain after correction process to carry out the ECC error correction to the user data that reads from the physical backup sector;
Step 519: judge whether the ECC error correction is successful, if, arrive step 521, otherwise, to step 520;
Step 520: the user data that will read from the physics host sectors and the user data that reads from the physical backup sector carry out from correction process;
Step 521: the user data that obtains is returned to the user.
Data read in flow process, describing at embodiment three from error correction algorithm is follow-up in step 513 and step 520.
By active and standby sector mechanism can be fully transparent realize data backup, this process is invisible to the user.If wish to save the flash space in this implementation, Backup Data sector is optional, only also can to a certain degree promote data security by the ECC double copies.
Embodiment two:
The present embodiment is realized the double copies of metadata.
As shown in Fig. 5 C, for the equipment with complicated sector management, backing up as the part of metadata except the ECC code, also need to realize the double copies of metadata for other metadata.
As shown in Fig. 5 D, all need to adopt following flow process for reading of any metadata:
Step 521: read the first metadata from the physics host sectors that is exclusively used in Preservation Metadata;
Step 522: read the second metadata from physical backup sector corresponding to the physics host sectors that is exclusively used in Preservation Metadata;
Step 523: the first metadata and second metadata that will read are carried out from correction process.
Embodiment three:
The present embodiment is described the method that active and standby data adopt from error correction.
Flash has and first wipes the characteristics that write afterwards, wipes rear storage bit and is read as 1, can be programmed for 0 with 1 after writing, this specific character makes the upper bit upset of Flash be from 1 to become 0, therefore this just provides a kind of simple and easy effective method to correcting data error, and as shown in Fig. 5 E, the error correction flow process is as follows:
Step 531: reading out data from the physics host sectors is called master data;
Step 532: reading out data from the physical backup sector is called Backup Data;
Step 533: position or operation are carried out in the corresponding bit position of master data and Backup Data, obtain the data after correction process.As long as position or operation refer to that two bits have a bit for " 1 ", the position or result be " 1 ", otherwise or result be " 0 ".
This error correction algorithm can be corrected most bit flop phenomenon, and the situation that occurs upset for identical bit on master/slave data can not be corrected, and the probability that this situation occurs after all is lower.
Referring to Fig. 6, the embodiment of the present invention provides a kind of device of the Flash of comprising storage medium 60, and described Flash storage medium 60 comprises physics host sectors and physical backup sector, each physics host sectors corresponding physical backup sector, and this device also comprises:
Data write unit 61 is used to the user data that need to write to distribute the physics host sectors, and determines metadata corresponding to described user data, and this metadata comprises the data of using when described user data is carried out error correction; Described user data is write the physics host sectors of distribution, described ECC code is write for the physics host sectors of Preservation Metadata write physical backup sector corresponding to this physics host sectors as the second metadata as the first metadata and with described metadata;
Data-reading unit 62 is used for reading the first metadata from the physics host sectors that is used for Preservation Metadata, reads the second metadata from physical backup sector corresponding to this physics host sectors; The first metadata and the second metadata that read are carried out from correction process, obtain trinary data; Read user data from the physics host sectors of preserving user data, use trinary data to carry out error correction to the user data that reads.
Further, described data-reading unit 62 is used for:
When the metadata that described user data is corresponding comprises error correction ECC code, use the ECC code in the trinary data that obtains after correction process to carry out the ECC error correction to the user data that reads.
Further, the metadata that described user data is corresponding also comprises:
The numbering of the logic sector that the physics host sectors of distributing for described user data is corresponding and be the service marking of the physics host sectors of described user data distribution.
Further, described data write unit 61 also is used for:
When described user data is write the physics host sectors of distribution, described user data is write the corresponding physical backup of the physics host sectors sector of distribution.
Further, described data-reading unit 62 also is used for:
After ECC code in use the trinary data that obtains after correction process carries out the ECC error correction to the user data that reads, if the user data that obtains after the ECC error correction is returned in ECC error correction success; If ECC error correction failure, read user data from physical backup sector corresponding to the physics host sectors of described preservation user data, ECC code in the trinary data that use obtains after correction process carries out the ECC error correction to the user data that reads, if ECC error correction success, return to the user data that obtains after the ECC error correction, if ECC error correction failure, the user data that will read from the physics host sectors and the user data that reads from the physical backup sector carry out from correction process, and return to the user data that obtains after correction process.
Further, described data-reading unit 62 is used for:
Position or operation are carried out in the corresponding bit position of the first metadata of reading and the second metadata, obtain trinary data.
Further, described data-reading unit 62 is used for:
Position or operation are carried out in the corresponding bit position of the user data that will read from the physics host sectors and the user data that reads from the physical backup sector, obtain the user data after correction process.
To sum up, beneficial effect of the present invention comprises:
In the scheme that the embodiment of the present invention provides, the user data that writes for needs distributes the physics host sectors, and determines metadata corresponding to this user data, and this metadata comprises the data of using when this user data is carried out error correction; This user data is write the physics host sectors of distribution, this metadata is write for the physics host sectors of Preservation Metadata as the first metadata, and this metadata write physical backup sector corresponding to this physics host sectors as the second metadata; Read the first metadata from the physics host sectors that is used for Preservation Metadata, read the second metadata from physical backup sector corresponding to this physics host sectors; The first metadata and the second metadata that read are carried out from correction process, obtain trinary data; Read user data from the physics host sectors of preserving user data, use trinary data to carry out error correction to the user data that reads.Because metadata also mistake may occur, therefore in this programme by metadata being write simultaneously physics host sectors and physical backup sector, when reading user data, metadata in physics host sectors and physical backup sector can be carried out from correction process, to reduce correct metadata as far as possible, the metadata that re-uses after correction process is carried out error correction to the user data that reads, can avoid the consequence that causes user data to be made mistakes due to metadata error as far as possible, thereby improve the error correction accuracy rate of the data on the Flash storage medium.
The present invention is that reference is described according to process flow diagram and/or the block scheme of method, equipment (system) and the computer program of the embodiment of the present invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computing machine or other programmable data processing device produce to be used for the device of realizing in the function of flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is realized the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device, make on computing machine or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby be provided for realizing the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame in the instruction of carrying out on computing machine or other programmable devices.
Although described the preferred embodiments of the present invention, in a single day those skilled in the art get the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of claim of the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.

Claims (14)

1. the data error-correcting method on a Flash storage medium, is characterized in that, described Flash storage medium comprises physics host sectors and physical backup sector, each physics host sectors corresponding physical backup sector, and the method comprises:
The user data that writes for needs distributes the physics host sectors, and determines metadata corresponding to described user data, and this metadata comprises the data of using when described user data is carried out error correction; Described user data is write the physics host sectors of distribution, described metadata is write for the physics host sectors of Preservation Metadata write physical backup sector corresponding to this physics host sectors as the second metadata as the first metadata and with described metadata;
Read the first metadata from the physics host sectors that is used for Preservation Metadata, read the second metadata from physical backup sector corresponding to this physics host sectors; The first metadata and the second metadata that read are carried out from correction process, obtain trinary data; Read user data from the physics host sectors of preserving user data, use trinary data to carry out error correction to the user data that reads.
2. the method for claim 1, is characterized in that, the metadata that described user data is corresponding comprises: error correction ECC code;
Described use trinary data carries out error correction to the user data that reads and comprises: use the ECC code in the trinary data that obtains after correction process to carry out the ECC error correction to the user data that reads.
3. method as claimed in claim 2, is characterized in that, the metadata that described user data is corresponding also comprises:
The numbering of the logic sector that the physics host sectors of distributing for described user data is corresponding and be the service marking of the physics host sectors of described user data distribution.
4. method as claimed in claim 2, is characterized in that, when described user data is write the physics host sectors of distribution, further comprises:
Described user data is write the corresponding physical backup of the physics host sectors sector of distribution.
5. method as claimed in claim 4, is characterized in that, after the ECC code in use the trinary data that obtains after correction process carries out the ECC error correction to the user data that reads, further comprises:
If the user data that obtains after the ECC error correction is returned in ECC error correction success; If ECC error correction failure, read user data from physical backup sector corresponding to the physics host sectors of described preservation user data, ECC code in the trinary data that use obtains after correction process carries out the ECC error correction to the user data that reads, if ECC error correction success, return to the user data that obtains after the ECC error correction, if ECC error correction failure, the user data that will read from the physics host sectors and the user data that reads from the physical backup sector carry out from correction process, and return to the user data that obtains after correction process.
6. as arbitrary described method in claim 1-5, it is characterized in that, described first metadata that will read and the second metadata are carried out from correction process, specifically comprise:
Position or operation are carried out in the corresponding bit position of the first metadata of reading and the second metadata, obtain trinary data.
7. method as claimed in claim 5, is characterized in that, the described user data that will read from the physics host sectors and the user data that reads from the physical backup sector carry out from correction process, specifically comprise:
Position or operation are carried out in the corresponding bit position of the user data that will read from the physics host sectors and the user data that reads from the physical backup sector, obtain the user data after correction process.
8. a device that comprises the Flash storage medium, is characterized in that, described Flash storage medium comprises physics host sectors and physical backup sector, each physics host sectors corresponding physical backup sector, and this device also comprises:
Data write unit is used to the user data that need to write to distribute the physics host sectors, and determines metadata corresponding to described user data, and this metadata comprises the data of using when described user data is carried out error correction; Described user data is write the physics host sectors of distribution, described metadata is write for the physics host sectors of Preservation Metadata write physical backup sector corresponding to this physics host sectors as the second metadata as the first metadata and with described metadata;
Data-reading unit is used for reading the first metadata from the physics host sectors that is used for Preservation Metadata, reads the second metadata from physical backup sector corresponding to this physics host sectors; The first metadata and the second metadata that read are carried out from correction process, obtain trinary data; Read user data from the physics host sectors of preserving user data, use trinary data to carry out error correction to the user data that reads.
9. device as claimed in claim 8, is characterized in that, described data-reading unit is used for:
When the metadata that described user data is corresponding comprises error correction ECC code, use the ECC code in the trinary data that obtains after correction process to carry out the ECC error correction to the user data that reads.
10. device as claimed in claim 9, is characterized in that, the metadata that described user data is corresponding also comprises:
The numbering of the logic sector that the physics host sectors of distributing for described user data is corresponding and be the service marking of the physics host sectors of described user data distribution.
11. device as claimed in claim 9 is characterized in that, described data write unit also is used for:
When described user data is write the physics host sectors of distribution, described user data is write the corresponding physical backup of the physics host sectors sector of distribution.
12. device as claimed in claim 11 is characterized in that, described data-reading unit also is used for:
After ECC code in use the trinary data that obtains after correction process carries out the ECC error correction to the user data that reads, if the user data that obtains after the ECC error correction is returned in ECC error correction success; If ECC error correction failure, read user data from physical backup sector corresponding to the physics host sectors of described preservation user data, ECC code in the trinary data that use obtains after correction process carries out the ECC error correction to the user data that reads, if ECC error correction success, return to the user data that obtains after the ECC error correction, if ECC error correction failure, the user data that will read from the physics host sectors and the user data that reads from the physical backup sector carry out from correction process, and return to the user data that obtains after correction process.
13. as arbitrary described device in claim 8-12, it is characterized in that, described data-reading unit is used for:
Position or operation are carried out in the corresponding bit position of the first metadata of reading and the second metadata, obtain trinary data.
14. device as claimed in claim 12 is characterized in that, described data-reading unit is used for:
Position or operation are carried out in the corresponding bit position of the user data that will read from the physics host sectors and the user data that reads from the physical backup sector, obtain the user data after correction process.
CN201310019990.9A 2013-01-18 2013-01-18 Data error-correcting method in flash storage medium and device Active CN103092727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310019990.9A CN103092727B (en) 2013-01-18 2013-01-18 Data error-correcting method in flash storage medium and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310019990.9A CN103092727B (en) 2013-01-18 2013-01-18 Data error-correcting method in flash storage medium and device

Publications (2)

Publication Number Publication Date
CN103092727A true CN103092727A (en) 2013-05-08
CN103092727B CN103092727B (en) 2015-08-26

Family

ID=48205331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310019990.9A Active CN103092727B (en) 2013-01-18 2013-01-18 Data error-correcting method in flash storage medium and device

Country Status (1)

Country Link
CN (1) CN103092727B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110865945A (en) * 2018-08-28 2020-03-06 上海天王星智能科技有限公司 Extended address space for memory devices

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030163635A1 (en) * 2002-02-27 2003-08-28 Aasheim Jered Donald Transactional file system for flash memory
CN1831786A (en) * 2005-12-14 2006-09-13 兆日科技(深圳)有限公司 Data completeness protection method of flash storage
CN101086715A (en) * 2007-07-23 2007-12-12 北京中星微电子有限公司 Method and device for reading CPU code
CN101124639A (en) * 2005-09-30 2008-02-13 西格马特尔公司 System and method of accessing non-volatile computer memory
CN101473308A (en) * 2006-05-18 2009-07-01 矽玛特公司 Non-volatile memory error correction system and method
CN101477481A (en) * 2009-02-06 2009-07-08 中国科学院计算技术研究所 Automatic error correction system and method
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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030163635A1 (en) * 2002-02-27 2003-08-28 Aasheim Jered Donald Transactional file system for flash memory
CN101124639A (en) * 2005-09-30 2008-02-13 西格马特尔公司 System and method of accessing non-volatile computer memory
CN1831786A (en) * 2005-12-14 2006-09-13 兆日科技(深圳)有限公司 Data completeness protection method of flash storage
CN101473308A (en) * 2006-05-18 2009-07-01 矽玛特公司 Non-volatile memory error correction system and method
CN101086715A (en) * 2007-07-23 2007-12-12 北京中星微电子有限公司 Method and device for reading CPU code
CN101477481A (en) * 2009-02-06 2009-07-08 中国科学院计算技术研究所 Automatic error correction system and method
CN102200937A (en) * 2011-05-31 2011-09-28 深圳创维-Rgb电子有限公司 Method, device and television system for reading data in not-and (NAND) flash memory

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王志刚: "软件坚固性与基于软件的容错技术", 《楚雄师范学院学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110865945A (en) * 2018-08-28 2020-03-06 上海天王星智能科技有限公司 Extended address space for memory devices

Also Published As

Publication number Publication date
CN103092727B (en) 2015-08-26

Similar Documents

Publication Publication Date Title
EP2937774B1 (en) Storage controller, storage system and method of operating storage controller
US8255742B2 (en) Dynamically replicated memory
US8688954B2 (en) Remapping inoperable memory blocks using pointers
US8543863B2 (en) Efficiency of hardware memory access using dynamically replicated memory
KR20230003556A (en) Handling asynchronous power loss in sequentially programming memory subsystems
US9377960B2 (en) System and method of using stripes for recovering data in a flash storage system
US9575844B2 (en) Mass storage device and method of operating the same to back up data stored in volatile memory
CN106255953B (en) The method and system of forward direction reference record in persistent data memory bank
US8392797B2 (en) Error correcting controller, flash memory chip system, and error correcting method thereof
US8839072B2 (en) Access control apparatus, storage apparatus, and method
US20120324156A1 (en) Method and system of organizing a heterogeneous memory architecture
CN107077427A (en) The mixing of mapping directive is tracked to writing commands and released across power cycle
JP5364807B2 (en) MEMORY CONTROLLER AND NONVOLATILE MEMORY DEVICE
KR20170015757A (en) Data storage device and operating method thereof
CN102077176A (en) Copyback optimization for memory system
US9063869B2 (en) Method and system for storing and rebuilding data
US20130346829A1 (en) Flash memory device and storage control method
US20140082264A1 (en) Nand flash storage chip checking method and device
US8589768B2 (en) Memory system having multiple channels and write control method including determination of error correction channel in memory system
US9678665B2 (en) Methods and systems for memory page allocation
CN110413454B (en) Data reconstruction method and device based on storage array and storage medium
US10649672B1 (en) Offloading device maintenance to an external processor in low-latency, non-volatile memory
US11314594B2 (en) Method, device and computer program product for recovering data
CN103218271A (en) Data error correction method and device
CN102981969A (en) Method for deleting repeated data and solid hard disc thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant