Storage device and data processing method of storage device

By calculating the symptom weight value of flash memory chips, the high power consumption and bandwidth occupation problems of background scanning schemes in the prior art are solved, and more efficient data reliability judgment and scanning operation are achieved.

CN121725858APending Publication Date: 2026-03-24HUIYI MICROELECTRONICS (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing solid-state storage devices, background scanning schemes require error correction code decoding to determine data reliability, resulting in high power consumption and occupying the bandwidth of the error correction code decoder, thus affecting system performance.

Method used

By calculating the symptom weight values ​​of flash memory chips and performing data operations based on these symptom weight values, the reliance on error correction code decoding is reduced, and background scanning efficiency is improved.

Benefits of technology

This reduces the dependence of background scanning on the decoder and improves the efficiency of the scanning operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121725858A_ABST
    Figure CN121725858A_ABST
Patent Text Reader

Abstract

The invention discloses a storage device. The storage device comprises a storage block; the controller is connected with the storage block; wherein the controller is used for reading original data from the storage block; calculating a symptom weight value of the original data; and based on the symptom weight value, executing data operation on the storage block so as to complete background scanning of the storage block. The invention further discloses a data processing method of the storage device. The background scanning efficiency of the storage device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed in this application relate to the field of flash memory technology, and more specifically, to a storage device and a data processing method for the storage device. Background Technology

[0002] Solid-state storage devices use non-volatile flash memory chips to store data, ensuring data retention even when power is lost. However, in solid-state storage devices, the reliability of flash memory chips gradually decreases over time. To prevent some chips from failing to meet reliability standards, the system typically performs a background scan of the entire disk or a portion of the disk to check for changes in data reliability. Summary of the Invention

[0003] According to embodiments of this application, this application proposes a storage device and a data processing method for the storage device to solve the above-mentioned problems.

[0004] The first aspect of this application discloses a storage device, including: a storage block; and a controller connected to the storage block; wherein the controller is configured to: read raw data from the storage block; calculate symptom weight values ​​of the raw data; and perform data operations on the storage block based on the symptom weight values ​​to complete a background scan of the storage block.

[0005] In some embodiments, the controller is further configured to: obtain a symptom weight threshold, the symptom weight threshold being used to characterize the target bit error rate of the raw data.

[0006] In some embodiments, the controller is further configured to: determine that the original data is in a first state in response to the symptom weight value meeting a preset condition; or perform error correction code decoding on the original data in response to the symptom weight value not meeting the preset condition to obtain a decoding result.

[0007] In some embodiments, the preset condition is that the symptom weight value of the original data is less than the symptom weight threshold.

[0008] In some embodiments, the symptom weight threshold is one of at least one preset symptom weight threshold.

[0009] In some embodiments, the error correction code decoding includes low-density parity symmetric code decoding.

[0010] In some embodiments, the decoding result includes the number of error correction bits; the controller is further configured to: determine an error correction bit threshold; and determine whether the number of error correction bits is greater than the error correction bit threshold.

[0011] In some embodiments, the controller is further configured to: determine that the original data is in a second state in response to the number of error correction bits being greater than the number of error correction bits threshold, so as to perform a data migration operation on the storage block.

[0012] In some embodiments, the controller is further configured to: determine that the original data is in a second state in response to a failure of error correction code decoding, so as to perform a data migration operation on the storage block.

[0013] The second aspect of this application discloses a data processing method for a storage device, wherein the storage device is the storage device described in the first aspect; the method includes: reading raw data from the storage block; calculating symptom weight values ​​of the raw data; and performing data operations on the storage block based on the symptom weight values ​​to complete a background scan of the storage block.

[0014] The beneficial effects of this application are as follows: the storage device includes a storage block and a controller, the controller is connected to the storage block, the controller is used to read raw data from the storage block, calculate the symptom weight value of the raw data, and then the controller performs data operations on the storage block based on the symptom weight value to complete the background scan of the storage block, thereby improving the efficiency of the background scan operation. Attached Figure Description

[0015] The present application will be further described below with reference to the accompanying drawings and embodiments. In the drawings:

[0016] Figure 1 This is a schematic diagram of the structure of a storage device according to an embodiment of this application;

[0017] Figure 2 This is a schematic flowchart of a data processing method for a storage device according to an embodiment of this application;

[0018] Figure 3 This is a schematic flowchart of a data processing method for a storage device according to an embodiment of this application. Detailed Implementation

[0019] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0020] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, "many" in this application means two or more. Moreover, the term "at least one" in this application means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. Furthermore, the terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features.

[0021] In solid-state storage (SSD) devices, the reliability of flash memory chips decreases over time. To prevent data loss, SSD systems periodically scan to check the reliability of data in each component. If a significant decrease in reliability is detected, proactive data protection measures are necessary, such as data relocation and rewriting. Before writing data to the flash memory chips, error-correction codes are encoded, and the encoded data is stored in the flash memory. Currently, background scanning solutions read data from the flash memory chips, decode the error-correction codes, and determine data reliability based on the decoding results. This approach requires complete error-correction code decoding before any assessment can be made, but the decoding process consumes significant power and bandwidth, impacting overall system performance during heavy loads.

[0022] Therefore, this application proposes a storage device and a data processing method for the storage device.

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

[0024] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of a storage device according to an embodiment of this application. The storage device 10 includes a storage block 11 and a controller 12, with the controller 12 connected to the storage block 11.

[0025] The controller 12 is used to read raw data from the storage block 11. The raw data is the data to be saved after being encoded and stored in the storage block 11.

[0026] After reading the raw data from storage block 11, controller 12 calculates the symptom weight values ​​of the raw data. For example, if the raw data is c, the parity check matrix corresponding to the error correction code is H, i.e., H*c. T=0, meaning that after reading the original data from storage block 11, an error bit is generated. The error bit sequence is represented as e, that is, the read bit sequence is (c+e). Then, the symptom value s is calculated according to the parity check matrix H, s = H*(c+e). T =H*e T The number of 1s in the symptom value s is the syndrome weight (SW).

[0027] Furthermore, the controller 12 performs data operations on the storage block 11 based on the symptom weight value to complete the background scan of the storage block 11. For example, the controller 12 judges the reliability of the data based on the symptom weight value SW of the original data c, and then performs data operations on the storage block 11 to achieve the background scan of the storage block 11.

[0028] In this embodiment, the storage device 10 includes a storage block 11 and a controller 12. The controller 12 is connected to the storage block 11. The controller 12 is used to read raw data from the storage block 11, calculate the symptom weight value of the raw data, and then perform data operations on the storage block 11 based on the symptom weight value to complete the background scan of the storage block 11, thereby improving the efficiency of the background scan operation.

[0029] In some embodiments, the controller 12 is further configured to: obtain a symptom weight threshold, which is used to characterize the target bit error rate of the original data.

[0030] Controller 12 is used to acquire a symptom weight threshold, which characterizes the target bit error rate of the raw data. The symptom weight value SW of the raw data can represent the raw bit error rate (raw BER). For example, the symptom weight value SW can increase as the raw data's bit error rate increases. For instance, a raw data symptom weight value of SW1 corresponds to a bit error rate of 0.008, and a raw data symptom weight value of SW2 corresponds to a bit error rate of 0.005, meaning SW1 is greater than SW2. Controller 12 is also used to determine a symptom weight threshold, which characterizes the target bit error rate of the raw data. The target bit error rate can be a preset bit error rate of the raw data. For example, controller 12 determines a symptom weight threshold that represents the target bit error rate R1 of the read raw data. The target bit error rate R1 can be used to judge data reliability. For example, if the actual bit error rate R corresponding to the symptom weight value of the read raw data is greater than the target bit error rate R1 corresponding to its symptom weight threshold, then it is determined that the raw data has a high error rate and poor reliability.

[0031] The symptom weight threshold can be obtained in advance through simulation. For example, random errors are injected into the encoded codewords, keeping the total number of error bits at a given value. Then, the corresponding symptom weight value is calculated. By injecting a large number of different errors, the distribution of symptom weight values ​​under a fixed number of error bits is obtained. By changing the number of error bits, the distribution of symptom weight values ​​under different numbers of error bits is obtained. Then, based on the obtained distribution, the appropriate symptom weight value can be selected as the symptom weight threshold.

[0032] In this embodiment, the storage device 10 includes a storage block 11 and a controller 12. The controller 12 is connected to the storage block 11. The controller 12 is used to read raw data from the storage block 11, calculate the symptom weight value of the raw data, and obtain the symptom weight threshold. The symptom weight threshold is used to characterize the target bit error rate of the raw data. Then, the controller 12 judges the reliability of the raw data based on the symptom weight value and the symptom weight threshold, thereby performing data operations on the storage block 11 to complete the background scan of the storage block 11, which improves the background scan efficiency of the storage block 11.

[0033] In some embodiments, the controller 12 is further configured to: determine that the original data is in a first state in response to the symptom weight value meeting a preset condition; or perform error correction code decoding on the original data in response to the symptom weight value not meeting the preset condition to obtain a decoding result.

[0034] The controller 12 is used to determine that the original data is in a first state in response to the symptom weight value meeting the preset conditions. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SW x of the original data. It judges the symptom weight value SW x of the original data. When the symptom weight value SW x meets the preset conditions, it determines that the corresponding original data is in a first state. The first state can be that the data error rate in the original data is low and the reliability is high.

[0035] Alternatively, the controller 12 is also used to perform error correction code decoding on the original data in response to the symptom weight value not meeting the preset conditions, and obtain the decoding result. For example, the controller reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data, judges the symptom weight value SWx of the original data, and performs error correction code decoding on the original data when the symptom weight value SWx does not meet the preset conditions, so as to obtain the decoding result. The decoding result is used to judge the reliability of the original data.

[0036] In this embodiment, the storage device 10 includes a storage block 11 and a controller 12. The controller 12 is connected to the storage block 11. The controller 12 is used to read raw data from the storage block 11, calculate the symptom weight value of the raw data, and determine that the raw data is in a first state in response to the symptom weight value meeting a preset condition, or to perform error correction code decoding on the raw data in response to the symptom weight value not meeting the preset condition, thereby obtaining the decoding result. This enables the controller 12 to judge the reliability of the raw data based on the symptom weight value and the symptom weight threshold, thereby completing the background scan of the storage block 11, reducing the dependence on the decoder in the background scan, and improving the efficiency of the background scan operation.

[0037] Furthermore, in some embodiments, the preset condition is that the symptom weight value of the original data is less than the symptom weight threshold.

[0038] The controller 12 is used to determine that the original data is in a first state in response to the symptom weight value meeting a preset condition. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data, determines the symptom weight threshold of the original data as SWy, and judges the symptom weight value SWx of the original data. If the symptom weight value SWx meets the preset condition, that is, the symptom weight value SWx of the original data is less than the symptom weight threshold SWy, then it can be determined that the corresponding original data is in a first state. The first state can be that the data error rate in the original data is low and the reliability is high.

[0039] Alternatively, the controller 12 is also configured to, in response to the symptom weight value not meeting the preset conditions, perform error correction code decoding on the original data to obtain the decoding result. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data, determines the symptom weight threshold of the original data as SWy, judges the symptom weight value SWx of the original data, and if the symptom weight value SWx does not meet the preset conditions, that is, the symptom weight value SWx of the original data is greater than or equal to the symptom weight threshold SWy, performs error correction code decoding on the original data to obtain the decoding result. The decoding result is used to judge the reliability of the original data.

[0040] In this embodiment, the storage device 10 includes a storage block 11 and a controller 12. The controller 12 is connected to the storage block 11. The controller 12 is used to read raw data from the storage block 11, calculate the symptom weight value of the raw data, and determine that the raw data is in a first state in response to the symptom weight value of the raw data being less than the symptom weight threshold. Alternatively, in response to the symptom weight value of the raw data being equal to or greater than the symptom weight threshold, the controller 12 performs error correction code decoding on the raw data to obtain the decoding result. This enables the controller 12 to judge the reliability of the raw data based on the symptom weight value and the symptom weight threshold, thereby completing the background scan of the storage block 11, reducing the dependence on the decoder in the background scan, and improving the background scan efficiency of the storage block 11.

[0041] In some embodiments, the symptom weight threshold is one of at least one preset symptom weight threshold.

[0042] The controller 12 is used to obtain a symptom weight threshold, which is one of at least one preset symptom weight threshold. For example, at least one preset symptom weight threshold can respectively characterize the target bit error rate of the original data in different storage blocks. The symptom weight value SW of the original data can be used to represent the bit error rate of the original data. For example, the symptom weight value SW of the original data can increase as the bit error rate of the original data increases. For instance, the symptom weight value of the original data corresponding to a bit error rate of 0.007 is SW3, and the symptom weight value of the original data corresponding to a bit error rate of 0.006 is SW4, that is, SW3 is greater than SW4.

[0043] For example, there are preset symptom weight thresholds SW1, SW2, and SW3. The bit error rate corresponding to SW1 is 0.008, the bit error rate corresponding to SW2 is 0.005, and the data error rate corresponding to SW3 is 0.007. The controller 12 determines a symptom weight threshold from SW1, SW2, and SW3 according to preset rules. This symptom weight threshold is used to represent the target bit error rate of the read raw data. For example, if the symptom weight threshold is determined to be SW2, the target bit error rate of the read raw data is 0.005. Further, after the controller 12 reads the raw data from the storage block 11, it calculates the symptom weight value SWx of the raw data and compares it with the symptom weight threshold SW2 to determine the reliability of the raw data. For example, if SWx is less than SW2, the data error rate of the raw data is less than 0.005, and the data in the storage block 11 is reliable at this time. Or, for example, if SWx is greater than SW2, the bit error rate of the raw data is greater than 0.005, and the raw data needs to be decoded using error correction codes to obtain the decoding result.

[0044] In some embodiments, error-correcting code decoding includes low-density parity symmetric code decoding.

[0045] If the symptom weight value of the original data does not meet the preset conditions, the controller 12 performs error correction code decoding on the original data to obtain the decoding result. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data. It judges the symptom weight value SWx of the original data. If the symptom weight value SWx does not meet the preset conditions, it performs error correction code decoding on the original data to obtain the decoding result. The decoding result is used to judge the reliability of the original data. The error correction code decoding includes low-density parity-check code (LDPC) decoding. For example, the original data can be LDPC decoded to obtain the number of error correction bits in the original data, that is, how many bits in the original data have been corrected.

[0046] In some embodiments, the decoding result includes the number of error correction bits; the controller 12 is further configured to: determine an error correction bit threshold; and determine whether the number of error correction bits is greater than the error correction bit threshold.

[0047] If the symptom weight value of the original data does not meet the preset conditions, the controller 12 performs error correction code decoding on the original data to obtain the decoding result. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data. It judges the symptom weight value SWx of the original data. If the symptom weight value SWx does not meet the preset conditions, it performs error correction code decoding on the original data to obtain the decoding result. The decoding result includes the number of error correction bits in the original data, that is, how many bits in the original data are corrected.

[0048] At this time, the controller 12 determines the error correction bit threshold and judges whether the error correction bit number is greater than the error correction bit threshold, that is, whether the error correction bit number in the original data is greater than the error correction bit threshold, so as to judge the data reliability of the original data.

[0049] In this embodiment, the controller 12 is used to read the original data from the storage block 11, calculate the symptom weight value of the original data, and in response to the symptom weight value not meeting the preset conditions, decode the original data using error correction code to obtain the decoding result. Based on the decoding result, the number of bit errors in the data is determined, thereby enabling the controller 12 to judge the reliability of the original data based on the symptom weight value and the symptom weight threshold, thereby completing the background scan of the storage block 11, reducing the dependence on the decoder in the background scan, and improving the efficiency of the background scan operation.

[0050] In some embodiments, the controller 12 is further configured to: determine that the original data is in a second state in response to the number of error correction bits being greater than the number of error correction bits threshold, so as to perform a data transfer operation on the storage block.

[0051] If the symptom weight value of the original data does not meet the preset conditions, the controller 12 performs error correction code decoding on the original data to obtain the decoding result. The decoding result includes the number of error correction bits in the original data. The controller 12 determines the error correction bit threshold and judges whether the number of error correction bits in the decoding result is greater than the error correction bit threshold. If the number of error correction bits is greater than the error correction bit threshold, the original data is determined to be in the second state. The second state may be that the data error rate in the original data is high and the reliability is poor. Then the controller 12 performs a data transfer operation on the storage block to realize active protection of the data and complete the background scan operation of the storage device 10.

[0052] In this embodiment, the storage device 10 includes a storage block 11 and a controller 12. The controller 12 is connected to the storage block 11. The controller 12 is used to determine that the original data is in a second state in response to the error correction bit number being greater than the error correction bit number threshold, so as to perform a data transfer operation on the storage block. This enables the controller 12 to judge the reliability of the original data based on the symptom weight value and the symptom weight threshold, thereby reducing the dependence on the decoder in the background scan and improving the background scan efficiency of the storage block 11.

[0053] Alternatively, in some embodiments, the controller 12 is further configured to: determine that the original data is in a second state in response to a failure of error correction code decoding, so as to perform a data transfer operation on the storage block.

[0054] If the symptom weight value of the original data does not meet the preset conditions, the controller 12 performs error correction code decoding on the original data. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data. It judges the symptom weight value SWx of the original data. If the symptom weight value SWx does not meet the preset conditions, it performs error correction code decoding on the original data. At this time, if the error correction code decoding fails, it is determined that the original data is in a second state. The second state may be that the data error rate in the original data is high and the reliability is poor. Then the controller 12 performs a data transfer operation on the storage block to realize active protection of the data and complete the background scanning operation of the storage device 10.

[0055] In this embodiment, the storage device 10 includes a storage block 11 and a controller 12. The controller 12 is connected to the storage block 11. The controller 12 is used to determine that the original data is in a second state in response to the failure of the error correction code decoding, so as to perform a data transfer operation on the storage block. This enables the controller 12 to judge the reliability of the original data based on the symptom weight value and the symptom weight threshold, thereby reducing the dependence on the decoder in the background scan and improving the background scan efficiency of the storage block 11.

[0056] Please see Figure 2 , Figure 2This is a flowchart illustrating a data processing method for a storage device according to an embodiment of this application. The method can be implemented using the aforementioned storage device 10. It should be noted that if substantially the same result is achieved, the method of this application does not necessarily require the same implementation. Figure 2 The illustrated process sequence is limited. For example... Figure 2 As shown, the method may include the following steps:

[0057] S21: Read raw data from the storage block.

[0058] Read the raw data from storage block 11. The raw data is the data to be saved after being encoded and stored in storage block 11.

[0059] S22: Calculate the symptom weights of the original data.

[0060] After reading the original data from storage block 11, the symptom weight values ​​of the original data are calculated. For example, if the original data is c, the parity check matrix corresponding to the error correction code is H, i.e., H*c. T =0, meaning that after reading the original data from storage block 11, an error bit is generated. The error bit sequence is represented as e, that is, the read bit sequence is (c+e). Then, the symptom value s is calculated according to the parity check matrix H, s = H*(c+e). T =H*e T The number of 1s in the symptom value s is the syndrome weight (SW).

[0061] S23: Perform data operations on the storage block based on the symptom weight value to complete the background scan of the storage block.

[0062] Based on the symptom weight value, data operations are performed on storage block 11 to complete the background scan of storage block 11. For example, the reliability of the data is judged based on the symptom weight value SW of the original data c, and then data operations are performed on storage block 11 to achieve the background scan of storage block 11.

[0063] In this embodiment, raw data is read from storage block 11, the symptom weight value of the raw data is calculated, and then data operations can be performed on storage block 11 based on the symptom weight value to complete the background scan of storage block 11, thereby improving the background scan efficiency of storage block 11.

[0064] In some embodiments, a symptom weight threshold is obtained, which is used to characterize the target bit error rate of the original data.

[0065] Controller 12 is used to acquire a symptom weight threshold, which characterizes the target bit error rate of the raw data. The symptom weight value SW of the raw data can represent the raw bit error rate (raw BER). For example, the symptom weight value SW can increase as the raw data's bit error rate increases. For instance, a raw data symptom weight value of SW1 corresponds to a bit error rate of 0.008, and a raw data symptom weight value of SW2 corresponds to a bit error rate of 0.005, meaning SW1 is greater than SW2. Controller 12 is also used to determine a symptom weight threshold, which characterizes the target bit error rate of the raw data. For example, controller 12 determines a symptom weight threshold that represents the target bit error rate of the read raw data. The target bit error rate can be used to determine data reliability.

[0066] In some embodiments, in response to the symptom weight value meeting a preset condition, the original data is determined to be in a first state; or in response to the symptom weight value not meeting the preset condition, the original data is decoded using error correction codes to obtain a decoding result.

[0067] The controller 12 is used to determine that the original data is in a first state in response to the symptom weight value meeting the preset conditions. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SW x of the original data. It judges the symptom weight value SW x of the original data. When the symptom weight value SW x meets the preset conditions, it determines that the corresponding original data is in a first state. The first state can be that the data error rate in the original data is low and the reliability is high.

[0068] Alternatively, the controller 12 is also used to perform error correction code decoding on the original data in response to the symptom weight value not meeting the preset conditions, and obtain the decoding result. For example, the controller reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data, judges the symptom weight value SWx of the original data, and performs error correction code decoding on the original data when the symptom weight value SWx does not meet the preset conditions, so as to obtain the decoding result. The decoding result is used to judge the reliability of the original data.

[0069] Furthermore, in some embodiments, the preset condition is that the symptom weight value of the original data is less than the symptom weight threshold.

[0070] The controller 12 is used to determine that the original data is in a first state in response to the symptom weight value meeting a preset condition. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data, determines the symptom weight threshold of the original data as SWy, and judges the symptom weight value SWx of the original data. If the symptom weight value SWx meets the preset condition, that is, the symptom weight value SWx of the original data is less than the symptom weight threshold SWy, then it can be determined that the corresponding original data is in a first state. The first state can be that the data error rate in the original data is low and the reliability is high.

[0071] Alternatively, the controller 12 is also configured to, in response to the symptom weight value not meeting the preset conditions, perform error correction code decoding on the original data to obtain the decoding result. For example, it reads the original data from the storage block 11 and calculates the symptom weight value SWx of the original data, determines the symptom weight threshold of the original data as SWy, judges the symptom weight value SWx of the original data, and if the symptom weight value SWx does not meet the preset conditions, that is, the symptom weight value SWx of the original data is greater than or equal to the symptom weight threshold SWy, performs error correction code decoding on the original data to obtain the decoding result. The decoding result is used to judge the reliability of the original data.

[0072] To facilitate understanding, the data processing method of the storage device in the embodiments of this application will be illustrated with examples, such as... Figure 3 As shown, Figure 3 This is a schematic flowchart of a data processing method for a storage device according to an embodiment of this application, as detailed below:

[0073] S31: Read raw data from the storage block.

[0074] The controller 12 reads the raw data from the storage block 11. The raw data is the data to be saved after being encoded and stored in the storage block 11.

[0075] S32: Calculate the symptom weights of the original data.

[0076] After the controller 12 reads the raw data from the storage block 11, it calculates the symptom weight value SW of the raw data.

[0077] S33: Determine whether the symptom weight value is less than the symptom weight threshold.

[0078] For example, determine whether the symptom weight value SW is less than the symptom weight threshold SW1.

[0079] One of the judgment results of step S33 is that the symptom weight value is less than the symptom weight threshold, and step S34 is executed.

[0080] The second result of step S33 is that the symptom weight value is not less than the symptom weight threshold, and then step S35 is executed.

[0081] S34: Determine that the original data is in the first state.

[0082] If the symptom weight value SW is less than the symptom weight threshold SW1, the original data is determined to be in the first state. The first state can be characterized by a low data error rate and high reliability in the original data.

[0083] S35: Decode the original data using error correction codes to obtain the number of error bits.

[0084] The symptom weight value SW is not less than the symptom weight threshold SW1. The original data is then decoded using error correction codes. For example, the original data can be decoded using LDPC to obtain the number of error correction bits F in the original data, i.e., how many bits in the original data have been corrected.

[0085] S36: Determine whether the number of error bits is greater than the error correction bit threshold.

[0086] For example, determine whether the number of error bits F is greater than the error correction bit threshold F1.

[0087] One of the judgment results of step S36 is that the number of error bits is greater than the error correction bit threshold, and step S37 is executed.

[0088] The second result of step S36 is that the number of error bits is not greater than the error correction bit threshold, so proceed to step S38.

[0089] S37: Determine that the original data is in the second state in order to perform a data migration operation on the storage block.

[0090] If the number of error bits F is greater than the error correction bit threshold F1, the original data is determined to be in the second state, so that a data transfer operation can be performed on the storage block. The second state can be characterized by a high data error rate and poor reliability in the original data.

[0091] S38: Determine that the original data is in the first state.

[0092] If the number of error bits F is not greater than the error correction bit threshold F1, the original data is determined to be in the first state.

[0093] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0094] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed methods and related devices can be implemented in other ways. For example, the related device implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication disconnection shown or discussed may be indirect coupling or communication disconnection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0096] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0097] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application.

[0098] Those skilled in the art will readily recognize that numerous modifications and variations can be made to the apparatus and method while maintaining the teachings of this application. Therefore, the above disclosure should be considered limited only by the scope of the appended claims.

Claims

1. A storage device, characterized in that, include: Storage blocks; The controller is connected to the storage block; The controller is used for: Read the raw data from the storage block; Calculate the symptom weight values ​​of the original data; Based on the symptom weight values, data operations are performed on the storage block to complete the background scan of the storage block.

2. The device according to claim 1, characterized in that, The controller is also used for: Obtain the symptom weight threshold, which is used to characterize the target bit error rate of the original data.

3. The device according to claim 2, characterized in that, The controller is also used for: In response to the symptom weight value meeting a preset condition, the original data is determined to be in a first state; or In response to the symptom weight value not meeting the preset condition, the original data is decoded using error correction code to obtain the decoding result.

4. The device according to claim 3, characterized in that, The preset condition is that the symptom weight value of the original data is less than the symptom weight threshold.

5. The device according to claim 3, characterized in that, The symptom weight threshold is one of at least one preset symptom weight threshold.

6. The device according to claim 3, characterized in that, The error-correcting code decoding includes low-density parity symmetric code decoding.

7. The device according to claim 3, characterized in that, The decoding result includes the number of error correction bits; The controller is also used for: Determine the threshold for the number of error correction bits; Determine whether the number of error correction bits is greater than the error correction bit threshold.

8. The device according to claim 7, characterized in that, The controller is also used for: In response to the error correction bit count being greater than the error correction bit count threshold, the original data is determined to be in a second state, so that a data migration operation is performed on the storage block.

9. The device according to claim 3, characterized in that, The controller is also used for: In response to the failure of error correction code decoding, the original data is determined to be in a second state, and a data migration operation is performed on the storage block.

10. A data processing method for a storage device, characterized in that, The storage device is the storage device according to any one of claims 1-9; The method includes: Read the raw data from the storage block; Calculate the symptom weight values ​​of the original data; Based on the symptom weight values, data operations are performed on the storage block to complete the background scan of the storage block.