Decoding method, device, electronic device, storage medium, and program product
By using the method of cascade integration of two decoding methods in flash memory, the decoding of the previous round of error correction results is solved, and more efficient data error correction and read and write reliability are achieved.
Patent Information
- Application Number
- CN202510323374.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-03-19
AI Technical Summary
In the prior art, the error correction performance of flash memory is low, resulting in insufficient data read and write reliability.
The method of cascaded and fused two decoding methods is adopted. In each round, the decoding operation is performed through the first decoding method to obtain the codeword information of the first level, and then the error correction is performed using the second decoding method until the preset condition is met, it stops iteration.
Through cascading and fusion decoding, the number of iterations is reduced, the decoding delay is reduced, the error correction performance is improved, and the reliability of data reading and writing is enhanced.
Smart Images

Figure CN119864061B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technologies, and in particular, to a decoding method, apparatus, electronic device, storage medium, and program product. Background Art
[0002] In the field of storage technologies, with the continuous development of flash memory technology, the storage cell density in flash memory is continuously increasing, that is, the distance between storage cells becomes closer, resulting in the possibility that programming or reading a cell may affect the state of its neighboring cells, increasing the error rate. Therefore, in order to ensure the reliability of data reading and writing, an error correction technology needs to be introduced on the data reading and writing channel.
[0003] Currently, an independent encoding / decoding method is generally used to encode / decode data, resulting in low error correction performance of flash memory. Summary of the Invention
[0004] This application provides a decoding method, apparatus, electronic device, storage medium, and program product to at least solve the problem of low error correction performance in related technologies.
[0005] This application provides a decoding method, including:
[0006] In the current round, obtain the initial codeword information corresponding to the current round;
[0007] Obtain the initial confidence information corresponding to the current round;
[0008] According to the pre-configured first decoding method, the initial confidence information, and the initial codeword information, determine the codeword information of the first level in the current round;
[0009] Adopt the first decoding method to check the codeword information of the first level in the current round, and obtain the check result corresponding to the codeword information of the first level in the current round;
[0010] According to the pre-configured second decoding method and the pre-obtained check information of the first level, correct the codeword information of the first level in the current round to obtain the codeword information of the second level in the current round;
[0011] When it is determined that the check result and / or the number of iterations corresponding to the current round meet the preset conditions, stop the iteration, and determine the codeword information of the second level in the current round as the target decoding result.
[0012] This application also provides a decoding apparatus, including:
[0013] An obtaining module, configured to, in the current round, obtain the initial codeword information corresponding to the current round; obtain the initial confidence information corresponding to the current round;
[0014] A determination module, configured to determine the codeword information of the first layer in the current round according to a pre-configured first decoding method, initial confidence information, and initial codeword information;
[0015] A verification module, configured to verify the codeword information of the first layer in the current round by using the first decoding method, and obtain a verification result corresponding to the codeword information of the first layer in the current round;
[0016] An error correction module, configured to correct the codeword information of the first layer in the current round according to a pre-configured second decoding method and pre-obtained verification information of the first layer, to obtain the codeword information of the second layer in the current round;
[0017] The determination module is further configured to stop iteration when it is determined that the verification result and / or the number of iterations corresponding to the current round meet a preset condition, and determine the codeword information of the second layer in the current round as the target decoding result.
[0018] The present application further provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any one of the above decoding methods when executing the computer program.
[0019] The present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above decoding methods are implemented.
[0020] The present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any one of the above decoding methods are implemented.
[0021] Through the present application, in each processing round, decoding operations are performed by two decoding methods. That is, after obtaining the initial confidence information and initial codeword information corresponding to the current round, first, the first decoding method is used to perform decoding operations on the initial confidence information and initial codeword information to obtain the codeword information of the first layer in the current round, and then the second decoding method and the pre-obtained codeword information of the first layer are used to correct the result obtained by the first decoding method (the codeword information of the first layer in the current round) to obtain the codeword information of the second layer in the current round. In this way, through multiple rounds of iteration in cascade fusion decoding, the codeword information corrected in the previous round can be used for decoding during the decoding operation corresponding to the first decoding method, which can reduce the bit error rate of decoding, thereby greatly reducing the number of iterations and improving the decoding performance. Description of the Drawings
[0022] To more clearly illustrate the embodiments of the present application, the accompanying drawings required for the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0023] Figure 1 Schematic diagram of the architecture of a coding and decoding system provided by an embodiment of the present application;
[0024] Figure 2 Schematic diagram of the process flow of a decoding method provided by an embodiment of the present application;
[0025] Figure 3 Schematic diagram of the structure of data to be decoded provided by an embodiment of the present application;
[0026] Figure 4 Schematic diagram of the process flow of another decoding method provided by an embodiment of the present application;
[0027] Figure 5 Schematic diagram of the data flow in the decoding process provided by an embodiment of the present application;
[0028] Figure 6 Schematic diagram of the process flow of an encoding method provided by an embodiment of the present application;
[0029] Figure 7 Schematic diagram of the data flow in the coding and decoding process provided by an embodiment of the present application;
[0030] Figure 8 Schematic diagram of the process flow of yet another decoding method provided by an embodiment of the present application;
[0031] Figure 9 Schematic diagram of the structure of a decoding device provided by an embodiment of the present application;
[0032] Figure 10 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0033] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present application.
[0034] It should be noted that in the description of this application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0035] In order to enable those skilled in the art of this technology to better understand the solution of this application, the following further elaborates on this application in conjunction with the accompanying drawings and specific embodiments.
[0036] The decoding method provided by the embodiments of this application can be implemented by a coding and decoding system as Figure 1 shown. The coding and decoding system can include a flash memory controller and a flash memory. The flash memory controller can be used to receive various read and write requests from other devices, parse the various read and write requests to obtain operation information for reading and writing data, and read data from the flash memory or write data into the flash memory according to the operation information. The flash memory includes multiple storage units for storing data.
[0037] An embodiment of this application provides a decoding method, which can be executed by the above-mentioned flash memory controller. As Figure 2 shown, the decoding method can include the following steps:
[0038] Step S201, in the current round, obtain the initial confidence information and the initial codeword information corresponding to the current round.
[0039] Among them, the initial confidence information can include the initial confidence levels respectively corresponding to multiple bit positions in the current round. The initial confidence level can be the Log-Likelihood Ratio (LLR), which represents the probability characteristic that the bit position is the first preset value. The first preset value can be 1 or 0. Correspondingly, the initial confidence information can be an initial LLR table. The codeword information can be the result obtained by processing the original data through an encoding algorithm, including the original information and the redundant information added for error correction or error detection. The initial codeword information includes the initial decision values respectively corresponding to each bit position in the current round.
[0040] The current round can be the first round among multiple rounds, or a non-first round among multiple rounds. The acquisition methods of the initial confidence information and the initial codeword information corresponding to these two types of rounds are different. Therefore, the following separately introduces the specific steps of acquiring the initial codeword information and the initial confidence information for the first round and non-first rounds.
[0041] Case 1, the current round is the first round.
[0042] First, obtaining the initial codeword information corresponding to the current round may include the following specific steps:
[0043] Step 1, obtain the data to be decoded.
[0044] Step 2, decode the data to be decoded according to the second decoding method to obtain the initial codeword information corresponding to the current round.
[0045] Among them, the data to be decoded may include multiple lines of user data, multiple lines of first-class parity data, second-class parity data for protecting each line of user data, and second-class parity data for protecting each line of first-class parity data. For example, the structure of the data to be decoded may be as Figure 3 shown, including n lines of user data and c lines of first-class parity data, and second-class parity data for protecting each line of user data and each line of first-class parity data, that is, n + c lines of second-class parity data. Alternatively, the data to be decoded may include multiple lines of user data, multiple lines of first-class parity data, and second-class parity data for protecting each line of first-class parity data, only protecting some error-prone data, and only decoding part of the data during the decoding process, which can improve the efficiency of the decoding process corresponding to the second decoding method, thereby improving the overall decoding efficiency. The first-class parity data may be parity data corresponding to the first decoding method, and the second-class parity data may be parity data corresponding to the second decoding method. The first decoding method may be an iterative decoding method. For example, it may be a Low Density Parity Check Code (LDPC) decoding method. The second decoding method may be an algebraic code decoding method. For example, it may be a Bose Chaudhuri Hocquenghem (BCH) code decoding method or a Reed-Solomon (RS) code decoding method.
[0046] Specifically, after the flash memory controller reads the data to be decoded from the flash memory, it may first input the data to be decoded into the decoder corresponding to the second decoding method in itself (for example, input into the BCH decoder) to perform decoding and error correction on the data to be decoded, obtain the initial codeword information corresponding to the current round and the first-level parity information (that is, the second-class parity data, for example, Figure 3 the second-class parity data in), and input the initial codeword information corresponding to the current round into the decoder corresponding to the first encoding method (for example, input into the LDPC decoder) for subsequent decoding processing, and cache the first-level parity information for the next decoding process corresponding to the second decoding method. Among them, the decoder may be implemented in the form of a hardware module or in the form of software.
[0047] In this way, in the first round, the second decoding method is first used to decode the data to be decoded, so that some error data existing in the data to be decoded can be corrected. When performing the decoding operation corresponding to the first decoding method in the subsequent process, the decoding process can be accelerated, the efficiency of the decoding operation corresponding to the first decoding method can be improved, resource waste can be reduced, and the decoding processing delay can be reduced.
[0048] In some alternative embodiments, the flash memory controller may also directly determine the data to be decoded as the initial codeword information corresponding to the current round without going through the processing of the second decoding method.
[0049] In some alternative embodiments, the flash memory controller may first determine the data length of the data to be decoded. When it is determined that the data length is greater than a preset length threshold, the second decoding method may be determined as the RS code decoding method. Alternatively, when it is determined that the data length is less than or equal to the preset length threshold, the second decoding method may be determined as the BCH decoding method. Since the BCH code has a lower computational complexity when processing smaller data blocks, while the RS code has a higher error correction ability when processing larger data blocks, by dynamically selecting a suitable decoding method based on the data length, the flexibility is relatively high, unnecessary computational overhead can be reduced, and the overall computational efficiency can be improved.
[0050] Second, obtaining the initial confidence information corresponding to the current round may include the following specific steps:
[0051] Step 1: According to the initial decision values respectively corresponding to each bit in the first decoding method and the initial codeword information in the current round, determine the initial confidence corresponding to each bit in the current round.
[0052] Step 2: Generate the initial confidence information corresponding to the current round according to the initial confidence corresponding to each bit in the current round.
[0053] Specifically, taking the first decoding method as the LDPC code decoding method as an example, the flash memory controller may calculate the initial confidence corresponding to each bit in the current round according to the calculation method specified in the LDPC code decoding method, using the initial decision values respectively corresponding to each bit in the initial codeword information in the current round and the preset noise characteristics. Furthermore, the flash memory controller may arrange the initial confidence corresponding to each bit in the current round in the order of bits, and then generate the initial confidence information corresponding to the current round.
[0054] Case 2: The current round is not the first round.
[0055] First, obtaining the initial confidence information corresponding to the current round may include the following specific steps:
[0056] Step 1: Obtain the codeword information of the second layer in the previous round corresponding to the current round, and the confidence information of the first layer in the previous round.
[0057] Step 2: Update the confidence information of the first layer in the previous round according to the second decoding method and the codeword information of the second layer in the previous round to obtain the confidence information of the second layer in the previous round.
[0058] Among them, the confidence information of the second layer in the previous round is the initial confidence information corresponding to the current round. The codeword information of the second layer in the previous round includes multiple lines of codeword information, and the confidence information of the first layer in the previous round includes multiple lines of confidence information.
[0059] Specifically, taking the first decoding method as the LDPC code decoding method as an example, during the process of the flash memory controller performing the decoding operation according to the first decoding method in the previous round, it will calculate the confidence information of the first layer in the previous round according to the calculation method specified in the LDPC code decoding method, using the initial codeword information corresponding to the previous round and the initial confidence information corresponding to the previous round. Then, the flash memory controller can correct the codeword information of the first layer in the previous round according to the second decoding method and the parity check information of the first layer to obtain the codeword information of the second layer in the previous round. In the processing of the current round, the flash memory controller can directly determine the codeword information of the second layer in the previous round as the initial confidence information corresponding to the current round. The codeword information of the second layer in the previous round may include the decision value of each bit in the second layer in the previous round, and the decision value of each bit in the second layer in the previous round is used as the initial decision value of each bit in the current round for subsequent iterative processing.
[0060] After obtaining the confidence information of the first layer in the previous round and the codeword information of the second layer in the previous round, the flash memory controller can execute Step 2, and Step 2 can specifically adopt the following two methods:
[0061] Method 1: Determine the confidence of each bit in the second layer in the previous round according to the second decoding method and the decision value of each bit in the second layer in the previous round. Update the confidence corresponding to each bit in the confidence information of the first layer in the previous round respectively according to the confidence of each bit in the second layer in the previous round to obtain the confidence information of the second layer in the previous round.
[0062] Specifically, in the second decoding method, a confidence calculation method can be specified. The flash memory controller can calculate the confidence of each bit in the second level in the previous round according to the confidence calculation method in the second decoding method, using the decision value of each bit in the second level in the previous round (the specific calculation method can be similar to the method for calculating the initial confidence mentioned above). Furthermore, the flash memory controller can update the confidence corresponding to each bit in the confidence information of the first level in the previous round respectively according to the confidence of each bit in the second level in the previous round, to obtain the confidence information of the second level in the previous round (taking any bit as an example, the flash memory controller can update the confidence of this bit in the confidence of the first level in the previous round to the confidence of this bit in the second level in the previous round).
[0063] Alternatively, the flash memory controller can determine whether the decision value of the first bit included in the codeword information of the second level in the previous round is consistent with the decision value of the second bit (any one of multiple bits) included in the codeword information of the first level in the previous round. If so, it is determined that the confidence of the second bit does not need to be updated, and the confidence of the second bit in the first level in the previous round can be directly determined as the confidence of the second bit in the second level in the previous round. If not, according to the value of the second bit included in the codeword information of the second level in the previous round and the confidence calculation method specified in the second decoding method, the confidence of the target bit in the second level in the previous round is calculated. By analogy, the confidence of all bits in the second level in the previous round can be obtained, and the confidence of all bits in the second level in the previous round together constitute the confidence information of the second level in the previous round.
[0064] Method 2
[0065] Step 1: Adopt the second decoding method to check each row of codeword information in the codeword information of the second level in the previous round respectively, and obtain the check result corresponding to each row of codeword information.
[0066] Step 2: According to the target check result corresponding to the target row of codeword information, perform an update operation corresponding to the target check result on the confidence information of the target row in the confidence information of the first level in the previous round.
[0067] Among them, the target row of codeword information is any row of codeword information included in the codeword information of the second level in the previous round.
[0068] Step 3: After completing the update operation corresponding to the confidence information of each row, obtain the confidence information of the second level in the previous round.
[0069] Specifically, taking the second decoding method as the BCH code decoding method as an example, the second decoding method stipulates the parity check equations for successful error correction (for example, the syndromes stipulated in the BCH code decoding method). The flash memory controller can determine whether the target row codeword information meets the conditions given by the parity check equations. If so, it can determine that the target parity check result corresponding to the target row codeword information is successful error correction. If not, it determines that the target parity check result corresponding to the target row codeword information is failed error correction.
[0070] In this way, the flash memory controller can perform an update operation corresponding to the target parity check result on the confidence information of the target row according to the difference of the target parity check result:
[0071] When the target parity check result is successful error correction, the flash memory controller can update the confidence information of the target row in the confidence information of the first level in the previous round according to the target row codeword information and the pre-constructed correspondence between the decision value and the confidence. Correspondingly, the flash memory controller can perform the update operation according to the following specific steps:
[0072] Step 1, according to the decision value of the target bit and the pre-constructed correspondence between the decision value and the confidence, determine the target confidence corresponding to the decision value of the target bit.
[0073] Among them, the decision value of the target bit is the decision value of any one of the multiple bits included in the target row codeword information. The correspondence between the decision value and the confidence can include: the decision value is the first preset value, and the confidence corresponding to the first preset value is the maximum confidence threshold; the decision value is the second preset value, and the confidence corresponding to the second preset value is the minimum confidence threshold. For example, {[1, 10], [0, -10]}.
[0074] Step 2, update the confidence corresponding to the target bit in the confidence information of the first level in the previous round to the target confidence.
[0075] Step 3, mark the confidence information corresponding to the target row in the confidence information of the first level in the previous round to indicate that no update operation will be performed on the confidence corresponding to any bit in the target row in the current round.
[0076] Among them, the marked information can be "error-free".
[0077] When the target verification result is an error correction failure, the confidence information of the target row in the confidence information of the first layer in the previous round may not be updated, or the confidence information of the target row in the confidence information of the first layer in the previous round may be updated in a manner similar to Method 1, that is, according to the second decoding method and the codeword information of the second layer in the previous round, the confidence information of the target row in the confidence information of the first layer in the previous round is updated.
[0078] After completing the judgment operation for each row and the confidence setting operation performed after successful error correction judgment, the confidence information of the second layer in the previous round can be obtained.
[0079] Through the above solution, when the codeword information of a certain row has been determined to be successfully error-corrected, marking its corresponding confidence information as no longer updated can avoid repeated calculation of this row in subsequent iterations, reduce unnecessary calculation overhead, and accelerate the convergence speed of the entire decoding process. In this way, all data can be error-corrected in a shorter time, improving the overall calculation efficiency. In addition, for those rows whose error correction success has not been determined, continue to update the confidence and perform iterative decoding to ensure that these rows can gradually approach the optimal solution. For the rows that have been successfully error-corrected, fix their confidence and mark them to prevent them from being affected by the errors of other rows in subsequent iterations, that is, it can avoid introducing new errors due to subsequent iterations and improve the overall error correction accuracy.
[0080] Second, the flash memory controller can determine the codeword information of the second layer in the previous round obtained as the initial codeword information corresponding to the current round.
[0081] Step S202, determine the codeword information of the first layer in the current round according to the pre-configured first decoding method, initial confidence information, and initial codeword information.
[0082] Specifically, the flash memory controller can use the LLR-BP (Log-Likelihood Ratio Belief Propagation) algorithm or the LLR-NMS (Log-Likelihood Ratio Normalized Min-Sum) algorithm in the first decoding method, and use the initial confidence information and the initial codeword information to determine the codeword information of the first layer in the current round. The specific steps may include the following:
[0083] Step 1, update the initial confidence information according to the first decoding method and the initial decision value of each bit in the current round to obtain the confidence information of the first layer in the current round.
[0084] Step 2: Update the initial codeword information corresponding to the current round according to the confidence information of the first layer in the current round and the preset confidence threshold to obtain the codeword information of the first layer in the current round.
[0085] Among them, Step 2 can specifically include:
[0086] Step 1: Determine the decision value of each bit in the first layer in the current round according to the confidence of each bit in the first layer in the current round and the preset confidence threshold.
[0087] Step 2: Update the initial codeword information according to the decision value of each bit in the first layer in the current round and the initial decision value of each bit in the current round to obtain the codeword information of the first layer in the current round.
[0088] Specifically, taking the first decoding method as the LDPC code decoding method as an example, the first decoding method involves the concepts of variable nodes and check nodes. Among them, variable nodes are used to indicate bits, and check nodes are used to indicate check methods or constraint conditions. And, a check matrix can be predefined in the first decoding method. After obtaining the initial codeword information, the flash memory controller can determine the check nodes connected to each variable node based on the initial codeword information and the check matrix. In each iteration process, for each variable node, each variable node sends the initial LLR value of the current round to all the check nodes connected to it, and the check node updates the initial LLR value of all the variable nodes connected to it according to the initial LLR values of the current round sent by all the received variable nodes to obtain the confidence information of the first layer in the current round.
[0089] Furthermore, the flash memory controller can perform a hard decision operation according to the confidence information of the first layer in the current round. Specifically, it can be: Determine whether the confidence of the first bit in the first layer in the current round is greater than the preset confidence threshold, where the first bit is any one of multiple bits. When it is determined that the confidence of the first bit in the first layer in the current round is greater than the preset confidence threshold, the first preset value is determined as the decision value of the first bit in the first layer in the current round. Or, when it is determined that the confidence of the first bit in the first layer in the current round is less than or equal to the preset confidence threshold, the second preset value is determined as the decision value of the first bit in the first layer in the current round (for example, when the confidence is greater than the preset threshold, the decision bit is 1, and when the confidence is less than or equal to the preset threshold, the decision bit is 0). After completing the decision operation of each bit, the decision value of each bit in the first layer in the current round can be obtained.
[0090] Finally, the flash memory controller can update the initial codeword information according to the decision value corresponding to each bit to obtain the codeword information of the first layer in the current round. Specifically, the flash memory controller can determine whether the decision value of the first layer of the first bit is the same as the initial decision value of the first bit in the initial codeword information. When it is determined that the decision value of the first layer of the first bit is different from the initial decision value of the first bit in the initial codeword information, the initial decision value of the first bit in the initial codeword information is updated to the decision value of the first layer of the first bit. Or, when it is determined that the decision value of the first layer of the first bit is different from the initial decision value of the first bit in the initial codeword information, the initial decision value of the first bit in the initial codeword information is updated to the decision value of the first layer of the first bit.
[0091] In this way, in each round, according to the initial codeword information and the initial confidence information, the confidence and decision value of each bit are gradually updated. This iterative process can gradually approach the optimal solution, significantly improving the error correction ability. Moreover, the update of each round will utilize the results of the previous round to form a cumulative effect. As the number of rounds increases, errors are gradually corrected, and finally accurate codeword information is obtained. In addition, each update is equivalent to a re-verification of the data, which can ensure the correctness of each bit and help significantly reduce the bit error rate, especially in a high-noise environment.
[0092] For example, if the initial codeword information is r = [1, 0, 1, 1, 0, 1, 1] and the initial confidence information is [0.8, -0.7, 0.9, 0.6, -0.5, 0.4, 0.3], after the update, the confidence information of the first layer in the current round can be [0.9, -0.8, 0.85, 0.65, -0.6, 0.45, 0.35]. Based on this, the codeword information of the first layer in the current round can be [1, 0, 1, 1, 0, 1, 1].
[0093] Step S203: Use the first decoding method to check the codeword information of the first layer in the current round and obtain the check result corresponding to the codeword information of the first layer in the current round.
[0094] Specifically, taking the first decoding method as the LDPC code decoding method, a check equation can be predefined in the first decoding method. The flash memory controller can determine, in row units, whether the codeword information of each row in the codeword information of the first layer in the current round meets the conditions indicated by the check equation. When the codeword information of all rows meets the conditions indicated by the check equation, the check result can be obtained as successful. Or, when there is any row of codeword information that does not meet the conditions indicated by the check equation, the check result can be obtained as failed.
[0095] Step S204: According to the pre-configured second decoding method and the pre-acquired check information of the first level, correct the codeword information of the first level in the current round to obtain the codeword information of the second level in the current round.
[0096] Specifically, taking the BCH code decoding method as an example, the flash memory controller can, according to the decoding rules specified in the BCH code decoding method, use the check information of the first level to correct the decision values of one or more bit positions included in the codeword information of the first level in the current round, obtain the decision values after error correction for each bit position, and the decision values after error correction for all bit positions together constitute the codeword information of the second level in the current round.
[0097] Step S205: When it is determined that the check result and / or the number of iterations corresponding to the current round meet the preset conditions, stop the iteration and determine the codeword information of the second level in the current round as the target decoding result.
[0098] Specifically, the flash memory controller can determine whether the check result is successful and determine whether the number of iterations corresponding to the current round reaches the preset number of iterations. When it is determined that the check result is successful, or the number of iterations corresponding to the current round reaches the preset number of iterations (that is, the preset conditions are met), stop the iteration and determine the codeword information of the second level in the current round as the target decoding result. Or, when it is determined that the check result is failed and the number of iterations corresponding to the current round does not reach the preset number of iterations (that is, the preset conditions are not met), continue to perform the processing of the next round until any processing round meets the preset conditions, then stop the iteration and determine the codeword information of the second level in the last round as the target decoding result.
[0099] When determining to continue the processing of the next round, the flash memory controller can determine the initial confidence information and the initial codeword information corresponding to the next round for use in the decoding process of the next round, which can specifically include the following steps:
[0100] First, determining the initial confidence information corresponding to the next round can include the following steps:
[0101] Step 1: According to the second decoding method and the codeword information of the second level in the current round, update the confidence information of the first level in the current round to obtain the confidence information of the second level in the current round.
[0102] Step 2: Determine the confidence information of the second level in the current round as the initial confidence information of the next round.
[0103] Among them, Step 1 can be implemented in the following two ways:
[0104] In Method 1, according to the second decoding method and the decision values of each bit in the second layer in the current round, the confidence level of each bit in the second layer in the current round is determined. According to the confidence level of each bit in the second layer in the current round, the confidence levels corresponding to all bits in the confidence level information of the first layer in the current round are respectively updated to obtain the confidence level information of the second layer in the current round.
[0105] In Method 2, the second decoding method is adopted to check each row of codeword information in the codeword information of the second layer in the current round to obtain a check result corresponding to each row of codeword information. According to the first check result corresponding to the first row of codeword information, an update operation corresponding to the first check result is performed on the confidence level information of the first row in the confidence level information of the first layer in the current round, where the first row of codeword information is any row of codeword information included in the codeword information of the second layer in the current round. After completing the update operation corresponding to the confidence level information of each row, the confidence level information of the second layer in the current round is obtained.
[0106] Second, the codeword information of the second layer in the current round is determined as the initial codeword information corresponding to the next round.
[0107] In the decoding method provided by the embodiments of the present application, in each processing round, the decoding operation is performed through two decoding methods. That is, after obtaining the initial confidence level information and the initial codeword information corresponding to the current round, the first decoding method is first used to perform the decoding operation on the initial confidence level information and the initial codeword information to obtain the codeword information of the first layer in the current round. Then, the second decoding method and the pre-obtained codeword information of the first layer are used to correct the result obtained by the first decoding method (the codeword information of the first layer in the current round) to obtain the codeword information of the second layer in the current round. In this way, through multiple rounds of iteration in the cascade fusion decoding, the codeword information corrected in the previous round can be used for decoding during the decoding operation corresponding to the first decoding method, and the confidence level information in the decoding iteration process can be continuously corrected, which can reduce the error rate of decoding, thereby greatly reducing the number of iterations, reducing the decoding delay, and improving the overall performance of the cascade decoding.
[0108] In some optional embodiments, the flash memory controller may receive the decoding instruction sent by the central processing unit and parse the decoding instruction to obtain the instruction information on whether the second decoding process participates in the iterative decoding process. If the instruction information is used to indicate that the second decoding process participates in the iterative process, the decoding operation may be performed according to the Figure 2 shown process. If the instruction information is used to indicate that the second decoding process does not participate in the iterative process, the decoding operation may be performed according to the Figure 4 shown process.
[0109] Embodiments of the present application provide a decoding method, which can be executed by the above-mentioned flash memory controller. Among them, the second decoding method may not participate in the iterative decoding process. Correspondingly, the flash memory controller can only obtain the initial codeword information and initial confidence information corresponding to the first round, and after obtaining the initial codeword information corresponding to the first round, it can perform decoding operations according to the process shown in Figure 4 The decoding method may include the following steps:
[0110] Step S401, obtain the data to be decoded.
[0111] Step S402, decode the data to be decoded according to the second decoding method to obtain the initial codeword information corresponding to the current round and the check information of the first level.
[0112] Steps S401 and S402 may refer to the specific steps of obtaining the initial codeword information corresponding to the current round in Case 1 of Step S201, which will not be elaborated here.
[0113] Step S403, perform iterative decoding on the initial codeword information corresponding to the current round according to the first decoding method to obtain the decoding result corresponding to the first decoding method.
[0114] Specifically, taking the first decoding method as the LDPC code decoding method as an example, the flash memory controller can adopt the LLR-BP algorithm included in the first decoding method to perform iterative decoding on the data to be decoded to obtain the decoding result corresponding to the first decoding method.
[0115] Step S404, correct the decoding result corresponding to the first decoding method according to the second decoding method and the check information of the first level to obtain the decoding result corresponding to the second decoding method.
[0116] Specifically, after completing the iterative decoding operation of the first decoding method, the flash memory controller can adopt the second decoding method and the check information of the first level to correct the decoding result corresponding to the first decoding method to obtain the decoding result corresponding to the second decoding method.
[0117] Step S405, determine the decoding result corresponding to the second decoding method as the target decoding result.
[0118] For example, when the first decoding method is the LDPC code decoding method and the second decoding method is the BCH code decoding method, the data stream of the decoding process can be as shown in Figure 5As shown, the flash memory controller inputs the data to be decoded into a BCH decoder (a decoder corresponding to the second decoding method) for decoding to obtain initial codeword information and first-level parity information. After inputting the initial codeword information into an LDPC decoder (a decoder corresponding to the first decoding method) for iterative decoding, an intermediate decoding result (i.e., the decoding result corresponding to the first decoding method) is obtained. The intermediate decoding result is input into the BCH decoder again, so that the BCH decoding can use the first-level parity information to correct the intermediate decoding result again to obtain the final target decoding result.
[0119] In the decoding method provided by the embodiments of the present application, the second decoding method can participate in each iterative process (for example, Figure 2 the decoding process shown), or can only participate in the first and last decodings, which is relatively flexible, enabling users to select according to actual needs. For example, when the first decoding method is an LDPC code decoding method and the second decoding method is a BCH code decoding method, in the case of extremely high requirements for data integrity and reliability, or in the case of poor channel conditions (i.e., the channel noise is greater than the preset noise threshold), after each LDPC code decoding operation, further error correction can be performed through the BCH code decoding method, which can further check and correct errors, thereby ensuring that the output decoding result has extremely high reliability. Conversely, when the channel conditions are good (channel noise), since the LDPC code can already correct most errors, performing additional BCH iterations may not bring significant performance improvement. Therefore, after completing the LDPC iterative decoding process, BCH code decoding can be performed.
[0120] The embodiments of the present application provide an encoding method, which can be executed by the above-mentioned flash memory controller, as Figure 6 shown, the decoding method may include the following steps:
[0121] Step S601, obtain user data.
[0122] Specifically, when the flash memory controller receives a write data instruction sent by the central processing unit, it can parse the write data instruction to obtain user data.
[0123] Step S602, encode the user data according to a pre-configured first encoding method to obtain codeword information corresponding to the first encoding method.
[0124] Specifically, as Figure 3 shown, the user data can be divided into multiple lines according to a preset length. The flash memory controller can use the first encoding method to encode the multiple lines of user data to obtain multiple lines of first-type parity data.
[0125] Step S603: Encode the codeword information corresponding to the first encoding method according to the pre-configured second encoding method to obtain an encoding result.
[0126] Among them, the first encoding method corresponds to the first decoding method, and the second encoding method corresponds to the second decoding method.
[0127] Specifically, for each row of user data and / or each piece of first-class check data, the flash memory controller can adopt the second encoding method to encode each row of user data and / or each piece of first-class check data respectively to obtain the final encoding result. For example, the encoding result can be the data to be decoded as shown in Figure 3 shown.
[0128] Step S604: Store the encoding result.
[0129] Specifically, the flash memory controller can store the encoding result in the flash memory.
[0130] For the encoding method provided by the embodiments of the present application, since different encoding methods have their own advantages, therefore, by cascading and encoding user data with two encoding methods, the error correction ability and data reliability can be enhanced, covering a wider range of error patterns.
[0131] Next, taking the first decoding method as the LDPC code decoding method and the second decoding method as the BCH code decoding method as an example, the overall process of cascaded encoding and decoding will be described.
[0132] Example 1, as shown in Figure 7 shown, after the flash memory controller obtains the user data, it first performs LDPC encoding operation (encoding with the first encoding method) on the user data, and then performs BCH encoding operation (encoding with the second encoding method) to obtain the encoding result and store it in the flash memory. When obtaining the read instruction, the data to be decoded can be read from the flash memory. During the process of writing data and reading data, the data will be affected by noise interference during channel transmission, resulting in a difference between the read data and the original data, and error correction operations are required.
[0133] When decoding the data to be decoded, BCH (the second decoding method) multi-level decoding and LDPC (the first decoding method) iterative decoding can be combined to perform cascaded decoding on the data to be decoded to improve the decoding performance. The decoding process can be as shown in Figure 8 shown, including the following steps:
[0134] Step a, the flash memory controller inputs the data to be decoded obtained into its own BCH decoder, and the BCH decoder performs a BCH decoding once to obtain LDPC codeword information and BCH check information. The LDPC codeword information here is the initial codeword information corresponding to the first round, and the BCH check information is the check information of the first level.
[0135] Step b, the flash memory controller sends the LDPC codeword information obtained after BCH decoding into its own LDPC decoder, and the BCH check information is cached by the BCH decoder and not sent into the LDPC decoder.
[0136] Step c, after the LDPC decoder in the flash memory controller receives the LDPC codeword information input by the BCH decoder, it can use the LLR-BP iterative decoding method for subsequent decoding.
[0137] The LDPC decoder can first generate an initial LLR table corresponding to the first round (that is, the initial confidence information corresponding to the first round) according to the LDPC codeword information first input by the BCH decoder. Then, the LDPC decoder can update the initial LLR table based on the information of the check nodes and the information of the variable nodes to obtain the LLR table after the first update in the current round (that is, the confidence information of the first level in the current round). After completing an LLR table update, the LDPC decoder can make a decision on the LDPC codeword information based on the updated LLR table to obtain the LDPC codeword information after the first update in the current round (that is, obtain the codeword information of the first level in the current round).
[0138] Step d, the LDPC decoder sends the LDPC codeword information after the first update back to the BCH decoder, and the BCH decoder performs a second BCH decoding to obtain BCH decoded data (that is, obtain the codeword information after the second update in the current round, corresponding to the codeword information of the second level in the current round). Furthermore, the BCH decoder can update the LLR corresponding to the data with errors in the BCH codeword in the LLR table updated by the LDPC according to the BCH decoded data to obtain the LLR table updated by the BCH (that is, obtain the LLR table after the second update in the current round, corresponding to the confidence information of the second level in the current round), and transmit it to the LDPC decoder.
[0139] Step e, after the LDPC decoder obtains the LLR table updated by the BCH and the BCH decoded data, it starts the next decoding iteration process (that is, in the next round, the LLR table updated by the BCH is used as the initial confidence information corresponding to the next round, and the BCH decoded data is used as the initial codeword information corresponding to the next round).
[0140] Step f, until the LDPC decoding result is successful or the maximum number of LDPC decoding times is reached (that is, to determine whether the decoding process corresponding to the first decoding method is completed), stop the LDPC iteration.
[0141] Step g, the LDPC decoder inputs the LDPC codeword information obtained in the LDPC decoding process in the last round into the BCH decoder again, and the BCH decoder performs the last decoding.
[0142] Step h, the BCH decoder outputs the decoded LDPC codeword information as the decoding result to the subsequent module.
[0143] For the decoding method provided by the embodiment of the present application, since the BCH decoding logic is relatively simple, therefore, while recycling the BCH decoding logic to reduce the LDPC decoding error rate, it will not increase the decoding complexity due to multiple rounds of BCH decoding. Moreover, this solution will not damage the original LDPC and BCH concatenated coding data structure, and does not change the original concatenated coding process, does not introduce additional coding overhead. In addition, this solution has no requirements for the data structure of the concatenated coding, and any LDPC and BCH concatenated architecture that can perform independent decoding can be used, with high flexibility and adaptability.
[0144] Example 2
[0145] After the flash memory controller obtains the user data, it first performs LDPC encoding operation on the user data, and then performs BCH encoding operation, and stores the encoding result in the flash memory. When obtaining a read instruction, the data to be decoded can be read from the flash memory. When performing the decoding operation on the data to be decoded, BCH decoding can be performed first, then LDPC iterative decoding, and finally BCH decoding again. Correspondingly, the decoding process can include the following steps:
[0146] Step a, the flash memory controller inputs the obtained data to be decoded into its own BCH decoder, and the BCH decoder performs BCH decoding once to obtain LDPC codeword information and BCH check information.
[0147] Step b, the flash memory controller sends the LDPC codeword information obtained after BCH decoding into its own LDPC decoder, and the BCH check information is cached by the BCH decoder and not sent into the LDPC decoder.
[0148] Step c, after the LDPC decoder in the flash memory controller receives the LDPC codeword information input by the BCH decoder, it can adopt the LLR-BP iterative decoding method to iteratively decode the input LDPC codeword information. After each iterative decoding, the obtained decoding result is verified. If the verification result is a failure or the number of iterations does not reach the preset number of iterations, the next iterative decoding is performed. If the verification result is successful, or when the number of iterations reaches the preset number of iterations, the LDPC codeword information obtained in the last iterative process is used as the intermediate decoding result.
[0149] Step d, the LDPC decoder inputs the intermediate decoding result into the BCH decoder again, and the BCH decoder performs the last decoding.
[0150] Step f, the BCH decoder outputs the decoded LDPC codeword information as the decoding result to the subsequent module.
[0151] The decoding method provided by the embodiment of the present application can provide error correction capabilities at different levels by performing BCH decoding at the first and last positions respectively. The first BCH decoding can initially correct some obvious errors and reduce the burden on the subsequent LDPC decoding. The final BCH decoding can further ensure that all remaining errors are completely corrected. Since the BCH code is good at handling a small number of concentrated errors, and the LDPC code is good at handling a large number of scattered errors, the combination of the two can cover a wider range of error patterns and significantly improve the overall error correction ability of the system.
[0152] Taking the first decoding method as the LDPC code decoding method and the second decoding method as the RS code decoding method as an example, the overall process of concatenated coding and decoding is described below.
[0153] Example 1
[0154] After the flash memory controller obtains the user data, it first performs LDPC encoding operation on the user data, and then performs RS encoding operation. After obtaining the encoding result, it is stored in the flash memory. When obtaining the read instruction, the data to be decoded can be read from the flash memory. During the process of writing data and reading data, the data is interfered by noise during channel transmission, resulting in a difference between the read data and the original data, and error correction operations are required. When performing decoding operations on the data to be decoded, RS decoding and LDPC iterative decoding can be combined. The concatenated decoding of the data to be decoded can include the following steps:
[0155] Step a, the flash memory controller inputs the obtained data to be decoded into its own RS decoder, and the RS decoder performs an RS decoding to obtain LDPC codeword information and RS check information. The LDPC codeword information here is the initial codeword information corresponding to the first round, and the RS check information is the check information of the first level.
[0156] In step b, the flash memory controller sends the LDPC codeword information obtained after RS decoding into its own LDPC decoder. The RS check information is cached by the RS decoder and not sent into the LDPC decoder.
[0157] In step c, after the LDPC decoder in the flash memory controller receives the LDPC codeword information input by the RS decoder, it can adopt the LLR-BP iterative decoding method for subsequent decoding.
[0158] The LDPC decoder can first generate an initial LLR table corresponding to the first round (i.e., the initial confidence information corresponding to the first round) according to the LDPC codeword information first input by the RS decoder. Then, based on the information of the check nodes and the information of the variable nodes, the LDPC decoder updates the initial LLR table to obtain the LLR table after the first update in the current round (i.e., the confidence information at the first level in the current round). After completing one update of the LLR table, the LDPC decoder makes a decision on the LDPC codeword information based on the updated LLR table to obtain the LDPC codeword information after the first update in the current round (i.e., obtains the codeword information at the first level in the current round).
[0159] In step d, the LDPC decoder sends the LDPC codeword information after the first update back into the RS decoder, and the RS decoder performs the second RS decoding to obtain RS decoding data (i.e., obtains the codeword information after the second update in the current round, corresponding to the codeword information at the second level in the current round). Furthermore, the RS decoder can update the LLR corresponding to the data with errors in the RS codeword according to the RS decoding data in the LLR table updated by the LDPC to obtain the LLR table updated by the RS (i.e., obtains the LLR table after the second update in the current round, corresponding to the confidence information at the second level in the current round), and transmits it to the LDPC decoder.
[0160] In step e, after the LDPC decoder obtains the LLR table updated by the RS and the RS decoding data, it starts the next decoding iteration process (i.e., in the next round, the LLR table updated by the RS serves as the initial confidence information corresponding to the next round, and the RS decoding data serves as the initial codeword information corresponding to the next round).
[0161] In step f, stop the LDPC iteration until the LDPC decoding result is successful or reaches the maximum LDPC decoding times.
[0162] In step g, the LDPC decoder inputs the LDPC codeword information obtained in the last round of the LDPC into the RS decoder again, and the RS decoder performs the last decoding.
[0163] Step h, the RS decoder outputs the decoded LDPC codeword information as the decoding result to the subsequent module.
[0164] In the decoding method provided by the embodiments of the present application, since the RS code is good at handling the situation where multiple consecutive bits are in error, therefore, in the case of a large data block, using the RS code for decoding processing is more efficient. By fusing the LDPC code decoding method and the RS code decoding method in an iterative processing manner, the decoding efficiency can be greatly improved.
[0165] Example 2
[0166] After the flash memory controller obtains the user data, it first performs LDPC encoding operation on the user data, and then performs RS encoding operation. After obtaining the encoding result, it is stored in the flash memory. When obtaining a read instruction, the data to be decoded can be read from the flash memory. When performing the decoding operation on the data to be decoded, RS decoding can be performed first, then LDPC iterative decoding, and finally RS decoding again. Correspondingly, the decoding process can include the following steps:
[0167] Step a, the flash memory controller inputs the obtained data to be decoded into its own RS decoder, and the RS decoder performs one-time RS decoding to obtain LDPC codeword information and RS check information. The LDPC codeword information here is the initial codeword information corresponding to the first round, and the RS check information is the check information of the first level.
[0168] Step b, the flash memory controller sends the LDPC codeword information obtained after RS decoding to its own LDPC decoder, and the RS check information is cached by the RS decoder and not sent to the LDPC decoder.
[0169] Step c, after the LDPC decoder in the flash memory controller receives the LDPC codeword information input by the RS decoder, it can adopt the LLR-BP iterative decoding method to perform iterative decoding on the input LDPC codeword information, and after each iterative decoding, check the obtained decoding result. If the check result is a failure or the number of iterations does not reach the preset number of iterations, perform the next iterative decoding. If the check result is a success, or when the number of iterations reaches the preset number of iterations, use the LDPC codeword information obtained in the last iterative process as the intermediate decoding result.
[0170] Step d, the LDPC decoder inputs the intermediate decoding result into the RS decoder again, and the RS decoder performs the last decoding.
[0171] Step f, the RS decoder outputs the decoded LDPC codeword information as the decoding result to the subsequent module.
[0172] The decoding method provided by the embodiments of the present application can provide strong error correction capabilities at different levels by performing RS decoding at the first and last positions respectively and performing multiple LDPC iterative decodings in the intermediate stage. Not performing RS decoding in each LDPC iteration can reduce unnecessary computational overhead.
[0173] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0174] The embodiments of the present application also provide a decoding device, as Figure 9 shown. The decoding device includes:
[0175] An acquisition module 901, configured to acquire, in the current round, initial codeword information corresponding to the current round; and acquire initial confidence information corresponding to the current round;
[0176] A determination module 902, configured to determine the codeword information of the first layer in the current round according to a pre-configured first decoding method, the initial confidence information, and the initial codeword information;
[0177] A verification module 903, configured to verify the codeword information of the first layer in the current round by using the first decoding method, and acquire a verification result corresponding to the codeword information of the first layer in the current round;
[0178] An error correction module 904, configured to correct the codeword information of the first layer in the current round according to a pre-configured second decoding method and pre-acquired verification information of the first layer, to obtain the codeword information of the second layer in the current round;
[0179] The determination module 902 is further configured to stop the iteration when it is determined that the verification result and / or the number of iterations corresponding to the current round meet a preset condition, and determine the codeword information of the second layer in the current round as the target decoding result.
[0180] In some alternative embodiments, the initial codeword information corresponding to the current round includes initial decision values respectively corresponding to multiple bit positions in the current round;
[0181] The determination module 902 is specifically configured to:
[0182] Update the initial confidence information according to the first decoding method and the initial decision value of each bit position in the current round, to obtain the confidence information of the first layer in the current round;
[0183] Update the initial codeword information corresponding to the current round according to the confidence information of the first layer in the current round and the preset confidence threshold to obtain the codeword information of the first layer in the current round.
[0184] In some alternative embodiments, the confidence information of the first layer in the current round includes the confidence of each bit in the first layer in the current round;
[0185] The determining module 902 is specifically configured to:
[0186] Determine the decision value of each bit in the first layer in the current round according to the confidence of each bit in the first layer in the current round and the preset confidence threshold;
[0187] Update the initial codeword information according to the decision value of each bit in the first layer in the current round and the initial decision value of each bit in the current round to obtain the codeword information of the first layer in the current round.
[0188] In some alternative embodiments, the determining module 902 is specifically configured to:
[0189] Determine whether the confidence of the first bit in the first layer in the current round is greater than the preset confidence threshold, where the first bit is any one of multiple bits;
[0190] When it is determined that the confidence of the first bit in the first layer in the current round is greater than the preset confidence threshold, determine the first preset value as the decision value of the first bit in the first layer in the current round;
[0191] Or,
[0192] When it is determined that the confidence of the first bit in the first layer in the current round is less than or equal to the preset confidence threshold, determine the second preset value as the decision value of the first bit in the first layer in the current round.
[0193] In some alternative embodiments, when the current round is not the first round, the obtaining module 901 is specifically configured to:
[0194] Obtain the codeword information of the second layer in the previous round corresponding to the current round and the confidence information of the first layer in the previous round;
[0195] Update the confidence information of the first layer in the previous round according to the second decoding method and the codeword information of the second layer in the previous round to obtain the confidence information of the second layer in the previous round, where the confidence information of the second layer in the previous round is the initial confidence information corresponding to the current round.
[0196] In some alternative embodiments, the initial codeword information corresponding to the current round is the codeword information of the second level in the previous round.
[0197] In some alternative embodiments, the codeword information of the second level in the previous round includes the decision values of each bit in the second level in the previous round;
[0198] The obtaining module 901 is specifically configured to:
[0199] Determine the confidence level of each bit in the second level in the previous round according to the second decoding method and the decision value of each bit in the second level in the previous round;
[0200] Update the confidence levels corresponding to all bits in the confidence level information of the first level in the previous round respectively according to the confidence level of each bit in the second level in the previous round, so as to obtain the confidence level information of the second level in the previous round.
[0201] In some alternative embodiments, the codeword information of the second level in the previous round includes multiple lines of codeword information, and the confidence level information of the first level in the previous round includes multiple lines of confidence level information;
[0202] The obtaining module 901 is specifically configured to:
[0203] Use the second decoding method to check each line of codeword information in the codeword information of the second level in the previous round respectively, so as to obtain a check result corresponding to each line of codeword information;
[0204] Perform an update operation corresponding to the target check result on the confidence level information of the target line in the confidence level information of the first level in the previous round according to the target check result corresponding to the target line of codeword information, where the target line of codeword information is any line of codeword information included in the multiple lines of codeword information in the codeword information of the second level in the previous round;
[0205] After completing the update operation corresponding to the confidence level information of each line, obtain the confidence level information of the second level in the previous round.
[0206] In some alternative embodiments, when the target check result is successful in error correction, the obtaining module 901 is specifically configured to:
[0207] Update the confidence level information of the target line in the confidence level information of the first level in the previous round according to the target line of codeword information and the pre-constructed correspondence between the decision value and the confidence level.
[0208] In some alternative embodiments, each line of codeword information in the codeword information of the second level in the previous round includes the decision values of multiple bits in the second level in the previous round;
[0209] An obtaining module 901, specifically configured to:
[0210] According to the decision value of the target bit and the pre - constructed correspondence between the decision value and the confidence level, determine the target confidence level corresponding to the decision value of the target bit, where the decision value of the target bit is the decision value of any one of the multiple bits included in the target row codeword information;
[0211] Update the confidence level corresponding to the target bit in the confidence level information of the first layer in the previous round to the target confidence level;
[0212] And, mark the confidence level information corresponding to the target row in the confidence level information of the first layer in the previous round, so as to indicate that the confidence level corresponding to any one of the bits in the target row will not be updated in the current round.
[0213] In some alternative embodiments, when the target verification result is an error correction failure, the obtaining module 901 is specifically configured to:
[0214] According to the second decoding method and the codeword information of the second layer in the previous round, update the confidence level information of the target row in the confidence level information of the first layer in the previous round to obtain the confidence level information of the second layer in the previous round.
[0215] In some alternative embodiments, when the current round is the first round, the obtaining module 901 is specifically configured to:
[0216] Obtain the data to be decoded;
[0217] According to the second decoding method, decode the data to be decoded to obtain the initial codeword information corresponding to the current round.
[0218] In some alternative embodiments, the obtaining module 901 is specifically configured to:
[0219] According to the first decoding method and the initial decision value corresponding to each bit in the initial codeword information in the current round, determine the initial confidence level corresponding to each bit in the current round;
[0220] Generate the initial confidence level information corresponding to the current round according to the initial confidence level corresponding to each bit in the current round.
[0221] In some alternative embodiments, the data to be decoded includes multiple rows of user data, multiple rows of first - type check data, second - type check data for protecting each row of user data, and second - type check data for protecting each row of first - type check data, where the first - type check data is the check data corresponding to the first decoding method, and the second - type check data is the check data corresponding to the second decoding method.
[0222] In some alternative embodiments, the data to be decoded includes multiple lines of user data, multiple lines of first - type check data, and second - type check data for protecting each line of the first - type check data, where the first - type check data is check data corresponding to a first decoding method, and the second - type check data is check data corresponding to a second decoding method.
[0223] In some alternative embodiments, the apparatus further includes an encoding module 905:
[0224] The obtaining module 901 is further configured to obtain user data;
[0225] The encoding module 905 is configured to encode the user data according to a pre - configured first encoding method to obtain codeword information corresponding to the first encoding method; encode the codeword information corresponding to the first encoding method according to a pre - configured second encoding method to obtain an encoding result, where the first encoding method corresponds to the first decoding method and the second encoding method corresponds to the second decoding method; and store the encoding result.
[0226] For the description of the features in the corresponding embodiments of the decoding apparatus, reference may be made to the relevant description in the corresponding embodiments of the decoding method, which will not be elaborated herein one by one.
[0227] An embodiment of the present application further provides an electronic device, as Figure 10 shown, including a memory 10 and a processor 20. A computer program is stored in the memory 10, and the processor 20 is configured to run the computer program to execute the steps in any of the above - mentioned decoding method embodiments. The electronic device may be the above - mentioned flash memory controller.
[0228] An embodiment of the present application further provides a computer - readable storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any of the above - mentioned decoding method embodiments when running.
[0229] In an exemplary embodiment, the above - mentioned computer - readable storage medium may include, but is not limited to: USB flash drives, read - only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs and other media that can store computer programs.
[0230] An embodiment of the present application further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above - mentioned decoding method embodiments.
[0231] Embodiments of the present application further provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the steps in any of the above-described decoding method embodiments.
[0232] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0233] The above has introduced in detail a decoding method, apparatus, electronic device, storage medium, and program product provided by the present application. Specific examples are used herein to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A decoding method, characterized in that, Including: In the current round, obtain the initial codeword information corresponding to the current round, where the initial codeword information corresponding to the current round includes the initial decision values respectively corresponding to multiple bit positions in the current round; Obtain the initial confidence information corresponding to the current round; Update the initial confidence information according to a pre-configured first decoding method and the initial decision value of each bit position in the current round to obtain the confidence information of the first layer in the current round; Update the initial codeword information corresponding to the current round according to the confidence information of the first layer in the current round and a preset confidence threshold to obtain the codeword information of the first layer in the current round; Use the first decoding method to check the codeword information of the first layer in the current round and obtain the check result corresponding to the codeword information of the first layer in the current round; Correct the codeword information of the first layer in the current round according to a pre-configured second decoding method and the pre-obtained check information of the first layer to obtain the codeword information of the second layer in the current round; When it is determined that the check result and / or the number of iterations corresponding to the current round meet a preset condition, stop the iteration and determine the codeword information of the second layer in the current round as the target decoding result.
2. The decoding method according to claim 1, wherein The confidence information of the first layer in the current round includes the confidence of each bit position in the first layer in the current round; The updating the initial codeword information corresponding to the current round according to the confidence information of the first layer in the current round and a preset confidence threshold to obtain the codeword information of the first layer in the current round includes: Determine the decision value of each bit position in the first layer in the current round according to the confidence of each bit position in the first layer in the current round and the preset confidence threshold; Update the initial codeword information according to the decision value of each bit position in the first layer in the current round and the initial decision value of each bit position in the current round to obtain the codeword information of the first layer in the current round.
3. The decoding method according to claim 2, wherein The determining the decision value of each bit position in the first layer in the current round according to the confidence of each bit position in the first layer in the current round and the preset confidence threshold includes: Determine whether the confidence of the first bit position in the first layer in the current round is greater than the preset confidence threshold, where the first bit position is any one of the multiple bit positions; When it is determined that the confidence of the first bit position in the first layer in the current round is greater than the preset confidence threshold, determine the first preset value as the decision value of the first bit position in the first layer in the current round; Or, When it is determined that the confidence of the first bit position in the first layer in the current round is less than or equal to the preset confidence threshold, determine the second preset value as the decision value of the first bit position in the first layer in the current round.
4. The decoding method according to any one of claims 1 to 3, characterized in that When the current round is not the first round, the obtaining of the initial confidence information corresponding to the current round includes: Obtaining the codeword information of the second layer in the previous round corresponding to the current round, and the confidence information of the first layer in the previous round; Updating the confidence information of the first layer in the previous round according to the second decoding method and the codeword information of the second layer in the previous round to obtain the confidence information of the second layer in the previous round, where the confidence information of the second layer in the previous round is the initial confidence information corresponding to the current round.
5. The decoding method according to claim 4, characterized in that, The initial codeword information corresponding to the current round is the codeword information of the second layer in the previous round.
6. The decoding method according to claim 4, wherein The codeword information of the second layer in the previous round includes the decision value of each bit in the second layer in the previous round; The updating of the confidence information of the first layer in the previous round according to the second decoding method and the codeword information of the second layer in the previous round to obtain the confidence information of the second layer in the previous round includes: Determining the confidence of each bit in the second layer in the previous round according to the second decoding method and the decision value of each bit in the second layer in the previous round; Updating the confidence corresponding to each bit in the confidence information of the first layer in the previous round according to the confidence of each bit in the second layer in the previous round to obtain the confidence information of the second layer in the previous round.
7. The decoding method according to claim 4, wherein The codeword information of the second layer in the previous round includes multiple rows of codeword information, and the confidence information of the first layer in the previous round includes multiple rows of confidence information; The updating of the confidence information of the first layer in the previous round according to the second decoding method and the codeword information of the second layer in the previous round to obtain the confidence information of the second layer in the previous round includes: Using the second decoding method to check each row of the codeword information in the second layer of the previous round to obtain a check result corresponding to each row of the codeword information; Performing an update operation corresponding to the target check result on the confidence information of the target row in the confidence information of the first layer in the previous round according to the target check result corresponding to the target row codeword information, where the target row codeword information is any row of the multiple rows of codeword information included in the codeword information of the second layer in the previous round; After completing the update operation corresponding to the confidence information of each row, the confidence information of the second layer in the previous round is obtained.
8. The decoding method according to claim 7, wherein When the target check result is successful in error correction, the performing of the update operation corresponding to the target check result on the confidence information of the target row in the confidence information of the first layer in the previous round according to the target check result corresponding to the target row codeword information includes: Update the confidence information of the target row in the confidence information of the first layer in the previous round according to the target row codeword information and the pre-constructed correspondence between the decision value and the confidence level.
9. The decoding method according to claim 8, characterized in that, Each row of the codeword information in the second layer in the previous round includes multiple bits of the decision value in the second layer in the previous round; The updating of the confidence information of the target row in the confidence information of the first layer in the previous round according to the target row codeword information and the pre-constructed correspondence between the decision value and the confidence level includes: Determine the target confidence level corresponding to the decision value of the target bit according to the decision value of the target bit and the pre-constructed correspondence between the decision value and the confidence level, where the decision value of the target bit is the decision value of any one of the multiple bits included in the target row codeword information; Update the confidence level corresponding to the target bit in the confidence information of the first layer in the previous round to the target confidence level; And mark the confidence information corresponding to the target row in the confidence information of the first layer in the previous round to indicate that no update operation is performed on the confidence level corresponding to any bit in the target row in the current round.
10. The decoding method according to claim 7, characterized in that, When the target verification result is an error correction failure, the updating operation corresponding to the target verification result is performed on the confidence information of the target row in the confidence information of the first layer in the previous round according to the target verification result corresponding to the target row codeword information, including: Update the confidence information of the target row in the confidence information of the first layer in the previous round according to the second decoding method and the codeword information of the second layer in the previous round to obtain the confidence information of the second layer in the previous round.
11. The decoding method according to claim 1, characterized in that, When the current round is the first round, the obtaining of the initial codeword information corresponding to the current round includes: Obtain the data to be decoded; Decode the data to be decoded according to the second decoding method to obtain the initial codeword information corresponding to the current round.
12. The decoding method according to claim 11, characterized in that, The obtaining of the initial confidence information corresponding to the current round includes: Determine the initial confidence level corresponding to each bit in the current round according to the first decoding method and the initial decision value corresponding to each bit in the initial codeword information in the current round; Generate the initial confidence information corresponding to the current round according to the initial confidence level corresponding to each bit in the current round.
13. The decoding method according to claim 11 or 12, characterized in that, The data to be decoded includes multiple rows of user data, multiple rows of first-class check data, second-class check data for protecting each row of the user data, and second-class check data for protecting each row of the first-class check data, where the first-class check data is the check data corresponding to the first decoding method, and the second-class check data is the check data corresponding to the second decoding method.
14. The decoding method according to claim 11 or 12, characterized in that, The data to be decoded includes multiple lines of user data, multiple lines of first - type check data, and second - type check data for protecting each line of the first - type check data, where the first - type check data is check data corresponding to the first decoding method, and the second - type check data is check data corresponding to the second decoding method.
15. The decoding method according to any one of claims 1 to 3, characterized in that, The method further includes: Obtaining user data; Encoding the user data according to a pre - configured first encoding method to obtain codeword information corresponding to the first encoding method; Encoding the codeword information corresponding to the first encoding method according to a pre - configured second encoding method to obtain an encoding result, where the first encoding method corresponds to the first decoding method, and the second encoding method corresponds to the second decoding method; Storing the encoding result.
16. A decoding device, characterized in that, It includes: An obtaining module, configured to obtain, in the current round, initial codeword information corresponding to the current round; Obtaining initial confidence information corresponding to the current round, where the initial codeword information corresponding to the current round includes initial decision values respectively corresponding to multiple bit positions in the current round; A determining module, configured to update the initial confidence information according to a pre - configured first decoding method and the initial decision values of each bit position in the current round to obtain confidence information of the first level in the current round; updating the initial codeword information corresponding to the current round according to the confidence information of the first level in the current round and a preset confidence threshold to obtain codeword information of the first level in the current round; A checking module, configured to check the codeword information of the first level in the current round by using the first decoding method to obtain a check result corresponding to the codeword information of the first level in the current round; An error - correcting module, configured to correct the codeword information of the first level in the current round according to a pre - configured second decoding method and pre - obtained check information of the first level to obtain codeword information of the second level in the current round; The determining module is further configured to stop iteration when it is determined that the check result and / or the number of iterations corresponding to the current round meets a preset condition, and determine the codeword information of the second level in the current round as the target decoding result.
17. An electronic device, characterized in that, It includes: A memory, configured to store a computer program; A processor, configured to implement the steps of the decoding method according to any one of claims 1 to 15 when executing the computer program.
18. A computer-readable storage medium, characterized in that, A computer program is stored in the computer - readable storage medium, where the computer program, when executed by a processor, implements the steps of the decoding method according to any one of claims 1 to 15.
19. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the decoding method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Decoding device and television receiver having decoding device
JP2009225164A