CN105512337A - Data management method and storage device - Google Patents

Data management method and storage device Download PDF

Info

Publication number
CN105512337A
CN105512337A CN201511021449.7A CN201511021449A CN105512337A CN 105512337 A CN105512337 A CN 105512337A CN 201511021449 A CN201511021449 A CN 201511021449A CN 105512337 A CN105512337 A CN 105512337A
Authority
CN
China
Prior art keywords
data
check code
storage unit
class parameter
reading
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
CN201511021449.7A
Other languages
Chinese (zh)
Other versions
CN105512337B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201511021449.7A priority Critical patent/CN105512337B/en
Publication of CN105512337A publication Critical patent/CN105512337A/en
Application granted granted Critical
Publication of CN105512337B publication Critical patent/CN105512337B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous 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 invention discloses a data management method. The method comprises the following steps: during writing of data into a storage unit of a memory, acquiring a level parameter of the data, and writing the level parameter and a first verification code of the data into the storage unit of the memory; while reading data from the storage unit, calculating a second verification code of the read-out data; reading a level parameter corresponding to the storage unit; judging a relationship between the second verification code and the first verification code based on the level parameter, and performing data reading operation according to the relationship. The invention further discloses a storage device. By adopting the technical scheme of the invention, the reliability of the data can be judged according to the level parameter of the data, and the user experience can be improved.

Description

A kind of data managing method and memory storage
Technical field
The present invention relates to solid state hard disc field, be specifically related to a kind of data managing method and memory storage.
Background technology
Along with solid state hard disc (SSD, SolidStateDrives) stores the use of particle, it may not be reliable for being stored in when the data stored in particle are read out, and may occur error compared with original data.Current disposal route in units of logical block, produces check code to the data being stored in SSD, after sense data, check code and the check code originally stored are compared, just judges that these data are insecure if inconsistent, just discard these data if still inconsistent after retry.
In actual applications, this disposal route directly abandoning data has discarded the useful data of part simultaneously.And the application had in reality can allow insecure data, there are a small amount of insecure data in the data of such as video file can have been stood by user and allow, and directly abandons and may produce more mistake; But also have some data to be absolutely not allowed corrupt data to exist, such as code data, mistake is fallen whole data and just can not be employed.
Therefore, how better, more practicably carry out reliability to data to judge to become problem demanding prompt solution.
Summary of the invention
In view of this, the present invention expects to provide a kind of data managing method and memory storage, can carry out reliability judgement according to the class parameter of data to data, promotes the experience of user.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides a kind of data managing method, described method also comprises:
When the storage unit by writing data into memory, obtain the class parameter of described data, and the first check code of described class parameter and described data is write the storage unit of described storer;
When reading data from described storage unit, the second check code of the data read-out by calculating;
Read the class parameter corresponding to described storage unit;
Judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation.
In such scheme, preferably, described judge the relation between described second check code and described first check code based on described class parameter before, described method also comprises:
Read the count value of counter, wherein, for each storage unit arranges a counter, described counter is for recording the number of times of makeing mistakes when reading data from described storage unit;
The number of times of makeing mistakes when reading data from described storage unit is determined based on described count value.
In such scheme, preferably, the class parameter of the described data of described acquisition, comprising:
Judge the data type of described data;
The class parameter of these data is obtained based on described data type.
In such scheme, preferably, the described relation judging between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation, comprising:
Whether more described second check code is consistent with described first check code;
If consistent, send the data of described reading directly to main frame;
If inconsistent, judge whether number of times of makeing mistakes exceeds predetermined threshold value, if exceeded, directly loses the data of described reading; If do not exceeded, calculate error rate according to described second check code and described first check code; The serious forgiveness threshold value corresponding with described class parameter is searched according to class parameter; Error rate and serious forgiveness threshold value are compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of described reading; If error rate is less than serious forgiveness threshold value, send the data of described reading to main frame.
In such scheme, preferably, if described error rate is less than serious forgiveness threshold value, when sending the data of described reading to main frame, also comprise:
Upgrade the count value of the counter corresponding with described storage unit, make the count value of described counter add one;
First check code is updated to the second check code, using make described second check code as described storage unit store the check code of data.
In such scheme, preferably, described the first check code by described class parameter and described data writes the storage unit of described storer, comprising:
Described data are write the first storage unit;
The count value of described first check code, described class parameter and counter is write the second storage unit; Wherein, the stability of described second storage unit stores data is greater than pre-determined stability threshold value.
Present invention also offers a kind of memory storage, described device comprises:
Flash media, for storing data;
Processor, for when the storage unit by writing data into memory, obtains the class parameter of described data, and the first check code of described class parameter and described data is write the storage unit of described storer; When reading data from described storage unit, the second check code of the data read-out by calculating; Read the class parameter corresponding to described storage unit; Judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation.
In such scheme, preferably, described processor, also for:
Read the count value of counter, wherein, for each storage unit arranges a counter, described counter is for recording the number of times of makeing mistakes when reading data from described storage unit;
The number of times of makeing mistakes when reading data from described storage unit is determined based on described count value.
In such scheme, preferably, described processor, also for:
Judge the data type of described data;
The class parameter of these data is obtained based on described data type.
In such scheme, preferably, described processor, also for:
Whether more described second check code is consistent with described first check code;
If consistent, send the data of described reading directly to main frame;
If inconsistent, judge whether number of times of makeing mistakes exceeds predetermined threshold value, if exceeded, directly loses the data of described reading; If do not exceeded, calculate error rate according to described second check code and described first check code; The serious forgiveness threshold value corresponding with described class parameter is searched according to class parameter; Error rate and serious forgiveness threshold value are compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of described reading; If error rate is less than serious forgiveness threshold value, send the data of described reading to main frame.
In such scheme, preferably, described processor, also for:
Upgrade the count value of the counter corresponding with described storage unit, make the count value of described counter add one;
First check code is updated to the second check code, using make described second check code as described storage unit store the check code of data.
In such scheme, preferably, described processor, also for:
Described data are write the first storage unit;
The count value of described first check code, described class parameter and counter is write the second storage unit; Wherein, the stability of described second storage unit stores data is greater than pre-determined stability threshold value.
Present invention also offers a kind of memory storage, described device comprises:
Acquiring unit, when the storage unit by writing data into memory, obtains the class parameter of described data;
Writing unit, for writing the storage unit of described storer by the first check code of described class parameter and described data;
First reading unit, during for reading data from described storage unit, the second check code of the data read-out by calculating;
Second reading unit, for reading the class parameter corresponding to described storage unit;
Processing unit, for judging the relation between described second check code and described first check code based on described class parameter, and carries out data read operation according to described relation.
Data managing method provided by the invention and memory storage, when the storage unit by writing data into memory, obtain the class parameter of described data, and the first check code of described class parameter and described data is write the storage unit of described storer; When reading data from described storage unit, the second check code of the data read-out by calculating; Read the class parameter corresponding to described storage unit; Judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation; So, reliability judgement can be carried out according to the class parameter of data to data, promote the experience of user.
Accompanying drawing explanation
Fig. 1 is the realization flow schematic diagram one of embodiment of the present invention data managing method;
Fig. 2 is the realization flow schematic diagram two of embodiment of the present invention data managing method;
Fig. 3 is the structural representation one of embodiment of the present invention memory storage;
Fig. 4 is the structural representation two of embodiment of the present invention memory storage.
Embodiment
In order to more at large understand feature of the present invention and technology contents, below in conjunction with accompanying drawing, realization of the present invention is described in detail, the use of appended accompanying drawing explanation only for reference, is not used for limiting the present invention.
Below in conjunction with the drawings and specific embodiments, the technical solution of the present invention is further elaborated.
Embodiment one
Fig. 1 is the realization flow schematic diagram one of embodiment of the present invention data managing method, is applied in SSD, and in a preferred embodiment of the invention, described data managing method mainly comprises the following steps:
Step 101: when the storage unit by writing data into memory, obtain the class parameter of described data, and the storage unit the first check code of described class parameter and described data being write described storer.
In the present embodiment, to may stored in data to classify according to its importance and to be divided into several grades, when data are deposited into SSD, the importance rate parameter of its correspondence is write together.
Here, the acquisition of importance rate parameter can be also can be artificial interpolation automatically.
Wherein, automatic implementation can by detecting the suffix of file or file is first-class realizes, such as suffix be .avi think video file, suffix be .key may be register-file, so the grade of video file can be selected as inferior grade file automatically, and the grade of register-file can be automatically selected as high-grade file.
Certainly, a grade is manually chosen before also can preserving data.
Preferably, the class parameter of the described data of described acquisition, can comprise:
Judge the data type of described data;
The class parameter of these data is obtained based on described data type.
In the present embodiment, the described specific implementation obtaining the class parameter of these data based on described data type can be:
Search in class parameter database and whether have the class parameter corresponding with described data type;
If inquire the class parameter of described correspondence, the class parameter of described correspondence is defined as the class parameter of described data;
If do not inquire the class parameter of described correspondence, then preset the class parameter of described data based on the data type of described data;
Wherein, described class parameter database comprises data type and class parameter, one to one class parameter and serious forgiveness threshold value one to one.
Particularly, the described data type based on described data presets the class parameter of described data, can comprise:
Receive via pre-seting the data type of dialog box setting and corresponding class parameter;
Record described data type and corresponding class parameter extremely described class parameter database.
Step 102: when reading data from described storage unit, the second check code of the data read-out by calculating.
In the present embodiment, prior art can be adopted to calculate the check code of data, at this no longer to how calculating the first check code and the second check code describes in detail.
That is, when reading data from described storage unit, read-out data likely with before stored in data have deviation.Such as, may in a step 101 stored in data be " 1110 ", and the data read from this storage unit are in a step 102 " 1010 "
Step 103: read the class parameter corresponding to described storage unit.
Here, the class parameter corresponding to described storage unit, refers to the class parameter of the described data in step 101.
Step 104: judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation.
Preferably, the described relation judging between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation, can comprise:
Whether more described second check code is consistent with described first check code;
If consistent, send the data of described reading directly to main frame;
If inconsistent, judge whether number of times of makeing mistakes exceeds predetermined threshold value, if exceeded, directly loses the data of described reading; If do not exceeded, calculate error rate according to described second check code and described first check code; The serious forgiveness threshold value corresponding with described class parameter is searched according to class parameter; Error rate and serious forgiveness threshold value are compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of described reading; If error rate is less than serious forgiveness threshold value, send the data of described reading to main frame.
That is, the importance based on data carries out classification to the data stored, and allow the serious forgiveness of data high for the data that importance information is low, the data high for importance information then give lower serious forgiveness.
Such as, the serious forgiveness threshold value of code data is 0, because for code data, can not allow and make mistakes; The serious forgiveness of the video file data of " .avi " form can be set to 10, because for video file, when mistake appears in a certain frame or a few frame, does not affect the broadcasting of overall file.
Data managing method described in the present embodiment, when the storage unit by writing data into memory, obtains the class parameter of described data, and the first check code of described class parameter and described data is write the storage unit of described storer; When reading data from described storage unit, the second check code of the data read-out by calculating; Read the class parameter corresponding to described storage unit; Judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation; So, reliability judgement can be carried out according to the class parameter of data to data, promote the experience of user.
Embodiment two
Fig. 2 is the realization flow schematic diagram two of embodiment of the present invention data managing method, is applied in SSD, and in a preferred embodiment of the invention, described data managing method mainly comprises the following steps:
Step 201: when the first storage unit by writing data into memory, obtain the class parameter of described data.
Preferably, for each storage unit arranges a counter, described counter is for recording the number of times of makeing mistakes when reading data from described storage unit.
Preferably, the class parameter of the described data of described acquisition, can comprise:
Judge the data type of described data;
The class parameter of these data is obtained based on described data type.
In the present embodiment, the described specific implementation obtaining the class parameter of these data based on described data type can be:
By tabling look-up, the mode such as database matching obtains the class parameter of these data.
Step 202: described data are write the first storage unit, writes the second storage unit by the count value of the first check code of described data, described class parameter and counter; Wherein, the stability of described second storage unit stores data is greater than pre-determined stability threshold value.
So, can ensure when reading data from the first storage unit better, that read from the second storage unit correct with count value (number of times of namely makeing mistakes) that is the first check code, class parameter and the counter corresponding to these data.
Certainly, the count value of described first check code, described class parameter, described counter also can be stored in different storage unit still respectively, all separates with described data and stores.Such as, described first check code is stored in the 3rd storage unit, described class parameter is stored in the 4th storage unit, the count value of described counter is stored in the 5th storage unit, wherein, the stability of described 3rd storage unit, the 4th storage unit, the 5th storage unit is all greater than pre-determined stability threshold value.
Step 203: when reading data from described storage unit, the second check code of the data read-out by calculating.
That is, when reading data from described storage unit, read-out data likely with before stored in data have deviation.Such as, may in step 202. stored in data be " 111 ", and the data read from this storage unit are in step 203 " 101 ".
Step 204: read the class parameter corresponding to described first storage unit, number of times of makeing mistakes, the first check code.
Wherein, the class parameter corresponding to described first storage unit, number of times of makeing mistakes, the first check code, refer to the class parameter of the described data in step 202, number of times of makeing mistakes, the first check code.In the present embodiment, read the class parameter of described data, number of times of makeing mistakes, the first check code from the second storage unit.
Particularly, the method reading the number of times of makeing mistakes corresponding to described first storage unit comprises: the count value reading counter, wherein, for each storage unit arranges a counter, described counter is for recording the number of times of makeing mistakes when reading data from described storage unit; The number of times of makeing mistakes when reading data from described storage unit is determined based on described count value.
Step 205: judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation.
Preferably, the described relation judging between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation, can comprise:
Whether more described second check code is consistent with described first check code;
If consistent, send the data of described reading directly to main frame;
If inconsistent, judge whether number of times of makeing mistakes exceeds predetermined threshold value, if exceeded, directly loses the data of described reading; If do not exceeded, calculate error rate according to described second check code and described first check code; The serious forgiveness threshold value corresponding with described class parameter is searched according to class parameter; Error rate and serious forgiveness threshold value are compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of described reading; If error rate is less than serious forgiveness threshold value, send the data of described reading to main frame.
That is, the importance based on data carries out classification to the data stored, and allow the serious forgiveness of data high for the data that importance information is low, the data high for importance information then give lower serious forgiveness.
In such scheme, preferably, if described error rate is less than serious forgiveness threshold value, when sending the data of described reading to main frame, can also comprise:
Upgrade the count value of the counter corresponding with described first storage unit, make the count value of described counter add one;
First check code is updated to the second check code, using make described second check code as described first storage unit store the check code of data.
Data managing method described in the present embodiment, data are separated with check code, class parameter and number of times of makeing mistakes and stores, can ensure when reading data from the first storage unit better, that read from the second storage unit correct with count value (number of times of namely makeing mistakes) that is the first check code, class parameter and the counter corresponding to these data, class parameter according to data carries out reliability judgement to data, promotes the experience of user.
Embodiment three
Fig. 3 is the structural representation one of embodiment of the present invention memory storage, and as shown in Figure 3, described memory storage comprises:
Flash media 31, for storing data;
Processor 32, for when the storage unit by writing data into memory, obtains the class parameter of described data, and the first check code of described class parameter and described data is write the storage unit of described storer; When reading data from described storage unit, the second check code of the data read-out by calculating; Read the class parameter corresponding to described storage unit; Judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation.
Preferably, described processor 32, also for:
Read the count value of counter, wherein, for each storage unit arranges a counter, described counter is for recording the number of times of makeing mistakes when reading data from described storage unit;
The number of times of makeing mistakes when reading data from described storage unit is determined based on described count value.
Preferably, described processor 32, also for:
Judge the data type of described data;
The class parameter of these data is obtained based on described data type.
Preferably, described processor 32, also for:
Whether more described second check code is consistent with described first check code;
If consistent, send the data of described reading directly to main frame;
If inconsistent, judge whether number of times of makeing mistakes exceeds predetermined threshold value, if exceeded, directly loses the data of described reading; If do not exceeded, calculate error rate according to described second check code and described first check code; The serious forgiveness threshold value corresponding with described class parameter is searched according to class parameter; Error rate and serious forgiveness threshold value are compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of described reading; If error rate is less than serious forgiveness threshold value, send the data of described reading to main frame.
Preferably, described processor 32, also for:
Upgrade the count value of the counter corresponding with described storage unit, make the count value of described counter add one;
First check code is updated to the second check code, using make described second check code as described storage unit store the check code of data.
Preferably, described processor 32, also for:
Described data are write the first storage unit;
The count value of described first check code, described class parameter and counter is write the second storage unit; Wherein, the stability of described second storage unit stores data is greater than pre-determined stability threshold value.
Described in the present embodiment, memory storage can be applicable in SSD.
Those skilled in the art are to be understood that, the function of each device in the memory storage of the embodiment of the present invention, can refer to the associated description of aforementioned data management method and understand, each device in the memory storage of the embodiment of the present invention, realizing by realizing the mimic channel of the function described in the embodiment of the present invention, also can be realized by the operation of the software of the function of execution described in the embodiment of the present invention on intelligent terminal.
Memory storage described in the present embodiment, according to the importance rate parameter logistic of data according to carrying out reliability judgement, can improve the experience of user.
Embodiment four
Fig. 4 is the structural representation two of embodiment of the present invention memory storage, and as shown in Figure 4, described memory storage comprises:
Acquiring unit 41, when the storage unit by writing data into memory, obtains the class parameter of described data;
Writing unit 42, for writing the storage unit of described storer by the first check code of described class parameter and described data;
First reading unit 43, during for reading data from described storage unit, the second check code of the data read-out by calculating;
Second reading unit 44, for reading the class parameter corresponding to described storage unit;
Processing unit 45, for judging the relation between described second check code and described first check code based on described class parameter, and carries out data read operation according to described relation.
Preferably, described second reading unit 44, also for:
Read the count value of counter, wherein, for each storage unit arranges a counter, described counter is for recording the number of times of makeing mistakes when reading data from described storage unit;
The number of times of makeing mistakes when reading data from described storage unit is determined based on described count value.
Preferably, described acquiring unit 41, also for:
Judge the data type of described data;
The class parameter of these data is obtained based on described data type.
Such as, described acquiring unit 41 can by tabling look-up, the mode such as database matching obtains the class parameter of these data.
Preferably, described processing unit 45, also for:
Whether more described second check code is consistent with described first check code;
If consistent, send the data of described reading directly to main frame;
If inconsistent, judge whether number of times of makeing mistakes exceeds predetermined threshold value, if exceeded, directly loses the data of described reading; If do not exceeded, calculate error rate according to described second check code and described first check code; The serious forgiveness threshold value corresponding with described class parameter is searched according to class parameter; Error rate and serious forgiveness threshold value are compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of described reading; If error rate is less than serious forgiveness threshold value, send the data of described reading to main frame.
Preferably, described processing unit 45, also for:
Upgrade the count value of the counter corresponding with described storage unit, make the count value of described counter add one;
First check code is updated to the second check code, using make described second check code as described storage unit store the check code of data.
Preferably, said write unit 42, also for:
Described data are write the first storage unit;
The count value of described first check code, described class parameter and counter is write the second storage unit; Wherein, the stability of described second storage unit stores data is greater than pre-determined stability threshold value.
Described in the present embodiment, memory storage can be applicable in SSD.
Those skilled in the art are to be understood that, the function of each unit in the memory storage of the embodiment of the present invention, can refer to the associated description of aforementioned data management method and understand, each unit in the memory storage of the embodiment of the present invention, realizing by realizing the mimic channel of the function described in the embodiment of the present invention, also can be realized by the operation of the software of the function of execution described in the embodiment of the present invention on intelligent terminal.
Acquiring unit 41 in described memory storage, writing unit 42, first reading unit 43, second reading unit 44 and processing unit 45; In actual applications all can by the central processing unit (CPU in described memory storage or described memory storage corresponding device, CentralProcessingUnit), digital signal processor (DSP, or the realization such as programmable gate array (FPGA, FieldProgrammableGateArray) DigitalSignalProcessor).
Memory storage described in the present embodiment, according to the importance rate parameter logistic of data according to carrying out reliability judgement, can improve the experience of user.
In several embodiment provided by the present invention, should be understood that, disclosed method, device and electronic equipment, can realize by another way.Apparatus embodiments described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, and as: multiple unit or assembly can be in conjunction with, maybe can be integrated into another system, or some features can be ignored, or do not perform.In addition, the coupling each other of shown or discussed each ingredient or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of equipment or unit or communication connection can be electrical, machinery or other form.
The above-mentioned unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, also can be distributed in multiple network element; Part or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in various embodiments of the present invention can all be integrated in a processing unit, also can be each unit individually as a unit, also can two or more unit in a unit integrated; Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, aforesaid program can be stored in a computer read/write memory medium, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: movable storage device, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc. various can be program code stored medium.
Or, if the above-mentioned integrated unit of the embodiment of the present invention using the form of software function module realize and as independently production marketing or use time, also can be stored in a computer read/write memory medium.Based on such understanding, the technical scheme of the embodiment of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprises some instructions and performs all or part of of method described in each embodiment of the present invention in order to make a computer equipment (can be personal computer, server or the network equipment etc.).And aforesaid storage medium comprises: movable storage device, ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (13)

1. a data managing method, described method also comprises:
When the storage unit by writing data into memory, obtain the class parameter of described data, and the first check code of described class parameter and described data is write the storage unit of described storer;
When reading data from described storage unit, the second check code of the data read-out by calculating;
Read the class parameter corresponding to described storage unit;
Judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation.
2. the method according to claim l, is characterized in that, described judge the relation between described second check code and described first check code based on described class parameter before, described method also comprises:
Read the count value of counter, wherein, for each storage unit arranges a counter, described counter is for recording the number of times of makeing mistakes when reading data from described storage unit;
The number of times of makeing mistakes when reading data from described storage unit is determined based on described count value.
3. method according to claim 1, is characterized in that, the class parameter of the described data of described acquisition, comprising:
Judge the data type of described data;
The class parameter of these data is obtained based on described data type.
4. method according to claim 2, is characterized in that, the described relation judging between described second check code and described first check code based on described class parameter, and carries out data read operation according to described relation, comprising:
Whether more described second check code is consistent with described first check code;
If consistent, send the data of described reading directly to main frame;
If inconsistent, judge whether number of times of makeing mistakes exceeds predetermined threshold value, if exceeded, directly loses the data of described reading; If do not exceeded, calculate error rate according to described second check code and described first check code; The serious forgiveness threshold value corresponding with described class parameter is searched according to class parameter; Error rate and serious forgiveness threshold value are compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of described reading; If error rate is less than serious forgiveness threshold value, send the data of described reading to main frame.
5. method according to claim 4, is characterized in that, if described error rate is less than serious forgiveness threshold value, when sending the data of described reading to main frame, also comprises:
Upgrade the count value of the counter corresponding with described storage unit, make the count value of described counter add one;
First check code is updated to the second check code, using make described second check code as described storage unit store the check code of data.
6. method according to claim 2, is characterized in that, described the first check code by described class parameter and described data writes the storage unit of described storer, comprising:
Described data are write the first storage unit;
The count value of described first check code, described class parameter and counter is write the second storage unit; Wherein, the stability of described second storage unit stores data is greater than pre-determined stability threshold value.
7. a memory storage, described device comprises:
Flash media, for storing data;
Processor, for when the storage unit by writing data into memory, obtains the class parameter of described data, and the first check code of described class parameter and described data is write the storage unit of described storer; When reading data from described storage unit, the second check code of the data read-out by calculating; Read the class parameter corresponding to described storage unit; Judge the relation between described second check code and described first check code based on described class parameter, and carry out data read operation according to described relation.
8. device according to claim 7, is characterized in that, described processor, also for:
Read the count value of counter, wherein, for each storage unit arranges a counter, described counter is for recording the number of times of makeing mistakes when reading data from described storage unit;
The number of times of makeing mistakes when reading data from described storage unit is determined based on described count value.
9. device according to claim 7, is characterized in that, described processor, also for:
Judge the data type of described data;
The class parameter of these data is obtained based on described data type.
10. device according to claim 8, is characterized in that, described processor, also for:
Whether more described second check code is consistent with described first check code;
If consistent, send the data of described reading directly to main frame;
If inconsistent, judge whether number of times of makeing mistakes exceeds predetermined threshold value, if exceeded, directly loses the data of described reading; If do not exceeded, calculate error rate according to described second check code and described first check code; The serious forgiveness threshold value corresponding with described class parameter is searched according to class parameter; Error rate and serious forgiveness threshold value are compared, if error rate is more than or equal to serious forgiveness threshold value, directly loses the data of described reading; If error rate is less than serious forgiveness threshold value, send the data of described reading to main frame.
11. devices according to claim 10, is characterized in that, described processor, also for:
Upgrade the count value of the counter corresponding with described storage unit, make the count value of described counter add one;
First check code is updated to the second check code, using make described second check code as described storage unit store the check code of data.
12. devices according to claim 8, is characterized in that, described processor, also for:
Described data are write the first storage unit;
The count value of described first check code, described class parameter and counter is write the second storage unit; Wherein, the stability of described second storage unit stores data is greater than pre-determined stability threshold value.
13. 1 kinds of memory storages, described device comprises:
Acquiring unit, when the storage unit by writing data into memory, obtains the class parameter of described data;
Writing unit, for writing the storage unit of described storer by the first check code of described class parameter and described data;
First reading unit, during for reading data from described storage unit, the second check code of the data read-out by calculating;
Second reading unit, for reading the class parameter corresponding to described storage unit;
Processing unit, for judging the relation between described second check code and described first check code based on described class parameter, and carries out data read operation according to described relation.
CN201511021449.7A 2015-12-31 2015-12-31 A kind of data managing method and storage device Active CN105512337B (en)

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 true CN105512337A (en) 2016-04-20
CN105512337B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158589A (en) * 2019-12-16 2020-05-15 绿晶半导体科技(北京)有限公司 Dynamic management method and device for storage array
CN113053451A (en) * 2021-03-05 2021-06-29 深圳三地一芯电子有限责任公司 Method, system, host and storage medium for generating softbit in Nandflash

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1780397A (en) * 2004-11-19 2006-05-31 大唐移动通信设备有限公司 Method for assuring qualified video frequency transmission of low-code ratio wireless channel
US20070091498A1 (en) * 2005-10-25 2007-04-26 Kabushiki Kaisha Toshiba Information processing apparatus, data storage method, and data storage program
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
US20130262964A1 (en) * 2012-04-02 2013-10-03 Minebea Co., Ltd. Device and method for the reading and storing of data
CN104182292A (en) * 2013-05-21 2014-12-03 华为技术有限公司 Data storage method and device
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)

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1780397A (en) * 2004-11-19 2006-05-31 大唐移动通信设备有限公司 Method for assuring qualified video frequency transmission of low-code ratio wireless channel
US20070091498A1 (en) * 2005-10-25 2007-04-26 Kabushiki Kaisha Toshiba Information processing apparatus, data storage method, and data storage program
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
US20130262964A1 (en) * 2012-04-02 2013-10-03 Minebea Co., Ltd. Device and method for the reading and storing of data
CN102929743A (en) * 2012-11-28 2013-02-13 中国人民解放军国防科学技术大学 First-stage cached data storage method and device with soft error tolerant function
CN104182292A (en) * 2013-05-21 2014-12-03 华为技术有限公司 Data storage method and device
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)

* Cited by examiner, † Cited by third party
Title
华斌 等: "基于FPGA的高速大容量固态存储设备数据ECC的设计与实现", 《科学技术与工程》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158589A (en) * 2019-12-16 2020-05-15 绿晶半导体科技(北京)有限公司 Dynamic management method and device for storage array
CN111158589B (en) * 2019-12-16 2023-10-20 绿晶半导体科技(北京)有限公司 Dynamic management method and device for storage array
CN113053451A (en) * 2021-03-05 2021-06-29 深圳三地一芯电子有限责任公司 Method, system, host and storage medium for generating softbit in Nandflash
CN113053451B (en) * 2021-03-05 2022-05-10 深圳三地一芯电子有限责任公司 Method, system, host and storage medium for generating softbit in Nandflash

Also Published As

Publication number Publication date
CN105512337B (en) 2019-10-29

Similar Documents

Publication Publication Date Title
CN104281533B (en) A kind of method and device of data storage
CN109669622B (en) File management method, file management device, electronic equipment and storage medium
CN104484427B (en) A kind of video file storage device and method
TWI548233B (en) Server, server management system and server management method
CN112527201B (en) SSD bad block replacement method and device, readable storage medium and electronic equipment
CN107203331B (en) Method and device for writing data
US10489011B2 (en) Systems and methods for accessing system utilities
CN104951410B (en) The access method and device of a kind of chip information
CN110377576B (en) Method and device for creating log template and log analysis method
CN106897342A (en) A kind of data verification method and equipment
CN104281535A (en) Method and device for processing mapping tables in memory
US11210183B2 (en) Memory health tracking for differentiated data recovery configurations
CN104765792B (en) A kind of method, apparatus and system of dimension data storage
CN110597764B (en) File downloading and version management method and device
CN105512337A (en) Data management method and storage device
CN111459764A (en) Log management method and terminal
CN110858122B (en) Method and device for storing data
US20170075937A1 (en) Method and system for handling binary large objects
CN103049391B (en) Data processing method and equipment
CN107357717A (en) Detect the method, apparatus and equipment of configuration error
CN114924914B (en) Disk partition table information backup and recovery method and system
CN106254806A (en) A kind of Video data guard method and device
CN109542808A (en) The method and apparatus for controlling hard disk access
CN115185778A (en) Database monitoring method and device
CN107908500A (en) A kind of bad block identifying method and device

Legal Events

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