Solid state drive data error correction method and apparatus, device, and readable storage medium
By issuing a new set of reread commands when the reread command ends, and simultaneously obtaining the data status after the previous set of reread commands, and executing the process in a loop until the data correction is successful, the problem of excessively long correction time in the existing technology is solved, and efficient data correction is achieved.
Patent Information
- Application Number
- PCT/CN2025/101817
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-26
- Filing Date
- 2025-06-18
- Publication Date
- 2026-01-29
AI Technical Summary
The existing solid-state drive (SSD) data error correction process requires obtaining the data status from an external cache, setting the voltage, and starting the reread. All operations are performed serially, resulting in excessively long error correction times.
When the reread command ends, a new set of reread commands is issued, and the data status after the previous set of rereads is obtained at the same time. This process is repeated until the data correction is successful, and data correction is performed in a concurrent manner.
It improves the efficiency of data error correction for solid-state drives and saves error correction time.
Smart Images

Figure CN2025101817_29012026_PF_FP_ABST
Abstract
Description
Solid-state drive data error correction methods, devices, equipment and readable storage media
[0001] Cross-reference to related applications
[0002] This disclosure claims priority to Chinese Patent Application No. 2024110090188, filed on July 26, 2024, entitled "Solid State Drive Data Error Correction Method, Apparatus, Device and Readable Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of data storage, and in particular to a method, apparatus, device, and readable storage medium for correcting data errors on a solid-state drive. Background Technology
[0004] Solid State Drives (SSDs) inevitably experience read errors due to internal and external factors when used in various complex environments. The efficiency of SSD error correction directly impacts the user experience, and in more serious cases, error correction timeouts can occur, leading to the host failing to recognize the drive. As the most common and practical error correction method in SSD systems, its principle is to continuously offset the flash memory reference voltage and then perform reread operations at that voltage until error correction is successful.
[0005] The existing solid-state drive (SSD) data error correction process requires obtaining the data status from an external cache, setting the voltage, and then starting to reread. All operations are performed serially, which greatly increases the error correction time if there are many rereads. Summary of the Invention
[0006] To address the aforementioned technical problems, this disclosure provides a method, apparatus, device, and readable storage medium for correcting data errors in a solid-state drive.
[0007] Embodiments of this disclosure provide a method for correcting data errors in a solid-state drive, the method comprising:
[0008] S1. Traverse the entire reread table to set the threshold for the number of reread commands to be issued;
[0009] S2. Send the first set of reread commands to the preset target page. The first set of reread commands includes: a first read voltage value setting command and a normal read command.
[0010] S3. If the first set of reread commands ends, a second set of reread commands is sent to the preset target page, and the data status of the preset target page after the first set of reread commands executes the normal read command is obtained at the same time. The second set of reread commands includes a second read voltage value setting command and a flash cache read command.
[0011] S4. Determine whether the number of reread commands issued has reached the threshold. If the number of reread commands issued has not reached the threshold, issue a new set of reread commands to the preset target page and simultaneously obtain the data status of the preset target page after the previous set of reread commands executed the flash cache read command. The new set of reread commands includes: the corresponding read voltage value setting command and the flash cache read command.
[0012] S5. Repeat S4 until the data status of the preset target page is corrected, then the error correction is successful.
[0013] In one embodiment, if the number of reread commands issued does not reach the threshold, a new set of reread commands is issued to the preset target page. The method further includes:
[0014] If the number of reread commands issued reaches the threshold, the error correction process ends.
[0015] In one embodiment, the first read voltage value in the first set of reread commands, the second read voltage value in the second set of reread commands, and the corresponding read voltage value in the new set of reread commands are different values.
[0016] In one embodiment, before sending the first set of reread commands, the second set of reread commands, or a new set of reread commands to the preset target page, the method further includes:
[0017] The first read voltage value setting command and the normal read command, the second read voltage value setting command and the flash memory cache read command, as well as the corresponding read voltage value setting command and flash memory cache read command are combined into an atomic operation by using opcodes.
[0018] In one embodiment, simultaneously acquiring the data status of the preset target page after the previous set of reread commands executed the flash cache read command includes:
[0019] The data obtained by executing the reread command is transferred from the internal cache to the flash controller;
[0020] The flash memory controller performs error correction on the data and transmits the corrected data to an external cache.
[0021] The firmware retrieves the data status of the preset target page from the external cache.
[0022] In one embodiment, after the error correction is successful, the method further includes:
[0023] Terminate the current flash cache read command;
[0024] A separate command to set the read voltage value is issued to set the read voltage value of the preset target page to the preset voltage value.
[0025] In one embodiment, after the error correction process ends if the number of reread commands issued reaches the threshold, the method further includes:
[0026] Mark the preset target page;
[0027] A separate command to set the read voltage value is issued to set the read voltage value of the preset target page to the preset voltage value.
[0028] Embodiments of this disclosure also provide a solid-state drive (SSD) data error correction device, the SSD data error correction device comprising:
[0029] Configure the module to iterate through the entire reread table and set the threshold for the number of reread commands to be issued;
[0030] The first sending module is configured to send the first set of reread commands to a preset target page. The first set of reread commands includes: a first read voltage value setting command and a normal read command.
[0031] The second sending module is configured to determine if the first set of reread commands has ended, and then send the second set of reread commands to the preset target page, and at the same time obtain the data status of the preset target page after the first set of reread commands has executed the normal read command. The second set of reread commands includes a second read voltage value setting command and a flash cache read command.
[0032] The judgment module is configured to determine whether the number of reread commands issued has reached the threshold. If the number of reread commands issued has not reached the threshold, a new set of reread commands is issued to the preset target page, and the data status of the preset target page after the previous set of reread commands executed the flash cache read command is obtained at the same time. The new set of reread commands includes: the corresponding read voltage value setting command and the flash cache read command.
[0033] The loop delivery module is configured to execute S4 in a loop until the data status of the preset target page is corrected, then the error correction is successful.
[0034] Embodiments of this disclosure also provide an electronic device, including a memory and a processor, the memory being configured to store a computer program that executes the solid-state drive data error correction method provided in the first aspect when the processor is running.
[0035] Embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when run on a processor, executes the solid-state drive data error correction method provided in the first aspect.
[0036] The solid-state drive data error correction method provided in this disclosure comprises the following steps: S1. Traversing the entire reread table to set a threshold for the number of reread commands to be issued; S2. Issuing a first set of reread commands to a preset target page, the first set of reread commands including a first read voltage value setting command and a normal read command; S3. If the first set of reread commands ends, issuing a second set of reread commands to the preset target page, and simultaneously obtaining the data status of the preset target page after the first set of reread commands executes the normal read command, the second set of reread commands including a second read voltage value setting command and a flash cache read command; S4. Determining whether the number of reread commands issued has reached the threshold, if the number of reread commands issued has not reached the threshold, issuing a new set of reread commands to the preset target page, and simultaneously obtaining the data status of the preset target page after the previous set of reread commands executes the flash cache read command, the new set of reread commands including a corresponding read voltage value setting command and a flash cache read command; S5. Repeating S4 until the data status of the preset target page is corrected data status, then the error correction is successful. This solution improves the efficiency of solid-state drive data error correction by issuing a new set of reread commands when the reread command ends, while simultaneously obtaining the data status after the previous set of reread commands, and repeating this process until the data error correction is successful. It does not require knowing the data status after the previous set of reread commands before issuing a new set of reread commands. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as a limitation on the scope of protection of this disclosure. In the various drawings, similar components are numbered similarly.
[0038] Figure 1 shows a flowchart of a solid-state drive data error correction method provided in an embodiment of the present disclosure;
[0039] Figure 2 shows another schematic flowchart of the solid-state drive data error correction method provided in an embodiment of this disclosure;
[0040] Figure 3 shows a schematic diagram of the error correction stage of the solid-state drive data error correction method provided in the embodiments of this disclosure;
[0041] Figure 4 shows a schematic diagram of a solid-state drive data error correction device provided in an embodiment of this disclosure.
[0042] Icons: 400 - Solid State Drive Data Error Correction Device, 401 - Setting Module, 402 - First Sending Module, 403 - Second Sending Module, 404 - Judgment Module, 405 - Cyclic Sending Module. Detailed Implementation
[0043] The technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments.
[0044] The components of the embodiments of this disclosure, typically described and illustrated in the accompanying drawings, can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the drawings is not intended to limit the scope of the claimed disclosure, but merely to illustrate selected embodiments of the disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of this disclosure.
[0045] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this disclosure, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0046] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0047] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this disclosure pertain. Terms (such as those defined in a generally used dictionary) shall be interpreted as having the same meaning as in the context of the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this disclosure.
[0048] This disclosure provides a method for correcting data errors in a solid-state drive (SSD). During the error correction process, while the SSD firmware determines whether the data has entered an uncorrectable state, the SSD firmware issues voltage setting commands and read commands to reread (Read-Retry) the data on the SSD's storage unit. This concurrent approach corrects the data on the SSD, saving error correction time.
[0049] Referring to Figure 1, a solid-state drive data error correction method includes steps S1-S6:
[0050] S1: Traverse the entire reread table to set the threshold for the number of reread commands to be issued.
[0051] In this embodiment, when a data read error occurs on the solid-state drive (SSD), a reread process is initiated to correct the error. The SSD firmware (FW) sends a SetFeature Voltage Command and a Read Command to the Flash Memory Controller (FC) to read data from the Nand array and store the read data in the Nand cache. It then waits for a second cache read command, sending the data back to the Flash Memory Controller for decoding. The Flash Memory Controller transmits the decoded data to the external host cache. The firmware retrieves the data read result from the external cache and determines whether an uncorrectable (UNC) error occurred during the data read.
[0052] Optionally, the entire reread table can be traversed to obtain all voltage values in the reread table, and different voltage values can be selected from the reread table in turn to reread (read-retry) the data until a voltage that can be successfully read is found, or until all voltage values have been tried.
[0053] In one embodiment, the above-mentioned step of traversing the entire reread table to set the threshold for the number of reread commands includes: traversing the reread table and determining that the maximum value of the selectable voltage in the reread table is the threshold for the number of reread commands to be issued.
[0054] In this embodiment, the reread table is generally a reread table provided by the manufacturer or a reread table tested by the media team. It contains more than one hundred rows of voltage values, and the threshold for the number of reread commands issued is the maximum number of selectable voltages in the reread table.
[0055] S2: Send the first set of reread commands to the preset target page. The first set of reread commands includes: the first read voltage value setting command and the normal read command.
[0056] In this embodiment, the firmware locates the physical address of the logical unit page (i.e., the preset target page) where the solid-state drive has a data error, and sends a first set of reread commands to the flash memory controller based on the physical address of the preset target page. The first set of reread commands includes a first read voltage value setting command (SetFeature Voltage1 Command) and a normal read command (Normal Read(page(x))). The time taken for the first read voltage value setting command is t. SetF (Set Feature time) is used to set the Nand reference voltage. The normal read command includes parameters such as the address and length of the preset target page to be read, configuring it to read data normally from the Nand array into the Nand internal buffer. The time taken is t. R (Read time)
[0057] In one embodiment, the first read voltage value in the first set of reread commands, the second read voltage value in the second set of reread commands, and the corresponding read voltage value in the new set of reread commands are different values.
[0058] In this embodiment, the read voltage value Voltage1 is set according to the first row of parameters in the reread table, the second read voltage value Voltage2 is set according to the second row of parameters in the reread table, and the read voltage value VoltageX corresponding to the new set of reread commands are different values. Since different voltage value settings can affect the amount of charge stored in the flash memory chip, and thus affect the read data value, by adjusting the read voltage value, we attempt to correct the read error of the preset target page of the solid-state drive and improve the accuracy of data reading.
[0059] In one embodiment, before sending the first set of reread commands, the second set of reread commands, or a new set of reread commands to the preset target page, the method further includes: combining the first read voltage value setting command and the normal read command, the second read voltage value setting command and the flash cache read command, and the corresponding read voltage value setting command and flash cache read command into an atomic operation by using opcodes.
[0060] In this embodiment, the error correction module in the firmware combines the read voltage setting command and the normal read command (or flash cache read command) into an atomic operation using opcodes. An atomic operation is an indivisible minimum unit of operation; that is, the operation is either fully executed or not executed at all, and cannot end at any intermediate stage. In this way, the synchronization between the correct setting of the read voltage value and the data read operation can be ensured, avoiding read errors caused by improper voltage settings.
[0061] S3: If the first set of reread commands ends, a second set of reread commands is sent to the preset target page, and the data status of the preset target page after the normal read command is executed is obtained at the same time. The second set of reread commands includes a second read voltage value setting command and a flash cache read command.
[0062] In this embodiment, the first read voltage setting command and the normal read command in the first set of reread commands are executed first. After execution, the second set of reread commands is then issued, including the second read voltage setting command (SetFeature Voltage2 Command) and the flash cache read command (Nand Cache Read(page(x))). The time spent by the second read voltage setting command to set the read voltage of the preset target page is t. SetF The flash cache read command will reread the data in the Nand internal cache, which takes time t.R Because the firmware issues a data status output command (Data Out Command(page(x))) while the second set of commands is rereading data, it retrieves whether UNC errors occurred in the data read by the normal read command during the first reread from the external buffer, thus saving time in the second buffer read command. DMA t ECC and t Trans .
[0063] S4: Determine whether the number of reread commands issued has reached the threshold. If the number of reread commands issued has not reached the threshold, then issue a new set of reread commands to the preset target page, and at the same time obtain the data status of the preset target page after the previous set of reread commands executed the flash cache read command. The new set of reread commands includes: the corresponding read voltage value setting command and the flash cache read command.
[0064] In this embodiment, upon receiving a UNC error from the data status output command, it is determined whether the number of reread commands issued has reached a previously set threshold. Based on the determination result, it is decided whether a new set of reread commands needs to be issued. If the number of reread commands issued has not reached the threshold, the error correction module in the firmware will issue a new set of reread commands to the preset target page of the solid-state drive. That is, in this step, the new set of reread commands is the third set of reread commands, including the third read voltage setting command (SetFeature(Voltage3)Command), which takes time t. SetF And the data in the internal Nand cache will be reread via the flash cache read command (Nand Cache Read(page(x))), which takes time t. R Simultaneously, a data status output command is issued to obtain the data status of the preset target page read by the flash cache read command in the second set of reread commands. The data status is used to determine whether UNC error data has occurred, thereby saving time in the third cache read command. DMA t ECC and t Trans .
[0065] It's worth noting that as soon as the previous set of reread commands finishes, a new set of reread commands is immediately issued to reread the storage units of the solid-state drive (SSD). At this time, the data read by the previous set of reread commands is transmitted to the flash memory controller. The flash memory controller decodes the data and uploads it to the SSD's external cache. The firmware then retrieves information from the external cache to check if UNC errors still exist in the data read previously. In this way, the step of rereading data with a new set of reread commands is executed concurrently with the step of checking for UNC errors after executing the previous set of reread commands, saving error correction time and improving error correction efficiency.
[0066] Referring to Figure 2, in one embodiment, the step of simultaneously acquiring the data status of the preset target page after the previous set of reread commands executes the flash cache read command includes steps S201-S203:
[0067] S201: Transfer the data obtained from the internal cache to the flash controller after executing the reread command.
[0068] In this embodiment, after executing the reread command, the data of the preset target page is read into the internal cache. The flash controller is responsible for transferring the data from the NAND internal cache to the flash controller, which takes time t. DMA (Direct Memory Access time). It should be noted that Direct Memory Access (DMA) technology allows the hardware subsystem to transfer data directly between memory and other system components without the intervention of the central processing unit. Using DMA technology can reduce the CPU load and improve the efficiency of data transfer.
[0069] S202: The data is corrected for errors by the flash memory controller, and the corrected data is transmitted to an external cache.
[0070] In this embodiment, the flash memory controller receives data from the internal buffer and decodes it, which takes time t. ECC (Error Correcting Code time); The time taken for the data to be transmitted to the external host cache after decoding is t. Trans (Transfer time)
[0071] S203: Obtain the data status of the preset target page from the external cache through the firmware.
[0072] Optionally, obtaining the data status of the preset target page from the external cache via firmware includes: obtaining the data status of the preset target page as an uncorrectable error based on an error flag or interruption via firmware.
[0073] In this embodiment, if the data is not decoded, the data status will return to an uncorrectable data status, triggering an error flag or interruption. The firmware obtains the data status of the preset target page as UNC error through the error flag or interruption.
[0074] S5. Repeat S4 until the data state of the preset target page does not show an uncorrectable data state, then the error correction is successful.
[0075] In this embodiment, a new set of reread commands is continuously issued, while simultaneously obtaining the data status of the preset target page obtained after the previous set of reread commands executed the flash cache read command. This continues until the data status of the preset target page obtained by the data status output command is correctable, indicating successful error correction. The new set of reread commands also needs to obtain the corresponding read voltage value from the reread table and set the corresponding read voltage value setting command and flash cache read command.
[0076] Referring to Figure 3, if the reread command is issued N times and the error correction is successful, then the total time spent on this error correction is: t TOTAL = (N-1)×(t) SetF +t R )+t SetF +t R +t DMA +t ECC +t Trans
[0077] Among them, t SetF Setting the time for the biased NAND flash read reference voltage (setting time in Figure 3), t R The time for rereading Nand array data or Nand buffer data (read time in Figure 3), t DMA The time for data transfer from the internal NAND cache to the flash controller, i.e., the direct storage access time (access time in Figure 3), t ECC For the flash controller decoding time (decoding time in Figure 3), t Trans This refers to the transfer time from the flash controller to the external host cache (transfer time in Figure 3).
[0078] In one embodiment, after the error correction is successful, the method further includes: terminating the current flash memory cache read command; and issuing a separate read voltage value setting command to set the read voltage value of the preset target page to a preset voltage value.
[0079] In this embodiment, when the previous set of reread commands ends, the firmware obtains the data status from the external cache through the Data Out Command (page(x)). If no UNC error occurs in the data status, the firmware terminates the current flash cache read command and issues a preset voltage value setting command (SetFeature Command) to set the read voltage value of the preset target page to the preset voltage value. The NAND of the solid-state drive is restored to the preset state. This process includes resetting time t. Reset (Reset time) and voltage setting time t SetF .
[0080] Optionally, terminating the current flash cache read command includes: sending a logic unit reset command to the preset target page to terminate the read operation being executed by the current flash cache read command.
[0081] When the previous set of reread commands ends, the firmware obtains the data status from the external cache through the data status output command (Data Out Command(page(x))). If no UNC error occurs in the data status, the firmware sends a logical unit reset command (Reset Lun Command) to the preset target page of the solid-state drive to terminate the read operation being executed by the current flash cache read command in the current reread command.
[0082] In one embodiment, if the number of reread commands issued does not reach the threshold, a new set of reread commands is issued to the preset target page. The method further includes: if the number of reread commands issued reaches the threshold, the error correction process is terminated.
[0083] In this embodiment, the firmware rereads the data of the preset target page by selecting the read voltage value from the reread table, and ends the error correction process when the number of reread commands sent reaches the threshold.
[0084] In one embodiment, the step of ending the error correction process if the number of reread commands issued reaches the threshold includes: ending the error correction process if each voltage in the reread table is used to read voltage data.
[0085] In this embodiment, the firmware rereads the data of the preset target page by selecting the read voltage value from the reread table. Since the read voltage in each issued read voltage setting command is different, the error correction process ends when each voltage in the reread table is used as the read voltage to read data.
[0086] In one embodiment, after the error correction process ends if the number of reread commands issued reaches the threshold, the method further includes: marking the preset target page; issuing a separate read voltage value setting command to set the read voltage value of the preset target page to a preset voltage value.
[0087] In this embodiment, when the number of reread commands reaches a threshold, if the data is not successfully reread and a UNC error still occurs, it indicates that all read voltages in the reread table are invalid, and the error correction process will end. The flash memory controller will mark the preset target page, and the firmware will issue a preset voltage value setting command (SetFeature Command) to set the read voltage value of the preset target page to the preset voltage value. By restoring to the preset voltage, the reliability of subsequent NAND read operations is ensured, and errors caused by improper voltage settings are reduced.
[0088] The solid-state drive data error correction method provided in this embodiment includes the following steps: S1. Traverse the entire reread table and set a threshold for the number of reread commands to be issued; S2. Issue a first set of reread commands to a preset target page, the first set of reread commands including a first read voltage value setting command and a normal read command; S3. If the first set of reread commands ends, issue a second set of reread commands to the preset target page, and simultaneously obtain the data status of the preset target page after the first set of reread commands executes the normal read command, the second set of reread commands including a second read voltage value setting command and a flash cache read command; S4. Determine whether the number of reread commands issued has reached the threshold. If the number of reread commands issued has not reached the threshold, issue a new set of reread commands to the preset target page, and simultaneously obtain the data status of the preset target page after the previous set of reread commands executes the flash cache read command, the new set of reread commands including a corresponding read voltage value setting command and a flash cache read command; S5. Repeatedly execute S4 until the data status of the preset target page is corrected data status, then the error correction is successful. This solution improves the efficiency of solid-state drive data error correction by issuing a new set of reread commands when the reread command ends, while simultaneously obtaining the data status after the previous set of reread commands, and repeating this process until the data error correction is successful. It does not require knowing the data status after the previous set of reread commands before issuing a new set of reread commands.
[0089] Furthermore, this disclosure provides a solid-state drive data error correction device for use in electronic devices.
[0090] As shown in Figure 4, the solid-state drive data error correction device 400 includes:
[0091] Configure module 401 to traverse the entire reread table and set the threshold for the number of reread commands to be issued;
[0092] The first sending module 402 is configured to send a first set of reread commands to a preset target page. The first set of reread commands includes: a first read voltage value setting command and a normal read command.
[0093] The second sending module 403 is configured to determine if the first set of reread commands ends, and then send the second set of reread commands to the preset target page, and at the same time obtain the data status of the preset target page after the first set of reread commands executes the normal read command. The second set of reread commands includes a second read voltage value setting command and a flash cache read command.
[0094] The judgment module 404 is configured to determine whether the number of reread commands issued has reached the threshold. If the number of reread commands issued has not reached the threshold, a new set of reread commands is issued to the preset target page, and the data status of the preset target page after the previous set of reread commands executes the flash cache read command is obtained at the same time. The new set of reread commands includes: the corresponding read voltage value setting command and the flash cache read command.
[0095] The loop delivery module 405 is configured to execute S4 in a loop until the data status of the preset target page is corrected, then the error correction is successful.
[0096] Optionally, the judgment module 404 shown is further configured to determine if the number of reread commands issued reaches the threshold, and then terminate the error correction process.
[0097] Optionally, the setting module 401 shown is further configured to select different values for the first read voltage value in the first group of reread commands, the second read voltage value in the second group of reread commands, and the corresponding read voltage value in the new group of reread commands.
[0098] Optionally, the first sending module 402, the second sending module 403, or the cyclic sending module 405 shown are further configured to combine the first read voltage value setting command and the normal read command, the second read voltage value setting command and the flash memory cache read command, and the corresponding read voltage value setting command and flash memory cache read command into an atomic operation through opcodes.
[0099] Optionally, the second sending module 403 or the cyclic sending module 405 shown is further configured to transmit the data obtained by executing the reread command from the internal cache to the flash memory controller; perform error correction on the data through the flash memory controller, and transmit the corrected data to the external cache; and obtain the data status of the preset target page from the external cache through the firmware.
[0100] Optionally, the second sending module 403 or the cyclic sending module 405 shown is further configured to obtain the data status of the preset target page as an uncorrectable error based on an error flag or interruption through firmware.
[0101] Optionally, the cyclically issuing module 405 shown is also configured to terminate the current flash memory cache read command; and separately issue a read voltage value setting command to set the read voltage value of the preset target page to a preset voltage value.
[0102] Optionally, the loop-based delivery module 405 shown is further configured to send a logic unit reset command to the preset target page to terminate the read operation being executed by the current flash cache read command.
[0103] Optionally, the judgment module 404 shown is further configured to mark the preset target page; and to issue a separate read voltage value setting command to set the read voltage value of the preset target page to a preset voltage value.
[0104] Optionally, the setting module 401 shown is further configured to traverse the reread table and determine that the maximum value of the selectable voltage in the reread table is a threshold for the number of times a reread command is issued.
[0105] Optionally, the judgment module 404 shown is further configured to terminate the error correction process if each voltage in the reread table is used to read voltage data.
[0106] The solid-state drive data error correction device 400 provided in this embodiment can implement the above-mentioned solid-state drive data error correction method. To avoid repetition, it will not be described again here.
[0107] The solid-state drive data error correction device provided in this embodiment includes the following steps: S1. Traversing the entire reread table to set a threshold for the number of reread commands to be issued; S2. Issuing a first set of reread commands to a preset target page, the first set of reread commands including a first read voltage value setting command and a normal read command; S3. If the first set of reread commands ends, issuing a second set of reread commands to the preset target page, and simultaneously obtaining the data status of the preset target page after the first set of reread commands executes the normal read command, the second set of reread commands including a second read voltage value setting command and a flash cache read command; S4. Determining whether the number of reread commands issued has reached the threshold, if the number of reread commands issued has not reached the threshold, issuing a new set of reread commands to the preset target page, and simultaneously obtaining the data status of the preset target page after the previous set of reread commands executes the flash cache read command, the new set of reread commands including a corresponding read voltage value setting command and a flash cache read command; S5. Repeating S4 until the data status of the preset target page is corrected data, then the error correction is successful. This solution improves the efficiency of solid-state drive data error correction by issuing a new set of reread commands when the reread command ends, while simultaneously obtaining the data status after the previous set of reread commands, and repeating this process until the data error correction is successful. It does not require knowing the data status after the previous set of reread commands before issuing a new set of reread commands.
[0108] Furthermore, this disclosure provides an electronic device including a memory and a processor. The memory stores a computer program, which executes the above-described solid-state drive data error correction method when run on the processor.
[0109] The electronic device provided in this embodiment can perform the steps of the above-described solid-state drive data error correction method. To avoid repetition, these steps will not be repeated here.
[0110] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described solid-state drive data error correction method.
[0111] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0112] The computer-readable storage medium provided in this embodiment can implement the above-described solid-state drive data error correction method, and will not be described again here to avoid repetition.
[0113] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0114] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of 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. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0115] The embodiments of this disclosure have been described above with reference to the accompanying drawings. However, this disclosure is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this disclosure without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this disclosure. Industrial applicability
[0116] By adopting the above scheme, a new set of reread commands is issued when the reread command ends, and the data status after the previous set of rereads is obtained at the same time. This process is repeated until the data error correction is successful. There is no need to know the data status after the previous set of rereads before issuing a new set of reread commands, which improves the efficiency of solid-state drive data error correction.
Claims
1. A solid state drive data correction method, characterized in that, The method comprises: S1, setting a threshold of the number of re-reading command issuing for the whole re-reading table; S2, issuing a first group of re-reading commands to the preset target page, wherein the first group of re-reading commands comprises a first read voltage value setting command and a normal read command; S3, if the first group of re-reading commands ends, issuing a second group of re-reading commands to the preset target page, and simultaneously obtaining the data state of the preset target page after the first group of re-reading commands executes the normal read command, wherein the second group of re-reading commands comprises a second read voltage value setting command and a flash cache read command; S4, judging whether the number of re-reading command issuing reaches the threshold, if the number of re-reading command issuing does not reach the threshold, issuing a new group of re-reading commands to the preset target page, and simultaneously obtaining the data state of the preset target page after the last group of re-reading commands executes the flash cache read command, wherein the new group of re-reading commands comprises a corresponding read voltage value setting command and a flash cache read command; S5, repeatedly executing S4 until the data state of the preset target page is an error-corrected data state, and then the error correction is successful.
2. The method of claim 1, wherein, If the number of re-reading command issuing reaches the threshold, the method further comprises: ending the error correction process.
3. The method of claim 1, wherein, The first read voltage value in the first group of re-reading commands, the second read voltage value in the second group of re-reading commands, and the corresponding read voltage value in the new group of re-reading commands are different values.
4. The method of claim 1, wherein, Before issuing the first group of re-reading commands, the second group of re-reading commands, or the new group of re-reading commands to the preset target page, the method further comprises: combining the first read voltage value setting command and the normal read command, the second read voltage value setting command and the flash cache read command, and the corresponding read voltage value setting command and the flash cache read command into one atomic operation through an operation code.
5. The method of claim 1, wherein, The simultaneous obtaining of the data state of the preset target page after the last group of re-reading commands executes the flash cache read command comprises: transferring the data obtained by executing the re-reading command from an internal cache area to a flash controller; correcting the data through the flash controller, and transferring the corrected data to an external cache area; obtaining the data state of the preset target page from the external cache area through firmware.
6. The method of claim 5, wherein, The obtaining of the data state of the preset target page from the external cache area through firmware comprises: obtaining the data state of the preset target page as uncorrectable error through firmware according to an error flag or an interruption.
7. The method of claim 1, wherein, After the error correction is successful, the method further comprises: terminating the current flash cache read command; issuing a read voltage value setting command alone to set the read voltage value of the preset target page to a preset voltage value.
8. The method of claim 7, wherein, The termination of the current flash cache read command comprises: issuing a logical unit reset command to the preset target page to terminate the read operation being executed by the current flash cache read command.
9. The method of claim 2, wherein, After the number of re-reading command issuing reaches the threshold and the error correction process ends, the method further comprises: marking the preset target page; The read voltage value setting command is issued alone, and the read voltage value of the preset target page is set as the preset voltage value.
10. The method according to any one of claims 1 to 9, characterized in that, The threshold of the number of times of issuing the re-reading command is set by traversing the whole re-reading table, and the threshold includes: The maximum value of the optional voltage in the re-reading table is determined by traversing the re-reading table, and the maximum value is the threshold of the number of times of issuing the re-reading command.
11. The method according to any one of claims 1 to 10, characterized in that, If the number of times of issuing the re-reading command reaches the threshold, the error correction process is ended, and the ending includes: If each voltage in the re-reading table is used for reading data, the error correction process is ended.
12. A solid state drive data correction apparatus, comprising: The device includes: A setting module is configured to set the threshold of the number of times of issuing the re-reading command by traversing the whole re-reading table; A first issuing module is configured to issue a first group of re-reading commands to the preset target page, and the first group of re-reading commands includes a first read voltage value setting command and a normal read command; A second issuing module is configured to determine whether the first group of re-reading commands is ended, and if the first group of re-reading commands is ended, a second group of re-reading commands is issued to the preset target page, and the data state of the preset target page after the first group of re-reading commands is executed to perform the normal read command is obtained, and the second group of re-reading commands includes a second read voltage value setting command and a flash cache read command; A judging module is configured to determine whether the number of times of issuing the re-reading command reaches the threshold, and if the number of times of issuing the re-reading command does not reach the threshold, a new group of re-reading commands is issued to the preset target page, and the data state of the preset target page after the last group of re-reading commands is executed to perform the flash cache read command is obtained, and the new group of re-reading commands includes a corresponding read voltage value setting command and a flash cache read command; A loop issuing module is configured to execute S4 in a loop until the data state of the preset target page is an error-corrected data state, and then the error correction is successful.
13. An electronic device, comprising: The memory stores a computer program, and the computer program executes the solid state disk data error correction method in any one of claims 1 to 11 when the processor runs.
14. A computer-readable storage medium, characterized in that, The memory stores a computer program, and the computer program executes the solid state disk data error correction method in any one of claims 1 to 11 when the processor runs.
Citation Information
Patent Citations
Reread command processing method, flash memory controller and solid state disk
CN112596681A
Data error correction processing method and device for solid state disk
CN113946469A
Solid state disk data error correction method, device and equipment and readable storage medium
CN118535373A
Pipelined error correction for minimizing disk re-reading in hard drives
US6061824A