Summary of the invention
The present invention be in order to solve under above-mentioned wide temperature difference condition, the prior art cannot preferably realize data reliable read write and
Cannot low cost, simply carry out data recovery and carry out, and it is an object of the present invention to provide it is a kind of utilize temperature equalization data recovery side
The storage device of method progress data recovery.
The present invention provides a kind of storage device that data recovery is carried out using temperature equalization data reconstruction method, has storage
Chip, control chip and the interface connecting with external data source control journey wherein being stored with control program in control chip
Sequence performs the steps of
Write-in temperature T1 when data are written in storage chip, when record write-in is completed;
Environment temperature T2 locating for real-time monitoring storage chip;
Encountered when storage chip is read data can not error correction mistake, inquire this can not error correction accidentally data write-in
Temperature T1;
According to the write-in temperature and current real time environment temperature T2 inquired, calculating temperature difference value;
Data recovery is carried out using different data reconstruction methods and parameter according to different temperature difference.
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
Such feature, wherein record write-in temperature T1 process include:
Storage chip is divided into multiple storage regions, the region includes multiple storage cells;
When storage region is fully written, record the moment corresponding temperature T1, and by as metadata write-in storage to depositing
The specific region for storing up chip, obtains the corresponding write-in temperature T1 of each storage cell.
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
Wherein, the storage cell is memory block or memory page to such feature.
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
Such feature, wherein said write temperature T1, environment temperature T2 are detected to obtain by temperature sensor on storage chip.
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
Such feature, wherein data reconstruction method includes read retry, and parameter includes reference voltage.
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
Such feature, read retry attempts to read the data in storage chip with different reference voltages, until reading out.
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
The data completely restored are written back in new storage cell by such feature again, while recording write-in temperature when write-in
T1。
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
Such feature, wherein can not error correction accidentally refer to data the bit error rate be more than storage chip itself hardware ECC error correction ability.
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
Such feature further includes pcb board, wherein the storage chip, control chip and interface are all disposed within the pcb board
On, the PCB is provided with temperature sensor, for detecting the temperature of the storage chip.
The storage device provided by the invention that data recovery is carried out using temperature equalization data reconstruction method, can also have
Such feature, wherein the storage chip is SLC, MLC, TLC or QLC flash memory particle, and the interface includes PCIe, SATA
Interface.
The function and effect of the present invention is: being carried out involved according to the present invention using temperature equalization data reconstruction method
The storage device that data are restored, because being stored with control program in control chip, so that when data are written in storage chip, note
Record write-in temperature T1;After the completion of write-in, environment temperature T2 locating for real-time monitoring storage chip;And when storage chip is read
Encountered when data can not error correction mistake, inquire this can not error correction accidentally data write-in temperature T1;Then basis inquires
Temperature and current real time environment temperature T2, calculating temperature difference value is written;Different data are finally used according to different temperature difference
Restoration methods and parameter carry out data recovery, so, method operation provided by the invention can be obtained timely in the storage device
Temperature locating for storage chip after taking write-in data, and be compared in real time with temperature when write-in, and work as storage chip quilt
Read data when encounter can not error correction mistake, the write-in temperature for inquiring the data first obtains the difference with current environmental temperature,
Then suitable data reconstruction method and parameter is selected to carry out data recovery according to the size of difference, whole process considers write-in
The difference of temperature and environment temperature can choose the restoration methods being more suitable for and parameter logistic according to being restored, and recovery effects are good,
Data write is more firm.
Embodiment 1
Fig. 1 is the storage device that data recovery is carried out using temperature equalization data reconstruction method in the embodiment of the present invention
Structural schematic diagram.
As shown in Figure 1, carrying out the storage device 100 of data recovery using temperature equalization data reconstruction method, there is storage
Chip 10, control chip 20 and the interface 30 and pcb board 40, temperature sensor 50 being connect with external data source, wherein
It is stored with control program in control chip, controls program running temperature equalization data restoration methods.
The storage chip 10 is storage chip made of SLC, MLC, TLC or QLC flash memory particle.
In the present embodiment, the storage chip is nand flash memory chip, specially SLC, MLC, TLC or QLC flash memory
The nand flash memory chip of grain production.Theoretically, be also possible to other kinds of storage chip, for example, NOR flash memory, ROM,
PROM, EPROM, EEPROM, Flash ROM, FRAM, MRAM, RRAM, PCRAM etc. are that can be used as storage core of the invention
Piece.
SLC, Single-LevelCell, i.e. 1bit/cell, the speed fast service life is long, price it is super it is expensive (about MLC3 times or more
Price), about 100,000 erasing and writing lifes.
MLC, Multi-LevelCell, i.e. 2bit/cell, speed General Life is general, and price is general, about 3000---
10000 erasing and writing lifes.
TLC, Trinary-LevelCell, i.e. 3bit/cell, Ye You Flash producer is 8LC, the relatively slow service life phase of speed
To short, cheap, about 500 erasing and writing lifes.
QLC, Quad-Level Cell, i.e. 4bit/cell support 16 charge values, and the speed most slow service life is most short.
The nand flash memory chip of these three structures, the briefly best performance of SLC, price superelevation.It is typically used as enterprise
Grade or high-end enthusiast use.MLC performance is enough, and moderate cost is consumer level SSD application mainstream, and TLC comprehensive performance is minimum, valence
Lattice are generally the least expensive.But the performance of TLC flash memory can be made up, improved by high-performance master control, master control algorithm.
Chip 20 is controlled, controls chip using general SSD, commercially available purchase, such as
SATA3 controller, selecting U.S. Marvell company, (Chinese name steps prestige science and technology Group Co., Ltd, beauty of now renaming
88SS1074,88SS1079 controller completely) is applicable in SATA data-interface;
NVMe controller is selected U.S. Marvell company (Chinese name steps prestige science and technology Group Co., Ltd, happiness of now renaming)
88SS1093,88SS1092 controller, the PCIe data interface being suitable under NVMe agreement.
Here the Marvell company of the U.S. enumerated is an example, actually the SSD controller of any producer on the market
It can realize, not limiting is Marvell company of the U.S..
The interface 30 of data source connection, the interface used includes PCIe, SATA interface.
Pcb board 40, as the circuit carrier of hardware above, the storage chip 10, control chip 20 and interface 30 are all
It is arranged on the pcb board 40.The PCB is provided with temperature sensor 50, for detecting the temperature of the storage chip 40.
Fig. 2 is the step schematic diagram of temperature equalization data restoration methods in the embodiment of the present invention.
As shown in Fig. 2, temperature equalization data reconstruction method provided in this embodiment, comprising the following steps:
Step S1, the write-in temperature T1 when data are written in storage chip, when record write-in is completed.
In the present embodiment, the storage chip is nand flash memory chip, specially SLC, MLC, TLC or QLC flash memory
The nand flash memory chip of grain production.Theoretically, can also make other kinds of storage chip, for example, NOR flash memory, ROM,
PROM, EPROM, EEPROM, Flash ROM, FRAM, MRAM, RRAM, PCRAM etc. are that can be used as storage core of the invention
Piece.
SLC, Single-LevelCell, i.e. 1bit/cell, the speed fast service life is long, price it is super it is expensive (about MLC3 times or more
Price), about 100,000 erasing and writing lifes.
MLC, Multi-LevelCell, i.e. 2bit/cell, speed General Life is general, and price is general, about 3000---
10000 erasing and writing lifes.
TLC, Trinary-LevelCell, i.e. 3bit/cell, Ye You Flash producer is 8LC, the relatively slow service life phase of speed
To short, cheap, about 500 erasing and writing lifes.
QLC, Quad-Level Cell, i.e. 4bit/cell support 16 charge values, and the speed most slow service life is most short.
The nand flash memory chip of these three structures, the briefly best performance of SLC, price superelevation.It is typically used as enterprise
Grade or high-end enthusiast.MLC performance is enough, and moderate cost is consumer level SSD application mainstream, and TLC comprehensive performance is minimum, and price is most
Cheaply.But the performance of TLC flash memory can be made up, improved by high-performance master control, master control algorithm.
Fig. 3 is the process schematic of record write-in temperature.
Specifically, record write-in temperature T1Process include:
Storage chip is divided into multiple storage regions by step S1-1, and the region includes multiple storage cells.
Wherein, the storage cell is memory block (block) or memory page (page), it is however generally that, one basic to deposit
The capacity for storing up unit is 16k byte, this specific data is different and different according to the manufacturer of storage particle.
Step S1-2 records the moment corresponding temperature T1, and be written as metadata when storage region is fully written
The specific region for storing storage chip obtains the corresponding write-in temperature T of each storage cell1.Specific region is storage chip
What is be previously set is specifically used to store the region of these temperature.
When data are written, all by control chip possessed by storage device (including control chip and storage chip) into
ECC protection is gone.
ECC is writing a Chinese character in simplified form for " Error Correcting Code ", and Chinese is " error checking and correction ".ECC is one
Kind can be realized the technology of " error checking and correction ", and ECC protection is exactly to apply this technology to protect the data of storage
Corresponding ECC code is written by control chip and is stored in storage chip generally in storing data by the operation of shield,
This will allow the data being stored in storage chip carry out hardware recovery.ECC can also be construed to error correction
or correcting code、error checking and correcting、error checking and
Correcting is also interpreted as Error correction circuit, is that a kind of maturation is applied and set in data storage
Standby upper data protection and Restoration Mechanism.
Step S2, after the completion of write-in, environment temperature T2 locating for real-time monitoring storage chip.
Because the write-in of data may be continuous, it is also possible to it is desultory, and writing process and reading in practice
Process and waiting process are interlaced, so write-in completion here is also possible to for some storage cell
The storage region artificially divided for some.
The sample frequency of real-time monitoring environment temperature T2 is every 1-30 seconds primary, this frequency is according to the storage chip institute
Depending on the working environment at place and the frequency of read-write, if the temperature change of working environment is bigger, and storage chip is read
It is frequent to write comparison, it is meant that in the case of this kind, the temperature change of storage chip can relatively acutely, and corresponding environment temperature is adopted
Sample frequency will be relatively high.
Said write temperature T1, environment temperature T2 are detected to obtain by temperature sensor on storage chip.
Step S3, encountered when storage chip is read data can not error correction mistake, inquire this can not error correction accidentally number
According to write-in temperature T1.
Can not error correction accidentally refer to data the bit error rate be more than storage chip itself hardware ECC error correction ability.
Hardware ECC protection mechanism can be reported during correcting data error every cell data (usually 512byte-4KB it
Between) an opposite percentage is arranged further according to the error correcting capability of hardware ECC in bit (Bit) quantity of data that can correct
Threshold value, the i.e. peak of the bit error rate, as the attainable bit error rate of hardware ECC error correction ability institute of storage chip, this error code
Rate is known as the error correcting capability of hardware ECC.The present embodiment can be according to the life cycle of storage equipment, flash memory characteristics, by hardware ECC's
Error correcting capability is set in the bit error rate in 70-85%.
Hardware ECC protection mechanism can be reported during correcting data error every cell data (usually 512byte-4KB it
Between) an opposite percentage is arranged further according to the error correcting capability of hardware ECC in bit (Bit) quantity of data that can correct
Threshold value, the i.e. peak of the bit error rate, as the attainable bit error rate of hardware ECC error correction ability institute of storage chip, this error code
Rate is known as the error correcting capability of hardware ECC.The present embodiment can be according to the life cycle of storage equipment, flash memory characteristics, by hardware ECC's
Error correcting capability is set in the bit error rate in 70-85%.
When error rates of data is not up to threshold value, illustrate that data are reliably, there is no loss situation occurs, without carrying out
Processing.This threshold value become data reliable thresholds, usually determined by the control chip of storage device, numerical value from 10-5 to
10-9 etc..
When error rates of data reaches threshold value, but is less than the hardware ECC error correction ability of storage chip itself, start hardware
The data completely restored are written back in new storage cell by ECC error correction again, while recording write-in temperature when write-in again
T1。
Step S4, according to the write-in temperature and current real time environment temperature T2 inquired, calculating temperature difference value.
Due to occur can not error correction accidentally data may belong to different data storage units, so what is obtained here is
The temperature difference of corresponding different storage cell.
As described above, after the mistake more than the HW ECC error correction ability of storage chip hardware occurs, it is necessary to using additional
Restoration Mechanism, i.e., when error rates of data be more than storage chip itself hardware ECC error correction ability when, it is extensive to start additional data
The system of answering a pager's call is to restore data.Wherein, the additional time data recovery mechanism includes RAID data recovery, re-try, soft-
Retry data recovery etc..
The full name of RAID is Redundant Array of Inexpensive Disk, and translator of Chinese is cheap redundant magnetic
The abbreviation abbreviation RAID technique of disk array.It is the DavidPatterson by the branch school California, USA university Berkeley in 1988
The disk redundancy technology that professor et al. puts forward.From that time, disk array technology develops quickly, and gradually moves to maturity.
People have gradually recognized disk array technology at present.Disk array technology can be divided into several ranks in detail
0-5RAID technology, and developed the new rank of so-called RAID Level 10,30,50 again.It is simple with the benefit of RAID
Say and be exactly: highly-safe, speed is fast, data capacity super large.The RAID technique of certain ranks can be increased to speed individually
The 400% of hard disk drive.Disk array links together multiple hard disk drives collaborative work, substantially increases speed,
The reliability of hard-disk system is increased to close to error-free boundary simultaneously.These " fault-tolerant " system speeds are exceedingly fast, while reliability
It is high.
RAID restoration methods are can to save entire Die using multiple die (disk sheet or storage cell) even-odd check
(disk sheet storage cell) scrap or loss of data, to restore to data.
Several data point voltage's distribiutings of re-try, i.e. read retry, MLC or TLC, SLC are possible to translate, as long as
Several distributions can restore without superposition.ReadRetry attempts to read data with different reference voltages, until reading
Come.
Soft-retry is read with Soft Inform ation.It integrates after reading several groups of data from different reference voltages and is finally counted
According to.This needs more powerful ECC error correction ability, such as LDPC (the English contracting of Low Density Parity Check Code
It writes, Chinese means low density parity check code, is most mentioned in his doctoral thesis early in the 1960s by Gallager
Out.)
If data can not be restored by any mechanism, corresponding data are labeled as damaging, as read this storage cell
Data will return to error condition, show that the area data is unreadable.
Step S5 carries out data recovery using different data reconstruction methods and parameter according to different temperature difference.
As described above, the present embodiment by taking read retry as an example, needs to attempt to be read storage with different reference voltages
Data in chip are written back in new storage cell again until reading out, and by the data completely restored, while recording and writing
Fashionable write-in temperature T1.
In the present embodiment, storage device is SSD solid state hard disk, storage array.
The action and effect of the present embodiment is: according to the present invention involved in using temperature equalization data reconstruction method into
The storage device that row data are restored, because being stored with control program in control chip, so that when data are written in storage chip,
Record write-in temperature T1;After the completion of write-in, environment temperature T2 locating for real-time monitoring storage chip;And when storage chip is read
Access according to when encounter can not error correction mistake, inquire this can not error correction accidentally data write-in temperature T1;Then basis inquires
Write-in temperature and current real time environment temperature T2, calculating temperature difference value;Different numbers is finally used according to different temperature difference
Data recovery is carried out according to restoration methods and parameter, so, method operation provided by the invention in the storage device can be timely
Temperature locating for storage chip after obtaining write-in data, and be compared in real time with temperature when write-in, and work as storage chip
Encountered when being read data can not error correction mistake, the write-in temperature for inquiring the data first obtains the difference with current environmental temperature
Then value selects suitable data reconstruction method and parameter to carry out data recovery according to the size of difference, whole process considers
The difference that temperature and environment temperature is written can choose the restoration methods being more suitable for and parameter logistic according to being restored, restore effect
Fruit is good, and data write is more firm.
Because storage chip is divided into multiple storage regions, the region includes multiple storage cells;With data quilt
It is written in storage cell, when storage cell is fully written, just records the moment corresponding temperature T1, and write as metadata
Enter storage, the corresponding write-in temperature T1 of each storage cell is obtained, so for each basic storage cell for depositing
Write-in temperature is contained, so can restore to data more as far as possible, the data of better adaptability, recovery can be more.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The shape for the computer program product implemented in usable storage medium (including but not limited to magnetic disk storage and optical memory etc.)
Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Above embodiment is preferred case of the invention, the protection scope being not intended to limit the invention.