Data protection method and storage device

By performing multiple decoding operations and data frame division in the storage device, the data loss problem caused by multi-frame decoding failure is solved, the data protection capability is improved, and the errors are effectively corrected.

CN118656030BActive Publication Date: 2024-11-08HOSIN GLOBAL ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411067899.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-08
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

When multiple data frames cannot be successfully decoded, data loss is easily caused by the existing storage device, and traditional data protection methods cannot effectively correct errors when multiple frames are decoded.

Method used

By reading data frames from multiple entity units in the storage device and performing multiple decoding operations, including first, second and third decoding operations, it is determined whether the group data meets the preset conditions, and if it does not meet the requirements, Then divide the data frame into sub-data segments to perform corrections.

Benefits of technology

The data protection capability of the storage device is improved, data loss caused by data frames that cannot be successfully decoded are avoided, and the ability to correct errors is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656030B_ABST
    Figure CN118656030B_ABST
Patent Text Reader

Abstract

The present invention provides a data protection method and a storage device. The method comprises: reading a first data frame from a first entity unit; performing a first type of decoding operation on the first data frame; if the first type of decoding operation fails, determining whether group data meets a preset condition, wherein the group data comprises a first data frame and a second data frame read from a second entity unit; if the group data meets the preset condition, performing a second type of decoding operation on the group data; if the group data does not meet the preset condition, dividing the first data frame into a plurality of first sub-data segments and the second data frame into a plurality of second sub-data segments, and performing a third type of decoding operation based on the plurality of first sub-data segments and the plurality of second sub-data segments. Thus, the data protection capability of the storage device can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage technology, and in particular to a data protection method and a storage device. Background Art

[0002] As the data storage density of storage devices increases, the probability of errors when reading data stored in the storage devices also increases significantly. Therefore, some types of storage devices support group encoding of multiple data frames (such as block codes) to improve the subsequent decoding capabilities of the individual data frames in the group. However, even when using grouping to protect data, in some cases, if there are too many data frames (for example, two or more) in the group that cannot be successfully decoded, the errors in these data frames may not be corrected, resulting in data loss in the storage device.

[0003] Therefore, how to effectively improve the data protection capability of storage devices is an urgent problem that needs to be solved. Summary of the Invention

[0004] The present invention provides a data protection method and a storage device, which can improve the data protection capability of the storage device.

[0005] An embodiment of the present invention provides a data protection method for a storage device. The storage device includes a memory module. The memory module includes multiple entity units. The data protection method includes: reading a first data frame from a first entity unit among the multiple entity units; performing a first type of decoding operation on the first data frame; if the first type of decoding operation fails, determining whether group data meets a preset condition, wherein the group data includes the first data frame and a second data frame read from a second entity unit among the multiple entity units; if the group data meets the preset condition, performing a second type of decoding operation on the group data to correct errors in the first data frame; if the group data does not meet the preset condition, dividing the first data frame into multiple first sub-data segments and dividing the second data frame into multiple second sub-data segments, and performing a third type of decoding operation based on the multiple first sub-data segments and the multiple second sub-data segments to correct the errors in the first data frame.

[0006] An embodiment of the present invention further provides a storage device comprising a connection interface, a memory module, and a memory controller. The connection interface is configured to connect to a host system. The memory controller is connected to the connection interface and the memory module. The memory module comprises a plurality of physical units, and the memory controller is configured to: read a first data frame from a first physical unit among the plurality of physical units; perform a first type of decoding operation on the first data frame; if the first type of decoding operation fails, determine whether group data meets a preset condition, wherein the group data comprises the first data frame and a second data frame read from a second physical unit among the plurality of physical units; if the group data meets the preset condition, perform a second type of decoding operation on the group data to correct errors in the first data frame; if the group data does not meet the preset condition, divide the first data frame into a plurality of first sub-data segments and divide the second data frame into a plurality of second sub-data segments, and perform a third type of decoding operation based on the plurality of first sub-data segments and the plurality of second sub-data segments to correct the errors in the first data frame.

[0007] Based on the above, after performing a first-type decoding operation on a first data frame read from a first physical unit, if the first-type decoding operation fails, a further determination can be made as to whether the group data meets a preset condition. The group data includes a first data frame and a second data frame read from a second physical unit. If the group data meets the preset condition, a second-type decoding operation can be performed on the group data to correct errors in the first data frame. Furthermore, if the group data does not meet the preset condition, the first data frame can be divided into a plurality of first sub-data segments and the second data frame can be divided into a plurality of second sub-data segments, and a third-type decoding operation can be performed based on the plurality of first sub-data segments and the plurality of second sub-data segments to correct errors in the first data frame. This can thereby improve the technical problem of data loss in a storage device due to excessive numbers of data frames that cannot be successfully decoded, thereby enhancing the data protection capability of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 is a schematic diagram of a data storage system according to an embodiment of the present invention;

[0009] Figure 2 is a schematic diagram of a memory controller according to an embodiment of the present invention;

[0010] Figure 3 is a schematic diagram of a management memory module according to an embodiment of the present invention;

[0011] Figure 4 is a schematic diagram of multi-frame encoding according to an embodiment of the present invention;

[0012] Figure 5 is a schematic diagram of detecting a first distribution position of first error data and a second distribution position of second error data according to an embodiment of the present invention;

[0013] Figure 6 is a schematic diagram of performing a third type of decoding operation based on a first decoding mode according to an embodiment of the present invention;

[0014] Figure 7 is a schematic diagram of performing a third type of decoding operation based on a second decoding mode according to an embodiment of the present invention;

[0015] Figure 8 is a flow chart of a data protection method according to an embodiment of the present invention;

[0016] Figure 9 FIG. 4 is a flow chart of a data protection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0017] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.

[0018] Figure 1 Schematic diagram of a data storage system according to an embodiment of the present invention. Figure 1 The data storage system 10 includes a host system 11 and a storage device 12. The storage device 12 can be connected to the host system 11 and can be used to store data from the host system 11. For example, the host system 11 can be a smartphone, a tablet computer, a laptop computer, a desktop computer, an industrial computer, a game console, a server, or a computer system installed in a specific carrier (such as a vehicle, aircraft, or ship), and the type of host system 11 is not limited to this. In addition, the storage device 12 can include a solid-state drive, a USB flash drive, a memory card, or other types of non-volatile storage devices.

[0019] The storage device 12 includes a connection interface 121, a memory module 122, and a memory controller 123. The connection interface 121 is used to connect the storage device 12 to the host system 11. For example, the connection interface 121 may support an embedded Multi-Media Card (eMMC), Universal Flash Storage (UFS), Peripheral Component Interconnect Express (PCI Express), Non-Volatile Memory Express (NVM express), Serial Advanced Technology Attachment (SATA), Universal Serial Bus (USB), or other types of connection interface standards. Therefore, the storage device 12 can communicate with the host system 11 (e.g., exchange signals, instructions, and / or data) via the connection interface 121.

[0020] The memory module 122 is used to store data. For example, the memory module 122 may include one or more rewritable non-volatile memory modules. Each rewritable non-volatile memory module may include one or more memory cell arrays. The memory cells in the memory cell array store data in the form of a voltage (also known as a threshold voltage). For example, the memory module 122 may include a single-level cell (SLC) NAND flash memory module, a multi-level cell (MLC) NAND flash memory module, a triple-level cell (TLC) NAND flash memory module, a quad-level cell (QLC) NAND flash memory module, and / or other memory modules having the same or similar characteristics.

[0021] The memory controller 123 is connected to the connection interface 121 and the memory module 122. The memory controller 123 can be considered the control core of the memory device 12 and is used to control the memory device 12. For example, the memory controller 123 can be used to control or manage all or part of the operation of the memory device 12. For example, the memory controller 123 may include a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessor, a digital signal processor (DSP), a programmable controller, an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or other similar devices, or a combination of these devices. In one embodiment, the memory controller 123 may include a flash memory controller.

[0022] The memory controller 123 can send a command sequence to the memory module 122 to access the memory module 122. For example, the memory controller 123 can send a write command sequence to the memory module 122 to instruct the memory module 122 to store data in a specific memory cell. For example, the memory controller 123 can send a read command sequence to the memory module 122 to instruct the memory module 122 to read data from a specific memory cell. For example, the memory controller 123 can send an erase command sequence to the memory module 122 to instruct the memory module 122 to erase data stored in a specific memory cell. Furthermore, the memory controller 123 can send other types of command sequences to the memory module 122 to instruct the memory module 122 to perform other types of operations, and the present invention is not limited thereto. The memory module 122 can receive the command sequence from the memory controller 123 and access the memory cells within the memory module 122 according to the command sequence.

[0023] Figure 2 FIG is a schematic diagram of a memory controller according to an embodiment of the present invention. Figure 1 and Figure 2 The memory controller 123 includes a host interface 21, a memory interface 22, and a memory control circuit 23. The host interface 21 is used to connect to the host system 11 through the connection interface 121 to communicate with the host system 11. The memory interface 22 is used to connect to the memory module 122 to access the memory module 122.

[0024] The memory control circuit 23 is connected to the host interface 21 and the memory interface 22. The memory control circuit 23 can be used to control or manage all or part of the operation of the memory controller 123. For example, the memory control circuit 23 can communicate with the host system 11 via the host interface 21 and access the memory module 122 via the memory interface 22. For example, the memory control circuit 23 may include a control circuit such as an embedded controller or a microcontroller. In the following embodiments, the description of the memory control circuit 23 is equivalent to the description of the memory controller 123.

[0025] In one embodiment, the memory controller 123 may further include a buffer memory 24. The buffer memory 24 is connected to the memory control circuit 23 and is used to cache data. For example, the buffer memory 24 may be used to cache instructions from the host system 11, data from the host system 11, and / or data from the memory module 122.

[0026] In one embodiment, the memory controller 123 may further include a decoding circuit 25. The decoding circuit 25 is connected to the memory control circuit 23 and is used to encode and decode data to ensure data accuracy. For example, the decoding circuit 25 may support various encoding / decoding algorithms such as Low Density Parity Check Code (LDPC code), BCH code, Reed-Solomon code (RS code), and Exclusive OR (XOR) code. In one embodiment, the memory controller 123 may also include various other types of circuit modules (such as power management circuits), and the present invention is not limited thereto.

[0027] Figure 3 FIG is a schematic diagram of a management memory module according to an embodiment of the present invention. Figures 1 to 3 The memory module 122 includes a plurality of physical units 301 ( 1 ) to 301 (B). Each physical unit includes a plurality of storage cells and is used for non-volatile data storage.

[0028] In one embodiment, a physical unit may include one or more physical programming units. A physical programming unit may include multiple physical sectors. For example, the data capacity of a physical sector may be 512 bytes (B), and a physical programming unit may include 32 physical sectors. However, the data capacity of a physical sector and / or the total number of physical sectors included in a physical programming unit may be adjusted according to practical needs, and the present invention is not limited thereto. In one embodiment, a physical programming unit may be regarded as a physical page. For example, the storage capacity of a physical programming unit may be 16 kilobytes, and the present invention is not limited thereto.

[0029] In one embodiment, a physical programming unit is the smallest unit to which data is written synchronously in the memory module 122. For example, when a programming operation (also referred to as a write operation) is performed on a physical programming unit to write data to the physical programming unit, multiple memory cells in the physical programming unit may be programmed synchronously to store corresponding data. For example, when programming a physical programming unit, a write voltage may be applied to the physical programming unit to change the threshold voltage of at least some of the memory cells in the physical programming unit. For example, the threshold voltage of a memory cell may reflect the bit data stored in the memory cell.

[0030] In one embodiment, a physical erase unit may include multiple physical programming units. Multiple physical programming units in a physical erase unit may be erased simultaneously. For example, when performing an erase operation on a physical erase unit, an erase voltage may be applied to multiple physical programming units in the physical erase unit to change the threshold voltages of at least some of the memory cells in these physical programming units. By performing an erase operation on a physical erase unit, data stored in the physical erase unit may be cleared.

[0031] In one embodiment, the memory control circuit 23 can logically associate the physical units 301(1)-301(A) and 301(A+1)-301(B) with the data area 31 and the idle area 32, respectively. The physical units 301(1)-301(A) in the data area 31 all store data (also known as user data) from the host system 11. For example, any physical unit in the data area 31 can store valid data and / or invalid data. In addition, the physical units 301(A+1)-301(B) in the idle area 32 do not store data (e.g., valid data).

[0032] In one embodiment, if a physical unit does not store valid data, the physical unit may be associated with the idle area 32. Furthermore, the physical units in the idle area 32 may be erased to clear the data in the physical units. In one embodiment, the physical units in the idle area 32 are also referred to as idle physical units. In one embodiment, the idle area 32 is also referred to as a free pool.

[0033] In one embodiment, when data is to be stored, the memory control circuit 23 may select one or more physical cells from the idle area 32 and instruct the memory module 122 to store the data in the selected physical cells. After the data is stored in the physical cells, the physical cells may be associated with the data area 31. In other words, one or more physical cells may be used alternately between the data area 31 and the idle area 32.

[0034] In one embodiment, the memory control circuit 23 may configure a plurality of logical units 302(1)-302(C) to map the physical units (i.e., physical units 301(1)-301(A)) in the data area 31. For example, a logical unit may correspond to a logical block address (LBA) or other logical management unit. A logical unit may be mapped to one or more physical units.

[0035] In one embodiment, if a physical unit is currently mapped by any logical unit, the memory control circuit 23 may determine that the data currently stored in the physical unit includes valid data. Conversely, if a physical unit is currently not mapped by any logical unit, the memory control circuit 23 may determine that the physical unit does not currently store any valid data.

[0036] In one embodiment, the memory control circuit 23 may record the mapping relationship between the logical units and the physical units in at least one management table (also referred to as a logical-to-physical mapping table). In one embodiment, the memory control circuit 23 may instruct the memory module 122 to perform operations such as data read, write, or erase based on the information in the management table (i.e., the logical-to-physical mapping table).

[0037] In one embodiment, the memory control circuit 23 may manage the physical cells 301(1)-301(B) in the form of groups (also referred to as physical cell groups). A physical cell group may include multiple physical cells. A physical cell group may be used to store multiple frames (also referred to as data frames). For example, a physical cell may be used to store one or more data frames. A single physical cell group may include multiple physical cells in the same (or different) planes, the same (or different) dies, and / or the same (or different) chip enable (CE) regions in the memory module 122.

[0038] In one embodiment, the decoding circuit 25 may perform single-frame encoding on a single data frame stored in a physical unit, thereby protecting the data in the single data frame using the parity data generated by the single-frame encoding. In one embodiment, the decoding circuit 25 may perform a first type of decoding operation on a single data frame read from a physical unit, thereby correcting errors in the single data frame using the parity data generated by the single-frame encoding. For example, the first type of decoding operation is single-frame decoding. For example, the decoding circuit 25 may perform single-frame encoding and decoding based on the LDPC algorithm, but the present invention is not limited to this.

[0039] In one embodiment, the decoding circuit 25 may perform multi-frame encoding on multiple data frames stored in a particular physical unit group, thereby protecting the data in these data frames using the parity data generated by the multi-frame encoding. In one embodiment, the decoding circuit 25 may perform a second type of decoding operation on multiple data frames read from a particular physical unit group, thereby correcting errors in these data frames using the parity data generated by the multi-frame encoding. For example, the second type of decoding operation is multi-frame decoding. For example, the decoding circuit 25 may perform multi-frame encoding and decoding based on BCH codes, RS codes, and / or XOR codes, but the present invention is not limited thereto.

[0040] Figure 4 is a schematic diagram of multi-frame encoding according to an embodiment of the present invention. Figure 4 , the data frames 41(1)~41(n) include data stored in a certain physical unit group (also referred to as the first physical unit group). For example, the first physical unit group may include Figure 3 The data frames 41(1) to 41(n) may include data to be stored in the physical units 301(1) to 301(n). The data frames 41(i) to 41(n) may include data to be stored in the physical units 301(i), and i is between 1 and n. The data in the data frames 41(1) to 41(n) may include data to be stored as instructed by a write instruction sent by the host system 11. Alternatively, the data in the data frames 41(1) to 41(n) may include data read from the memory module 122 and waiting to be stored back in the memory module 122.

[0041] In one embodiment, the decoding circuit 25 may perform multi-frame encoding on the data frames 41(1)-41(n) to generate the data frame 43. The data in the data frame 43 includes parity data for protecting the data frames 41(1)-41(n). For example, when performing multi-frame decoding on the data frames 41(1)-41(n), the parity data in the data frame 43 may be used to detect and / or correct errors in the data frames 41(1)-41(n).

[0042] In one embodiment, in multi-frame encoding, data in data frames 41(1)-41(n) are encoded based on the position of each bit in the data frame. For example, bits b1(1)-bn(1) at position 42(1) in data frames 41(1)-41(n) may be encoded to obtain bit bp(1) in data frame 43, and bits b1(2)-bn(2) at position 42(2) in data frames 41(1)-41(n) may be encoded to obtain bit bp(2) in data frame 43. Similarly, bits b1(m)-bn(m) at position 42(m) in data frames 41(1)-41(n) may be encoded to obtain bit bp(m) in data frame 43. Later, in multi-frame decoding, bits (also called parity bits) bp(1)-bp(m) in data frame 43 may be used to detect and / or correct erroneous bits in data frames 41(1)-41(n). For example, bit bp(i) in data frame 43 may be used to detect or correct one or more erroneous bits in position 42(i).

[0043] It should be noted that, in one embodiment, the arrangement of the multiple bits covered by any one of the positions 42(1) to 42(m) may be different from Figure 4 Furthermore, in one embodiment, the number of data frames 43 containing parity data may be 2 or more to provide different or better multi-frame decoding capabilities, which is not limited by the present invention.

[0044] In one embodiment, the decoding circuit 25 may perform single-frame encoding on each of the data frames 41(1)-41(n) and 43 to generate parity data for protecting each data frame. The parity data may then be used to detect and / or correct error bits in each data frame during single-frame decoding.

[0045] In one embodiment, the parity data generated by performing multi-frame encoding in the data frame 43 is also called a Redundant Array of Independent Disks (RAID) error correction code. In one embodiment, the data frames 41(1)-41(n) and 43 can be combined to form group data (also called block code). The data frames 41(1)-41(n) and 43 can be stored in the first physical unit group.

[0046] In one embodiment, when data stored in a specific physical unit in the first physical unit group (also referred to as a first physical unit) is to be read, the memory control circuit 23 may send a read command sequence to the memory module 122. This read command sequence may instruct the memory module 122 to read data from the first physical unit. In response to this read command sequence, the memory module 122 may transmit the data read from the first physical unit (also referred to as a first data frame) back to the memory control circuit 23. The decoding circuit 25 may perform a first type of decoding operation on the first data frame. For example, if the data in the first data frame is single-frame encoded based on the LDPC algorithm, the decoding circuit 25 may perform the first type of decoding operation on the first data frame based on the LDPC algorithm.

[0047] In one embodiment, if the first type of decoding operation performed on the first data frame is successful (indicating that the data in the first data frame is correct and / or that all the data in the first data frame has been corrected), the decoding circuit 25 may output successfully decoded data. However, if the first type of decoding operation performed on the first data frame fails (indicating that the errors in the first data frame cannot be fully corrected), the decoding circuit 25 may initiate a multi-frame decoding process to perform a second type of decoding operation on the group of data comprising the first data frame (also referred to as the first group of data). For example, if the first group of data was originally multi-frame encoded based on an XOR algorithm, the decoding circuit 25 may also perform the second type of decoding operation on the first group of data based on the XOR algorithm.

[0048] In one embodiment, the data frames that cannot be corrected by the first type of decoding operation are also referred to as UECC frames. In one embodiment, in the second type of decoding operation based on the XOR algorithm, at most one UECC frame can exist simultaneously in the same group of data. If the same group of data contains two or more UECC frames at the same time, the second type of decoding operation based on the XOR algorithm has a high probability of failing (i.e., it cannot completely correct the errors in these UECC frames). It should be noted that if the second type of decoding operation is performed based on other algorithms, the upper limit of the number of UECC frames in the same group of data that can be successfully corrected by performing the second type of decoding operation may be different, and the present invention is not limited to this.

[0049] In one embodiment, after the first type of decoding operation performed on the first data frame fails, the memory control circuit 23 may determine whether the first group of data meets a preset condition. For example, the preset condition may include: the total number of data frames (i.e., UECC frames) in the first group of data that cannot be successfully decoded by the first type of decoding operation is not greater than a preset number. For example, assuming that the decoding circuit 25 is preset to perform multi-frame decoding based on the XOR algorithm, the preset number is "1", but the present invention is not limited to this.

[0050] In one embodiment, if the total number of data frames (i.e., UECC frames) in the first group of data that cannot be successfully decoded through the first type of decoding operation is not greater than the predetermined number, the memory control circuit 23 may determine that the first group of data meets the predetermined condition. Alternatively, in one embodiment, if the total number of data frames (i.e., UECC frames) in the first group of data that cannot be successfully decoded through the first type of decoding operation is greater than the predetermined number, the memory control circuit 23 may determine that the first group of data does not meet the predetermined condition.

[0051] In one embodiment, if the first group of data meets the preset conditions, it indicates that the subsequent second-type decoding operation performed on the first group of data is likely to succeed (i.e., all errors in the first data frame will be successfully corrected). Therefore, if the first group of data meets the preset conditions, the memory control circuit 23 may perform the second-type decoding operation on the first group of data to correct the errors in the first data frame. However, if the first group of data does not meet the preset conditions, it indicates that the subsequent second-type decoding operation on the first group of data has a high probability of failure. Therefore, if the first group of data does not meet the preset conditions, the memory control circuit 23 may not perform the second-type decoding operation on the first group of data. This avoids unnecessary waste of system resources.

[0052] Conventionally, if the total number of UECC frames in a single group of data exceeds the decoding capability of multi-frame decoding, decoding of this group of data is often determined to have failed, resulting in data loss in the storage device 12. However, in one embodiment, if the first group of data does not meet the predetermined condition, the memory control circuit 23 does not directly determine that decoding of the first data frame has failed, nor does it directly discard the first data frame.

[0053] In one embodiment, if the first group of data is determined to not meet the preset condition, the memory control circuit 23 may further divide the first data frame into a plurality of first sub-data segments and divide another data frame in the first group of data (also referred to as a second data frame) into a plurality of second sub-data segments. For example, the second data frame is data read from another physical unit in the first group of physical units (also referred to as a second physical unit). Both the first and second data frames are UECC frames. The memory control circuit 23 may then perform another type of decoding operation (also referred to as a third type of decoding operation) based on the plurality of first sub-data segments and the plurality of second sub-data segments to correct errors in the first data frame. It should be noted that the third type of decoding operation may be different from both the first and second type of decoding operations. This can alleviate the conventional technical problem of data loss in the storage device 12 due to excessive numbers of data frames that cannot be successfully decoded.

[0054] In one embodiment, after determining that the first group of data does not meet the preset condition, the memory control circuit 23 may detect the distribution locations (also referred to as first distribution locations) of the error data (also referred to as first error data) within the plurality of first sub-segments, and detect the distribution locations (also referred to as second distribution locations) of the error data (also referred to as second error data) within the plurality of second sub-segments. For example, the first distribution locations may indicate that the first error data is located in at least one of the plurality of first sub-segments, and / or the second distribution locations may indicate that the second error data is located in at least one of the plurality of second sub-segments. The memory control circuit 23 may then determine a decoding mode for a third type of decoding operation based on the first and second distribution locations. For example, based on the first and second distribution locations, the memory control circuit 23 may determine that the decoding mode for the third type of decoding operation is one of a plurality of candidate decoding modes.

[0055] In one embodiment, the memory control circuit 23 can detect whether the first-type decoding operation successfully decoded each of the plurality of first sub-segments based on the decoding results of the first-type decoding operation previously performed on the first data frame. If the first-type decoding operation fails to decode at least some of the plurality of first sub-segments (also referred to as the first target data segment), the memory control circuit 23 can determine that at least some of the first error data is located in the first target data segment. However, if the first-type decoding operation successfully decodes at least some of the plurality of first sub-segments (also referred to as the second target data segment) (i.e., does not fail), the memory control circuit 23 can determine that the first error data is not located in the second target data segment. In other words, in one embodiment, based on the decoding results of the first-type decoding operation previously performed on the first data frame, the memory control circuit 23 can obtain the first distribution location of the first error data in the plurality of first sub-segments.

[0056] In one embodiment, the decoding circuit 25 may perform a first-type decoding operation on the second data frame. Based on the decoding results of the second-type decoding operation performed on the second data frame, the memory control circuit 23 may detect whether the first-type decoding operation successfully decoded each of the plurality of second sub-data segments. If the first-type decoding operation fails to decode at least some of the plurality of second sub-data segments (also referred to as the third target data segment), the memory control circuit 23 may determine that at least some of the second error data is located in the third target data segment. However, if the first-type decoding operation successfully decodes at least some of the plurality of second sub-data segments (also referred to as the fourth target data segment) (i.e., does not fail), the memory control circuit 23 may determine that the second error data is not located in the fourth target data segment. In other words, in one embodiment, based on the decoding results of the first-type decoding operation previously performed on the second data frame, the memory control circuit 23 may determine the second distribution location of the second error data in the plurality of second sub-data segments.

[0057] In one embodiment, assuming that the data size of a data frame is 16KB and the data size of a sub-segment is 2KB, a data frame can be divided into 8 sub-segments. However, in one embodiment, the data size of a data frame, the data size of a sub-segment, and the total number of sub-segments included in a data frame can be adjusted according to practical needs and are not limited by the present invention.

[0058] In one embodiment, the memory control circuit 23 may determine the data size of a sub-segment based on the basic unit of the first type of decoding operation performed by the decoding circuit 25. For example, assuming that in the first type of decoding operation for a first data frame with a data size of 16 KB, the parity data used to decode the first data frame is decoded with 2 KB as the basic decoding unit, the memory control circuit 23 may set the data size of a sub-segment (i.e., the first sub-segment) in the first data frame to 2 KB. Alternatively, assuming that in the first type of decoding operation for a first data frame with a data size of 16 KB, the parity data used to decode the first data frame is decoded with 4 KB as the basic decoding unit, the memory control circuit 23 may set the data size of a sub-segment (i.e., the first sub-segment) in the first data frame to 4 KB, and so on.

[0059] In one embodiment, if the detection result indicates that the first erroneous data is located in the i-th sub-segment of the plurality of first sub-segments, and the second erroneous data is located in the j-th sub-segment of the plurality of second sub-segments, and i is not equal to j, the memory control circuit 23 may determine that the decoding mode used for the third type of decoding operation is a certain decoding mode (also referred to as the first decoding mode). For example, the first decoding mode may be one of the plurality of candidate decoding modes. Then, the memory control circuit 23 (and / or the decoding circuit 25) may perform the third type of decoding operation based on the first decoding mode.

[0060] In one embodiment, if the detection result indicates that the first erroneous data is located in the i-th sub-segment of the plurality of first sub-segments, and the second erroneous data is located in the i-th sub-segment of the plurality of second sub-segments, the memory control circuit 23 may determine that the decoding mode used for the third type of decoding operation is another decoding mode (also referred to as a second decoding mode). For example, the second decoding mode may be another one of the plurality of candidate decoding modes. The first decoding mode is different from the second decoding mode. Then, the memory control circuit 23 (and / or the decoding circuit 25) may perform the third type of decoding operation based on the second decoding mode.

[0061] In one embodiment, assume that the first error data is located in the i-th sub-segment of the plurality of first sub-segments, the second error data is located in the j-th sub-segment of the plurality of second sub-segments, and i is not equal to j. In the first decoding mode, the memory control circuit 23 may obtain decoded data (also referred to as transient decoded data) based on a data frame (also referred to as a third data frame) read from at least one physical unit in the first group of physical units (also referred to as a third physical unit). For example, the third physical unit may include all physical units in the first group of physical units except the first and second physical units. For example, the memory control circuit 23 may perform a predetermined operation (such as an XOR operation) on the third data frame based on an algorithm employed by the second type of decoding operation (such as an XOR algorithm) to obtain transient decoded data. The memory control circuit 23 may obtain reference data (also referred to as first reference data) based on the transient decoded data and the second data frame. The memory control circuit 23 may then update the data in the i-th sub-segment of the plurality of first sub-segments based on the data in the i-th sub-segment of the first reference data. Thus, the erroneous data (ie, the first erroneous data) in the i-th sub-data segment among the plurality of first sub-data segments can be corrected.

[0062] In one embodiment, assume that the first error data is located in the i-th sub-segment of the plurality of first sub-segments, and the second error data is located in the i-th sub-segment of the plurality of second sub-segments. In the second decoding mode, the memory control circuit 23 can similarly obtain transient decoded data based on the third data frame. The memory control circuit 23 can identify the data type of a specific bit (also referred to as a reference bit) in the transient decoded data. For example, the reference bit can be the k-th bit in the i-th sub-segment of the transient decoded data. Then, based on the data type of the reference bit, the memory control circuit 23 can update at least one of the specific bit (also referred to as the first bit) in the plurality of first sub-segments and the specific bit (also referred to as the second bit) in the plurality of second sub-segments. Note that the first bit is the k-th bit in the i-th sub-segment of the plurality of first sub-segments, and the second bit is the k-th bit in the i-th sub-segment of the plurality of second sub-segments. Thus, the erroneous data in the i-th sub-data segment among the multiple first sub-data segments (i.e., the first erroneous data) and / or the erroneous data in the i-th sub-data segment among the multiple second sub-data segments (i.e., the second erroneous data) can be corrected.

[0063] In one embodiment, after identifying the data type of the reference bit, if the data type is a certain type (also referred to as a first type), the updated first bit and the updated second bit must comply with a certain operation logic (also referred to as a first operation logic). However, if the data type is another type (also referred to as a second type), the updated first bit and the updated second bit must comply with another operation logic (also referred to as a second operation logic). The first type is different from the second type. The first operation logic is different from the second operation logic.

[0064] Taking the XOR algorithm used in multi-frame encoding and decoding as an example, if the reference bit is "0," the updated first bit and the updated second bit must be "1," "1," or "0," "0," respectively. However, if the reference bit is "1," the updated first bit and the updated second bit must be "1," "0," or "0," "1," respectively.

[0065] Therefore, even if the second type of decoding operation is not performed, errors in the first data frame (and / or the second data frame) can be corrected through the third type of decoding operation, thereby improving the technical problem of data loss in the storage device 12 due to too many data frames that cannot be successfully decoded, and improving the data protection capability of the storage device 12.

[0066] Figure 5 is a schematic diagram of detecting a first distribution position of first error data and a second distribution position of second error data according to an embodiment of the present invention. Figure 5 , assuming that data frame 511 is a first data frame and data frame 512 is a second data frame. Data frame 511 includes multiple sub-data segments S(1) to S(8), and data frame 512 also includes multiple sub-data segments S(1) to S(8). In addition, assuming that parity data 521 includes multiple sub-data segments E(1) to E(8), and parity data 522 includes multiple sub-data segments E(1) to E(8).

[0067] After performing the first type of decoding operation on the data frame 511 based on the parity data 521, assuming that the decoding of the sub-data segments S(1), S(3), and S(5)-S(8) in the data frame 511 based on the sub-data segments E(1), E(3), and E(5)-E(8) in the parity data 521 is successful, and the decoding of the sub-data segments S(2) and S(4) in the data frame 511 based on the sub-data segments E(2) and E(4) in the parity data 521 is unsuccessful, the memory control circuit 23 may determine that erroneous data (i.e., first erroneous data) exists in the sub-data segments S(2) and S(4) in the data frame 511.

[0068] On the other hand, after performing the first type of decoding operation on the data frame 512 based on the parity data 522, it is assumed that the decoding of the sub-data segments S(1)-S(3) and S(5)-S(8) in the data frame 512 based on the sub-data segments E(1)-E(3) and E(5)-E(8) in the parity data 522 is successful, and the decoding of the sub-data segment S(4) in the data frame 512 based on the sub-data segment E(4) in the parity data 522 fails. In this case, the memory control circuit 23 can determine that erroneous data (i.e., second erroneous data) exists in the sub-data segment S(4) in the data frame 512.

[0069] In one embodiment, both data frames 511 and 512 are UECC frames, and the total number of UECCs in the first data group exceeds the upper limit (ie, the first data group does not meet the preset condition). Figure 5 In the embodiment, even if the second type of decoding operation is performed on the data frames 511 and / or 512, there is a high probability that the second type of decoding operation will fail.

[0070] Figure 6 is a schematic diagram showing a third type of decoding operation performed based on the first decoding mode according to an embodiment of the present invention. Figure 6 , continued by Figure 5 In the embodiment of FIG5 , it is assumed that no sub-segment S(2) in other data frames (i.e., the third data frame) in the first group of data has errors. In this case, the memory control circuit 23 may perform a third type of decoding operation based on the first decoding mode to correct the errors in the sub-segment S(2) in the data frame 511.

[0071] In one embodiment, the memory control circuit 23 may obtain the transient decoded data 61 based on another data frame (i.e., the third data frame) in the first group of data. For example, the memory control circuit 23 may perform a predetermined operation (e.g., an XOR operation) on the third data frame in the first group of data to obtain the transient decoded data 61. For example, the transient decoded data 61 may reflect the result of the predetermined operation (e.g., the XOR operation) performed on the third data frame.

[0072] After obtaining the transient decoded data 61, the memory control circuit 23 may obtain the reference data 62 (i.e., the first reference data) based on the transient decoded data 61 and the data frame 512. For example, the memory control circuit 23 may perform a predetermined operation (e.g., an XOR operation) on the transient decoded data 61 and the data frame 512 to obtain the reference data 62. For example, the reference data 62 may reflect the result of the predetermined operation (e.g., the XOR operation) performed on the transient decoded data 61 and the data frame 512. Then, the memory control circuit 23 may update the data in the sub-segment S(2) in the data frame 511 based on the data in the sub-segment S(2) in the reference data 62. For example, the memory control circuit 23 may use the data in the sub-segment S(2) in the reference data 62 to replace the data in the sub-segment S(2) in the data frame 511.

[0073] It should be noted that in Figure 6 In the embodiment, in the entire first group of data, only the sub-data segment S(2) in the data frame 511 has an error, while the sub-data segments S(2) in the remaining data frames (including the second data frame and the third data frame) do not have an error. Therefore, by performing a predetermined operation (e.g., an XOR operation) on the data frame 512 (i.e., the second data frame) and the transient decoded data 61 (or the third data frame), the data in the sub-data segment S(2) in the reference data 62 finally obtained can be regarded as the correct data corresponding to the sub-data segment S(2) in the data frame 511. Therefore, by updating the data in the sub-data segment S(2) in the data frame 511 based on the data in the sub-data segment S(2) in the reference data 62, the technical effect of correcting the error in the sub-data segment S(2) in the data frame 511 can be achieved.

[0074] Figure 7 is a schematic diagram showing the execution of the third type of decoding operation based on the second decoding mode according to an embodiment of the present invention. Figure 7 , continued by Figure 5 (or Figure 6), it is assumed that no errors exist in the sub-segment S(4) in the other data frames (i.e., the third data frame) in the first group of data. In this case, the memory control circuit 23 may perform the third type of decoding operation based on the second decoding mode to correct the errors in the sub-segment S(4) in the data frame 511 (and the sub-segment S(4) in the data frame 512).

[0075] In one embodiment, after obtaining Figure 6 After the transient decoded data 61 is received, the memory control circuit 23 may determine the bit br(k) in the sub-data segment S(4) of the transient decoded data 61 (i.e., the k-th bit in the sub-data segment S(4) of the transient decoded data 61) as a reference bit. The memory control circuit 23 may identify the data type of the bit br(k). Based on the data type of the bit br(k), the memory control circuit 23 may determine whether to update (e.g., flip) the bit b1(k) in the sub-data segment S(4) of the data frame 511 (i.e., the k-th bit in the sub-data segment S(4) of the data frame 511) and / or the bit b2(k) in the sub-data segment S(4) of the data frame 512 (i.e., the k-th bit in the sub-data segment S(4) of the data frame 512).

[0076] In one embodiment, if bit br(k) is "0", bits b1(k) and b2(k) must be "1", "1" or "0", "0", respectively, to comply with the operation logic corresponding to bit br(k) being "0". Alternatively, in one embodiment, if bit br(k) is "1", bits b1(k) and b2(k) must be "1", "0" or "0", "1", respectively, to comply with the operation logic corresponding to bit br(k) being "1".

[0077] In one embodiment, if bits b1(k) and / or b2(k) do not conform to the arithmetic logic corresponding to the data type of bit br(k), the memory control circuit 23 may update bits b1(k) and / or b2(k). For example, assuming that bit br(k) is "0" and bits b1(k) and b2(k) are "0" and "1," respectively, the memory control circuit 23 may update bit b1(k) from "0" to "1" to satisfy the arithmetic logic corresponding to bit br(k) being "0." Alternatively, assuming that bit br(k) is "1" and bits b1(k) and b2(k) are "1" and "1," respectively, the memory control circuit 23 may update bit b2(k) from "1" to "0" to satisfy the arithmetic logic corresponding to bit br(k) being "1."

[0078] It should be noted that in Figure 7In the embodiment, in the entire first group of data, only the sub-data segments S(4) in the data frames 511 and 512 contain errors, while the sub-data segments S(4) in the other data frames do not contain errors. Therefore, by identifying the data type of the bit br(k) in the sub-data segment S(4) of the transient decoded data 61, the memory control circuit 23 can quickly determine whether at least one of the bits b1(k) and b2(k) is an error bit. By correcting the error bits in the sub-data segments S(4) in the data frames 511 and / or 512 one by one, the technical effect of correcting the errors in the sub-data segments S(4) in the data frames 511 and / or 512 can also be achieved.

[0079] In one embodiment, before updating the first bit (e.g. Figure 7 After updating the first bit b1(k), the memory control circuit 23 may re-detect the total number of error bits in the first data frame. For example, after updating the first bit, the decoding circuit 25 may re-perform the first type of decoding operation on the first data frame. The memory control circuit 23 may determine the total number of error bits in the first data frame based on the result of the first type of decoding operation performed this time.

[0080] In one embodiment, after updating the first bit, if the total number of error bits in the first data frame does decrease, it indicates that the current update to the first bit is correct. In this case, the memory control circuit 23 may maintain the update result for the first bit. However, in one embodiment, after updating the first bit, if the total number of error bits in the first data frame does not decrease (or even increases), it indicates that the current update to the first bit is incorrect. In this case, the memory control circuit 23 may restore the first bit (e.g., restore the first bit from the updated "0" to "1" or from "1" to "0").

[0081] That is, in one embodiment, after updating the first bit, the memory control circuit 23 can determine whether the current update of the first bit is correct based on the change in the number of error bits in the first data frame. If it is not correct, the memory control circuit 23 can restore the first bit to avoid forming a new error bit in the first data frame. Similarly, when updating the second bit (e.g. Figure 7 After the bit b2(k) is updated, the memory control circuit 23 may determine whether the current update of the second bit is correct according to the change in the number of error bits in the second data frame, and may perform subsequent operations accordingly.

[0082] Figure 8 This is a flow chart of a data protection method according to an embodiment of the present invention. Figure 8In step S801, a first data frame is read from a first entity unit. In step S802, a first type of decoding operation is performed on the first data frame. In step S803, it is determined whether the first type of decoding operation performed on the first data frame is successful (or failed). If the first type of decoding operation performed on the first data frame is successful, in step S804, the successfully decoded data is output.

[0083] If the first type of decoding operation performed on the first data frame is unsuccessful (i.e., fails), in step S805, it is determined whether the group data meets a preset condition. The group data includes the first data frame and the second data frame read from the second physical unit. If the group data meets the preset condition (e.g., the total number of UECC frames in the group data is not greater than a preset number), in step S806, a second type of decoding operation is performed on the group data to correct errors in the first data frame. Then, if the group data does not meet the preset condition (e.g., the total number of UECC frames in the group data is greater than a preset number), in step S807, the first data frame is divided into a plurality of first sub-data segments and the second data frame is divided into a plurality of second sub-data segments. In step S808, a third type of decoding operation is performed based on the plurality of first sub-data segments and the plurality of second sub-data segments to correct errors in the first data frame.

[0084] Figure 9 This is a flow chart of a data protection method according to an embodiment of the present invention. Figure 9 In step S901, a first distribution position of first error data in a plurality of first sub-data segments is detected. In step S902, a second distribution position of second error data in a plurality of second sub-data segments is detected. In step S903, a decoding mode for a third type of decoding operation is determined based on the first distribution position and the second distribution position.

[0085] However, Figure 8 and Figure 9 The steps have been described in detail above and will not be repeated here. Figure 8 and Figure 9 Each step can be implemented as multiple program codes or circuits, and the present invention is not limited thereto. Figure 8 and Figure 9 The method can be used in conjunction with the above exemplary embodiments or can be used alone, and the present invention is not limited thereto.

[0086] In summary, the data protection method and storage device provided by the present invention can, when necessary, improve error correction capabilities by breaking down data frames into smaller pieces and leveraging the encoding characteristics of group data. In particular, the data protection method and storage device provided by the present invention can still correct errors in data frames that might otherwise be discarded during traditional decoding, thereby enhancing the storage device's data protection capabilities.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data protection method, characterized in that: For a storage device, wherein the storage device comprises a memory module, the memory module comprises a plurality of entity units, and the data protection method comprises: Reading a first data frame from a first physical unit among the plurality of physical units; performing a first type of decoding operation on the first data frame; If the first type of decoding operation fails, determining whether group data meets a preset condition, wherein the group data includes the first data frame and a second data frame read from a second physical unit among the plurality of physical units; If the group data meets the preset condition, performing a second type of decoding operation on the group data to correct errors in the first data frame; and If the group data does not meet the preset condition, the first data frame is divided into a plurality of first sub-data segments and the second data frame is divided into a plurality of second sub-data segments, and a third type of decoding operation is performed based on the plurality of first sub-data segments and the plurality of second sub-data segments to correct the error in the first data frame, The step of performing the third type of decoding operation based on the plurality of first sub-data segments and the plurality of second sub-data segments comprises: Detecting a first distribution position of first error data in the plurality of first sub-data segments; Detecting a second distribution position of the second error data in the plurality of second sub-data segments; if the first erroneous data is located in the i-th sub-data segment of the plurality of first sub-data segments, the second erroneous data is located in the j-th sub-data segment of the plurality of second sub-data segments, and i is not equal to j, determining that the decoding mode used for the third type of decoding operation is the first decoding mode; and If the first error data is located in the i-th sub-data segment among the multiple first sub-data segments, and the second error data is located in the i-th sub-data segment among the multiple second sub-data segments, the decoding mode used for the third type of decoding operation is determined to be the second decoding mode, wherein the first decoding mode is different from the second decoding mode.

2. The data protection method according to claim 1, wherein the preset condition comprises: The total number of data frames in the group data that cannot be successfully decoded by the first type of decoding operation is not greater than a preset number.

3. The data protection method according to claim 1, wherein the step of detecting the first distribution position of the first error data in the plurality of first sub-data segments comprises: According to a decoding result of the first type of decoding operation performed on the first data frame, detecting whether the first type of decoding operation is successful in decoding the plurality of first sub-data segments respectively; as well as If the first type of decoding operation fails to decode the target data segment among the multiple first sub-data segments, it is determined that at least a portion of the first erroneous data is located in the target data segment.

4. The data protection method according to claim 1, wherein the step of performing the third type of decoding operation based on the plurality of first sub-data segments and the plurality of second sub-data segments further comprises: In the first decoding mode of the third type of decoding operation, transient decoding data is obtained according to a third data frame read from a third physical unit among the plurality of physical units; Obtain first reference data according to the transient decoded data and the second data frame; as well as The data in the i-th sub-data segment in the plurality of first sub-data segments is updated according to the data in the i-th sub-data segment in the first reference data.

5. The data protection method according to claim 1, wherein the step of performing the third type of decoding operation based on the plurality of first sub-segments and the plurality of second sub-segments further comprises: In the second decoding mode of the third type of decoding operation, transient decoding data is obtained according to a third data frame read from a third physical unit among the plurality of physical units; identifying a data type of a reference bit in the transient decoded data, wherein the reference bit is a k-th bit in an i-th sub-data segment in the transient decoded data; and updating at least one of the first bits in the plurality of first sub-segments and the second bits in the plurality of second sub-segments according to the data type, The first bit is the kth bit in the i-th sub-data segment among the multiple first sub-data segments, and the second bit is the kth bit in the i-th sub-data segment among the multiple second sub-data segments.

6. The data protection method according to claim 5, wherein if the data type is the first type, the updated first bit and the updated second bit conform to the first operation logic, and If the data type is the second type, the updated first bit and the updated second bit conform to the second operation logic, The first type is different from the second type, and the first operation logic is different from the second operation logic.

7. The data protection method according to claim 5, wherein the step of performing the third type of decoding operation based on the plurality of first sub-data segments and the plurality of second sub-data segments further comprises: After updating the first bit, detecting a total number of error bits in the first data frame; as well as If the total number of the error bits in the first data frame has not decreased, the first bit is restored.

8. The data protection method according to claim 1, wherein the first type of decoding operation belongs to single-frame decoding, and the second type of decoding operation belongs to multi-frame decoding.

9. A storage device, characterized in that: include: A connection interface for connecting to a host system; Memory module; as well as a memory controller connected to the connection interface and the memory module, The memory module includes a plurality of physical units, and the memory controller is used to: Reading a first data frame from a first physical unit among the plurality of physical units; performing a first type of decoding operation on the first data frame; If the first type of decoding operation fails, determining whether group data meets a preset condition, wherein the group data includes the first data frame and a second data frame read from a second physical unit among the plurality of physical units; If the group data meets the preset condition, performing a second type of decoding operation on the group data to correct errors in the first data frame; as well as If the group data does not meet the preset condition, the first data frame is divided into a plurality of first sub-data segments and the second data frame is divided into a plurality of second sub-data segments, and a third type of decoding operation is performed based on the plurality of first sub-data segments and the plurality of second sub-data segments to correct the error in the first data frame, The operation of the memory controller performing the third type of decoding operation based on the plurality of first sub-data segments and the plurality of second sub-data segments includes: Detecting a first distribution position of first error data in the plurality of first sub-data segments; Detecting a second distribution position of the second error data in the plurality of second sub-data segments; if the first erroneous data is located in the i-th sub-data segment of the plurality of first sub-data segments, the second erroneous data is located in the j-th sub-data segment of the plurality of second sub-data segments, and i is not equal to j, determining that the decoding mode used for the third type of decoding operation is the first decoding mode; and If the first error data is located in the i-th sub-data segment among the multiple first sub-data segments, and the second error data is located in the i-th sub-data segment among the multiple second sub-data segments, the decoding mode used for the third type of decoding operation is determined to be the second decoding mode, wherein the first decoding mode is different from the second decoding mode.

10. The storage device according to claim 9, wherein the preset condition comprises: The total number of data frames in the group data that cannot be successfully decoded by the first type of decoding operation is not greater than a preset number.

11. The storage device according to claim 9, wherein the operation of the memory controller detecting the first distribution position of the first error data in the plurality of first sub-data segments comprises: According to a decoding result of the first type of decoding operation performed on the first data frame, detecting whether the first type of decoding operation is successful in decoding the plurality of first sub-data segments respectively; as well as If the first type of decoding operation fails to decode the target data segment among the multiple first sub-data segments, it is determined that at least a portion of the first erroneous data is located in the target data segment.

12. The storage device according to claim 9, wherein the operation of the memory controller performing the third type of decoding operation based on the plurality of first sub-data segments and the plurality of second sub-data segments further comprises: In the first decoding mode of the third type of decoding operation, transient decoding data is obtained according to a third data frame read from a third physical unit among the plurality of physical units; Obtain first reference data according to the transient decoded data and the second data frame; as well as The data in the i-th sub-data segment in the plurality of first sub-data segments is updated according to the data in the i-th sub-data segment in the first reference data.

13. The storage device according to claim 9, wherein the memory controller performs the third type of decoding operation based on the plurality of first sub-segments and the plurality of second sub-segments, comprising: In the second decoding mode of the third type of decoding operation, transient decoding data is obtained according to a third data frame read from a third physical unit among the plurality of physical units; identifying a data type of a reference bit in the transient decoded data, wherein the reference bit is a k-th bit in an i-th sub-data segment in the transient decoded data; and updating at least one of the first bits in the plurality of first sub-segments and the second bits in the plurality of second sub-segments according to the data type, The first bit is the kth bit in the i-th sub-data segment among the multiple first sub-data segments, and the second bit is the kth bit in the i-th sub-data segment among the multiple second sub-data segments.

14. The storage device according to claim 13, wherein if the data type is a first type, the updated first bit and the updated second bit conform to a first operation logic, and If the data type is the second type, the updated first bit and the updated second bit conform to the second operation logic, The first type is different from the second type, and the first operation logic is different from the second operation logic.

15. The storage device according to claim 13, wherein the operation of the memory controller performing the third type of decoding operation based on the plurality of first sub-data segments and the plurality of second sub-data segments further comprises: After updating the first bit, detecting a total number of error bits in the first data frame; as well as If the total number of the error bits in the first data frame has not decreased, the first bit is restored.

16. The storage device of claim 9, wherein the first type of decoding operation belongs to single-frame decoding, and the second type of decoding operation belongs to multi-frame decoding.