Coding method, device, electronic device and storage medium
Through the method of decomposing and computing the LDPC encoding matrix to generate supervision bits, the problems of high complexity and difficult timing convergence in 25G PON systems are solved, and efficient coding and transmission efficiency are achieved.
Patent Information
- Application Number
- CN202510103971.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-23
AI Technical Summary
The existing LDPC encoding in 25G PON system has high parallelism, resulting in high complexity and difficult timing convergence, which cannot meet the requirements of coding efficiency and system transmission efficiency.
By determining the encoding matrix based on the number of bits of the information to be encoded, dividing it into a plurality of sub-coding matrices, operating for each sub-coding matrix and the information to be encoded, a first supervisor bit is generated, and further computing is performed to generate a second supervisor bit, and finally combining the information to be encoded and the second supervisor bit to form a completed codeword.
This method effectively reduces the logical usage area, improves coding efficiency, solves the problems of high complexity and difficult timing convergence caused by high parallelism, and enables the system's coding efficiency to run stably above 25/50G.
Smart Images

Figure CN119582856B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of channel coding, and in particular to a coding method, device, electronic device and storage medium. Background Art
[0002] Since Shannon proposed the channel coding theorem, coding researchers have been looking for channel coding schemes with performance as close to the Shannon limit as possible, low complexity and easy to implement. From early cyclic codes, BCH codes (Bose–Chaudhuri–Hocquenghem codes), RS codes (Reed-solomon codes), convolutional codes, and cascade codes to the recent Turbo codes and Low Density Parity Check Codes (LDPC codes), system performance is getting closer and closer to the Shannon limit.
[0003] Since the 1990s, it has been found in the research process that the error correction capability of LDPC codes is close to and may even exceed the performance of Turbo codes when the encoding and decoding complexity is low. LDPC codes are simple to describe, have greater flexibility and lower error floor characteristics, can realize parallel operation, have low decoding complexity, are suitable for hardware implementation, have high throughput, and have great potential for high-speed decoding. At the same time, LDPC codes can be widely used in fourth-generation mobile communication systems, deep space communications, optical fiber communications, satellite communications, cable modems, high-speed and very high-bit-rate digital subscriber lines (VDSL), optical and magnetic recording systems, etc. However, most of them are currently used in the case of short codeword lengths and cannot adapt to the mainstream communication systems currently being developed. For example, in 25G PON LDPC coding, due to the high degree of parallelism, the complexity is high and the timing convergence is difficult to converge, which cannot meet the coding efficiency and the system transmission efficiency is difficult to reach 25G / 50G. Summary of the invention
[0004] The embodiments of the present disclosure provide a coding method, device, electronic device and storage medium to solve the related problems existing in the existing solutions.
[0005] Based on the above problem, in a first aspect, a coding method is provided, comprising:
[0006] Determine a corresponding encoding matrix based on the number of bits of the information to be encoded;
[0007] Grouping the information to be encoded to obtain a plurality of information groups to be encoded, and dividing the encoding matrix to obtain a plurality of sub-encoding matrices corresponding to the information groups to be encoded, so that any of the information groups to be encoded has a corresponding sub-encoding matrix;
[0008] For each sub-coding matrix, performing a first operation on the sub-coding matrix and the corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix;
[0009] Performing a second operation on the first supervisory bits corresponding to all the sub-coding matrices corresponding to the information to be encoded, to obtain a second supervisory bit corresponding to the information to be encoded;
[0010] The information to be encoded is combined with the corresponding second supervision bit to obtain a codeword that completes the encoding.
[0011] In combination with the first aspect, in a possible implementation manner, dividing the coding matrix to obtain a plurality of sub-coding matrices respectively corresponding to the information groups to be encoded includes:
[0012] Dividing the coding matrix into sub-coding matrices corresponding to each information group to be coded according to columns; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be coded;
[0013] The step of performing a first operation on the sub-coding matrix and the corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix includes:
[0014] For each sub-coding matrix row, performing a first sub-operation of a first operation on non-zero data in the sub-coding matrix row and corresponding information elements in a corresponding information group to be encoded, to obtain valid data corresponding to the sub-coding matrix row;
[0015] Performing a second sub-operation of the first operation on the valid data corresponding to the row of the sub-coding matrix to obtain a third supervision bit corresponding to the row of the sub-coding matrix;
[0016] The third supervision bits corresponding to all the sub-coding matrix rows are combined according to the positions of the corresponding rows to obtain the first supervision bits corresponding to the sub-coding matrix.
[0017] In combination with the first aspect, in a possible implementation manner, dividing the coding matrix to obtain a plurality of sub-coding matrices respectively corresponding to the information groups to be encoded includes:
[0018] Dividing the coding matrix into sub-coding matrices corresponding to each information group to be coded according to columns; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be coded;
[0019] The step of performing a first operation on the sub-coding matrix and the corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix includes:
[0020] For each row of the sub-coding matrix, performing a first sub-operation of a first operation on non-zero data in the row and corresponding information elements in a corresponding information group to be encoded, to obtain valid data corresponding to the row of the sub-coding matrix;
[0021] The valid data are grouped according to each group containing a first preset value of valid data to obtain sub-valid data groups;
[0022] Determine a second sub-operation result of the first operation corresponding to the sub-valid data group, and perform the second sub-operation of the first operation on the second sub-operation results corresponding to all the sub-valid data groups to obtain a third supervision bit corresponding to the sub-coding matrix row;
[0023] The third supervision bits corresponding to all the sub-coding matrix rows are combined according to the positions of the corresponding rows to obtain the first supervision bits corresponding to the sub-coding matrix.
[0024] In combination with the first aspect, in a possible implementation manner, the valid data are grouped according to each group containing a first preset value of valid data to obtain sub-valid data groups, including:
[0025] If the number of valid data in the last valid sub-data group is less than the first preset value, the second preset value is added to the remaining position after the valid data in the valid sub-data group so that the last valid sub-data group contains the first preset value of data.
[0026] In combination with the first aspect, in a possible implementation manner, determining the second sub-operation result of the first operation corresponding to the sub-valid data group includes:
[0027] Determine the operation result of the second sub-operation corresponding to the data in the sub-valid data group based on the preset corresponding relationship;
[0028] The preset corresponding relationship is a corresponding relationship between all possible data combinations of the first preset value of bits calculated and stored in advance and the operation results of performing the second sub-operation on them respectively.
[0029] In combination with the first aspect, in a possible implementation,
[0030] The step of performing a second operation on the first supervisory bits corresponding to all the sub-coding matrices corresponding to the information to be encoded to obtain the second supervisory bits corresponding to the information to be encoded includes:
[0031] Each time the first supervision bit corresponding to a sub-coding matrix is determined, the first supervision bit corresponding to the sub-coding matrix and the temporary supervision bit determined based on the first supervision bit corresponding to the sub-coding matrix before the sub-coding matrix are subjected to a second operation bit by bit to obtain a new temporary supervision bit; the first supervision bit corresponding to the last sub-coding matrix and the temporary supervision bit determined based on the sub-coding matrix before the last sub-coding matrix are subjected to a second operation bit by bit to determine a new temporary supervision bit, and the new temporary supervision bit is determined as the second supervision bit corresponding to the information to be encoded; or
[0032] After determining the first parity bits corresponding to the sub-coding matrices, the second parity bits are sequentially subjected to a bit-by-bit second operation to obtain the second parity bits corresponding to the information to be encoded.
[0033] In combination with the first aspect, in a possible implementation manner, grouping the information to be encoded to obtain a plurality of information groups to be encoded, and dividing the encoding matrix to obtain a plurality of sub-encoding matrices respectively corresponding to the information groups to be encoded, includes:
[0034] Grouping the information to be encoded based on the system parallelism so that the number of information element bits of each group in the information group to be encoded is consistent with the system parallelism;
[0035] The coding matrix is divided into sub-coding matrices corresponding to each information group to be coded according to columns, so that the number of columns of the sub-coding matrix is consistent with the number of information element bits in the information group to be coded.
[0036] In combination with the first aspect, in a possible implementation, the first operation includes a first sub-operation of the first operation and a second sub-operation of the first operation; the first operation includes a multiplication and addition operation of binary numbers; the first sub-operation of the first operation includes an AND operation; the second sub-operation of the first operation includes an XOR operation; and the second operation includes an XOR operation.
[0037] In combination with the first aspect, in a possible implementation manner, determining the corresponding encoding matrix based on the number of bits of the information to be encoded includes:
[0038] Determine a corresponding first generative formula based on the number of bits of the information to be encoded;
[0039] Determine a coding matrix corresponding to the information to be encoded based on the first generated formula;
[0040] The first generation formula is as follows:
[0041]
[0042] in, The upper triangular matrix representing the coded bit matrix of the check matrix, The lower triangular matrix representing the matrix of coded bits of the check matrix, The matrix of information bits to be encoded that represents the check matrix, Characterize the encoding matrix.
[0043] In a second aspect, a coding device is provided, comprising:
[0044] A coding matrix generation module, used to determine a corresponding coding matrix based on the number of bits of information to be encoded;
[0045] A coding matrix division module, used for grouping the information to be encoded to obtain a plurality of information groups to be encoded, and dividing the coding matrix to obtain a plurality of sub-coding matrices corresponding to the information groups to be encoded, so that any of the information groups to be encoded has a corresponding sub-coding matrix;
[0046] A matrix operation module is used to perform a first operation on each sub-coding matrix and the corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix; perform a second operation on the first supervision bits corresponding to all the sub-coding matrices corresponding to the information to be encoded to obtain a second supervision bit corresponding to the information to be encoded;
[0047] The codeword generation module is used to combine the information to be encoded with the corresponding second supervision bit to obtain a completed encoded codeword.
[0048] In combination with the second aspect, in a possible implementation, the coding matrix division module is used to divide the coding matrix into sub-coding matrices corresponding to each information group to be encoded by column; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be encoded;
[0049] The matrix operation module is used to perform a first sub-operation of a first operation on non-zero data in the sub-coding matrix row and corresponding information elements in a corresponding information group to be encoded for each sub-coding matrix row, so as to obtain valid data corresponding to the sub-coding matrix row; perform a second sub-operation of the first operation on the valid data corresponding to the sub-coding matrix row to obtain a third supervision bit corresponding to the sub-coding matrix row; and combine the third supervision bits corresponding to all sub-coding matrix rows according to the positions of the corresponding rows to obtain a first supervision bit corresponding to the sub-coding matrix.
[0050] In combination with the second aspect, in a possible implementation, the coding matrix division module is used to divide the coding matrix into sub-coding matrices corresponding to each information group to be encoded by column; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be encoded;
[0051] The matrix operation module is used to perform a first sub-operation of a first operation on the non-zero data in each sub-coding matrix row and the corresponding information element in the corresponding information group to be encoded to obtain valid data corresponding to the sub-coding matrix row; group the valid data according to each group containing a first preset value of valid data to obtain a sub-valid data group; determine the second sub-operation result of the first operation corresponding to the sub-valid data group, and perform the second sub-operation of the first operation on the second sub-operation results corresponding to all the sub-valid data groups to obtain the third supervision bit corresponding to the sub-coding matrix row; and combine the third supervision bits corresponding to all the sub-coding matrix rows according to the positions of the corresponding rows to obtain the first supervision bit corresponding to the sub-coding matrix.
[0052] In combination with the second aspect, in a possible implementation, the matrix operation module is used to add the second preset value to the remaining positions after the valid data in the sub-valid data group if the number of valid data in the last sub-valid data group is less than the first preset value, so that the last sub-valid data group contains the first preset value of data.
[0053] In combination with the second aspect, in a possible implementation, the matrix operation module is used to determine the operation result of the second sub-operation corresponding to the data in the sub-valid data group based on a preset corresponding relationship; wherein the preset corresponding relationship is the correspondence between all possible data combinations of the first preset value of bits pre-calculated and stored and the operation results of the second sub-operation performed thereon respectively.
[0054] In combination with the second aspect, in a possible implementation, the matrix operation module is used to determine the first supervision bit corresponding to a sub-coding matrix each time, and then perform a second operation on the first supervision bit corresponding to the sub-coding matrix and the temporary supervision bit determined based on the first supervision bit corresponding to the sub-coding matrix before the sub-coding matrix to obtain a new temporary supervision bit; perform a second operation on the first supervision bit corresponding to the last sub-coding matrix and the temporary supervision bit determined based on the sub-coding matrix before the last sub-coding matrix to determine a new temporary supervision bit, and determine the new temporary supervision bit as the second supervision bit corresponding to the information to be encoded; or after determining the first supervision bit corresponding to each sub-coding matrix, perform a second operation on each first supervision bit in turn to obtain the second supervision bit corresponding to the information to be encoded.
[0055] In combination with the second aspect, in a possible implementation, the coding matrix division module is used to group the information to be encoded based on the system parallelism, so that the number of information element bits in each group of the information to be encoded is consistent with the system parallelism; and divide the coding matrix into sub-coding matrices corresponding to each information group to be encoded by column, so that the number of columns of the sub-coding matrix is consistent with the number of information element bits in the information group to be encoded.
[0056] In combination with the second aspect, in a possible implementation, in the matrix operation module, the first operation includes a first sub-operation of the first operation and a second sub-operation of the first operation; the first operation includes a multiplication and addition operation of binary numbers; the first sub-operation of the first operation includes an AND operation; the second sub-operation of the first operation includes an XOR operation; and the second operation includes an XOR operation.
[0057] In combination with the second aspect, in a possible implementation, the coding matrix generation module is used to determine a corresponding first generation formula based on the number of bits of the information to be encoded; and determine a coding matrix corresponding to the information to be encoded based on the first generation formula;
[0058] The first generation formula is as follows:
[0059]
[0060] in, The upper triangular matrix representing the coded bit matrix of the check matrix, The lower triangular matrix representing the matrix of coded bits of the check matrix, The matrix of information bits to be encoded that represents the check matrix, Characterize the encoding matrix.
[0061] In a third aspect, an electronic device is provided, comprising a coding device as described in the second aspect, or in combination with any possible implementation of the second aspect; and / or,
[0062] Execute an encoding method as described in the first aspect, or in combination with any possible implementation of the first aspect.
[0063] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the encoding method as described in the first aspect or in combination with any possible implementation of the first aspect is executed.
[0064] The beneficial effects of the embodiments of the present disclosure include:
[0065] The embodiments of the present disclosure provide a coding method, an apparatus, an electronic device and a storage medium. In a mobile communication system, the coding method can be used to encode multimedia information such as voice, video and data, and transmit the codewords generated after encoding through a communication channel. During the transmission process, even if part of the information is interfered with or damaged, the receiving end can detect and correct errors through the supervision bits in the codewords, thereby restoring the original multimedia information. The encoding method provided by the present disclosure first determines a first generative formula based on the number of bits of the information to be encoded through derivation and other operations, and the first generative formula is the basis for determining the encoding matrix, and the corresponding encoding matrix can be determined based on the first generative formula; secondly, the information to be encoded is grouped in combination with the input characteristics, and the long information sequence is decomposed into smaller and easier to manage units, and the encoding matrix is divided based on the divided information groups to be encoded to obtain a sub-coding matrix corresponding to the information groups to be encoded one by one; then for each sub-coding matrix, the sub-coding matrix and the corresponding information group to be encoded are subjected to a first operation to generate a first supervisory bit and the first supervisory bits corresponding to each sub-coding matrix are subjected to a second operation bit by bit to obtain the second supervisory bit corresponding to the information to be encoded; finally, the codeword for the completed encoding is obtained based on the information to be encoded and the corresponding second supervisory bit according to the protocol provisions. The codeword contains all the necessary data of the original information and sufficient check information to ensure that errors can be detected and corrected during transmission or storage. The logic usage area is reduced, and the coding efficiency is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 A flowchart of an encoding method provided by an embodiment of the present disclosure;
[0067] Figure 2 A schematic diagram of an encoding device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0068] The embodiments of the present disclosure provide a coding method, device, electronic device and storage medium. The preferred embodiments of the present disclosure are described below in conjunction with the drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present disclosure, and are not used to limit the present disclosure. In addition, the embodiments in the present application and the features in the embodiments can be combined with each other if there is no conflict.
[0069] The present disclosure provides a coding method. Figure 1 As shown, including:
[0070] S101, determining a corresponding coding matrix based on the number of bits of information to be encoded;
[0071] S102, grouping the information to be encoded to obtain a plurality of information groups to be encoded, and dividing the encoding matrix to obtain a plurality of sub-encoding matrices corresponding to the information groups to be encoded, so that any information group to be encoded has a corresponding sub-encoding matrix;
[0072] S103, for each sub-coding matrix, performing a first operation on the sub-coding matrix and a corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix;
[0073] S104, performing a second operation on the first supervisory bits corresponding to all the sub-coding matrices corresponding to the information to be encoded, to obtain a second supervisory bit corresponding to the information to be encoded;
[0074] S105: Combine the information to be encoded with the corresponding second supervision bit to obtain a codeword for completing the encoding.
[0075] In the disclosed embodiment, the method is applied to the field of channel communication, and the information is encoded before being transmitted. The information is encoded by the application of the method, and the encoding efficiency is improved, so that the encoding efficiency of the system can be stably operated above 25 / 50G. First, the first generative formula is determined according to the number of bits of the information to be encoded, and the first generative formula is used to generate a coding matrix that meets the requirements. Secondly, the information to be encoded is grouped to simplify the encoding process; for example, a 32-bit information to be encoded is divided into four 8-bit information groups to be encoded. Then the corresponding encoding matrix is divided into sub-coding matrices corresponding to each information group to be encoded. These sub-coding matrices are subsets of the original encoding matrix, and their sizes match the size of the group. For example, for each 8-bit information group to be encoded, there will be a 4x8 sub-coding matrix corresponding to it. Then for each sub-coding matrix, the sub-coding matrix is subjected to a first operation with the corresponding information group to be encoded. For example, a 4×8 sub-coding matrix and an 8-bit information group to be encoded, after the first operation, an 8-bit first supervisory bit is obtained. Then, the first supervisory bits corresponding to each sub-coding matrix are subjected to a second operation bit by bit to obtain the second supervisory bits corresponding to the information to be encoded. This operation can be an XOR operation or other types of bit operations, depending on the selected coding scheme; the logic operation area is successfully reduced during the operation. Finally, the codeword for the completed encoding is obtained based on the combination of the information to be encoded and the corresponding second supervisory bits. This codeword is the final encoding result, which contains the original information and the supervisory bits for error detection and correction. For example, the information to be encoded has 32 bits, and an 8-bit second supervisory bit is obtained through the encoding process. They are combined to obtain a 40-bit complete codeword. This codeword can be sent to the communication channel, and the receiver can use the corresponding decoding algorithm to restore the original information and detect and correct the errors that may occur. Through the implementation of this coding method, the problems of high parallelism, high complexity and difficulty in timing convergence can be effectively solved, and the coding efficiency is improved by reducing the logic operation area.
[0076] In another embodiment provided by the present disclosure, the information to be encoded is combined with the corresponding second supervision bit to obtain a codeword for completing the encoding, including:
[0077] The second supervision bit corresponding to the information to be encoded is placed after the information to be encoded and combined to obtain a codeword that completes the encoding; or
[0078] The second supervision bit is shortened to a number of bits that meets a preset requirement, so as to obtain a shortened second supervision bit corresponding to the information to be encoded;
[0079] The shortened second supervision bit corresponding to the information to be encoded is placed after the information to be encoded and combined to obtain a codeword that completes the encoding.
[0080] In the disclosed embodiment, whether to shorten the second supervision bit is determined according to the number of bits of the information to be encoded and the number of bits of the second supervision bit. For example, in the 25G burst bit error tester protocol, LDPC (17280, 14592) is specified to limit the length of the codeword to within 17280. If the number of bits of the information to be encoded k=14592, the number of bits of the shortened second supervision bit = 17280-14592=2688.
[0081] In another embodiment provided by the present disclosure, in the above S102, dividing the coding matrix to obtain a plurality of sub-coding matrices respectively corresponding to the information groups to be coded can be implemented as follows:
[0082] Divide the coding matrix into sub-coding matrices corresponding to each information group to be coded according to columns; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be coded;
[0083] In the above S103, the sub-coding matrix and the corresponding information group to be encoded are subjected to a first operation to obtain a first supervision bit corresponding to the sub-coding matrix, which can be implemented as follows:
[0084] S103a, for each row of the sub-coding matrix, performing a first sub-operation of a first operation on the non-zero data in the row and the corresponding information element in the corresponding information group to be encoded, to obtain valid data corresponding to the row of the sub-coding matrix;
[0085] S103b, performing a second sub-operation of the first operation on the valid data corresponding to the row of the sub-coding matrix to obtain a third supervision bit corresponding to the row of the sub-coding matrix;
[0086] S103c, combining the third parity bits corresponding to all sub-coding matrix rows according to the positions of the corresponding rows to obtain the first parity bits corresponding to the above sub-coding matrix.
[0087] In the disclosed embodiment, first, the coding matrix is divided into columns to ensure that each column corresponds to a specific information group to be encoded. In order to make the subsequent related operations on the matrix valid, the number of columns of the sub-coding matrix should be consistent with the number of information element bits in the information group to be encoded. Such a design ensures the orderliness and efficiency of the encoding process. For example, in a 25G PON communication system, the parallelism is 64 bits, so 14592 information elements require 228 cycles to transmit, so the coding matrix The corresponding division into 228 sub-matrices is called , =0,1,2…227, each matrix size is 3072x64, such as:
[0088] ,
[0089] ,
[0090] ,
[0091] …
[0092] .
[0093] Assume that the input data is [63:0], according to the encoding logic formula 3-1 (formula 3-1 and its derivation process are shown below), we get , its general logic is as follows:
[0094] ;
[0095] ;
[0096] ;
[0097] ;
[0098] =0, 1, 2, …, 3071.
[0099] in, represents one of the 3072 rows of the supervision bit p, Represents the encoding matrix The jth row and the first column of Each row of 64 elements in the matrix must be multiplied logically with the corresponding position element of the s input, and then added. The operation is very complicated and the number of multiplications and additions is large;
[0100] Therefore, according to the sparse property of the coding matrix, the sub-coding matrix obtained by dividing the coding matrix is also sparse, so the elements at some positions are 0, and the data at the positions where the corresponding data is 0 may not be multiplied and added with the corresponding information elements in the corresponding information group to be encoded, thereby reducing the amount of calculation accordingly.
[0101] For example, The matrix is as follows (because the matrix is large, it is not listed here in full, taking rows 1-10 and columns 1-64 as an example):
[0102] =[ 110010100101101001101100101000001000111011111011100000000101101 011001010010110100110110010100000100011101111101110000000010110 1011001010010110100110110010000010001110111110111000000001011 110110010100101101001101100101000001000111011111011100000000101 011011001010010110100110110010100000100011101111101110000000010 001101100101001011010011011001010000010001110111110111000000001 000110110010100101101001101100101000001000111011111011100000000 000011011001010010110100110110010100000100011101111101110000000 000001101100101001011010011011001010000010001110111110111000000 000000110110010100101101001101100101000001000111011111011100000];
[0113] The non-zero data in the row is subjected to the first sub-operation of the first operation with the corresponding information element in the corresponding information group to be encoded, and the valid data corresponding to the row of the sub-coding matrix is obtained, and the encoding matrix The simplified coding matrix of lines 1-10 is shown in Figure 1 Lines 1-10 are as follows:
[0114] p0[0]=s0[0]^s0[1]^s0[4]^s0[6]^s0[9]^s0
[11] ^s0
[12] ^s0
[14] ^s0
[17] ^s0
[18] ^s0
[20] ^s0
[21] ^s0
[24] ^s0
[26] ^s0
[32] ^s0
[36] ^s0
[37] ^s0
[38] ^s0
[40] ^s0
[41] ^s0
[42] ^s0
[43] ^s0
[44] ^s0
[46] ^s0
[47] ^s0
[48] ^s0
[57] ^s0
[59] ^s0
[60] ^s0
[62] ;
[0115] p0[1]=s0[1]^s0[2]^s0[5]^s0[7]^s0
[10] ^s0
[12] ^s0
[13] ^s0
[15] ^s0
[18] ^s0
[19] ^s0
[21] ^s0
[22] ^s0
[25] ^s0
[27] ^s0
[33] ^s0
[37] ^s0
[38] ^s0
[39] ^s0
[41] ^s0
[42] ^s0
[43] ^s0
[44] ^s0
[45] ^s0
[47] ^s0
[48] ^s0
[49] ^s0
[58] ^s0
[60] ^s0
[61] ^s0
[63] ;
[0116] p0[2]=s0[0]^s0[2]^s0[3]^s0[6]^s0[8]^s0
[11] ^s0
[13] ^s0
[14] ^s0
[16] ^s0
[19] ^s0
[20] ^s0
[22] ^s0
[23] ^s0
[26] ^s0
[28] ^s0
[34] ^s0
[38] ^s0
[39] ^s0
[40] ^s0
[42] ^s0
[43] ^s0
[44] ^s0
[45] ^s0
[46] ^s0
[48] ^s0
[49] ^s0
[50] ^s0
[59] ^s0
[61] ^s0
[62] ;
[0117] p0[3]=s0[0]^s0[1]^s0[3]^s0[4]^s0[7]^s0[9]^s0
[12] ^s0
[14] ^s0
[15] ^s0
[17] ^s0
[20] ^s0
[21] ^s0
[23] ^s0
[24] ^s0
[27] ^s0
[29] ^s0
[35] ^s0
[39] ^s0
[40] ^s0
[41] ^s0
[43] ^s0
[44] ^s0
[45] ^s0
[46] ^s0
[47] ^s0
[49] ^s0
[50] ^s0
[51] ^s0
[60] ^s0
[62] ^s0
[63] ;
[0118] p0[4]=s0[1]^s0[2]^s0[4]^s0[5]^s0[8]^s0
[10] ^s0
[13] ^s0
[15] ^s0
[16] ^s0
[18] ^s0
[21] ^s0
[22] ^s0
[24] ^s0
[25] ^s0
[28] ^s0
[30] ^s0
[36] ^s0
[40] ^s0
[41] ^s0
[42] ^s0
[44] ^s0
[45] ^s0
[46] ^s0
[47] ^s0
[48] ^s0
[50] ^s0
[51] ^s0
[52] ^s0
[61] ^s0
[63] ;
[0119] p0[5]=s0[2]^s0[3]^s0[5]^s0[6]^s0[9]^s0
[11] ^s0
[14] ^s0
[16] ^s0
[17] ^s0
[19] ^s0
[22] ^s0
[23] ^s0
[25] ^s0
[26] ^s0
[29] ^s0
[31] ^s0
[37] ^s0
[41] ^s0
[42] ^s0
[43] ^s0
[45] ^s0
[46] ^s0
[47] ^s0
[48] ^s0
[49] ^s0
[51] ^s0
[52] ^s0
[53] ^s0
[62] ;
[0120] p0[6]=s0[3]^s0[4]^s0[6]^s0[7]^s0
[10] ^s0
[12] ^s0
[15] ^s0
[17] ^s0
[18] ^s0
[20] ^s0
[23] ^s0
[24] ^s0
[26] ^s0
[27] ^s0
[30] ^s0
[32] ^s0
[38] ^s0
[42] ^s0
[43] ^s0
[44] ^s0
[46] ^s0
[47] ^s0
[48] ^s0
[49] ^s0
[50] ^s0
[52] ^s0
[53] ^s0
[54] ^s0
[63] ;
[0121] p0[7]=s0[4]^s0[5]^s0[7]^s0[8]^s0
[11] ^s0
[13] ^s0
[16] ^s0
[18] ^s0
[19] ^s0
[21] ^s0
[24] ^s0
[25] ^s0
[27] ^s0
[28] ^s0
[31] ^s0
[33] ^s0
[39] ^s0
[43] ^s0
[44] ^s0
[45] ^s0
[47] ^s0
[48] ^s0
[49] ^s0
[50] ^s0
[51] ^s0
[53] ^s0
[54] ^s0
[55] ;
[0122] p0[8]=s0[5]^s0[6]^s0[8]^s0[9]^s0
[12] ^s0
[14] ^s0
[17] ^s0
[19] ^s0
[20] ^s0
[22] ^s0
[25] ^s0
[26] ^s0
[28] ^s0
[29] ^s0
[32] ^s0
[34] ^s0
[40] ^s0
[44] ^s0
[45] ^s0
[46] ^s0
[48] ^s0
[49] ^s0
[50] ^s0
[51] ^s0
[52] ^s0
[54] ^s0
[55] ^s0
[56] ;
[0123] p0[9]=s0[6]^s0[7]^s0[9]^s0
[10] ^s0
[13] ^s0
[15] ^s0
[18] ^s0
[20] ^s0
[21] ^s0
[23] ^s0
[26] ^s0
[27] ^s0
[29] ^s0[30 ]^s0
[33] ^s0
[35] ^s0
[41] ^s0
[45] ^s0
[46] ^s0
[47] ^s0
[49] ^s0
[50] ^s0
[51] ^s0
[52] ^s0
[53] ^s0
[55] ^s0
[56] ^s0
[57] ;
[0124] According to the above formula, the second sub-operation of the first operation is performed on the valid data corresponding to the above sub-coding matrix row to obtain the third supervision bit corresponding to the sub-coding matrix row. The number of data bits in the third supervision bit should be consistent with the number of rows of the sub-coding matrix, 3072.
[0125] In summary, the coding matrix is effectively divided into sub-coding matrices corresponding to each information group to be coded, and the calculation steps are simplified through some operations to generate the corresponding first parity bit. This process effectively improves the coding efficiency.
[0126] In the embodiment of the present disclosure, in the encoding and decoding process, the information element refers to the original information unit to be encoded. It is the basic component of the message and carries the actual content that needs to be transmitted through the communication system. These information elements can be numbers, characters, symbols, or a combination of them. For example, in digital communication, if a text message is to be transmitted, each character (such as English letters, numbers, punctuation marks, etc.) can be regarded as an information element; if an image is to be transmitted, information such as the color value of each pixel can also be regarded as an information element. In the embodiment of the present disclosure, an information element corresponds to a binary number (0 or 1).
[0127] In another embodiment provided by the present disclosure, in the above S102, dividing the coding matrix to obtain a plurality of sub-coding matrices respectively corresponding to the information groups to be coded can be implemented as follows:
[0128] Divide the coding matrix into sub-coding matrices corresponding to each information group to be coded according to columns; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be coded;
[0129] In the above S103, the sub-coding matrix and the corresponding information group to be encoded are subjected to a first operation to obtain a first supervision bit corresponding to the sub-coding matrix, including:
[0130] S103a, for each row of the sub-coding matrix, performing a first sub-operation of a first operation on the non-zero data in the row and the corresponding information element in the corresponding information group to be encoded, to obtain valid data corresponding to the row of the sub-coding matrix;
[0131] S103b, grouping the valid data according to the principle that each group contains a first preset number of valid data to obtain sub-valid data groups;
[0132] S103c, determining the second sub-operation result of the first operation corresponding to the sub-valid data group, and performing the second sub-operation of the first operation on the second sub-operation results corresponding to all sub-valid data groups to obtain a third supervision bit corresponding to the row of the sub-coding matrix;
[0133] S103d, combining the third parity bits corresponding to all sub-coding matrix rows according to the positions of the corresponding rows to obtain the first parity bits corresponding to the above sub-coding matrix.
[0134] In the embodiment of the present disclosure, following the above, after completing the division of the coding matrix and determining the valid data corresponding to a row of a sub-coding matrix, the operation can be further simplified by a preset corresponding relationship, and the valid data corresponding to the row of the sub-coding matrix is grouped according to each group containing a first preset value of valid data. For example, taking the first preset value as 6 as an example, the above sub-coding matrix row p0[0]=s0[0]^s0[1]^s0[4]^s0[6]^s0[9]^s0
[11] ^s0
[12] ^s0
[14] ^s0
[17] ^s0
[18] ^s0
[20] ^s0
[21] ^s0[ There are 30 valid data corresponding to 24]^s0
[26] ^s0
[32] ^s0
[36] ^s0
[37] ^s0
[38] ^s0
[40] ^s0
[41] ^s0
[42] ^s0
[43] ^s0
[44] ^s0
[46] ^s0
[47] ^s0
[48] ^s0
[57] ^s0
[59] ^s0
[60] ^s0
[62] . The valid data are divided into 5 groups according to the first preset value 6, and then the second sub-operation result of the first operation corresponding to the sub-valid data group is determined, and the third supervision bit corresponding to the row of the sub-coding matrix is obtained, so as to reduce the number of operations in the process and improve the coding efficiency.
[0135] In another embodiment provided by the present disclosure, the above S104b, grouping the above valid data according to each group containing a first preset value of valid data to obtain sub-valid data groups, can be implemented as follows:
[0136] If the number of valid data in the last valid sub-data group is less than the first preset value, the second preset value is added to the remaining position after the valid data in the valid sub-data group so that the last valid sub-data group contains the first preset value of data.
[0137] In the disclosed embodiment, when grouping valid data, if the number of valid data cannot be divided by the first preset value, the number of valid data in the last sub-valid data group will be less than the first preset value. At this time, it is necessary to take certain measures to ensure the integrity of the data group, and the second preset value can be used to fill the last unsatisfied sub-valid data group until the amount of data contained in it reaches the first preset value. For example, when the first preset value is 6, and the number of valid data corresponding to a certain sub-coding matrix row is 26, when the data in the last sub-valid data group is 10, the remaining four bits need to be supplemented, so the four-bit second preset value 0000 is filled after the data 10 in the last sub-valid data group, so that the last sub-valid data group becomes 100000, including the first preset value of data; when the data in the last sub-valid data group is 101, the remaining three bits need to be supplemented, so the three-bit second preset value 000 is filled after the data 101 in the last sub-valid data group, so that the last sub-valid data group becomes 101000, including the first preset value of data. Such an operation can ensure that each valid sub-data group has the same amount of data, thereby maintaining the consistency and accuracy of data processing.
[0138] In another embodiment provided by the present disclosure, in the above step 3, determining the second sub-operation result of the first operation corresponding to the sub-valid data group can be implemented as follows:
[0139] The calculation result of the second sub-operation corresponding to the data in the sub-valid data group is determined based on the preset corresponding relationship; wherein the preset corresponding relationship is the correspondence between all possible data combinations of the first preset value of bits pre-calculated and stored and the calculation results of the second sub-operation performed thereon respectively.
[0140] In the disclosed embodiment, when performing operations on the sub-valid data group, multiple operations can be converted into one corresponding search through a preset corresponding relationship, thereby simplifying the operation and improving efficiency. The preset corresponding relationship refers to the mapping relationship between a set of pre-calculated and stored data combinations and the results obtained by performing operations between them; specifically, these data combinations cover all possible situations of the first preset value of bits. For example, if the first preset value is 6, then the possible data combinations of 6-bit binary will include 64 situations from 000000 to 111111. With the preset corresponding relationship, it is possible to start without calculating the operation result of the second sub-operation corresponding to the data in the sub-valid data group directly through the lookup table. The second sub-operation of the above-mentioned first operation can be implemented as an exclusive or operation. In this way, the efficiency of data processing can be significantly improved, especially when a large amount of data needs to be processed. The use of the preset corresponding relationship can quickly obtain the operation result of each group of data, which not only simplifies and reduces the logic resources and reduces the calculation complexity, but also effectively improves the timing convergence, thereby improving the overall coding efficiency.
[0141] In another embodiment provided by the present disclosure, the above S104, performing a second operation on the first supervisory bits corresponding to all the sub-coding matrices corresponding to the information to be encoded to obtain the second supervisory bits corresponding to the information to be encoded, can be implemented as follows:
[0142] S104a, each time a first supervision bit corresponding to a sub-coding matrix is determined, a second operation is performed on the first supervision bit corresponding to the sub-coding matrix and the temporary supervision bit determined based on the first supervision bits corresponding to the sub-coding matrices before the sub-coding matrix, to obtain a new temporary supervision bit;
[0143] S104b, performing a second operation on the temporary supervision bits determined based on the first supervision bits corresponding to the last sub-coding matrix and the first supervision bits corresponding to the sub-coding matrices before the last sub-coding matrix to determine the new temporary supervision bits, and determining them as the second supervision bits corresponding to the information to be encoded.
[0144] The above S104 may also be implemented as follows:
[0145] S104a′, after determining the first parity bits corresponding to the sub-coding matrices, perform a second operation on each first parity bit in sequence to obtain a second parity bit corresponding to the information to be encoded.
[0146] In the disclosed embodiment, based on the previous steps, for each sub-coding matrix, the first supervisory bit corresponding to the sub-coding matrix will be determined based on the sub-coding matrix and its corresponding information group to be encoded. After each subsequent determination of the first supervisory bit corresponding to a sub-coding matrix, the first supervisory bit corresponding to the sub-coding matrix and the temporary supervisory bit determined based on the first supervisory bit corresponding to the sub-coding matrix before the sub-coding matrix are subjected to a second operation bit by bit to obtain a new temporary supervisory bit. For the first sub-coding matrix, since there is no previous sub-coding matrix corresponding to it, the first supervisory bit determined by the first sub-coding matrix is used as the first temporary supervisory bit. When the subsequent sub-coding matrix is operated, the first temporary supervisory bit is subjected to a second operation by the current sub-coding matrix and the temporary supervisory bit determined by the first supervisory bit corresponding to the previous sub-coding matrix. Through this operation, the new temporary supervisory bit corresponding to the sub-coding matrix can be obtained. Until the first supervisory bit corresponding to the last sub-coding matrix and the temporary supervisory bit determined based on the first supervisory bit corresponding to the sub-coding matrix before the last sub-coding matrix are subjected to a second operation bit by bit, the new temporary supervisory bit is determined as the second supervisory bit corresponding to the information to be encoded.
[0147] For example, when the above-mentioned second operation is an XOR operation, for each bit in the current sub-coding matrix, take it and the bit at the corresponding position in the previous sub-coding matrix for XOR operation, if the two bits are the same, the result is 0; if they are different, the result is 1, thereby obtaining a new first supervision bit sequence; then, the above operation is performed for each sub-coding matrix in this way, until the last sub-coding matrix also completes the corresponding operation to obtain a new first supervision bit, and the new first supervision bit is determined as the second supervision bit.
[0148] In the disclosed embodiment, in addition to the above-mentioned implementation method of performing the second operation on the first supervisory bits corresponding to the sub-coding matrices one by one, there is another implementation method of first determining the first supervisory bits corresponding to all sub-coding matrices, and then collecting all the obtained first supervisory bits, uniformly performing multiple second operations on a bit-by-bit basis, and obtaining the second supervisory bits corresponding to the information to be encoded, thereby simplifying the operation process. For example, if there are four sub-coding matrices, the four sub-coding matrices can be aligned in rows, and each aligned row contains four first supervisory bits corresponding to the four sub-coding matrices, and multiple second operations are performed on the four first supervisory bits of each row to obtain the number of second supervisory bits corresponding to the number of rows of the corresponding coding matrix. The second operation can be a continuous XOR operation or other types of operations, depending on the requirements of the coding scheme.
[0149] For example, suppose that continuous XOR operations are used to process the first supervisory bits corresponding to the four sub-coding matrices. For each row of the four sub-coding matrices after alignment, XOR operations are performed from left to right. The first first supervisory bit is XORed with the second first supervisory bit, and the result is XORed with the third first supervisory bit, and so on. Finally, a single bit sequence is obtained, which is the second supervisory bit corresponding to the information to be encoded. The advantage of this method is that the operation speed is fast.
[0150] In another embodiment provided by the present disclosure, the above S102, grouping the information to be encoded to obtain multiple information groups to be encoded, and dividing the encoding matrix to obtain multiple sub-encoding matrices corresponding to the information groups to be encoded, can be implemented as follows:
[0151] S102a, grouping the information to be encoded based on the system parallelism, so that the number of information element bits in each group of the information to be encoded is consistent with the system parallelism;
[0152] S102b, dividing the coding matrix into sub-coding matrices corresponding to each information group to be coded, so that the number of columns of the sub-coding matrix is consistent with the number of information element bits in the information group to be coded.
[0153] In the disclosed embodiment, the LDPC code is a type of linear block code, and the block code converts the information s containing k bits to be encoded into a code character C(s) of n bits generated based on the information s containing k bits to be encoded. Then, the length of the block code is n, and the parallelism of the parallel encoding is q;
[0154] If k is divisible by q, then the coding period t is t=k / q, and the corresponding coding matrix is divided into t sub-coding matrices corresponding to the information groups to be encoded in each coding period, so the number of columns of the sub-coding matrix is consistent with the number of information element bits in the information group to be encoded;
[0155] If k is not divisible by q, the coding period t=k / p is rounded up and added by 1. Similarly, the corresponding coding matrix is divided into t sub-coding matrices corresponding to the information groups to be encoded in each coding period, but the parallelism is reduced to kq·(t-1) in the last period, and the effective data bit width in the last period is kq·(t-1);
[0156] In application, k is generally taken to be divisible by q. For example, in 25G PON, LDPC (17280, 14592) is used, and the parallelism q=64, then t=14592 / 64=228.
[0157] In another embodiment provided by the present disclosure, in the above step S103, the first operation includes a first sub-operation of the first operation and a second sub-operation of the first operation; the first operation includes a multiplication and addition operation of binary numbers; the first sub-operation of the first operation includes an AND operation; the second sub-operation of the first operation includes an XOR operation; and the second operation includes an XOR operation.
[0158] In another embodiment provided by the present disclosure, the above step S101, determining the corresponding encoding matrix based on the number of bits of the information to be encoded, includes:
[0159] Determine a corresponding first generative formula based on the number of bits of the information to be encoded;
[0160] Determine a coding matrix corresponding to the information to be coded based on the first generative formula;
[0161] The first generative formula is as follows:
[0162]
[0163] in, The upper triangular matrix representing the coded bit matrix of the check matrix, The lower triangular matrix representing the matrix of coded bits of the check matrix, The matrix of information bits to be encoded that represents the check matrix, Characterize the encoding matrix.
[0164] In the disclosed embodiment, in the existing protocol, a check matrix H is usually given. In the encoding process, a generator matrix (encoding matrix) G is obtained according to the check matrix H, and a codeword vector c is obtained by calculation as shown in Formula 1:
[0165] Formula 1
[0166] The first k symbols of the encoded codeword c(n, k) are information bits s, and the following (nk) symbols are supervision bits p. Therefore, we only need to calculate the supervision bits of the nk symbols following the codeword.
[0167] In the above step S101, the first generating formula is determined based on the number of bits of the information to be encoded, which can be implemented as follows:
[0168] First, the check matrix H is split by columns to generate the first k columns of the corresponding information bits as matrix A and the last (nk) columns of the corresponding parity bits as matrix B. The codeword c can be divided into k symbols of information bits s and nk symbols of parity bits p as shown in Equation 2:
[0169] Formula 2
[0170] Formula 2 can be converted into Formula 2-1:
[0171] Formula 2-1
[0172] Secondly, find the inverse of B in equation 2-1. When the B matrix is full rank and all the main formulas are not zero, B can be uniquely decomposed into the product of the lower triangular matrix L and the upper triangular matrix U, that is, Then formula 2-1 can be converted into the following formula 3:
[0173] Formula 3
[0174] Among them, in formula 3 is the multiplication operation of vector and matrix. Using forward elimination operation, for By using back substitution operation, the inversion operation of matrix B is avoided in the whole process;
[0175] According to Formula 3 and the properties of the encoding matrix, we can get the following Formula 3-1:
[0176] Formula 3-1,
[0177] Further simplification gives
[0178] Formula 4
[0179] Finally, MATLAB software is used to perform calculations according to Formula 4 to obtain the coding matrix G1 with nk rows and k columns. For example, when k=14592, the coding matrix It has 3072 rows and 14592 columns.
[0180] Based on the same disclosed concept, the embodiments of the present disclosure also provide a coding device, an electronic device and a storage medium. Since the principles of the problems solved by these devices, electronic devices and storage media are similar to those of the aforementioned coding methods, the implementation of the device, electronic device and storage medium can refer to the implementation of the aforementioned methods, and the repeated parts will not be repeated.
[0181] With the above Figure 1 Corresponding to the method shown, the embodiment of the present disclosure also provides a coding device, such as Figure 2 As shown, including:
[0182] A coding matrix generating module 201, used to determine a corresponding coding matrix based on the number of bits of information to be encoded;
[0183] The coding matrix division module 202 is used to group the information to be encoded to obtain multiple information groups to be encoded, and divide the coding matrix to obtain multiple sub-coding matrices corresponding to the information groups to be encoded, so that any information group to be encoded has a corresponding sub-coding matrix;
[0184] The matrix operation module 203 is used to perform a first operation on each sub-coding matrix and the corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix; perform a second operation on the first supervision bits corresponding to all the sub-coding matrices corresponding to the information to be encoded to obtain a second supervision bit corresponding to the information to be encoded;
[0185] The codeword generation module 204 is used to combine the information to be encoded with the corresponding second supervision bit to obtain a codeword for completing the encoding.
[0186] In another embodiment provided by the present disclosure, the coding matrix division module 202 is used to divide the coding matrix into sub-coding matrices corresponding to each information group to be encoded by column; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be encoded;
[0187] The matrix operation module 203 is used to perform a first sub-operation of a first operation on the non-zero data in each sub-coding matrix row and the corresponding information element in the corresponding information group to be encoded to obtain valid data corresponding to the sub-coding matrix row; perform a second sub-operation of the first operation on the valid data corresponding to the sub-coding matrix row to obtain the third supervision bit corresponding to the sub-coding matrix row; and combine the third supervision bits corresponding to all sub-coding matrix rows according to the positions of the corresponding rows to obtain the first supervision bit corresponding to the sub-coding matrix.
[0188] In another embodiment provided by the present disclosure, the coding matrix division module 202 is used to divide the coding matrix into sub-coding matrices corresponding to each information group to be encoded by column; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be encoded;
[0189] The matrix operation module 203 is used to perform a first sub-operation of a first operation on the non-zero data in each sub-coding matrix row and the corresponding information element in the corresponding information group to be encoded, so as to obtain valid data corresponding to the sub-coding matrix row; group the valid data according to each group containing a first preset value of valid data, so as to obtain a sub-valid data group; determine the second sub-operation result of the first operation corresponding to the sub-valid data group, and perform the second sub-operation of the first operation on the second sub-operation results corresponding to all sub-valid data groups to obtain the third supervision bit corresponding to the sub-coding matrix row; combine the third supervision bits corresponding to all sub-coding matrix rows according to the positions of the corresponding rows to obtain the first supervision bit corresponding to the sub-coding matrix.
[0190] In another embodiment provided by the present disclosure, the above-mentioned matrix operation module 203 is used to add the second preset value to the remaining positions after the valid data in the sub-valid data group if the number of valid data in the last sub-valid data group is less than the first preset value, so that the last sub-valid data group contains the first preset value of data.
[0191] In another embodiment provided by the present disclosure, the above-mentioned matrix operation module 203 is used to determine the operation result of the second sub-operation corresponding to the data in the sub-valid data group based on a preset corresponding relationship; wherein the preset corresponding relationship is the correspondence between all possible data combinations of the first preset value of bits pre-calculated and stored and the operation results of the second sub-operation performed thereon respectively.
[0192] In another embodiment provided by the present disclosure, the above-mentioned matrix operation module 203 is used to determine the first supervision bit corresponding to a sub-coding matrix, and then perform a second operation on the first supervision bit corresponding to the sub-coding matrix and the temporary supervision bit determined based on the first supervision bit corresponding to the sub-coding matrix before the sub-coding matrix to obtain a new temporary supervision bit; perform a second operation on the first supervision bit corresponding to the last sub-coding matrix and the temporary supervision bit determined based on the first supervision bit corresponding to the sub-coding matrix before the last sub-coding matrix to determine the new temporary supervision bit as the second supervision bit corresponding to the information to be encoded; or after determining the first supervision bit corresponding to each sub-coding matrix, perform a second operation on each first supervision bit in sequence to obtain the second supervision bit corresponding to the information to be encoded.
[0193] In another embodiment provided by the present disclosure, the above-mentioned coding matrix division module 202 is used to group the information to be encoded based on the system parallelism, so that the number of information element bits of each group in the information group to be encoded is consistent with the system parallelism; and divide the coding matrix into sub-coding matrices corresponding to each information group to be encoded by column, so that the number of columns of the sub-coding matrix is consistent with the number of information element bits in the information group to be encoded.
[0194] In another embodiment provided by the present disclosure, in the above-mentioned matrix operation module 203, the first operation includes a first sub-operation of the first operation and a second sub-operation of the first operation; the first operation includes a multiplication and addition operation of binary numbers; the first sub-operation of the first operation includes an AND operation; the second sub-operation of the first operation includes an XOR operation; and the second operation includes an XOR operation.
[0195] In another embodiment provided by the present disclosure, the encoding matrix generation module 201 is used to determine a corresponding first generating formula based on the number of bits of the information to be encoded; and determine a coding matrix corresponding to the information to be encoded based on the first generating formula;
[0196] The first generative formula is as follows:
[0197]
[0198] in, The upper triangular matrix representing the coded bit matrix of the check matrix, The lower triangular matrix representing the matrix of coded bits of the check matrix, The matrix of information bits to be encoded that represents the check matrix, Characterize the encoding matrix.
[0199] An embodiment of the present disclosure provides an electronic device, including the encoding device as described above.
[0200] In the disclosed embodiment, the electronic device may be a burst bit error meter, and the encoding method may be written into an FPGA (Field-Programmable Gate Array) of the burst bit error meter. The burst bit error meter can encode the information to be encoded according to the encoding rules set by the user. When the LDPC code is used for encoding, the burst bit error meter can generate the encoded codewords according to the check matrix of the LDPC code through a complex encoding algorithm. It is well compatible with this complex encoding format and can simulate the encoding process of the LDPC code in an actual communication system, and is used to test the performance of the LDPC code under different channel conditions.
[0201] The electronic device provided by the embodiment of the present disclosure includes a processor, a memory, and a bus. The memory is used to store execution instructions, including internal memory and external memory; the internal memory here is also called internal memory, which is used to temporarily store the operation data in the processor and the data exchanged with the external memory such as the hard disk. The processor exchanges data with the external memory through the internal memory. When the electronic device is running, the processor and the memory communicate through the bus, so that the processor executes the following instructions:
[0202] Determine a corresponding encoding matrix based on the number of bits of the information to be encoded;
[0203] The information to be encoded is grouped to obtain a plurality of information groups to be encoded, and the encoding matrix is divided to obtain a plurality of sub-encoding matrices corresponding to the information groups to be encoded, so that any information group to be encoded has a corresponding sub-encoding matrix;
[0204] For each sub-coding matrix, performing a first operation on the sub-coding matrix and a corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix;
[0205] Performing a second operation on the first supervisory bits corresponding to all the sub-coding matrices corresponding to the information to be encoded to obtain a second supervisory bit corresponding to the information to be encoded;
[0206] The information to be encoded is combined with the corresponding second supervision bit to obtain a codeword that completes the encoding.
[0207] The embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the encoding method provided by any embodiment of the present disclosure is executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0208] Through the description of the above implementation methods, those skilled in the art can clearly understand that the embodiments of the present disclosure can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0209] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present disclosure.
[0210] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the present embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0211] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0212] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A coding method, characterized in that: include: Determine a corresponding encoding matrix based on the number of bits of the information to be encoded; The encoding matrix is generated according to the check matrix; Grouping the information to be encoded to obtain a plurality of information groups to be encoded, and dividing the encoding matrix to obtain a plurality of sub-encoding matrices corresponding to the information groups to be encoded, so that any of the information groups to be encoded has a corresponding sub-encoding matrix; For each sub-coding matrix, performing a first operation on the sub-coding matrix and the corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix; the first operation includes a multiplication and addition operation of a binary number; Performing a second operation on the first supervisory bits corresponding to all the sub-coding matrices corresponding to the information to be encoded to obtain a second supervisory bit corresponding to the information to be encoded; the second operation includes an exclusive OR operation; The information to be encoded is combined with the corresponding second supervision bit to obtain a codeword that completes the encoding.
2. The method according to claim 1, characterized in that The step of dividing the coding matrix to obtain a plurality of sub-coding matrices respectively corresponding to the information groups to be coded comprises: Dividing the coding matrix into sub-coding matrices corresponding to each information group to be coded according to columns; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be coded; The step of performing a first operation on the sub-coding matrix and the corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix includes: For each sub-coding matrix row, performing a first sub-operation of a first operation on non-zero data in the sub-coding matrix row and corresponding information elements in a corresponding information group to be encoded, to obtain valid data corresponding to the sub-coding matrix row; Performing a second sub-operation of the first operation on the valid data corresponding to the row of the sub-coding matrix to obtain a third supervision bit corresponding to the row of the sub-coding matrix; The third supervision bits corresponding to all the sub-coding matrix rows are combined according to the positions of the corresponding rows to obtain the first supervision bits corresponding to the sub-coding matrix.
3. The method according to claim 1, characterized in that The step of dividing the coding matrix to obtain a plurality of sub-coding matrices respectively corresponding to the information groups to be coded comprises: Dividing the coding matrix into sub-coding matrices corresponding to each information group to be coded according to columns; wherein the number of columns of the sub-coding matrix is the same as the number of information element bits in the information group to be coded; The step of performing a first operation on the sub-coding matrix and the corresponding information group to be encoded to obtain a first supervision bit corresponding to the sub-coding matrix includes: For each sub-coding matrix row, performing a first sub-operation of a first operation on non-zero data in the sub-coding matrix row and corresponding information elements in a corresponding information group to be encoded, to obtain valid data corresponding to the sub-coding matrix row; The valid data are grouped according to each group containing a first preset value of valid data to obtain sub-valid data groups; Determine a second sub-operation result of the first operation corresponding to the sub-valid data group, and perform the second sub-operation of the first operation on the second sub-operation results corresponding to all the sub-valid data groups to obtain a third supervision bit corresponding to the sub-coding matrix row; The third supervision bits corresponding to all the sub-coding matrix rows are combined according to the positions of the corresponding rows to obtain the first supervision bits corresponding to the sub-coding matrix.
4. The method according to claim 3, characterized in that The valid data are grouped according to each group containing a first preset number of valid data to obtain sub-valid data groups, including: If the number of valid data in the last valid sub-data group is less than the first preset value, the second preset value is added to the remaining position after the valid data in the valid sub-data group so that the last valid sub-data group contains the first preset value of data.
5. The method according to claim 3, characterized in that The determining the second sub-operation result of the first operation corresponding to the sub-valid data group includes: Determine the operation result of the second sub-operation corresponding to the data in the sub-valid data group based on the preset corresponding relationship; The preset corresponding relationship is a corresponding relationship between all possible data combinations of the first preset value of bits calculated and stored in advance and the operation results of performing the second sub-operation on them respectively.
6. The method according to claim 1, characterized in that The step of performing a second operation on the first supervisory bits corresponding to all the sub-coding matrices corresponding to the information to be encoded to obtain the second supervisory bits corresponding to the information to be encoded includes: Each time the first supervision bit corresponding to a sub-coding matrix is determined, the first supervision bit corresponding to the sub-coding matrix and the temporary supervision bit determined based on the first supervision bit corresponding to the sub-coding matrix before the sub-coding matrix are subjected to a second operation bit by bit to obtain a new temporary supervision bit; the first supervision bit corresponding to the last sub-coding matrix and the temporary supervision bit determined based on the sub-coding matrix before the last sub-coding matrix are subjected to a second operation bit by bit to determine a new temporary supervision bit, and the new temporary supervision bit is determined as the second supervision bit corresponding to the information to be encoded; or After determining the first parity bits corresponding to the sub-coding matrices, the second parity bits are sequentially subjected to a bit-by-bit second operation to obtain the second parity bits corresponding to the information to be encoded.
7. The method according to claim 1, characterized in that The step of grouping the information to be encoded to obtain a plurality of information groups to be encoded, and dividing the encoding matrix to obtain a plurality of sub-encoding matrices respectively corresponding to the information groups to be encoded includes: Grouping the information to be encoded based on the system parallelism so that the number of information element bits of each group in the information group to be encoded is consistent with the system parallelism; The coding matrix is divided into sub-coding matrices corresponding to each information group to be coded according to columns, so that the number of columns of the sub-coding matrix is consistent with the number of information element bits in the information group to be coded.
8. The method according to claim 1, characterized in that The first operation includes a first sub-operation of the first operation and a second sub-operation of the first operation; the first sub-operation of the first operation includes an AND operation; and the second sub-operation of the first operation includes an XOR operation.
9. The method according to claim 1, characterized in that Determining the corresponding coding matrix based on the number of bits of the information to be encoded includes: Determine a corresponding first generative formula based on the number of bits of the information to be encoded; Determine a coding matrix corresponding to the information to be encoded based on the first generated formula; The first generation formula is as follows: in, The upper triangular matrix representing the coded bit matrix of the check matrix, The lower triangular matrix representing the matrix of coded bits of the check matrix, The matrix of information bits to be encoded that represents the check matrix, Characterize the encoding matrix.
10. A coding device, characterized in that: include: A coding matrix generation module, used to determine a corresponding coding matrix based on the number of bits of information to be encoded; The encoding matrix is generated according to the check matrix; A coding matrix division module, used for grouping the information to be encoded to obtain a plurality of information groups to be encoded, and dividing the coding matrix to obtain a plurality of sub-coding matrices corresponding to the information groups to be encoded, so that any of the information groups to be encoded has a corresponding sub-coding matrix; A matrix operation module is used to perform a first operation on each sub-coding matrix and the corresponding information group to be encoded to obtain a first supervisory bit corresponding to the sub-coding matrix; perform a second operation on the first supervisory bits corresponding to all the sub-coding matrices corresponding to the information to be encoded to obtain a second supervisory bit corresponding to the information to be encoded; the first operation includes a multiplication and addition operation of binary numbers; the second operation includes an exclusive-OR operation; The codeword generation module is used to combine the information to be encoded with the corresponding second supervision bit to obtain a codeword for completing the encoding.
11. An electronic device, characterized in that: comprising an encoding device as claimed in claim 10; and / or, Execute the encoding method as claimed in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the encoding method according to any one of claims 1 to 9 is executed.
Citation Information
Patent Citations
Code rate-compatible 5G LDPC encoding method with low complexity, and encoder
CN109379086A