Solid state drive data error correction method, device, equipment and readable storage medium

In the error correction process of the solid state drive, a new set of reread commands are concurrently issued at the end of the reread command and the data status is obtained, and the cycle is continued until the error correction is successful. This solves the problem of too long error correction time in the existing technology and improves the efficiency of the error correction process. Improves the data error correction efficiency and stability of solid-state drives.

CN118535373BActive Publication Date: 2024-10-15BIWIN STORAGE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411009018.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-10-15
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

The existing solid-state drive data error correction process requires serial execution of operations, resulting in a long error correction time. Especially when the number of rereads is high, error correction may time out and the host cannot recognize the disk.

Method used

By issuing a new set of reread commands at the end of the reread command, and obtaining the data status of the previous set of rereads at the same time, and looping until the data error correction is successful, error correction is performed in a concurrent manner, avoiding the need to wait for the last set of reread data. The status then issues a new set of reread commands.

Benefits of technology

It improves the efficiency of solid-state drive data error correction, shortens the error correction time, avoids error correction timeout, and ensures the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535373B_ABST
    Figure CN118535373B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and readable storage medium for data error correction of a solid-state hard disk, belonging to the field of data storage. The method includes: S1, setting a threshold for the number of times reread commands are issued; S2, issuing a first group of reread commands to a preset target page; S3, if the first group of reread commands ends, issuing a second group of reread commands to the preset target page, and simultaneously obtaining the data status after the first group of reread commands execute normal read commands; S4, if the number of times reread commands are issued does not reach the threshold, issuing a new group of reread commands, and simultaneously obtaining the data status of the previous group of reread commands executing flash cache read commands; S5, looping and executing S4 until the data status is the corrected data status, then the error correction is successful. This scheme improves the efficiency of data error correction of solid-state hard disks by issuing a new group of reread commands at the end of the reread commands, without knowing the data status of the previous group before issuing a new group of reread commands.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage, and in particular to a solid state hard disk data error correction method, device, equipment and readable storage medium. Background Art

[0002] When a solid state drive (SSD) is used in various complex environments, it is inevitable that read errors will occur due to internal and external factors. At this time, the error correction efficiency of the solid state drive will directly affect the customer experience. More seriously, the error correction timeout phenomenon will occur, resulting in the host failing to recognize the disk. As the most common and practical error correction method in the solid state drive error correction system, its principle is to continuously offset the flash memory reference voltage and then reread the operation at this voltage until the error correction is successful.

[0003] The data error correction process of the solid-state hard disk in the prior art needs to obtain the data status from the external cache, then set the voltage and start rereading. All operations are performed serially. If the number of rereads is large, the error correction time is greatly increased. Summary of the invention

[0004] In order to solve the above technical problems, the embodiments of the present application provide a solid state hard disk data error correction method, device, equipment and readable storage medium.

[0005] In a first aspect, an embodiment of the present application provides a solid state drive data error correction method, the method comprising:

[0006] S1, traverse the entire reread table to set the threshold of the number of times the reread command is issued;

[0007] S2, issuing a first group of reread commands to a preset target page, wherein the first group of reread commands includes: a first read voltage value setting command and a normal read command;

[0008] S3. If the first group of reread commands ends, a second group of reread commands is issued to the preset target page, and a data state of the preset target page after the first group of reread commands executes a normal read command is simultaneously obtained, wherein the second group of reread commands includes a second read voltage value setting command and a flash cache read command;

[0009] S4, determining whether the number of times the reread commands are issued reaches the threshold value, if the number of times the reread commands are issued does not reach the threshold value, issuing a new set of reread commands to the preset target page, and simultaneously obtaining the data state 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: corresponding read voltage value setting commands and flash cache read commands;

[0010] S5, executing S4 in a loop until the data state of the preset target page is an error-corrected data state, and the error correction is successful.

[0011] In one implementation, if the number of times the reread commands are issued does not reach the threshold, a new set of reread commands is issued to the preset target page, and the method further includes:

[0012] If the number of times the re-read command is issued reaches the threshold, the error correction process ends.

[0013] In one embodiment, the first read voltage value in the first set of re-read commands, the second read voltage value in the second set of re-read commands, and the corresponding read voltage value in the new set of re-read commands are different values.

[0014] In one implementation, before issuing the first group of reread commands, the second group of reread commands, or a new group of reread commands to the preset target page, the method further includes:

[0015] 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 are respectively combined into one atomic operation through an operation code.

[0016] In one embodiment, the simultaneously acquiring the data state of the preset target page after the previous set of reread commands executes the flash cache read command includes:

[0017] transferring data obtained by executing a reread command from an internal cache area to a flash memory controller;

[0018] Correcting errors of the data by the flash memory controller and transmitting the corrected data to an external buffer area;

[0019] The data state of the preset target page is obtained from the external buffer area through firmware.

[0020] In one implementation, after the error correction is successful, the method further includes:

[0021] Terminate the current flash cache read command;

[0022] A read voltage value setting command is issued separately to set the read voltage value of the preset target page to a preset voltage value.

[0023] In one embodiment, if the number of times the reread command is issued reaches the threshold, after the error correction process is terminated, the method further includes:

[0024] Marking the preset target page;

[0025] A read voltage value setting command is issued separately to set the read voltage value of the preset target page to a preset voltage value.

[0026] In a second aspect, an embodiment of the present application provides a solid state hard disk data error correction device, the solid state hard disk data error correction device comprising:

[0027] A setting module is used to traverse the entire reread table to set a threshold for the number of times a reread command is issued;

[0028] A first issuing module is used to issue a first group of reread commands to a preset target page, wherein the first group of reread commands includes: a first read voltage value setting command and a normal read command;

[0029] A second issuing module, used for determining if the first group of reread commands is finished, issuing a second group of reread commands to the preset target page, and simultaneously acquiring a data state of the preset target page after the first group of reread commands executes a normal read command, wherein the second group of reread commands includes a second read voltage value setting command and a flash cache read command;

[0030] A judgment module, used for judging whether the number of times the reread commands are issued reaches the threshold value, and if the number of times the reread commands are issued does not reach the threshold value, a new set of reread commands is issued to the preset target page, and at the same time, a data state of the preset target page after the previous set of reread commands executes the flash cache read command, wherein the new set of reread commands includes: a corresponding read voltage value setting command and a flash cache read command;

[0031] The cyclic sending module is used to execute S4 cyclically until the data state of the preset target page is an error-corrected data state, and the error correction is successful.

[0032] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is run by the processor, the solid-state hard disk data error correction method provided in the first aspect is executed.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when running on a processor, executes the solid-state hard disk data error correction method provided in the first aspect.

[0034] The solid-state hard disk data error correction method provided by the present application above, S1, traverse the entire reread table to set a threshold for the number of times reread commands are issued; S2, issue a first group of reread commands to a preset target page, the first group of reread commands including: a first read voltage value setting command and a normal read command; S3, if the first group of reread commands ends, issue a second group of reread commands to the preset target page, and simultaneously obtain the data state of the preset target page after the first group of reread commands execute the normal read command, the second group of reread commands including a second read voltage value setting command and a flash cache read command; S4, determine whether the number of times reread commands are issued reaches the threshold, if the number of times reread commands are issued does not reach the threshold, issue a new group of reread commands to the preset target page, and simultaneously obtain the data state of the preset target page after the previous group of reread commands execute the flash cache read command, the new group of reread commands including: a corresponding read voltage value setting command and a flash cache read command; S5, execute S4 in a loop until the data state of the preset target page is a corrected data state, 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 commands end, and simultaneously obtaining the data status after the previous set of rereads, and repeating this cycle 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, thereby improving the efficiency of solid-state drive data error correction. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. In each of the drawings, similar components are numbered similarly.

[0036] Figure 1 A schematic diagram of a process of a solid state drive data error correction method provided by an embodiment of the present application is shown;

[0037] Figure 2 Another schematic diagram of the process of the solid state drive data error correction method provided by the embodiment of the present application is shown;

[0038] Figure 3 A schematic diagram of the error correction phase of the solid state drive data error correction method provided by an embodiment of the present application is shown;

[0039] Figure 4 A structural schematic diagram of a solid state drive data error correction device provided in an embodiment of the present application is shown.

[0040] Icons: 400 - solid state hard disk data error correction device, 401 - setting module, 402 - first sending module, 403 - second sending module, 404 - judgment module, 405 - cyclic sending module. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0042] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0043] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.

[0044] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0045] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0046] Example 1

[0047] An embodiment of the present application provides a method for correcting data errors in a solid-state hard disk. In the error correction process, while the firmware of the solid-state hard disk determines whether the data is in an uncorrectable data state, the firmware of the solid-state hard disk can send a voltage value setting command and a read command to reread (Read-Retry) the data on the storage unit of the solid-state hard disk, and correct the data of the solid-state hard disk in a concurrent manner, thereby saving error correction time.

[0048] See also Figure 1 , a solid state hard disk data error correction method comprises steps S1-S6:

[0049] S1: traverse the entire reread table to set the threshold for the number of times the reread command is issued.

[0050] In this embodiment, when an error occurs in reading data from the solid-state drive, the reread process will be entered to start error correction. The firmware (Firmware, FW) of the solid-state drive sends a voltage value setting command (SetFeature Voltage Command) and a read command (Read Command) to the flash memory controller (Flash Memory Controller, FC), reads the data on the Nand array, and stores the read data in the Nand cache area, waiting for the second cache read command, and transmits the data back to the flash controller for decoding. The flash controller transmits the decoded data to the external host cache area, and the firmware obtains the data reading result from the external cache area to determine whether an uncorrectable (UNC) error occurs in the data reading.

[0051] Furthermore, the entire reread table is traversed to obtain all voltage values ​​in the reread table, and different voltage values ​​are selected from the reread table in turn to reread (Read-Retry) data until a voltage that can successfully read the data is found, or until all voltage values ​​are tried.

[0052] Optionally, the reread table is generally a reread table provided by the manufacturer and a reread table self-tested by the medium team, including more than one hundred rows of voltage values. Preferably, the threshold for issuing the reread command number is the maximum number of selectable voltages in the reread table.

[0053] S2: issuing a first group of reread commands to a preset target page, wherein the first group of reread commands includes: a first read voltage value setting command and a normal read command.

[0054] In this embodiment, the firmware locates the physical address of the logical unit page (i.e., the preset target page) where the data error occurs in the solid state drive, and sends a first set of reread commands to the flash memory controller according to 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 (SetFeature time), its function is to deflect the Nand read reference voltage. The normal read command includes the address and length of the preset target page to be read. It is used to read data from the Nand array to the Nand internal buffer area normally. The time taken is (Read time).

[0055] In one embodiment, the first read voltage value in the first set of re-read commands, the second read voltage value in the second set of re-read commands, and the corresponding read voltage value in the new set of re-read commands are different values.

[0056] 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 corresponding read voltage value VoltageX in a new set of reread commands is a different value. Because different voltage value settings can affect the amount of charge stored in the flash memory particles, and thus affect the read data value, therefore, by adjusting the read voltage value, an attempt is made to correct the read error of the preset target page of the solid-state drive and improve the accuracy of data reading.

[0057] In one embodiment, before sending the first group of reread commands, the second group of reread commands or a new group of reread commands to the preset target page, the method also 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 the flash cache read command into one atomic operation through an operation code.

[0058] In this embodiment, the error correction module in the firmware combines the read voltage value setting command and the normal read command (or flash cache read command) into an atomic operation through an opcode. The atomic operation is an indivisible minimum operation unit, that is, the operation is either fully executed or not executed at all, and it is impossible to end at a certain link in the middle. In this way, the synchronization between the correct setting of the read voltage value and the data reading operation can be ensured, avoiding read errors caused by improper voltage setting.

[0059] S3: If the first group of reread commands ends, a second group of reread commands is sent to the preset target page, and the data status of the preset target page after executing the normal read command is obtained, wherein the second group of reread commands includes a second read voltage value setting command and a flash cache read command.

[0060] In this embodiment, the first read voltage value setting command and the normal read command in the first group of reread commands are executed first. After the execution is completed, the second group of reread commands is then issued, including the second read voltage value setting command (SetFeatureVoltage2 Command) and the flash cache read command (Nand Cache Read (page(x))). The time taken by the second read voltage setting command to set the read voltage of the preset target page is , where the flash cache read command will reread the data in the Nand internal cache area, and the time it takes is Since the firmware issues a data status output command (Data Out Command (page(x))) while rereading the data in the second set of commands, it obtains from the external cache whether the data read by the normal read command during the first rereading has a CNC error, thereby saving time in the second cache read command. , and .

[0061] S4: Determine whether the number of times reread commands are issued reaches the threshold. If the number of times reread commands are issued does not reach 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 executing the flash cache read command is obtained. The new set of reread commands includes: corresponding read voltage value setting commands and flash cache read commands.

[0062] In this embodiment, according to the data status output command, it is known that a UNC error has occurred in the normal read command, and it will be determined whether the number of times the reread command is issued reaches the previously set threshold, and whether a new set of reread commands needs to be reissued is determined based on the judgment result. If the number of times the reread command is issued does not reach 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 , and the flash cache read command (Nand Cache Read (page (x))) will reread the data in the Nand internal cache area, which takes time , and at the same time send a data status output command to obtain the data status of the preset target page read by the flash cache read command in the second set of reread commands, and judge whether UNC error data occurs by the data status, thereby saving time in the third cache read command , and .

[0063] It should be added that when the last set of reread commands ends, a new set of reread commands is immediately issued to reread the storage unit of the solid-state drive. At this time, the data read by the last set of reread commands will be transmitted to the flash memory controller, which decodes the data and uploads it to the external cache area of ​​the solid-state drive. The firmware obtains from the external cache area whether the data reread last time still has UNC errors. In this way, the step of rereading the data again through a new set of reread commands is executed concurrently with the step of determining whether the data still has UNC errors after executing the last set of reread commands, which saves error correction time and improves error correction efficiency.

[0064] See also Figure 2 In one embodiment, the step of simultaneously obtaining the data state of the preset target page after the previous set of reread commands executes the flash cache read command includes steps S201-S203:

[0065] S201: Transmitting data obtained by executing a reread command from an internal cache area to a flash memory controller.

[0066] In this embodiment, after executing the reread command, the data of the preset target page is read into the internal cache area (Cache), and the flash memory controller is responsible for transferring the data from the Nand internal cache area to the flash memory controller, and the time spent is (Direct Memory Access time). When necessary, use Direct Memory Access (DMA) technology, which 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.

[0067] S202: Correct the errors of the data by the flash memory controller, and transfer the corrected data to an external cache area.

[0068] In this embodiment, the flash memory controller receives data from the internal buffer area and decodes it, which takes time (Error Correcting Code time); After the data is decoded, it is transferred to the external host buffer, which takes time (Transfer time).

[0069] S203: Acquire the data status of the preset target page from the external buffer area through firmware.

[0070] In this embodiment, if the data is not decoded, the data status will return to an uncorrectable data status, triggering an error flag or interrupt. The firmware obtains the data status of the preset target page as a UNC error through the error flag or interrupt.

[0071] S5, executing S4 in a loop until the data state of the preset target page does not contain uncorrectable data, indicating that the error correction is successful.

[0072] In this embodiment, a new set of reread commands is continuously issued, and the data state of the preset target page is obtained after the previous set of reread commands executes the flash cache read command, until the data state of the preset target page obtained by the data state output command is a correctable data state, indicating that the error correction is successful. The new set of reread commands also needs to obtain the corresponding read voltage value from the reread table, set the corresponding read voltage value setting command and the flash cache read command.

[0073] See also Figure 3 , if the number of reread commands issued is If the error correction is successful, the total time spent on this error correction is:

[0074] + +

[0075] in, Setting time for biasing Nand flash read reference voltage ( Figure 3 Setting time in Re-reading of Nand array data or Nand cache data ( Figure 3 ), The time for transferring from the Nand internal cache to the flash controller, that is, the direct storage access time ( Figure 3 ), Decode time for flash controller ( Figure 3 ), The time it takes to transfer from the flash controller to the external host buffer ( Figure 3 transmission time in ).

[0076] In one embodiment, after the error correction is successful, the method further includes: terminating the current flash cache read command; and issuing a read voltage value setting command separately to set the read voltage value of the preset target page to a preset voltage value.

[0077] In this embodiment, when the previous set of reread commands ends, the firmware obtains the data status from the external cache area through the data status output command (Data OutCommand (page(x))), and when the data status does not have a UNC error, 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, and sends a preset voltage value setting command (SetFeatureCommand) to set the read voltage value of the preset target page to the preset voltage value, and the NAND of the solid-state drive is restored to the preset state. This process includes resetting the time (Reset time) and voltage value setting time .

[0078] 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.

[0079] In this embodiment, the firmware re-reads the data of the preset target page by selecting a read voltage value from the re-read table. Because the read voltage in the read voltage setting command issued each time is different, when each voltage in the re-read table is used as a read voltage to read the data, the error correction process ends.

[0080] In one embodiment, if the number of times the reread command is issued reaches the threshold, after the error correction process is terminated, the method further includes: marking the preset target page; and separately issuing a read voltage value setting command to set the read voltage value of the preset target page to a preset voltage value.

[0081] In this embodiment, when the number of reread commands issued reaches the threshold, if the data is not reread successfully and a UNC error still occurs, it indicates that all read voltages in the reread table are invalid and the error correction process ends. 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.

[0082] The solid-state hard disk data error correction method provided in the present embodiment comprises the following steps: S1, traversing the entire reread table to set a threshold for the number of times reread commands are issued; S2, issuing a first group of reread commands to a preset target page, wherein the first group of reread commands includes: a first read voltage value setting command and a normal read command; S3, if the first group of reread commands ends, issuing a second group of reread commands to the preset target page, and simultaneously obtaining the data state of the preset target page after the first group of reread commands execute the normal read command, wherein the second group of reread commands includes a second read voltage value setting command and a flash cache read command; S4, judging whether the number of times reread commands are issued reaches the threshold, and if the number of times reread commands are issued does not reach the threshold, issuing a new group of reread commands to the preset target page, and simultaneously obtaining the data state of the preset target page after the previous group of reread commands execute the flash cache read command, wherein the new group of reread commands includes: a corresponding read voltage value setting command and a flash cache read command; S5, executing S4 in a loop until the data state of the preset target page is an error-corrected data state, and 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 commands end, and simultaneously obtaining the data status after the previous set of rereads, and repeating this cycle 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, thereby improving the efficiency of solid-state drive data error correction.

[0083] Example 2

[0084] In addition, an embodiment of the present application provides a solid state hard disk data error correction device, which is applied to electronic equipment.

[0085] like Figure 4 As shown, the solid state hard disk data error correction device 400 includes:

[0086] A setting module 401 is used to traverse the entire reread table to set a threshold for the number of times a reread command is issued;

[0087] A first issuing module 402 is used to issue a first set of reread commands to a preset target page, wherein the first set of reread commands includes: a first read voltage value setting command and a normal read command;

[0088] A second issuing module 403 is used to determine if the first group of reread commands is finished, then issue a second group of reread commands to the preset target page, and simultaneously obtain the data state of the preset target page after the first group of reread commands executes a normal read command, wherein the second group of reread commands includes a second read voltage value setting command and a flash cache read command;

[0089] The judgment module 404 is used to judge whether the number of times the reread commands are issued reaches the threshold value. If the number of times the reread commands are issued does not reach the threshold value, a new set of reread commands is issued to the preset target page, and the data state of the preset target page after the previous set of reread commands executes the flash cache read command is obtained at the same time, wherein the new set of reread commands includes: a corresponding read voltage value setting command and a flash cache read command;

[0090] The cyclic sending module 405 is used to execute S4 cyclically until the data state of the preset target page is an error-corrected data state, and the error correction is successful.

[0091] Optionally, the judgment module 404 is further used to judge if the number of times the reread command is issued reaches the threshold, and then terminate the error correction process.

[0092] Optionally, the setting module 401 is further used to select 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 to be different values.

[0093] Optionally, the first sending module 402 or the second sending module 403 or the loop sending module 405 shown is also used to combine 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.

[0094] Optionally, the second sending module 403 or the loop sending module 405 shown is also used to transfer the data obtained by executing the reread command from the internal cache area to the flash memory controller; perform error correction on the data by the flash memory controller, and transfer the corrected data to the external cache area; obtain the data status of the preset target page from the external cache area through firmware.

[0095] Optionally, the loop sending module 405 is also used to terminate the current flash cache read command; and send a read voltage value setting command separately to set the read voltage value of the preset target page to a preset voltage value.

[0096] Optionally, the judgment module 404 is further used to mark the preset target page; and to send a read voltage value setting command separately to set the read voltage value of the preset target page to a preset voltage value.

[0097] The solid state disk data error correction device 400 provided in this embodiment can implement the solid state disk data error correction method provided in Embodiment 1, and will not be described again here to avoid repetition.

[0098] The solid-state hard disk data error correction device provided by the present embodiment comprises the following steps: S1, traversing the entire reread table to set a threshold for the number of times of issuing reread commands; S2, issuing a first group of reread commands to a preset target page, wherein the first group of reread commands includes: a first read voltage value setting command and a normal read command; S3, if the first group of reread commands ends, issuing a second group of reread commands to the preset target page, and simultaneously obtaining the data state of the preset target page after the first group of reread commands execute the normal read command, wherein the second group of reread commands includes a second read voltage value setting command and a flash cache read command; S4, judging whether the number of times of issuing reread commands reaches the threshold, and if the number of times of issuing reread commands does not reach the threshold, issuing a new group of reread commands to the preset target page, and simultaneously obtaining the data state of the preset target page after the previous group of reread commands execute the flash cache read command, wherein the new group of reread commands includes: a corresponding read voltage value setting command and a flash cache read command; S5, executing S4 in a loop until the data state of the preset target page is an error-corrected data state, and 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 commands end, and simultaneously obtaining the data status after the previous set of rereads, and repeating this cycle 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, thereby improving the efficiency of solid-state drive data error correction.

[0099] Example 3

[0100] In addition, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the solid-state hard disk data error correction method provided in Example 1 is executed.

[0101] The electronic device provided in the embodiment of the present invention can execute the steps of the solid state hard disk data error correction method provided in the above method embodiment 1, which will not be described again here to avoid repetition.

[0102] Example 4

[0103] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the solid-state hard disk data error correction method provided in Example 1 is implemented.

[0104] 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.

[0105] The computer-readable storage medium provided in this embodiment can implement the solid-state hard disk data error correction method provided in Example 1, and will not be described again here to avoid repetition.

[0106] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.

[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0108] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for correcting data errors in a solid state drive, characterized in that: The method comprises: S1, traverse the entire reread table to set the threshold of the number of times the reread command is issued; S2, issuing a first group of reread commands to a preset target page, wherein the first group of reread commands includes: a first read voltage value setting command and a normal read command; S3. If the first group of reread commands ends, a second group of reread commands is issued to the preset target page, and a data state of the preset target page after the first group of reread commands executes a normal read command is simultaneously obtained, wherein the second group of reread commands includes a second read voltage value setting command and a flash cache read command; S4, determining whether the number of times the reread commands are issued reaches the threshold value, if the number of times the reread commands are issued does not reach the threshold value, issuing a new set of reread commands to the preset target page, and simultaneously obtaining the data state 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: corresponding read voltage value setting commands and flash cache read commands; S5, executing S4 in a loop until the data state of the preset target page is an error-corrected data state, and the error correction is successful; Before issuing the first group of reread commands, the second group of reread commands or a new group 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 the flash cache read command into one atomic operation through an operation code, wherein the atomic operation is a minimum operation unit in which the command corresponding to the atomic operation is not divided by other commands; After the error correction is successful, the method further includes: Terminate the current flash cache read command; A read voltage value setting command is issued separately to set the read voltage value of the preset target page to a preset voltage value.

2. The method according to claim 1, characterized in that If the number of times the reread commands are issued does not reach the threshold, a new set of reread commands is issued to the preset target page, and the method further includes: If the number of times the re-read command is issued reaches the threshold, the error correction process ends.

3. The method according to claim 1, characterized in that: The first read voltage value in the first set of re-read commands, the second read voltage value in the second set of re-read commands, and the corresponding read voltage value in the new set of re-read commands are different values.

4. The method according to claim 1, characterized in that: The step of simultaneously acquiring the data state of the preset target page after the previous set of reread commands executes the flash cache read command includes: transferring data obtained by executing a reread command from an internal cache area to a flash memory controller; Correcting errors of the data by the flash memory controller and transmitting the corrected data to an external buffer area; The data state of the preset target page is obtained from the external buffer area through firmware.

5. The method according to claim 2, characterized in that: If the number of times the reread command is issued reaches the threshold, after the error correction process is terminated, the method further includes: Marking the preset target page; A read voltage value setting command is issued separately to set the read voltage value of the preset target page to a preset voltage value.

6. A solid state hard disk data error correction device, executing the solid state hard disk data error correction method according to claim 1, characterized in that: The device comprises: A setting module is used to traverse the entire reread table to set a threshold for the number of times a reread command is issued; A first issuing module is used to issue a first group of reread commands to a preset target page, wherein the first group of reread commands includes: a first read voltage value setting command and a normal read command; A second issuing module, used for determining if the first group of reread commands is finished, issuing a second group of reread commands to the preset target page, and simultaneously acquiring a data state of the preset target page after the first group of reread commands executes a normal read command, wherein the second group of reread commands includes a second read voltage value setting command and a flash cache read command; A judgment module, used for judging whether the number of times the reread commands are issued reaches the threshold value, and if the number of times the reread commands are issued does not reach the threshold value, a new set of reread commands is issued to the preset target page, and at the same time, a data state of the preset target page after the previous set of reread commands executes the flash cache read command, wherein the new set of reread commands includes: a corresponding read voltage value setting command and a flash cache read command; A cyclic sending module, used for cyclically executing S4 until the data state of the preset target page is an error-corrected data state, and the error correction is successful; Before sending the first group of reread commands, the second group of reread commands or a new group 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 the flash cache read command into one atomic operation through an operation code, wherein the atomic operation is a minimum operation unit in which the command corresponding to the atomic operation is not divided by other commands; After the error correction is successful, the method further includes: Terminate the current flash cache read command; A read voltage value setting command is issued separately to set the read voltage value of the preset target page to a preset voltage value.

7. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the computer program executes the solid state hard disk data error correction method according to any one of claims 1 to 5 when the processor is running.

8. A computer-readable storage medium, characterized in that: It stores a computer program, which, when running on a processor, executes the solid state hard disk data error correction method described in any one of claims 1 to 5.