Parity check decoding method, device, equipment and medium
By prioritizing the allocation of rows/columns with the largest weight in the parity check matrix, the problem of low efficiency when the parity check matrix is divided into several submatrices in the prior art is solved, and the parallel processing efficiency of the decoder is improved.
Patent Information
- Application Number
- CN202411245526.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-17
AI Technical Summary
When the existing parity check matrix is divided into several submatrices for parallel processing, in the case of random selection, as the number of matrix columns/rows increases, the more cases it is divided into several submatrices, it is difficult to find better scheduling results. , resulting in a decrease in parallel processing efficiency of the decoder.
By prioritizing the columns/rows where their non-zero elements are located in at least two submatrices for the rows/columns with the largest weight in the parity check matrix, the complexity of random allocation is reduced, the efficiency of matrix allocation is improved, and parallel translation is performed code.
It realizes better matrix allocation results and higher decoder parallel processing efficiency, reducing the number and complexity of random allocation of parity check matrix.
Smart Images

Figure CN119154891A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data decoding, and in particular to a parity decoding method, device, equipment and medium. Background Art
[0002] With the demand for high-speed storage devices, the speed of decoders in storage devices is also highly required. Among the methods of improving the speed of decoders, the most commonly used technique is to improve the parallel processing efficiency of decoders. The decoder of LDPC codes (LowDensity Parity Check Codes) operates based on the values of non-zero positions in the parity check matrix. Therefore, the scheduling of parallel processing is achieved by dividing the parity check matrix into several sub-matrices.
[0003] At present, the conventional method of dividing the parity check matrix into several sub-matrices for parallel processing mainly includes three steps: step one, randomly dividing the parity check matrix directly into several sub-matrices; step two, checking whether the several sub-matrices meet the target conditions corresponding to the architecture of the decoder, if not, returning to step one or proceeding to step three, if satiated, outputting several sub-matrices for parallel processing; step three, replacing some columns (or some rows) in the several sub-matrices and then returning to step two.
[0004] In the current scheduling method, as the number of columns / rows of the parity check matrix increases, the number of sub-matrices that need to be divided increases. In the case of random selection, it often takes a lot of times to find a better scheduling result, that is, to divide the parity check matrix into a better number of sub-matrices. Assuming that the N-column parity check matrix is to be divided into two sub-matrices for scheduling, the complexity of random selection is ,As N increases, it becomes more difficult to find a better scheduling result using the current scheduling method. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a parity check decoding method, device, equipment and medium, which can allocate the columns / rows where the non-zero elements are located as the columns / rows with priority allocation to at least two sub-matrices for the rows / columns with the largest weight in the parity check matrix each time, which can not only reduce the complexity of random allocation, but also obtain a matrix allocation result with better effect and higher efficiency, thereby improving the parallel processing efficiency of the decoder by decoding the sub-matrices in parallel. The specific scheme is as follows:
[0006] In a first aspect, the present application provides a parity check decoding method, applied to a decoder, comprising:
[0007] determining a target parity check matrix;
[0008] Determine the target row / target column with the largest weight in the target parity check matrix;
[0009] Allocate the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices;
[0010] If the target parity check matrix is empty, decoding is performed based on the at least two sub-matrices.
[0011] Optionally, allocating the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices includes:
[0012] Allocating the columns / rows where the non-zero elements in the target row / target column are located based on a preset number of allocations to obtain the at least two sub-matrices after allocation whose weight scores meet a preset condition;
[0013] The weight score is a score calculated based on the at least two sub-matrices after allocation.
[0014] Optionally, the preset condition is that the weight score is equal to a preset score or the weight score is the minimum weight score among the preset allocation times.
[0015] Optionally, the method further includes:
[0016] Calculating the weight score based on the weight matrices respectively corresponding to the at least two sub-matrices after allocation;
[0017] The weight matrix is a matrix constructed based on the weights corresponding to each row / column in the submatrix; the weights are determined based on the number of non-zero elements.
[0018] Optionally, after allocating the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices, the method further includes:
[0019] If the target parity check matrix is not empty, a new matrix obtained by deleting the columns / rows allocated to the at least two sub-matrices from the target parity check matrix is determined as a new target parity check matrix.
[0020] Optionally, allocating the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices includes:
[0021] Based on the number of columns to be allocated / the number of rows to be allocated corresponding to the at least two sub-matrices respectively, the column / row where the non-zero elements in the target row / target column are located is allocated to the at least two sub-matrices;
[0022] Among them, the number of columns to be allocated is the number of columns determined based on the weights of the submatrix rows corresponding to the row numbers of the target rows in the at least two submatrices and the maximum weight of the target rows; the number of rows to be allocated is the number of rows determined based on the weights of the submatrix columns corresponding to the column numbers of the target columns in the at least two submatrices and the maximum weight of the target columns.
[0023] Optionally, after allocating the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices, the method further includes:
[0024] A target vector for recording allocation status of the target parity check matrix is updated based on the columns / rows allocated to the at least two sub-matrices.
[0025] In a second aspect, the present application provides a parity check decoding device, comprising:
[0026] A matrix determination module, used for determining a target parity check matrix;
[0027] A row and column determination module, used to determine the target row / target column with the largest weight in the target parity check matrix;
[0028] A row-column allocation module, used for allocating the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices;
[0029] A matrix decoding module is used for decoding based on the at least two sub-matrices if the target parity check matrix is empty.
[0030] In a third aspect, the present application provides an electronic device, including:
[0031] Memory, used to store computer programs;
[0032] A processor is used to execute the computer program to implement the above-mentioned parity check decoding method.
[0033] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned parity decoding method when executed by a processor.
[0034] In the present application, a target parity check matrix is determined; a target row / target column with the largest weight in the target parity check matrix is determined; the columns / rows where the non-zero elements in the target row / target column are located are allocated to at least two sub-matrices; if the target parity check matrix is empty, decoding is performed based on the at least two sub-matrices. It can be seen that, compared with directly randomly dividing the parity check matrix into several sub-matrices, the present application allocates the columns / rows where the non-zero elements are located as the columns / rows with priority allocation to several sub-matrices for the rows / columns with the largest weight in the parity check matrix each time, which can not only obtain a matrix allocation result with better effect and higher efficiency, improve the allocation efficiency of the parity check matrix, but also reduce the number of random allocations of the parity check matrix, that is, reduce the complexity of random allocation of the parity check matrix, thereby improving the efficiency of parallel decoding of several sub-matrices, that is, improving the parallel processing efficiency of the decoder. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0036] Figure 1 A flow chart of a parity check decoding method disclosed in this application;
[0037] Figure 2 A specific parity check matrix allocation flow chart disclosed in this application;
[0038] Figure 3 A schematic diagram of the structure of a parity check decoding device disclosed in this application;
[0039] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] In the current scheduling method, as the number of columns / rows of the parity check matrix increases, the number of sub-matrices is divided into more and more cases. In the case of random selection, it often takes a very large number of times to find a better scheduling result. To this end, the present application provides a parity check decoding method, by each time for the row / column with the largest weight in the parity check matrix, the column / row where the non-zero element is located is allocated as the column / row to be allocated preferentially to several sub-matrices, which can not only reduce the complexity of random allocation, but also obtain a matrix allocation result with better effect and higher efficiency, thereby improving the parallel processing efficiency of the decoder by performing parallel decoding on several sub-matrices.
[0042] See also Figure 1 As shown, an embodiment of the present invention discloses a parity check decoding method, comprising:
[0043] Step S11, determining a target parity check matrix.
[0044] Step S12: Determine the target row / target column with the largest weight in the target parity check matrix.
[0045] Step S13: Allocate the column / row where the non-zero elements in the target row / column are located to at least two sub-matrices.
[0046] Step S14: If the target parity check matrix is empty, decoding is performed based on the at least two sub-matrices.
[0047] In this embodiment, the target parity check matrix may refer to a target parity check matrix determined based on an original parity check matrix; or it may refer to a new matrix obtained by deleting the columns / rows allocated to at least two sub-matrices from the target parity check matrix after allocating the columns / rows where non-zero elements in the target rows / columns of the target parity check matrix to at least two sub-matrices, if the target parity check matrix is not empty, as a new target parity check matrix.
[0048] Among them, for the target parity check matrix determined based on the original parity check matrix, the original parity check matrix can be directly determined as the target parity check matrix; the target parity check matrix can also be determined based on some columns / rows in the original parity check matrix, and the data columns / data rows in the original parity check matrix that do not exist in the target parity check matrix are directly allocated to at least two sub-matrices. That is, the target parity check matrix can be either an empty matrix or a non-empty matrix containing data columns / data rows. It should be noted that the target parity check matrix and at least two sub-matrices can be combined to form the original parity check matrix at any time.
[0049] Specifically, in one case, if the target parity check matrix is determined based on some columns in the original parity check matrix, the data columns in the original parity check matrix that do not exist in the target parity check matrix are directly allocated to at least two sub-matrices. In another case, if the target parity check matrix is determined based on some rows in the original parity check matrix, the data rows in the original parity check matrix that do not exist in the target parity check matrix are directly allocated to at least two sub-matrices.
[0050] Further, regardless of the method used to determine the target parity check matrix, the decoder can first determine the target row / target column with the largest weight in the target parity check matrix, and then allocate the column / row where the non-zero element in the target row / target column is located to at least two sub-matrices, and then determine whether the target parity check matrix (that is, the new matrix obtained by deleting the columns / rows allocated to at least two sub-matrices from the target parity check matrix) is empty. If the target parity check matrix is not empty, the new matrix obtained by deleting the columns / rows allocated to at least two sub-matrices from the target parity check matrix is determined as the new target parity check matrix, and then the above step of determining the target row / target column with the largest weight in the target parity check matrix is re-executed; if the target parity check matrix is empty, at least two sub-matrices are output, and the at least two sub-matrices are decoded in parallel, and the multiple decoding results obtained after the parallel decoding are merged to obtain the final decoding result. It should be noted that the weight in this embodiment is a value determined based on the number of non-zero elements; for example, if the number of non-zero elements in a data row / column of the target parity-check matrix is 4, then the weight of the data row / column is 4.
[0051] Among them, if there are multiple target rows / columns with the largest weight in the target parity check matrix, one can be randomly selected from the multiple ones as the target row / column, or the first one can be selected from the multiple ones in order as the target row / column. In addition, for allocating the columns / rows where the non-zero elements in the target row / column are located to at least two sub-matrices, all the columns / rows where the non-zero elements in the target row / column are located can be allocated to at least two sub-matrices, or the columns / rows where the non-zero elements in the target row / column are located can be partially allocated to at least two sub-matrices according to the matrix allocation requirements, which is not specifically limited here.
[0052] It should be noted that, in the process of allocating the columns / rows where the non-zero elements in the target row / target column are located to at least two sub-matrices, the columns / rows allocated to at least two sub-matrices are different from each other, that is, the intersection between the column numbers of the data columns / row numbers of the data rows in any two sub-matrices is an empty set. For example, if the columns where the non-zero elements in the target row are located are c1, c3, c4, and c5, respectively, the columns allocated to the two sub-matrices can be c1, c3 and c4, c5, or c1, c4 and c3, c5, etc., but it is necessary to ensure that the same data column will not be repeatedly allocated to different sub-matrices, that is, the same data column will only exist in one sub-matrix.
[0053] It should also be noted that each of the at least two sub-matrices corresponds to an allocation set, which is used to record the column number of the data column / row number of the data row allocated to the sub-matrix; and the target parity check matrix also corresponds to a tag set, which is used to record the column number of the data column / row number of the data row contained in the target parity check matrix. Specifically, taking the dimension of the original parity check matrix H as M×N as an example, that is, the original parity check matrix includes M rows and N columns, where the N columns can be recorded as c0, c1,…, c N-1 Before allocating data columns to the target parity check matrix determined based on the original parity check matrix, first define the target parity check matrix Hrem and the corresponding tag set Srem, and define at least two sub-matrices H0, H1, ..., H k-1 , that is, there are k sub-matrices in total, and the allocation sets S0, S1, …, S corresponding to the k sub-matrices are defined respectively. k-1 Further, after the data columns are allocated to the target parity check matrix determined based on the original parity check matrix, the target parity check matrix Hrem is an empty matrix, and the tag set Srem is an empty set; the submatrix H i =[c i0 ,c i1 ,…,c ip ], and the submatrix H i The corresponding allocation set is S i ={i0,i1,…,ip}, where i=0,1,…,k-1. And, , that is, k allocation sets (S0, S1, ..., S k-1 ) is equal to {0,1,…,N-1}. In addition, there is no intersection between any two of the k allocation sets, that is, , where i,j∈{0,1,…,k-1} and i≠j.
[0054] The number of sub-matrices of the at least two sub-matrices may be determined based on the number of processor cores of the decoder; for example, if the number of processor cores of the decoder is 2, the number of sub-matrices of the at least two sub-matrices is 2.
[0055] In this embodiment, after the columns / rows where the non-zero elements in the target row / target column are located are allocated to at least two sub-matrices, the target vector for recording the allocation of the target parity check matrix can be updated based on the columns / rows allocated to the at least two sub-matrices, so that the vectors in the target vector corresponding to the columns / rows allocated to the at least two sub-matrices are updated to the allocation identifiers of the corresponding sub-matrices; wherein different sub-matrices correspond to different allocation identifiers. In this way, the allocation identifier in the target vector can be used to know the allocation of the target parity check matrix, that is, to which sub-matrix the data columns / data rows in the target parity check matrix are allocated.
[0056] Taking at least two sub-matrices as two sub-matrices Ha and Hb as an example, the allocation identifier corresponding to the sub-matrix Ha is 0, and the allocation identifier corresponding to the sub-matrix Hb is 1; if the target parity check matrix determined based on the original parity check matrix is [c0, c1, c2, c3, c4, c5], and the target parity check matrix is finally divided into two sub-matrices Ha=[c0, c1, c2] and Hb=[c3, c4, c5] by dividing the data column, then the target vector used to record the allocation of the target parity check matrix is (0, 0, 0, 1, 1, 1). It can be found that when the target parity check matrix determined based on the original parity check matrix is divided into data columns, the number of vectors in the target vector is the same as the number of columns of the original parity check matrix, that is, each data column in the original parity check matrix corresponds to a vector in the target vector. Correspondingly, when the target parity check matrix determined based on the original parity check matrix is divided into data rows, the number of vectors in the target vector is the same as the number of rows of the original parity check matrix, that is, each data row in the original parity check matrix corresponds to a vector in the target vector.
[0057] Further, for allocating the column / row where the non-zero element in the target row / target column is located to at least two sub-matrices in step S13, it can include: allocating the column / row where the non-zero element in the target row / target column is located based on a preset allocation number to obtain at least two allocated sub-matrices whose weight scores meet the preset conditions. Among them, the preset allocation number can be set to the maximum weight of the target row / target column, can be directly set to 1, and can also be set to the total number of all possible situations for allocating the column / row where the non-zero element in the target row / target column is located, which is not specifically limited here.
[0058] For the weight score, the weight score is a score calculated based on the at least two allocated sub-matrices, specifically, a score calculated based on the weight matrices corresponding to the at least two allocated sub-matrices, and the weight matrix is a matrix constructed based on the weights corresponding to each row / column in the sub-matrix, and the weight is a value determined based on the number of non-zero elements. For example, the weight score can be defined as ; where score represents the weight score, abs() represents the absolute value function, k represents the total number of submatrices, wt() represents the weight matrix, and H i and H j represents any two different sub-matrices among the k sub-matrices.
[0059] Specifically, when the columns where the non-zero elements in the target row are located are assigned to at least two sub-matrices, the weight matrix is a matrix constructed based on the weights corresponding to each row in the sub-matrix; when the rows where the non-zero elements in the target column are located are assigned to at least two sub-matrices, the weight matrix is a matrix constructed based on the weights corresponding to each column in the sub-matrix.
[0060] For the preset condition, in one case, the weight score is equal to the preset score, wherein the preset score can be 0 or other specific values. In another case, the weight score is the minimum weight score among the preset allocation times.
[0061] Further, the step S13 of allocating the columns / rows where the non-zero elements in the target row / target column are located to at least two sub-matrices may include: allocating the columns / rows where the non-zero elements in the target row / target column are located to at least two sub-matrices based on the number of columns to be allocated / number of rows to be allocated corresponding to the at least two sub-matrices. In this way, the columns / rows where the non-zero elements in the target row / target column are located can be randomly and as evenly as possible allocated to at least two sub-matrices through the number of columns to be allocated / number of rows to be allocated.
[0062] The number of columns to be allocated is the number of columns determined based on the weights of the submatrix rows corresponding to the row numbers of the target rows in the at least two submatrices and the maximum weight of the target rows. That is, the submatrix rows corresponding to the row numbers of the target rows are determined from the at least two submatrices, and the weights of the submatrix rows are determined, and then the number of columns to be allocated corresponding to the at least two submatrices is determined based on the weights of the submatrix rows and the maximum weight of the target rows.
[0063] The number of rows to be allocated is the number of rows determined based on the weights of the submatrix columns corresponding to the column numbers of the target columns in the at least two submatrices and the maximum weight of the target columns. That is, the submatrix columns corresponding to the column numbers of the target columns are determined from the at least two submatrices, and the weights of the submatrix columns are determined, and then the number of rows to be allocated corresponding to the at least two submatrices is determined based on the weights of the submatrix columns and the maximum weight of the target columns.
[0064] According to one of the specific embodiments, after determining the target parity check matrix and determining the target row / target column with the largest weight in the target parity check matrix, it is necessary to start the matrix allocation operation of this round, that is, to allocate the columns / rows where the non-zero elements in the target row / target column are located based on the preset number of allocations of this round, so as to obtain at least two sub-matrices after allocation whose weight scores meet the preset conditions. Specifically, for the matrix allocation operation of this round, the number of columns / rows to be allocated corresponding to the at least two sub-matrices respectively is determined based on the current at least two sub-matrices, and then the initial at least two sub-matrices are determined based on the current at least two sub-matrices, and the columns / rows where the non-zero elements in the target row / target column are located are allocated to the initial at least two sub-matrices based on the number of columns / rows to be allocated to obtain at least two temporary sub-matrices, and the current weight score is calculated based on the weight matrices corresponding to the temporary at least two sub-matrices. Then, it is determined whether the current weight score is less than the current minimum score; wherein the current minimum score is initially a larger value, such as infinity ∞, in the matrix allocation operation of this round; if the current weight score is less than the current minimum score, the current at least two sub-matrices are updated using at least two temporary sub-matrices, and the current minimum score is updated using the current weight score. Then, it is further determined whether the current minimum score is equal to the preset score or whether the current allocation times is equal to the preset allocation times of this round; wherein the current allocation times is initially 1 in the matrix allocation operation of this round. If the current minimum score is not equal to the preset score and the current allocation times is not equal to the preset allocation times of this round, the current allocation times is incremented by one to obtain a new current allocation times, and the process jumps back to the above step of allocating the columns / rows where the non-zero elements in the target rows / target columns are located to the initial at least two sub-matrices based on the number of columns / rows to be allocated, until the current minimum score is equal to the preset score or the current allocation times is equal to the preset allocation times of this round. At this time, the matrix allocation operation of this round is terminated, and based on the current at least two sub-matrices corresponding to the current minimum score, at least two allocated sub-matrices whose weight scores meet the preset conditions are obtained. Then, determine whether the target parity check matrix (that is, a new matrix obtained by deleting the columns / rows assigned to at least two sub-matrices from the target parity check matrix) is empty; if the target parity check matrix is not empty, a new matrix obtained by deleting the columns / rows assigned to at least two sub-matrices from the target parity check matrix is determined as the new target parity check matrix, and then jump to the above step of determining the target row / target column with the largest weight in the target parity check matrix until the target parity check matrix is empty, at which time the final at least two sub-matrices can be decoded in parallel.It should be noted that after determining whether the current weight score is less than the current minimum score, if the current weight score is not less than the current minimum score, then jump directly to the above step of determining whether the current minimum score is equal to the preset score or whether the current allocation number is equal to the preset allocation number for this round.
[0065] It can be seen that, compared with directly randomly dividing the parity check matrix into several sub-matrices, the present application allocates the columns / rows where the non-zero elements are located as the columns / rows with priority allocation to several sub-matrices for the rows / columns with the largest weight in the parity check matrix each time. This can not only obtain a better and more efficient matrix allocation result and improve the allocation efficiency of the parity check matrix, but also reduce the number of random allocations of the parity check matrix, that is, reduce the complexity of random allocation of the parity check matrix, thereby improving the efficiency of parallel decoding of several sub-matrices, that is, improving the parallel processing efficiency of the decoder.
[0066] See also Figure 2 As shown, with two core decoders and the original parity check matrix H = [c0, c1, ..., c N-1 ] is used as an example to obtain two sub-matrices Ha and Hb by allocating data columns. The specific matrix allocation process is as follows:
[0067] The target parity check matrix Hrem is determined based on the data columns in the original parity check matrix H, and the two current sub-matrices Ha and Hb are determined based on the data columns in the original parity check matrix that do not exist in the target parity check matrix. For example, when the target parity check matrix is the original parity check matrix, the two current sub-matrices Ha and Hb are both empty matrices.
[0068] Find the target row r with the maximum weight from the target parity check matrix Hrem j Specifically, first count the weight d of each row in the target parity check matrix rem , thus obtaining the weight matrix corresponding to the target parity check matrix , and find the one with the maximum weight d max The target row r j , the maximum weight at this time is . Among them, wt( ) represents the weight matrix; rem M-1 Represents the Mth row in the target parity check matrix, and rem0 represents the 1st row in the target parity check matrix.
[0069] Further, the row number r corresponding to the target row is determined from the two current sub-matrices Ha and Hb respectively. j The weight of the corresponding submatrix row, that is , and determine the number of columns to be allocated corresponding to the two current sub-matrices respectively based on the weights of the two sub-matrix rows and the maximum weight of the target row. Specifically, first calculate the weight difference d between the weights of the two sub-matrix rows col , which is the weight difference , and then determine whether the weight difference is less than 0. If the weight difference is not less than 0, the current sub-matrix Hb is allocated first. At this time, the number of columns to be allocated to the current sub-matrix Ha is col_a=0, and the number of columns to be allocated to the current sub-matrix Hb is col_b=min[d col , d max ]; If the weight difference is less than 0, the current submatrix Ha is allocated first. At this time, the number of columns to be allocated to the current submatrix Ha is col_a=min[-d col , d max ], the number of columns to be allocated to the current sub-matrix Hb is col_b = 0. After the number of columns to be allocated col_a and col_b is determined as above, if d max -col_a-col_b>0, then the columns to be allocated col_a and col_b need to be updated, that is, based on the maximum weight d max and weight difference d col Update the number of columns to be allocated col_a. , and based on the maximum weight d max and weight difference d col Update the number of columns to be allocated col_b. ;in, Indicates rounding up; It should be noted that the above is only a specific implementation method for calculating the number of columns to be allocated, and there are certainly other methods, which will not be described here.
[0070] After calculating the number of columns to be allocated col_a assigned to the current submatrix Ha and the number of columns to be allocated col_b assigned to the current submatrix Hb, start the matrix allocation operation of this round, first initialize the current number of allocations to 1, and initialize the current minimum score to a larger value, such as infinity ∞; then determine the two current submatrices as two initial submatrices, and use the two initial submatrices and randomly allocate the columns where the non-zero elements in the target row are located based on the number of columns to be allocated to obtain two temporary submatrices, and then calculate the current weight score based on the weight matrices corresponding to the two temporary submatrices Ha_tmp and Hb_tmp. Among them, the weight score score=abs(wt(Ha_tmp)-wt(Hb_tmp)); abs() represents the absolute value function.
[0071] Determine whether the current weight score is less than the current minimum score; if the current weight score is less than the current minimum score, then update the two current sub-matrices Ha and Hb based on the two temporary sub-matrices, and update the current minimum score based on the current weight score. Then judge the current number of allocations and the current minimum score. If the current number of allocations is not equal to the preset number of allocations for this round and the current minimum score is not equal to 0, then add one to the current number of allocations to obtain a new current number of allocations, and jump back to the above-mentioned step of using two initial sub-matrices and randomly allocating the columns where the non-zero elements in the target row are located based on the number of columns to be allocated, until the current number of allocations is equal to the preset number of allocations for this round or the current minimum score is equal to 0, thereby obtaining the two current sub-matrices after the current round of allocation based on the two current sub-matrices corresponding to the current minimum score. It should be noted that if the current weight score is greater than or equal to the current minimum score, the operation of judging the current number of allocations and the current minimum score is directly triggered.
[0072] Furthermore, the allocated columns allocated to the two current sub-matrices in this round are deleted from the target parity check matrix to obtain a new target parity check matrix, and the vector corresponding to the column number of the allocated column in the target vector used to record the allocation of the target parity check matrix is updated to the allocation identifier corresponding to the current sub-matrix where the allocated column is located; for example, if the allocated column is in the current sub-matrix Ha, the vector corresponding to the column number of the allocated column in the target vector is modified to 0; if the allocated column is in the current sub-matrix Hb, the vector corresponding to the column number of the allocated column in the target vector is modified to 1. Then, it is determined whether the target parity check matrix is an empty matrix; if the target parity check matrix is a non-empty matrix, it is jumped again to the above step of finding the target row with the maximum weight from the target parity check matrix Hrem; if the target parity check matrix is an empty matrix, the two current sub-matrices and the target vector after the final allocation can be output, and the two current sub-matrices after the final allocation are decoded in parallel, and then the two decoding results obtained after the parallel decoding are merged to obtain the final decoding result.
[0073] It can be seen that, compared with directly randomly allocating the parity-check matrix into two sub-matrices, this embodiment can achieve a more efficient allocation result and improve the allocation efficiency by allocating the columns containing the non-zero elements in the rows with the largest weight in the target parity-check matrix as the columns to be allocated preferentially to the two current sub-matrices each time. In addition, the number of random allocations can be reduced, that is, the complexity of random allocation is reduced; and, by judging the current number of allocations and the current minimum score, it can be ensured that the two current sub-matrices after the final allocation achieve a better allocation result. Further, by performing parallel decoding on the two current sub-matrices after the final allocation by the decoder, the parallel processing efficiency of the decoder can be improved.
[0074] See also Figure 3 As shown, the embodiment of the present invention discloses a parity check decoding device, comprising:
[0075] A matrix determination module 11, used to determine a target parity check matrix;
[0076] A row and column determination module 12 is used to determine the target row / target column with the largest weight in the target parity check matrix;
[0077] A row-column allocation module 13, configured to allocate the column / row where the non-zero elements in the target row / column are located to at least two sub-matrices;
[0078] The matrix decoding module 14 is configured to perform decoding based on the at least two sub-matrices if the target parity check matrix is empty.
[0079] It can be seen that, compared with directly randomly dividing the parity check matrix into several sub-matrices, the present application allocates the columns / rows where the non-zero elements are located as the columns / rows with priority allocation to several sub-matrices for the rows / columns with the largest weight in the parity check matrix each time. This can not only obtain a better and more efficient matrix allocation result and improve the allocation efficiency of the parity check matrix, but also reduce the number of random allocations of the parity check matrix, that is, reduce the complexity of random allocation of the parity check matrix, thereby improving the efficiency of parallel decoding of several sub-matrices, that is, improving the parallel processing efficiency of the decoder.
[0080] In some specific embodiments, the row and column allocation module 13 includes:
[0081] A first allocation unit is used to allocate the columns / rows where the non-zero elements in the target row / target column are located based on a preset allocation number to obtain the at least two sub-matrices after allocation whose weight scores meet a preset condition;
[0082] The weight score is a score calculated based on the at least two sub-matrices after allocation.
[0083] In some specific embodiments, the preset condition is that the weight score is equal to a preset score or the weight score is the minimum weight score among the preset allocation times.
[0084] In some specific embodiments, the parity check decoding device further includes:
[0085] Calculating the weight score based on the weight matrices respectively corresponding to the at least two sub-matrices after allocation;
[0086] The weight matrix is a matrix constructed based on the weights corresponding to each row / column in the submatrix; the weights are determined based on the number of non-zero elements.
[0087] In some specific embodiments, the parity check decoding device further includes:
[0088] A matrix determining unit is used to determine, if the target parity check matrix is not empty, a new matrix obtained by deleting the columns / rows allocated to the at least two sub-matrices from the target parity check matrix as a new target parity check matrix.
[0089] In some specific embodiments, the row and column allocation module 13 includes:
[0090] A second allocating unit is used to allocate the column / row where the non-zero elements in the target row / target column are located to the at least two sub-matrices based on the number of columns to be allocated / the number of rows to be allocated corresponding to the at least two sub-matrices respectively;
[0091] Among them, the number of columns to be allocated is the number of columns determined based on the weights of the submatrix rows corresponding to the row numbers of the target rows in the at least two submatrices and the maximum weight of the target rows; the number of rows to be allocated is the number of rows determined based on the weights of the submatrix columns corresponding to the column numbers of the target columns in the at least two submatrices and the maximum weight of the target columns.
[0092] In some specific embodiments, the parity check decoding device further includes:
[0093] A vector updating unit is used to update a target vector for recording allocation status of the target parity check matrix based on the columns / rows allocated to the at least two sub-matrices.
[0094] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0095] Figure 4 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the parity decoding method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0096] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0097] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.
[0098] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the parity decoding method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0099] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the parity check decoding method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0100] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0101] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0102] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0103] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0104] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A parity check decoding method, characterized in that: include: determining a target parity check matrix; Determine the target row / target column with the largest weight in the target parity check matrix; Allocate the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices; If the target parity check matrix is empty, decoding is performed based on the at least two sub-matrices.
2. The parity check decoding method according to claim 1, characterized in that: The step of allocating the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices includes: Allocating the columns / rows where the non-zero elements in the target row / target column are located based on a preset number of allocations to obtain the at least two sub-matrices after allocation whose weight scores meet a preset condition; The weight score is a score calculated based on the at least two sub-matrices after allocation.
3. The parity check decoding method according to claim 2, characterized in that: The preset condition is that the weight score is equal to a preset score or the weight score is the minimum weight score among the preset allocation times.
4. The parity check decoding method according to claim 2, characterized in that: Also includes: Calculating the weight score based on the weight matrices corresponding to the at least two sub-matrices after allocation; Wherein, the weight matrix is a matrix constructed based on the weights corresponding to each row / column in the submatrix; The weight is determined based on the number of non-zero elements.
5. The parity check decoding method according to claim 1, characterized in that: After allocating the columns / rows where the non-zero elements in the target row / target column are located to at least two sub-matrices, the method further includes: If the target parity check matrix is not empty, a new matrix obtained by deleting the columns / rows allocated to the at least two sub-matrices from the target parity check matrix is determined as a new target parity check matrix.
6. The parity check decoding method according to claim 1, characterized in that: The step of allocating the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices includes: Based on the number of columns to be allocated / the number of rows to be allocated corresponding to the at least two sub-matrices respectively, the column / row where the non-zero elements in the target row / target column are located is allocated to the at least two sub-matrices; Among them, the number of columns to be allocated is the number of columns determined based on the weights of the submatrix rows corresponding to the row numbers of the target rows in the at least two submatrices and the maximum weight of the target rows; the number of rows to be allocated is the number of rows determined based on the weights of the submatrix columns corresponding to the column numbers of the target columns in the at least two submatrices and the maximum weight of the target columns.
7. The parity check decoding method according to any one of claims 1 to 6, characterized in that: After allocating the columns / rows where the non-zero elements in the target row / target column are located to at least two sub-matrices, the method further includes: A target vector for recording allocation status of the target parity check matrix is updated based on the columns / rows allocated to the at least two sub-matrices.
8. A parity check decoding device, characterized in that: include: A matrix determination module, used for determining a target parity check matrix; A row and column determination module, used to determine the target row / target column with the largest weight in the target parity check matrix; A row-column allocation module, used for allocating the column / row where the non-zero elements in the target row / target column are located to at least two sub-matrices; A matrix decoding module is used for decoding based on the at least two sub-matrices if the target parity check matrix is empty.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the parity check decoding method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the parity decoding method according to any one of claims 1 to 7.
