Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a solid state disk temperature-spanning data reading method, a storage medium and an SSD device that overcome or at least partially solve the above problems.
One aspect of the present invention provides a solid state disk temperature-crossing data reading method, including:
when data is read, acquiring current temperature information of a working environment where the solid state disk is located, and taking the current temperature information as read data temperature;
acquiring the write data temperature of the read data, wherein the write data temperature is the temperature information of the working environment of the solid state disk when the data is written into the storage unit;
compensating the read voltage of the current storage unit according to the temperature difference between the read data temperature and the write data temperature;
and reading data according to the compensated reading voltage.
Further, the compensating the read voltage of the current memory cell according to the temperature difference between the read data temperature and the write data temperature includes:
acquiring a service life parameter of a current storage unit;
acquiring a temperature correlation coefficient of a reading voltage and a reading-writing temperature difference corresponding to the current service life parameter according to a preset first corresponding relation;
obtaining the offset of each reading voltage of the current storage unit corresponding to the temperature difference and the temperature correlation coefficient according to a preset second corresponding relation;
and compensating each reading voltage according to the offset.
Further, before performing the data reading, the method further comprises:
when data are written into the storage unit, acquiring temperature information of a working environment where the solid state disk is located;
and carrying out interval coding on the acquired temperature information according to the temperature interval to which the temperature information belongs, and recording the acquired temperature codes in the specified storage position of the solid state disk.
Further, the recording the obtained temperature code in a specified storage location of the solid state disk includes:
carrying out redundancy coding on the temperature code according to a preset coding rule;
and recording the updated temperature code in the appointed storage position of the solid state disk.
Further, the obtaining the write data temperature of the read data comprises:
reading the temperature code from the designated storage position, and determining a corresponding temperature interval according to the temperature code;
acquiring an approximate temperature corresponding to the temperature interval according to a preset third corresponding relation;
and taking the approximate temperature as the write data temperature of the read data.
Further, the approximate temperature is a median of the temperature intervals.
Further, the method further comprises:
and determining the division number of the temperature interval according to the storage space of the appointed storage position of the solid state disk.
Further, before obtaining the current temperature information of the working environment where the solid state disk is located, the method further includes:
reading data according to the initial reading voltage;
judging whether the reading result meets the preset ECC correction requirement or not;
and when the reading result does not meet the preset ECC correction requirement, executing the operation of acquiring the current temperature information of the working environment where the solid state disk is located.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the above solid state disk temperature-crossing data reading method.
In addition, an embodiment of the present invention further provides an SSD device, which includes a storage controller, where the storage controller includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and when the processor executes the computer program, the steps of the above method for reading the solid state disk across-temperature data are implemented.
According to the solid state disk temperature-crossing data reading method, the storage medium and the SSD device, the reading voltage is compensated according to the temperature difference between the writing data temperature and the reading and writing data temperature, the influence of temperature-crossing reading on the NAND threshold voltage can be eliminated, data errors caused by temperature-crossing reading and writing are reduced, the original NAND error rate is reduced, the re-reading probability is reduced, and the SSD performance is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Fig. 1 schematically shows a flowchart of a solid state disk temperature-crossing data reading method according to an embodiment of the present invention. Referring to fig. 1, the method for reading the solid state disk across-temperature data in the embodiment of the present invention specifically includes the following steps:
and S11, when data are read, acquiring the current temperature information of the working environment of the solid state disk, and taking the current temperature information as the read data temperature.
And S12, acquiring the write data temperature of the read data, wherein the write data temperature is the temperature information of the working environment of the solid state disk when the data is written into the storage unit.
And S13, compensating the read voltage of the current memory cell according to the temperature difference between the read data temperature and the write data temperature.
And S14, reading data according to the compensated reading voltage.
One memory cell of the NAND flash memory can store information of a plurality of bits, for example, one memory cell stores 2-bit information (MLC), the stored information corresponds to four threshold voltage distribution states with different heights, the four distribution states are programming states, the encoding of the four distribution states can be represented by 00,01,10 and 11, similarly, one memory cell stores 3-bit information (TLC), and the corresponding eight programming states can be encoded as 000,001,010,011,100,101,110,111.
Read voltage Read level: to distinguish between different programming states. When reading the NAND, different reading voltages are applied to the Control gates to judge the storage information of the memory cells. For MLC, the programmed state has four distributions, so it has three Read levels, and similarly for TLC, the programmed state has eight distributions, all of which have seven Read levels.
According to the solid state disk temperature-crossing data reading method provided by the embodiment of the invention, the reading voltage is compensated according to the temperature difference between the writing data temperature and the reading and writing data temperature, and the data is read according to the compensated reading voltage, so that the influence of temperature-crossing reading on the NAND threshold voltage can be eliminated, the data error caused by temperature-crossing reading and writing is reduced, the re-reading probability is reduced, and the SSD performance is improved.
In an embodiment of the present invention, as shown in fig. 2, the step S13 of compensating the read voltage of the current memory cell according to the temperature difference between the read data temperature and the write data temperature includes the following specific implementation steps:
s131, acquiring the service life parameter of the current storage unit. Specifically, the service life parameter is the P/E times of the storage unit.
S132, acquiring a temperature correlation coefficient of the reading voltage and the reading-writing temperature difference corresponding to the current service life parameter according to a preset first corresponding relation. Specifically, the first corresponding relationship may be implemented in a corresponding relationship table, where the corresponding relationship table includes a corresponding relationship between a temperature correlation coefficient of a reading voltage and a reading/writing temperature difference and a service life parameter.
In one embodiment, the temperature dependent coefficient of the read voltage versus read/write temperature difference, such as 2 mV/deg.C, may be selected based on the P/E number of the current memory cell.
And S133, acquiring the offset of each read voltage of the current storage unit corresponding to the temperature difference and the temperature correlation coefficient according to a preset second corresponding relation. Specifically, the second corresponding relationship may be implemented in a corresponding relationship table, where the corresponding relationship table includes corresponding relationships between the temperature difference, the temperature correlation coefficient, and offsets of the read voltages of different memory cells.
Specifically, each read level Offset is obtained through the corresponding relationship table, and the Offset is set to the corresponding register of the NAND, and the general rereading process is entered
And S134, compensating each read voltage according to the offset.
According to the embodiment of the invention, the influence of cross-temperature reading on the NAND threshold voltage is understood, on the basis of obtaining the read data temperature and the write data temperature, the service life parameter of the current storage unit is combined, and the Offset read level Offset of the read voltage is set according to the temperature difference between the read data temperature and the write data temperature and the temperature correlation coefficient of the read voltage and the read-write temperature difference under different P/E times, so that the original error rate of the NAND is directly reduced, the re-reading probability is reduced, and the SSD performance is improved.
In the embodiment of the invention, when data are written into the storage unit, the temperature information of the working environment where the solid state disk is located is obtained in advance; and carrying out interval coding on the acquired temperature information according to the temperature interval to which the temperature information belongs, and recording the acquired temperature codes in the specified storage position of the solid state disk. Specifically, the number of divisions of the temperature range may be determined according to the size of the storage space of the designated storage location of the solid state disk. The storage space is large, the division number of the temperature intervals is large, the range of the temperature intervals is relatively small, and finally recorded write data temperature is more accurate.
Specifically, when the obtained temperature code is recorded in a specified storage location of the solid state disk, in order to obtain correct temperature information during reading, the temperature code is redundantly encoded according to a preset encoding rule, so that the reliability of the information is increased. The present invention is not limited to the specific implementation of the redundant coding.
In one embodiment, the temperature code may be complementarily encoded and repeated, and then the updated temperature code may be recorded in a designated storage location of the solid state disk.
Further, the acquiring the write data temperature of the read data includes the following implementation steps that are not shown in the following drawings:
and S121, reading the temperature code from the specified storage position, and determining a corresponding temperature interval according to the temperature code.
Specifically, if the temperature code is redundantly coded during storage, the temperature code is read from the specified storage location and decoded, and then the corresponding temperature interval is determined.
And S122, acquiring an approximate temperature corresponding to the temperature interval according to a preset third corresponding relation. Specifically, the third corresponding relationship may be implemented in a corresponding relationship table, where the corresponding relationship table includes a corresponding relationship between the temperature interval and the approximate temperature.
And S123, taking the acquired approximate temperature as the write data temperature of the read data. In the present embodiment, the approximate temperature is preferably the median of the temperature intervals. At the time of data reading, a temperature difference calculation is performed using the approximate temperature as the write data temperature.
In the embodiment of the invention, in order to obtain the temperature when the data is written during the data reading, the data writing temperature is recorded into each Page in advance. The SSD can work at different temperatures due to different application scenes, such as the consumption level, the possible working environment temperature is 0-70 ℃, and the industrial level working environment can reach-40-85 ℃. In order to save the temperature recording space, the working environment temperature may be encoded in different intervals, and the specific number of the intervals may be determined according to the size of the recording space available in the SSD. In a specific example, as shown in table 1, the data can be recorded by encoding with 3b bits of information, specifically, 010b is recorded when the temperature is in the range of 20-30 ℃. Table 1 shows a correspondence table of the coding using 3 b-bit information at an application temperature [0 ℃ C., 80 ℃ C.).
TABLE 1 correlation table for encoding with 3b bit information using temperature [0 deg.C, 80 deg.C ]
In an embodiment of the present invention, as shown in fig. 3, after receiving a data reading instruction, before obtaining current temperature information of a working environment where a solid state disk is located, data reading is performed according to an initial reading voltage, and it is determined whether a reading result meets a preset ECC error correction requirement, if the reading result meets the ECC error correction requirement, a correct result is returned, the process is ended, if the reading result does not meet the ECC error correction requirement, a reading data temperature and a writing data temperature of the read data are obtained, it is determined whether the reading data temperature and the writing data temperature are consistent, if the reading data temperature and the writing data temperature are consistent, a re-reading process is entered, and when the reading data temperature and the writing data temperature are inconsistent, an offset of each reading voltage of a current storage unit is calculated according to a temperature correlation coefficient between the reading voltage and the reading and writing temperature difference at the current P/E times, and the reading data temperature and the writing data temperature, and after each read voltage is compensated according to the offset, the re-reading process is carried out, so that the original error rate and the re-reading probability of the NAND are reduced, and the performance of the SSD is improved.
The test experiment verifies that the data passing probability of the technical scheme of the invention is shown in the table 2, and the method specifically comprises the following steps:
table 2 the technical scheme of the present invention reads data passing probability test results:
therefore, the solid state disk temperature-crossing data reading method provided by the embodiment of the invention can effectively reduce data errors caused by temperature-crossing reading and writing, improve the first reading data passing probability, reduce the re-reading probability and improve the SSD performance.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the solid state disk temperature-crossing data reading method according to the above embodiment.
In this embodiment, if the solid state disk temperature-crossing data reading method is implemented in the form of a software functional unit and sold or used as an independent product, the method may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
In addition, an embodiment of the present invention further provides an SSD device, which includes a storage controller, where the storage controller includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method when executing the program. Such as S11 through S14 shown in fig. 1.
According to the solid state disk temperature-crossing data reading method, the storage medium and the SSD device, the reading voltage is compensated according to the temperature difference between the writing data temperature and the reading and writing data temperature, the influence of temperature-crossing reading on the NAND threshold voltage can be eliminated, data errors caused by temperature-crossing reading and writing are reduced, the original NAND error rate is reduced, the re-reading probability is reduced, and the SSD performance is improved.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.