This application relates to the communication field, and more specifically, to a polar encoding method and apparatus.
Three most typical communication scenarios in a 5th generation (5G) communication system include enhanced mobile broadband (eMBB), massive machine type communication (mMTC), and ultra-reliable and low latency communication (URLLC). Requirements of these communication scenarios pose new challenges to existing long term evolution (LTE) technologies. As a most basic radio access technology, channel encoding is one of important research objects to meet a 5G communication requirement.
This application relates to a polar code, and the polar code is a first channel encoding method that can be strictly proved to “reach” a channel capacity. A key problem in construction of the polar code is to determine an information bit sequence number set. Further research shows that the polar code may be constructed by using a sequence. When the polar code is constructed, the information bit set can be determined by reading only a corresponding sequence.
A sequence used by an existing polar code has a length of 1024, but cannot be directly applied to construction of a longer polar code. In addition, optimal construction of the sequence of the polar code is very difficult. To resolve this problem, a feasible practice is to first construct an optimal short sequence (for example, an new radio (NR) sequence with a length of 1K), and then extend the optimal short sequence to a required length. Currently, there is mainly a polarization weight (PW) sequence extension method. However, performance of a sequence extended by using this approximation algorithm is poor. In addition, because the extension method involves floating-point operations, complexity of extension is high.
Aiming at the foregoing problem, this application provides a polar encoding method. A polar code with another code length is constructed based on a short sequence with a length of N0. The method can reduce a length of a polar code that needs to be stored, reduces complexity, and is easy to implement.
This application provides a polar encoding method and apparatus. A polar code with another code length is constructed based on a short sequence with a length of N0. The method can reduce a length of a polar code that needs to be stored, reduces complexity, and is easy to implement.
According to a first aspect, a polar encoding method is provided. The method includes: obtaining a basic sequence, where the basic sequence includes N0 subchannel numbers; sequentially reading first subchannel numbers from the basic sequence; sequentially reading 2m second subchannel numbers from the basic sequence starting from an Mth subchannel number based on the first subchannel number read each time; and adding q*N0 to each of the 2m second subchannel numbers to obtain 2m third subchannel numbers, and constructing a polar code by using 2m subchannels corresponding to the 2m third subchannel numbers as information bits, where a code rate of the polar code is k/N, k is an information bit length of the polar code, N is a code length of the polar code, q is determined based on the first subchannel numbers read from the basic sequence, a sequence length N0 of the basic sequence, and the code length N of the polar code, q is greater than or equal to 0 and less than or equal to 2m−1, and m is an integer greater than or equal to 1.
It should be understood that, in this embodiment of this application, the subchannel numbers may be read from back to front when the subchannel numbers are read from the basic sequence.
A polar code with another code length is constructed based on the short sequence with the length of N0. The method can reduce a length of a polar code that needs to be stored, reduces complexity, and is easy to implement.
It should be understood that this embodiment of this application may be executed by a terminal device or a network device that provides a network service for a terminal device.
With reference to the first aspect, in some embodiments of the first aspect, M is represented as tq, a value of tq is obtained by subtracting 1 from a previous value of tq, and an initial value of tq is N0.
With reference to the first aspect, in some embodiments of the first aspect, q is determined based on the first subchannel numbers read from the basic sequence; and q is represented as └T/(N0/2m)┘, where T indicates the first subchannel numbers read from the basic sequence, and └┘ indicates rounding down.
With reference to the first aspect, in some embodiments of the first aspect, the adding q*N0 to each of the 2m second subchannel numbers to obtain 2m third subchannel numbers, and constructing a polar code by using 2m subchannels corresponding to the 2m third subchannel numbers as information bits includes: repeating the operation of reading 2m second subchannel numbers from the basic sequence until a quantity of read subchannel numbers is equal to the information bit length k of the polar code.
With reference to the first aspect, in some embodiments of the first aspect, N is 2mN0.
With reference to the first aspect, in some embodiments of the first aspect, N is a code length of any length, and the method further includes: obtaining a set Θ, where the set Θ is determined based on the code rate and the information bit length of the polar code; and constructing the polar code based on the 2m third subchannel numbers and the set Θ.
With reference to the first aspect, in some embodiments of the first aspect, the set Θ includes at least one of the 2m third subchannel numbers, and the constructing the polar code based on the 2m third subchannel numbers and the set Θ includes: determining whether each of the 2m third subchannel numbers is located in the set Θ; and when one of the 2m third subchannel numbers is located in the set Θ, using a subchannel corresponding to the third subchannel number as a frozen bit; or when one of the 2m third subchannel numbers is not located in the set Θ, using a subchannel corresponding to the third subchannel number as an information bit.
With reference to the first aspect, in some embodiments of the first aspect, when N is 2mN0, the set Θ is an empty set.
According to a second aspect, an encoding method is provided. The method includes: obtaining a first sequence and a second sequence based on a basic sequence, where the basic sequence, the first sequence, and the second sequence each include N0 subchannel numbers; sequentially reading fourth subchannel numbers from the basic sequence, and reading two fifth subchannel numbers from the first sequence or the second sequence based on the fourth subchannel numbers read from the basic sequence; and constructing a polar code by using the two fifth subchannel numbers read from the first sequence or the second sequence as information bits, where a code length of the polar code is 2N0, and an information bit length of the polar code is k.
The polar code with the code length of 2N0 is constructed based on a short sequence with a length of N0. The method can reduce a length of a polar code that needs to be stored, reduces complexity, and is easy to implement.
With reference to the second aspect, in some embodiments of the second aspect, the reading two fifth subchannel numbers from the first sequence or the second sequence based on the fourth subchannel numbers read from the basic sequence includes: when T is less than N0/2, reading an Mth subchannel number and a (M−1)Mth subchannel number from the first sequence; or when T is greater than or equal to N0/2, reading a Pth subchannel number and a (P−1)th subchannel number from the second sequence.
With reference to the second aspect, in some embodiments of the second aspect, M is represented as t1, a value of t1 is obtained by subtracting 2 from a previous value oft1, and an initial value of t1 is N0.
With reference to the second aspect, in some embodiments of the second aspect, P is represented as t2, a value of t2 is obtained by subtracting 2 from a previous value of t2, and an initial value of t2 is N0.
With reference to the second aspect, in some embodiments of the second aspect, the constructing a polar code by using the two fifth subchannel numbers read from the first sequence or the second sequence as information bits includes: repeating the operation of reading two fifth subchannel numbers from the first sequence or the second sequence until a quantity of read subchannel numbers is equal to the information bit length k of the polar code.
With reference to the second aspect, in some embodiments of the second aspect, the obtaining a first sequence and a second sequence based on a basic sequence includes: adding (x−1)N0 to each subchannel number in the basic sequence, where 1 and 2 respectively indicate a value of x in the first sequence and a value of x in the second sequence.
According to a third aspect, a polar encoding apparatus is provided. The apparatus includes: an obtaining module, configured to obtain a basic sequence, where the basic sequence includes N0 subchannel numbers; and a processing module, configured to sequentially read first subchannel numbers from the basic sequence. The processing module is further configured to: sequentially read 2m second subchannel numbers from the basic sequence starting from an Mth subchannel number based on the first subchannel number read each time; and add q*N0 to each of the 2m second subchannel numbers to obtain 2m third subchannel numbers, and construct a polar code by using 2m subchannels corresponding to the 2m third subchannel numbers as information bits, where a code rate of the polar code is k/N, k is an information bit length of the polar code, N is a code length of the polar code, q is determined based on the first subchannel numbers read from the basic sequence, a sequence length N0 of the basic sequence, and the code length N of the polar code, q is greater than or equal to 0 and less than or equal to 2m−1, and m is an integer greater than or equal to 1.
A polar code with another code length is constructed based on the short sequence with the length of N0. The method can reduce a length of a polar code that needs to be stored, reduces complexity, and is easy to implement.
With reference to the third aspect, in some embodiments of the third aspect, M is represented as tq, a value of tq is obtained by subtracting 1 from a previous value of tq, and an initial value of tq is N0.
With reference to the third aspect, in some embodiments of the third aspect, q is represented as └T/(N0/2m)┘, where T indicates the first subchannel numbers read from the basic sequence, and └┘ indicates rounding down.
With reference to the third aspect, in some embodiments of the third aspect, the processing module is specifically configured to repeat the operation of reading the 2m second subchannel numbers from the basic sequence until a quantity of read subchannel numbers is equal to the information bit length k of the polar code.
With reference to the third aspect, in some embodiments of the third aspect, N is 2mN0.
With reference to the third aspect, in some embodiments of the third aspect, N is a code length of any length; the obtaining module is further configured to obtain a set Θ, where the set ϕ is determined based on the code rate and the information bit length of the polar code; and the processing module is further configured to construct the polar code based on the 2m third subchannel numbers and the set Θ.
With reference to the third aspect, in some embodiments of the third aspect, the set Θ includes at least one of the 2m third subchannel numbers, and the processing module is specifically configured to: determine whether each of the 2m third subchannel numbers is located in the set Θ; and when one of the 2m third subchannel numbers is located in the set Θ, use a subchannel corresponding to the third subchannel number as a frozen bit; or when one of the 2m third subchannel numbers is not located in the set Θ, use a subchannel corresponding to the third subchannel number as an information bit.
With reference to the third aspect, in some embodiments of the third aspect, when N is 2mN0, the set Θ is an empty set.
According to a fourth aspect, a polar encoding apparatus is provided. The apparatus includes: a second obtaining module, configured to obtain a first sequence and a second sequence based on a basic sequence, where the basic sequence, the first sequence, and the second sequence each include N0 subchannel numbers; and a second processing module, configured to sequentially read fourth subchannel numbers from the basic sequence. The processing module is further configured to: read two fifth subchannel numbers from the first sequence or the second sequence based on the fourth subchannel numbers read from the basic sequence; and construct a polar code by using the two fifth subchannel numbers read from the first sequence or the second sequence as information bits, where a code length of the polar code is 2N0, and an information bit length of the polar code is k.
The polar code with the code length of 2N0 is constructed based on a short sequence with a length of N0. The method can reduce a length of a polar code that needs to be stored, reduces complexity, and is easy to implement.
With reference to the fourth aspect, in some embodiments of the fourth aspect, the second processing module is specifically configured to: when T is less than N0/2, read an Mtn subchannel number and a (M−1)th subchannel number from the first sequence; or when T is greater than or equal to N0/2, read a Pth subchannel number and a (P−1)th subchannel number from the second sequence.
With reference to the fourth aspect, in some embodiments of the fourth aspect, M is represented as t1, a value of t1 is obtained by subtracting 2 from a previous value of t1, and an initial value of t1 is N0.
With reference to the fourth aspect, in some embodiments of the fourth aspect, P is represented as t2, a value of t2 is obtained by subtracting 2 from a previous value of t2, and an initial value of t2 is N0.
With reference to the fourth aspect, in some embodiments of the fourth aspect, the second processing module is specifically configured to repeat the operation of reading the two fifth subchannel numbers from the first sequence or the second sequence until a quantity of read subchannel numbers is equal to the information bit length of the polar code.
With reference to the fourth aspect, in some embodiments of the fourth aspect, the second obtaining module is specifically configured to add (x−1)N0 to each subchannel number in the basic sequence, where 1 and 2 respectively indicate a value of x in the first sequence and a value of x in the second sequence.
According to a fifth aspect, a polar encoding apparatus is provided. The apparatus has functions of implementing the methods according to the foregoing aspects. The function may be implemented by hardware, or may be implemented by executing corresponding software by hardware. The hardware or the software includes one or more modules corresponding to the foregoing function.
According to a sixth aspect, a polar encoding apparatus is provided, including a processor. The processor is configured to be coupled to a memory, and is configured to invoke a computer program from the memory and run the computer program, to perform the method according to any one of the foregoing aspects or the possible embodiments of the foregoing aspects.
According to a seventh aspect, a polar encoding apparatus is provided, including a processor and a memory. The memory is configured to store a computer program, and the processor is configured to invoke the computer program from the memory and run the computer program, so that the communication device performs the method according to any one of the foregoing aspects or the possible embodiments of the aspects.
According to an eighth aspect, a polar encoding apparatus (for example, the apparatus may be a chip system) is provided. The apparatus includes a processor, configured to support the communication apparatus in implementing functions in the foregoing aspects. In a possible design, the apparatus further includes a memory. The memory is configured to store program instructions and data that are necessary for the communication apparatus. When the apparatus is the chip system, the apparatus may include a chip, or may include a chip and another discrete device.
According to a ninth aspect, a computer-readable storage medium is provided, and is configured to store a computer program. The computer program includes instructions used to perform the method according to any one of the foregoing aspects or the possible embodiments of the foregoing aspects.
According to a tenth aspect, a computer program product is provided, including a computer program. When the computer program product runs on a computer device, the computer device is enabled to perform the methods according to the foregoing aspects.
According to an eleventh aspect, a chip is provided. The chip includes a logic circuit and an input/output interface. The input/output interface is configured to receive code instructions or information. For example, the input interface inputs the basic sequence in the foregoing aspects, the output interface outputs a polar code encoded by performing the methods in the foregoing aspects, and the logic circuit is configured to, by executing the code instructions or based on the information, perform the methods according to the foregoing aspects. These or other aspects of this application are clearer and more comprehensible in descriptions of the following embodiments.
The following describes technical solutions of this application with reference to accompanying drawings.
The technical solutions in embodiments of this application may be applied to various communication systems, such as a global system for mobile communications (GSM), a code division multiple access (CDMA) system, a wideband code division multiple access (WCDMA) system, a general packet radio service (GPRS) system, a long term evolution (LTE) system, an LTE frequency division duplex (FDD) system, an LTE time division duplex (TDD) system, a universal mobile telecommunications system (UMTS), a worldwide interoperability for microwave access (WiMAX) communication system, a 5th generation (5G) system or a new radio (NR) system, and a future evolved communication system.
In embodiments of this application, a terminal device may be a device having a wireless transceiver function, and may be deployed on land, including an indoor device or an outdoor device, a handheld device, a wearable device, or a vehicle-mounted device, may be deployed on water (for example, on a ship), or may be deployed in the air (for example, on an airplane, a balloon, or a satellite). The terminal device may communicate with a core network through a radio access network (RAN), and exchange voice and/or data with the RAN. The terminal device may be a mobile phone, a tablet computer, a computer having a wireless transceiver function, a mobile internet device (MID), a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in telemedicine (remote medical), a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, or the like. An application scenario is not limited in embodiments of this application. Sometimes, the terminal device may also be referred to as user equipment (UE), a mobile station, a remote station, or the like. A specific technology, a device form, and a name used by the terminal device are not limited in embodiments of this application.
A network device in embodiments of this application may include an evolved NodeB (NodeB or eNB or e-NodeB) in a long term evolution (LTE) system or an evolved LTE system (LTE-advanced, LTE-A), for example, a conventional macro base station eNB and a micro base station eNB in a heterogeneous network scenario, or may include a next generation NodeB (gNB) in a 5th generation (5G) new radio (NR) system, or may further include a radio network controller (RNC), a NodeB (NB), a base station controller (BSC), a base transceiver station (BTS), a transmission reception point (TRP), a home base station (for example, a home evolved NodeB, or a home NodeB, HNB), a baseband unit (BBU), a baseband unit pool BBU pool, or a Wi-Fi access point (AP), or may further include a centralized unit (CU) and a distributed unit (DU) in a cloud radio access network (Cloud RAN) system. This is not limited in embodiments of this application. In a split deployment scenario in which an access network device includes the CU and the DU, the CU supports protocols such as a radio resource control (RRC) protocol, a packet data convergence protocol (PDCP), and a service data adaptation protocol (SDAP), and the DU mainly supports a radio link control (RLC) layer protocol, a media access control (MAC) layer protocol, and a physical layer protocol.
Rapid evolution of wireless communication indicates that a 5G communication system will present some new features. Three most typical communication scenarios in the 5G communication system are as follows.
As a most basic radio access technology, channel encoding is one of important research objects that meet a 5G communication requirement.
After the Shannon theory is proposed, scholars from various countries have been devoted to finding an encoding/decoding method that can reach the Shannon limit and has low complexity. Although a turbo code and a re-proposed low-density parity-check code (LDPC) that have become mainstream research directions have been well applied in LTE and world interoperability for microwave access (WiMAX), the two codes cannot well resolve some important problems in 5G communication.
In the future, channel encoding needs to be able to support a larger range of bit rates with lower complexity and better performance. In addition, an important feature that distinguishes eMBB and mMTC from LTE is medium- and short-packet transmission. Therefore, channel encoding is required to better support communication of this type of code length. Control channels with short packets and low bit rates also benefit. URLLC further imposes a stricter requirement on reliability of data transmission. Currently, LTE turbo cannot support an excessively low or excessively high bit rate. For transmission of a medium- and short-packet, it is difficult for the turbo code and the LDPC code to achieve ideal performance in a limited code length due to encoding/decoding features of the turbo code and the LDPC code. For a long packet, although the turbo code and the LDPC code can approach the Shannon limit as the code length increases, theoretical performance cannot be achieved. In addition, during embodiment, the turbo code and the LDPC code have high complexity in an encoding/decoding embodiment process. Therefore, in the 5G communication system, a new encoding technology is urgently required to resolve problems in short packet, bit rate, reliability, and complexity in the existing technology.
In 2009, Professor Arikan proposed an encoding scheme based on channel polarization, which is referred to as a polar code. The polar code is a first channel encoding method that can be strictly proved to “achieve” a channel capacity. In a case of different code lengths, particularly for a limited code, performance of the polar code is far better than performance of the turbo code and performance of the LDPC code. In addition, the polar code has lower computational complexity in encoding/decoding. These advantages enable the polar code to be widely used in 5G.
The polar code is a linear block code, a generator matrix is GN, and an encoding process is X1N=u1NGN. u1N=(u1,u2, . . . ,uN) is a binary row vector with a length of N (namely, a code length). GN is an N×N matrix, and GN=F2⊗n, where
n=log 2(N), and F2⊗n is defined as a Kronecker product of n matrices F2.
In the encoding process of the polar code, some bits in u1N are used to carry information and are referred to as information bits, and a set of indexes of these bits is denoted as . Other bits are set to fixed values pre-agreed on by a transmit end and a receive end, and are referred to as fixed bits. A set of indexes of these bits is represented by a complementary set c of .
A key problem in construction of the polar code is to determine an information bit sequence number set . In an early theoretical research phase, the set is usually selected according to the following method: First, a polar channel error probability Pe(i) corresponding to a bit with a sequence number i is obtained by using a method such as density evolution or Gaussian approximation, and K sequence numbers with minimum values of Pe(i) are selected to form the set . In this method, respective Pe(i) needs to be calculated for different channel conditions. In other words, it is a channel-dependent method. Because channels are variable in an actual scenario, the method is difficult to implement in an actual application.
Further research shows that the polar code may be constructed by using a sequence. When the polar code is constructed, the information bit set can be determined by reading only a corresponding sequence. Specifically, the sequence may use polar channel sequence numbers to indicate a sequence of selecting information bits. For example, when a code length is 8, the sequence of selecting the information bits is [1, 2, 3, 5, 4, 6, 7, 8]. When an information bit set with an information length (e.g., quantity) of k is constructed, only k subchannels need to be read from back to front as the information bit set . For example, when k=2, A=[7, 8] is read from back to front from the foregoing sequence; or when k=4, A=[4, 6, 7, 8]. This sequence storage manner is easier to implement, and this form is also used in 5G standards.
Currently, the polar code is selected as a channel coding scheme of a control channel in 5G, and a currently used sequence has a length of 1024. When channel encoding with a length greater than 1024 is performed on the polar code, construction of a long sequence has the following two challenges.
First, the used sequence has the length of 1024, and cannot be directly applied to construction of a longer polar code.
Second, optimal construction of the sequence of the polar code is very difficult. This is mainly because it is difficult to analyze a successive cancellation list (SCL) decoder. Existing research shows that a polar code constructed by Gaussian approximation is not optimal in the SCL decoder, but the optimal construction is not provided. Currently, short sequences are mainly constructed by an artificial intelligence (AI)+search+large-scale simulation verification method. However, it is very difficult to construct long sequences by using this method because a search space exponent increases.
To resolve this problem, a feasible practice is to first construct an optimal short sequence (for example, an NR sequence with a length of 1K), and then extend the optimal short sequence to a required length.
For ease of understanding, a schematic diagram shown in
As shown in
To implement the preceding extension method, a common extension manner is as follows:
However, performance of a sequence extended by using this approximation algorithm is poor, and because floating-point operations are involved, complexity of extension is high.
This application provides a polar encoding method. A polar code with another code length is constructed based on a short sequence with a length of N0. The method can reduce a length of a polar code that needs to be stored, reduces complexity, and is easy to implement.
This application is applicable to the following application scenarios: supporting a low-power service, supporting a high-throughput service, and supporting a delay-sensitive service.
It should be understood that the short sequence in embodiments of this application may be obtained through a large number of efforts in search, simulation, and design, and includes abundant feature information for constructing information bits of a polar code, especially feature construction applicable to an SCL decoder. Alternatively, the short sequence in this application may be obtained in another manner. This is not limited in this application.
The encoding method in embodiments of this application may be applied to a communication process between various communication devices. The communication device may be a terminal device, a network device that provides a network service for a terminal device, or the like. This is not limited in this application.
It should be understood that an extended sequence used in the encoding process in embodiments of this application may be extended in the encoding process, that is, performed online, or may be performed offline.
S510: Obtain a basic sequence, where the basic sequence includes N0 subchannel numbers.
In some embodiments, the encoding method may be applied to a polar code.
It should be understood that, that the basic sequence includes N0 subchannel numbers may be understood as that a length of the basic sequence is N0.
S520: Sequentially read first subchannel numbers from the basic sequence.
In some embodiments, in this embodiment of this application, a manner of reading the subchannel numbers from the basic sequence may be sequentially reading from back to front.
It should be understood that sequentially reading the first subchannel numbers from the basic sequence may be understood as reading one subchannel number from the basic sequence each time, or may be expressed in a form of a formula. For example, a jth subchannel number is read from the basic sequence, where an initial value of j is N0, and j=j−1, which indicates that a sequence of the jth subchannel number read this time is obtained by subtracting 1 from a sequence of a subchannel number read last time.
S530: Sequentially read 2m second subchannel numbers from the basic sequence starting from an Mth subchannel number based on the first subchannel number read each time.
In an embodiment, M is represented as tq, a value of tq is obtained by subtracting 1 from a previous value of tq, and an initial value of tq is N0.
Compared with prior approaches, in this embodiment of this application, the 2m subchannel numbers are read from the basic sequence at a time, so that the existing technology can be reused to a maximum extent, a length of a polar code that needs to be stored is reduced, complexity is reduced, and embodiment is easy.
S540: Add q*N0 to each of the 2m second subchannel numbers to obtain 2m third subchannel numbers, and construct a polar code by using 2m subchannels corresponding to the 2m third subchannel numbers as information bits.
In an embodiment, a code rate of the polar code is k/N, k is an information bit length of the polar code, N is a code length of the polar code, q is determined based on the first subchannel numbers read from the basic sequence, a sequence length N0 of the basic sequence, and the code length N of the polar code, q is greater than or equal to 0 and less than or equal to 2m−1, and m is an integer greater than or equal to 1.
In an embodiment, q is determined based on the first subchannel numbers read from the basic sequence; and q is represented as └T/(N0/2m) ┘, where T indicates the first subchannel numbers read from the basic sequence, and └┘ indicates rounding down.
In an embodiment, the adding q*N0 to each of the 2m second subchannel numbers to obtain 2m third subchannel numbers, and constructing a polar code by using 2m subchannels corresponding to the 2m third subchannel numbers as information bits includes: repeating the operation of reading 2m second subchannel numbers from the basic sequence until a quantity of read subchannel numbers is equal to the information bit length k of the polar code.
In some embodiments, the method may be applied to construction of a polar code with a code length of 2mN0 by using the sequence with the length of N0, or may be applied to construction of a polar code with a code length of any length.
In an embodiment, N is 2mN0.
In this case, the method may be used to construct the polar code with the length of 2mN0.
In another embodiment, N is a code length of any length, and the method further includes: obtaining a set Θ, where the set is determined based on the code rate and the information bit length of the polar code; and constructing the polar code based on the 2m third subchannel numbers and the set Θ.
On the basis of the operation of obtaining the polar code with the length of 2mN0, an operation of determining the read subchannel number by using the set Θ is added, so that code rates of different polar codes can be considered, and then a polar code with a code length of any length can be constructed. In an embodiment, the set Θ includes at least one of the 2m third subchannel numbers, and the constructing the polar code based on the 2m third subchannel numbers and the set Θ includes: determining whether each of the 2m third subchannel numbers is located in the set Θ; and when one of the 2m third subchannel numbers is located in the set Θ, using a subchannel corresponding to the third subchannel number as a frozen bit; or when one of the 2m third subchannel numbers is not located in the set Θ, using a subchannel corresponding to the third subchannel number as an information bit.
It should be understood that the set Θ may include at least one of 2m subchannel numbers obtained after q*N0 is added to 2m subchannel numbers that are read a plurality of times in the foregoing operation, that is, the set Θ may include at least one of the 2m subchannel numbers obtained after q*N0 is added to the 2m subchannel numbers that are read for the first time, or may include at least one of 2m subchannel numbers obtained after q*N0 is added to 2m subchannel numbers that are read subsequently.
It should be understood that the foregoing method in which the read subchannel number is determined by using the set Θ to construct the polar code with the code length of any length may also be applicable to construction of the polar code with the length of 2mN0. In this case, the set Θ is an empty set. Specifically, when N is 2mN0, the set Θ is an empty set.
In this embodiment of this application, the polar code with another code length is constructed based on the short sequence with the length of N0. The method can reduce the length of the polar code that needs to be stored, reduces complexity, and is easy to implement.
S610: Obtain a first sequence and a second sequence based on a basic sequence.
In an embodiment, the basic sequence, the first sequence, and the second sequence each include N0 subchannel numbers.
It should be understood that the foregoing sequences each include N0 subchannel numbers, or it may be understood that a length of each of the foregoing sequences is N0.
In an embodiment, the obtaining a first sequence and a second sequence based on a basic sequence includes: adding (x−1)N0 to each subchannel number in the basic sequence, where 1 and 2 respectively indicate a value of x in the first sequence and a value of x in the second sequence.
S620: Sequentially read fourth subchannel numbers from the basic sequence.
It should be understood that sequentially reading the fourth subchannel numbers from the basic sequence may be understood as reading one subchannel number from the basic sequence each time, or may be represented as reading a jth subchannel number from the basic sequence, where an initial value of j is N0, and j=j−1, which indicates that a sequence of the subchannel number read from the basic sequence this time is obtained by subtracting 1 from a sequence of a subchannel number read last time.
S630: Read two fifth subchannel numbers from the first sequence or the second sequence based on the fourth subchannel numbers read from the basic sequence.
In an embodiment, the reading two fifth subchannel numbers from the first sequence or the second sequence based on the fourth subchannel numbers read from the basic sequence includes: when T is less than N0/2, reading an Mth subchannel number and a (M−1)th subchannel number from the first sequence; or when T is greater than or equal to N0/2, reading a Pth subchannel number and a (P−1)th subchannel number from the second sequence.
In an embodiment, M is represented as t1, a value of t1 is obtained by subtracting 2 from a previous value of t1, and an initial value of t1 is N0.
In an embodiment, P is represented as t2, a value of t2 is obtained by subtracting 2 from a previous value of t2, and an initial value of t2 is N0.
Compared with prior approaches, in this embodiment of this application, the two subchannel numbers are read from the basic sequence at a time, so that the existing technology can be reused to a maximum extent, a length of a polar code that needs to be stored is reduced, complexity is reduced, and embodiment is easy.
S640: Construct a polar code by using the two fifth subchannel numbers read from the first sequence or the second sequence as information bits.
In an embodiment, a code length of the polar code is 2N0, and an information bit length of the polar code is k.
It should be understood that, after the operation of reading the subchannel numbers from the first sequence or the second sequence is performed once in the foregoing process, a quantity of obtained subchannel numbers may not be equivalent to an information bit length k of an encoded polar code. Therefore, the foregoing reading operation needs to be performed once or a plurality of times, so that a quantity of read subchannel numbers is the same as the information bit length k of the polar code, to construct the polar code.
In an embodiment, the constructing a polar code by using the two fifth subchannel numbers read from the first sequence or the second sequence as information bits includes: repeating the operation of reading two fifth subchannel numbers from the first sequence or the second sequence until the quantity of read subchannel numbers is equal to the information bit length k of the polar code.
In this embodiment of this application, the polar code with the length of 2N0 is constructed based on the short sequence with the length of N0. This method can reduce the length of the polar code that needs to be stored, reduces complexity, and is easy to implement.
The following provides an encoding method for a polar code in an embodiment of this application. In the encoding method in this embodiment of this application, a polar code with a code length of 2mN0 may be constructed by using a short sequence with a length is N0. A code rate of the polar code is k/N, k is an information bit length of the polar code, and m may be a natural number greater than or equal to 1.
The following describes in detail the encoding method for the polar code.
The description in the foregoing embodiment is a method in which the 2m subchannel numbers are read from the basic sequence at a time based on the basic sequence, and then corresponding subchannel numbers are obtained from the 2m subchannel numbers. Alternatively, to obtain the foregoing polar code, another manner may be used. For details, refer to the following description.
In some embodiments, an embodiment of a process of the foregoing second manner may also be represented by using the following pseudocode:
Different from the description in the foregoing manner, in the method, the 2m sequences whose lengths are N0 are obtained by using a basic sequence, and the polar code is constructed by using the basic sequence and the 2m sequences whose lengths are N0. It should be understood that both the foregoing two methods may be used to construct polar codes with different code lengths.
In this embodiment of this application, the polar code with the length of 2m is constructed by using the short sequence with the length of N0. In this way, a sequence that needs to be stored can be further reduced, a process of constructing a long polar code can be simplified, and complexity is reduced. In addition, the polar code construction method in this embodiment of this application can reuse an existing technology to a maximum extent, and is easy to implement.
For the scenario in which the polar code with the code length of 2mN0 is constructed by using the sequence with the length of N0 in the foregoing embodiment, when m is 1, the encoding method for the polar code may alternatively be represented in another manner. The following describes a process of constructing a polar code with a length of 2N0 by using a sequence with a length of N0 in this application.
In some embodiments, the foregoing process may be further represented by using the following pseudocode:
In this embodiment of this application, the polar code with the length of 2N0 is constructed by using the short sequence with the length of N0. In this way, a sequence that needs to be stored can be further reduced, a process of constructing a long polar code can be simplified, and complexity is reduced. In addition, the polar code construction method in this embodiment of this application can reuse an existing technology to a maximum extent, and is easy to implement.
The following provides another encoding method for a polar code in an embodiment of this application. A polar code with any code length, including a length of 2mN0, is constructed by using a short sequence with a length of N0. The following describes in detail operations in this embodiment of this application.
In some embodiments, the foregoing process may be represented by using the following pseudocode.
First, a frozen bit set: Θ is preconfigured.
A difference between this embodiment of this application and the foregoing method for obtaining the polar code with the code length of 2mN0 lies in that when the polar code with the code length of 2mN0 is constructed based on the sequence with the code length of N0, when the subchannel number determined in the foregoing operation is a subchannel number included in the frozen bit set TT, the subchannel number is determined as a frozen bit, that is, information is not sent in the subchannel number. Therefore, a polar code with any code length may be obtained based on the obtained polar code with the code length of 2mN0.
In this embodiment of this application, a rate matching problem is further resolved based on the foregoing embodiment. The polar code with any code length is constructed by using the short sequence with the length of N0. In this way, a sequence that needs to be stored can be further reduced, a process of constructing a long polar code can be simplified, and complexity is reduced. In addition, the polar code construction method in this embodiment of this application can reuse an existing technology to a maximum extent, and is easy to implement.
The apparatus 700 may serve as the terminal device or the network device that provides the network service for the terminal device to process a message, and perform the operation of processing the basic sequence by the terminal device or the network device that provides the network service for the terminal device in the foregoing method embodiments. The obtaining module 701 may be configured to support the apparatus 700 in performing communication, for example, performing an obtaining action performed by the terminal device or the network device that provides the network service for the terminal device in
The obtaining module 701 is configured to obtain a basic sequence, where the basic sequence includes N0 subchannel numbers. The processing module 702 is configured to sequentially read first subchannel numbers from the basic sequence. The processing module is further configured to: sequentially read 2m second subchannel numbers from the basic sequence starting from an Mth subchannel number based on the first subchannel number read each time; and add q*N0 to each of the 2m second subchannel numbers to obtain 2m third subchannel numbers, and construct a polar code by using 2m subchannels corresponding to the 2m third subchannel numbers as information bits. A code rate of the polar code is k/N, k is an information bit length of the polar code, N is a code length of the polar code, q is determined based on the first subchannel numbers read from the basic sequence, a sequence length N0 of the basic sequence, and the code length N of the polar code, q is greater than or equal to 0 and less than or equal to 2m−1, and m is an integer greater than or equal to 1.
In some embodiments, M is represented as tq, a value of tq is obtained by subtracting 1 from a previous value of tq, and an initial value of tq is N0.
In some embodiments, q is represented as └T/(N0/2m)┘, where T indicates the first subchannel numbers read from the basic sequence, and └┘ indicates rounding down.
In some embodiments, the processing module is specifically configured to repeat the operation of reading the 2m second subchannel numbers from the basic sequence until a quantity of read subchannel numbers is equal to the information bit length k of the polar code.
In some embodiments, N is 2mN0.
In some embodiments, N is a code length of any length; the obtaining module is further configured to obtain a set Θ, where the set Θ is determined based on the code rate and the information bit length of the polar code; and the processing module is further configured to construct the polar code based on the 2m third subchannel numbers and the set Θ.
In some embodiments, the set Θ includes at least one of the 2m third subchannel numbers, and the processing module is specifically configured to: determine whether each of the 2m third subchannel numbers is located in the set Θ; and when one of the 2m third subchannel numbers is located in the set Θ, use a subchannel corresponding to the third subchannel number as a frozen bit; or when one of the 2m third subchannel numbers is not located in the set Θ, use a subchannel corresponding to the third subchannel number as an information bit.
In some embodiments, when N is 2mN0, the set Θ is an empty set.
The apparatus 800 may serve as the terminal device or the network device that provides the network service for the terminal device to process a message, and perform the operation of processing the basic sequence by the terminal device or the network device that provides the network service for the terminal device in the foregoing method embodiments. The second obtaining module 801 may be configured to support the apparatus 800 in performing communication, for example, performing an obtaining action performed by the terminal device or the network device that provides the network service for the terminal device in
The second obtaining module 801 is configured to obtain a first sequence and a second sequence based on a basic sequence, where the basic sequence, the first sequence, and the second sequence each include N0 subchannel numbers. The second processing module 802 is configured to sequentially read fourth subchannel numbers from the basic sequence from back to front. The processing module is further configured to: read two fifth subchannel numbers from the first sequence or the second sequence based on the fourth subchannel numbers read from the basic sequence; and construct a polar code by using the two fifth subchannel numbers read from the first sequence or the second sequence as information bits, where a code length of the polar code is 2N0, and an information bit length of the polar code is k.
In some embodiments, the second processing module is specifically configured to: when T is less than N0/2, read an Mth subchannel number and a (M−1)th subchannel number from the first sequence; or when T is greater than or equal to N0/2, read a Pth subchannel number and a (P−1)th subchannel number from the second sequence.
In some embodiments, M is represented as t1, a value of t1 is obtained by subtracting 2 from a previous value of t1, and an initial value of t1 is N0.
In some embodiments, P is represented as t2, a value of t2 is obtained by subtracting 2 from a previous value of t2, and an initial value of t2 is N0.
In some embodiments, the second processing module is specifically configured to repeat the operation of reading the two fifth subchannel numbers from the first sequence or the second sequence until a quantity of read subchannel numbers is equal to the information bit length of the polar code.
In some embodiments, the second obtaining module is specifically configured to add (x−1)N0 to each subchannel number in the basic sequence, where 1 and 2 respectively indicate a value of x in the first sequence and a value of x in the second sequence.
The communication apparatus 900 includes one or more processors 901. The one or more processors 901 may support the communication apparatus 900 in implementing the polar encoding methods in
For example, the communication apparatus 900 may be a chip, and the transceiver unit 905 may be an input circuit and/or an output circuit of the chip. Alternatively, the transceiver unit 905 may be a communication interface of the chip, and the chip may be used as a component of a terminal device, a network device, or another wireless communication device.
The communication apparatus 900 may include one or more memories 902. The memory 902 stores a program 904. The program 904 may be run by the processor 901 to generate instructions 903, so that the processor 901 performs, according to the instructions 903, the methods described in the foregoing method embodiments. In some embodiments, the memory 902 may further store data. In some embodiments, the processor 901 may further read the data stored in the memory 902. The data and the program 904 may be stored at a same storage address, or the data and the program 904 may be stored at different storage addresses.
The processor 901 and the memory 902 may be separately disposed, or may be integrated, for example, integrated on a board or a system on chip (SoC).
The communication apparatus 900 may further include the transceiver unit 905 and an antenna 906. The transceiver unit 905 may be referred to as a transceiver machine, a transceiver circuit, or a transceiver, and is configured to implement receiving and sending functions of the communication apparatus through the antenna 906.
It should be understood that the operations in the foregoing method embodiments may be implemented by using a logic circuit in a form of hardware or instructions in a form of software in the processor 901. The processor 901 may be a CPU, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or a field-programmable gate array (FPGA) or another programmable logic device such as a discrete gate, a transistor logic device, or a discrete hardware component.
In the several embodiments provided in this application, it should be understood that the disclosed apparatuses and methods may be implemented in other manners. For example, the foregoing described apparatus embodiments are merely examples. For example, division into modules is merely logical function division and may be other division during actual embodiment.
When the method in embodiments of this application is implemented in a form of a software functional unit and sold or used as an independent product, the method may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions or some of the technical solutions in this application may be implemented in a form of a software product. The computer software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or some of the operations of the methods in embodiments of this application. The storage medium includes at least any medium that can store program code, such as a universal serial bus (USB) flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc. The foregoing descriptions are merely specific embodiments 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.
Number | Date | Country | Kind |
---|---|---|---|
202011276780.4 | Nov 2020 | CN | national |
This application is a continuation of International Application No. PCT/CN2021/104427, filed on Jul. 5, 2021, which claims priority to Chinese Patent Application No. 202011276780.4, filed on Nov. 16, 2020. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Name | Date | Kind |
---|---|---|---|
20190296769 | Zhang | Sep 2019 | A1 |
20200083912 | Chen | Mar 2020 | A1 |
Number | Date | Country |
---|---|---|
112019019980 | Apr 2020 | BR |
107342842 | Nov 2017 | CN |
108599891 | Sep 2018 | CN |
109150384 | Jan 2019 | CN |
3570472 | Nov 2019 | EP |
WO-2017092543 | Jun 2017 | WO |
WO-2018028351 | Feb 2018 | WO |
WO-2018127155 | Jul 2018 | WO |
WO-2018161941 | Sep 2018 | WO |
WO-2018166423 | Sep 2018 | WO |
Entry |
---|
He Gaoning et al:“Beta-Expansion:A Theoretical Framework for Fast and Recursive Construction of Polar Codes”, Globecom 2017, Dec. 4, 2017, total 6 pages, XP033299889. |
Number | Date | Country | |
---|---|---|---|
20230283299 A1 | Sep 2023 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2021/104427 | Jul 2021 | WO |
Child | 18317259 | US |