US-12621080-B2 - Encoding method and encoding apparatus based on systematic polar code
Abstract
The method includes: obtaining an input information bit sequence; determining a target matrix based on a first polar code generation matrix and a transformation matrix; encoding the input information bit sequence based on an inverse matrix of a first matrix, to obtain a first bit sequence, where the input information bit sequence is a bit sequence corresponding to an information bit, and the first matrix is a submatrix formed by a row, in the target matrix, corresponding to the information bit and a column, in the target matrix, corresponding to the information bit; and encoding the first bit sequence based on a second matrix, to obtain a second bit sequence, where the second matrix is a submatrix formed by the row, in the target matrix, corresponding to the information bit and a column, in the target matrix, corresponding to a frozen bit.
Inventors
- Jiaqi GU
- Jiahui Li
- Mengyao Ma
- Zihan TANG
- Wei Lin
Assignees
- HUAWEI TECHNOLOGIES CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20240816
- Priority Date
- 20220217
Claims (20)
- 1 . An encoding method based on a systematic polar code, comprising: obtaining, by at least one processor of an encoding apparatus, an input information bit sequence corresponding to information bits; computing, by the at least one processor a target matrix by multiplying a first polar code generation matrix by a transformation matrix, the transformation matrix being configured to perform sub-block column transformation of the first polar code generation matrix; forming, by the at least one processor, a first matrix as a sub-matrix of the target matrix consisting of rows corresponding to the information bits and columns corresponding to the information bits; computing, by the at least one processor, an inverse of the first matrix and multiplying an inverse matrix of the first matrix by the input information bit sequence, to obtain a first bit sequence; forming, by the at least one processor, a second matrix by selecting, from the target matrix, (i) the rows corresponding to the information bits and (ii) columns corresponding to frozen bits; encoding, by the at least one processor, the first bit sequence by multiplying the first bit sequence with the second matrix, to obtain a second bit sequence; and outputting, by the at least one processor, the second bit sequence as an encoded codeword for transmission over a communication channel.
- 2 . The method according to claim 1 , wherein the target matrix is P·G, where G is the first polar code generation matrix, P is the transformation matrix, the first matrix is (P·G) AA , and the second matrix is (P·G) AA C , where A represents the information bits, and A C represents the frozen bits.
- 3 . The method according to claim 2 , wherein the transformation matrix P is expressed as: P = [ ( G N / 2 ) permute · G N / 2 0 0 I ] , where G N/2 is a second polar code generation matrix, N/2 represents that the second polar code generation matrix is N/2×N/2-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, (G N/2 ) premute is a matrix obtained through first preset column transformation of G N/2 , 0 is a zero matrix of N/2×N/2, and I is a unit matrix of N/2×N/2.
- 4 . The method according to claim 2 , wherein the transformation matrix P is obtained by using a matrix S, P=G·S·G, G is the first polar code generation matrix, and the matrix S is expressed as: S = [ G N / 2 · ( G N / 2 ) permute 0 I - G N / 2 · ( G N / 2 ) permute I ] , where G N/2 is a second polar code generation matrix, N/2 represents that the second polar code generation matrix is N/2×N/2-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, (G N/2 ) permute is a matrix obtained through first preset column transformation of G N/2 , 0 is a zero matrix of N/2×N/2, and I is a unit matrix of N/2×N/2.
- 5 . The method according to claim 1 , wherein the target matrix is G·S, where G is the first polar code generation matrix, S is the transformation matrix, the first matrix is (G·S) AA , and the second matrix is (G·S) AA C , where A represents the information bits, and A C represents the frozen bits.
- 6 . The method according to claim 5 , wherein the transformation matrix S is expressed as: S = [ G N / 2 · ( G N / 2 ) permute 0 I - G N / 2 · ( G N / 2 ) permute I ] , where G N/2 is a second polar code generation matrix, N/2 represents that the second polar code generation matrix is N/2×N/2-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, (G N/2 ) premute is a matrix obtained through first preset column transformation of G N/2 , 0 is a zero matrix of N/2×N/2, and I is a unit matrix of N/2×N/2.
- 7 . The method according to claim 5 , wherein the transformation matrix S is obtained by using a matrix P, S=G·P·G, G is the first polar code generation matrix, and the matrix P is expressed as: P = [ ( G N / 2 ) premute · G N / 2 0 0 I ] , where G N/2 is a second polar code generation matrix, N/2 represents that the second polar code generation matrix is N/2×N/2-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, (G N/2 ) permute is a matrix obtained through first preset column transformation of G N/2 , 0 is a zero matrix of N/2×N/2, and I is a unit matrix of N/2×N/2.
- 8 . The method according to claim 1 , wherein the transformation matrix comprises a first transformation matrix and a second transformation matrix.
- 9 . The method according to claim 8 , wherein the target matrix is P 2 ·P 1 ·G, where G is the first polar code generation matrix, P 1 is the first transformation matrix, P 2 is the second transformation matrix, the first matrix is (P 2 ·P 1 ·G) AA , and the second matrix is (P 2 ·P 1 ·G) AA C , where A represents the information bits, and A C represents the frozen bits.
- 10 . The method according to claim 9 , wherein the first transformation matrix P 1 is expressed as: P 1 = [ A 0 0 B ] , where A = [ ( G N / 4 ) permute 1 · G N / 4 0 0 I ] , B = [ ( G N / 4 ) permute 2 · G N / 4 0 0 I ] , G N/4 is a third polar code generation matrix, N/4 represents that the third polar code generation matrix is N/4×N/4-dimensional, N represents that a first systematic polar code generation matrix is N×N-dimensional, (G N/4 ) premute1 is a matrix obtained through second preset column transformation of G N/4 , 0 is a zero matrix, I is a unit matrix of N/4×N/4, and (G N/4 ) premute2 is a matrix obtained through third preset column transformation of G N/4 .
- 11 . The method according to claim 10 , wherein the second transformation matrix P 2 is expressed as: P 2 = [ C 0 0 I ] , where C = [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] permute 3 · [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] - 1 , [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] permute 3 is a matrix obtained through fourth preset column transformation of [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] , G N/4 is the third polar code generation matrix, N/4 represents that the third polar code generation matrix is N/4×N/4-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, 0 is the zero matrix, and I is a unit matrix of N/2×N/2.
- 12 . The method according to claim 11 , wherein the first transformation matrix P 1 and the second transformation matrix P 2 are obtained by using a matrix S 1 and a matrix S 2 , P 1 ·P 2 =G·S 1 ·S 2 ·G, G is the first polar code generation matrix, and the matrix S 1 is expressed as: S 1 = [ D 0 I - D I ] , where D = [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] - 1 · [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] permute 3 , G N/4 is the third polar code generation matrix, N/4 represents that the third polar code generation matrix is N/4×N/4-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, (G N/4 ) premute1 is the matrix obtained through the second preset column transformation of G N/4 , [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] permute 3 is the matrix obtained through the fourth preset column transformation of [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] , 0 is the zero matrix, and I is a unit matrix; and the matrix S 2 is expressed as: S 2 = [ J 0 K M ] , where J = [ G N / A · ( G N / 4 ) permute 1 0 I - G N / 4 · ( G N / 4 ) permute 1 I ] , K = [ G N / A · ( G N / 4 ) permute 2 - G N / 4 · ( G N / 4 ) permute 1 0 G N / A · ( G N / 4 ) permute 1 - G N / 4 · ( G N / 4 ) permute 2 0 ] , M = [ G N / A · ( G N / 4 ) permute 2 0 I - G N / 4 · ( G N / 4 ) permute 2 I ] , and (G N/4 ) permute2 is the matrix obtained through the third preset column transformation of G N/4 .
- 13 . The method according to claim 8 , wherein the target matrix is G·S 2 ·S 1 , where G is the first polar code generation matrix, S 1 is the first transformation matrix, S 2 is the second transformation matrix, the first matrix is (G·S 2 ·S 1 ) AA , and the second matrix is (G·S 2 ·S 1 ) AA C , where A represents the information bits, and A C represents the frozen bits.
- 14 . The method according to claim 13 , wherein the first transformation matrix S 1 is expressed as: S 1 = [ D 0 I - D I ] , where D = [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] - 1 · [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] permute 3 , G N/4 is a third polar code generation matrix, N/4 represents that the third polar code generation matrix is N/4×N/4-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, (G N/4 ) premute1 is a matrix obtained through second preset column transformation of G N/4 , [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] permute 3 is a matrix obtained through fourth preset column transformation of [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] , 0 is a zero matrix, and I is a unit matrix of N/2×N/2.
- 15 . The method according to claim 14 , wherein the second transformation matrix S 2 is expressed as: S 2 = [ J 0 K M ] , where J = [ G N / A · ( G N / 4 ) permute 1 0 I - G N / 4 · ( G N / 4 ) permute 1 I ] , K = [ G N / A · ( G N / 4 ) permute 2 - G N / 4 · ( G N / 4 ) permute 1 0 G N / A · ( G N / 4 ) permute 1 - G N / 4 · ( G N / 4 ) permute 2 0 ] , M = [ G N / A · ( G N / 4 ) permute 2 0 I - G N / 4 · ( G N / 4 ) permute 2 I ] , G N/4 is the third polar code generation matrix, N/4 represents that a third systematic polar code generation matrix is N/4×N/4-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, (G N/4 ) permute1 is the matrix obtained through the second preset column transformation of G N/4 , (G N/4 ) permute2 is a matrix obtained through third preset column transformation of G N/4 , 0 is the zero matrix, and I is a unit matrix of N/4×N/4.
- 16 . The method according to claim 11 , wherein the first transformation matrix S 1 and the second transformation matrix S 2 are obtained by using a matrix P 1 and a matrix P 2 , S 1 ·S 2 =G·P 1 ·P 2 ·G, where G is the first polar code generation matrix, and the matrix P 1 is expressed as: P 1 = [ A 0 0 B ] , where A = [ ( G N / 4 ) permute 1 · G N / 4 0 0 I ] , B = [ ( G N / 4 ) permute 2 · G N / 4 0 0 I ] , G N/4 is the third polar code generation matrix, N/4 represents that the third polar code generation matrix is N/4×N/4-dimensional, N represents that the first polar code generation matrix is N×N-dimensional, (G N/4 ) permute1 is the matrix obtained through the second preset column transformation of G N/4 , (G N/4 ) permute2 is the matrix obtained through the third preset column transformation of G N/4 , 0 is the zero matrix, and I is a unit matrix; and the matrix P 2 is expressed as: P 2 = [ C 0 0 I ] , where C = [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] permute 3 · [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] - 1 , and [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] permute 3 is the matrix obtained through the fourth preset column transformation of [ ( G N / 4 ) permute 1 0 G N / 4 G N / 4 ] .
- 17 . The method according to claim 1 , wherein the target matrix is T·G, where G is the first polar code generation matrix, T is the transformation matrix and is an upper triangular matrix, the first matrix is (T·G) AA , and the second matrix is (T·G) AA C , where A represents the information bits, and A C represents the frozen bits.
- 18 . An encoding apparatus based on a systematic polar code, comprising at least one processor and a memory storing instructions that, when executed by the at least one processor, cause the encoding apparatus to perform operations comprising: obtaining an input information bit sequence corresponding to information bits; computing a target matrix by multiplying a first polar code generation matrix by a transformation matrix, the transformation matrix being configured to perform sub-block column transformation of the first polar code generation matrix; and forming a first matrix as a sub-matrix of the target matrix consisting of rows corresponding to the information bits and columns corresponding to the information bits; computing an inverse of the first matrix and multiplying an inverse matrix of the first matrix by the input information bit sequence, to obtain a first bit sequence; forming a second matrix by selecting, from the target matrix, (i) the rows corresponding to the information bits and (ii) columns corresponding to frozen bits; and encoding the first bit sequence by multiplying the first bit sequence with the second matrix, to obtain a second bit sequence.
- 19 . The encoding apparatus according to claim 18 , wherein the target matrix is P·G, where G is the first polar code generation matrix, P is the transformation matrix, the first matrix is (P·G) AA , and the second matrix is (P·G) AA C , where A represents the information bits, and A C represents the frozen bits.
- 20 . The encoding apparatus according to claim 18 , wherein the target matrix is G·S, where G is the first polar code generation matrix, S is the transformation matrix, the first matrix is (G·S) AA , and the second matrix is (G·S) AA C , where A represents the information bits, and A C represents the frozen bits.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of International Application No. PCT/CN2023/072379, filed on Jan. 16, 2023, which claims priority to Chinese Patent Application No. 202210147920.0, filed on Feb. 17, 2022. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD This application relates to the field of data encoding technologies, and in particular, to an encoding method and an encoding apparatus based on a systematic polar code. BACKGROUND Polar codes may be classified into a systematic polar code and a non-systematic polar code. The systematic polar code has better bit error performance than the non-systematic polar code. Therefore, in a communication system, channel encoding is usually performed by using the systematic polar code, to improve reliability of data transmission and ensure communication quality. However, when a length of an encoded bit sequence is small, if channel encoding is performed by using the systematic polar code, a code distance of obtained codewords is short, and performance of a code spectrum is poor. Therefore, an encoding method based on a systematic polar code is urgently needed to improve performance of a code spectrum. SUMMARY This application provides an encoding method and an encoding apparatus based on a systematic polar code, to reduce a quantity of codewords with a minimum code distance and improve performance of a code spectrum. According to a first aspect, an encoding method based on a systematic polar code is provided. The method includes: obtaining an input information bit sequence; determining a target matrix based on a first polar code generation matrix and a transformation matrix; encoding the input information bit sequence based on an inverse matrix of a first matrix, to obtain a first bit sequence, where the input information bit sequence is a bit sequence corresponding to an information bit, and the first matrix is a submatrix formed by a row corresponding to the information bit and a column corresponding to the information bit that are in the target matrix; and encoding the first bit sequence based on a second matrix, to obtain a second bit sequence, where the second matrix is a submatrix formed by the row corresponding to the information bit and a column corresponding to a frozen bit that are in the target matrix, where the transformation matrix may achieve an effect of performing sub-block column transformation on the first polar code generation matrix. The first polar code generation matrix is a polar code generation matrix in the conventional technology. A dimension of the first polar code generation matrix is not limited in this application. The sub-block column transformation may be understood as that column transformation is performed on a submatrix. To be specific, column transformation may be performed on a submatrix of the first polar code generation matrix by using the transformation matrix, to obtain a polar code generation matrix that is based on the sub-block column transformation. A sending device may perform encoding by using the polar code generation matrix that is based on the sub-block column transformation. The sending device may determine the target matrix based on the first polar code generation matrix and the transformation matrix. The sending device may determine the target matrix in a plurality of implementations. In a possible implementation, the target matrix is a result of multiplying the first polar code generation matrix by the transformation matrix. In another possible implementation, the target matrix is a result of multiplying the transformation matrix by the first polar code generation matrix. After determining the target matrix, the sending device may form the submatrix by using the row corresponding to the information bit and the column corresponding to the information bit that are in the target matrix, to obtain the first matrix, and encode the input information bit sequence based on the inverse matrix of the first matrix, to obtain the first bit sequence. After determining the target matrix, the sending device may form the submatrix by using the row corresponding to the information bit and the column corresponding to the frozen bit, to obtain the second matrix, and encode the first bit sequence based on the second matrix, to obtain the second bit sequence. Optionally, the input information bit sequence may be Bernoulli distribution whose distribution probability is P. When sending the second bit sequence xAC to a receiving device, the sending device may further send the distribution probability P of the Bernoulli distribution to the receiving device. The receiving device may decode the second bit sequence xAC based on the received distribution probability P of the Bernoulli distribution. In the encoding method based on a systematic polar code provided in this application, column transformation is performed on the subm