WO2019144918A1 - 非易失存储设备的掉电时间估计方法和装置 - Google Patents

非易失存储设备的掉电时间估计方法和装置 Download PDF

Info

Publication number
WO2019144918A1
WO2019144918A1 PCT/CN2019/073038 CN2019073038W WO2019144918A1 WO 2019144918 A1 WO2019144918 A1 WO 2019144918A1 CN 2019073038 W CN2019073038 W CN 2019073038W WO 2019144918 A1 WO2019144918 A1 WO 2019144918A1
Authority
WO
WIPO (PCT)
Prior art keywords
power
time
read voltage
optimal read
storage device
Prior art date
Application number
PCT/CN2019/073038
Other languages
English (en)
French (fr)
Inventor
夏天
玄在雄
江冬
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019144918A1 publication Critical patent/WO2019144918A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2284Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a method and apparatus for estimating a power down time of a nonvolatile storage device.
  • the Retention time of a Solid State Disk refers to the storage time of data in Flash, that is, the time from data storage to data erasure.
  • the Retention time increases, the number of error bits in the data increases.
  • the data inspection removes the data in which the Retention time in the Flash is greater than the set threshold, thereby providing data reliability.
  • SSD will consider the power-down protection mechanism in the system design to protect the system from abnormal loss after abnormal power failure, and provide system reliability.
  • the power-down protection of SSD and the corresponding power-on recovery are one of the differences in product competitiveness.
  • the power down period of the SSD there is no mechanism to record the power down time. After the SSD is powered on, the data retention time recorded in the system is no longer accurate. The data inspection cannot effectively identify and move the data with the Retention time greater than the set threshold. As a result, data reliability is at risk. Therefore, it is necessary to estimate the power down time of the SSD.
  • the power-down time in the actual scenario may be any value, and the static configuration cannot accurately reflect the true power-down time.
  • the estimated power-down duration cannot accurately reflect the duration of the power-down, or even a negative value.
  • the present application provides a power-down time estimation method and apparatus for a non-volatile storage device, which can determine that the power-down time of the non-volatile storage device is short-time power-off or off according to the number of errors in the data in the non-volatile storage device.
  • the electrical duration is the first set duration.
  • the present application provides a power-down time estimation method for a non-volatile storage device, the method being applied to a non-volatile storage device, the method comprising: acquiring and recording reference data in the non-easy And a first optimal read voltage of the power-down moment of the memory device, wherein the reference data is at least one logical block address sector (Sector) of the non-volatile memory device determined according to a pre-configured selection rule
  • the data is read at the power-on time after the power-down time of the non-volatile storage device, and the reference data is read according to the first optimal read voltage to obtain an error number of the reference data; If the number of errors is not greater than the set threshold, it is determined that the power-off duration of the non-volatile storage device is the first set duration.
  • the reference data in the device at the power-on time after the power-down time is read, and the error number of the reference data is obtained, based on the error number and the pre-
  • the configured error threshold determines whether a non-volatile storage device has experienced a short-term power loss.
  • the non-volatile storage device can be patrolled after the power-on recovery of the non-volatile storage device is completed by the reasonable configuration of the first set duration, thereby improving the non-volatile storage device. Responsive efficiency.
  • the method further includes: acquiring a second optimal read voltage of the reference data at the power-on time; calculating an optimal read of the reference data according to the first optimal read voltage and the second optimal read voltage Voltage offset; determining a power-down duration of the non-volatile memory device based on the optimal read voltage offset.
  • the power-off duration of the non-volatile storage device can be accurately estimated online according to the optimal read voltage offset of the reference data, which is based on the Retention time.
  • the data inspection provides a reliable time basis to ensure the reliability of data in non-volatile storage devices.
  • the determining the non-determination according to the optimal read voltage offset includes: determining an optimal read voltage corresponding to each of the at least two different retention times at the time of the power-down, where the Retention time corresponds to The optimal read voltage is the optimal read voltage corresponding to the reference data corresponding to the Retention time; and one of the at least two different Retention times is used as the reference time, and the at least two different The difference between the optimal read voltage corresponding to each Retention time in the Retention time and the optimal read voltage corresponding to the reference time; according to the difference between the difference and the optimal read voltage offset The Retention time corresponding to the value and the reference time determine a power-down duration of the non-volatile storage device.
  • the optimal value of the optimal read voltage corresponds to the reference time. Reading the difference corresponding to the difference of the voltage offset, the difference between the power-down duration corresponding to the optimal read voltage offset can be characterized, and therefore, according to the difference between the difference and the optimal read voltage offset Retention time and reference time determine the power-down duration of the non-volatile storage device.
  • the determining, according to a Retention time and a reference time corresponding to a difference between the difference being the closest to the optimal read voltage offset, determining The power-down duration of the non-volatile storage device includes: determining a difference between a Retention time corresponding to a difference between the difference and the optimal read voltage offset and the reference time, The power-down duration of the non-volatile storage device.
  • the method further includes: determining that the optimal read voltage offset is not greater than a maximum difference among the differences, and the optimal read voltage offset is not less than the difference The smallest difference in .
  • the optimal read voltage offset is not greater than a maximum difference among the differences, and the optimal read voltage offset is not less than a minimum difference among the differences. All of the above differences are excessively different from the optimal read voltage offset, that is, the optimal read voltage offset is greater than the maximum of all differences or the optimal read voltage offset is less than the minimum of all differences, resulting in a power down time Estimate the problem of excessive deviation.
  • the method further comprising: determining that the power-off duration of the non-volatile storage device is a second set duration.
  • determining the power-down duration of the non-volatile storage device according to the optimal read voltage offset includes: searching for the preset offline power-down schedule a first PE frequency interval in which the number of PEs of the nonvolatile storage device is located; a voltage offset corresponding to the first PE frequency interval in the offline power down schedule, and the optimal read voltage
  • the Retention time corresponding to the offset voltage offset is determined as the power-down duration of the non-volatile storage device; wherein the offline power-down schedule is used to store the first PE time interval, the Retention time, and the voltage offset
  • the association relationship of the shift, each first PE frequency interval is a PE number or a frequency interval including at least two consecutive PE times.
  • the error number of the reference data is an error bit of the reference data at the power-on time, or an error of the reference data at the power-on time a bit rate, or a number of error changes between the power-on time and the power-down time of the reference data.
  • the set threshold is a threshold determined according to a data size of the reference data, or is based on a PE of the nonvolatile storage device. a threshold value determined by the number of times, or a threshold value determined according to the PE number of the nonvolatile storage device and a preset error threshold table; wherein the error threshold table is used to store the second PE time interval
  • each second PE frequency interval is a PE number or a frequency interval including at least two consecutive PE times.
  • the first optimal read voltage is an optimal read voltage determined according to the reference data and a pre-configured optimal read voltage determination rule.
  • the optimal read voltage determination rule is one of the following rules:
  • the reference data is data in at least one of the Blocks corresponding to each Retention time in the non-volatile storage device.
  • the data corresponding to each Retention time can be selected as the reference data to improve the evaluation accuracy of the power-down time.
  • the reference data is data in at least one of the Blocks corresponding to at least one Retention time in each Retention time packet; wherein the Retention time packet is And dividing the Retention time of all the blocks into the divided packets according to the length of the Retention time of all the blocks in the nonvolatile storage device.
  • the present application provides a power down time estimating apparatus for a nonvolatile memory device, the apparatus comprising: an optimal read voltage acquiring module for acquiring and recording reference data in the nonvolatile storage device a first optimal read voltage of a power down time, wherein the reference data is data in at least one logical block address sector Sector of the nonvolatile memory device determined according to a pre-configured selection rule;
  • An error number determining module configured to read the reference data according to the first optimal read voltage at a power-on time after the power-down time of the non-volatile storage device, to obtain an error of the reference data
  • the power-down duration determining module is configured to determine that the power-off duration of the non-volatile storage device is a first set duration when the number of errors is not greater than a set threshold.
  • the optimal read voltage acquisition module is further configured to acquire a second optimal read voltage of the reference data at the power-on time; the power-down duration determination module is further configured to use the first optimal read voltage and The second optimal read voltage calculates an optimal read voltage offset of the reference data; and determines a power-down duration of the nonvolatile memory device according to the optimal read voltage offset.
  • the power-down duration determining module is according to the optimal read voltage. Determining, when determining the power-down duration of the non-volatile storage device, specifically determining: determining an optimal read voltage corresponding to each of the at least two different Retention times at the power-down time The optimal read voltage corresponding to the Retention time is an optimal read voltage corresponding to the reference data corresponding to the Retention time; and one of the at least two different Retention times is used as a reference time.
  • Calculating, respectively, an optimal read voltage corresponding to each of the at least two different retention times, a difference between the optimal read voltage corresponding to the reference time, and the most The Retention time corresponding to the difference in the closest reading voltage offset and the reference time determine the power-down duration of the non-volatile storage device.
  • the power-down duration determining module has a Retention time corresponding to a difference that is closest to the optimal read voltage offset according to the difference, and the Determining, when the power-off duration of the non-volatile storage device is determined, a Retention time corresponding to a difference between the difference and the optimal read voltage offset, and the reference The difference in time is determined as the power-down duration of the non-volatile memory device.
  • the power-down duration determining module has a Retention time corresponding to a difference that is closest to the optimal read voltage offset according to the difference, and the Referring to the time, before determining the power-down duration of the non-volatile storage device, the method further includes: determining that the optimal read voltage offset is not greater than a maximum difference among the differences, and the optimal read voltage is biased The shift is not less than the smallest difference among the differences.
  • the power-down duration determination module is further used to:
  • Determining the power-down duration of the non-volatile storage device is a second set duration.
  • the power-down duration determining module determines, when determining the power-down duration of the non-volatile storage device according to the optimal read voltage offset, specifically: in the preset The first PE frequency interval in which the number of PEs of the nonvolatile storage device is located in the offline power down schedule; the voltage corresponding to the first PE frequency interval in the offline power down schedule is offset The Retention time corresponding to the voltage offset closest to the optimal read voltage offset is determined as the power-down duration of the non-volatile storage device; wherein the offline power-down schedule is used to store the first The relationship between the PE number interval, the Retention time, and the voltage offset.
  • Each first PE frequency interval is a PE number or a frequency interval including at least two consecutive PE times.
  • the error number of the reference data is an error bit of the reference data at the power-on time, or an error of the reference data at the power-on time a bit rate, or a number of error changes between the power-on time and the power-down time of the reference data.
  • the set threshold is a threshold determined according to a data size of the reference data, or is based on a PE of the nonvolatile storage device. a threshold value determined by the number of times, or a threshold value determined according to the PE number of the nonvolatile storage device and a preset error threshold table; wherein the error threshold table is used to store the second PE time interval
  • each second PE frequency interval is a PE number or a frequency interval including at least two consecutive PE times.
  • the first optimal read voltage is an optimal read voltage determined according to the reference data and a pre-configured optimal read voltage determination rule.
  • the optimal read voltage determination rule is one of the following rules: an average value of optimal read voltages of all sectors corresponding to the reference data at a power failure time And an average value of the optimal read voltage of the page Page where all the sectors corresponding to the reference data are located at the time of power down.
  • the reference data is data in at least one of the Blocks corresponding to each Retention time in the non-volatile storage device.
  • the reference data is data in at least one of the Blocks corresponding to at least one Retention time in each Retention time packet; wherein the Retention time packet is And dividing the Retention time of all the blocks into the divided packets according to the length of the Retention time of all the blocks in the nonvolatile storage device.
  • the present application provides a nonvolatile memory device including a processor and a memory; the memory stores therein computer program instructions; the processor is configured to run the computer program The instruction implements the power down time method as described in the first aspect or any one of the first aspects.
  • the present application provides a computer readable storage medium having stored therein computer program instructions that, when executed by a processor, cause the computer to perform the first aspect or the first A power down time method as described in any of the embodiments.
  • the present application provides a computer program product, the computer program comprising instructions, when executed on a computer, causing the computer to perform in any one of the first aspect or the first aspect The data migration method described.
  • the present application provides a computer program that, when run on a computer, causes the computer to perform the methods described in the various aspects above.
  • FIG. 1 is a flow chart showing a method of estimating a power down time of a nonvolatile memory device according to an embodiment of the invention
  • FIG. 2 shows a schematic diagram of a Retention time grouping table according to an embodiment of the present invention
  • FIG. 3 is a flow chart showing a method for estimating a power down time of a nonvolatile memory device according to another embodiment of the present invention.
  • 4a-4d are schematic diagrams showing the optimum read voltage bias of different blocks as a function of Retention time
  • FIG. 5 is a schematic flow chart showing determining a power-down duration according to an embodiment of the invention.
  • FIG. 6 is a schematic structural diagram of a power down time estimating apparatus of a nonvolatile memory device according to an embodiment of the present invention.
  • FIG. 7 is a block diagram showing the structure of a nonvolatile memory device according to an embodiment of the invention.
  • Block The smallest unit of the erase operation of a nonvolatile storage device.
  • a block contains several Pages.
  • Page The smallest unit of read/write operations inside a nonvolatile storage device.
  • a Page contains several logical address sectors (Sector).
  • LBA Logical Block Address
  • the minimum unit of the host performing read/write operations on the nonvolatile storage device is inconsistent with the minimum unit of reading/writing operations inside the nonvolatile storage device.
  • the non-volatile storage device needs to write the data to the cache first, and then write the data to the Page after the data in the cache reaches a Page size, or can also use the pre- The method of filling causes the write data to reach a Page size, and then writes the data to the Page; when the Host reads the nonvolatile storage device, if the read data corresponding to the read operation is smaller than a Page, The non-volatile storage device first reads out all the data in the Page where the data to be read is located, and returns the partial data requested by the Host in the read data to the Host.
  • Optimal read voltage In NAND flash, data is read by applying a voltage.
  • the NAND flash memory manufacturer provides the Read Offset function, which can read data with different read voltage positions.
  • the voltage at which the number of error data bits read is the least is called the optimal read voltage.
  • Optimal read voltage offset The data stored in the NAND flash memory may be offset as the Retention time changes.
  • An embodiment of the present invention provides a power-down time estimation method for a non-volatile storage device, by which it is determined whether the power-down of the non-volatile storage device is short according to the number of errors in the data in the non-volatile storage device. Time is lost (ie, the power-down duration is the first set duration).
  • the power-down duration is the first set duration.
  • it can be configured to enable the non-volatile storage device to complete the power-on recovery after the power-on recovery is completed by the reasonable configuration of the first set duration, and can directly respond to the input/output of the Host. (Input/Output, I/O) requests improve the efficiency of non-volatile storage devices.
  • the power-off duration of the non-volatile storage device is accurately estimated online according to the optimal read voltage offset of the reference data. Provides a reliable time base for data patrols based on Retention time, improving the reliability of data in non-volatile storage devices.
  • nonvolatile memory device of the embodiment of the present invention is a non-NAND (NAND) Flash-based nonvolatile memory device, which may be a nonvolatile memory device (such as a flash memory) or a nonvolatile memory.
  • a storage device for a storage device such as a NAND Flash-based SSD.
  • FIG. 1 is a schematic flowchart diagram of a power-down time method of a non-volatile storage device according to an embodiment of the present invention, where the method may be specifically performed by a controller (such as a main control chip) of a non-volatile storage device.
  • the power-down time estimation method in the embodiment of the present invention may mainly include the following steps:
  • Step S11 Acquire and record the first optimal read voltage of the reference data at the power-off time of the nonvolatile storage device.
  • the reference data is data in at least one sector of the nonvolatile storage device determined according to the pre-configured selection rule.
  • the pre-configured selection rule is configured according to the requirements of the actual application scenario.
  • the selection rule can be any of the following rules:
  • the specific data content of the reference data determined according to the pre-configured selection rule is not limited.
  • the determined reference data may be an application of the user written by the host to the non-volatile storage device.
  • the data can also be pre-stored in the non-volatile storage device for data dedicated to the power down time estimate.
  • the selection rule of the reference data may also be adjusted as needed.
  • the selection rule may be reconfigured according to a preset time interval.
  • the controller of the nonvolatile memory device acquires and records a first optimal read voltage of the selected reference data upon detecting a power failure.
  • the manner in which the controller detects that the nonvolatile storage device is powered down is prior art. For example, in one mode, when the controller detects that the operating voltage of the nonvolatile storage device is lower than the set voltage threshold, the controller determines that the device is not easy. The lost storage device is powered down, and the first optimal read voltage is obtained and recorded at this time.
  • the optimal read voltage in the embodiment of the present invention may be a specific voltage value, or may be a specific voltage value. It is the gear value of the optimal read voltage, and different gear values correspond to different voltage values.
  • the specific form of the optimal read voltage can be determined according to a configuration strategy of an optimal read voltage in the nonvolatile storage device, which is generally set by the manufacturer of the nonvolatile storage device when the device is shipped from the factory, for example, if not In the acquisition strategy of the optimal read voltage configured in the volatile storage device, the optimal read voltage obtained is the gear value of the voltage, and the first optimal read voltage and the second optimal read voltage are all corresponding to each other.
  • the first optimal read voltage may be an optimal read voltage determined according to the reference data and the pre-configured optimal read voltage determination rule.
  • the optimal read voltage is at least for one sector. If only one sector of data is included in the reference data, the optimal read voltage of the sector included in the reference data can be directly used as the first optimal read voltage. If the reference data includes data for two or more sectors, the optimal read voltage of the reference data can be determined according to a pre-configured optimal terminal voltage determination rule.
  • the optimal voltage determination rule can be configured according to actual application requirements.
  • the optimal read voltage determination rule may be one of the following two rules:
  • an average value of the optimal read voltages of the sectors can be calculated based on the optimal read voltage of each of all the sectors corresponding to the reference data, and the average value is used as the optimum read voltage of the reference data.
  • the average reading voltage of the pages of each of the sectors in all the sectors corresponding to the reference data may be calculated, and the average value of the optimal reading voltages of the pages may be calculated, and the average value is used as the reference data. Excellent reading voltage.
  • the determination method of the optimal read voltage of a Sector or a Page is the prior art.
  • the optimal read voltage of a Sector or a Page can be calculated based on a preset optimal read voltage calculation algorithm, or can be directly used in a non-volatile storage device (generally set when the NAND manufacturer generates the device).
  • the optimal read voltage acquisition or (read offset) Read Offset / Read Retry command is obtained.
  • the naming of the optimal read voltage acquisition command for obtaining the optimal read voltage of the device may be different, for example, the optimal configuration of some non-volatile storage devices.
  • the read voltage command is Auto Read Calibration, and some are different named commands that implement the same function.
  • the reference data may be data in at least one of the Blocks corresponding to each Retention time in the non-volatile storage device.
  • the reference data corresponding to each Retention time may be data in one Sector in the Block corresponding to the Retention time, or may be data in one Page in the Block, or may be in multiple Pages.
  • the data can also be a word line (WL) or data in multiple Pages of multiple WLs.
  • the reference data corresponding to the Retention time in the selected reference data may be any one of two or more blocks.
  • the data in the block may also include data in each of the two or more blocks.
  • the reference data may be data in at least one of the blocks corresponding to at least one Retention time in each Retention time packet, wherein the Retention time packet is according to all in the nonvolatile storage device.
  • the length of the Retention time of the block divides the Retention time of all Blocks into groups.
  • the embodiment of the present invention may firstly all the blocks according to the non-volatile storage device. Retention time, sorting the Retention time of all blocks according to the length of time, and dividing all the Retention times after sorting into N Retention time groups, N ⁇ 1. Because the Retention time grouping is divided according to the length of time, the difference between any two Retention times in the same Retention time packet is smaller than the difference between the two Retention times in different Retention time packets, that is, It is said that all Retention times in the same Retention time group are relatively close, and all Retention times in the group can be characterized by a Retention time in the group. Therefore, the reference data may select data in the Block corresponding to at least one Retention time in each Retention time packet.
  • the Retention time grouping table shown in FIG. 2 all the Retention times corresponding to all the blocks in the non-volatile storage device are divided into several Retention time packets according to the length of time, and the reference data may include the The data in the block corresponding to at least one Retention in each of the packets.
  • the Retention time grouping table of FIG. 2 it is assumed that there are 10 blocks in the non-volatile storage device. If the three groups are divided into three groups, the Retention time of the 10 blocks can be sorted in descending order, and the first three Retentions after sorting are sorted. The time is divided into a group, corresponding to the group with the longest Retention time shown in FIG. 2, and the 4th to 6th Retention time is divided into one group, corresponding to the group with the Retention time in FIG. 2, and the last four. The Retention time is divided into a group, which corresponds to the group with the shortest Retention time in Figure 2.
  • Step S12 At the power-on time after the power-off time of the non-volatile storage device, the reference data is read according to the first optimal read voltage, and the error number of the reference data is obtained.
  • Step S13 If the number of errors is not greater than the set threshold, determine that the power-off duration of the non-volatile storage device is the first set duration.
  • the power-down duration of the non-storable storage device can be estimated based on the number of errors of the reference data.
  • the power-down time of the device is short-time power-down, and the power-down duration can be It is determined as the first set time length T1.
  • the first set time length T1 may be set according to an empirical value, or may be determined experimentally.
  • the error number of the reference data may be the number of error bits of the reference data at the power-on time, or the error bit rate of the reference data at the power-on time, or the number of error changes between the power-on time and the power-down time of the reference data.
  • the error bit rate that is, the bit error rate, is the ratio of the number of bits reading the error when reading the reference data to the total number of bits of the read reference data.
  • the number of error changes is the difference between the number of error bits when the reference data is read according to the first optimum read voltage at the power-on time and the number of error bits when the power-down time reads the reference data according to the optimum read voltage.
  • the method may further include:
  • the reference data is read according to the first optimal read voltage, and the number of error bits of the reference data at the time of power-down is obtained.
  • the reference data is read according to the first optimal read voltage, and the error number of the reference data is obtained, including:
  • the reference data is read according to the first optimal read voltage, and the number of error bits of the reference data at the power-on time is obtained, and the power-on time reference is obtained according to the number of error bits at the power-on time and the number of error bits at the power-down time.
  • the number of error changes in the data.
  • the set threshold value may be a threshold value determined according to a data size of the reference data.
  • the set threshold value and the data size of the reference data may be positively correlated. This is because when the power-down time is the same, the larger the data amount of the reference data, that is, the larger the number of bits, the larger the number of errors in reading, and therefore, the data amount can be set according to the selected reference data.
  • the threshold is set or adjusted so that the judgment result based on the set threshold is more in line with the actual application scenario, and the power-down time estimation is more accurate.
  • the set threshold may be a threshold determined according to the number of PEs of the nonvolatile storage device.
  • different threshold values can be configured according to the number of times of erasing of the nonvolatile storage device, and the dynamic limit of the set threshold value can be realized.
  • the set threshold is positively correlated with the number of PEs. This is because when the power-down time is the same, the number of PEs of the non-volatile storage device, that is, the number of times the device has been erased, the more reliable the device is, and the more the number of errors when reading the same data. High, therefore, the above set threshold can be set or adjusted according to the number of PEs of the device to improve the accuracy of the power-down time estimation.
  • the set threshold may be a threshold determined according to the PE number of the nonvolatile storage device and the preset error threshold table, wherein the error threshold table is used to store the second PE.
  • the correspondence between the number of times interval and the set threshold value, each second PE number interval is a PE number or a time interval including at least two consecutive PE times.
  • an error threshold table may be pre-configured in the non-volatile storage device for recording the correspondence between the device PE time interval and the set threshold.
  • the controller of the non-volatile storage device can first determine the PE times interval corresponding to the number of PEs in the error threshold table according to the current number of PEs of the device, each time the power-down time is estimated.
  • the set threshold value corresponding to the determined PE number interval is set to the current set threshold value, and the dynamic adjustment of the set threshold value is realized.
  • FIG. 3 is a flow chart showing a method for estimating a power down time of a nonvolatile memory device according to another embodiment of the present invention. As shown in FIG. 3, the power-down time estimation method may mainly include the following steps:
  • Step S21 Acquire and record the first optimal read voltage of the reference data at the power-off time of the nonvolatile storage device.
  • Step S22 At the power-on time after the power-down time of the non-volatile storage device, the reference data is read according to the first optimal read voltage, and the error number of the reference data is obtained.
  • step S21 and the step S22 are the same two steps as the steps S11 and S12 in the method shown in FIG. 3.
  • the specific description of the related contents in the step S21 and the step S22 refer to the above step S11 and the step.
  • the detailed description of the corresponding parts in S12 will not be repeated here for brevity.
  • Step S23 If the number of errors is greater than the set threshold, the second optimal read voltage of the reference data at the power-on time is obtained.
  • Step S24 Calculate an optimal read voltage offset of the reference data according to the first optimal read voltage and the second optimal read voltage, and determine a power-down duration of the nonvolatile storage device according to the optimal read voltage offset.
  • the power-off time of the non-volatile storage device is longer, and the optimal read voltage offset corresponding to the reference data during the power-down period may be used.
  • the shift ie, the difference between the second optimum read voltage at the power-on time and the optimum read voltage at the power-down time determines a longer power-down duration T2.
  • FIGS. 4a-4d respectively show four blocks (A, B) in an SSD with a PE lifetime (maximum number of times the device can be erased) of 3000 times at a temperature of 55 degrees Celsius (° C.).
  • C and D respectively correspond to the change of the optimal read voltage offset under different Retention time changes of the four block identifiers
  • the abscissa represents time
  • the unit is hour
  • the ordinate represents the gear value of the optimal read voltage.
  • 1-9 of the abscissa in the figure correspond to the Retention time of 0 hours, 6 hours, 12 hours, 18 hours, 24 hours, 31 hours, 93 hours, 185 hours, and 397 hours
  • the ordinate indicates each Retention.
  • the optimal read voltage corresponding to the time.
  • the optimal read voltage offset of each block changes monotonously. For example, for Block A, when the Retention time changes to 6 hours (from 1 to 2), The optimal read voltage offset is -2 or -8-(-6). When the Retention time changes from 12 hours to 24 hours (from 1 to 2/3/4/5), the optimal read voltage is biased. Move to -4, ie -10 (-6), when the Retention time changes from 31 hours to 93 hours (from 1 to 6 or 7), the optimal read voltage offset is -6, visible, optimal The absolute value of the read voltage offset increases monotonically with the increase of the Retention time. Therefore, the optimal read voltage offset can be used more accurately for the Retention time variation of the device.
  • determining the power-down duration of the non-volatile storage device according to the optimal read voltage offset including:
  • the power-down duration of the non-volatile storage device is determined according to the Retention time and the reference time corresponding to the difference between the difference and the optimal read voltage offset.
  • the reference data is data in the Sector corresponding to at least two different Retention times, that is, the reference data includes at least two Blocks with different Retention times. Medium data.
  • the optimal read voltage of the reference data As the Retention time changes, the optimal read voltage of the reference data also changes. Therefore, the optimal read voltage offset of the reference data during the power-down period (from the power-down time to the power-on time after the power-down) can characterize the reference.
  • the change in the retention time of the data which corresponds to the power down time of the nonvolatile storage device.
  • the difference between the optimal read voltage corresponding to each Retention time and the optimal read voltage corresponding to the reference time can be used to characterize the power-down duration corresponding to the optimal read voltage offset, that is, according to the difference and the optimal value.
  • the Retention time and the reference time corresponding to the difference in reading the closest voltage offset determine the power-down duration of the nonvolatile storage device.
  • determining the power-down duration of the non-volatile storage device according to the Retention time and the reference time corresponding to the difference between the difference and the optimal read voltage offset including:
  • the difference between the Retention time and the reference time corresponding to the difference between the difference and the optimal read voltage offset is determined as the power-down duration of the nonvolatile storage device.
  • the optimal read voltage of the power-down time reference data is V_poff
  • the optimal read voltage of the power-on time reference data is V_on
  • the optimal read voltage offset delta is V_on-V_poff.
  • the reference data includes k blocks of different Retention times at the time of power down
  • the reference time is ret_1
  • the optimal read voltage of the power-down time corresponding to ret_1 is V_ret1
  • k retention times including the reference number (including the reference number) Retention time
  • the difference between the optimal read voltage and V_ret1 at the time of power down is ⁇ 1, ⁇ 2, ..., ⁇ k, respectively, and the difference between ⁇ 1, ⁇ 2, ..., ⁇ k and delta is the closest.
  • the power loss time of the power-down time is ret_x
  • the power-down time T2 can be determined as ret_x-ret_1.
  • the method before determining the power-down duration of the non-volatile storage device according to the Retention time and the reference time corresponding to the difference between the difference and the optimal read voltage offset, the method further includes:
  • the optimal read voltage offset is not greater than the maximum difference in the difference, and the optimal read voltage offset is not less than the smallest difference among the differences.
  • the difference from the optimal read voltage offset is too large, that is, the optimal read voltage offset is greater than all the differences.
  • the maximum or optimal read voltage offset is less than the minimum of all differences, resulting in a problem that the estimated time of the power down time is too large.
  • the optimal read voltage offset is in the calculated total difference Within the range of the voltage range covered, that is, not less than the minimum difference and not greater than the maximum difference, if the optimal read voltage offset is not less than the minimum difference and not greater than the maximum difference, it indicates an offset from the optimal read voltage.
  • the difference between the closest difference and the optimal read voltage is within a reasonable range, and the power-down duration of the device can be determined based on the Retention time and the reference time corresponding to the difference.
  • the estimation method of the power down time may also be include:
  • Determining the power-down duration of the non-volatile storage device is a second set duration.
  • the optimal read voltage offset is greater than the maximum difference in the difference, or the optimal read voltage offset is less than the smallest difference among the differences, it means that the optimal read voltage is not covered by all the above differences.
  • the difference between the difference and the optimal read voltage offset is too large, resulting in the Retention time and reference time corresponding to the difference.
  • the preset second set duration can be used as the power-down duration.
  • the second set duration may be set according to an empirical value, an experimental value, or according to a data movement strategy in the configured non-volatile storage device.
  • the second set duration may be set or adjusted according to the size of the pre-configured data shift threshold. If the threshold of the data shift is small, the frequency of the device data shift in the non-volatile storage device is high. The reliability of the data is relatively high.
  • the second set duration can be set to a relatively large value to prevent the second set duration from being set too small, so that the data to be moved cannot be moved in time, resulting in data. The reliability is at risk.
  • the reference data is data in a Sector corresponding to at least two different Retention times
  • the difference between the maximum value and the minimum value of the Retention time in at least two different Retention times is less than
  • the fixed value determines the power-down duration of the non-volatile storage device according to the optimal read voltage offset, including:
  • the Retention time corresponding to the voltage offset closest to the optimal read voltage offset is determined as the power-down of the non-volatile storage device. duration.
  • the offline power down schedule is used to store the association relationship between the first PE frequency interval, the Retention time, and the voltage offset.
  • Each first PE frequency interval is a PE number or a frequency interval including at least two consecutive PE times. .
  • the Retention time of all blocks in the non-volatile storage device may be basically the same, that is, the maximum value of the Retention time of all the blocks.
  • the difference from the minimum value is less than the set value. In this case, it can be considered that there is only one Retention time for all the blocks in the device.
  • the offline power-down schedule of the relationship between the interval, the Retention time, and the voltage offset is used to determine the power-down duration of the block in the special scenario for the Retention time of the block of the non-volatile storage device.
  • each of the first PE times in the offline power down schedule may be a time interval or a PE number.
  • the available storage resources may be based on the nonvolatile storage device.
  • Configure the power down schedule For example, if the storage space of the device is relatively large, an offline power-down schedule for storing the association relationship between the number of PEs, the retention time, and the voltage offset may be configured with one PE number as an interval.
  • the first PE number interval in which the number of PEs of the non-volatile storage device is located is the number of PEs that are closest to the number of PEs in the offline power-down schedule, and the offline power-down schedule and the search are performed.
  • the Retention time corresponding to the voltage offset closest to the optimal read voltage offset is determined as the power-down duration of the nonvolatile memory device. If the device space is relatively small, the offline power down schedule may be established in an interval including at least two PE times.
  • a schematic structure of an offline power down schedule is shown in Table 1.
  • Table 1 the table shows the relationship between the number of M PEs, the change of N retention times, and the voltage offset.
  • the time in the table indicates the change of the Retention time, and the time corresponds to the v11, V12, ... ..., vMN represents the voltage offset.
  • v11 indicates that the number of PEs is the voltage offset corresponding to the change of PE1 and Retention time to Retention1.
  • the optimal read voltage deviation from the reference data can be found in the row where the PEM is located.
  • the optimal read voltage offset of the reference data is closest to the optimal read voltage offset vM2 in Table 1, it can be determined that the device's power-down duration is Retention2.
  • the power-down time is added to the system Retention timeline of the device to complete the update of the system Retention timeline, that is, the Retention time of each block in the device is updated when the power is lost.
  • the Retention time plus the estimated power down duration.
  • the controller can start responding to the host's I/O (write/read) operation request.
  • the Retention time in the control device is greater than the set data movement threshold. The data in the value of the block is moved.
  • the power-down time estimation method of the nonvolatile memory device can read the reference data by using the optimal read voltage when the reference data is powered off, and obtain the data reading when the power is turned on again after the power-down is set.
  • the number of errors because the number of errors in data reading is related to the length of power-down, therefore, it is possible to determine whether the device is short-term power-down according to the number of errors, and determine the device when the power-down duration is short-time power-down.
  • the power-down duration is the configured value (the first set duration). If it is determined that the device is not short-lived, the device's power-down duration is further estimated online based on the optimal read voltage offset of the reference data during power-down.
  • the solution of the embodiment of the present invention can effectively improve the accuracy of the power failure time estimation of the nonvolatile storage device.
  • the device when the device is short-circuited, the device may be repeatedly erased due to the estimated length of the power-down, and the number of erasable devices is reduced, and the lifetime is shortened.
  • the data patrol mechanism of the device can be instructed to prevent the data patrol validity from being reduced due to the short time estimation when the device is not short-lived, and the data that needs to be moved cannot be timely performed. Data migration causes problems in data reliability in the device and improves data reliability.
  • an embodiment of the present invention further provides a power down time estimating apparatus for a nonvolatile storage device.
  • the power-down time estimating device 600 may mainly include an optimal read voltage obtaining module 610, an error number determining module 620, and a power-down duration determining module 630.
  • the optimal read voltage acquisition module 610 is configured to acquire and record a first optimal read voltage of the reference data at a power-off time of the nonvolatile storage device, where the reference data is a non-volatile determined according to a pre-configured selection rule. At least one logical block address of the storage device. The data in the sector Sector.
  • the error number determining module 620 is configured to read the reference data according to the first optimal read voltage at a power-on time after the power-off time of the non-volatile storage device, to obtain an error number of the reference data;
  • the power-down duration determining module 630 is configured to determine that the power-off duration of the non-volatile storage device is the first set duration when the number of errors is not greater than the set threshold.
  • the power-down time estimating apparatus 600 may correspond to the execution body of the power-down time estimating method according to the embodiment of the present application shown in FIG. 1, and may specifically implement a controller or a processor. Wait.
  • the power-down time estimation device 600 For a detailed description of the operation and/or function of the modules of the power-down time estimation device 600, reference may be made to the description of the power-down time estimation method in the embodiment of the present application, which is not described herein for brevity.
  • the reference data may be data in at least one of the Blocks corresponding to each Retention time in the non-volatile storage device.
  • the reference data may be data in at least one of the blocks corresponding to at least one Retention time in each Retention time packet; wherein the Retention time packet is according to all in the nonvolatile storage device.
  • the length of the Retention time of the block divides the Retention time of all Blocks into groups.
  • the error number of the reference data may be the number of error bits of the reference data at the power-on time, or the error bit rate of the reference data at the power-on time, or the reference data at the power-on time The number of error changes between electrical moments.
  • the threshold value may be a threshold value determined according to a data size of the reference data, or a threshold value determined according to the PE times of the nonvolatile storage device, or a threshold value determined according to a PE number of the nonvolatile storage device and a preset error threshold table; wherein the error threshold table is configured to store a correspondence between the second PE number interval and the set threshold, each second The PE frequency interval is a PE number or a frequency interval including at least two consecutive PE times.
  • the first optimal read voltage is an optimal read voltage determined according to reference data and a pre-configured optimal read voltage determination rule.
  • the optimal read voltage determination rule is one of the following rules:
  • the optimal read voltage acquisition module 610 is also used to obtain the reference data at the power-on time after the power-down time of the non-volatile storage device. The second optimal read voltage at power-on time.
  • the power-down duration determining module 630 is further configured to calculate an optimal read voltage offset of the reference data according to the first optimal read voltage and the second optimal read voltage; and determine the non-volatile storage according to the optimal read voltage offset The power down time of the device.
  • the power-down time estimating device 600 in this embodiment may correspond to the execution body of the power-down time estimating method according to the embodiment of the present application shown in FIG. 3.
  • the description of the power-down time estimation method in the embodiment of the present application which is not described herein for brevity.
  • the power-down duration determining module 630 determines that the non-volatile storage device is off according to the optimal read voltage offset.
  • the electricity is long, it is specifically used to:
  • an optimal read voltage corresponding to each Retention time in at least two different Retention times at a power failure time Determining an optimal read voltage corresponding to each Retention time in at least two different Retention times at a power failure time, wherein an optimal read voltage corresponding to the Retention time is an optimal corresponding to the reference data corresponding to the Retention time Read voltage
  • the power-down duration of the non-volatile storage device is determined according to the Retention time and the reference time corresponding to the difference between the difference and the optimal read voltage offset.
  • the power-down duration determining module 630 determines the power-down of the non-volatile storage device according to the Retention time and the reference time corresponding to the difference between the difference and the optimal read voltage offset. When the time is long, it is specifically used to:
  • the difference between the Retention time and the reference time corresponding to the difference between the difference and the optimal read voltage offset is determined as the power-down duration of the nonvolatile storage device.
  • the power-down duration determining module 630 determines the power-down of the non-volatile storage device according to the Retention time and the reference time corresponding to the difference between the difference and the optimal read voltage offset. Before the time, it is also used to:
  • the optimal read voltage offset is not greater than the maximum difference in the difference, and the optimal read voltage offset is not less than the smallest difference among the differences.
  • the power-down duration determining module 630 is further used. :
  • Determining the power-down duration of the non-volatile storage device is a second set duration.
  • the power-down duration determining module 630 is configured to: when determining the power-down duration of the non-volatile storage device according to the optimal read voltage offset, specifically:
  • the Retention time corresponding to the voltage offset closest to the optimal read voltage offset is determined as the power-down duration of the non-volatile storage device.
  • the offline power down schedule is used to store the association relationship between the first PE frequency interval, the Retention time, and the voltage offset.
  • Each first PE frequency interval is a PE number or a frequency interval including at least two consecutive PE times. .
  • the power-down time estimating apparatus 600 may correspond to the execution bodies of the power-down time estimating method according to the embodiments of the present invention, respectively, and the respective modules in the power-down time estimating apparatus 600.
  • Operation and/or Function of the Implementation In order to implement the corresponding flow of the power-down time estimation method of the embodiments of the present invention, the specific operation and or function implementation of each module in the power-down time estimation device 600 can be referred to the foregoing embodiments of the present invention. The corresponding steps in the adjustment method are not repeated here for brevity.
  • the nonvolatile memory device 700 can mainly include a processor 701, a memory 702, and a communication interface 703.
  • the memory 702 is configured to store executable computer program code, and the processor 701 reads the memory stored in the memory 702.
  • the computer program code runs a computer program corresponding to the computer program code for performing the power down time estimation method of any of the embodiments of the present application.
  • the communication interface 703 is for communicating with an external device, and the nonvolatile storage device 700 may further include a bus 704 for connecting the processor 701, the memory 702, and the communication interface 703 to pass the processor 701, the memory 702, and the communication interface 703.
  • the bus 704 communicates with each other.
  • the electronic device 700 may correspond to an execution subject of the power down time estimation method according to an embodiment of the present application.
  • the embodiment of the present invention further provides a computer readable storage medium.
  • the readable storage medium stores computer program instructions.
  • the power down time estimation in any embodiment of the present invention may be implemented. method.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

一种非易失存储设备(700)的掉电时间估计方法,所述方法应用于非易失存储设备(700)中,该方法包括:获取并记录参考数据在非易失存储设备(700)的掉电时刻的第一最优读电压(S11),参考数据为根据预配置的选取规则所确定的非易失存储设备(700)的至少一个逻辑块地址扇区Sector中的数据;在非易失存储设备(700)的所述掉电时刻之后的上电时刻,根据第一最优读电压读取参考数据,得到参考数据的出错数(S12);若所述出错数不大于设定门限值,则确定所述非易失存储设备(700)的掉电时长为第一设定时长(S13)。通过本方法,能够根据参考数据在上电时的读取的出错时,识别出非易失存储设备(700)在发生掉电至再次上电恢复期间,发生的是否为短时掉电,提高短时掉电时的响应效率。

Description

非易失存储设备的掉电时间估计方法和装置 技术领域
本发明涉及数据处理技术领域,具体涉及一种非易失存储设备的掉电时间估计方法和装置。
背景技术
固态硬盘(Solid State Disk,SSD)的数据保持(Retention)时间是指数据在闪存(Flash)中的保存时间,即从数据存入到数据擦除的时间。一般来说,随着Retention时间的增加,数据的出错比特数会变多。这时就需要依赖SSD内部的数据巡检机制来保证数据的准确性,数据巡检通过对Flash中Retention时间大于设定门限值的数据进行搬移,为数据可靠性提供保障。
SSD在系统设计时都会考虑掉电保护机制,以保护系统在异常断电后数据没有异常丢失,提供系统的可靠性。SSD的掉电保护和相应的上电恢复,是产品竞争力的差异特性之一。但SSD在掉电期间,没有机制来记录掉电时间。SSD恢复上电后,系统中记录的数据Retention时间不再准确,数据巡检不能有效识别并搬移Retention时间大于设定门限值的数据,导致数据可靠性存在风险。因此,需要对SSD的掉电时间进行估计。目前对于掉电时间的估计方案,主要有以下几种:
一种是通过静态配置掉电时间T。但该方案由于T只对应一种掉电时间,实际场景下掉电时间可能为任意值,静态配置不能准确反映真实掉电时间。一种是利用主机(Host)时间估计掉电时间。但由于Host时间存在不确定性,如果Host时间在SSD掉电期间被改过,估计出的掉电时长就不能准确反映掉电的时长,甚至会出现负值。
可见,现有的掉电时间估计方案都不能够准确的估计出SSD掉电器件的物理时间,所以不能提供准确的掉电等效时间。
发明内容
本申请提供了一种非易失存储设备的掉电时间估计方法和装置,能够根据非易失存储设备中数据的出错数确定出非易失存储设备的掉电时间为短时掉电即掉电时长为第一设定时长。
结合第一方面,本申请提供了一种非易失存储设备的掉电时间估计方法,所述方法应用于非易失存储设备中,所述方法包括:获取并记录参考数据在所述非易失存储设备的掉电时刻的第一最优读电压,其中,所述参考数据为根据预配置的选取规则所确定的所述非易失存储设备的至少一个逻辑块地址扇区(Sector)中的数据;在所述非易失存储设备的所述掉电时刻之后的上电时刻,根据所述第一最优读电压读取所述参考数据,得到所述参考数据的出错数;若所述出错数不大于设定门限值,则确定所述非易失存储设备的掉电时长为第一设定时长。
本申请中,根据非易失存储设备掉电时刻的最优读电压,读取在掉电时刻之后的上电 时刻的设备中的参考数据,得到参考数据的出错数,基于该出错数与预配置的出错门限值(设定门限值),能够确定出非易失存储设备是否发生了短时掉电。在确定设备发生的是短时掉电时,能够通过第一设定时长的合理配置,使非易失存储设备完成上电恢复后,无需要进行数据巡检,提高了非易失存储设备的响应效率。
结合第一方面,在一种可能的实施方式中,若所述出错数大于所述设定门限值,在所述非易失存储设备的所述掉电时刻之后的上电时刻,所述方法还包括:获取所述参考数据在所述上电时刻的第二最优读电压;根据所述第一最优读电压和所述第二最优读电压计算所述参考数据的最优读电压偏移;根据所述最优读电压偏移确定所述非易失存储设备的掉电时长。
本申请中,在确定出非易失存储设备发生非短时掉电时,能够根据参考数据的最优读电压偏移准确的在线估计出非易失存储设备的掉电时长,为基于Retention时间的数据巡检提供可靠的时间依据,保障了非易失存储设备中数据的可靠性。
结合第一方面,在一种可能的实施方式中,若所述参考数据为至少两个不同的Retention时间所对应的Sector中的数据,所述根据所述最优读电压偏移确定所述非易失存储设备的掉电时长,包括:确定在所述掉电时刻的、所述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,其中,所述Retention时间所对应的最优读电压为所述Retention时间对应的参考数据所对应的最优读电压;将所述至少两个不同的Retention时间中的一个Retention时间作为参考时间,分别计算所述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,与所述参考时间所对应的最优读电压的差值;根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长。
本申请中,若选取的参考数据所包括的数据对应至少两个不同的Retention时间,在选定其中一个Retention时间作为参考时间时,上述最优读电压的差值中与参考时间对应的最优读电压偏移最接近的差值所对应差值,则可以表征该最优读电压偏移对应的掉电时长,因此根据差值中与最优读电压偏移最接近的差值所对应的Retention时间和参考时间,确定出非易失存储设备的掉电时长。
结合第一方面,在一种可能的实施方式中,所述根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长,包括:将所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间与所述参考时间的差值,确定为所述非易失存储设备的掉电时长。
结合第一方面,在一种可能的实施方式中,所述根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长之前,还包括:确定所述最优读电压偏移不大于所述差值中的最大差值,且所述最优读电压偏移不小于所述差值中的最小差值。
本申请中,通过首先确定所述最优读电压偏移不大于所述差值中的最大差值,且所述最优读电压偏移不小于所述差值中的最小差值,避免了上述所有差值与最优读电压偏移相差过大,即最优读电压偏移大于所有差值中的最大值或者最优读电压偏移小于所有差值中的最小值,导致掉电时间估计偏差过大的问题。
结合第一方面,在一种可能的实施方式中,若所述最优读电压偏移大于所述差值中的最大差值,或所述最优读电压偏移小于所述差值中的最小差值,所述方法还包括:确定所述非易失存储设备的掉电时长为第二设定时长。
结合第一方面,在一种可能的实施方式中,若所述参考数据为至少两个不同的Retention时间所对应的Sector中的数据,且所述至少两个不同的Retention时间中Retention时间的最大值与最小值的差值小于设定值,所述根据所述最优读电压偏移确定所述非易失存储设备的掉电时长,包括:在预置的离线掉电时间表中查找所述非易失存储设备的已PE次数所在的第一PE次数区间;将所述离线掉电时间表中与所述第一PE次数区间所对应的电压偏移中,与所述最优读电压偏移最接近的电压偏移所对应的Retention时间确定为所述非易失存储设备的掉电时长;其中,所述离线掉电时间表用于存储第一PE次数区间、Retention时间和电压偏移的关联关系,每个第一PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
结合第一方面,在一种可能的实施方式中,所述参考数据的出错数为所述参考数据在所述上电时刻的出错比特数,或者所述参考数据在所述上电时刻的出错比特率,或者所述参考数据在所述上电时刻与所述掉电时刻之间的出错变化数。
结合第一方面,在一种可能的实施方式中,所述设定门限值是根据所述参考数据的数据大小确定的门限值,或者,是根据所述非易失存储设备的已PE次数确定的门限值,或者,是根据所述非易失存储设备的已PE次数与预置的出错门限表确定的门限值;其中,所述出错门限表用于存储第二PE次数区间与设定门限值的对应关系,每个第二PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
结合第一方面,在一种可能的实施方式中,所述第一最优读电压为根据所述参考数据和预配置的最优读电压确定规则确定的最优读电压。
结合第一方面,在一种可能的实施方式中,所述最优读电压确定规则为以下规则的一种:
所述参考数据所对应的所有Sector在掉电时刻的最优读电压的平均值、所述参考数据所对应的所有Sector所在的页Page在掉电时刻的最优读电压的平均值。
结合第一方面,在一种可能的实施方式中,所述参考数据为所述非易失存储设备中的每个Retention时间所对应的Block中的至少一个Sector中的数据。
本申请中,可以通过选择覆盖每一个Retention时间所对应的数据作为参考数据,以提高掉电时间的评估准确性。
结合第一方面,在一种可能的实施方式中,所述参考数据为每个Retention时间分组中至少一个Retention时间所对应的Block中的至少一个Sector中的数据;其中,所述Retention时间分组为根据所述非易失存储设备中所有Block的Retention时间的长短将所述所有Block的Retention时间进行划分后的分组。
结合第二方面,本申请提供了一种非易失存储设备的掉电时间估计装置,所述装置包括:最优读电压获取模块,用于获取并记录参考数据在所述非易失存储设备的掉电时刻的第一最优读电压,其中,所述参考数据为根据预配置的选取规则所确定的所述非易失存储设备的至少一个逻辑块地址扇区Sector中的数据;
出错数确定模块,用于在所述非易失存储设备的所述掉电时刻之后的上电时刻,根据所述第一最优读电压读取所述参考数据,得到所述参考数据的出错数;掉电时长确定模块,用于在所述出错数不大于设定门限值时,确定所述非易失存储设备的掉电时长为第一设定时长。
结合第二方面,在一种可能的实施方式中,若所述出错数大于所述设定门限值,在所述非易失存储设备的所述掉电时刻之后的上电时刻,所述最优读电压获取模块,还用于获取所述参考数据在所述上电时刻的第二最优读电压;所述掉电时长确定模块,还用于根据所述第一最优读电压和所述第二最优读电压计算所述参考数据的最优读电压偏移;根据所述最优读电压偏移确定所述非易失存储设备的掉电时长。
结合第二方面,在一种可能的实施方式中,若所述参考数据为至少两个不同的Retention时间所对应的Sector中的数据,所述掉电时长确定模块在根据所述最优读电压偏移确定所述非易失存储设备的掉电时长时,具体用于:确定在所述掉电时刻的、所述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,其中,所述Retention时间所对应的最优读电压为所述Retention时间对应的参考数据所对应的最优读电压;将所述至少两个不同的Retention时间中的一个Retention时间作为参考时间,分别计算所述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,与所述参考时间所对应的最优读电压的差值;根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长。
结合第二方面,在一种可能的实施方式中,所述掉电时长确定模块在根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长时,具体用于:将所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间与所述参考时间的差值,确定为所述非易失存储设备的掉电时长。
结合第二方面,在一种可能的实施方式中,所述掉电时长确定模块在根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长之前,还用于:确定所述最优读电压偏移不大于所述差值中的最大差值,且所述最优读电压偏移不小于所述差值中的最小差值。
结合第二方面,在一种可能的实施方式中,若所述最优读电压偏移大于所述差值中的最大差值,或所述最优读电压偏移小于所述差值中的最小差值,所述掉电时长确定模块还用于:
确定所述非易失存储设备的掉电时长为第二设定时长。
结合第二方面,在一种可能的实施方式中,若所述参考数据为至少两个不同的Retention时间所对应的Sector中的数据,且所述至少两个不同的Retention时间中Retention时间的最大值与最小值的差值小于设定值,所述掉电时长确定模块在根据所述最优读电压偏移确定所述非易失存储设备的掉电时长时,具体用于:在预置的离线掉电时间表中查找所述非易失存储设备的已PE次数所在的第一PE次数区间;将所述离线掉电时间表中与所述第一PE次数区间所对应的电压偏移中,与所述最优读电压偏移最接近的电压偏移所对应的Retention时间确定为所述非易失存储设备的掉电时长;其中,所述离线掉电时间表用于存储第一PE次数区间、Retention时间和电压偏移的关联关系,每个第一PE次数区间为一个 PE次数或者为包括至少两个连续的PE次数的次数区间。
结合第二方面,在一种可能的实施方式中,所述参考数据的出错数为所述参考数据在所述上电时刻的出错比特数,或者所述参考数据在所述上电时刻的出错比特率,或者所述参考数据在所述上电时刻与所述掉电时刻之间的出错变化数。
结合第二方面,在一种可能的实施方式中,所述设定门限值是根据所述参考数据的数据大小确定的门限值,或者,是根据所述非易失存储设备的已PE次数确定的门限值,或者,是根据所述非易失存储设备的已PE次数与预置的出错门限表确定的门限值;其中,所述出错门限表用于存储第二PE次数区间与设定门限值的对应关系,每个第二PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
结合第二方面,在一种可能的实施方式中,所述第一最优读电压为根据所述参考数据和预配置的最优读电压确定规则确定的最优读电压。
结合第二方面,在一种可能的实施方式中,所述最优读电压确定规则为以下规则的一种:所述参考数据所对应的所有Sector在掉电时刻的最优读电压的平均值、所述参考数据所对应的所有Sector所在的页Page在掉电时刻的最优读电压的平均值。
结合第二方面,在一种可能的实施方式中,所述参考数据为所述非易失存储设备中的每个Retention时间所对应的Block中的至少一个Sector中的数据。
结合第二方面,在一种可能的实施方式中,所述参考数据为每个Retention时间分组中至少一个Retention时间所对应的Block中的至少一个Sector中的数据;其中,所述Retention时间分组为根据所述非易失存储设备中所有Block的Retention时间的长短将所述所有Block的Retention时间进行划分后的分组。
结合第三方面,本申请提供了一种非易失存储设备,所述非易失存储设备包括处理器和存储器;所述存储器中存储有计算机程序指令;所述处理器用于运行所述计算机程序指令,实现如第一方面或第一方面的任一种实施方式中所述的掉电时间方法。
结合第四方面,本申请提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序指令,当所述计算机程序指令被处理器运行时,使得计算机执行如第一方面或第一方面的任一种实施方式中所述的掉电时间方法。
结合第五方面,本申请提供了一种计算机程序产品,所述计算机程序包含指令,当该指令在计算机上运行时,使得计算机执行如第一方面或第一方面的任一种实施方式中所述的数据迁移方法。
结合第六方面,本申请提供了一种计算机程序,当该计算机程序在计算机上运行时,使得计算机执行上述各方面所述的方法。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了根据本发明一实施例的一种非易失存储设备的掉电时间估计方法的流程示 意图;
图2示出了根据本发明实施例的一种Retention时间分组表的示意图;
图3示出了根据本发明是另一实施例的一种非易失存储设备的掉电时间估计方法的流程示意图;
图4a-图4d示出了不同Block的最优读电压偏压随Retention时间变化的示意图;
图5示出了根据本发明一实施例确定掉电时长的流程示意图;
图6示出了根据本发明实施例的一种非易失存储设备的掉电时间估计装置的结构示意图;
图7示出了根据本发明实施例的一种非易失存储设备的结构示意图。
具体实施方式
为了更好的理解本发明实施例的方案,下面首先对本发明实施例中所涉的相关技术术语进行说明。
为了更好的理解本发明实施例,首先对本发明实施例中所涉及的相关技术术语进行说明。
Block:为非易失存储设备的擦除操作的最小单元,一个Block包含若干个Page。
Page:为非易失存储设备内部的读/写操作的最小单元,一个Page包含若干个逻辑地址扇区(Sector)。
Sector:Host是通过逻辑块地址(Logical Block Address,LBA)访问非易失存储设备的,每个LBA代表着一个Sector,即Sector为Host对非易失存储设备进行数据读/写操作的最小单元。
可见,Host对非易失存储设备进行读/写操作的最小单元与非易失存储设备内部进行读/写操作的最小单元是不一致的,在Host对非易失存储设备进行写操作时,在Host写入的数据小于一个Page时,非易失存储设备需要将数据先写入到缓存中,在缓存中的数据的达到一个Page大小后再将数据写入到Page中,或者还可以采用预填充的方式使写入数据达到一个Page大小,再将数据写入到Page中;在Host对非易失存储设备进行读操作时,若该读操作所对应的读数据的大小小于一个Page时,非易失存储设备会首先将待读取的数据所在的Page中的数据全部读出,再将读出的数据中Host所请求的部分数据返回给Host。
最优读电压:在NAND闪存中,数据通过施加电压读出。NAND闪存厂商提供了Read Offset功能,即可用不同的读电压档位来读取数据,其中读出的数据出错比特数最少的某档电压被称为最优读电压。
最优读电压偏移:在NAND闪存存储的数据,随着Retention时间的变化,数据的最优读电压可能发生偏移。
本发明一实施例提供了一种非易失存储设备的掉电时间估计方法,通过该方法,能够依据非易失存储设备中数据的出错数确定出非易失存储设备的掉电是否为短时间掉电(即掉电时长为第一设定时长)。在确定设备发生的是短时掉电时,能够通过第一设定时长的合理配置,使非易失存储设备完成上电恢复后,无需要进行数据巡检,可以直接响应Host的输入/输出(Input/Output,I/O)请求,提高了非易失存储设备的响应效率。
本发明另一实施例中,能够在确定出非易失存储设备发生非短时掉电时,根据参考数据的最优读电压偏移准确的在线估计出非易失存储设备的掉电时长,为基于Retention时间的数据巡检提供可靠的时间依据,提升非易失存储设备中数据的可靠性。
可以理解的是,本发明实施例的非易失存储设备为基于与非门(NAND)Flash的非易失存储设备,可以是非易失存储器件(如闪存存储器)、也可以是基于非易失存储器件的存储设备,如基于NAND Flash的SSD。
图1示出了本发明实施例中一种非易失存储设备的掉电时间方法的流程示意图,该方法具体可以由非易失存储设备的控制器(如主控芯片)执行。如图1所示,本发明实施例的掉电时间估计方法主要可以包括以下步骤:
步骤S11:获取并记录参考数据在非易失存储设备的掉电时刻的第一最优读电压。
其中,参考数据为根据预配置的选取规则所确定的非易失存储设备的至少一个Sector中的数据。
本发明实施例中,上述预配置的选取规则是可以根据实际应用场景的需要进行配置的。例如,在本发明的一个可选实施例中,该选取规则可以是以下规则中的任一种:
预先指定的至少一个Sector中的数据、掉电时刻的Retention时间在预设时间范围的至少一个Sector中的数据。
可以理解的是,上述根据预配置的选取规则所确定的参考数据的具体数据内容是不受限定的,例如,所确定的参考数据可以是Host写入到非易失存储设备中的用户的应用数据,也可以预存储在非易失存储设备中的专门用于掉电时间估计的数据。其中,参考数据的选取规则还可以根据需要进行调整,例如,可以按照预设时间间隔对选取规则进行重新配置。
非易失存储设备的控制器在检测到发生掉电时,获取并记录所选取的参考数据的第一最优读电压。其中,控制器检测非易失存储设备掉电的方式为现有技术,例如,一种方式为控制器在检测到非易失存储设备的工作电压低于设定电压阈值时,则判断非易失存储设备发生了掉电,此时会获取并记录上述第一最优读电压。
需要说明的是,本发明实施例中的最优读电压,包括上述第一最优读电压、以及下文中的第二最优读电压等最优读电压,可以是具体的电压值,也可以是最优读电压的档位值,不同的档位值对应于不同的电压值。最优读电压的具体形式是可以根据非易失存储设备中最优读电压的配置策略确定的,该配置策略一般是由非易失存储设备的厂商在设备出厂时所设置的,例如,若非易失存储设备中所配置的最优读电压的获取策略中,获取到的最优读电压为电压的档位值,则第一最优读电压、第二最优读电压指的均是对应时刻的最优读电压档位值。
本发明一可选实施例中,第一最优读电压可以为根据参考数据和预配置的最优读电压确定规则确定的最优读电压。
最优读电压至少是对于一个Sector而言的,若参考数据中只包括一个Sector的数据,则可以直接以参考数据中所包括的该Sector的最优读电压作为第一最优读电压。若参考数据包括两个或多个Sector的数据,则可以根据预配置的最优端电压确定规则确定参考数据的最优读电压。其中,最优电压确定规则可以根据实际应用需要进行配置。
本发明一可选实施例中,最优读电压确定规则可以为以下两种规则的一种:
参考数据所对应的所有Sector在掉电时刻的最优读电压的平均值、参考数据所对应的所有Sector所在的Page在掉电时刻的最优读电压的平均值。
即可以基于参考数据所对应的所有Sector中的每个Sector的最优读电压,计算这些Sector的最优读电压的平均值,以该平均值作为参考数据的最优读电压。或者是,也可以是根据参考数据所对应的所有Sector中的的每个Sector所在的Page的最优读电压,计算这些Page的最优读电压的平均值,以该平均值作为参考数据的最优读电压。
其中,一个Sector或者一个Page的最优读电压的确定方式为现有技术。例如,可以基于预设置的最优读电压计算算法计算一个Sector或者一个Page的最优读电压,也可以直接使用非易失存储设备中预置的(一般为NAND厂商生成设备时设置的)的最优读电压获取或者(读偏移量)Read Offset/重读(Read Retry)等命令得到。
可以理解的是,对于不同的非易失存储设备,用于获取设备的最优读电压的最优读电压获取命令的命名可能是不同的,例如,有些非易失存储设备的配置的最优读电压命令为Auto Read Calibration,有些则是实现相同功能的不同命名的命令。
本发明一可选实施例中,参考数据可以为非易失存储设备中的每个Retention时间所对应的Block中的至少一个Sector中的数据。
由于非易失存储设备中数据读取的出错比特数会随着数据的Retention时间的增加而增大,因此,为了提高掉电时间的评估准确性,可以选择覆盖每一个Retention时间所对应的数据作为参考数据,每个Retention时间所对应的参考数据可以是该Retention时间对应的Block中的一个Sector中的数据,也可以是该Block中的一个Page中的数据,也可以是多个Page中的数据,还可以是一个字符线(wordline,WL)或多个WL的多个Page中的数据。
需要说明的是,若非易失存储设备中存在两个或多个Block的Retention时间相同时,所选取的参考数据中该Retention时间对应的参考数据,可以是两个或多个Block中其中任一Block中的数据,也可以包括两个或多个Block中每一个Block中的数据。
本发明一可选实施例中,参考数据可以为每个Retention时间分组中至少一个Retention时间所对应的Block中的至少一个Sector中的数据,其中,Retention时间分组为根据非易失存储设备中所有Block的Retention时间的长短将所有Block的Retention时间进行划分后的分组。
为了在使参考数据覆盖非易失存储设备中尽可能多的不同Retention时间对应的数据的基础上,提高数据处理的效率,本发明实施例中,可以首先根据非易失存储设备中的所有Block的Retention时间,将所有Block的Retention时间按照时间长短进行排序,将排序后的所有Retention时间划分为N个Retention时间分组,N≥1。由于Retention时间分组是根据时间长短进行划分的,因此,同一个Retention时间分组中的任意两个Retention时间之间的差值要小于不同Retention时间分组的两个Retention时间之间的差值,也就是说,同一个Retention时间分组中的所有Retention时间比较接近,可以以分组内的一个Retention时间表征该分组中所有Retention时间。因此,参考数据可以选取包括每个Retention时间分组中的至少一个Retention时间对应的Block中的数据。
作为一个具体的实例,如图2所示的Retention时间分组表中,将非易失存储设备中的所有Block对应的所有Retention时间根据时间长短划分为了若干个Retention时间分组,参 考数据可以包括这若干个个分组中每一个分组中的至少一个Retention所对应的Block中的数据。例如,对于图2的Retention时间分组表,假设非易失存储设备中有10个Block,如果分为三组,则可以将10个Block的Retention时间降序排列后,将排序后的前3个Retention时间分为一组,对应为图2中所示的Retention时间最长的组,第4个至第6个Retention时间分为一组,对应为图2中Retention时间居中的一组,后四个Retention时间分为一组,对应为图2中Retention时间最短的组。
步骤S12:在非易失存储设备的掉电时刻之后的上电时刻,根据第一最优读电压读取参考数据,得到参考数据的出错数。
步骤S13:若出错数不大于设定门限值,则确定非易失存储设备的掉电时长为第一设定时长。
由于非易失存储设备中所存储的数据的出错数会随着数据所对应的Retention时间的增加而增大,因此,可以基于参考数据的出错数来估计非易存储设备的掉电时长。在基于掉电时刻的第一最优读电压读取参考数据时,如果读取的出错数未超过设定门限值,则可以说明设备的掉电时刻为短时掉电,掉电时长可以确定为第一设定时长T1。其中,第一设定时长T1可以根据经验值进行设置,也可以是通过实验的方式进行确定。
其中,参考数据的出错数可以为参考数据在上电时刻的出错比特数,或者参考数据在上电时刻的出错比特率,或者参考数据在上电时刻与掉电时刻之间的出错变化数。
出错比特率即误码率,为读取参考数据时读取出错的比特数与读取的参考数据的总比特数的比值。出错变化数即在上电时刻根据第一最优读电压读取参考数据时的出错比特数与掉电时刻根据最优读电压读取参考数据时的出错比特数的差值。
可以理解的是,在以出错变化数作为出错数时,本发明实施例中,在获取到非易失存储设备的掉电时刻的第一最优读电压之后,还可以包括:
在上述掉电时刻,根据第一最优读电压读取参考数据,得到参考数据在掉电时刻的出错比特数。
相对应的,在非易失存储设备的掉电时刻之后的上电时刻,根据第一最优读电压读取参考数据,得到参考数据的出错数,包括:
在上电时刻,根据第一最优读电压读取参考数据,得到参考数据在上电时刻的出错比特数,根据上电时刻的出错比特数与掉电时刻的出错比特数得到上电时参考数据的出错变化数。
本发明一可选实施例中,上述设定门限值可以是根据参考数据的数据大小确定的门限值。
其中,设定门限值与参考数据的数据大小可以呈正相关。这是由于在掉电时间相同时,参考数据的数据量越大即比特数越大,读取时出错的比特数相对也就越大,因此,可以根据所选取的参考数据的数据量对设定门限值进行设置或调整,从而使基于设定门限值的判断结果更符合实际应用场景,掉电时间估计更加准确。
本发明一可选实施例中,设定门限值可以是根据非易失存储设备的已PE次数确定的门限值。
即可以根据非易失存储设备的已擦写次数配置不同的门限值,实现设定门限值的动态 可调。
一般来说,设定门限值与已PE次数呈正相关。这是由于在掉电时间相同时,非易失存储设备的已PE次数即设备已经被擦写的次数越多,设备的可靠性相对越差,读取相同数据时出错的比特数也就越高,因此,可以根据设备的已PE次数对上述设定门限值进行相应的设置或调整,以提高掉电时间估计的准确性。
本发明一可选实施例中,设定门限值可以是根据非易失存储设备的已PE次数与预置的出错门限表确定的门限值,其中,出错门限表用于存储第二PE次数区间与设定门限值的对应关系,每个第二PE次数区间为一个PE次数或包括至少两个连续的PE次数的次数区间。
本发明实施例中,可以在非易失存储设备中预先配置出错门限表,用于记录设备PE次数区间与设定门限值的对应关系。通过该方式,非易失存储设备的控制器在每次进行掉电时间估计时,即可根据设备当前的已PE次数,在出错门限表中首先确定确PE次数对应的PE次数区间,将该确定的PE次数区间所对应的设定门限值设置为当前的设定门限值,实现了设定门限值的动态调整。
图3示出了本发明另一实施例中提供的一种非易失存储设备的掉电时间估计方法的流程示意图。如图3所示,该掉电时间估计方法主要可以包括以下步骤:
步骤S21:获取并记录参考数据在非易失存储设备的掉电时刻的第一最优读电压。
步骤S22:在非易失存储设备的掉电时刻之后的上电时刻,根据第一最优读电压读取参考数据,得到参考数据的出错数。
其中,步骤S21和步骤S22是与图3中所示的方法中的步骤S11和步骤S12中相同的两个步骤,关于步骤S21和步骤S22中相关内容的具体描述,可以参见上述步骤S11和步骤S12中对应部分的详细描述,为了简洁,在此不再赘述。
步骤S23:若出错数大于设定门限值,获取参考数据在上电时刻的第二最优读电压。
步骤S24:根据第一最优读电压和第二最优读电压计算参考数据的最优读电压偏移,根据最优读电压偏移确定非易失存储设备的掉电时长。
本发明实施例中,若参考数据的出错数大于设定门限值,则说明非易失存储设备的掉电时间较长,此时可以依据参考数据掉电期间所对应的最优读电压偏移(即上电时刻的第二最优读电压与掉电时刻的最优读电压的差值)来确定较长的掉电时长T2。
在一个具体示例中,图4a-图4d分别示出了在55摄氏度(℃)温度下、PE寿命(设备能够被擦写的最大次数)为3000次的SSD中的四个Block(A、B、C、D分别对应为4个Block的标识)的在不同Retention时间变化下最优读电压偏移的变化示意图,横坐标表示时间,单位为小时,纵坐标表示最优读电压的档位值。具体的,图中横坐标的1-9分别对应为0小时、6小时、12小时、18小时、24小时、31小时、93小时、185小时和397小时的Retention时间,纵坐标表示每个Retention时间所对应的最优读电压。由图中可以看出,随着Retention时间变化的增加,每个Block的最优读电压偏移单调变化,例如,对于Block A,在Retention时间变化为6小时时(由1变化至2),最优读电压偏移为-2即-8-(-6),在Retention时间变化为12小时至24小时的范围时(由1变化至2/3/4/5),最优读电压偏移为-4即-10-(-6),在Retention时间变化为31小时至93小时的范围时(由1变化至6或7),最优读电压偏移为-6,可见,最优读电压偏移的绝对值随着Retention时间变化 的增加单调递增,因此,利用最优读电压偏移能够较准确用于设备的Retention时间变化。
本发明一可选实施例中,若参考数据为至少两个不同的Retention时间所对应的Sector的数据,根据最优读电压偏移确定非易失存储设备的掉电时长,包括:
确定在掉电时刻的、上述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,其中,Retention时间所对应的最优读电压为Retention时间对应的参考数据所对应的最优读电压;
将至少两个不同的Retention时间中的一个Retention时间作为参考时间,分别计算至少两个不同的Retention时间每个Retention时间所对应的最优读电压,与参考时间所对应的最优读电压的差值;
根据差值中与最优读电压偏移最接近的差值所对应的Retention时间和参考时间,确定非易失存储设备的掉电时长。
由前文的描述可知,Retention时间是对于Block而言的,因此,参考数据为至少两个不同的Retention时间所对应的Sector中的数据,指的即是参考数据包括至少两个Retention时间不同的Block中数据。
随着Retention时间的变化,参考数据的最优读电压也会发生变化,因此,参考数据在掉电期间(掉电时刻至掉电之后的上电时刻)的最优读电压偏移能够表征参考数据的Retention时间的变化,该Retention时间的变化即对应为非易失存储设备的掉电时间。若选取的参考数据所包括的数据对应至少两个不同的Retention时间,选定其中一个Retention时间作为参考时间,则每个Retention时间对应的最优读电压和参考时间对应的最优读电压的差值中,与最优读电压偏移最接近的差值所对应的两个Retention时间的时间差,则可以表征该最优读电压偏移对应的掉电时长,即可以根据差值中与最优读电压偏移最接近的差值所对应的Retention时间和参考时间,确定非易失存储设备的掉电时长。
本发明一可选实施例中,根据差值中与最优读电压偏移最接近的差值所对应的Retention时间和参考时间,确定非易失存储设备的掉电时长,包括:
将差值中与最优读电压偏移最接近的差值所对应的Retention时间与参考时间的差值,确定为非易失存储设备的掉电时长。
作为一个具体示例,如图5所示,掉电时刻参考数据的最优读电压为V_poff,上电时刻参考数据的最优读电压为V_on,则最优读电压偏移delta为V_on-V_poff。该示例中,参考数据中包括掉电时刻的k个不同Retention时间的Block,参考时间为ret_1,ret_1所对应的掉电时刻的最优读电压为V_ret1,k个Retention时间(包括参考数所对应的Retention时间)在掉电时刻的最优读电压与V_ret1的差值分别为Δ1,Δ2,...,Δk,则将Δ1,Δ2,...,Δk中与delta最接近的差值对应的掉电时的Retention时间为ret_x,则掉电时间T2可以确定为ret_x-ret_1。
本发明一可选实施例中,根据差值中与最优读电压偏移最接近的差值所对应的Retention时间和参考时间,确定非易失存储设备的掉电时长之前,还可以包括:
确定最优读电压偏移不大于差值中的最大差值,且最优读电压偏移不小于差值中的最小差值。
为了避免上述所有Retention所对应的最优读电压与参考时间所对应的最优读电压的差 值,与最优读电压偏移相差过大,即最优读电压偏移大于所有差值中的最大值或者最优读电压偏移小于所有差值中的最小值,导致掉电时间估计偏差过大的问题。本发明实施例中,在计算出上述所有Retention所对应的最优读电压与参考时间所对应的最优读电压的差值之后,首先确定最优读电压偏移是否在计算出的所有差值所覆盖的电压区间范围之内,即不小于最小差值且不大于最大差值,如果最优读电压偏移不小于最小差值且不大于最大差值,则表明与最优读电压偏移最接近的差值和最优读电压的差值在合理范围内,可以基于该差值对应的Retention时间和参考时间,确定设备的掉电时长。
本发明一可选实施例中,若最优读电压偏移大于差值中的最大差值,或最优读电压偏移小于差值中的最小差值,该掉电时间的估计方法还可以包括:
确定非易失存储设备的掉电时长为第二设定时长。
由前文描述可知,若最优读电压偏移大于差值中的最大差值,或最优读电压偏移小于差值中的最小差值,即说明最优读电压不在上述所有差值所覆盖的电压区间范围之内,即使是与最优读电压偏移最接近的差值,该差值与最优读电压偏移之差也过大,导致根据该差值对应的Retention时间和参考时间确定设备的掉电时长偏差过大。此时,则可以以预设的第二设定时长作为掉电时长。
可以理解的是,在实际应用中,第二设定时长可以根据经验值、实验值或者根据所配置的非易失存储设备中的数据搬移策略进行设置。例如,可以根据预配置的数据搬移的门限值的大小设置或调整第二设定时长,如果数据搬移的门限值较小,则表明非易失存储设备中设备数据搬移的频率较高,数据的可靠性要求较高,此时,第二设定时长可以设置一相对较大的数值,以避免第二设定时长设定过小,使需要搬移的数据不能够及时被搬移,导致数据的可靠性存在风险。
本发明一可选实施例中,若参考数据为至少两个不同的Retention时间所对应的Sector中的数据,且至少两个不同的Retention时间中Retention时间的最大值与最小值的差值小于设定值,则根据最优读电压偏移确定非易失存储设备的掉电时长,包括:
在预置的离线掉电时间表中查找非易失存储设备的已PE次数所在的第一PE次数区间;
将离线掉电时间表中,与第一PE次数区间所对应的电压偏移中,与最优读电压偏移最接近的电压偏移所对应的Retention时间确定为非易失存储设备的掉电时长。
其中,离线掉电时间表用于存储第一PE次数区间、Retention时间和电压偏移的关联关系,每个第一PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
在实际应用中,在满带宽写满全盘(非易失存储设备)等极端应用场景下,非易失存储设备中的所有Block的Retention时间可能会基本相同,即所有Block的Retention时间中最大值与最小值的差值小于设定值,此时则可以认为是设备中的所有Block只有一种Retention时间的情况。由于非易失存储设备中数据在一段时间的最优读电压偏移的大小,与设备已PE次数和该一段时间的时长(即Retention时间变化)关联,因此,可以通过设置用于存储PE次数区间、Retention时间和电压偏移的关联关系的离线掉电时间表,以用于非易失存储设备的Block的Retention时间只有一种的特殊场景下掉电时长的确定。
可以理解的是,上述离线掉电时间表中的每个第一PE次数区间可以是一个次数区间,也可以是一个PE次数,在实际应用中,可以根据非易失存储设备的可用存储资源大小配置该掉电时间表。例如,若设备的存储空间比较大,则可以以一个PE次数作为一个区间,配置存储PE次数、Retention时间和电压偏移的关联关系的离线掉电时间表。此时,上述查找非易失存储设备的已PE次数所在的第一PE次数区间即为查找离线掉电时间表中与已PE次数最接近的PE次数,并将离线掉电时间表中与查找到的PE次数所对应的电压偏移中,与最优读电压偏移最接近的电压偏移所对应的Retention时间确定为非易失存储设备的掉电时长。若设备空间相对较小,则可以以包括至少两个PE次数的区间来建立上述离线掉电时间表。
作为一个具体的示例,表1中示出了一个离线掉电时间表的示意性结构。如表1中所示,表中示出了M个PE次数、N个Retention时间变化与电压偏移的关联关系,表中时间表示Retention时间变化,时间与PE次数关联对应的v11、V12、……、vMN表示电压偏移,如v11表示PE次数为PE1、Retention时间变化为Retention1时对应的电压偏移。根据表1所示的离线掉电时间表确定非易失存储设备的掉电时长时,若设备的已PE次数为PEM,则可以在PEM所在的行中查找与参考数据的最优读电压偏移最接近的电压偏移,例如,参考数据的最优读电压偏移与表1中的最优读电压偏移vM2最接近,则可确定出设备的掉电时长为Retention2。
表1
Figure PCTCN2019073038-appb-000001
在确定出非易失存储设备的掉电时长后,将掉电时长加到设备的系统Retention时间轴上,完成系统Retention时间轴的更新,即更新设备中每个Block的Retention时间为掉电时的Retention时间加上估计出的掉电时长。完成系统Retention时间轴的更新之后,控制器即可开始响应Host的I/O(写/读)操作请求,根据系统更新后的Retention时间轴,控制设备中Retention时间大于设定的数据搬移门限值的Block中的数据进行数据搬移。
本发明实施例的非易失存储设备的掉电时间估计方法,能够在设定掉电之后再次上电时,利用参考数据掉电时的最优读电压读取该参考数据,得到数据读取的出错数,由于数据读取的出错数与掉电时长相关联,因此,可以依据该出错数确定出设备是否为短时掉电,并将掉电时长为短时掉电时,确定设备的掉电时长为配置值(第一设定时长)。如果确定出设备发生的不是短时掉电,则根据参考数据在掉电期间的最优读电压偏移进一步在线估计出设备的掉电时长。通过实验可以证明,本发明实施例的方案能够有效提高非易失存储设备掉电时间估计的准确性。通过本发明实施例,能够有效避免设备发生短时掉电时,由于掉电时长估计过长触发设备发生多次擦写,而导致设备可擦写次数减少,寿命变短的问题。 通过本发明实施例,还能够指导设备的数据巡检机制,避免在设备发生非短时掉电时,由于时间估计过短导致数据巡检有效性降低,不能够及时对需要进行搬移的数据进行数据搬移,导致设备中数据可靠性降低的问题,提升数据的可靠性。
对应于图1中所示的方法,本发明实施例还提供了一种非易失存储设备的掉电时间估计装置。如图6所示,该掉电时间估计装置600主要可以包括最优读电压获取模块610、出错数确定模块620和掉电时长确定模块630。
最优读电压获取模块610,用于获取并记录参考数据在非易失存储设备的掉电时刻的第一最优读电压,其中,参考数据为根据预配置的选取规则所确定的非易失存储设备的至少一个逻辑块地址扇区Sector中的数据.
出错数确定模块620,用于在非易失存储设备的掉电时刻之后的上电时刻,根据第一最优读电压读取参考数据,得到参考数据的出错数;
掉电时长确定模块630,用于在出错数不大于设定门限值时,确定非易失存储设备的掉电时长为第一设定时长。
可以理解的是,根据本申请实施例的掉电时间估计装置600,可对应于图1中所示的根据本申请实施例的掉电时间估计方法的执行主体,具体可以实现控制器或处理器等。掉电时间估计装置600的各模块的操作和/或功能的详细实现方式可参见图1所对应的本申请实施例的掉电时间估计方法部分中的描述,为了简洁,在此不再赘述。
本发明一可选实施例中,参考数据可以为非易失存储设备中的每个Retention时间所对应的Block中的至少一个Sector中的数据。
本发明一可选实施例中,参考数据可以为每个Retention时间分组中至少一个Retention时间所对应的Block中的至少一个Sector中的数据;其中,Retention时间分组为根据非易失存储设备中所有Block的Retention时间的长短将所有Block的Retention时间进行划分后的分组。
本发明一可选实施例中,参考数据的出错数可以为参考数据在上电时刻的出错比特数,或者为参考数据在上电时刻的出错比特率,或者为参考数据在上电时刻与掉电时刻之间的出错变化数。
本发明一可选实施例中,设定门限值可以是根据参考数据的数据大小确定的门限值,或者,是根据非易失存储设备的已PE次数确定的门限值,或者,是根据非易失存储设备的已PE次数与预置的出错门限表确定的门限值;其中,出错门限表用于存储第二PE次数区间与设定门限值的对应关系,每个第二PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
本发明一可选实施例中,第一最优读电压为根据参考数据和预配置的最优读电压确定规则确定的最优读电压。
本发明一可选实施例中,最优读电压确定规则为以下规则的一种:
参考数据所对应的所有Sector在掉电时刻的最优读电压的平均值、参考数据所对应的所有Sector所在的页Page在掉电时刻的最优读电压的平均值。
本发明一可选实施例中,若出错数大于设定门限值,在非易失存储设备的掉电时刻之后的上电时刻,最优读电压获取模块610,还用于获取参考数据在上电时刻的第二最优读 电压。
相应的,掉电时长确定模块630,还用于根据第一最优读电压和第二最优读电压计算参考数据的最优读电压偏移;根据最优读电压偏移确定非易失存储设备的掉电时长。
可以理解的是,本实施例中的掉电时间估计装置600,可对应于图3中所示的根据本申请实施例的掉电时间估计方法的执行主体。掉电时间估计装置600的各模块的操作和/或功能的详细实现方式可参见图3所对应的本申请实施例的掉电时间估计方法部分中的描述,为了简洁,在此不再赘述。
本发明一可选实施例中,若参考数据为至少两个不同的Retention时间所对应的Sector中的数据,掉电时长确定模块630在根据最优读电压偏移确定非易失存储设备的掉电时长时,具体用于:
确定在掉电时刻的、至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,其中,Retention时间所对应的最优读电压为Retention时间对应的参考数据所对应的最优读电压;
将至少两个不同的Retention时间中的一个Retention时间作为参考时间,分别计算至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,与参考时间所对应的最优读电压的差值;
根据差值中与最优读电压偏移最接近的差值所对应的Retention时间和参考时间,确定非易失存储设备的掉电时长。
本发明一可选实施例中,掉电时长确定模块630在根据差值中与最优读电压偏移最接近的差值所对应的Retention时间和参考时间,确定非易失存储设备的掉电时长时,具体用于:
将差值中与最优读电压偏移最接近的差值所对应的Retention时间与参考时间的差值,确定为非易失存储设备的掉电时长。
本发明一可选实施例中,掉电时长确定模块630在根据差值中与最优读电压偏移最接近的差值所对应的Retention时间和参考时间,确定非易失存储设备的掉电时长之前,还用于:
确定最优读电压偏移不大于差值中的最大差值,且最优读电压偏移不小于差值中的最小差值。
本发明一可选实施例中,若最优读电压偏移大于差值中的最大差值,或最优读电压偏移小于差值中的最小差值,掉电时长确定模块630还用于:
确定非易失存储设备的掉电时长为第二设定时长。
本发明一可选实施例中,若参考数据为至少两个不同的Retention时间所对应的Sector中的数据,且至少两个不同的Retention时间中Retention时间的最大值与最小值的差值小于设定值,掉电时长确定模块630在根据最优读电压偏移确定非易失存储设备的掉电时长时,具体用于:
在预置的离线掉电时间表中查找非易失存储设备的已PE次数所在的第一PE次数区间;
将离线掉电时间表中与第一PE次数区间所对应的电压偏移中,与最优读电压偏移最接 近的电压偏移所对应的Retention时间确定为非易失存储设备的掉电时长;
其中,离线掉电时间表用于存储第一PE次数区间、Retention时间和电压偏移的关联关系,每个第一PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
可以理解的是,根据本发明各实施例的掉电时间估计装置600,可分别对应于根据本发明各实施例的掉电时间估计方法的执行主体,并且掉电时间估计装置600中的各个模块的实现的操作和/或功能分别为了实现本发明各实施例的掉电时间估计方法的相应流程,掉电时间估计装置600中各模块的具体操作和或功能实现可参见本发明上述各实施例的调节方法中相对应的步骤,为了简洁,在此不再赘述。
图7示出了根据本申请实施例的非易失存储设备的掉电时间估计方法和装置的一种非易失存储设备的结构示意图。如图7所示,该非易失存储设备700主要可以包括处理器701、存储器702和通信接口703,存储器702用于存储可执行的计算机程序代码,处理器701通过读取存储器702中存储的计算机程序代码来运行与计算机程序代码对应的计算机程序,以用于执行本申请任一实施例的掉电时间估计方法。通信接口703用于与外部设备通信,非易失存储设备700还可以包括总线704,总线704用于连接处理器701、存储器702和通信接口703,使处理器701、存储器702和通信接口703通过总线704进行相互通信。
可以理解的是,根据本申请实施例的电子设备700,可对应于根据本申请实施例的掉电时间估计方法的执行主体。
本发明实施例还提供了一种计算机可读存储介质,可读存储介质中存储有计算机程序指令,当计算机程序指令被处理器运行时,可以实现本发明任一实施例中的掉电时间估计方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。

Claims (22)

  1. 一种非易失存储设备的掉电时间估计方法,其特征在于,所述方法应用于非易失存储设备中,所述方法包括:
    获取并记录参考数据在所述非易失存储设备的掉电时刻的第一最优读电压,其中,所述参考数据为根据预配置的选取规则所确定的所述非易失存储设备的至少一个逻辑块地址扇区Sector中的数据;
    在所述非易失存储设备的所述掉电时刻之后的上电时刻,根据所述第一最优读电压读取所述参考数据,得到所述参考数据的出错数;
    若所述出错数不大于设定门限值,则确定所述非易失存储设备的掉电时长为第一设定时长。
  2. 根据权利要求1所述的方法,其特征在于,若所述出错数大于所述设定门限值,在所述非易失存储设备的所述掉电时刻之后的上电时刻,所述方法还包括:
    获取所述参考数据在所述上电时刻的第二最优读电压;
    根据所述第一最优读电压和所述第二最优读电压计算所述参考数据的最优读电压偏移;
    根据所述最优读电压偏移确定所述非易失存储设备的掉电时长。
  3. 根据权利要求2所述的方法,其特征在于,若所述参考数据为至少两个不同的Retention时间所对应的Sector中的数据,所述根据所述最优读电压偏移确定所述非易失存储设备的掉电时长,包括:
    确定在所述掉电时刻的、所述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,其中,所述Retention时间所对应的最优读电压为所述Retention时间对应的参考数据所对应的最优读电压;
    将所述至少两个不同的Retention时间中的一个Retention时间作为参考时间,分别计算所述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,与所述参考时间所对应的最优读电压的差值;
    根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长,包括:
    将所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间与所述参考时间的差值,确定为所述非易失存储设备的掉电时长。
  5. 根据权利要求3所述的方法,其特征在于,所述根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长之前,还包括:
    确定所述最优读电压偏移不大于所述差值中的最大差值,且所述最优读电压偏移不小于所述差值中的最小差值。
  6. 根据权利要求5所述的方法,其特征在于,若所述最优读电压偏移大于所述差值中 的最大差值,或所述最优读电压偏移小于所述差值中的最小差值,所述方法还包括:
    确定所述非易失存储设备的掉电时长为第二设定时长。
  7. 根据权利要求2所述的方法,其特征在于,若所述参考数据为至少两个不同的Retention时间所对应的Sector中的数据,且所述至少两个不同的Retention时间中Retention时间的最大值与最小值的差值小于设定值,所述根据所述最优读电压偏移确定所述非易失存储设备的掉电时长,包括:
    在预置的离线掉电时间表中查找所述非易失存储设备的已PE次数所在的第一PE次数区间;
    将所述离线掉电时间表中与所述第一PE次数区间所对应的电压偏移中,与所述最优读电压偏移最接近的电压偏移所对应的Retention时间确定为所述非易失存储设备的掉电时长;
    其中,所述离线掉电时间表用于存储第一PE次数区间、Retention时间和电压偏移的关联关系,每个第一PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
  8. 根据权利要求1所述的方法,其特征在于,所述参考数据的出错数为所述参考数据在所述上电时刻的出错比特数,或者所述参考数据在所述上电时刻的出错比特率,或者所述参考数据在所述上电时刻与所述掉电时刻之间的出错变化数。
  9. 根据权利要求1所述的方法,其特征在于,所述设定门限值是根据所述参考数据的数据大小确定的门限值,或者,是根据所述非易失存储设备的已PE次数确定的门限值,或者,是根据所述非易失存储设备的已PE次数与预置的出错门限表确定的门限值;
    其中,所述出错门限表用于存储第二PE次数区间与设定门限值的对应关系,每个第二PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
  10. 根据权利要求1所述的方法,其特征在于,所述第一最优读电压为根据所述参考数据和预配置的最优读电压确定规则确定的最优读电压。
  11. 根据权利要求10所述的方法,其特征在于,所述最优读电压确定规则为以下规则的一种:
    所述参考数据所对应的所有Sector在掉电时刻的最优读电压的平均值、所述参考数据所对应的所有Sector所在的页Page在掉电时刻的最优读电压的平均值。
  12. 根据权利要求1所述的方法,其特征在于,所述参考数据为所述非易失存储设备中的每个Retention时间所对应的Block中的至少一个Sector中的数据。
  13. 根据权利要求1所述的方法,其特征在于,所述参考数据为每个Retention时间分组中至少一个Retention时间所对应的Block中的至少一个Sector中的数据;
    其中,所述Retention时间分组为根据所述非易失存储设备中所有Block的Retention时间的长短将所述所有Block的Retention时间进行划分后的分组。
  14. 一种非易失存储设备的掉电时间估计装置,其特征在于,所述装置包括:
    最优读电压获取模块,用于获取并记录参考数据在所述非易失存储设备的掉电时刻的第一最优读电压,其中,所述参考数据为根据预配置的选取规则所确定的所述非易失存储设备的至少一个逻辑块地址扇区Sector中的数据;
    出错数确定模块,用于在所述非易失存储设备的所述掉电时刻之后的上电时刻,根据所述第一最优读电压读取所述参考数据,得到所述参考数据的出错数;
    掉电时长确定模块,用于在所述出错数不大于设定门限值时,确定所述非易失存储设备的掉电时长为第一设定时长。
  15. 根据权利要求1所述的装置,其特征在于,若所述出错数大于所述设定门限值,在所述非易失存储设备的所述掉电时刻之后的上电时刻,所述最优读电压获取模块,还用于获取所述参考数据在所述上电时刻的第二最优读电压;
    所述掉电时长确定模块,还用于根据所述第一最优读电压和所述第二最优读电压计算所述参考数据的最优读电压偏移;根据所述最优读电压偏移确定所述非易失存储设备的掉电时长。
  16. 根据权利要求15所述的装置,其特征在于,若所述参考数据为至少两个不同的Retention时间所对应的Sector中的数据,所述掉电时长确定模块在根据所述最优读电压偏移确定所述非易失存储设备的掉电时长时,具体用于:
    确定在所述掉电时刻的、所述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,其中,所述Retention时间所对应的最优读电压为所述Retention时间对应的参考数据所对应的最优读电压;
    将所述至少两个不同的Retention时间中的一个Retention时间作为参考时间,分别计算所述至少两个不同的Retention时间中每个Retention时间所对应的最优读电压,与所述参考时间所对应的最优读电压的差值;
    根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长。
  17. 根据权利要求16所述的装置,其特征在于,所述掉电时长确定模块在根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长时,具体用于:
    将所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间与所述参考时间的差值,确定为所述非易失存储设备的掉电时长。
  18. 根据权利要求16所述的装置,其特征在于,所述掉电时长确定模块在根据所述差值中与所述最优读电压偏移最接近的差值所对应的Retention时间和所述参考时间,确定所述非易失存储设备的掉电时长之前,还用于:
    确定所述最优读电压偏移不大于所述差值中的最大差值,且所述最优读电压偏移不小于所述差值中的最小差值。
  19. 根据权利要求18所述的装置,其特征在于,若所述最优读电压偏移大于所述差值中的最大差值,或所述最优读电压偏移小于所述差值中的最小差值,所述掉电时长确定模块还用于:
    确定所述非易失存储设备的掉电时长为第二设定时长。
  20. 根据权利要求15所述的装置,其特征在于,若所述参考数据为至少两个不同的Retention时间所对应的Sector中的数据,且所述至少两个不同的Retention时间中Retention时间的最大值与最小值的差值小于设定值,所述掉电时长确定模块在根据所述最优读电压 偏移确定所述非易失存储设备的掉电时长时,具体用于:
    在预置的离线掉电时间表中查找所述非易失存储设备的已PE次数所在的第一PE次数区间;
    将所述离线掉电时间表中与所述第一PE次数区间所对应的电压偏移中,与所述最优读电压偏移最接近的电压偏移所对应的Retention时间确定为所述非易失存储设备的掉电时长;
    其中,所述离线掉电时间表用于存储第一PE次数区间、Retention时间和电压偏移的关联关系,每个第一PE次数区间为一个PE次数或者为包括至少两个连续的PE次数的次数区间。
  21. 一种非易失存储设备,其特征在于,所述非易失存储设备包括处理器和存储器;
    所述存储器中存储有计算机程序指令;
    所述处理器用于运行所述计算机程序指令,实现如权利要求1至13中任一项所述的方法。
  22. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有计算机程序指令,当所述计算机程序指令被处理器运行时,使得计算机执行如权利要求1至13中任一项所述的方法。
PCT/CN2019/073038 2018-01-26 2019-01-24 非易失存储设备的掉电时间估计方法和装置 WO2019144918A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810081525.0 2018-01-26
CN201810081525.0A CN110083496B (zh) 2018-01-26 2018-01-26 非易失存储设备的掉电时间估计方法和装置

Publications (1)

Publication Number Publication Date
WO2019144918A1 true WO2019144918A1 (zh) 2019-08-01

Family

ID=67394508

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/073038 WO2019144918A1 (zh) 2018-01-26 2019-01-24 非易失存储设备的掉电时间估计方法和装置

Country Status (2)

Country Link
CN (1) CN110083496B (zh)
WO (1) WO2019144918A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1500289A (zh) * 2001-03-28 2004-05-26 ÷˹���ɷݹ�˾ 制造高电容极间电介质的方法
US20150340086A1 (en) * 2014-05-23 2015-11-26 Micron Technology, Inc. Threshold voltage analysis
CN106201342A (zh) * 2016-06-30 2016-12-07 联想(北京)有限公司 一种数据处理方法及电子设备
CN106293539A (zh) * 2016-08-18 2017-01-04 华为技术有限公司 一种闪存设备的访问方法、装置和系统
CN106981308A (zh) * 2017-03-20 2017-07-25 记忆科技(深圳)有限公司 一种精准获取llr信息的应用方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394107B (zh) * 2011-10-27 2014-08-27 上海新储集成电路有限公司 一种位级非易失性静态随机存取存储器及其实现方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1500289A (zh) * 2001-03-28 2004-05-26 ÷˹���ɷݹ�˾ 制造高电容极间电介质的方法
US20150340086A1 (en) * 2014-05-23 2015-11-26 Micron Technology, Inc. Threshold voltage analysis
CN106201342A (zh) * 2016-06-30 2016-12-07 联想(北京)有限公司 一种数据处理方法及电子设备
CN106293539A (zh) * 2016-08-18 2017-01-04 华为技术有限公司 一种闪存设备的访问方法、装置和系统
CN106981308A (zh) * 2017-03-20 2017-07-25 记忆科技(深圳)有限公司 一种精准获取llr信息的应用方法

Also Published As

Publication number Publication date
CN110083496A (zh) 2019-08-02
CN110083496B (zh) 2020-10-16

Similar Documents

Publication Publication Date Title
US10373693B2 (en) Storage device and method of operating the storage device
US10573389B2 (en) Storage device having parameter calibration function, and operating method thereof
US9335937B2 (en) Method of operating a flash memory system using a migration operation
US9298608B2 (en) Biasing for wear leveling in storage systems
US9431121B2 (en) Read voltage adjustment
US9032177B2 (en) Host read command return reordering based on time estimation of flash read command completion
US9146850B2 (en) Data storage system with dynamic read threshold mechanism and method of operation thereof
US9923562B1 (en) Data storage device state detection on power loss
WO2017152392A1 (zh) 一种闪存设备的刷新方法和装置
US8593884B2 (en) Data storage system and a data retention method thereof
US9639463B1 (en) Heuristic aware garbage collection scheme in storage systems
US11288157B2 (en) Controller and operation method thereof
TWI644209B (zh) 記憶體管理
US10126970B2 (en) Paired metablocks in non-volatile storage device
US9881682B1 (en) Fine grained data retention monitoring in solid state drives
KR20150073109A (ko) 데이터 저장 디바이스 및 그 데이터 유지 방법
WO2016006067A1 (ja) メモリモジュールおよび情報処理システム
US8848448B2 (en) Semiconductor memory device and operating method thereof
US20130019054A1 (en) Flash memory device and method performing erase operation using over program
US20160012918A1 (en) Storage system managing run-time bad cells
US11086561B2 (en) Integrated circuit memory devices with enhanced buffer memory utilization during read and write operations and methods of operating same
WO2017039772A1 (en) Adaptive multi-phase erase
US9886399B2 (en) Storage control device, storage device, information processing system, and storage control method therefor
JP2020042890A (ja) メモリシステムおよびメモリシステムの制御方法
WO2019144918A1 (zh) 非易失存储设备的掉电时间估计方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19743409

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19743409

Country of ref document: EP

Kind code of ref document: A1