CN105512337B - A kind of data managing method and storage device - Google Patents
A kind of data managing method and storage device Download PDFInfo
- Publication number
- CN105512337B CN105512337B CN201511021449.7A CN201511021449A CN105512337B CN 105512337 B CN105512337 B CN 105512337B CN 201511021449 A CN201511021449 A CN 201511021449A CN 105512337 B CN105512337 B CN 105512337B
- Authority
- CN
- China
- Prior art keywords
- data
- storage unit
- check code
- reading
- class parameter
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/273—Asynchronous replication or reconciliation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The present invention discloses a kind of data managing method, which comprises in the storage unit write data into, obtains the class parameter of the data, and the first check code of the class parameter and the data is written to the storage unit of the memory;When reading data from the storage unit, the second check code of read-out data is calculated;Read class parameter corresponding to the storage unit;The relationship between second check code and first check code is judged based on the class parameter, and data read operation is carried out according to the relationship.The present invention further simultaneously discloses a kind of storage device.Using technical solution of the present invention, reliability judgement can be carried out to data according to the class parameter of data, promote the usage experience of user.
Description
Technical field
The present invention relates to solid state hard disk fields, and in particular to a kind of data managing method and storage device.
Background technique
With the use of solid state hard disk (SSD, Solid State Drives) storage particle, it is stored in storage particle
Data are not necessarily reliably, it is possible that error compared with original data when being read.Current processing method is to depositing
Storage generates check code as unit of the data of SSD are by logic unit, after reading data, by check code and the verification that stored originally
Code be compared, if it is inconsistent decide that the data be it is insecure, if after retrying or it is inconsistent if discard this
Data.
In practical applications, this direct processing method for abandoning data has discarded the useful data in part simultaneously.And
Some applications allow for insecure data in reality, for example there are a small amount of insecure data in the data of video file
It can be endured and be allowed by user, more mistakes may be generated by directly abandoning;It but is absolutely not there are also data
Allow to have existing for corrupt data, such as code data, mistake, which falls an entire data, to be used.
Therefore, reliability judgement how more preferably, more practicably is carried out as urgent problem to be solved to data.
Summary of the invention
In view of this, can be joined according to the grade of data present invention contemplates that provide a kind of data managing method and storage device
Several pairs of data carry out reliability judgement, promote the usage experience of user.
In order to achieve the above objectives, the technical scheme of the present invention is realized as follows:
The present invention provides a kind of data managing method, the method also includes:
In the storage unit write data into, the class parameter of the data is obtained, and the grade is joined
The storage unit of the memory is written in several the first check codes with the data;
When reading data from the storage unit, the second check code of read-out data is calculated;
Read class parameter corresponding to the storage unit;
The relationship between second check code and first check code is judged based on the class parameter, and according to institute
It states relationship and carries out data read operation.
In above scheme, it is preferable that described to judge second check code and first school based on the class parameter
It tests before the relationship between code, the method also includes:
Read the count value of counter, wherein one counter is set for each storage unit, the counter is for recording
Error number when reading data from the storage unit;
Error number when reading data from the storage unit is determined based on the count value.
In above scheme, it is preferable that the class parameter for obtaining the data, comprising:
Judge the data type of the data;
Type obtains the class parameter of the data based on the data.
In above scheme, it is preferable that described to judge second check code and first school based on the class parameter
The relationship between code is tested, and data read operation is carried out according to the relationship, comprising:
Whether consistent with first check code compare second check code;
If consistent, the data of the reading are directly sent to host;
If inconsistent, judge whether error number exceeds preset threshold, if exceeded, directly loses the number of the reading
According to;If without departing from error rate is calculated according to second check code and first check code;According to class parameter search with
The corresponding serious forgiveness threshold value of the class parameter;Error rate is compared with serious forgiveness threshold value, if error rate is more than or equal to
Serious forgiveness threshold value directly loses the data of the reading;If error rate is less than serious forgiveness threshold value, the reading is sent to host
Data.
In above scheme, it is preferable that if the error rate is less than serious forgiveness threshold value, the number of the reading is sent to host
According to when, further includes:
The count value for updating counter corresponding with the storage unit, makes the count value of the counter add one;
First check code is updated to the second check code, so that second check code is stored as the storage unit
The check code of data.
In above scheme, it is preferable that deposited described in the first check code write-in by the class parameter with the data
The storage unit of reservoir, comprising:
The first storage unit is written into the data;
The second storage unit is written into the count value of first check code, the class parameter and counter;Wherein,
The stability of second storage unit stores data is greater than pre-determined stability threshold value.
The present invention also provides a kind of storage device, described device includes:
Flash media, for storing data;
Processor, in the storage unit write data into, obtaining the class parameter of the data, and will
The storage unit of the memory is written in the class parameter and the first check code of the data;It is read from the storage unit
When data, the second check code of read-out data is calculated;Read class parameter corresponding to the storage unit;Based on described
Class parameter judges the relationship between second check code and first check code, and carries out data reading according to the relationship
Extract operation.
In above scheme, it is preferable that the processor is also used to:
Read the count value of counter, wherein one counter is set for each storage unit, the counter is for recording
Error number when reading data from the storage unit;
Error number when reading data from the storage unit is determined based on the count value.
In above scheme, it is preferable that the processor is also used to:
Judge the data type of the data;
Type obtains the class parameter of the data based on the data.
In above scheme, it is preferable that the processor is also used to:
Whether consistent with first check code compare second check code;
If consistent, the data of the reading are directly sent to host;
If inconsistent, judge whether error number exceeds preset threshold, if exceeded, directly loses the number of the reading
According to;If without departing from error rate is calculated according to second check code and first check code;According to class parameter search with
The corresponding serious forgiveness threshold value of the class parameter;Error rate is compared with serious forgiveness threshold value, if error rate is more than or equal to
Serious forgiveness threshold value directly loses the data of the reading;If error rate is less than serious forgiveness threshold value, the reading is sent to host
Data.
In above scheme, it is preferable that the processor is also used to:
The count value for updating counter corresponding with the storage unit, makes the count value of the counter add one;
First check code is updated to the second check code, so that second check code is stored as the storage unit
The check code of data.
In above scheme, it is preferable that the processor is also used to:
The first storage unit is written into the data;
The second storage unit is written into the count value of first check code, the class parameter and counter;Wherein,
The stability of second storage unit stores data is greater than pre-determined stability threshold value.
The present invention also provides a kind of storage device, described device includes:
Acquiring unit obtains the class parameter of the data in the storage unit write data into;
Writing unit, for the first check code of the class parameter and the data to be written to the storage of the memory
Unit;
First reading unit when for reading data from the storage unit, calculates the second verification of read-out data
Code;
Second reading unit, for reading class parameter corresponding to the storage unit;
Processing unit, for being judged between second check code and first check code based on the class parameter
Relationship, and data read operation is carried out according to the relationship.
Data managing method and storage device provided by the invention are obtained in the storage unit write data into
The class parameter of the data is taken, and depositing for the memory is written into the class parameter and the first check code of the data
Storage unit;When reading data from the storage unit, the second check code of read-out data is calculated;Read the storage unit
Corresponding class parameter;The pass between second check code and first check code is judged based on the class parameter
System, and data read operation is carried out according to the relationship;Sentence in this way, reliability can be carried out to data according to the class parameter of data
It is disconnected, promote the usage experience of user.
Detailed description of the invention
Fig. 1 is the implementation process schematic diagram one of data managing method of the embodiment of the present invention;
Fig. 2 is the implementation process schematic diagram two of data managing method of the embodiment of the present invention;
Fig. 3 is the structural schematic diagram one of storage device of the embodiment of the present invention;
Fig. 4 is the structural schematic diagram two of storage device of the embodiment of the present invention.
Specific embodiment
In order to more fully hereinafter understand the features of the present invention and technology contents, with reference to the accompanying drawing to reality of the invention
It is now described in detail, appended attached drawing purposes of discussion only for reference, is not used to limit the present invention.
The technical solution of the present invention is further elaborated in the following with reference to the drawings and specific embodiments.
Embodiment one
Fig. 1 is the implementation process schematic diagram one of data managing method of the embodiment of the present invention, is applied in SSD, in the present invention
In one preferred embodiment, the data managing method is mainly comprised the steps that
Step 101: in the storage unit write data into, obtaining the class parameter of the data, and by institute
The storage unit of the memory is written in the first check code for stating class parameter and the data.
In the present embodiment, is classified to the data that may be stored according to its importance and is divided into several grades,
Its corresponding importance rate parameter is written together when data are deposited into SSD.
Here, the acquisition of importance rate parameter, which can be, automatically is also possible to manually to add.
Wherein, automatic implementation can be realized by the suffix of detection file or file header etc., for example suffix is
.avi be considered video file, it may be registration file that suffix, which is .key, then the grade of video file can automatic quilt
It is selected as inferior grade file, the grade for registering file can be automatically selected as high-grade file.
It is of course also possible to manually choose a grade before saving data.
Preferably, the class parameter for obtaining the data may include:
Judge the data type of the data;
Type obtains the class parameter of the data based on the data.
In the present embodiment, the specific implementation that the type based on the data obtains the class parameter of the data can be with
It is:
Class parameter corresponding with the data type has been searched whether in class parameter database;
If inquiring the corresponding class parameter, the grade that the corresponding class parameter is determined as the data is joined
Number;
If not inquiring the corresponding class parameter, data type based on the data preset the data etc.
Grade parameter;
It wherein, include one-to-one data type and class parameter, one-to-one correspondence in the class parameter database
Class parameter and serious forgiveness threshold value.
Specifically, the data type based on the data presets the class parameter of the data, may include:
It receives via data type and the corresponding class parameter for pre-seting dialog box setting;
Record the data type and corresponding class parameter to the class parameter database.
Step 102: when reading data from the storage unit, calculating the second check code of read-out data.
In the present embodiment, the check code that the prior art calculates data can be used, herein no longer to how calculating the first school
Code is tested to describe in detail with the second check code.
That is, read-out data are possible to and the number that is stored in front of when reading data from the storage unit
According to there is deviation.For example, it may be possible to which the data being stored in a step 101 are " 1110 ", and read in a step 102 from the storage unit
The data taken are " 1010 "
Step 103: reading class parameter corresponding to the storage unit.
Here, class parameter corresponding to the storage unit refers to the class parameter of the data in step 101.
Step 104: the relationship between second check code and first check code is judged based on the class parameter,
And data read operation is carried out according to the relationship.
Preferably, the pass judged between second check code and first check code based on the class parameter
System, and data read operation is carried out according to the relationship, may include:
Whether consistent with first check code compare second check code;
If consistent, the data of the reading are directly sent to host;
If inconsistent, judge whether error number exceeds preset threshold, if exceeded, directly loses the number of the reading
According to;If without departing from error rate is calculated according to second check code and first check code;According to class parameter search with
The corresponding serious forgiveness threshold value of the class parameter;Error rate is compared with serious forgiveness threshold value, if error rate is more than or equal to
Serious forgiveness threshold value directly loses the data of the reading;If error rate is less than serious forgiveness threshold value, the reading is sent to host
Data.
That is, being classified based on data of the importance of data to storage, the data low for importance information
Allow the serious forgiveness of data high, the data high for importance information then give lower serious forgiveness.
For example, the serious forgiveness threshold value of code data is 0, because cannot allow to malfunction for code data;".avi"
The serious forgiveness of the video file data of format can be set to 10, because a certain frame or a few frames occur for video file
When mistake, the broadcasting of whole file is had no effect on.
Data managing method described in the present embodiment obtains the data in the storage unit write data into
Class parameter, and the first check code of the class parameter and the data is written to the storage unit of the memory;From
When the storage unit reads data, the second check code of read-out data is calculated;It reads corresponding to the storage unit
Class parameter;The relationship between second check code and first check code is judged based on the class parameter, and according to
The relationship carries out data read operation;In this way, reliability judgement can be carried out to data according to the class parameter of data, is promoted and used
The usage experience at family.
Embodiment two
Fig. 2 is the implementation process schematic diagram two of data managing method of the embodiment of the present invention, is applied in SSD, in the present invention
In one preferred embodiment, the data managing method is mainly comprised the steps that
Step 201: in the first storage unit write data into, obtaining the class parameter of the data.
Preferably, one counter is set for each storage unit, the counter is read for recording from the storage unit
Access according to when error number.
Preferably, the class parameter for obtaining the data may include:
Judge the data type of the data;
Type obtains the class parameter of the data based on the data.
In the present embodiment, the specific implementation that the type based on the data obtains the class parameter of the data can be with
It is:
By tabling look-up, the modes such as database matching obtain the class parameters of the data.
Step 202: the first storage unit is written into the data, the first check code of the data, the grade are joined
The second storage unit is written in several and counter count value;Wherein, the stability of second storage unit stores data is big
In pre-determined stability threshold value.
So, it is possible to better ensure that when reading data from the first storage unit, read from the second storage unit with
The count value (i.e. error number) of first check code, class parameter and counter corresponding to the data is correct.
Certainly, first check code, the class parameter, the counter count value can also be respectively stored in not
In same storage unit still, it is stored separately with the data.For example, first check code is stored in third storage unit
In, the class parameter is stored in the 4th storage unit, and the count value of the counter is stored in the 5th storage unit,
In, the third storage unit, the 4th storage unit, the stability of the 5th storage unit are all larger than pre-determined stability threshold value.
Step 203: when reading data from the storage unit, calculating the second check code of read-out data.
That is, read-out data are possible to and the number that is stored in front of when reading data from the storage unit
According to there is deviation.For example, it may be possible to which the data being stored in step 202 are " 111 ", and read in step 203 from the storage unit
The data taken are " 101 ".
Step 204: reading class parameter corresponding to first storage unit, error number, the first check code.
Wherein, class parameter corresponding to first storage unit, error number, the first check code, refer to step 202
In the data class parameter, error number, the first check code.In the present embodiment, described in the reading of the second storage unit
Class parameter, the error number, the first check code of data.
Specifically, the method for reading error number corresponding to first storage unit includes: to read the meter of counter
Numerical value, wherein one counter is set for each storage unit, the counter reads data for recording from the storage unit
When error number;Error number when reading data from the storage unit is determined based on the count value.
Step 205: the relationship between second check code and first check code is judged based on the class parameter,
And data read operation is carried out according to the relationship.
Preferably, the pass judged between second check code and first check code based on the class parameter
System, and data read operation is carried out according to the relationship, may include:
Whether consistent with first check code compare second check code;
If consistent, the data of the reading are directly sent to host;
If inconsistent, judge whether error number exceeds preset threshold, if exceeded, directly loses the number of the reading
According to;If without departing from error rate is calculated according to second check code and first check code;According to class parameter search with
The corresponding serious forgiveness threshold value of the class parameter;Error rate is compared with serious forgiveness threshold value, if error rate is more than or equal to
Serious forgiveness threshold value directly loses the data of the reading;If error rate is less than serious forgiveness threshold value, the reading is sent to host
Data.
That is, being classified based on data of the importance of data to storage, the data low for importance information
Allow the serious forgiveness of data high, the data high for importance information then give lower serious forgiveness.
In above scheme, it is preferable that if the error rate is less than serious forgiveness threshold value, the number of the reading is sent to host
According to when, can also include:
The count value for updating counter corresponding with first storage unit, makes the count value of the counter add one;
First check code is updated to the second check code, so that second check code is as the first storage unit institute
The check code of storing data.
Data and check code, class parameter and error number are stored separately, energy by data managing method described in the present embodiment
Enough better ensure that when reading data from the first storage unit, read from the second storage unit with corresponding to the data the
The count value (i.e. error number) of one check code, class parameter and counter correctly, according to the class parameter of data to data
Reliability judgement is carried out, the usage experience of user is promoted.
Embodiment three
Fig. 3 is the structural schematic diagram one of storage device of the embodiment of the present invention, as shown in figure 3, the storage device includes:
Flash media 31, for storing data;
Processor 32, in the storage unit write data into, obtaining the class parameter of the data, and
First check code of the class parameter and the data is written to the storage unit of the memory;It is read from the storage unit
Access according to when, calculate the second check code of read-out data;Read class parameter corresponding to the storage unit;Based on institute
It states class parameter and judges relationship between second check code and first check code, and data are carried out according to the relationship
Read operation.
Preferably, the processor 32, is also used to:
Read the count value of counter, wherein one counter is set for each storage unit, the counter is for recording
Error number when reading data from the storage unit;
Error number when reading data from the storage unit is determined based on the count value.
Preferably, the processor 32, is also used to:
Judge the data type of the data;
Type obtains the class parameter of the data based on the data.
Preferably, the processor 32, is also used to:
Whether consistent with first check code compare second check code;
If consistent, the data of the reading are directly sent to host;
If inconsistent, judge whether error number exceeds preset threshold, if exceeded, directly loses the number of the reading
According to;If without departing from error rate is calculated according to second check code and first check code;According to class parameter search with
The corresponding serious forgiveness threshold value of the class parameter;Error rate is compared with serious forgiveness threshold value, if error rate is more than or equal to
Serious forgiveness threshold value directly loses the data of the reading;If error rate is less than serious forgiveness threshold value, the reading is sent to host
Data.
Preferably, the processor 32, is also used to:
The count value for updating counter corresponding with the storage unit, makes the count value of the counter add one;
First check code is updated to the second check code, so that second check code is stored as the storage unit
The check code of data.
Preferably, the processor 32, is also used to:
The first storage unit is written into the data;
The second storage unit is written into the count value of first check code, the class parameter and counter;Wherein,
The stability of second storage unit stores data is greater than pre-determined stability threshold value.
Storage device described in the present embodiment can be applied in SSD.
It will be appreciated by those skilled in the art that in the storage device of the embodiment of the present invention each device function, before can refer to
It states the associated description of data managing method and understands, each device in the storage device of the embodiment of the present invention, it can be by realizing this hair
The analog circuit of function described in bright embodiment and realize, can also pass through execute the embodiment of the present invention described in function software
Operation on intelligent terminal and realize.
Storage device described in the present embodiment, can according to the importance rate parameter logistics of data according to carrying out reliability judgement,
Improve the usage experience of user.
Example IV
Fig. 4 is the structural schematic diagram two of storage device of the embodiment of the present invention, as shown in figure 4, the storage device includes:
Acquiring unit 41 obtains the class parameter of the data in the storage unit write data into;
Writing unit 42, for depositing for the memory to be written in the class parameter and the first check code of the data
Storage unit;
First reading unit 43 calculates the second school of read-out data when for reading data from the storage unit
Test code;
Second reading unit 44, for reading class parameter corresponding to the storage unit;
Processing unit 45, for being judged between second check code and first check code based on the class parameter
Relationship, and according to the relationship carry out data read operation.
Preferably, second reading unit 44, is also used to:
Read the count value of counter, wherein one counter is set for each storage unit, the counter is for recording
Error number when reading data from the storage unit;
Error number when reading data from the storage unit is determined based on the count value.
Preferably, the acquiring unit 41, is also used to:
Judge the data type of the data;
Type obtains the class parameter of the data based on the data.
For example, the acquiring unit 41 can by tabling look-up, the modes such as database matching obtain the class parameters of the data.
Preferably, the processing unit 45, is also used to:
Whether consistent with first check code compare second check code;
If consistent, the data of the reading are directly sent to host;
If inconsistent, judge whether error number exceeds preset threshold, if exceeded, directly loses the number of the reading
According to;If without departing from error rate is calculated according to second check code and first check code;According to class parameter search with
The corresponding serious forgiveness threshold value of the class parameter;Error rate is compared with serious forgiveness threshold value, if error rate is more than or equal to
Serious forgiveness threshold value directly loses the data of the reading;If error rate is less than serious forgiveness threshold value, the reading is sent to host
Data.
Preferably, the processing unit 45, is also used to:
The count value for updating counter corresponding with the storage unit, makes the count value of the counter add one;
First check code is updated to the second check code, so that second check code is stored as the storage unit
The check code of data.
Preferably, said write unit 42, is also used to:
The first storage unit is written into the data;
The second storage unit is written into the count value of first check code, the class parameter and counter;Wherein,
The stability of second storage unit stores data is greater than pre-determined stability threshold value.
Storage device described in the present embodiment can be applied in SSD.
It will be appreciated by those skilled in the art that in the storage device of the embodiment of the present invention each unit function, before can refer to
It states the associated description of data managing method and understands, each unit in the storage device of the embodiment of the present invention, it can be by realizing this hair
The analog circuit of function described in bright embodiment and realize, can also pass through execute the embodiment of the present invention described in function software
Operation on intelligent terminal and realize.
Acquiring unit 41, writing unit 42, the first reading unit 43, the second reading unit 44 in the storage device with
And processing unit 45;It in practical applications can be by the central processing in the storage device or the storage device corresponding device
Device (CPU, Central Processing Unit), digital signal processor (DSP, Digital Signal Processor)
Or programmable gate array (FPGA, Field Programmable Gate Array) etc. is realized.
Storage device described in the present embodiment, can according to the importance rate parameter logistics of data according to carrying out reliability judgement,
Improve the usage experience of user.
In several embodiments provided by the present invention, it should be understood that disclosed method, apparatus and electronic equipment,
It may be implemented in other ways.Apparatus embodiments described above are merely indicative, for example, the unit is drawn
Point, only a kind of logical function partition, there may be another division manner in actual implementation, such as: multiple units or components can
To combine, or it is desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed
The mutual coupling of each component part or direct-coupling or communication connection can be through some interfaces, equipment or unit
Indirect coupling or communication connection can be electrical, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member, which can be or may not be, to be physically separated, aobvious as unit
The component shown can be or may not be physical unit, it can and it is in one place, it may be distributed over multiple network lists
In member;Some or all of units can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be fully integrated in one processing unit, it can also
To be each unit individually as a unit, can also be integrated in one unit with two or more units;It is above-mentioned
Integrated unit both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned include: movable storage device, it is read-only
Memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or
The various media that can store program code such as person's CD.
If alternatively, the above-mentioned integrated unit of the embodiment of the present invention is realized in the form of software function module and as independence
Product when selling or using, also can store in a computer readable storage medium.Based on this understanding, this hair
Substantially the part that contributes to existing technology can body in the form of software products in other words for the technical solution of bright embodiment
Reveal and, which is stored in a storage medium, including some instructions are with so that a computer is set
Standby (can be personal computer, server or network equipment etc.) executes the whole of each embodiment the method for the present invention
Or part.And storage medium above-mentioned includes: that movable storage device, ROM, RAM, magnetic or disk etc. are various can store journey
The medium of sequence code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (9)
1. a kind of data managing method, which comprises
In the storage unit write data into, obtain the class parameter of the data, and by the class parameter with
The storage unit of the memory is written in first check code of the data;
When reading data from the storage unit, the second check code of read-out data is calculated;
Read class parameter corresponding to the storage unit;
Obtain serious forgiveness threshold value corresponding with the class parameter;
Read the count value of counter, wherein one counter is set for each storage unit, the counter is for recording from institute
State error number when storage unit reads data;
Error number when reading data from the storage unit is determined based on the count value;
Whether consistent with first check code compare second check code;
If consistent, the data of the reading are directly sent to host;
If inconsistent, judge whether error number exceeds preset threshold, if exceeded, directly loses the data of the reading;
If without departing from error rate is calculated according to second check code and first check code;By error rate and serious forgiveness threshold value
It is compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of the reading;Hold if error rate is less than
Error rate threshold value sends the data of the reading to host.
2. the method according to claim 1, wherein the class parameter for obtaining the data, comprising:
Judge the data type of the data;
Type obtains the class parameter of the data based on the data.
3. the method according to claim 1, wherein if the error rate is less than serious forgiveness threshold value, to host
When sending the data of the reading, further includes:
The count value for updating counter corresponding with the storage unit, makes the count value of the counter add one;
First check code is updated to the second check code, so that second check code is as storage unit institute storing data
Check code.
4. the method according to claim 1, wherein first school by the class parameter and the data
Test the storage unit that the memory is written in code, comprising:
The first storage unit is written into the data;
The second storage unit is written into the count value of first check code, the class parameter and counter;Wherein, described
The stability of second storage unit stores data is greater than pre-determined stability threshold value.
5. a kind of storage device, described device include:
Flash media, for storing data;
Processor, in the storage unit write data into, obtaining the class parameter of the data, and will be described
The storage unit of the memory is written in class parameter and the first check code of the data;Data are read from the storage unit
When, calculate the second check code of read-out data;Read class parameter corresponding to the storage unit;Obtain with it is described etc.
The corresponding serious forgiveness threshold value of grade parameter;Read the count value of counter, wherein one counter, institute are set for each storage unit
Counter is stated for recording error number when reading data from the storage unit;It is determined based on the count value from described and is deposited
Storage unit reads error number when data;Whether consistent with first check code compare second check code;If one
It causes, the data of the reading is directly sent to host;If inconsistent, judge whether error number exceeds preset threshold, if
Exceed, directly loses the data of the reading;If without departing from being calculated according to second check code and first check code
Error rate;Error rate is compared with serious forgiveness threshold value, if error rate is more than or equal to serious forgiveness threshold value, is directly lost described
The data of reading;If error rate is less than serious forgiveness threshold value, the data of the reading are sent to host.
6. device according to claim 5, which is characterized in that the processor is also used to:
Judge the data type of the data;
Type obtains the class parameter of the data based on the data.
7. device according to claim 5, which is characterized in that the processor is also used to:
The count value for updating counter corresponding with the storage unit, makes the count value of the counter add one;
First check code is updated to the second check code, so that second check code is as storage unit institute storing data
Check code.
8. device according to claim 5, which is characterized in that the processor is also used to:
The first storage unit is written into the data;
The second storage unit is written into the count value of first check code, the class parameter and counter;Wherein, described
The stability of second storage unit stores data is greater than pre-determined stability threshold value.
9. a kind of storage device, described device include:
Acquiring unit obtains the class parameter of the data in the storage unit write data into;
Writing unit, for the first check code of the class parameter and the data to be written to the storage list of the memory
Member;
First reading unit calculates the second check code of read-out data when for reading data from the storage unit;
Second reading unit, for reading class parameter corresponding to the storage unit;
Processing unit reads and counts for searching serious forgiveness threshold value corresponding with the class parameter according to the class parameter
The count value of device, wherein one counter is set for each storage unit, the counter is read for recording from the storage unit
Access according to when error number;Error number when reading data from the storage unit is determined based on the count value;Compare
Whether second check code is consistent with first check code;If consistent, the data of the reading are directly sent to host;
If inconsistent, judge whether error number exceeds preset threshold, if exceeded, directly loses the data of the reading;If
Without departing from according to second check code and first check code calculating error rate;Error rate and serious forgiveness threshold value are carried out
Compare, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of the reading;If error rate is less than serious forgiveness
Threshold value sends the data of the reading to host.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511021449.7A CN105512337B (en) | 2015-12-31 | 2015-12-31 | A kind of data managing method and storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511021449.7A CN105512337B (en) | 2015-12-31 | 2015-12-31 | A kind of data managing method and storage device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105512337A CN105512337A (en) | 2016-04-20 |
CN105512337B true CN105512337B (en) | 2019-10-29 |
Family
ID=55720317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511021449.7A Active CN105512337B (en) | 2015-12-31 | 2015-12-31 | A kind of data managing method and storage device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105512337B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111158589B (en) * | 2019-12-16 | 2023-10-20 | 绿晶半导体科技(北京)有限公司 | Dynamic management method and device for storage array |
CN113053451B (en) * | 2021-03-05 | 2022-05-10 | 深圳三地一芯电子有限责任公司 | Method, system, host and storage medium for generating softbit in Nandflash |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102385544A (en) * | 2011-12-12 | 2012-03-21 | 创新科软件技术(深圳)有限公司 | Method and device for re-establishing disk |
CN102419734A (en) * | 2010-09-27 | 2012-04-18 | 北京中星微电子有限公司 | Method and device for storing data |
CN102929743A (en) * | 2012-11-28 | 2013-02-13 | 中国人民解放军国防科学技术大学 | First-stage cached data storage method and device with soft error tolerant function |
CN104216665A (en) * | 2014-09-01 | 2014-12-17 | 上海新储集成电路有限公司 | Storage management method of multi-layer unit solid state disk |
CN104317746A (en) * | 2014-10-27 | 2015-01-28 | 安徽江淮汽车股份有限公司 | Data redundancy access method for EEPROM (electrically erasable programmable read-only memory) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100493188C (en) * | 2004-11-19 | 2009-05-27 | 大唐移动通信设备有限公司 | Method for assuring qualified video frequency transmission of low-code ratio wireless channel |
JP2007122772A (en) * | 2005-10-25 | 2007-05-17 | Toshiba Corp | Information processor and method and program for storing data |
DE102012102856A1 (en) * | 2012-04-02 | 2013-10-02 | Minebea Co., Ltd. | Apparatus and method for reading and storing data |
CN104182292A (en) * | 2013-05-21 | 2014-12-03 | 华为技术有限公司 | Data storage method and device |
-
2015
- 2015-12-31 CN CN201511021449.7A patent/CN105512337B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102419734A (en) * | 2010-09-27 | 2012-04-18 | 北京中星微电子有限公司 | Method and device for storing data |
CN102385544A (en) * | 2011-12-12 | 2012-03-21 | 创新科软件技术(深圳)有限公司 | Method and device for re-establishing disk |
CN102929743A (en) * | 2012-11-28 | 2013-02-13 | 中国人民解放军国防科学技术大学 | First-stage cached data storage method and device with soft error tolerant function |
CN104216665A (en) * | 2014-09-01 | 2014-12-17 | 上海新储集成电路有限公司 | Storage management method of multi-layer unit solid state disk |
CN104317746A (en) * | 2014-10-27 | 2015-01-28 | 安徽江淮汽车股份有限公司 | Data redundancy access method for EEPROM (electrically erasable programmable read-only memory) |
Non-Patent Citations (1)
Title |
---|
基于FPGA的高速大容量固态存储设备数据ECC的设计与实现;华斌 等;《科学技术与工程》;20100630;第10卷(第18期);第4410-4414页 * |
Also Published As
Publication number | Publication date |
---|---|
CN105512337A (en) | 2016-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10002142B2 (en) | Method and apparatus for generating schema of non-relational database | |
CN110018920A (en) | A kind of detection method, device and the equipment of page presentation exception | |
CN105512337B (en) | A kind of data managing method and storage device | |
CN104765792B (en) | A kind of method, apparatus and system of dimension data storage | |
CN106897342A (en) | A kind of data verification method and equipment | |
CN110502591A (en) | A kind of data extraction method, device and equipment | |
CN109144754A (en) | A kind of method for testing reliability and device | |
Marrs et al. | The impact of latency on online classification learning with concept drift | |
CN109101435A (en) | The multi partition recognition methods of movable storage device and system, car-mounted terminal | |
CN106897224B (en) | Method and device for determining software testing range | |
CN103220555B (en) | The sorting technique of a kind of digital cable customers, Apparatus and system | |
CN103577476A (en) | Method for processing browsing record of web page and web page browsing device | |
CN108073705A (en) | A kind of distributed mass data polymerize acquisition method | |
CN104133836A (en) | Method and device for realizing change data detection | |
CN103399714A (en) | Maintenance system for storage device configuration information and application method of maintenance system | |
CN109039695B (en) | Service fault processing method, device and equipment | |
CN106254806A (en) | A kind of Video data guard method and device | |
CN106227502A (en) | A kind of method and device obtaining hard disk firmware version | |
CN102447589B (en) | Method and device for aggregating records | |
CN105069176B (en) | Picture processing method and device and server | |
US20150106374A1 (en) | Recommendation System, Method and Non-Transitory Computer Readable Storage Medium for Storing Thereof | |
CN105897989A (en) | Contact person creation method and device | |
CN106052298A (en) | Method and system for recording storing time of foods by intelligent refrigerator, and intelligent refrigerator | |
US20080005159A1 (en) | Method and computer program product for collection-based iterative refinement of semantic associations according to granularity | |
CN106652065B (en) | A kind of method and system for obtaining vehicle and not being inconsistent OBU |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |