Polar Code Encoding Method and Apparatus
20200083908 ยท 2020-03-12
Inventors
- Gongzheng Zhang (Hangzhou, CN)
- Huazi Zhang (Hangzhou, CN)
- Rong Li (Hangzhou, CN)
- Lingchen Huang (Hangzhou, CN)
- Yunfei Qiao (Hangzhou, CN)
Cpc classification
H03M13/612
ELECTRICITY
H04L1/00
ELECTRICITY
H03M13/033
ELECTRICITY
International classification
H03M13/00
ELECTRICITY
Abstract
This application provides a polar code encoding method and apparatus. The method includes: obtaining, by a sending device, a sequence corresponding to a required mother code length; obtaining, by the sending device, a to-be-encoded bit; and performing, by the sending device, polar code encoding on the to-be-encoded bit by using the sequence corresponding to the required mother code length, to obtain an encoded bit, where the sequence is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length.
Claims
1. A method, comprising: obtaining, by a device, a first sequence corresponding to a required mother code length, wherein the first sequence is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length; obtaining, by the device, a to-be-encoded bit; and performing, by the device, polar code encoding on the to-be-encoded bit using the first sequence, to obtain an encoded bit.
2. The method according to claim 1, wherein: the basic sequence comprises a second sequence whose length is N, the first sequence has a length of 2N and is obtained by sorting reliability values of the second sequence and reliability values of a third sequence in ascending order, sequence numbers of N polarized channels in the second sequence are arranged in a predetermined order, and the predetermined order is different from an order of polarization weights of the N polarized channels; reliability values of the N polarized channels in the second sequence arranged in the predetermined order respectively correspond to polarization weight values of the N polarized channels that are arranged in ascending order, and indexes of polarized channels of the N polarized channels corresponding to the second sequence are 0, . . . , and N1; and reliability values of N polarized channels arranged in the predetermined order in the third sequence are obtained by adding a first difference to a respective polarization weight value of each polarized channel in the second sequence, and indexes of polarized channels of the N polarized channels corresponding to the third sequence are N, . . . , and 2N1.
3. The method according to claim 2, wherein a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j, and the first difference is W.sub.n=.sup.n; or a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.j).sup.j, and the first difference is W.sub.n=(.sub.n).sup.n; or a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*+b).sup., and the first difference is W.sub.n=(2.sup.n*+b).sup.; or a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*.sup.
4. The method according to claim 1, wherein: the basic sequence comprises a second sequence whose length is N and a third sequence whose length is N, the second sequence and the third sequence are different sequences, the first sequence has a length of 2N and is obtained by sorting reliability values of the second sequence and reliability values of the third sequence in ascending order, sequence numbers of N polarized channels in the second sequence are arranged in a first order, sequence numbers of N polarized channels in the third sequence are arranged in a second order, and the first order is different from the second order; reliability values of the N polarized channels arranged in the first order in the second sequence respectively correspond to polarization weight values of the N polarized channels that are arranged in ascending order, and indexes of polarized channels of the N polarized channels corresponding to the second sequence are 0, . . . , and N1; and reliability values of the N polarized channels arranged in the second order in the third sequence are obtained by adding a second difference to a polarization weight value of each polarized channel in the third sequence, and indexes of polarized channels of the N polarized channels corresponding to the third sequence are N, . . . , and 2N1.
5. The method according to claim 1, wherein the basic sequence comprises a second sequence whose length is N and a third sequence whose length is N, and the first sequence has a length 2N and is obtained by sorting polarization weight values of the second sequence and polarization weight values of the third sequence in ascending order; indexes of polarized channels corresponding to the second sequence are 0, . . . , and N1, and index numbers of polarized channels corresponding to the third sequence are N, . . . , and 2N1; and a polarization weight calculation manner of the second sequence is different from a polarization weight calculation manner of the third sequence.
6. An apparatus, comprising: a processor; and a non-transitory computer-readable storage medium storing a program to be executed by the processor, the program including instructions for: obtaining a first sequence corresponding to a required mother code length and a to-be-encoded bit, wherein the first sequence is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length; and performing polar code encoding on the to-be-encoded bit using the first sequence corresponding to the required mother code length, to obtain an encoded bit.
7. The apparatus according to claim 6, wherein: the basic sequence comprises a second sequence whose length is N, the first sequence has a length 2N and is obtained by sorting reliability values of the second sequence and reliability values of a third sequence in ascending order, sequence numbers of N polarized channels in the second sequence are arranged in a predetermined order, and the predetermined order is different from an order of polarization weights of the N polarized channels; reliability values of the N polarized channels in the second sequence arranged in the predetermined order respectively correspond to polarization weight values of the N polarized channels that are arranged in ascending order, and indexes of polarized channels of the N polarized channels corresponding to the first sequence are 0, . . . , and N1; and reliability values of N polarized channels arranged in the predetermined order in the third sequence are obtained by adding a first difference to a respective polarization weight value of each polarized channel in the second sequence, and indexes of polarized channels of the N polarized channels corresponding to the second sequence are N, . . . , and 2N1.
8. The apparatus according to claim 7, wherein: a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j, and the first difference is W.sub.n=.sup.n; or a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.j).sup.j, and the first difference is W.sub.n=(.sub.n).sup.n; or a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*+b).sup., and the first difference is W.sub.n=(2.sup.n*+b).sup.; or a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*.sup.
9. The apparatus according to claim 6, wherein the basic sequence comprises a second sequence whose length is N and a third sequence whose length is N, the second sequence and the third sequence are different sequences, the first sequence has a length 2N and is obtained by sorting reliability values of the second sequence and reliability values of the third sequence in ascending order, sequence numbers of N polarized channels in the second sequence are arranged in a first order, sequence numbers of N polarized channels in the third sequence are arranged in a second order, and the first order is different from the second order; reliability values of the N polarized channels arranged in the first order in the second sequence respectively correspond to polarization weight values of the N polarized channels that are arranged in ascending order, and indexes of polarized channels of the N polarized channels corresponding to the second sequence are 0, . . . , and N1; and reliability values of the N polarized channels arranged in the second order in the third sequence are obtained by adding a second difference to a polarization weight value of each polarized channel in the third sequence, and indexes of polarized channels of the N polarized channels corresponding to the third sequence are N, . . . , and 2N1.
10. The apparatus according to claim 6, wherein the basic sequence comprises a second sequence whose length is N and a third sequence whose length is N, and the first sequence has a length 2N and is obtained by sorting polarization weight values of the second sequence and polarization weight values of the third sequence in ascending order, indexes of polarized channels corresponding to the second sequence are 0, . . . , and N1, and index numbers of polarized channels corresponding to the third sequence are N, . . . , and 2N1; and a polarization weight calculation manner of the second sequence is different from a polarization weight calculation manner of the third sequence.
11. A method, comprising: obtaining, by a device, a first sequence corresponding to a required mother code length, wherein the first sequence is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length; obtaining, by the device, a to-be-decoded bit; and decoding, by the device, the to-be-decoded bit using the first sequence corresponding to the required mother code length, to obtain a decoded bit.
12. The method according to claim 11, wherein: the basic sequence comprises a second sequence whose length is N, the first sequence has a length 2N and is obtained by sorting reliability values of the second sequence and reliability values of a third sequence in ascending order, sequence numbers of N polarized channels in the second sequence are arranged in a predetermined order, and the predetermined order is different from an order of polarization weights of the N polarized channels; reliability values of the N polarized channels in the second sequence arranged in the predetermined order respectively correspond to polarization weight values of the N polarized channels that are arranged in ascending order, and indexes of polarized channels of the N polarized channels corresponding to the first sequence are 0, . . . , and N1; and reliability values of N polarized channels arranged in the predetermined order in the third sequence are obtained by adding a first difference to a respective polarization weight value of each polarized channel in the second sequence, and indexes of polarized channels of the N polarized channels corresponding to the third sequence are N, . . . , and 2N1.
13. The method according to claim 12, wherein a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j, and the first difference is W.sub.n=.sup.n; wherein i is an index of a polarized channel, i is an integer greater than or equal to 0 and less than N, iB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n1}, n=log.sub.2(N), and are fixed values whose value ranges are [0, 2], and are fixed values whose value ranges satisfy [0,2], b is a fixed value whose value range is [1, 1], and a is a fixed value whose value range is [1, 1].
14. The method according to claim 12, wherein a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.j).sup.j, and the first difference is W.sub.n=(.sub.n).sup.n; wherein i is an index of a polarized channel, i is an integer greater than or equal to 0 and less than N, iB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n1}, n=log.sub.2(N), and are fixed values whose value ranges are [0, 2], and are fixed values whose value ranges satisfy [0,2], b is a fixed value whose value range is [1, 1], and a is a fixed value whose value range is [1, 1].
15. The method according to claim 12, wherein a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*+b).sup., and the first difference is W.sub.n=(2.sup.n*+b).sup.; wherein i is an index of a polarized channel, i is an integer greater than or equal to 0 and less than N, iB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n1}, n=log.sub.2(N), and are fixed values whose value ranges are [0, 2], and are fixed values whose value ranges satisfy [0,2], b is a fixed value whose value range is [1, 1], and a is a fixed value whose value range is [1, 1].
16. The method according to claim 12, wherein a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*.sup.
17. The method according to claim 12, wherein a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.j+a*.sup.j), and the first difference is W.sub.n=().sup.n+a*().sup.n; wherein i is an index of a polarized channel, i is an integer greater than or equal to 0 and less than N, iB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n1}, n=log.sub.2(N), and are fixed values whose value ranges are [0, 2], and are fixed values whose value ranges satisfy [0,2], b is a fixed value whose value range is [1, 1], and a is a fixed value whose value range is [1, 1].
18. The method according to claim 12, wherein a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*((.sub.j).sup.j+a.sub.j*(.sub.j).sup.j), and the first difference is W.sub.n=(.sup.n).sup.n+a.sub.n*(.sub.n).sup.n; wherein i is an index of a polarized channel, i is an integer greater than or equal to 0 and less than N, iB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n1}, n=log.sub.2(N), and are fixed values whose value ranges are [0, 2], and are fixed values whose value ranges satisfy [0,2], b is a fixed value whose value range is [1, 1], and a is a fixed value whose value range is [1, 1].
19. The method according to claim 11, wherein: the basic sequence comprises a second sequence whose length is N and a third sequence whose length is N, the second sequence and the third sequence are different sequences, the first sequence has a length 2N and is obtained by sorting reliability values of the second sequence and reliability values of the third sequence in ascending order, sequence numbers of N polarized channels in the second sequence are arranged in a first order, sequence numbers of N polarized channels in the third sequence are arranged in a second order, and the first order is different from the second order; reliability values of the N polarized channels arranged in the first order in the second sequence respectively correspond to polarization weight values of the N polarized channels that are arranged in ascending order, and indexes of polarized channels of the N polarized channels corresponding to the second sequence are 0, . . . , and N1; and reliability values of the N polarized channels arranged in the second order in the third sequence are obtained by adding a second difference to a respective polarization weight value of each polarized channel in the third sequence, and indexes of polarized channels of the N polarized channels corresponding to the third sequence are N, . . . , and 2N1.
20. The method according to claim 11, wherein: the basic sequence comprises a second sequence whose length is N and a third sequence whose length is N, and the first sequence has a length 2N and is obtained by sorting polarization weight values of the second sequence and polarization weight values of the third sequence in ascending order; indexes of polarized channels corresponding to the second sequence are 0, . . . , and N1, and indexes of polarized channels corresponding to the third sequence are N, . . . , and 2N1; and a polarization weight calculation manner of the second sequence is different from a polarization weight calculation manner of the third sequence.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS
[0095] The following describes technical solutions of this application with reference to accompanying drawings.
[0096]
[0097] A wireless communications system mentioned in the embodiments of this application includes but is not limited to: a narrowband Internet of things (NB-IoT) system; a long term evolution (LTE) system; three major application scenarios of a next-generation 5G mobile communications system, namely, enhanced mobile broadband (eMBB), ultra-reliable and low latency communications (URLLC), and enhanced massive machine connection communication (eMTC); or a new communications system that may appear in future.
[0098] A terminal device in the embodiments of this application may include various handheld devices, in-vehicle devices, wearable devices, and computing devices that have a wireless communication function or other processing devices connected to a wireless modem. The terminal may be a mobile station (MS), a subscriber unit, a cellular phone, a smartphone, a wireless data card, a personal digital assistant (PDA) computer, a tablet computer, a wireless modem, a handheld device (handset), a laptop computer, a machine type communication (MTC) terminal, or the like.
[0099] In
[0100]
[0101] Channel encoding and decoding is one of core technologies in the wireless communications field, and a performance improvement of the channel encoding and decoding can directly improve network coverage and a user transmission rate. Currently, a polar code is a channel encoding technology that can be theoretically proved to achieve a Shannon limit and that has a practical encoding and decoding capability with linear complexity. The construction core of the polar code is processing of channel polarization. On an encoding side, different reliabilities are presented for sub-channels by using an encoding method. When a code length is continuously increased, some channels tend towards noiseless channels whose capacity is close to 1, and the other channels tend towards pure noisy channels whose capacity is close to 0. A channel whose capacity is close to 1 is selected to directly transmit information, to approach the channel capacity.
[0102] A feature of this phenomenon is exactly applied to an encoding policy of the polar code, a noiseless channel is used to transmit information useful for a user, and a pure noisy channel is used to transmit agreed information or does not transmit information. The polar code is also a linear block code, an encoding matrix (also referred to as a generator matrix) of the polar code is F.sub.N, and an encoding process is x.sub.1.sup.N=.sub.1.sup.N.Math.F.sub.N, where .sub.1.sup.N=(.sub.1, .sub.2, . . . , .sub.N) is a binary row vector having a length of N (namely, a code length), N=2.sup.n, and n is a positive integer. F.sub.N is an NN matrix, and F.sub.N=F.sub.2.sup..Math.(log.sup.
The addition and multiplication operations in the foregoing formulas are all addition and multiplication operations in the binary Galois field.
[0103] In the encoding process of the polar code, some bits in u.sub.1.sup.N are used to carry information, and are referred to as an information bit set. A set of indexes of the bits is denoted by A. The other bits are set to fixed values pre-agreed on by the receive end and the transmit end, and are referred to as a fixed bit set or a frozen bit set (frozen bits). A set of indexes of the bits is represented by using a complementary set A.sup.C of A. The encoding process of the polar code is equivalent to x.sub.1.sup.N=.sub.AF.sub.N(A).sub.A.sub.
[0104] A construction process of the polar code is a selection process of the set A, and determines performance of the polar code. The construction process of the polar code is usually: determining, based on a mother code length N, that there are N polarized channels in total that respectively correspond to N rows of the encoding matrix, calculating reliabilities of the polarized channels, using sequence numbers (or indexes) of the first K polarized channels having higher reliabilities as elements in the set A, and using sequence numbers corresponding to the remaining (N-K) polarized channels as elements in the set A.sup.C of sequence numbers of the fixed bits. The set A determines locations of the information bits, and the set A.sup.C determines locations of the fixed bits.
[0105] A polar code encoding method provided in the embodiments of this application is below described in detail.
[0106] First, a basic processing procedure of polar code encoding is described.
[0107]
[0108] The reliability of the polarized channel may be measured by using a plurality of parameters. The parameter is, for example, an error probability, a channel capacity, or a polarization weight, or may be another parameter capable of measuring the reliability of the polarized channel.
[0109] A method for constructing, based on a polarization weight calculation formula, a sequence corresponding to a mother code length according to an embodiment of this application is described below. As a metric of a reliability of a sub-channel, a polarization weight is irrelevant to a channel. To be specific, a PW value of any polarized channel is unique. An original polarization weight calculation formula is W.sub.i=.sub.j=0.sup.n-1B.sub.j*.sup.j, where i=B.sub.n-1B.sub.n-2 . . . B.sub.0, and B.sub.j is a binary representation item of i. In an example, =2. Sorting polarized channels based on the PWs has the following characteristics: A sequence required by any mother code may be uniquely and directly generated based on an order of the PW values (an order of all the polarized channels), and different mother code sequences generated based on polarization weight values are nested. The nested means that a short code sequence is included in a long code sequence, the long code sequence may be obtained by using the short code sequence, and the short code sequence may be obtained by using the long code sequence.
[0110] The polarization weight calculation formula is also referred to as a PW formula. Three types of formulas that are described respectively correspond to three PW formulas. The three PW formulas are respectively that there is only an .sup.j item, a constant item is included, and another power item is included.
[0111] A first-type formula is an original PW formula, has the simplest form, and correspondingly requires the fewest parameters. A second-type formula and a third-type formula separately increase accuracy of a calculated polarized channel reliability by adding a constant item and another item, thereby improving decoding performance of the polar code.
[0112] A first variation form of each type of formula means that a parameter of the type of formula is related to only a quantity of bits of a current operation, namely, j, to be specific, a level of a polar code polarization process, to represent a difference between polarization effects of various levels, thereby improving the accuracy of the calculated polarized channel reliability.
[0113] Parameters in a second variation form of each type of formula are related to a level of the parameter, and also related to a segment, namely, B.sub.n-1, B.sub.n-2, . . . , B.sub.j+1 of the level, to represent a case in which orders in different segments of the level are inconsistent, thereby further improving the accuracy of the calculated polarized channel reliability.
[0114] The first-type PW formula:
[0115] a basic form: W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j
[0116] a variation form 1: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.j).sup.j
[0117] a variation form 2: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0118] a variation form 3: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0119] is a fixed value whose value range is [0, 2].
[0120] The second-type PW formula:
[0121] a basic form: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*+b).sup.
[0122] a variation form 1: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*.sup.
where
[0123] and are fixed values whose value ranges satisfy [0,2], and b is a fixed value whose value range is [1, 1].
[0124] The third-type PW formula:
[0125] a basic form: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sup.j+a*.sup.j)
[0126] a variation form 1: W.sub.i=.sub.j=0.sup.n-1B.sub.j*((.sub.j).sup.j+a.sub.j*(.sub.j).sup.j)
[0127] a variation form 2: W.sub.i=.sub.j=0.sup.n-1B.sub.j*((.sub.B.sub.
[0128] a variation form 3: W.sub.i=.sub.j=0.sup.n-1B.sub.j*((.sub.B.sub.
[0129] and are fixed values whose value ranges are [0, 2], and a is a fixed value whose value range is [1, 1].
[0130] In the foregoing various types of formulas, i is an index of the polarized channel, i is an integer greater than or equal to 0 and less than N, iB.sub.n-1 B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n1}, n=log.sub.2(N), and N is a mother code length.
[0131] A polar code encoding method and a polar code decoding method provided in the embodiments of this application are described below.
[0132]
[0133] 110: A sending device obtains a sequence corresponding to a required mother code length, where the sequence is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length.
[0134] In this embodiment of this application, the sequence corresponding to the required mother code length may be generated based on the basic sequence, and the length of the basic sequence is less than the mother code length. Assuming that a length of a sequence corresponding to a required mother code length during polar code encoding is equal to N.sub.o, if a basic sequence whose length is less than N.sub.o is known, the sequence corresponding to the required mother code length may be obtained by using the basic sequence.
[0135] Any short basic sequence is extended to a long sequence according to a cross sorting rule that is of two segments of polarized channels and that is generated based on PWs. It is assumed that the sequence corresponding to the required mother code length is divided into an upper half segment and a lower half segment. Any basic sequence is used as the upper half segment, after PW values for a same code length are sorted, the PW values are given to the polarized channels of the basic sequence that are sorted according to a same rule. To be specific, a reliability metric value is obtained for each polarized channel, and each PW value plus a PW difference is given to the lower half segment of polarized channels. The polarized channels are sorted based on the obtained reliability metric values, to obtain the sequence corresponding to the required mother code length. A parameter P in PW calculation is not necessarily unique, and may be related to a location of each polarized channel.
[0136] 120: The sending device obtains a to-be-encoded bit.
[0137] 130: The sending device performs polar code encoding on the to-be-encoded bit by using the sequence corresponding to the required mother code length, to obtain an encoded bit.
[0138] After obtaining the sequence corresponding to the required mother code length, the sending device determines an information bit index set based on the sequence corresponding to the required mother code length, and then performs the polar code encoding on the to-be-encoded bit based on the information bit index set, to obtain the encoded bit.
[0139] The information bit index set is selected, to be specific indexes of the first K polarized channels having the highest reliabilities are selected from indexes of N.sub.o polarized channels included in the sequence corresponding to the required mother code length, as locations for placing information bits during the polar code encoding. A process of selecting the information bit index set may be the same as that in the prior art.
[0140] The encoded bit is sent to a receiving device. The polar code decoding method 200 performed by the receiving device is shown in 4.
[0141] 210: Obtain a sequence corresponding to a required mother code length, where the sequence corresponding to the required mother code length is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length.
[0142] 220: Obtain a to-be-decoded bit.
[0143] 230: Decode the to-be-decoded bit by using the sequence corresponding to the required mother code length, to obtain a decoded bit.
[0144] Manners of obtaining the sequence corresponding to the required mother code length by the sending device and the receiving device are the same. Uniform descriptions are provided below.
[0145] It is assumed that the required mother code length is equal to N.sub.o. To be specific, the sequence corresponding to the required mother code length includes indexes (also referred to as sequence numbers) of N.sub.o polarized channels. The No indexes and the N.sub.o polarized channels are in a one-to-one correspondence. The N.sub.o indexes in the sequence are sorted based on reliabilities of the N.sub.o polarized channels. Without loss of generality, the sequence may be arranged in ascending order of the reliabilities of the N.sub.o polarized channels, or may be arranged in descending order of the reliabilities of the N.sub.o polarized channels.
[0146] There are the following three manners for generating, based on the basic sequence, the sequence corresponding to the required mother code length, to be specific, extending a short code to a long code.
[0147] Manner 1: Extension Based on PW Values
[0148] For any basic sequence {Q.sub.1, Q.sub.2, . . . , Q.sub.N} arranged in ascending order of reliabilities. PW values for a same code length are successively given, in ascending order of the PW values {W.sub.S.sub.
Rel(Q.sub.i)=W.sub.S.sub.
[0149] A length of the sequence corresponding to the required mother code length is 2N, and the reliability value of each polarized channel of the basic sequence plus a PW difference W.sub.n is used as a reliability of a polarized channel in the lower half segment corresponding to the sequence corresponding to the required mother code length, to be specific,
Rel(Q.sub.i+N)=W.sub.S.sub.
[0150] The sequence corresponding to the required mother code length is obtained by sorting the reliability values in ascending order.
[0151] Manner 2: Extension Based on an Indication Sequence
[0152] The cross rule of the upper and lower segments when a short code is extended to a long code may be obtained based on the PW values or the sorting, and an extension rule may be represented by using an indication sequence. Therefore, the basic sequence is extended to a long sequence based on a predetermined indication sequence.
[0153] The indication sequence may be obtained in a PW value extension manner. The PW values of the sequence whose length is 2N are calculated and sorted, and the cross rule of the upper and lower half segments of N polarized channels is obtained based on the PW values. For example, the indication sequence is:
bitVec={0,0,0,1, . . . ,0,1,1,1}
[0154] 0 indicates that a polarized channel herein belongs to the upper half segment, namely, 0 to N1; and 1 indicates that a polarized channel herein is in the lower half segment, namely, N to 2N1.
[0155] Based on the given indication sequence, based on the order in the basic sequence, a location of 0 in bitVec is replaced with a sorting number in the upper half segment, to be specific, a sequence number of a polarized channel in the basic sequence; and a location of 1 is replaced with a sorting number in the lower half segment, to be specific, N plus a sequence number of a polarized channel in the basic sequence. An obtained sequence is the extended sequence.
[0156] The indication sequence may be obtained by using a sequence obtained through extension in manner 1. For example, sorting obtained based on the PW values of the sequence whose length is 2N (16) includes N (8) polarized channels in the upper half segment and the lower half segment, and a cross order thereof is represented as an indication sequence, to obtain an indication sequence shown in Table 1, where W.sub.4=2{circumflex over ()}()=1.681793.
TABLE-US-00001 TABLE 1 Segment number 0 0 0 0 0 0 0 0 PW8 0 1 1.189207 1.414214 2.189207 2.414214 2.603421 3.603421 Segment number 1 1 1 1 1 1 1 1 PW8 + 1.681793 2.681793 2.871 3.096006 3.871 4.096006 4.285214 5.285214 W.sub.4
[0157] After sorting is performed based on the PW values, an obtained indication sequence is:
bitVec=[0000100011101111]
[0158] It is assumed that respective orders in the upper and lower half segments are as follows:
Seq8_0=[01234567] and
Seq8_1=[01243567]+8
[0159] During extension, only 0 in the indication sequence needs to be successively replaced with a sequence number of a sorting number in the upper half segment, and 1 is replaced with a sequence number of a sorting number in the lower half segment, to obtain an extended sequence:
Seq16=[0123845691012711131415]
[0160] The indication sequence corresponding to the required mother code length may be pre-stored, and during extension, the extension is performed based on the indication sequence. Alternatively, the indication sequence may be calculated online.
[0161] In Manner 1 and Manner 2, the sequence corresponding to the required mother code length may be obtained by performing extension once. However, if a long code sequence is at least twice longer than a short code sequence, the sequence corresponding to the required mother code length may be obtained by performing the same extension twice or a plurality of times. For example, if a length of the basic sequence is 16, to obtain a sequence whose length is 64, the basic sequence may be extended once to obtain a sequence whose length is 32, and then the sequence whose length is 32 is extended to a sequence whose length is 64.
[0162] Manner 3: Multi-Level Extension
[0163] The sequence corresponding to the required mother code length may be obtained in a multi-level extension manner.
[0164] It is assumed that the obtained sequence whose length is 2N is generated by using a first sequence whose length is N and a second sequence whose length is N. Polarized channels in the first sequence and the second sequence may be sorted in ascending order of reliability values of the corresponding polarized channels. The basic sequence may be a sequence, and the sequence corresponding to the required mother code length is obtained in a symmetric extension manner by using the basic sequence. For example, the basic sequence is a first sequence whose length is N, the sequence that corresponds to the required mother code length and whose length is 2N is a sequence whose length is 2N and that is obtained by sorting reliability values of the first sequence and reliability values of a second sequence in ascending order. The basic sequence may be a PW sequence, or may be a sequence obtained by using another method.
[0165] In an implementation, the first sequence may be a PW sequence, to be specific, a sequence obtained through PW value sorting.
[0166] For example, a polar code whose length is 2N is divided into an upper sub-code and a lower sub-code, each sub-code has its internal sorting, and a difference between PW values of the two sub-codes indicates a mutual cross-relationship of polarized channel sorted in the two sub-codes. For example, it is assumed that a polarization weight of the upper sub-code is
where i=0,1, . . . , N1; a polarization weight of the lower sub-code is
where i=N, N+1, . . . , 2N1; and a difference is
where n=log.sub.2(N). For example, if N=8, n=3.
[0167] The basic sequence is a PW sequence, and a reliability value of each polarized channel is a PW value of the polarized channel. For example, an order in a basic sequence whose code length is 8 is: Seq8=[0 1 2 4 3 5 6 7], and corresponding PW values are shown in Table 2.
TABLE-US-00002 TABLE 2 PW value 0 1 1.189207 1.414214 2.189207 2.414214 2.603421 3.603421 Polarized channel 0 1 2 4 3 5 6 7 sequence number
[0168] During extension, a corresponding PW value plus a difference W.sub.4=2{circumflex over ()}()=1.681793 is given to a corresponding polarized channel in the lower half segment, so that a reliability value of each polarized channel is shown in Table 3.
TABLE-US-00003 TABLE 3 Polarized channel sequence number 0 1 2 3 4 5 6 7 PW8 0 1 1.189207 2.189207 1.414214 2.414214 2.603421 3.603421 Polarized channel sequence number 8 9 10 11 12 13 14 15 PW8 + 1.681793 2.681793 2.871 3.871 3.096006 4.096006 4.285214 5.285214 W.sub.4
[0169] A sequence obtained by sorting reliability values of the 16 channels is:
Seq16=[0124835691012711131415]
[0170] In another implementation, the first sequence may not be a PW sequence, to be specific, may be any sequence other than the PW sequence. In this case, there may be two cases. One is symmetrical extension, and the other is non-symmetrical extension.
[0171] First Case: Symmetrical Extension
[0172] In this extension manner, the reliability values of the second sequence are obtained by adding a fixed first difference to the reliability values of the first sequence, so that internal sorting of the second sequence is consistent with internal sorting of the first sequence. Therefore, this extension manner is referred to as symmetrical extension.
[0173] In the first case, the basic sequence is a first sequence whose length is N, the sequence that corresponds to the required mother code length and whose length is 2N is a sequence whose length is 2N and that is obtained by sorting reliability values of the first sequence and reliability values of a second sequence in ascending order. The basic sequence may be a PW sequence, or may be a sequence obtained by using another method. Sequence numbers of N polarized channels in the first sequence are arranged in a predetermined order, and the predetermined order is different from an order of polarization weights of the N polarized channels corresponding to the first sequence whose mother code length is N. The reliability values of the N polarized channels arranged in the predetermined order in the first sequence respectively correspond to polarization weight values of the N polarized channels that are arranged in ascending order, and indexes of the polarized channels corresponding to the first sequence are 0, . . . , and N1. The reliability values of N polarized channels arranged in the predetermined order in the second sequence are obtained by adding a first difference to the polarization weight value of each polarized channel in the first sequence, and index numbers of the polarized channels corresponding to the second sequence are N, . . . , and 2N1.
[0174] For example, the basic sequence (the first sequence) is a general sequence, and an order in the basic sequence is different from that in a PW sequence. For example, a first sequence whose length is 8 is:
Seq8=[01234567]
[0175] Using a PW value calculated in the basic form (= is used) of the first-type PW formula as an example, PW values that are of polarized channels corresponding to a PW sequence whose length is also 8 and that are obtained through calculation are given to the corresponding polarized channels of the first sequence in the sorting order in the first sequence, and the reliability values of the first sequence are shown in Table 4.
TABLE-US-00004 TABLE 4 PW value 0 1 1.189207 1.414214 2.189207 2.414214 2.603421 3.603421 Polarized channel sequence 0 1 2 3 4 5 6 7 number
[0176] The reliability value of each polarized channel corresponding to the first sequence plus the first difference W4=2{circumflex over ()}()=1.681793 is given to a corresponding polarized channel in the lower half segment, so that a reliability of each channel is shown in Table 5.
TABLE-US-00005 TABLE 5 Polarized channel sequence number 0 1 2 3 4 5 6 7 PW8 0 1 1.189207 1.414214 2.189207 2.414214 2.603421 3.603421 Polarized channel sequence number 8 9 10 11 12 13 14 15 PW8 + 1.681793 2.681793 2.871 3.096006 3.871 4.096006 4.285214 5.285214 W.sub.4
[0177] An extended sequence obtained after sorting is:
Seq16=[0123845691011712131415]
[0178] A polarization weight calculation manner of the first sequence may use the basic form and the first variation form of each type of PW formula. In this case, the first difference is a fixed value.
[0179] If a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j, and the first difference is W.sub.n=.sup.n; or
[0180] if a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.j).sup.j, and the first difference is W.sub.n=(.sub.n).sup.n; or
[0181] if a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*+b).sup., and the first difference is W.sub.n=(2.sup.n*+b).sup.; or
[0182] if a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*.sup.
[0183] if a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sup.j+a*.sup.j), and the first difference is W.sub.n=().sup.n+a*().sup.n; or
[0184] if a polarization weight of an i.sup.th polarized channel in the first sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*((.sub.j)+a.sub.j*(.sub.j).sup.j), and the first difference is W.sub.n=(.sub.n).sup.n+a.sub.n*(.sub.n).sup.n, where
[0185] i is an index of the polarized channel, i is an integer greater than or equal to 0 and less than N, iB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n1}, n=log.sub.2(N), and are fixed values whose value ranges are [0, 2], and are fixed values whose value ranges satisfy [0,2], b is a fixed value whose value range is [1, 1], and a is a fixed value whose value ranges are [1, 1].
[0186] Second Case: Non-Symmetrical Extension
[0187] In this extension manner, the reliability values of the second sequence are obtained by adding a second difference to the reliability values of the first sequence; however, in this case, the second difference added to each polarized channel is not a fixed value, so that internal sorting of the second sequence is not completely consistent with internal sorting of the first sequence. Therefore, this extension manner may be referred to as non-symmetrical extension.
[0188] In the second case, the basic sequence includes a first sequence whose length is N and a second sequence whose length is N, the first sequence and the second sequence are different sequences, the sequence is a sequence whose length is 2N and that is obtained by sorting reliability values of the first sequence and reliability values of the second sequence in ascending order, sequence numbers of N polarized channels in the first sequence are arranged in a first order, sequence numbers of N polarized channels in the second sequence are arranged in a second order, and the first order is different from the second order. The reliability values of the N polarized channels arranged in the first order in the first sequence respectively correspond to polarization weight values of the N polarized channels that are arranged in ascending order, and indexes of the polarized channels corresponding to the first sequence are 0, . . . , and N1. The reliability values of the N polarized channels arranged in the second order in the second sequence are obtained by adding a second difference to a polarization weight value of each polarized channel in the second sequence, and index numbers of the polarized channels corresponding to the second sequence are N, . . . , and 2N1.
[0189] For example, a sequence whose length is 16 is generated from two basic sequences whose length is 8. For example, an order in the upper half segment (corresponding to the first sequence) is: Seq8_0=[0 1 2 3 4 5 6 7], and an order in the lower half segment (corresponding to the second sequence) is: Seq8_1=[0 1 2 4 3 5 6 7]+8.
[0190] PW values of the basic sequence whose length is 8 are given to the upper half segment, and the PW values of the second sequence plus the second difference W4=2{circumflex over ()}()=1.681793 are successively given to the lower half segment, to obtain PW values corresponding to the sequence whose length is 16, as shown in Table 6.
TABLE-US-00006 TABLE 6 Polarized channel sequence number 0 1 2 3 4 5 6 7 PW8 0 1 1.189207 1.414214 2.189207 2.414214 2.603421 3.603421 Polarized channel sequence number 8 9 10 12 11 13 14 15 PW8 + 1.681793 2.681793 2.871 3.096006 3.871 4.096006 4.285214 5.285214 W.sub.4
[0191] A sequence obtained after the PW values of 16 polarized channels are sorted is:
[0192] Seq16=[0123845691012711131415]
[0193] In the second case, a method for obtaining the polarization weight of each polarized channel corresponding to the first sequence may be obtained through calculation by using any one of the basic forms and variation forms in the first-type to the third-type PW formulas. To be specific:
[0194] the polarization weight of each channel corresponding to the first sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j; or
[0195] the polarization weight of each channel corresponding to the first sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j; or
[0196] the polarization weight of each channel corresponding to the first sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0197] the polarization weight of each channel corresponding to the first sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0198] the polarization weight of each channel corresponding to the first sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*+b).sup.; or
[0199] the polarization weight of each channel corresponding to the first sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*.sup.
or
[0200] the polarization weight of each channel corresponding to the first sequence is:
or
[0201] the polarization weight of each channel corresponding to the first sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sup.j+*.sup.j); or
[0202] the polarization weight of each channel corresponding to the first sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*((.sub.j).sup.j+a.sub.j*(.sub.j).sup.j); or
[0203] the polarization weight of each channel corresponding to the first sequence is:
or
[0204] the polarization weight of each channel corresponding to the first sequence is:
where
[0205] i is an index of the polarized channel, i is an integer greater than or equal to 0 and less than N, iB.sub.nB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n}, n=log.sub.2(N), and are fixed values whose value ranges are [0, 2], and are fixed values whose value ranges satisfy [0,2], b is a fixed value whose value range is [1, 1], and a is a fixed value whose value range is [1, 1].
[0206] The polarization weight of each polarized channel corresponding to the second sequence may also be obtained through calculation by using any one of the basic forms and variation forms in the first-type to the third-type PW formulas. Based on each of the first-type to the third-type PW formulas, the polarization weight of each polarized channel corresponding to the second sequence and the corresponding second difference may be obtained as follows:
[0207] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j, and the second difference is W.sub.n=.sup.n; or
[0208] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.j).sup.j, and the second difference is W.sub.n=(.sub.n).sup.n; or
[0209] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0210] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0211] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*+b).sup., and the second difference is W.sub.n=(2.sup.n*+b).sup.; or
[0212] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(2.sup.j*.sup.
[0213] a polarization weight of an i.sup.th polarized channel in the second sequence is:
and the second difference is W.sub.n(s)=(2.sup.n*.sup.
[0214] a polarization weight of an i.sup.th polarized channel in the second sequence is:
and the second difference is W.sub.n(i)=(2.sup.n*.sup.
[0215] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sup.j+a*.sup.j), and the second difference is W.sub.n=().sup.n+a*().sup.n; or
[0216] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*((.sub.j).sup.j+a.sub.j*(.sup.j).sup.j, and the second difference is W.sub.n=(.sub.n).sup.n+a.sub.n*(.sub.n).sup.n; or
[0217] a polarization weight of an i.sup.th polarized channel in the second sequence is: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0218] a polarization weight of an i.sup.th polarized channel in the second sequence is W.sub.i=.sub.j=0.sup.n-1B.sub.j*((.sub.B.sub.
[0219] i is an index of the polarized channel, i is an integer greater than or equal to N and less than 2N1, iB.sub.nB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n}, n=log.sub.2(N), and are fixed values whose value ranges are [0, 2], and are fixed values whose value ranges satisfy [0,2], b is a fixed value whose value range is [1, 1], and a is a fixed value whose value range is [1, 1].
[0220] The polarization weight of each polarized channel corresponding to the second sequence plus the second difference is equivalent to n=log.sub.2(2N) in the foregoing first-type to the third-type formulas in various basic forms and variation forms, because a code length obtained after the extension is 2N.
[0221] In another implementation, each of the first sequence and the second sequence may be a PW sequence. To be specific, each of the first sequence and the second sequence that are used as the basic sequence is a sequence in which the polarization weights are sorted. However, the polarization weight calculation manner of the first sequence is different from the polarization weight calculation manner of the second sequence.
[0222] The basic sequence includes a first sequence whose length is N and a second sequence whose length is N, the sequence is a sequence whose length is 2N and that is obtained by sorting polarization weight values of the first sequence and polarization weight values of the second sequence in ascending order, indexes of the polarized channels corresponding to the first sequence are 0, . . . , and N1, and index numbers of the polarized channels corresponding to the second sequence are N, . . . , and 2N1; and a polarization weight calculation manner of the first sequence is different from a polarization weight calculation manner of the second sequence.
[0223] Any one of the following is used for the polarization weight calculation manner of the first sequence and the polarization weight calculation manner of the second sequence:
[0224] a polarization weight calculation manner: W.sub.i=.sub.j=0.sup.n-1B.sub.j*().sup.j; or
[0225] a polarization weight calculation manner: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.j).sup.j; or
[0226] a polarization weight calculation manner: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0227] a polarization weight calculation manner: W.sub.i=.sub.j=0.sup.n-1B.sub.j*(.sub.B.sub.
[0228] i is an index of an ith polarized channel, iB.sub.n-1B.sub.n-2 . . . B.sub.0, B.sub.j{0,1}, j{0,1, . . . , n1}, n=log.sub.2(2N), and is a fixed value. For a same formula form, if values of are different, it is also considered that polarization weight calculation formulas are different.
[0229] The polar code encoding method provided in the embodiments of this application is described above in detail with reference to
[0230]
[0231] The obtaining unit 310 is configured to obtain a sequence corresponding to a required mother code length and a to-be-encoded bit. The sequence is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length.
[0232] The obtaining unit 310 may be configured to perform step 110 in the foregoing method embodiment. For detailed content, refer to the descriptions related to step 110, and details are not described herein again.
[0233] The encoding unit 320 is configured to perform polar code encoding on the to-be-encoded bit by using the sequence corresponding to the required mother code length, to obtain an encoded bit.
[0234] The encoding unit 320 may be configured to perform step 130 in the foregoing method embodiment. For detailed content, refer to the descriptions related to step 110, and details are not described herein again.
[0235] The apparatus 300 may be a network device communicating with a terminal, or may be a terminal.
[0236]
[0237] The processing apparatus 504 may be configured to perform some or all of steps 110 to 130 in the foregoing method embodiment. For detailed content, refer to the descriptions related to steps 110 to 130 and details are not described herein again.
[0238] The transceiver 508 is configured to send the encoded bit.
[0239] Optionally, the processing apparatus 504 may be a chip or an integrated circuit.
[0240] The communications device 500 may be a network device (such as a base station) communicating with a terminal, or may be a terminal.
[0241] An embodiment of this application further provides a processing apparatus 504 for encoding, configured to implement the polar code encoding method in the foregoing embodiment. A part or all of the encoding method in the foregoing embodiment may be implemented by using hardware, or may be implemented by using software.
[0242] Optionally, when all or a part of the polar code encoding method in the foregoing embodiment is implemented by using hardware, refer to
[0243] The logic circuit 5144 may be configured to perform the encoding method performed by the sending device in
[0244] Optionally, when all or a part of the polar code encoding method in the foregoing embodiment is implemented by using software, the processing apparatus 504 includes a processor 5042 and a memory 5044. For details, refer to
[0245] The memory 5044 is configured to store a program.
[0246] The processor 5042 is configured to execute the program stored in the memory, and when the program is executed, the processor 5042 is configured to perform the polar code encoding method in the foregoing embodiment.
[0247] The memory may be a physically independent unit, or may be integrated with the processor. For details, refer to
[0248] In another optional embodiment, the processing apparatus 504 may include only the processor 5042. The memory 5042 is located outside the processing apparatus 504. The processor 5042 is connected to the memory 5044 by using a circuit/wire, and is configured to read and execute the program stored in the memory 5044.
[0249]
[0250] The obtaining unit 610 is configured to obtain a to-be-decoded bit and a sequence corresponding to a required mother code length. The sequence corresponding to the required mother code length is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length.
[0251] The decoding unit 620 is configured to decode the to-be-decoded bit by using the sequence corresponding to the required mother code length, to obtain a decoded bit.
[0252]
[0253] The transceiver 708 is configured to receive a to-be-decoded bit.
[0254] The processing apparatus 704 is configured to: obtain a sequence corresponding to a required mother code length, and decode the to-be-decoded bit by using the sequence corresponding to the required mother code length, to obtain a decoded bit. The sequence corresponding to the required mother code length is generated based on a basic sequence, and a length of the basic sequence is less than the mother code length.
[0255] An embodiment of this application further provides a processing apparatus 704 for decoding, configured to implement the decoding method in the foregoing embodiment. A part or all of the decoding method in the foregoing embodiment may be implemented by using hardware, or may be implemented by using software. A structure of the processing apparatus 704 is the same as a structure of the processing apparatus in the foregoing encoding apparatus, and only implemented functions are different. Therefore, only the difference is described herein.
[0256]
[0257] When the processing apparatus 704 is implemented by using hardware, a logic circuit 7144 in the processing apparatus 704 is configured to decode an input to-be-decoded bit by using a sequence corresponding to a required mother code length, to obtain a decoded bit.
[0258] The logic circuit 7144 may be configured to perform the decoding method performed by the receiving device in
[0259] When a part or all of the decoding method in the foregoing embodiment is implemented by using software, refer to
[0260] In another optional embodiment, the processing apparatus may alternatively include only the processor. The memory is located outside the processing apparatus. The processor is connected to the memory by using a circuit/wire, and is configured to read and execute the program stored in the memory.
[0261] In the embodiments of this application, the processing apparatus for encoding and the processing apparatus for decoding may be independent of each other in an actual application. Alternatively, the processing apparatus for encoding and the processing apparatus for decoding may be integrated together, to be specific, a set of apparatuses is formed.
[0262] The communications device may be a terminal, or may be a network device. When the communications device is a terminal, refer to
[0263] In addition, to make functions of the terminal more perfect, the terminal may further include one or more of an input unit 814, a display unit 816, an audio circuit 818, a camera 820, a sensor 822, and the like. The audio circuit may include a speaker 8182, a microphone 8184, and the like.
[0264] The polar code encoding apparatus and the polar code decoding apparatus that are provided in the embodiments of this application are described above with reference to
[0265] All or some of the foregoing embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, the embodiments may be implemented completely or partially in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the procedure or functions according to the embodiments of the present invention are all or partially generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted by using the computer-readable storage medium. The computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (DSL)) or wireless (for example, infrared, radio, and microwave, or the like) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape, a USB flash drive, a ROM, or a RAM), an optical medium (for example, a CD or a DVD), a semiconductor medium (for example, a solid state disk (SSD)), or the like.
[0266] The foregoing descriptions are merely specific implementations of this application, but are not intended to limit the protection scope of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.