Data encoding and decoding method and apparatus

By decomposing the parity check matrix into disjoint submatrices and using the m-th original root of unity of the finite field GF(2n) for coset decomposition, the problem of high computational complexity of the Reed-Solomon code decoding algorithm is solved, and a more efficient encoding and decoding process is achieved.

WO2026130411A1PCT designated stage Publication Date: 2026-06-25HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-12-17
Publication Date
2026-06-25

AI Technical Summary

Technical Problem

Existing Reed-Solomon code decoding algorithms have high computational complexity and low computational efficiency, resulting in low overall encoding and decoding efficiency and high computational overhead.

Method used

By decomposing the parity check matrix into N disjoint submatrices and utilizing the multiple relationships between the submatrices to reduce the number of multiplications and XOR operations, and by using the m-th primitive root of unity of the finite field GF(2n) for coset decomposition, a simpler matrix is ​​generated for encoding and decoding.

Benefits of technology

It significantly reduces the computational complexity of the decoding algorithm, improves the overall computational efficiency of encoding and decoding, and reduces the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025143174_25062026_PF_FP_ABST
    Figure CN2025143174_25062026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a data encoding and decoding method and apparatus, relating to the technical field of computers. The method comprises: acquiring data to be encoded, and determining, on the basis of the data to be encoded and a first matrix, a check bit of the data to be encoded. The first matrix comprises N non-overlapping sub-matrices, wherein the N sub-matrices comprise a first sub-matrix and a second sub-matrix, a u-th row element of the second sub-matrix is a multiple value of a u-th row element of the first sub-matrix, or a v-th column element of the second sub-matrix is a multiple value of a v-th column element of the first sub-matrix, the multiple is an element in a complex field or a finite field, and u and v are positive integers. This allows for computations of identical matrices to be reused in an encoding and decoding process, thereby significantly reducing multiplication and XOR operation counts, reducing decoding algorithm computational complexity, reducing computational overhead, and improving overall encoding and decoding computational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Data encoding and decoding methods and apparatus

[0001] This application claims priority to Chinese Patent Application No. 202411899025.X, filed on December 19, 2024, entitled “Data Encoding and Decoding Method and Apparatus”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, specifically to data encoding and decoding methods and apparatus. Background Technology

[0003] Reed-Solomon code (RS code) is a widely used error-correcting coding technique that adds redundant information to ensure the correction of a certain number of errors during data transmission. Decoding algorithms for RS codes are used to recover the original information from erroneous encoded data during transmission.

[0004] However, with the increasing demand for data transmission in industries, computers and other fields, the overhead of encoding and decoding RS codes is gradually increasing. The decoding algorithms currently used have high computational complexity and low computational efficiency, which leads to low overall efficiency and high computational overhead in encoding and decoding. Summary of the Invention

[0005] This application provides a data encoding and decoding method and apparatus that can solve the problems of low overall encoding and decoding efficiency and high computational overhead caused by the high computational complexity and low computational efficiency of decoding algorithms.

[0006] In a first aspect, a data encoding method is provided, comprising: acquiring data to be encoded, and determining a check bit of the data to be encoded based on the data to be encoded and a first matrix. The first matrix comprises N disjoint submatrices, the N submatrices including a first submatrix and a second submatrix, wherein the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix, or the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix, wherein the multiple is an element in the complex field or a finite field, and u and v are positive integers.

[0007] Based on the aforementioned data encoding method, by finding repeating terms and special algebraic relationships in the rows and columns of the matrix used to generate check bits, the matrix can be divided into N submatrices whose elements have multiple relationships. In this way, the matrix can be decomposed into multiple simpler matrices, and each submatrix contains the same matrix after decomposition. The calculation of this identical matrix can be reused during encoding and decoding, thereby significantly reducing the number of multiplications and XOR operations, lowering the computational complexity of the decoding algorithm, reducing computational overhead, and improving the overall computational efficiency of encoding and decoding.

[0008] In conjunction with the method provided in the first aspect, as one possible implementation, the first submatrix and the second submatrix are arranged horizontally, and the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix; the first submatrix includes a vertically arranged third submatrix and a fourth submatrix, and the w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix.

[0009] In conjunction with the method provided in the first aspect, as one possible implementation, the first submatrix and the second submatrix are arranged vertically, and the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix; the first submatrix includes a horizontally arranged third submatrix and a fourth submatrix, and the w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix.

[0010] Based on the above implementation, the multiple relationship between the elements of the third and fourth submatrices after the first submatrix decomposition can be based on rows or columns, which can adapt to different matrix calculations and improve the applicability of calculating the check bits of the data to be encoded through the first matrix.

[0011] In conjunction with the method provided in the first aspect, as a possible implementation, if the size of the fourth submatrix is ​​smaller than the size of the third submatrix, the fourth submatrix is ​​padded with zero values ​​to make its size equal to the size of the third submatrix. This ensures that the different submatrixes have the same size, reducing the complexity of subsequent matrix calculations.

[0012] In conjunction with the method provided in the first aspect, as one possible implementation, any one of the N submatrices comprises consecutive rows or columns.

[0013] Based on the above implementation method, the continuous arrangement of rows or columns of the submatrix is ​​beneficial for subsequent matrix decomposition to improve the reuse rate of intermediate calculation results. It is also beneficial for reading and calculating multiple blocks of data during the encoding and decoding process. This is a calculation method that is most compatible with industrial applications and can reduce the occupation of computing resources such as chips.

[0014] In conjunction with the method provided in the first aspect, as one possible implementation, the first matrix is ​​a generation matrix or a verification matrix.

[0015] In conjunction with the method provided in the first aspect, as a possible implementation, in the data encoding method process, determining the check bit of the data to be encoded based on the data to be encoded and the first matrix includes: decomposing the N sub-matrices into multiple first decomposition matrices and multiple second decomposition matrices, wherein some or all of the rows or columns within a second decomposition matrix are the same, or some or all of the rows or columns among multiple second decomposition matrices are the same; determining a checksum based on the data to be encoded, the first decomposition matrix, and the second decomposition matrix; and generating the check bit of the data to be encoded based on the checksum.

[0016] Based on the above implementation, each submatrix can be decomposed into a first decomposition matrix and a second decomposition matrix. The second decomposition matrix obtained after decomposing different submatrices can be regarded as the same, thereby giving the rows and columns of the submatrix strong repetition and satisfying a definite algebraic relationship. By reusing these repetition relationships, the number of multiplications and XOR operations that need to be calculated during the encoding and decoding process can be significantly reduced.

[0017] Combining the method provided in the first aspect, as one possible implementation, the sparsity of the first decomposition matrix is ​​greater than that of the second decomposition matrix. Thus, in the first and second decomposition matrices derived from each submatrix, the second decomposition matrix is ​​identical, while the first decomposition matrix is ​​more sparse, reducing the computational complexity of calculating the checksum based on the submatrix.

[0018] In conjunction with the method provided in the first aspect, as a possible implementation, the data encoding method also includes the following steps in its process: determining the finite field GF(2 n The m-th order primitive root of unity of n; satisfying m|2 n -1; Based on the m-th order primitive root of unity for the finite field GF(2) n Perform coset decomposition to obtain multiple subsets; each subset contains m elements; generate a submatrix based on each subset to obtain the first matrix.

[0019] Based on the above implementation, the subsets generated by the m-th order primitive root of unity are used to decompose the finite field into cosets, that is, to decompose the finite field into the union of disjoint sets. Each subset corresponds to a regular submatrix with high repetition, thereby effectively reducing the encoding and decoding complexity through computational reuse.

[0020] In combination with the above implementation, optionally, any element of the submatrix is ​​the product of the element position's corresponding multiple and the power of the m-th original root of unity or the power of the m-th original root of unity.

[0021] In combination with the above implementation method, optionally, the elements in the i-th row and j-th column of the first matrix are: l is the array dimension of the encoded codeword, p(x) is the primitive irreducible polynomial of degree l over GF(2), and m is a 2 l -1 is a factor, and α is GF(2 l One of the fundamental elements in ) Multiples, It is the m-th order primitive unit root.

[0022] Secondly, a data decoding method is provided, comprising: acquiring data to be decoded, and determining decoded data based on the data to be decoded and a first matrix. The first matrix comprises N disjoint submatrices, the N submatrices including the first submatrice and the second submatrice, wherein the u-th row element of the second submatrice is a multiple of the u-th row element of the first submatrice, or the v-th column element of the second submatrice is a multiple of the v-th column element of the first submatrice, the multiple being an element in the complex field or a finite field, and u and v being positive integers.

[0023] In conjunction with the method provided in the second aspect, as one possible implementation, the first submatrix and the second submatrix are arranged horizontally, and the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix; the first submatrix includes a vertically arranged third submatrix and a fourth submatrix, and the w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix.

[0024] In conjunction with the method provided in the second aspect, as one possible implementation, the first submatrix and the second submatrix are arranged vertically, and the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix; the first submatrix includes a horizontally arranged third submatrix and a fourth submatrix, and the w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix.

[0025] In conjunction with the method provided in the second aspect, as a possible implementation, if the size of the fourth submatrix is ​​smaller than the size of the third submatrix, the fourth submatrix is ​​filled with zero values ​​so that the size of the fourth submatrix is ​​equal to the size of the third submatrix.

[0026] In conjunction with the method provided in the second aspect, as one possible implementation, any one of the N submatrices comprises consecutive rows or columns.

[0027] In conjunction with the method provided in the second aspect, as one possible implementation, the first matrix is ​​a check matrix.

[0028] In conjunction with the method provided in the second aspect, as a possible implementation, the data decoding method's process, in which the step of determining the decoded data based on the data to be decoded and the first matrix, includes: decomposing the N sub-matrices into multiple first decomposition matrices and multiple second decomposition matrices, wherein some or all of the rows or columns within a second decomposition matrix are the same, or some or all of the rows or columns among multiple second decomposition matrices are the same; determining a checksum based on the data to be decoded, the first decomposition matrix, and the second decomposition matrix; and correcting errors in the data to be decoded based on the checksum to obtain the decoded data.

[0029] In conjunction with the method provided in the second aspect, as one possible implementation, the sparsity of the first decomposition matrix is ​​greater than the sparsity of the second decomposition matrix.

[0030] Combining the method provided in the second aspect, as one possible implementation, the elements in the i-th row and j-th column of the first matrix are: l is the array dimension of the encoded codeword, p(x) is the primitive irreducible polynomial of degree l over GF(2), and m is a 2 l -1 is a factor, and α is GF(2 l One of the fundamental elements in ) Multiples, It is the m-th order primitive unit root.

[0031] As one possible implementation, the beneficial effects of any possible implementation of the data decoding method provided in the second aspect above can be referred to the description in the data encoding method provided in the first aspect, and will not be repeated here.

[0032] Thirdly, a data encoding device is provided, comprising: a transceiver module and a processing module.

[0033] The transceiver module is used to acquire data to be encoded.

[0034] The processing module is used to determine the decoded data based on the data to be decoded and the first matrix; the first matrix includes N disjoint submatrices, the N submatrices include the first submatrice and the second submatrice, wherein the u-th row element of the second submatrice is a multiple of the u-th row element of the first submatrice, or the v-th column element of the second submatrice is a multiple of the v-th column element of the first submatrice, the multiple being an element in the complex field or a finite field, and u and v being positive integers.

[0035] In conjunction with the apparatus provided in the third aspect, as one possible implementation, the first submatrix and the second submatrix are arranged horizontally, and the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix; the first submatrix includes a vertically arranged third submatrix and a fourth submatrix, and the w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix.

[0036] In conjunction with the apparatus provided in the third aspect, as one possible implementation, the first submatrix and the second submatrix are arranged vertically, and the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix; the first submatrix includes a horizontally arranged third submatrix and a fourth submatrix, and the w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix.

[0037] In conjunction with the method provided in the third aspect, as a possible implementation, if the size of the fourth submatrix is ​​smaller than the size of the third submatrix, the fourth submatrix is ​​filled with zero values ​​so that the size of the fourth submatrix is ​​equal to the size of the third submatrix.

[0038] In conjunction with the apparatus provided in the third aspect, as one possible implementation, any one of the N submatrices comprises consecutive rows or columns.

[0039] In conjunction with the apparatus provided in the third aspect, as one possible implementation, the first matrix is ​​a generator matrix or a check matrix.

[0040] In conjunction with the apparatus provided in the third aspect, as one possible implementation, the processing module is specifically used to: decompose the N sub-matrices into multiple first decomposition matrices and multiple second decomposition matrices, wherein some or all of the rows or columns within a second decomposition matrix are the same, or some or all of the rows or columns between multiple second decomposition matrices are the same; determine a checksum based on the data to be encoded, the first decomposition matrices, and the second decomposition matrices; and generate a check bit for the data to be encoded based on the checksum.

[0041] In conjunction with the apparatus provided in the third aspect, as one possible implementation, the sparsity of the first decomposition matrix is ​​greater than the sparsity of the second decomposition matrix.

[0042] In conjunction with the apparatus provided in the third aspect, as one possible implementation, the processing module is also used to: determine the finite field GF(2 n The m-th order primitive root of unity of n; satisfying m|2 n -1; Based on the m-th order primitive root of unity for the finite field GF(2) nPerform coset decomposition to obtain multiple subsets; each subset contains m elements; generate a submatrix based on each subset to obtain the first matrix.

[0043] Optionally, in combination with the above implementation, all columns of each subset can be arranged consecutively.

[0044] In combination with the above implementation, optionally, any element of the submatrix is ​​the product of the element position's corresponding multiple and the power of the m-th original root of unity or the power of the m-th original root of unity.

[0045] In combination with the above implementation method, optionally, the elements in the i-th row and j-th column of the first matrix are: l is the array dimension of the encoded codeword, p(x) is the primitive irreducible polynomial of degree l over GF(2), and m is a 2 l -1 is a factor, and α is GF(2 l One of the fundamental elements in ) Multiples, It is the m-th order primitive unit root.

[0046] Fourthly, a data encoding device is provided, comprising: a transceiver module and a processing module.

[0047] The transceiver module is used to acquire data to be decoded.

[0048] The processing module is used to determine the decoded data based on the data to be decoded and the first matrix; the first matrix includes N disjoint submatrices, the N submatrices include the first submatrice and the second submatrice, wherein the u-th row element of the second submatrice is a multiple of the u-th row element of the first submatrice, or the v-th column element of the second submatrice is a multiple of the v-th column element of the first submatrice, the multiple being an element in the complex field or a finite field, and u and v being positive integers.

[0049] In conjunction with the apparatus provided in the fourth aspect, as one possible implementation, the first submatrix and the second submatrix are arranged horizontally, and the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix; the first submatrix includes a vertically arranged third submatrix and a fourth submatrix, and the w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix.

[0050] In conjunction with the apparatus provided in the fourth aspect, as one possible implementation, the first submatrix and the second submatrix are arranged vertically, and the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix; the first submatrix includes a horizontally arranged third submatrix and a fourth submatrix, and the w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix.

[0051] In conjunction with the method provided in the fourth aspect, as a possible implementation, if the size of the fourth submatrix is ​​smaller than the size of the third submatrix, the fourth submatrix is ​​filled with zero values ​​so that the size of the fourth submatrix is ​​equal to the size of the third submatrix.

[0052] In conjunction with the apparatus provided in the fourth aspect, as one possible implementation, any one of the N submatrices comprises consecutive rows or columns.

[0053] In conjunction with the apparatus provided in the fourth aspect, as one possible implementation, the first matrix is ​​a check matrix.

[0054] In conjunction with the apparatus provided in the fourth aspect, as one possible implementation, the processing module is specifically used to: decompose the N sub-matrices into multiple first decomposition matrices and multiple second decomposition matrices, wherein some or all of the rows or columns within a second decomposition matrix are the same, or some or all of the rows or columns among multiple second decomposition matrices are the same; determine a checksum based on the data to be decoded, the first decomposition matrices, and the second decomposition matrices; and perform error correction on the data to be decoded based on the checksum to obtain the decoded data.

[0055] In conjunction with the apparatus provided in the fourth aspect, as one possible implementation, the sparsity of the first decomposition matrix is ​​greater than the sparsity of the second decomposition matrix.

[0056] In conjunction with the apparatus provided in the fourth aspect, as one possible implementation, the elements of the first matrix in the i-th row and j-th column are: l is the array dimension of the encoded codeword, p(x) is the primitive irreducible polynomial of degree l over GF(2), and m is a 2 l -1 is a factor, and α is GF(2 l One of the fundamental elements in ) Multiples, It is the m-th order primitive unit root.

[0057] In conjunction with the apparatus provided in the fourth aspect, as one possible implementation, the processing module is specifically used to: determine whether there are erroneous codewords in the data to be decoded based on the checksum; determine the position and error value of the erroneous codeword based on the first submatrix and the second submatrix; and correct the erroneous codeword according to its position and error value.

[0058] As one possible implementation, the beneficial effects of any of the data encoding devices provided in the third aspect and the data decoding devices provided in the fourth aspect can be referred to the description in the data encoding method provided in the first aspect, and will not be repeated here.

[0059] Fifthly, a chip is provided, including a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, the processor being used to execute a data encoding method as described in the first aspect or a data decoding method as described in the second aspect.

[0060] In a sixth aspect, a data encoding and decoding system is provided, including an encoder and a decoder, wherein the encoder is used to perform a data encoding method as described in the first aspect, and the decoder is used to perform a data decoding method as described in the second aspect.

[0061] A seventh aspect provides a computing device including a processor and a memory. The processor is configured to execute instructions stored in the memory to cause the computing device to perform a data encoding method as described in the first aspect or a data decoding method as described in the second aspect.

[0062] Eighthly, a chip system is provided, comprising a processor and a power supply circuit. The power supply circuit supplies power to the processor, which performs operational steps such as the data encoding method of the first aspect or the data decoding method of the second aspect.

[0063] Ninth aspect, a computer program product comprising instructions, which, when executed by at least one computing device, cause the at least one computing device to perform a data encoding method as described in the first aspect or a data decoding method as described in the second aspect.

[0064] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.

[0065] The following description includes more specific details about the implementation methods provided for the above aspects. Attached Figure Description

[0066] Figure 1 is a schematic diagram of the code type definition of a decoding-related method provided in this application;

[0067] Figure 2 is a transformation diagram of a decoding-related method provided in this application;

[0068] Figure 3 is a schematic diagram of the architecture of a data encoding and decoding system provided in this application;

[0069] Figure 4 is a flowchart illustrating a data encoding method provided in this application;

[0070] Figure 5 is a flowchart illustrating a first matrix construction step provided in this application;

[0071] Figure 6 is a flowchart illustrating a data decoding method provided in this application;

[0072] Figure 7 is a flowchart illustrating one error correction step provided in this application;

[0073] Figure 8 is a schematic diagram of the structure of a data encoding device provided in this application;

[0074] Figure 9 is a schematic diagram of the structure of a data decoding device provided in this application;

[0075] Figure 10 is a schematic diagram of the structure of a computing device provided in this application. Detailed Implementation

[0076] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

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

[0078] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on electronic devices and electronic devices themselves can be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0079] To facilitate understanding, the terminology used in this application will be introduced first.

[0080] (1) Erasure coding (EC): This is an encoding technique. It enables the encoding of data through erasure coding. If symbols in the encoded data become invalid (e.g., missing), and the number of invalid symbols is within design limits, the original data can be restored by decoding the corresponding erasure-correcting encoded data. For example, erasure coding encodes the data blocks (i.e., information symbols, one data block equals one information symbol) contained in the original data to obtain redundant blocks (i.e., check symbols, one redundant block equals one check symbol). The redundant blocks and the data blocks in the original data together constitute the encoded codeword of the original data. In the event of missing information symbols in the encoded codeword of the data storage system, the lost information symbols can be recovered by decoding the redundant blocks. Erasure coding can be applied to data storage systems and data transmission systems to encode data managed or transmitted by these systems. The data can include data from various fields such as images, text, and audio.

[0081] (2) Reed-Solomon (RS) coding: This is an error correction coding method based on finite fields. During encoding, the method converts the data to be encoded into a polynomial form and performs a series of calculations to generate check symbols. During decoding, the method can effectively correct up to a certain number of invalid symbols by decoding the check symbols. Check symbols are redundant data appended to the end of the data, used to detect or correct errors generated during the transmission or storage of the data to be decoded. Invalid symbols refer to those symbols that cannot be correctly decoded or identified due to various reasons (such as transmission errors, storage corruption, improper processing, etc.).

[0082] (3) Reed-Solomon Hard Decision Decoder: This is an algorithm used to decode RS codes, mainly consisting of four steps. ① Adjoint computation: This is used to solve for the inverse matrix of a polynomial, typically used to solve system equations. For RS decoders, adjoint computation is used to construct the adjoint matrix associated with the signal polynomial, which helps in calculating error locations and error values. The adjoint matrix can also be called a checksum. ② Error polynomial calculation: The error polynomial represents the difference between the received codeword and the actual codeword. By utilizing the algebraic structure of RS codes, an error polynomial can be constructed to locate and correct errors. ③ Chien search: This is an algorithm used to locate error locations. Given an error polynomial, the Chien search algorithm finds the root of the error location by traversing all possible positions. It determines the location of the error in the codeword by evaluating the error polynomial with some known roots. ④ Forney algorithm: This is used to calculate the error value at each error location. By using the known error locations and error polynomials, the Forney algorithm provides an efficient method to solve for the location of each error and its correction value.

[0083] However, in the implementation of erasure coding and decoding methods, the computational scale of generating check symbols during the encoding process is large, involving high computational complexity and low computational efficiency. Similarly, the computational scale of recovering information for each lost information symbol during the decoding process is large, involving high computational complexity and low computational efficiency.

[0084] However, in the implementation of erasure coding and decoding methods, the computational scale of generating check symbols during the encoding process is large, involving high computational complexity and low computational efficiency. Similarly, the computation of recovering information for each lost information symbol during the decoding process requires check matrix calculation. Since the check matrix expands with the code length of the RS code, its computational scale is large, involving high computational complexity and low computational efficiency, especially given the rapidly increasing demand for data transmission today.

[0085] As an example, a fast algorithm based on the Reed-Muller transform constructs an RS code on a finite field using the Vandermonde matrix. Then, based on the properties of the RM transform and the Vandermonde matrix, the corrector is quickly calculated, thus completing the encoding.

[0086] Taking the (9,5) RS code as an example, a codeword of an RS code consists of data bits and redundant bits, as shown in Figure 1. The (9,5) RS codeword is composed of 5 data symbols a1, a2, a3, a4, a5 and 4 redundant symbols P1, P2, P3, P4, where each symbol consists of m = 4 bits, the codeword length n = 9, the data symbol length k = 5, and the redundant symbol length r = nk = 5. The codeword satisfies the following relationship:

[0087] a1+a2+a3+a4+a5+p1+p2+p3+p4=0;

[0088] a2+2a3+3a4+4a5+5p1+6p2+7p3+8p4=0;

[0089] a2+4a3+5a4+3a5+2p1+7p2+6p3+12p4=0;

[0090] a2+8a3+15a4+12a5+10p1+p2+p3+10p4=0.

[0091] Next, using the Reed-Muller transform, as shown in Figure 2, a subset of intermediate results (y0, y1, ..., y8) are obtained through 12 XOR operations. These intermediate results will be widely reused in the final calculation. Finally, the final calculation result can be obtained using the following relational expression.

[0092] a1+a2+a3+a4+a5+p1+p2+p3+p4→y0+y1;

[0093] a2+2a3+3a4+4a5+5p1+6p2+7p3+8p4→y1+2y2+4y4+8y8;

[0094] a2+4a3+5a4+3a5+2p1+7p2+6p3+12p4→y1+4y2+3y4+12y8;

[0095] a2+8a3+15a4+12a5+10p1+p2+p3+10p4;

[0096] →y1+8y2+6y3+12y4+7y5+5y6+10y8.

[0097] Therefore, the checksum calculation steps of the (9,5)RS code involve 12 multiplication operations and 25 XOR operations. As the number of redundancies increases, the gain in encoding and decoding complexity of this method will become less and less significant, and its applicability is limited.

[0098] Besides the fast algorithms based on Reed-Muller transform mentioned above, RS code construction algorithms also include fast Fourier transform algorithms, RS code encoding and decoding algorithms, and polynomial ring transform algorithms in finite fields. However, these algorithms are similar to the fast algorithms based on Reed-Muller transform in that they all suffer from limited applicability, high computational complexity in the related calculation process of the parity check matrix, and low computational efficiency.

[0099] This application provides a data encoding method, including: acquiring data to be encoded, and determining a check bit of the data to be encoded based on the data to be encoded and a first matrix. The first matrix includes N disjoint submatrices, and the N submatrices include the first submatrix and a second submatrix, wherein the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix, or the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix, where the multiple is an element in the complex field or a finite field, and u and v are positive integers.

[0100] In this application's embodiments, the data to be encoded refers to data that needs to be encoded. This data can include data from various fields, such as one or more of images, text, and audio.

[0101] This application provides a data decoding method, comprising: acquiring data to be decoded, and determining decoded data based on the data to be decoded and a first matrix. The first matrix comprises N disjoint submatrices, the N submatrices including the first submatrix and a second submatrix, wherein the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix, or the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix, the multiple being an element in the complex field or a finite field, and u and v being positive integers.

[0102] In the embodiments of this application, the data to be decoded refers to all or part of the encoded codewords that need to be decoded, and the encoded codewords can be encoded codewords obtained by encoding the data provided in the embodiments of this application.

[0103] In this context, a codeword refers to the encoded data. A codeword consists of multiple symbols (including information symbols and check symbols), and the symbols are the data bits.

[0104] The data encoding and decoding methods provided in this application, by finding some repeating terms and special algebraic relationships in the rows and columns of the parity check matrix, allow the matrix used for parity calculation to be divided into N sub-matrices whose elements have multiple relationships. Thus, the first matrix can be decomposed into multiple simpler matrices, and each sub-matrix in the first matrix contains the same matrix after decomposition. The calculation of this identical matrix can be reused during encoding and decoding, thereby significantly reducing the number of multiplications and XOR operations, lowering the computational complexity of the decoding algorithm, reducing computational overhead, and improving the overall computational efficiency of encoding and decoding.

[0105] The data encoding and decoding method proposed in this application can be used in various types of communication systems or data storage systems. As an example, the data storage system may include optical disc storage systems, disk storage systems, magnetic tape storage systems, solid-state storage systems, or storage systems composed of optical discs, disks, magnetic tapes, solid-state storage, or a mixture of multiple storage media.

[0106] Figure 3 is a schematic diagram of the architecture of the data encoding and decoding system provided in an embodiment of this application. As shown in Figure 3, the data encoding and decoding system 300 may include a data access device 310, a first computing device 320, and a second computing device 330.

[0107] Data access device 310 is used to read data (e.g., data to be encoded and data to be decoded) and write data (e.g., encoded codewords and decoded data). Data access device 310 includes a storage medium 311, a rack 312, and a controller 313. Storage medium 311 is used to store data. Storage medium 311 may include optical discs, magnetic disks, magnetic tapes, solid-state storage, or a combination of multiple storage media. Rack 312 is used to load storage media, such as optical discs, and to perform data writing or reading operations on the storage media. Rack 312 may include an optical drive, an optical disc tray, and a robotic arm (not shown in the figure). The optical drive is used for writing or reading data. The optical disc tray is used to hold optical discs. The robotic arm is used to insert storage media into the optical drive. Controller 313 is used to control the movement of rack 312. Data access device 310 may also include an I / O interface 314, which can be used to transmit data with other components or devices in the system. For example, data access device 310 transmits the read data to be encoded to the first computing device 320 through I / O interface 314.

[0108] The first computing device 320 is used to obtain data to be encoded from the data access device 310 and to encode the data to be encoded to obtain a check symbol. The encoding process can be implemented by the data encoding method provided in the embodiments of this application.

[0109] In one possible implementation, the first computing device 320 can write the check symbol to a different storage location in the data access device than the storage location of the data to be encoded. If it is subsequently discovered that some of the data to be encoded is lost, the lost data can be recovered using the data decoding method provided in this application embodiment.

[0110] In another possible implementation, the first computing device 320 can generate encoded codewords based on the check symbol and the data to be encoded, and transmit the encoded codewords to the second computing device 330. However, during data transmission, due to noise in the transmission channel, the transmitted encoded codewords may be erased or erroneous. Therefore, the second computing device 330 needs to decode the received encoded codewords (hereinafter referred to as the data to be decoded for ease of distinction) to generate reconstructed symbols for the failed symbols. The decoding process can be implemented using the data decoding method provided in the embodiments of this application.

[0111] If required by business needs, the second computing device 330 can also re-encode the decoded data using the data encoding method provided in this application embodiment for transmission to other devices or storage.

[0112] The data access device 310 and the first computing device 320, and the first computing device 320 and the second computing device 330, can be connected by wired or wireless means.

[0113] It is worth noting that Figure 3 is merely a schematic diagram of the architecture of a data encoding and decoding system provided in an embodiment of this application, and the positional relationships between the devices, components, modules, etc. shown in Figure 3 do not constitute any limitation.

[0114] For example, in Figure 3, storage medium 311 is disposed in data access device 310. In other cases, storage medium 311 may also be a component outside of data access device 310.

[0115] For example, in Figure 3, the first computing device 320 is an external device of the data access device 310. In other cases, the first computing device 320 may also be located on the data access device 310.

[0116] The data encoding method provided in the embodiments of this application is described in detail below. Figure 4 is a schematic flowchart of a data encoding method provided in an embodiment of this application. The method shown in Figure 4 can be executed by a computing device, for example, by the processor of a first computing device 320, or by the processor of a second computing device 330. The method includes S401-S402, as follows:

[0117] S401. Obtain the data to be encoded.

[0118] In this embodiment of the application, the data to be encoded includes multiple symbols, and the symbols in the data to be encoded are referred to as information symbols. The specific number of multiple symbols can vary according to the specific configuration of the data to be encoded, such as 5, 9, 16, 33, etc.

[0119] For ease of description, let the length of the data to be encoded be k, that is, the data to be encoded includes k information symbols.

[0120] S402. Determine the check bits of the data to be encoded based on the data to be encoded and the first matrix.

[0121] As one possible implementation, the computing device determines the checksum based on the data to be encoded and the first matrix, and then generates the check bits of the data to be encoded based on the checksum.

[0122] The first matrix comprises N disjoint submatrices, where N is a positive integer. These N submatrices are divided according to the target codeword length. The target codeword length refers to the length of the encoded codeword after the data to be encoded is completed. It is equal to the sum of the number of information symbols and the number of check symbols in the data to be encoded, and can be expressed as target codeword length n = k + r, where r is the preset number of check symbols.

[0123] In a set of N submatrices, two adjacent submatrices satisfy the following relationship: the element in the u-th row of the second submatrice is a multiple of the element in the u-th row of the first submatrice, or the element in the v-th column of the second submatrice is a multiple of the element in the v-th column of the first submatrice. The multiples are elements in the complex or finite field, and u and v are positive integers. The first and second submatrices can be adjacent matrices or matrices separated by rows or columns.

[0124] As one possible implementation, the first matrix is ​​based on the finite field GF(2). n Constructed from the coset decomposition of ), taking the code matrix C as an array code with array dimension l and nk = r, and taking the u-th row element of the second sub-matrix as a multiple of the u-th row element of the first sub-matrix as an example, the first matrix H can be in the following form:

[0125] Wherein, the elements in the i-th row and j-th column of the first matrix are / denotes the modular operation, p(x) is an irreducible primitive polynomial of degree l over GF(2), and m is a polynomial of degree 2. l -1 is a factor, and α is GF(2 l One of the fundamental elements in ) It is the m-th order primitive root of unity. It is a multiple of the above.

[0126] For the specific generation method of the first matrix mentioned above, please refer to S501-S503 shown in Figure 5, which will not be repeated here.

[0127] The following section details the specific method for determining the checksum based on the data to be encoded and the first matrix.

[0128] As one possible implementation, the steps for determining the checksum based on the data to be encoded and the first matrix include the following steps ①-②.

[0129] Step ①: Decompose each of the N submatrices into a first decomposition matrix and a second decomposition matrix.

[0130] The computing device decomposes each submatrix into a first decomposition matrix and a second decomposition matrix based on the characteristic that any row element of the second submatrix is ​​a multiple of the element of the same row in the first submatrix.

[0131] The sparsity of the first decomposition matrix is ​​greater than that of the second decomposition matrix.

[0132] For example, for the first matrix H, Define submatrix A i,j .

[0133] The above submatrix A i,j It is decomposed into a first decomposition matrix and a second decomposition matrix, such as the first decomposition matrix B. i,j The second decomposition matrix C.

[0134] in,

[0135] Step 2: Determine the checksum based on the data to be encoded, the first decomposition matrix, and the second decomposition matrix.

[0136] The computing device performs matrix multiplication on the data to be encoded, the first decomposition matrix, and the second decomposition matrix to obtain the checksum.

[0137] The number of first decomposition matrices and second decomposition matrices is N. That is, the first decomposition matrix participating in the calculation of the checksum is N first decomposition matrices decomposed from N submatrices, and the second decomposition matrix participating in the calculation of the checksum is N second decomposition matrices decomposed from N submatrices.

[0138] For example, suppose the received codeword V = [V0, V1, ..., V n-1 The calculation method for the checksum is as follows.

[0139] s=H×V T ;

[0140] Among them, V T Let s be the transpose of codeword V, and s be the calculated check vector.

[0141] Assumption The objective of the checksum calculation is:

[0142] In the process of calculating the above-mentioned computational objective, after the computing device decomposes the first matrix H into N sub-matrices, the above calculation steps can be decomposed into: …. Because of A i,j =B i,j ×C, then submatrix A i,j With V T The calculation can be performed first. It requires (m-1)×(m-1) multiplication operations and (m-1)×m XOR operations to calculate. ..., each requires m multiplication operations.

[0143] The above steps for determining the checksum based on the data to be encoded and the first matrix are illustrated using the example of elements in the same row of the first and second submatrices having a multiple relationship. In other embodiments, the same columns of the first and second submatrices may have a multiple relationship, and the corresponding calculation method can be derived based on the principles of matrix calculation, which will not be elaborated here.

[0144] In this way, each submatrix can be decomposed into a first decomposition matrix and a second decomposition matrix. The second decomposition matrices obtained after decomposing different submatrices can be considered the same, thus giving the submatrices strong repetition between rows and columns and satisfying definite algebraic relationships. By reusing these repetitive relationships, the number of multiplications and XOR operations required during encoding and decoding can be significantly reduced. In addition, the calculation process after decomposing multiple submatrices is incremental, that is, reading a part of the symbols and calculating a part of the symbols, reducing the performance consumption of one-time calculations, improving encoding and decoding performance, and reducing chip resource consumption in hardware encoding and decoding scenarios.

[0145] After calculating the checksum, the computing device sets the checksum to 0 and then solves the linear equation system H×V. T =0, the solution of the linear equation system is used as the check bit of the data to be encoded.

[0146] As one possible implementation, solve the linear equation system H×V T During the process of =0, the equation system can be solved according to the calculation method after the submatrix is ​​decomposed into the first decomposition matrix and the second decomposition matrix in the above calculation steps of the check quantifier.

[0147] After calculating and generating the check bits, i.e. check symbols, of the data to be encoded, the computing device obtains r check symbols. Then, based on the r check symbols and the data to be encoded, the encoded codeword c is obtained.

[0148] The above-described step of the computing device generating parity bits corresponding to the data to be encoded based on the first matrix is ​​illustrated using the first matrix as a parity matrix as an example. In other embodiments, the first matrix can also be a generator matrix. The specific method by which the computing device generates parity bits for the data to be encoded based on the generator matrix can be found in existing methods for generating parity bits using generator matrices, and will not be repeated here.

[0149] Based on the aforementioned data encoding method, by finding repeating terms and special algebraic relationships in the rows and columns of the matrix used to generate check bits, the matrix can be divided into N submatrices whose elements have multiple relationships. In this way, the matrix can be decomposed into multiple simpler matrices, and each submatrix contains the same matrix after decomposition. The calculation of this identical matrix can be reused during encoding and decoding, thereby significantly reducing the number of multiplications and XOR operations, lowering the computational complexity of the decoding algorithm, reducing computational overhead, and improving the overall computational efficiency of encoding and decoding.

[0150] The data encoding method provided in this application has been described above with reference to Figure 4. The data encoding method uses a first matrix in its process. The first matrix can be preset, i.e., based on the finite field GF(2). l The first matrix is ​​constructed by decomposing its cosets. The construction steps are explained in detail below with reference to Figure 5.

[0151] Please refer to Figure 5, which is a flowchart illustrating a first matrix construction step provided in this application. This first matrix construction step may include the following steps S501-S503.

[0152] S501, Determine the finite field GF(2) l The m-th order of the primitive unit root.

[0153] The computing device is based on the finite field GF(2) l The primitive polynomial of GF(2) is used to determine the finite field GF(2). l The m-th order primitive root of unity of a domain. A primitive root of unity (or primitive element) is an element that generates all non-zero elements in the domain.

[0154] For example, the finite field GF(2 l ) is based on the primitive polynomial x m Constructed by +1, that is, the splitting domain of the unit circle is a finite field GF(2). l ), satisfying m|2 l -1. Then the m-th root of the primitive polynomial is the m-th primitive root of unity, such as the m-th primitive root of unity.

[0155] For any finite field GF(2) l ) element α i ∈GF(2 l), α i =α j ω k .in, ≡ represents the identity sign, and mod represents the modulo operation.

[0156] S502, Based on the m-th order primitive root of unity pair of the finite field GF(2) l Perform coset decomposition to obtain multiple subsets.

[0157] The computing device utilizes the multiplicative group generated by the primitive root of unity to transform the finite field GF(2) l The elements in ) are decomposed into several non-overlapping cosets, i.e. multiple subsets.

[0158] A coset is a set obtained by performing operations on an element of a group and all elements of a subgroup.

[0159] For example, the finite field GF(2 l The coset decomposition result of ) can be as follows:

[0160] S503. Generate a submatrix based on each subset to obtain the first matrix.

[0161] The computing device designs a row or column for each subset, and then generates the elements of other rows or columns of the submatrix to which the row or column belongs according to the Vandermonde determinant, thus obtaining a first matrix containing multiple submatrices, i.e., m consecutive columns or m consecutive rows.

[0162] The submatrix and the first matrix satisfy the characteristics of the submatrix and the first matrix in the embodiment shown in Figure 4. For example, the submatrix corresponding to each subset includes m rows or m columns arranged consecutively, and any element of the submatrix is ​​the product of the element position corresponding to the multiple and the m-th power of the primitive root of unity or the power of the m-th power of the primitive root of unity, etc., which will not be elaborated here.

[0163] For example, taking m=3 as an example, the computing device generates a column of elements based on a subset, such as As the first submatrix, then a column of elements is generated based on adjacent subsets, such as As the second submatrix, the element in the u-th row of the second submatrix is ​​a multiple of the element in the u-th row of the first submatrix. For example, the multiple between the elements in the second row is 2, and the multiple between the elements in the third row is 4.

[0164] If the computing device generates a column containing more elements, such as 6 elements, as a first submatrix based on a subset, and then generates a column containing more elements, such as 6 elements, as a second submatrix based on an adjacent subset, then the first and second submatrixes are arranged horizontally. The first submatrix includes a vertically arranged upper part (the third submatrix) and a lower part (the fourth submatrix). The w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix, where w is a positive integer.

[0165] For example, taking m=3 as an example, the computing device generates a row of elements such as [1 6 7] as the first submatrix based on a subset, and then generates a row of elements such as [1 12 28] as the second submatrix based on adjacent subsets. Then the u-th column element of the second submatrix is ​​a multiple of the u-th column element of the first submatrix, such as the multiple between the second column being 2 and the multiple between the third column being 4.

[0166] If the computing device generates a first submatrix containing more elements, such as 6 elements, based on a subset, and then generates a second submatrix containing more elements, such as 6 elements, based on adjacent subsets, then the first and second submatrixes are arranged vertically. The first submatrix includes a third submatrix arranged horizontally on the left and a fourth submatrix arranged horizontally on the right. The w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix, where w is a positive integer.

[0167] The first matrix obtained by merging the above submatrices can also be viewed as N submatrices of size m*m, where the elements of different submatrices still satisfy the aforementioned multiple relationship. If the size of a submatrix is ​​less than m*m, it is filled with zero values ​​to make its size equal to m*m. In this way, elements in the same row and column of different submatrices all have a multiple relationship and the same size, which helps to simplify the complexity of subsequent matrix calculations.

[0168] Thus, by using subsets generated from m-th order primitive roots of unity, the finite field is coset decomposed, that is, the finite field is decomposed into the union of disjoint sets. Each subset corresponds to a regular submatrix with high repetition, thereby effectively reducing the encoding and decoding complexity through computational reuse. In addition, the computation process after multiple submatrices are decomposed is incremental, that is, a part of the symbols is read and a part of the symbols is calculated, reducing the performance consumption of one-time calculations and improving the encoding and decoding performance.

[0169] The above text, in conjunction with Figure 5, provides a detailed explanation of how to construct the first matrix before executing the data encoding method. In the data encoding and decoding process, after obtaining the encoded codeword based on the data encoding method provided in the above embodiments, the encoded codeword is usually transmitted as output to a receiving device or a decoding device for decoding to obtain the decoded data.

[0170] Corresponding to the data encoding method provided in the above embodiments, the data decoding method provided in this application embodiment is described in detail below. Figure 6 is a schematic flowchart of a data decoding method provided in an embodiment of this application. The method shown in Figure 6 can be executed by a computing device, for example, by the processor of a first computing device 320, or by the processor of a second computing device 330. The data decoding method shown in Figure 6 can be used to decode the encoded codewords obtained by the data encoding method shown in Figure 3. The method may include S601-S602, as follows:

[0171] S601, Obtain the data to be decoded.

[0172] The data to be decoded includes ρ failed symbols and non-failed symbols, and the length of the data to be decoded is ≤n.

[0173] S602. Determine the decoding data based on the data to be decoded and the first matrix.

[0174] The computing device determines the checksum based on the data to be decoded and the first matrix, and then corrects the data to be decoded according to the checksum to obtain the decoded data.

[0175] The first matrix comprises N disjoint submatrices, where N is a positive integer. These N submatrices are divided according to the target codeword length. The target codeword length refers to the length of the encoded codeword after the data to be encoded is completed. It is equal to the sum of the number of information symbols and the number of check symbols in the data to be encoded, and can be expressed as target codeword length n = k + r, where r is the preset number of check symbols.

[0176] The data to be decoded (e.g., the encoded codewords obtained through the data encoding method shown in Figure 4) includes information symbols and check symbols, where there are r check symbols and k information symbols, where r + k = n. In the data to be decoded, some of the n symbol positions are invalid. In this embodiment, invalid symbols are called invalid symbols, and non-invalid symbols are called non-invalid symbols.

[0177] In some possible implementations, all ρ failed symbols in the data to be decoded can be information symbols. In other possible implementations, the ρ failed symbols in the data to be decoded can include both information symbols and check symbols.

[0178] The specific method by which the computing device determines the checksum based on the data to be decoded and the first matrix is ​​the same as the principle of determining the checksum based on the data to be encoded and the first matrix in S402 of the embodiment shown in Figure 4 above, and will not be repeated here.

[0179] After determining the checksum, the computing device performs error correction on the data to be decoded based on the checksum to obtain the decoded data.

[0180] The computing device uses a checksum to determine whether there are erroneous codewords in the data to be decoded, as well as to determine the location and error value of the erroneous codewords, thereby correcting the erroneous codewords.

[0181] As one possible implementation, as shown in Figure 7, the error correction steps of the computing device to correct the data to be decoded may include the following S701-S703.

[0182] S701. Determine whether there are erroneous codewords in the data to be decoded based on the checksum.

[0183] The computing device assigns a value to the checksum to determine whether there are erroneous codewords in the data to be decoded.

[0184] For example, the computing device calculates whether the checksum s is equal to the zero vector. If yes, it indicates that the received codeword is error-free, or that the error has been correctly corrected. If no, it indicates that the received codeword contains an error and requires further error correction steps.

[0185] S702. Determine the position and error value of the erroneous codeword based on the first decomposition matrix and the second decomposition matrix.

[0186] The computing device uses the RS decoding error correction algorithm to construct an error location polynomial, and then performs a Qian search based on the error location polynomial to determine the position of the erroneous codeword, and then calculates the error value at the position of the erroneous codeword. Since the Qian search and error value related calculation algorithms can essentially be transformed into the product operation of the first matrix (or part of the first matrix) and a vector, the position of the erroneous codeword and the error value can also be regarded as determined based on the first decomposition matrix and the second decomposition matrix after the first matrix is ​​decomposed.

[0187] As one possible implementation, the computing device constructs the error location polynomial using algorithms such as the Berlekamp-Massey algorithm or the Euclidean algorithm. The error location polynomial is a polynomial containing coefficients for unknowns (i.e., error locations).

[0188] As one possible implementation, the computing device uses Qian search to find the roots of the polynomial at the error location to determine the position of the erroneous sign in the data, and then performs error correction. Qian search is a brute-force search process that finds possible error locations by checking the roots (i.e., solutions) of the polynomial. Specifically, it verifies whether each position is an error location by enumerating all possible values.

[0189] As one possible implementation, the computing device employs the Forney algorithm to calculate the error value at each error location. Specifically, the Forney algorithm is used to calculate the error value at each error location. For example, for each error symbol at a misaligned location, the Forney algorithm uses the derivative of the polynomial at the error location to calculate the error value.

[0190] S703. Correct the error codeword according to its position and error value.

[0191] The computing device adds the error value to the received symbol for each erroneous codeword, thereby correcting the erroneous codeword.

[0192] In this way, the decoding side shares the same first matrix as the data encoding method described above. The first matrix can be decomposed into multiple simpler matrices, and each submatrix in the first matrix contains the same matrix after decomposition. The calculation of the same matrix can be reused in the decoding process such as checksum calculation, Qian search, and Forney algorithm, thereby significantly reducing the number of multiplications and XOR operations, reducing the computational complexity of the decoding algorithm, reducing computational overhead, and improving the overall computational efficiency of encoding and decoding.

[0193] The data encoding and decoding methods provided in this application have been described above with reference to Figures 4-7. Next, the principle of how the first matrix (taking the first matrix as the check matrix as an example) of the above data encoding and decoding methods reduces the complexity of check calculation will be explained.

[0194] Taking the (9,5) RS code as an example, an RS codeword consists of data bits and redundant bits. The (9,5) RS codeword is composed of 5 data symbols a1, a2, a3, a4, a5 and 4 redundant symbols P1, P2, P3, P4, where each symbol consists of m = 4 bits, satisfying the following relationship:

[0195] a1+a2+a3+a4+a5+p1+p2+p3+p4=0;

[0196] a1+6a2+7a3+2a4+12a5+14p1+3p2+10p3+9p4=0;

[0197] a1+7a2+6a3+4a4+15a5+11p1+5p2+8p3+13p4=0;

[0198] a1+a2+a3+8a4+8a5+8p1+15p2+15p3+15p4=0.

[0199] As shown in the above formula, the checksum calculation steps of the (9,5)RS code involve 22 multiplication operations and 32 XOR operations. Using the checksum matrix in the data encoding or decoding method provided in the above embodiments of this application, a strong relationship can be found between the operations of every three symbols, allowing a large number of operations to be reused, ultimately reducing the overall computational complexity. The relationships between the symbols and the simplified calculation formulas are as follows:

[0200] X1 = a1 + a3;

[0201] X2 = a2 + a3;

[0202] X3 = a1 + X2;

[0203] Y1 = a4 + p2;

[0204] Y2 = a5 + p1;

[0205] Y3 = a4 + Y2;

[0206] Z1 = p2 + p4;

[0207] Z2 = p3 + p4;

[0208] Z3 = p2 + Z2;

[0209] a1+a2+a3+a4+a5+p1+p2+p3+p4→X3+Y3+Z3;

[0210] a1+6a2+7a3+2a4+12a5+14p1+3p2+10p3+9p4

[0211] →X1+6X2+2Y1+12Y2+3Z1+10Z2;

[0212] a1+7a2+6a3+4a4+15a5+11p1+5p2+8p3+13p4

[0213] →X1+7X2+4Y1+15Y2+5Z1+8Z2;

[0214] a1+a2+a3+8a4+8a5+8p1+15p2+15p3+15p4→X3+8Y3+15Z3.

[0215] Therefore, after performing relevant calculations using the check matrix in the data encoding or decoding method provided in this application, the check calculation steps of the (9,5)RS code involve 12 multiplication operations and 23 XOR operations. As the number of redundancies increases, the overall computational complexity of RS code encoding and decoding is reduced by significantly reusing intermediate calculation results through local calculations, thereby improving the overall encoding and decoding efficiency and reducing the consumption of hardware resources by encoding and decoding.

[0216] After explaining in principle how the first matrix in the data encoding and decoding methods reduces the complexity of checksum calculation, this application uses the following examples to illustrate the specific methods and beneficial effects of checksum calculation based on the aforementioned first matrix in the data encoding or decoding methods provided in this application.

[0217] Example 1 uses the finite field GF(256) and (256,240) RS code as an example. Where n = 256 and k = 240.

[0218] Based on S402 in Figure 4 and the first matrix construction in Figure 5, taking m=3, the first matrix is ​​as follows: (The first 6 columns of the 256-column check matrix)

[0219] For the aforementioned (256,240) RS code, the parity calculation for encoding and decoding traditional RS codes requires 3810 multiplication operations and 4065 XOR operations. The following describes the steps for parity calculation based on constructing a parity check matrix in the data encoding / decoding method provided in this application.

[0220] Step ①: Verification matrix decomposition.

[0221] For i∈[0,5], j∈[0,85], define

[0222] Step 2: Decompose matrix A i,j .

[0223] A i,j =B i,j ×C.

[0224] in,

[0225] For example, matrix B obtained by decomposing the parity matrix (the first 6 columns of 256 columns) is as follows:

[0226] The matrix C obtained by decomposing the parity matrix (the first 6 columns of the 256-column matrix) is as follows:

[0227] Step 3: Calculation …

[0228] First calculate It requires 2 multiplication operations and 5 XOR operations; then calculate

[0229] …; each only requires 3 multiplication operations.

[0230] Ultimately, the checksum calculation steps were reduced to 1430 multiplication operations and 1770 XOR operations, a reduction of 62.47% in multiplication operations and 56.46% in XOR operations. Furthermore, the calculation process is incremental, meaning it reads multiple blocks of data (e.g., three blocks) and calculates those multiple blocks (e.g., three blocks), making it a computationally friendly method for industrial applications and reducing the consumption of computing resources such as chips.

[0231] Example 2 uses the finite field GF(128), (128,120) RS code as an example. Where n = 128, k = 120.

[0232] Based on S402 in Figure 4 and the first matrix in Figure 5, taking m=3, the first matrix is ​​as follows: (The first 6 columns of the 128-column check matrix)

[0233] For the aforementioned (128,120) RS code, the calculation of the checksum in the encoding and decoding of traditional RS codes requires 882 multiplication operations and 1009 XOR operations. The following describes the steps of calculating the checksum based on constructing the parity check matrix in the data encoding and decoding method provided in this application.

[0234] Step ①: Verification matrix decomposition.

[0235] For i∈[0,2], j∈[0,42], define

[0236]

[0237] Step 2: Decompose matrix A i,j .

[0238] A i,j =B i,j ×C.

[0239] in,

[0240] For example, matrix B obtained by decomposing the parity matrix (the first 6 columns of 128 columns) is as follows:

[0241] The matrix C obtained by decomposing the parity matrix (the first 6 columns of 128 columns) is as follows:

[0242] Step 3: Calculation …

[0243] First calculate It requires 2 multiplication operations and 5 XOR operations; then calculate

[0244] …; each only requires 3 multiplication operations.

[0245] Ultimately, the checksum calculation steps were reduced to 378 multiplication operations and 547 XOR operations, a reduction of 57.14% in multiplication operations and 45.79% in XOR operations. Furthermore, the calculation process is incremental, meaning it reads multiple blocks of data (e.g., three blocks) and calculates those multiple blocks (e.g., three blocks), making it a computationally friendly method for industrial applications and reducing the consumption of computing resources such as chips.

[0246] Example 3 uses the finite field GF(64), (64,40) RS code as an example. Where n = 64 and k = 40.

[0247] Based on S402 in Figure 4 and the first matrix in Figure 5, taking m=3, the first matrix is ​​as follows: (The first 6 columns of the 64-column check matrix are shown below:)

[0248] For the aforementioned (64,40) RS code, the parity calculation for encoding and decoding traditional RS codes requires 186 multiplication operations and 249 XOR operations. The following describes the steps for parity calculation based on constructing a parity check matrix in the data encoding / decoding method provided in this application.

[0249] Step ①: Verification matrix decomposition.

[0250] For i∈[0,1], j∈[0,21], define

[0251] Step 2: Decompose matrix A i,j .

[0252] A i,j =B i,j ×C.

[0253] in,

[0254] For example, matrix B obtained by decomposing the parity matrix (the first 6 columns of 64 columns) is as follows:

[0255] The matrix C obtained by decomposing the parity matrix (the first 6 columns of the 64-column matrix) is as follows:

[0256] Step 3: Calculation …

[0257] First calculate It requires 2 multiplication operations and 5 XOR operations; then calculate

[0258] …; each only requires 3 multiplication operations.

[0259] Ultimately, the checksum calculation steps were reduced to 102 multiplication operations and 186 XOR operations, a reduction of 45.16% in multiplication operations and 25.30% in XOR operations. Furthermore, the calculation process is incremental, meaning it reads multiple blocks of data (e.g., three blocks) and calculates those multiple blocks (e.g., three blocks), making it the most industrially-friendly calculation method. This reduces the computational resources occupied by the encoding / decoding steps in hardware encoding / decoding scenarios, thus reducing chip area.

[0260] The data encoding method provided according to the embodiments of this application has been described in detail above with reference to Figures 4 and 5. The data encoding apparatus provided by this application corresponding to the above-described data encoding method will now be described with reference to Figure 8. The data encoding apparatus can be used to implement the functions of the data encoding method in the above-described method embodiments, and therefore can also achieve the beneficial effects of the above-described method embodiments.

[0261] Please refer to Figure 8, which shows a data encoding device provided in this application. The data encoding device 800 includes a transceiver module 810 and a processing module 820.

[0262] The transceiver module 810 is used to acquire data to be encoded.

[0263] Processing module 820 is used to determine the check bit of the data to be encoded based on the data to be encoded and a first matrix; the first matrix includes N disjoint submatrices, the N submatrices include a first submatrice and a second submatrice, wherein the u-th row element of the second submatric is a multiple of the u-th row element of the first submatrice, or the v-th column element of the second submatric is a multiple of the v-th column element of the first submatrice, the multiple being an element in the complex field or a finite field, and u and v being positive integers.

[0264] As one possible implementation, the first submatrix and the second submatrix are arranged horizontally, and the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix; the first submatrix includes a vertically arranged third submatrix and a fourth submatrix, and the w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix.

[0265] As one possible implementation, the first submatrix and the second submatrix are arranged vertically, and the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix; the first submatrix includes a third submatrix and a fourth submatrix arranged horizontally, and the w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix.

[0266] As one possible implementation, if the size of the fourth submatrix is ​​smaller than the size of the third submatrix, the fourth submatrix is ​​filled with zero values ​​so that the size of the fourth submatrix is ​​equal to the size of the third submatrix.

[0267] As one possible implementation, any one of the N submatrices comprises consecutive rows or columns.

[0268] As one possible implementation, the first matrix is ​​a generator matrix or a check matrix.

[0269] As one possible implementation, the processing module 820 is specifically used to: decompose the N sub-matrices into multiple first decomposition matrices and multiple second decomposition matrices, wherein some or all of the rows or columns within a second decomposition matrix are the same, or some or all of the rows or columns between multiple second decomposition matrices are the same; determine a checksum based on the data to be encoded, the first decomposition matrices, and the second decomposition matrices; and generate a check bit for the data to be encoded based on the checksum.

[0270] As one possible implementation, the sparsity of the first decomposition matrix is ​​greater than that of the second decomposition matrix.

[0271] As one possible implementation, the processing module 820 is also used to: determine the finite field GF(2 n The m-th order primitive root of unity of n; satisfying m|2 n -1; Based on the m-th order primitive root of unity for the finite field GF(2) n Perform coset decomposition to obtain multiple subsets; each subset contains m elements; generate a submatrix based on each subset to obtain the first matrix.

[0272] Optionally, any element of the first matrix is ​​the product of the element position's corresponding multiple and the power of the m-th primitive root of unity or the power of the m-th primitive root of unity.

[0273] Optionally, the elements in the i-th row and j-th column of the first matrix are... l is the array dimension of the encoded codeword, p(x) is the primitive irreducible polynomial of degree l over GF(2), and m is a 2 l -1 is a factor, and α is GF(2 l One of the fundamental elements in ) Multiples, It is the m-th order primitive unit root.

[0274] The data decoding method provided according to the embodiments of this application has been described in detail above with reference to Figures 6 and 7. The data decoding apparatus provided by this application corresponding to the above-described data decoding method will now be described with reference to Figure 9. The data decoding apparatus can be used to implement the functions of the data decoding method in the above-described method embodiments, and therefore can also achieve the beneficial effects of the above-described method embodiments.

[0275] Please refer to Figure 9, which shows a data decoding device provided in this application. The data decoding device 900 includes a transceiver module 910 and a processing module 920.

[0276] The transceiver module 910 is used to acquire the data to be decoded.

[0277] Processing module 920 is used to determine decoded data based on the data to be decoded and a first matrix; the first matrix includes N disjoint submatrices, the N submatrices include a first submatrice and a second submatrice, wherein the u-th row element of the second submatrice is a multiple of the u-th row element of the first submatrice, or the v-th column element of the second submatrice is a multiple of the v-th column element of the first submatrice, the multiple being an element in the complex field or a finite field, and u and v being positive integers.

[0278] As one possible implementation, the first submatrix and the second submatrix are arranged horizontally, and the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix; the first submatrix includes a vertically arranged third submatrix and a fourth submatrix, and the w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix.

[0279] As one possible implementation, the first submatrix and the second submatrix are arranged vertically, and the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix; the first submatrix includes a third submatrix and a fourth submatrix arranged horizontally, and the w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix.

[0280] As one possible implementation, if the size of the fourth submatrix is ​​smaller than the size of the third submatrix, the fourth submatrix is ​​filled with zero values ​​so that the size of the fourth submatrix is ​​equal to the size of the third submatrix.

[0281] As one possible implementation, any one of the N submatrices comprises consecutive rows or columns.

[0282] As one possible implementation, the first matrix is ​​a check matrix.

[0283] As one possible implementation, the processing module 820 is specifically used to: decompose the N sub-matrices into multiple first decomposition matrices and multiple second decomposition matrices, wherein some or all of the rows or columns within a second decomposition matrix are the same, or some or all of the rows or columns between multiple second decomposition matrices are the same; determine a checksum based on the data to be decoded, the first decomposition matrices, and the second decomposition matrices; and perform error correction on the data to be decoded based on the checksum to obtain the decoded data.

[0284] As one possible implementation, the sparsity of the first decomposition matrix is ​​greater than that of the second decomposition matrix.

[0285] The aforementioned data encoding device 800 or data decoding device 900 can be implemented in software or in hardware. For example, the implementation of the data encoding device will be described below.

[0286] As an example of a software functional unit, a data encoding device can include code running on a computing instance. This computing instance can be at least one of a physical host (computing device), a virtual machine, a container, or other computing devices. Furthermore, the aforementioned computing device can be one or more. For example, the data encoding device can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application can be distributed within the same region or in different regions. Similarly, the multiple hosts / virtual machines / containers used to run the code can be distributed within the same availability zone (AZ) or in different AZs, each AZ comprising one or more geographically proximate data centers. Typically, a region can include multiple AZs.

[0287] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a single region. Communication between two VPCs within the same region, and between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0288] As an example of a hardware functional unit, a data encoding device may include at least one computing device, such as a server. Alternatively, the data encoding device may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logic device, such as a CPLD, a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0289] The data encoding device comprises multiple computing devices that can be distributed within the same region or in different regions. Similarly, the data encoding device comprises multiple computing devices that can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the YY device comprises multiple computing devices that can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0290] This application also provides a computing device 1000. As shown in FIG10, the computing device 1000 includes: a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008. The processor 1004, the memory 1006, and the communication interface 1008 communicate with each other via the bus 1002. The computing device 1000 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 1000. Optionally, the processor 1004 of the computing device 1000 can be connected to a display or input device through the communication interface 1008.

[0291] Bus 1002 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 10, but this does not imply that there is only one bus or one type of bus. Bus 1002 can include pathways for transmitting information between various components of computing device 1000 (e.g., memory 1006, processor 1004, communication interface 1008).

[0292] The processor 1004 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP). In this embodiment, the processor 1004 is used to execute the steps or operations of the data encoding or data decoding methods provided in Figures 4-7 of this embodiment.

[0293] The memory 1006 may include volatile memory, such as random access memory (RAM). The processor 1004 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0294] The memory 1006 stores executable program code, and the processor 1004 executes the executable program code to implement the functions of the aforementioned transceiver module 810 and processing module 820, and / or the transceiver module 910 and processing module 920, thereby implementing the data encoding method provided in Figures 4 to 5 of this application embodiment, and / or the data decoding method provided in Figures 6 to 7 of this application embodiment. That is, the memory 1006 stores instructions for executing the data encoding method provided in Figures 4 to 5 of this application embodiment, and / or instructions for executing the data decoding method provided in Figures 6 to 7 of this application embodiment.

[0295] The communication interface 1008 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 1000 and other devices or communication networks.

[0296] The display can include various display devices capable of display functions, such as plasma displays and liquid crystal displays. The computing device 1000 can realize data display functions through the display.

[0297] Input devices can include various input devices such as keyboards, mice, and touch screens that enable user input.

[0298] This application also provides a chip system. The chip system may include a processor and a power supply circuit. The power supply circuit is used to supply power to the processor, and the processor is used to execute the steps or operations of the data encoding method provided in Figures 4 to 5 of this application and / or the data decoding method provided in Figures 6 to 7 of this application.

[0299] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product runs on at least one computing device, it causes the at least one computing device to perform the steps or operations of the data encoding method provided in Figures 4 to 5 of this application and / or the data decoding method provided in Figures 6 to 7 of this application, for example, instructions for performing the steps or operations of the data encoding method provided in Figures 4 to 5 of this application and / or the data decoding method provided in Figures 6 to 7 of this application.

[0300] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to perform the steps or operations of the data encoding method provided in Figures 4 to 5 and / or the data decoding method provided in Figures 6 to 7 of this application, for example, instructions for performing the steps or operations of the data encoding method provided in Figures 4 to 5 and / or the data decoding method provided in Figures 6 to 7 of this application.

[0301] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

[0302] The terms “first,” “second,” “third,” and “fourth,” etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to define a specific order.

[0303] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

Claims

1. A data encoding method characterized by, include: Obtain the data to be encoded; The check digit of the data to be encoded is determined based on the data to be encoded and the first matrix; The first matrix comprises N disjoint submatrices, the N submatrices including a first submatrix and a second submatrix, wherein the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix, or the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix, wherein the multiple is an element in the complex field or a finite field, and u and v are positive integers.

2. The method of claim 1, wherein, The first submatrix and the second submatrix are arranged horizontally, and the element in the u-th row of the second submatrix is ​​a multiple of the element in the u-th row of the first submatrix; The first submatrix includes a third submatrix and a fourth submatrix arranged vertically, wherein the w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix.

3. The method of claim 1, wherein, The first submatrix and the second submatrix are arranged vertically, and the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix; The first submatrix includes a horizontally arranged third submatrix and a fourth submatrix, wherein the w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix.

4. The method according to claim 2 or 3, characterized in that, If the size of the fourth submatrix is ​​smaller than the size of the third submatrix, the fourth submatrix is ​​filled with zero values ​​so that the size of the fourth submatrix is ​​equal to the size of the third submatrix.

5. The method according to any one of claims 1-4, characterized in that, Any of the N submatrices comprises rows or columns arranged consecutively.

6. The method according to any one of claims 1-5, characterized in that, The first matrix is ​​either a generator matrix or a check matrix.

7. The method according to any one of claims 1-6, characterized in that, Determining the check bit of the data to be encoded based on the data to be encoded and the first matrix includes: The N submatrices are decomposed into multiple first decomposition matrices and multiple second decomposition matrices, wherein some or all of the rows or columns within a second decomposition matrix are the same, or some or all of the rows or columns among multiple second decomposition matrices are the same. The checksum is determined based on the data to be encoded, the first decomposition matrix, and the second decomposition matrix; The check bits of the data to be encoded are generated based on the checksum.

8. The method according to claim 7, characterized in that, The sparsity of the first decomposition matrix is ​​greater than that of the second decomposition matrix.

9. The method according to any one of claims 1-8, characterized in that, The method further includes: determining an mth primitive element of a finite field GF(2 n ) ; n satisfies m | 2 n -1; performing a coset decomposition on the finite field GF(2 n ) based on the m-th primitive unit root, to obtain a plurality of subsets; each subset in the plurality of subsets contains m elements; A submatrix is ​​generated based on each subset to obtain the first matrix.

10. The method according to claim 9, characterized in that, Any element of any submatrix in the first matrix is ​​the product of the element's position multiple and the m-th power of the original root of unity or the power of the m-th power of the original root of unity.

11. The method according to claim 10, characterized in that, The element in the i-th row and j-th column of the first matrix is l is the array dimension of the encoded codeword, p(x) is the l-th degree primitive irreducible polynomial of GF(2), and m is a 2 l -1 is a factor, and α is GF(2 l One of the fundamental elements in ) Multiples, It is the m-th order primitive unit root.

12. A decoding method, characterized in that, include: Obtain the data to be decoded; Determine the decoded data based on the data to be decoded and the first matrix; The first matrix comprises N disjoint submatrices, the N submatrices including a first submatrix and a second submatrix, wherein the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix, or the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix, wherein the multiple is an element in the complex field or a finite field, and u and v are positive integers.

13. The method according to claim 12, characterized in that, The first submatrix and the second submatrix are arranged horizontally, and the element in the u-th row of the second submatrix is ​​a multiple of the element in the u-th row of the first submatrix; The first submatrix includes a third submatrix and a fourth submatrix arranged vertically, wherein the w-th row element of the fourth submatrix is ​​a multiple of the w-th row element of the third submatrix.

14. The method according to claim 12, characterized in that, The first submatrix and the second submatrix are arranged vertically, and the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix; The first submatrix includes a horizontally arranged third submatrix and a fourth submatrix, wherein the w-th column element of the fourth submatrix is ​​a multiple of the w-th column element of the third submatrix.

15. The method according to claim 13 or 14, characterized in that, If the size of the fourth submatrix is ​​smaller than the size of the third submatrix, the fourth submatrix is ​​filled with zero values ​​so that the size of the fourth submatrix is ​​equal to the size of the third submatrix.

16. The method according to any one of claims 12-15, characterized in that, Any of the N submatrices comprises rows or columns arranged consecutively.

17. The method according to any one of claims 12-15, characterized in that, The first matrix is ​​a check matrix.

18. The method according to any one of claims 12-16, characterized in that, The step of determining the decoded data based on the data to be decoded and the first matrix includes: The N submatrices are decomposed into multiple first decomposition matrices and multiple second decomposition matrices, wherein some or all of the rows or columns within a second decomposition matrix are the same, or some or all of the rows or columns among multiple second decomposition matrices are the same. The checksum is determined based on the data to be decoded, the first decomposition matrix, and the second decomposition matrix; The decoded data is obtained by correcting errors in the data to be decoded based on the verifier.

19. The method according to claim 18, characterized in that, The sparsity of the first decomposition matrix is ​​greater than that of the second decomposition matrix.

20. A data encoding device, characterized in that, include: The transceiver module is used to acquire data to be encoded. The processing module is used to determine the check bits of the data to be encoded based on the data to be encoded and the first matrix; The first matrix comprises N disjoint submatrices, the N submatrices including a first submatrix and a second submatrix, wherein the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix, or the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix, wherein the multiple is an element in the complex field or a finite field, and u and v are positive integers.

21. A data decoding device, characterized in that, include: The transceiver module is used to acquire data to be decoded; The processing module is used to determine the decoded data based on the data to be decoded and the first matrix; The first matrix comprises N disjoint submatrices, the N submatrices including a first submatrix and a second submatrix, wherein the u-th row element of the second submatrix is ​​a multiple of the u-th row element of the first submatrix, or the v-th column element of the second submatrix is ​​a multiple of the v-th column element of the first submatrix, wherein the multiple is an element in the complex field or a finite field, and u and v are positive integers.

22. A chip, characterized in that, It includes a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, the processor being used to perform the method of any one of claims 1-11 or 12-19.

23. A data encoding and decoding system, characterized in that, The system includes an encoder and a decoder, wherein the encoder is used to perform the method of any one of claims 1-11, and the decoder is used to perform the method of any one of claims 12-19.

24. A computing device, characterized in that, The computing device includes a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the computing device to perform the method as claimed in any one of claims 1-11 or 12-19.

25. A computer program product containing instructions, characterized in that, When the instructions are executed by at least one computing device, the at least one computing device performs the method as claimed in any one of claims 1-11 or 12-19.