Method and apparatus for calculating offline data retention time

By acquiring and storing voltage axis information when the solid-state drive is powered on, and combining LDPC decoding and NAND threshold characteristics, the problems of high voltage axis scanning cost and difficulty in acquiring distribution information are solved, thereby improving the accuracy and reliability of data reading.

CN121366622BActive Publication Date: 2026-03-13INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing technologies, the time and resource costs of scanning the voltage axis for each physical block are relatively high, and the threshold voltage distribution information of the physical block cannot be obtained within the threshold voltage scanning range provided by the manufacturer, resulting in a high risk of data reading failure.

Method used

By acquiring the current voltage axis or erase/write count and data storage time of physical blocks when the solid-state drive is powered on, reading the general voltage axis from the preset general read voltage table, and storing these voltage axes when powered off, the target physical block that meets the preset data storage requirements can be selected when the next power-on is powered on. Combining LDPC decoding and NAND threshold voltage distribution characteristics, the offline data retention time is calculated.

Benefits of technology

It reduces the time cost and resource consumption of voltage axis scanning, improves the accuracy and reliability of data reading, and ensures the stability and efficiency of solid-state drive data reading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121366622B_ABST
    Figure CN121366622B_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for calculating data offline retention time, relating to the field of data offline time calculation technology. The method includes: scanning a single physical page of a three-level storage unit block by decoding the returned information obtained from the low-density checksum in the solid-state drive (SSD) and the threshold voltage distribution characteristics of the flash memory, to estimate the offline time of the SSD, thereby updating the data retention time and the real-time voltage axis of the scan. This solves the technical problems in related technologies, such as the high time cost and resource overhead of scanning the voltage axis for each physical block, and the inability to obtain distribution information within the threshold voltage scanning range provided by the manufacturer due to the large distance between the erase and programmed states of the physical blocks in a single-level storage unit. This achieves timely updates to the data retention time and the real-time voltage axis of the entire disk, thus effectively ensuring the accuracy and reliability of subsequent data reading operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data offline time calculation technology, and in particular to a method and apparatus for calculating data offline retention time. Background Technology

[0002] During continuous power-on of an SSD (Solid State Disk), the controller continuously records the number of erase / write cycles, read interference cycles, and data retention time for each physical block based on data read / write activity. However, after the SSD is powered off, the RET (Retention Time) continues to accumulate. The controller can only determine the offline time through the system time. Upon power-on again, due to the low accuracy of the recorded data retention time, there is a significant error in the voltage axis selected during the read process. When the voltage axis selection error causes the number of raw error bits read to exceed the error correction capability of LDPC (Low Density Parity Code), data read failure is likely to occur.

[0003] Currently, related technologies can scan the NAND (Not AND) state in real time based on a fixed read voltage meter setting, and maintain an additional read voltage axis table in the controller to store the read voltage axis of each physical block being looked up in real time. Furthermore, these technologies can read SLC (Single Level Cell) physical blocks before and after the SSD is powered on and off, and use the returned 0 / 1 numbers to look up the table to determine the threshold voltage offset, thereby determining the data retention time.

[0004] However, in related technologies, the time cost and resource overhead of scanning the voltage axis for each physical block are relatively large. Furthermore, since SLC physical blocks have good data protection capabilities, the distance between their erased state and programmed state is relatively large. Within the threshold voltage scanning range opened by the manufacturer, it is impossible to obtain the threshold voltage distribution information of the physical block, which urgently needs to be solved. Summary of the Invention

[0005] This application provides a method and apparatus for calculating offline data retention time, which at least solves the technical problems in the related art, such as the high time cost and resource overhead of performing voltage axis scanning on each physical block, and the inability to obtain threshold voltage distribution information of physical blocks within the threshold voltage scanning range opened by the manufacturer.

[0006] This application provides a method for calculating data offline retention time, comprising the following steps: when the solid-state drive (SSD) is powered on, obtaining the current voltage axis corresponding to multiple physical blocks in the SSD, or obtaining the erase / write count and data storage time corresponding to the multiple physical blocks when the SSD is powered on, and reading the corresponding general voltage axis from a preset general read voltage table according to the erase / write count and the data storage time; when the SSD is powered off, storing the current voltage axis or the general voltage axis corresponding to the multiple physical blocks, so that when the SSD is powered on again, multiple target physical blocks that meet preset data storage requirements are selected from the multiple physical blocks, and the multiple target physical blocks are read through the current voltage axis or the general voltage axis to obtain the corresponding physical block stored data, and determining the number of error bits corresponding to the read physical block stored data; determining the correlation between the number of error bits and the data storage time, and calculating the data offline time corresponding to different physical pages in the multiple target physical blocks according to the correlation, and calculating the average physical block offline time corresponding to the multiple target physical blocks using the data offline time, so as to determine the final data offline retention time corresponding to the SSD based on the average physical block offline time.

[0007] This application also provides a device for calculating offline data retention time, comprising: a first reading module, configured to, when the solid-state drive (SSD) is powered on, acquire the current voltage axis corresponding to multiple physical blocks in the SSD, or acquire the number of erase / write operations and data storage time corresponding to the multiple physical blocks when the SSD is powered on, and read the corresponding universal voltage axis from a preset universal read voltage table based on the number of erase / write operations and the data storage time; and a second reading module, configured to, when the SSD is powered off, store the current voltage axis or the universal voltage axis corresponding to the multiple physical blocks, so as to select data that meets the preset data retention time from the multiple physical blocks when the SSD is powered on again. The system stores multiple target physical blocks as required, and reads the multiple target physical blocks through the current voltage axis or the general voltage axis to obtain the corresponding physical block storage data, and determines the number of error bits corresponding to the read physical block storage data; the calculation module is used to determine the correlation between the number of error bits and the data storage time, and calculate the data offline time corresponding to different physical pages in the multiple target physical blocks according to the correlation, and calculate the average physical block offline time corresponding to the multiple target physical blocks using the data offline time, so as to determine the final data offline retention time corresponding to the solid-state drive based on the average physical block offline time.

[0008] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of calculating any of the above-described methods for offline data retention time.

[0009] This application also provides a non-volatile computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described methods for calculating the offline data retention time.

[0010] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described methods for calculating data offline retention time.

[0011] This application allows for determining, during SSD power-on operation, the current voltage axis corresponding to multiple physical blocks in the SSD can be obtained, or the erase / write count and data storage time corresponding to multiple physical blocks during SSD power-on operation can be obtained, and the corresponding general voltage axis can be read from a preset general read voltage table based on the erase / write count and data storage time; when the SSD is powered off, the current voltage axis or general voltage axis corresponding to multiple physical blocks can be stored, so that when the SSD is powered on again, multiple target physical blocks that meet the preset data storage requirements can be selected from the multiple physical blocks, and multiple target physical blocks can be read through the current voltage axis or general voltage axis to obtain the corresponding physical block stored data, and the number of error bits corresponding to the read physical block stored data can be determined; the error ratio can be determined. This method establishes a correlation between the number of physical blocks and their data storage time. Based on this correlation, it calculates the data offline time for different physical pages within multiple target physical blocks and uses the data offline time to calculate the average offline time of the physical blocks. Based on this average offline time, the final data retention time for the solid-state drive (SSD) is determined. Therefore, it solves the technical problems in related technologies, such as the high time and resource costs of voltage axis scanning for each physical block and the inability to obtain threshold voltage distribution information for physical blocks within the threshold voltage scanning range provided by the manufacturer. This achieves timely updates of the entire disk's data retention time and the real-time voltage axis, effectively ensuring the accuracy and reliability of subsequent data read operations. Attached Figure Description

[0012] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart illustrating a method for calculating offline data retention time according to an embodiment of this application;

[0014] Figure 2A schematic diagram illustrating the fitting relationship between the number of error bits and data retention time under different erase / write cycles, provided as an embodiment of this application;

[0015] Figure 3 A schematic diagram illustrating the maintenance process of a current reading voltmeter and an error bit table, provided for one embodiment of this application;

[0016] Figure 4 A schematic diagram illustrating the execution logic for offline data retention time of a solid-state drive, provided as an embodiment of this application;

[0017] Figure 5 This is an example diagram of a data offline retention time calculation device according to an embodiment of this application.

[0018] Among them, 10 is a calculation device for offline data retention time, 100 is a first reading module, 200 is a second reading module, and 300 is a calculation module. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0020] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0021] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] The specific application environment architecture or specific hardware architecture on which the calculation method for offline data retention time depends is described here.

[0023] The embodiments of this application provide a method for calculating the offline data retention time.

[0024] like Figure 1The diagram shown is a flowchart of a method for calculating the offline data retention time according to an embodiment of this application. The method for calculating the offline data retention time includes the following steps:

[0025] In step S101, when the solid-state drive is powered on, the current voltage axis corresponding to multiple physical blocks in the solid-state drive is obtained, or the number of erase / write operations and data storage time corresponding to multiple physical blocks are obtained when the solid-state drive is powered on, and the corresponding general voltage axis is read from the preset general read voltage table according to the number of erase / write operations and data storage time.

[0026] Those skilled in the art should understand that, in order to solve the problems of inaccurate data retention time and biased voltage axis selection, related technologies can scan the NAND status in real time based on a fixed read voltage meter setting, and maintain an additional read voltage axis table in the controller to store the read voltage axis of each physical block found in real time. However, this technical solution requires voltage axis scanning for each physical block during execution, which consumes a lot of time and controller resources.

[0027] Furthermore, related technologies can also determine the threshold voltage offset and thus the data retention time by reading the SLC physical block before and after the SSD is powered on and off, and performing a Gaussian distribution lookup table based on the returned number of bits. However, because the SLC physical block has good data protection capabilities, its erase state and programming state are far apart, and distribution information cannot be obtained within the threshold voltage scanning range provided by the manufacturer, thus making this solution have significant application limitations.

[0028] Therefore, in order to accurately obtain the offline data retention time of the SSD, this application embodiment can combine the return information of LDPC decoding in the SSD and the threshold voltage distribution characteristics of NAND to scan a single physical page in TLC (Triple Level Cell) to estimate the data offline time of the SSD, thereby updating the data retention time of the entire disk and the real-time voltage axis of the scan in a timely manner, which effectively ensures the accuracy and reliability of subsequent data reading operations.

[0029] In actual implementation, the embodiments of this application can first perform periodic physical page scanning operations on each physical block in the solid-state drive, and determine the voltage axis with the fewest error bits among the multiple voltage axes corresponding to each physical block based on the scanning results, and take this voltage axis as the target voltage axis (i.e. the optimal voltage axis) corresponding to the physical block, thereby constructing a corresponding current read voltage table based on the target voltage axis.

[0030] Furthermore, in embodiments of this application, after the solid-state drive is powered on and started, the current read voltage table is read to obtain the corresponding read data, and the read data is decoded and verified. If the read data meets the preset read success requirements, the embodiments of this application can directly extract the current voltage axis of the corresponding physical block from the read data. Otherwise, the embodiments of this application can collect the number of Program / Erase Cycle (PEC) (i.e., the number of erase / write cycles) and the data storage time of each physical block, and match the corresponding general voltage axis from the preset general read voltage table based on the number of erase / write cycles and the data storage time.

[0031] Therefore, the embodiments of this application combine the current voltage reading meter with a preset universal voltage reading meter to match the voltage axis data corresponding to the physical block, thereby improving the efficiency and reliability of voltage axis acquisition, which helps the solid-state drive to quickly stabilize and enter the working state.

[0032] Optionally, in one embodiment of this application, before obtaining the current voltage axis corresponding to multiple physical blocks in the solid-state drive, the method further includes: sampling physical pages in the multiple physical blocks to obtain multiple physical page samples to be scanned, traversing the multiple physical page samples to be scanned, and scanning at least one physical block corresponding to the current physical page sample to be scanned to obtain the scan result corresponding to the current physical block, wherein the scan result includes the number of erase / write cycles and data storage time of the current physical block; based on the scan result, reading the corresponding reference voltage from a preset universal read voltage table, determining multiple voltage axes corresponding to the physical pages of a preset flash memory, and performing a preset offset read operation on the multiple voltage axes sequentially based on a preset offset set and the reference voltage to obtain multiple offset read results corresponding to the multiple voltage axes; decoding the multiple offset read results to generate corresponding decoding status information, and according to the decoding... The code status information determines whether the corresponding offset reading result meets the preset decoding success requirements. If the preset decoding success requirements are met, the number of original error bits corresponding to multiple offset reading results is obtained. The number of original error bits corresponding to multiple offset reading results is compared to obtain the corresponding comparison result. The minimum number of original error bits is determined based on the comparison result, and the voltage axis corresponding to the minimum number of original error bits is used as the target voltage axis of the current physical page sample to be scanned. The target voltage axis is recorded in the current read voltage table. At least one physical block corresponding to the next physical page sample among the multiple physical page samples to be scanned is scanned to obtain the target voltage axis corresponding to the next physical page sample to be scanned. The average value of the target voltage axis of the next physical page sample to be scanned and the current physical page sample to be scanned is calculated and recorded in the current read voltage table.

[0033] It should be noted that, in order to obtain the voltage axis of the physical block more accurately, the embodiments of this application can scan each physical block at a preset period through the controller to find the optimal voltage axis, and additionally maintain a real-time voltage reading meter, denoted as... .

[0034] Understandably, this is because each physical block is scanned in real time. The dimension only needs to be consistent with the dimension of the physical block; factors such as PEC and RET do not need to be considered. In actual implementation, the real-time scanning operation of this embodiment involves periodically performing multiple reads on each physical block during SSD operation. Based on the number of error bits returned in each read, the voltage axis with the smallest number of error bits is selected and recorded as the real-time read voltage of that physical block, and updated to... The recording format for real-time voltmeter readings (i.e., the current voltmeter reading) in the table is shown in the following formula:

[0035] ,

[0036] in, This represents the index of the corresponding physical block.

[0037] Specifically, the process of real-time scanning of multiple physical blocks in a solid-state drive is as follows:

[0038] 1. Sample physical pages in multiple physical blocks to obtain multiple physical page samples to be scanned (i.e., set the physical page samples to be scanned), and construct a corresponding sample set based on the multiple physical page samples to be scanned. That is, physical page sample The physical pages being scanned cover the Lower Page, Middle Page, and Upper Page.

[0039] 2. For each scanned physical page, embodiments of this application can sequentially scan all physical blocks starting from the first physical block; based on the PEC and RET of the scanned physical block, the corresponding voltage axis is obtained. And use it as the corresponding reference voltage; furthermore, embodiments of this application may use a preset universal reading voltage meter. The voltage axis ensures that even when SSD operations are busy, a relatively accurate reference voltage can be selected even if the background real-time scan is not performed in time or the interval is long.

[0040] 3. The embodiments of this application can obtain a preset set of offsets. Voltage offset in To determine the seven voltage axes of the Lower Page, Middle Page, and Upper Page of the TLC. Corresponding voltage offset range And according to the voltage offset range Perform the corresponding left and right offset data reading operations, where, RVi Indicates the first i Read Voltage (RV);

[0041] It is understandable that, since the reference voltage is the result of the previous physical block scan meeting the preset error bit count requirement, this embodiment only requires six steps of left and right offset execution. It should be noted that, since reading a physical page involves multiple voltage axes, for example, the voltage axis corresponding to the Upper Page is... Then during scanning During the process, the embodiments of this application can maintain The result of the reading remains unchanged. Influence.

[0042] 4. During decoding, the LDPC in the main controller, in addition to returning decoding status information, will also return the original number of failed bits (FBC) in the current data if decoding is successful; this embodiment of the application can use the original number of failed bits returned in each read result. Record the voltage axis corresponding to the minimum number of original error bits (i.e., the target voltage axis, or optimal voltage axis, of the physical page sample to be scanned) in the table. In the middle, the corresponding optimal voltage axis The determination process is shown in the following formula:

[0043]

[0044] 5. For each physical block, after scanning a physical page (i.e., the current physical page sample to be scanned), the corresponding real-time scan result is recorded. When scanning the second physical page sample (i.e., the next physical page sample to be scanned), the average result of the two scans (i.e., the average value of the target voltage axis) is calculated to update the current reading voltage meter. This continues until the sampled physical page has been processed.

[0045] In summary, to estimate the data offline time of a solid-state drive (SSD), due to the TLC... The data retention time has the greatest impact, and the offset phenomenon is the most obvious. Therefore, in the embodiment of this application, in addition to recording the real-time voltage axis during the real-time scanning of physical blocks, the data retention time is also the most affected. In addition, it is also necessary to record the physical block's... Corresponding number of read error bits and record Stored in table In the middle; similarly, Essentially, it corresponds to the Upper Page [ The results of the joint reading, thus for each scanned page of a physical block, allow this embodiment to average the newly obtained reading results and the stored results to update... .

[0046] Therefore, the embodiments of this application obtain the reference voltage from the fixed reading voltmeter (i.e., the preset general reading voltmeter), and perform physical page scanning and construction and updating of the current reading voltmeter based on the voltage offset range [-6, +6] and the reference voltage, thereby improving the search efficiency of the optimal voltage axis and ensuring the accuracy and reliability of voltage selection.

[0047] Optionally, in one embodiment of this application, when the solid-state drive (SSD) is powered on and running, obtaining the current voltage axis corresponding to multiple physical blocks in the SSD includes: when a preset host sends a data read request to the SSD, reading the current voltage meter according to the data read request to obtain the corresponding voltage meter read status information; decoding the voltage meter read status information to obtain the corresponding decoding result, and determining whether the decoding result meets the preset decoding success requirement; if the decoding result meets the preset decoding success requirement, determining that the current voltage meter data read is successful to obtain the current voltage axis corresponding to multiple physical blocks; otherwise, determining that the current voltage meter data read fails.

[0048] During continuous power-on of the SSD, this embodiment of the application can first use [the following] for each read operation. The real-time voltage axis in the data is read.

[0049] As one possible approach, after the host initiates a data read request to the solid-state drive (SSD), the SSD can retrieve the current read voltage meter based on the data read request and simultaneously record the read status information of the current read voltage meter. Secondly, embodiments of this application can perform a decoding operation on the read status information to obtain the corresponding decoding result. Subsequently, embodiments of this application can determine whether the decoding result meets a preset decoding success requirement, wherein the decoding success requirement includes the following:

[0050] 1. After decoding, the current reading of the voltmeter data is complete (e.g., the voltage axis information of each physical block is intact).

[0051] 2. The number of original error bits is lower than the threshold (within the range of LDPC decoding error correction capability);

[0052] 3. Data format matches preset specifications (e.g., voltage axis values ​​are within a reasonable range, without garbled characters or logical conflicts).

[0053] If the decoding result meets the above decoding success requirements, the current voltmeter data reading is determined to be successful, thus obtaining the current voltage axis corresponding to multiple physical blocks. Otherwise, the current voltmeter reading is determined to be a failure, and the data is retrieved based on the PEC and RET of the physical block. Select the corresponding voltage axis in the table to perform the data rereading operation again.

[0054] Therefore, the embodiments of this application are triggered by host requests, and the reliability of the read voltage axis data is ensured through decoding and verification, thereby improving the accuracy of physical block voltage matching.

[0055] Optionally, in one embodiment of this application, before reading the corresponding general voltage axis from the preset general voltage reading table according to the number of erase / write cycles and the data storage time, the method further includes: sequentially recording the data write time and the number of erase / write cycles corresponding to the current physical block among multiple physical blocks, calculating the data retention time corresponding to the current physical block based on the data write time, and constructing the preset general voltage reading table according to the data retention time and the number of erase / write cycles of the current physical block.

[0056] It should be noted that, in this embodiment of the application, an information structure `blockInfo` can be maintained for each physical block within the controller of the solid-state drive. Specifically, this embodiment of the application can record the data write time from the beginning and accumulate the existence time of the physical block using natural time to record its data retention time (RET). Furthermore, the `blockInfo` information structure also stores the number of erase / write operations for the current physical block.

[0057] Secondly, within the controller, this embodiment can also maintain a universal read voltage meter. Specifically, this embodiment can segment the number of erase / write cycles and data retention time, setting a corresponding voltage axis for each segment (this voltage axis is obtained through pre-testing and statistical analysis of the NAND). Furthermore, this embodiment can store the voltage axis in a two-dimensional table on the main controller. In the (i.e., universal reading voltmeter) voltmeter, the two dimensions are the number of erase / write cycles and the data retention time.

[0058] It is understood that, in the process of real-time scanning of physical blocks and searching for the voltage axis, the embodiments of this application modify the reference voltage of the search process to a voltage that is fixedly stored inside the solid-state drive. And because Since the results are general results obtained from large-scale NAND testing, the embodiments of this application can perform real-time voltage axis lookup based on these results, thereby optimizing the real-time voltage axis lookup process and improving the efficiency of real-time voltage axis acquisition.

[0059] Therefore, the embodiments of this application record key parameters for physical blocks and construct a two-dimensional universal voltage reading table, making voltage axis matching more accurate, thereby providing reliable data for subsequent voltage axis reading and improving the stability of solid-state drive data reading.

[0060] Optionally, in one embodiment of this application, after reading the corresponding general voltage axis from a preset general voltage table based on the number of erase / write cycles and data storage time, the method further includes: reading the stored data in the corresponding physical block through the general voltage axis, and decoding the stored data to obtain the corresponding data decoding result; determining whether the general voltage axis meets the preset data read failure requirements based on the data decoding result, wherein, if the preset data read failure requirements are met, the performance status information of the physical block is determined, and a target data recovery strategy corresponding to the performance status information is selected from a pre-built multi-dimensional recovery strategy library; and a preset hierarchical data recovery operation is performed on the physical block through the target data recovery strategy to recover the stored data in the physical block.

[0061] In actual execution, the embodiments of this application first use a universal voltage axis to read the stored data of the corresponding physical block and perform decoding operations on this data to generate data decoding results; secondly, the embodiments of this application can determine whether the universal voltage axis meets the preset read failure requirements based on the data decoding results. If it does, the performance status information of the physical block (such as fault type, degree of wear, etc.) is obtained, and a target data recovery strategy corresponding to the performance status information is matched from a pre-built multi-dimensional recovery strategy library; then, the embodiments of this application can perform hierarchical recovery operations on the physical block according to the target strategy to recover the stored data in the physical block.

[0062] Therefore, the embodiments of this application accurately match data recovery strategies when data reading fails, thereby improving data recovery efficiency and success rate through hierarchical data recovery operations, effectively reducing the risk of data loss, and ensuring the storage reliability of solid-state drives.

[0063] In step S102, when the solid-state drive is powered off, the current voltage axis or general voltage axis corresponding to multiple physical blocks is stored so that when the solid-state drive is powered on again, multiple target physical blocks that meet the preset data storage requirements are selected from the multiple physical blocks, and multiple target physical blocks are read through the current voltage axis or general voltage axis to obtain the corresponding physical block storage data, and the number of error bits corresponding to the read physical block storage data is determined.

[0064] Furthermore, when the solid-state drive performs a power-down operation, this embodiment of the application can save the current voltage axis or general voltage axis of each physical block. After the SSD is powered on again, the target physical block that meets the preset data storage requirements is first selected from all physical blocks. Then, the corresponding current voltage axis or general voltage axis stored before power-down is called to read the data of the corresponding physical block to obtain the corresponding physical block storage data. The number of error bits in the physical block storage data read is recorded compared with the actual data stored in the physical block.

[0065] Therefore, by reusing the voltage axis data before power-down and eliminating the voltage axis rematching step, the embodiments of this application improve the power-on data reading efficiency, provide reliable data basis for physical block status evaluation, and help ensure the reliability of solid-state drive data reading.

[0066] Optionally, in one embodiment of this application, when the solid-state drive (SSD) is powered off, the current voltage axis or general voltage axis corresponding to multiple physical blocks is stored. This allows for the selection of multiple target physical blocks that meet preset data storage requirements from the multiple physical blocks when the SSD is powered on again. The multiple target physical blocks are then read using the current voltage axis or general voltage axis to obtain the corresponding physical block stored data, and the number of error bits corresponding to the read physical block stored data is determined. This includes: when the SSD is powered off, saving the current read voltage table, a preset general read voltage table, and a preset error bit table storing the minimum number of original error bits; and when the SSD is powered on again, selecting multiple target physical blocks that meet the preset data storage requirements from the multiple physical blocks; sequentially scanning the multiple target physical blocks to read the current voltage axis and general voltage axis of the current target physical block from the current read voltage table and the preset general read voltage table. The system constructs a corresponding voltage axis combination based on the current voltage axis and the general voltage axis. It then uses this voltage axis combination to read multiple target physical pages in the current target physical block that meet the preset physical page type requirements, obtaining the corresponding low-density checksum report for each target physical page. The low-density checksum report is decoded to obtain physical page decoding data, and the system determines whether the low-density checksum report meets the preset decoding success conditions based on the physical page decoding data. If the preset decoding success conditions are met, the low-density checksum report is determined to be successfully decoded, and the number of error bits corresponding to multiple target physical pages is obtained. If the preset decoding success conditions are not met, the low-density checksum report is determined to have failed to decode, and the scanning of the current target physical block is stopped. Corresponding decoding failure information is generated and sent to the target client to perform a preset garbage collection operation on the current target physical block based on the decoding failure information.

[0067] In the specific implementation process, when the solid-state drive is powered off, the controller can read the current voltage meter. Error bit table and general-purpose reading voltmeter Save the table together.

[0068] When the solid-state drive is powered on again, embodiments of this application can scan a portion of the physical blocks to obtain the number of error bits, thereby estimating the corresponding data offline time.

[0069] Those skilled in the art will understand that since all physical blocks have the same offline time, it is unnecessary to scan all physical blocks. Therefore, embodiments of this application can select from physical blocks that have already had data written to them. physical blocks To construct the corresponding physical block set and to Perform a physical page scan operation; each physical block can select a sample set. The scanning operation is performed on the Upper Page (i.e., the high-order page among multiple target physical pages required by the preset physical page type).

[0070] In actual implementation, embodiments of this application can first set up a sample set. The subset of all UpperPages contained therein is denoted as We can obtain the following formula:

[0071]

[0072] Where, p i Represents the sample set The sample element of the i-th physical page.

[0073] Secondly, in this embodiment, the scan begins with the first physical block and proceeds sequentially. Specifically, in this embodiment, the scan can start from... Retrieve the saved voltage axis RV7 (i.e., the current voltage axis) from the database, and from... Extract RV3 (i.e., the general voltage axis) to construct the corresponding voltage axis combination based on RV7 and RV3, and use the voltage axis combination to perform data read operations on multiple physical pages in the first physical block in sequence to obtain the corresponding physical page read results and generate the corresponding LDPC report.

[0074] Subsequently, embodiments of this application can decode the physical page read results to obtain physical page decoded data, and determine whether the low-density parity check report meets the preset decoding success conditions based on the physical page decoded data (such as the decoded output data meeting the parity check rules, and the original number of error bits being lower than the maximum error correction capability threshold of LDPC). If the LDPC report of a certain physical page fails to decode, it indicates that the data has been stored for too long, and the scanning of the current physical block can be stopped directly, and decoding failure information is generated and sent to the target client so that the client can trigger the garbage collection operation of the physical block. If the LDPC report is successfully decoded, the new number of error bits FBC of the target physical page returned by the LDPC decoder is recorded.

[0075] It is understood that, based on real-time scanning of physical blocks to obtain the optimal read voltage, this application embodiment does not require performing other NAND operations; it only needs to maintain an error bit table that stores the number of error bits for each physical block's Upper Page. This allows for the estimation of offline data retention time. Furthermore, since RV7 is most significantly affected by data retention time among the NAND read voltages, embodiments of this application can perform only the Upper Page read during power-on reads, thereby greatly reducing data read latency.

[0076] Specifically, the embodiments of this application refer to the current reading voltmeter. and error bit table The maintenance process is as follows:

[0077] 1. Since the current reading voltage meter and error bit meter sizes both correspond to the total number of physical blocks on the disk, The TLC stores a set of 7 voltage axes RV1-RV7; Store the number of error bits when reading the Upper Page using [RV3,RV7] on the current physical block, where, and As shown in the following formula:

[0078] ;

[0079] 2. During real-time scanning of physical blocks, the embodiments of this application can be performed from... The first physical page in The process begins by traversing the physical pages to perform corresponding scan operations: during the scan of each physical page, offset reads and error bit count comparisons are performed sequentially for all physical blocks, and the acquired voltage axis is updated in a timely manner. In the table.

[0080] Therefore, even in the embodiments of this application Scan not complete The table already contains the voltage axis data, making it easy for other operations to access it; simultaneously, when the scan operation traverses to... When using the UpperPage, the embodiments of this application can use RV ( ) stored in In the table.

[0081] Therefore, the embodiments of this application improve data reading efficiency by saving voltage axis data when the solid-state drive is powered off and reusing it when powered on. In addition, the embodiments of this application use voltage axis combinations for accurate data reading and combine LDPC decoding operations to effectively ensure data reliability and improve the operational stability and data processing efficiency of the solid-state drive.

[0082] Furthermore, in one embodiment of this application, performing a preset garbage collection operation on the current target physical block based on decoding failure information includes: the target client receiving decoding failure information sent by the SSD controller, the decoding failure information including at least the index information of the current target physical block, the corresponding PEC value, RET value, and the physical page location information of the decoding failure; retrieving the historical access frequency and data priority tag of the current target physical block from a preset physical block state database based on the index information; constructing a recycling priority evaluation model based on the PEC value, RET value, and historical access frequency of the current target physical block; calculating a recycling priority score by inputting the data priority tag; determining the recycling queue level of the current target physical block based on the score; and outputting... The system includes a garbage collection command containing information about the garbage collection queue level and physical page location. Based on the physical page location information in the garbage collection command, it performs data integrity checks on physical pages in the current target physical block that failed to be decoded, extracts the valid data of the undecoded physical pages in the physical block and migrates them to a preset temporary storage area, and outputs a data migration completion signal and a valid data storage address. In response to the data migration completion signal, it performs an erase operation on the current target physical block. After erasure, it detects the read and write performance parameters of the physical block and generates a garbage collection status report containing the erase result and performance parameters. It feeds back the valid data storage address and the garbage collection status report to the SSD controller, updates the status information of the current target physical block in the physical block status database, and completes the garbage collection operation.

[0083] Specifically, the process of physical block garbage collection based on decoding failure information in this application embodiment is as follows:

[0084] Step 1: The target client receives the decoding failure information sent by the SSD controller. This decoding failure information includes at least the index information of the current target physical block, the PEC value, the RET value, the physical page location information of the decoding failure, and the number of LDPC decoding error bits. Based on the index information, the preset physical block status library interface is called to retrieve the historical access frequency (access frequency statistics in the last 30 days), data priority tags (high / medium / low levels, pre-configured by the business system), and the last recycling record of the physical block.

[0085] Step 2: Construct a recycling priority evaluation model that integrates "hardware wear and tear - access characteristics - data value". The model input parameter weights are configured as follows: PEC value 30%, RET value 25%, historical access frequency 20%, and data priority label 25%. Substitute the data to calculate a recycling priority score of 0-100, where 80-100 is the emergency queue (priority resource occupation), 40-79 is the regular queue, and 0-39 is the delayed queue. The output includes the recycling queue level, physical page location information, and resource allocation ratio.

[0086] Step 3: Based on the recycling command, locate the physical pages that failed to be decoded and perform data integrity verification using a "dual verification mechanism". First, verify the integrity of the undecoded physical pages using CRC32, and then compare it with the mirror data of the backup node. After the verification is successful, migrate the valid data to the reserved high-reliability temporary storage area according to the "page-level parallel migration" strategy. After the migration is completed, generate a migration report containing the verification results, data migration completion signal and valid data storage address.

[0087] Step 4: Respond to the completion signal in the migration report and start the "gradient erasure" process. First, perform enhanced erasure (voltage increase of 10%) on the physical pages that failed to be decoded, and then perform standard erasure on the entire physical block. After erasure, the performance parameters (including the number of initial error bits after erasure and random read / write rate) are detected by "read / write dual detection" and a recycling status report containing erasure results, performance parameters and reusability rating (reusable / limited use / discarded) is generated.

[0088] Step 5: Synchronize the valid data storage address in the migration report with the recycling status report to the SSD controller. The controller updates the "status-location-performance" three-dimensional information of the physical block in the physical block status database and pushes a data migration completion notification to the business system to complete the entire garbage collection process.

[0089] It is understood that the embodiments of this application provide complete input for the weight calculation of the model in step 2 through the "PEC value, RET value, number of error bits and other multi-dimensional data" output in step 1. The previous recycling record helps to optimize the accuracy of priority scoring and avoid repeated recycling. The "resource allocation ratio" output in step 2 determines the number of threads for parallel migration in step 3. The physical page location information accurately locates the operation object and ensures that high-priority tasks get resources first. The "verification result" in the migration report in step 3 is a prerequisite for starting the erase in step 4 (only if the verification is passed will it be executed). The completion signal triggers the gradient erase process to ensure zero data loss. The "reusability rating" in step 4 and the storage address in step 3 together serve as the core basis for updating the state library in step 5, providing a performance reference for subsequent voltage axis selection and physical block scheduling.

[0090] Therefore, the embodiments of this application avoid resource waste by evaluating the recycling priority from multiple dimensions, and effectively ensure data security and efficiency by performing dual verification and parallel migration operations, thereby reducing the risk of data loss and operation and maintenance costs.

[0091] In step S103, the correlation between the number of error bits and the data storage time is determined, and the data offline time corresponding to different physical pages in multiple target physical blocks is calculated based on the correlation. The average physical block offline time corresponding to multiple target physical blocks is calculated using the data offline time, so as to determine the final data offline retention time corresponding to the solid-state drive based on the average physical block offline time.

[0092] Subsequently, embodiments of this application can determine the correlation between the number of error bits and the data storage time, and calculate the data offline time of each physical page in each target physical block based on the correlation. Secondly, embodiments of this application can take the average of the data offline time of all physical pages in each target physical block, and determine the data offline time of each target physical block based on the average value, and then calculate the average physical block offline time of all target physical blocks, thereby completing the calculation of the overall data offline retention time of the solid-state drive (i.e., the final data offline retention time).

[0093] Therefore, the embodiments of this application improve the accuracy of data offline retention time assessment based on the correlation calculation between error bits and storage time, and provide reliable data guidance and basis for predicting the data storage life of solid-state drives, thereby reducing the risk of data loss.

[0094] Optionally, in one embodiment of this application, determining the correlation between the number of error bits and the data storage time includes: calculating the average number of error bits based on the number of error bits of multiple target physical pages, and obtaining the minimum original number of error bits corresponding to the current target physical block in a preset error bit table; taking the minimum original number of error bits and the average number of error bits as the corresponding power-down error bits and power-on error bits, respectively, and obtaining the number of erase / write operations of the current target physical block; comparing the number of power-down error bits and the number of power-on error bits to obtain the corresponding comparison result, and determining the correlation between the number of error bits and the data storage time based on the comparison result, the number of erase / write operations, and a preset fitting coefficient.

[0095] It should be noted that, in this embodiment of the application, after the LDPC report confirms successful decoding, the new number of error bits (FBC) of the target physical page returned by the LDPC decoder is recorded. After sequentially performing the scan of all physical pages, the average value of the number of error bits (i.e., the average number of error bits) is calculated and recorded as the number of power-on error bits. ;

[0096] Embodiments of this application can be derived from an error bit table. The table shows the minimum number of raw error bits saved before power-down. And record it as the number of power-down error bits. Subsequently, embodiments of this application can compare the number of error bits before and after power-on and power-off to obtain the corresponding comparison results.

[0097] It is understandable that, since the relationship between data retention time and the number of error bits is relatively simple during offline hard disk operation, the embodiments of this application can fit the relationship between data retention time and the number of error bits based on comparison results, the number of erase / write cycles, and a preset fitting coefficient, and through NAND testing, to determine how... Figure 2 The fitting relationship (i.e., correlation relationship) shown is expressed mathematically as follows:

[0098]

[0099] Here, A and B are two constant arrays, corresponding to the fitting coefficients under different PEC values. These fitting coefficients can be obtained by fitting with pre-prepared NAND test data.

[0100] Therefore, the embodiments of this application improve the accuracy of determining the correlation by comparing the number of error bits during power-on and power-off, the number of erase / write cycles, and a preset fitting coefficient, and by combining NAND test fitting of the correlation between data storage time and the number of error bits, thereby providing a precise basis for data storage reliability assessment.

[0101] Optionally, in one embodiment of this application, calculating the data offline time corresponding to different physical pages in multiple target physical blocks based on the association relationship includes: constructing a data mapping table between the number of error bits and the data storage time based on the association relationship; searching the data mapping table based on the number of power-down error bits and the number of power-on error bits to obtain the power-down data hold time corresponding to the number of power-down error bits and the power-on data hold time corresponding to the number of power-on error bits; calculating the hold time difference between the power-on data hold time and the power-down data hold time, and determining the data offline time corresponding to different physical pages in the current target physical block based on the hold time difference.

[0102] In actual implementation, to ensure the efficiency of solid-state drive operation, this embodiment of the application can obtain corresponding parameters during NAND testing. and According to and Construct a data mapping table with RET and FBC dimensions.

[0103] Secondly, embodiments of this application can look up the data mapping table based on the number of power-down error bits and the number of power-on error bits to obtain the number of power-down error bits. Corresponding power-down data retention time Power-on data hold time corresponding to the number of power-on error bits As shown in the following formula:

[0104]

[0105] Furthermore, since PEC does not increase during the SSD's offline process, this embodiment can calculate the hold time difference between the power-on data hold time and the power-off data hold time, and determine the data offline time corresponding to different physical pages in the current target physical block based on the hold time difference. As shown in the following formula:

[0106] .

[0107] It is understood that the embodiments of this application improve the efficiency and reliability of RET determination during power-on by constructing a functional relationship between the number of error bits (FBC) and the data retention time (RET) and by using preset NAND test logic to construct a mapping table of FBC and RET under each PEC.

[0108] Optionally, in one embodiment of this application, the average physical block offline time corresponding to multiple target physical blocks is calculated using the data offline time, so as to determine the final data offline retention time corresponding to the solid-state drive based on the average physical block offline time. This includes: obtaining the data offline time of different physical pages in multiple target physical blocks, and calculating the average physical page offline time corresponding to different physical pages based on the data offline time; calculating the average physical block offline time corresponding to multiple target physical blocks based on the average physical page offline time, and determining the final data offline retention time corresponding to the solid-state drive based on the average physical block offline time; superimposing the final data offline retention time and the data storage time corresponding to multiple target physical blocks to obtain the corresponding superposition result, and writing the superposition result into the data retention time field of multiple target physical blocks.

[0109] As one possible approach, embodiments of this application can iterate through the sampled n target physical blocks to sequentially perform data offline time calculation operations, thereby obtaining the data offline time of each physical page in each target physical block, and calculating the average physical page offline time of all physical pages in each target physical block based on the data offline time, and using the average physical page offline time as the data offline time of the corresponding target physical block; after the current physical block is processed, embodiments of this application can count the number of power-on error bits on all the latest obtained physical pages. The average value is updated to the corresponding middle.

[0110] Secondly, embodiments of this application can sequentially perform data offline time calculation operations on each target physical block, and obtain the data offline time of each physical block. Then, the average data offline time of all physical blocks is calculated (i.e., the average physical block offline time), and the final data offline retention time of the solid-state drive is obtained based on this average physical block offline time. .

[0111] It should be noted that, due to the high consistency between physical blocks of NAND flash memory, and in order to efficiently perform the data offline time estimation operation during power-on, the embodiments of this application can set the time during power-on. The parameter is less than 10.

[0112] Furthermore, since all physical blocks have the same offline time, the embodiments of this application obtain the final data offline retention time. Subsequently, embodiments of this application can... Overlay updates to each physical block that has already been written data The data retention time field is used for subsequent data storage. Accurately select the corresponding reading voltage axis data.

[0113] Therefore, the embodiments of this application can perform a fast and simple scan operation on some physical blocks when the solid-state drive is powered on to calculate the offline data retention time and update it in the blockInfo of the physical block. This allows for more accurate acquisition of the NAND read voltage based on PEC and RET, reducing the number of erroneous bits in NAND reads and effectively ensuring the reliability and security of solid-state drive data.

[0114] In the specific implementation process, the NAND testing process of this application embodiment is as follows:

[0115] 1. Perform batch testing on NAND chips, segment the number of PEC cycles, and select multiple physical blocks to perform tests at three points: 2k, 4.5k, and 7k PEC values.

[0116] 2. Write data to each physical block and place it at room temperature, and read and record the error bit count of all physical blocks every day; secondly, the embodiments of this application can calculate the average error bit count of all test physical blocks under the current PEC point and obtain a list of error bit counts under different RET times;

[0117] 3. Obtain parameters A[PEC] and B[PEC] through mathematical fitting;

[0118] 4. The embodiments of this application can use a lookup table method to determine the correlation between data storage time and the number of error bits, without storing A[PEC] and B[PEC], and directly storing the FBC and RET based on the A and B parameters under each PEC into the corresponding data mapping table;

[0119] 5. In actual implementation, this application embodiment can select different PEC points for testing according to the characteristics of NAND from different manufacturers, and after obtaining the test results, segment the PEC, for example, using 0-3k. Test results, 3k-6k usage Test results, 6k and later usage The test results.

[0120] Furthermore, as one possible approach, the specific process for estimating the offline data retention time in this application embodiment is as follows:

[0121] 1. Sample the physical blocks that have already been written with data to obtain n sampled physical blocks (to improve estimation efficiency, the value of n is generally less than 10).

[0122] 2. Regarding The corresponding scanning operations are performed sequentially; specifically, embodiments of this application may be based on... PEC and RET, from Take out RV3 and from Retrieve the saved voltage axis RV7, and use [RV3, RV7] to... Each physical page in the process is read once sequentially; after each read, embodiments of this application can obtain the number of error bits FBC returned by the LDPC decoder and use it as the number of power-on error bits. And set the number of power-down error bits, i.e. Then, based on the number of power-on error bits and the number of power-off error bits, calculate Subsequently, the embodiments of this application can be traversed. The system calculates the average data offline time for all physical pages, and after executing all physical blocks, it averages the average data offline time for different physical blocks to obtain the data offline retention time of the solid-state drive. .

[0123] 3. After the scanning operation for each physical block is completed, this embodiment of the application can retrieve the data of each physical page during the current physical block reading process. The average value has been updated to In the middle, and will This is overlaid into the blockInfo of each physical block so that subsequent operations can be performed more accurately from... Select the voltage axis.

[0124] The maintenance process of the current reading voltage table and the error bit table of this application (i.e., the update process of the current reading voltage table and the error bit table) is described below with reference to the accompanying drawings.

[0125] Figure 3 This is a schematic diagram illustrating the maintenance process of the current reading voltmeter and error bit table in this application. (See diagram below.) Figure 3 As shown, the maintenance process for the current reading voltage table and error bit table in this application is as follows:

[0126] S301: Initialize the current reading voltage meter and error bit table to set the current reading voltage meter and error bit table to all zeros;

[0127] S302: Sequentially retrieve the corresponding physical pages to be scanned from the preset physical page sample set for each physical block;

[0128] S303: Perform a physical page scan operation on the physical block containing the written data;

[0129] S304: Read multiple voltage axes (i.e., read voltages) corresponding to each physical page to be scanned from a preset universal read voltage meter according to the number of erase / write cycles and data retention time, and use each voltage axis as a reference voltage;

[0130] S305: Obtain the voltage offset from the offset set, and determine the voltage offset range corresponding to the physical page to be scanned based on the voltage offset and the reference voltage, so as to perform the corresponding offset data reading operation, and determine the corresponding optimal reading voltage (i.e., optimal voltage axis) based on the number of error bits in the reading result.

[0131] S306: Calculate the average of the optimal read voltages from the multiple optimal read voltages, and update the current read voltage table with the average of the optimal read voltages;

[0132] S307: Determine whether the optimal read voltage lookup operation has been performed for all read voltages of each physical page to be scanned. If the optimal read voltage lookup operation has been performed for all read voltages, proceed to S308; otherwise, proceed to S305.

[0133] S308: Update the error bit count of the high-order page corresponding to the found optimal average read voltage to the error bit table;

[0134] S309: Determine whether all physical blocks have been traversed. If traversal is complete, proceed to S3010; otherwise, proceed to S303.

[0135] S3010: Determine whether all physical pages to be scanned have been traversed. If traversal is complete, proceed to S3011; otherwise, proceed to S302.

[0136] S3011: End the maintenance process for the current reading voltmeter and error bit table.

[0137] The following describes the execution logic of the offline data retention time of the solid-state drive in this application with reference to the accompanying drawings.

[0138] Figure 4 This is a schematic diagram illustrating the execution logic for the offline data retention time of the solid-state drive in this application. For example... Figure 4 As shown, the process of maintaining offline data retention time for the solid-state drive in this application is as follows:

[0139] S401: Initialize the physical block index;

[0140] S402: Obtain the number of erase / write cycles and data retention time recorded in the information structure of multiple physical blocks;

[0141] S403: Read the corresponding general voltage axis from the preset general voltage reading meter according to the number of erase / write cycles and the data retention time, and retrieve the corresponding current voltage axis from the current voltage reading meter to construct the corresponding voltage axis combination based on the general voltage axis and the current voltage axis;

[0142] S404: Based on voltage axis combination, sequentially read all subsets containing high-order pages in the physical page sample set to be scanned to obtain the corresponding low-density check code report;

[0143] S405: Decode the low-density check report, and if the decoding is successful, obtain and record the number of power-on error bits returned by the low-density check report, and obtain the corresponding number of power-off error bits from the error bit table;

[0144] S406: Based on the number of power-down error bits and the number of power-on error bits, look up the data mapping table to obtain the power-down data hold time and the power-on data hold time;

[0145] S407: Calculate the difference between the power-down data retention time and the power-on data retention time, and record the difference in the preset data retention time list;

[0146] S408: Determine whether all subsets containing high-order pages have been read. If they have been read, proceed to S409; otherwise, proceed to S404.

[0147] S409: Determine whether all physical blocks have been traversed. If traversal is complete, proceed to S4010; otherwise, proceed to S402.

[0148] S4010: Calculate the average of all results stored in the data retention time list to obtain the corresponding data offline retention time;

[0149] S4011: Update the offline data retention time to the data retention time field of the information structure of all physical blocks that have already written data.

[0150] In summary, this embodiment incorporates a real-time voltage axis scanning strategy for solid-state drives (SSDs) during the estimation of offline data retention time. This allows for the use of only one table to record the number of error bits for the read voltage. Upon power-up, since all physical blocks have the same offline time, this embodiment only selects a subset of physical blocks for Upper Page reads. After obtaining the new error bit count, the offline data retention time is obtained by looking up the table. Therefore, this embodiment is highly efficient in estimating offline data retention time during power-up, requiring only the additional storage space of two tables (an error bit table and a data mapping table). This allows for averaging the calculation results for different physical block and page quotas, avoiding estimation bias caused by abnormal conditions in some physical pages.

[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0152] Embodiments of this application also provide a device for calculating the offline data retention time.

[0153] like Figure 5 As shown, the data offline retention time calculation device 10 includes: a first reading module 100, a second reading module 200, and a calculation module 300.

[0154] The first reading module 100 is used to obtain the current voltage axis corresponding to multiple physical blocks in the solid-state drive when the solid-state drive is powered on, or to obtain the number of erase / write operations and data storage time corresponding to multiple physical blocks when the solid-state drive is powered on, and to read the corresponding general voltage axis from a preset general voltage table according to the number of erase / write operations and data storage time.

[0155] The second reading module 200 is used to store the current voltage axis or general voltage axis corresponding to multiple physical blocks when the solid-state drive is powered off, so that when the solid-state drive is powered on again, it can select multiple target physical blocks that meet the preset data storage requirements from the multiple physical blocks, and read the multiple target physical blocks through the current voltage axis or general voltage axis to obtain the corresponding physical block storage data, and determine the number of error bits corresponding to the read physical block storage data.

[0156] The calculation module 300 is used to determine the correlation between the number of error bits and the data storage time, and to calculate the data offline time corresponding to different physical pages in multiple target physical blocks based on the correlation. It also uses the data offline time to calculate the average physical block offline time corresponding to multiple target physical blocks, so as to determine the final data offline retention time corresponding to the solid-state drive based on the average physical block offline time.

[0157] Optionally, in one embodiment of this application, the data offline retention time calculation device 10 further includes: a sampling module, an offset reading module, a first decoding module, a comparison module, and a scanning module.

[0158] The sampling module is used to sample physical pages in multiple physical blocks before reading the current read voltage meter corresponding to the solid-state drive when the solid-state drive is powered on, so as to obtain multiple physical page samples to be scanned, and to traverse multiple physical page samples to be scanned, and to scan at least one physical block corresponding to the current physical page sample to be scanned, so as to obtain the scan result corresponding to the current physical block. The scan result includes the number of erase / write operations and the data storage time of the current physical block.

[0159] The offset reading module is used to read the corresponding reference voltage from a preset general voltage reading table based on the scan results, determine multiple voltage axes corresponding to the physical pages of the preset flash memory, and perform preset offset reading operations on the multiple voltage axes in sequence based on the preset offset set and the reference voltage to obtain multiple offset reading results corresponding to the multiple voltage axes.

[0160] The first decoding module is used to decode multiple offset reading results to generate corresponding decoding status information, and to determine whether the corresponding offset reading results meet the preset decoding success requirements based on the decoding status information. If the preset decoding success requirements are met, the module obtains the number of original error bits corresponding to the multiple offset reading results.

[0161] The comparison module is used to compare the number of original error bits corresponding to multiple offset read results to obtain the corresponding comparison results, determine the minimum number of original error bits based on the comparison results, and use the voltage axis corresponding to the minimum number of original error bits as the target voltage axis of the physical page sample to be scanned, and record the target voltage axis in the current read voltage table.

[0162] The scanning module is used to scan at least one physical block corresponding to the next physical page sample among multiple physical page samples to be scanned, so as to obtain the target voltage axis corresponding to the next physical page sample to be scanned, calculate the average value of the target voltage axis of the next physical page sample to be scanned and the current physical page sample to be scanned, and record the average value of the target voltage axis in the current reading voltage table.

[0163] Optionally, in one embodiment of this application, the first reading module 100 includes: a sending unit, a first judging unit, and a first determination unit.

[0164] The sending unit is used to read the current reading voltage meter according to the data reading request when the preset host sends a data read request to the solid-state drive, so as to obtain the corresponding voltage meter reading status information.

[0165] The first judgment unit is used to decode the status information read by the voltmeter, obtain the corresponding decoding result, and determine whether the decoding result meets the preset decoding success requirements.

[0166] The first determination unit is used to determine that the current reading of the voltmeter data is successful if the decoding result meets the preset decoding success requirements, so as to obtain the current voltage axis corresponding to multiple physical blocks; otherwise, it is determined that the current reading of the voltmeter data has failed.

[0167] Optionally, in one embodiment of this application, the second reading module 200 includes: a selection unit, a first construction unit, a first acquisition unit, a second judgment unit, a second determination unit, and a garbage collection unit.

[0168] The selection unit is used to save the current read voltage table, the preset general read voltage table, and the preset error bit table storing the minimum number of original error bits when the solid-state drive is powered off, and to select multiple target physical blocks from multiple physical blocks that meet the preset data storage requirements when the solid-state drive is powered on again.

[0169] The first construction unit is used to sequentially scan multiple target physical blocks to read the current voltage axis and general voltage axis of the current target physical block from the current reading voltage meter and the preset general reading voltage meter, and construct the corresponding voltage axis combination based on the current voltage axis and the general voltage axis.

[0170] The first acquisition unit is used to read multiple target physical pages in the current target physical block that meet the preset physical page type requirements using voltage axis combination, so as to obtain the low-density check code report of the corresponding target physical page.

[0171] The second judgment unit is used to decode the low-density check code report to obtain physical page decoding data, and to determine whether the low-density check code report meets the preset decoding success conditions based on the physical page decoding data.

[0172] The second determination unit is used to determine that the low-density check code report has been successfully decoded if the preset decoding success condition is met, and to obtain the number of error bits corresponding to multiple target physical pages.

[0173] The garbage collection unit is used to determine that the low-density check code report has failed to decode if the preset decoding success conditions are not met, stop scanning the current target physical block, generate corresponding decoding failure information, and send the decoding failure information to the target client so as to perform preset garbage collection operations on the current target physical block according to the decoding failure information.

[0174] Optionally, in one embodiment of this application, the calculation module 300 includes: a second acquisition unit, a third acquisition unit, and a first determination unit.

[0175] The second acquisition unit is used to calculate the average number of error bits based on the number of error bits of multiple target physical pages, and to obtain the minimum number of original error bits corresponding to the current target physical block in the preset error bit table.

[0176] The third acquisition unit is used to take the minimum number of original error bits and the average number of error bits as the corresponding number of power-down error bits and number of power-on error bits, respectively, and to acquire the number of erase / write operations of the current target physical block.

[0177] The first determining unit is used to compare the number of power-down error bits and the number of power-on error bits to obtain the corresponding comparison result, and based on the comparison result, the number of erase / write cycles and the preset fitting coefficient, to determine the correlation between the number of error bits and the data storage time.

[0178] Optionally, in one embodiment of this application, the calculation module 300 further includes: a second construction unit, a search unit, and a second determination unit.

[0179] The second building unit is used to construct a data mapping table between the number of error bits and the data storage time based on the association relationship.

[0180] The lookup unit is used to look up the data mapping table based on the number of power-down error bits and the number of power-on error bits to obtain the power-down data hold time corresponding to the number of power-down error bits and the power-on data hold time corresponding to the number of power-on error bits.

[0181] The second determining unit is used to calculate the holding time difference between the power-on data holding time and the power-off data holding time, and to determine the data offline time corresponding to different physical pages in the current target physical block based on the holding time difference.

[0182] Optionally, in one embodiment of this application, the calculation module 300 further includes: a fourth acquisition unit, a third determination unit, and a superposition unit.

[0183] The fourth acquisition unit is used to acquire the data offline time of different physical pages in multiple target physical blocks, so as to calculate the average physical page offline time corresponding to different physical pages based on the data offline time.

[0184] The third determining unit is used to calculate the average physical block offline time of multiple target physical blocks based on the average physical page offline time, and to determine the final data offline retention time of the solid-state drive based on the average physical block offline time.

[0185] The overlay unit is used to overlay the final offline data retention time and the data storage time corresponding to multiple target physical blocks to obtain the corresponding overlay result, and write the overlay result into the data retention time field of multiple target physical blocks.

[0186] Optionally, in one embodiment of this application, the data offline retention time calculation device 10 further includes: a table building module, used to sequentially record the data write time and erase / write count of the current physical block among multiple physical blocks before reading the corresponding general voltage axis from the preset general read voltage table according to the erase / write count and data storage time, and calculate the data retention time of the current physical block based on the data write time, and construct the preset general read voltage table according to the data retention time and erase / write count of the current physical block.

[0187] Optionally, in one embodiment of this application, the data offline retention time calculation device 10 further includes: a second decoding module, an analysis module, and a recovery module.

[0188] The second decoding module is used to read the corresponding general voltage axis from the preset general voltage reading table according to the number of erase / write cycles and the data storage time, and then read the stored data in the corresponding physical block through the general voltage axis, and decode the stored data to obtain the corresponding data decoding result.

[0189] The analysis module is used to determine whether the general voltage axis meets the preset data read failure requirements based on the data decoding results. If the preset data read failure requirements are met, the performance status information of the physical block is determined, and the target data recovery strategy corresponding to the performance status information is selected from the pre-built multi-dimensional recovery strategy library.

[0190] The recovery module is used to perform preset hierarchical data recovery operations on physical blocks according to the target data recovery strategy in order to recover the stored data in the physical blocks.

[0191] For a description of the features in the embodiment corresponding to the data offline retention time calculation device, please refer to the relevant description in the embodiment corresponding to the data offline retention time calculation method, which will not be repeated here.

[0192] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above embodiments of the method for calculating offline data retention time.

[0193] Embodiments of this application also provide a non-volatile computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described methods for calculating offline data retention time when running.

[0194] In one exemplary embodiment, the aforementioned non-volatile computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0195] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described methods for calculating offline data retention time.

[0196] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described methods for calculating offline data retention time.

[0197] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0198] The foregoing has provided a detailed description of a method, apparatus, device, and medium for calculating offline data retention time provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method of calculating data offline retention time, characterized by, The method comprises the following steps: When the solid state disk is powered on, the current voltage axis corresponding to a plurality of physical blocks in the solid state disk is obtained, or the number of erasing and writing and the data storage time corresponding to the plurality of physical blocks when the solid state disk is powered on are obtained, and the corresponding general voltage axis is read from a preset general read voltage table according to the number of erasing and writing and the data storage time; When the solid state disk is powered off, the current voltage axis corresponding to the plurality of physical blocks or the general voltage axis is stored, so that the next time the solid state disk is powered on, a plurality of target physical blocks meeting the preset data storage requirement are selected from the plurality of physical blocks, and the plurality of target physical blocks are read through the current voltage axis or the general voltage axis to obtain the corresponding physical block storage data, and the number of error bits corresponding to the read physical block storage data is determined; The correlation between the number of error bits and the data storage time is determined, and the data offline time corresponding to different physical pages in the plurality of target physical blocks is calculated according to the correlation, and the physical block offline time average value corresponding to the plurality of target physical blocks is calculated by using the data offline time, so that the final data offline maintenance time corresponding to the solid state disk is determined based on the physical block offline time average value; Before obtaining the current voltage axis corresponding to a plurality of physical blocks in the solid state disk, the method further comprises the following steps: The physical pages in the plurality of physical blocks are sampled to obtain a plurality of to-be-scanned physical page samples, and the plurality of to-be-scanned physical page samples are traversed, and at least one physical block corresponding to a current to-be-scanned physical page sample is scanned to obtain a scanning result corresponding to the current physical block, wherein the scanning result comprises the number of erasing and writing and the data storage time of the current physical block; Based on the scanning result, a reference voltage is read from the preset general read voltage table, a plurality of voltage axes corresponding to the physical pages of the preset flash memory are determined, and a preset offset read operation is performed on the plurality of voltage axes in sequence based on a preset offset set and the reference voltage to obtain a plurality of offset read results corresponding to the plurality of voltage axes; The plurality of offset read results are decoded to generate corresponding decoding state information, and it is judged whether the corresponding offset read result meets the preset decoding success requirement according to the decoding state information, wherein when the preset decoding success requirement is met, the original number of error bits corresponding to the plurality of offset read results is obtained; The original number of error bits corresponding to the plurality of offset read results is compared to obtain a corresponding comparison result, and the minimum original number of error bits is determined according to the comparison result, the voltage axis corresponding to the minimum original number of error bits is taken as the target voltage axis of the current to-be-scanned physical page sample, and the target voltage axis is recorded in the current read voltage table. scan at least one physical block corresponding to a next to-be-scanned physical page sample in the plurality of to-be-scanned physical page samples to obtain a target voltage axis corresponding to the next to-be-scanned physical page sample, and calculate a target voltage axis average of the next to-be-scanned physical page sample and the current to-be-scanned physical page sample, and record the target voltage axis average in the current read voltage table.

2. The method of claim 1, wherein, The obtaining the current voltage axes corresponding to the plurality of physical blocks when the solid state disk is powered on comprises: When a preset host sends a data read request to the solid state disk, reading the current read voltage table according to the data read request to obtain corresponding voltage table read state information; decoding the voltage table read state information to obtain a corresponding decoding result, and judging whether the decoding result meets a preset decoding success requirement; If the decoding result meets the preset decoding success requirement, it is determined that the current read voltage table data read is successful to obtain the current voltage axes corresponding to the plurality of physical blocks, otherwise it is determined that the current read voltage table data read fails.

3. The method of claim 2, wherein, The storing the current voltage axes corresponding to the plurality of physical blocks or the general voltage axis when the solid state disk is powered off comprises: When the solid state disk is powered off, save the current read voltage table, the preset general read voltage table, and a preset error bit table storing the minimum original error bit number, and when the solid state disk is powered on again, select a plurality of target physical blocks meeting the preset data storage requirement from the plurality of physical blocks; sequentially scan the plurality of target physical blocks to read the current voltage axis of the current target physical block and the general voltage axis from the current read voltage table and the preset general read voltage table, and construct a corresponding voltage axis combination according to the current voltage axis and the general voltage axis; read a plurality of target physical pages meeting a preset physical page type requirement in the current target physical block using the voltage axis combination to obtain a low-density parity check code report of the corresponding target physical page; decode the low-density parity check code report to obtain physical page decoding data, and judge whether the low-density parity check code report meets a preset decoding success condition according to the physical page decoding data; If the preset decoding success condition is met, it is determined that the low-density parity check code report decoding is successful, and the error bit number corresponding to the plurality of target physical pages is obtained; If the preset decoding success condition is not met, it is determined that the low-density parity check code report decoding fails, and the scanning of the current target physical block is stopped, and a corresponding decoding failure information is generated and sent to a target client to perform a preset garbage collection operation on the current target physical block according to the decoding failure information.

4. The method of claim 3, wherein, The determining of the corresponding relationship between the error bit quantity and the data storage time comprises: Based on the error bit quantity of the plurality of target physical pages, an average error bit quantity is calculated, and a minimum original error bit quantity corresponding to the current target physical block in the preset error bit table is obtained; The minimum original error bit quantity and the average error bit quantity are respectively taken as a power-off error bit quantity and a power-on error bit quantity, and the erase count of the current target physical block is obtained; The power-off error bit quantity and the power-on error bit quantity are compared to obtain a comparison result, and based on the comparison result, the erase count and a preset fitting coefficient, the relationship between the error bit quantity and the data storage time is determined.

5. The method of claim 4, wherein, The calculation of the data offline time corresponding to different physical pages in the plurality of target physical blocks according to the relationship comprises: Based on the relationship, a data mapping table between the error bit quantity and the data storage time is constructed; Based on the power-off error bit quantity and the power-on error bit quantity, the data mapping table is searched to obtain a power-off data retention time corresponding to the power-off error bit quantity and a power-on data retention time corresponding to the power-on error bit quantity; The retention time difference between the power-on data retention time and the power-off data retention time is calculated, and the data offline time corresponding to different physical pages in the current target physical block is determined according to the retention time difference.

6. The method of claim 5, wherein, The calculation of the physical block offline time average value corresponding to the plurality of target physical blocks by using the data offline time, to determine the final data offline retention time corresponding to the solid state disk based on the physical block offline time average value, comprises: The data offline time of different physical pages in the plurality of target physical blocks is obtained to calculate the physical page offline time average value corresponding to the different physical pages according to the data offline time; The physical block offline time average value corresponding to the plurality of target physical blocks is calculated according to the physical page offline time average value, and the final data offline retention time corresponding to the solid state disk is determined based on the physical block offline time average value; The final data offline retention time and the data storage time corresponding to the plurality of target physical blocks are superimposed to obtain a superimposed result, and the superimposed result is written into the data retention time field of the plurality of target physical blocks.

7. The method of claim 1, wherein, Before reading the corresponding general voltage axis from the preset general read voltage table according to the erase count and the data storage time, it further comprises: The data write time and the erase count corresponding to the current physical block in the plurality of physical blocks are recorded in sequence, and based on the data write time, the data retention time corresponding to the current physical block is calculated, and the preset general read voltage table is constructed according to the data retention time and the erase count of the current physical block.

8. The method of claim 1, wherein, After reading the corresponding general voltage axis from the preset general read voltage table according to the erase count and the data storage time, it further comprises: read the stored data in the corresponding physical block through the common voltage axis, and decode the stored data to obtain a corresponding data decoding result; determine whether the common voltage axis meets a preset data read failure requirement according to the data decoding result, wherein in a case where the preset data read failure requirement is met, performance state information of the physical block is determined, and a target data recovery strategy corresponding to the performance state information is selected from a pre-constructed multi-dimensional recovery strategy library; perform a preset hierarchical data recovery operation on the physical block through the target data recovery strategy to recover the stored data in the physical block.

9. An electronic device, comprising: comprise: a memory for storing a computer program; a processor for implementing the steps of the data offline retention time calculation method according to any one of claims 1 to 8 when executing the computer program.

Citation Information

Patent Citations

  • Method and device for determining offline data retention time, equipment and medium

    CN115424650A