A polar code segmentation encoding method and related apparatus
By using the polar code segmentation encoding method, the information bit sequence is divided into multiple segments and rate matched, which solves the performance improvement problem of Bluetooth system under the requirements of low latency and low power consumption, and achieves a balance between decoding latency and encoding performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2026-03-24
AI Technical Summary
Existing Bluetooth system coding methods cannot effectively improve system performance while meeting low latency requirements, especially the decoding algorithm of convolutional codes, which faces challenges under the requirements of low power consumption and low latency.
The polar code segmentation coding method is adopted. By dividing the information bit sequence into multiple segments and performing rate matching during the encoding process, the segment code length of each segment is ensured to decrease in a decreasing trend, so as to balance decoding delay and encoding performance.
While meeting the low latency requirements, it effectively improves the performance of the Bluetooth system, reduces decoding latency, and increases encoding efficiency.
Smart Images

Figure CN115149964B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronics, and in particular to a polar code segmentation encoding method and related device. BACKGROUND
[0002] With the increasing demand of user experience, the low latency requirement of Bluetooth system by terminal equipment is more and more strict. Meanwhile, the low power consumption requirement of Bluetooth system brings greater challenge to the implementation of low latency Bluetooth system.
[0003] At present, the encoding mode of Bluetooth system usually adopts convolution code, and the decoding algorithm of convolution code is Viterbi decoding algorithm with backtracking. The encoding mode of convolution code cannot further improve the system performance of Bluetooth system while meeting the increasingly strict low latency requirement. SUMMARY
[0004] The embodiments of the present application provide a polar code segmentation encoding method and related device, which can effectively improve the system performance while meeting the low latency requirement.
[0005] In a first aspect, the present application provides a polar code segmentation encoding method, comprising: determining a target code length after polar code encoding according to the information bit number of a first information bit sequence and a first code rate, and determining an initial code length based on the target code length, the initial code length being an integer multiple of a minimum segmentation code length; dividing the first information bit sequence into S information bit sequences based on the first code rate and the initial code length, the S information bit sequences respectively corresponding to S segments after encoding; wherein the segmentation code length of an i-th segment in the S segments is greater than or equal to the segmentation code length of an (i+1)-th segment in the S segments, the segmentation code length of an S-th segment in the S segments is less than a maximum segmentation code length, the sum of the segmentation code lengths of the S segments is equal to the initial code length, and the segmentation code length of a segment is a power of 2; when the initial code length is different from the target code length, performing rate matching on the S segments in the process of polar code encoding on the S information bit sequences, and the sum of the segmentation code lengths of the S segments after rate matching is equal to the target code length.
[0006] By implementing the embodiments of the present application, the segmentation code length of each segment of the first information bit sequence after segmentation is determined before polar code segmentation encoding of the first information bit sequence, so that the segmentation code length of the last segment is less than the maximum segmentation code length; and rate matching is performed in the segmentation encoding process, so that the total code length of the first information bit sequence after encoding is equal to the target code length. In this way, the decoding latency and the encoding performance can be effectively balanced, that is, the system performance can be effectively improved while meeting the low latency requirement.
[0007] In an implementation manner, the minimum segmentation code length is 2 ∧a , and the maximum segmentation code length is 2∧b , the cth segment code length in the b-a+1 segment code lengths is 2 ∧c , the cth segment code length in the b-a+1 segment code lengths is 2 ∧c , the cth segment code length in the b-a+1 segment code lengths is 2
[0008] In an implementation manner, the target code length N2 corresponding to the first information bit sequence is ceil(K0 / R), where K0 represents the information bit number of the first information bit sequence, and R represents the first code rate.
[0009] In an implementation manner, the initial code length N1 is ceil(N2 / 2 ∧b )*2 ∧b , the initial code length is an integer multiple of the maximum segment code length, and ceil(x) represents rounding x up; or the initial code length N1 is ceil(N2 / 2 ∧a )*2 ∧a .
[0010] It can be understood that the segment code lengths are all powers of 2, in order to make the segment code length of each segment meet the power of 2, the sum of the segment code lengths of the S segments (that is, the initial code length) can be an integer multiple of the minimum segment code length, or an integer multiple of the maximum segment code length.
[0011] In an implementation manner, the S segments are rate matched in the process of polar code encoding on the S information bit sequences, and the sum of the segment code lengths of the S segments after rate matching is the target code length, including: when the target code length is less than the initial code length, the S segments are respectively rate matched by puncturing and / or shortening in the process of polar code encoding on the S information bit sequences; when the target code length is greater than the initial code length, the S segments are respectively rate matched by adding redundant bits at preset positions of the S segments in the process of polar code encoding on the S information bit sequences; the total number of bits of the S segments after rate matching is the first bit number, and the first bit number is the difference between the initial code length and the target code length.
[0012] In the embodiments of the present application, when the initial code length and the target code length are different, rate matching is performed on the S segments in the segmented encoding process. The total code length corresponding to the S segments after rate matching is the target code length, thereby ensuring that the total code rate of the first information bit sequence after encoding is the preset first code rate.
[0013] In an implementation, the rate matching of the S segments in the polar code encoding process of the S information bit sequences includes: determining an initial bit number of the first segment for rate matching based on the segment code length of the first segment in the S segments; and determining the bit number of the first segment for rate matching as the initial bit number of the first segment after being rounded down or rounded up plus an adjustment bit number of the first segment, the adjustment bit number of the first segment being determined based on a difference between a sum of the rounded initial bit numbers of the S segments and the first bit number.
[0014] In an implementation, the segment code length of the first segment is 2 c , a≤c≤b; the determining of the initial bit number of the first segment for rate matching based on the segment code length of the first segment in the S segments includes: determining the initial bit number of the first segment for rate matching as 2 c / N1*|N1-N2| based on a proportion of the segment code length of the first segment in the initial code length.
[0015] In an implementation, the b-a+1 segment code lengths correspond to respective second weight factors for rate matching, the segment code length of the first segment is 2 c , a≤c≤b; the determining of the initial bit number of the first segment for rate matching includes: determining the initial bit number of the first segment for rate matching as h c *x, h c representing the second weight factor corresponding to the segment code length 2 c , and a sum of the initial bit numbers of the S segments after rate matching is equal to the first bit number.
[0016] In an implementation, when the target code length is smaller than the initial code length, the smaller the segment code length, the smaller the second weight factor corresponding to the segment code length; when the target code length is greater than the initial code length, the smaller the segment code length, the greater the second weight factor corresponding to the segment code length.
[0017] It should be noted that the smaller the second weight factor corresponding to the segment with the smaller segment code length, the smaller the number of bits punctured and / or shortened by the segment with the smaller segment code length. In an implementation, the second weight factor corresponding to the segment code length 2 c+1 is smaller than the second weight factor corresponding to the segment code length 2 cWhen the ratio of the second weighting factor is greater than 2, the bitrate of segments with longer code lengths can increase more significantly, while the bitrate of segments with shorter code lengths can increase less significantly, thus effectively balancing the coding performance of different segments.
[0018] In one implementation, the longest segment code length among the S segments is 2. r If a ≤ r ≤ b, the segment code length of the above S segments is 2. r The number of segments is M. r In the above S segments, the segment code length is less than 2. r The number of bits for rate matching in the segment is 0; the determination of the initial number of bits for rate matching in the first segment based on the segment code length of the first segment among the above S segments includes: determining that the segment code length in the above S segments is 2. r M r The initial number of bits for rate matching in the first segment of each segment is |N1-N2| / M r .
[0019] In one implementation, determining the initial number of bits for rate matching of the first segment based on the segment code length of the first segment among the S segments includes: determining the initial number of bits for rate matching of the first segment among the S segments as |N1-N2| / S.
[0020] In one implementation, the above-mentioned division of the initial code length into the above-mentioned S segments based on the first code rate includes: determining the number of segments for each of the above-mentioned b-a+1 segment code lengths based on the initial code length and the above-mentioned b-a+1 segment code lengths; dividing the initial code length into the above-mentioned S segments based on the number of segments for the above-mentioned b-a+1 segment code lengths, wherein the segment code length of the i-th segment in the above-mentioned S segments is greater than or equal to the segment code length of the (i+1)-th segment in the above-mentioned S segments, and the segment code length of the S-th segment in the above-mentioned S segments is less than the above-mentioned maximum segment code length.
[0021] In this embodiment, to control the overall decoding delay of the master code after encoding the first information bit sequence, the embodiment first determines the segment code length of each segment after encoding the information bit sequence, so that the segment code length of each segment in the master code shows a decreasing trend. That is, the initial code length of the master code is first divided into S segments, and then the first information bit sequence is divided into S segments according to the segment code length of the S segments. This embodiment can effectively improve system performance while ensuring the decoding delay requirement.
[0022] In one implementation, determining the number of segments for each of the b-a+1 segmented code lengths based on the initial code length and the aforementioned b-a+1 segmented code lengths includes: based on the initial code length and the maximum segmented code length 2 ∧bDetermine the number of segments F1 of the aforementioned maximum segment code length; decompose the first remaining code length after removing the aforementioned F1 maximum segment code lengths from the initial code length into at least one non-maximum segment code length, and determine the number of segments for each of the aforementioned at least one non-maximum segment code lengths, wherein the aforementioned non-maximum segment code lengths are those with a segment code length less than 2. ∧b The segment code length.
[0023] In one implementation, when the initial code length is an integer multiple of the maximum segment code length mentioned above, F1 takes the value N1 / 2. ∧b -1; When the initial code length is not an integer multiple of the maximum segment code length mentioned above, F1 takes the value floor(N1 / 2). ∧b floor(x) means rounding x down.
[0024] In one implementation, determining the number of segments for each of the b-a+1 segmented code lengths based on the initial code length and the b-a+1 segmented code lengths includes: determining the number of reserved segments corresponding to each of the b-a+1 segmented code lengths based on the initial code length and the b-a+1 segmented code lengths; determining the reserved code length corresponding to the initial code length based on the reserved segment length; determining the remaining number of segments corresponding to each of the b-a+1 segmented code lengths based on the initial code length, the reserved code length, and the reserved segment length; and determining the number of segments for each of the b-a+1 segmented code lengths as the sum of the reserved segment length and the remaining segment length.
[0025] In one implementation, determining the target information bit count for each of the S segments based on their segment code lengths includes: decomposing the information bit count of the first information bit sequence into segments using a protocol-agreed decomposition method. M c This indicates that the segment code length of the above S segments is 2. c The number of segments, K c This indicates that the segment code length of the above S segments is 2. c The number of target information bits in the segment, K c <2 c , a≤c≤b.
[0026] In one implementation, determining the target information bits for each of the S segments based on their segment code lengths includes: determining the segment code length of each of the S segments to be 2 based on the first code rate and the aforementioned b-a+1 segment code lengths. c The number of reference information bits in the segment is ceil(2). ∧c *R) or floor(2) ∧c*R), a≤c≤b; Based on the reference information bit count and the first redundant bit count of the above S segments, determine the target information bit count of each segment in the above S segments. The sum of the target information bit counts of the above S segments is the information bit count K0 of the first information bit sequence. The first redundant bit count is the sum of the parameter information bit counts of the above S segments minus K0.
[0027] In one implementation, determining the target information bit number of each segment in the S segments based on the reference information bit number and the first redundant bit number of the S segments includes: determining that the target information bit number of the i-th segment in the S segments is the parameter information bit number of the i-th segment minus the first redundant bit number, and that the target information bit number of the second segment in the S segments other than the i-th segment is the parameter information bit number of the second segment, where 1≤i≤S.
[0028] In one implementation, the value of i is S.
[0029] In one implementation, the largest of the S segment code lengths mentioned above is 2. r The segment code length of the above S segments is 2. r The number of segments is M. r , a≤r≤b; The above determination of the target information bit number of each segment in the above S segments based on the reference information bit number and the first redundant bit number of the above S segments includes: determining the segment code length of the above S segments to be 2 r The number of target information bits in the segment is equal to the segment code length of 2. r The number of parameter information bits in the segment; allocate the first excess information bits to the SM in the above S segments. r Each segment code length is less than 2 b The number of target information bits in the segment determines the above SM. r Each segment code length is less than 2 b The number of target information bits in the second segment of the segment is the number of parameter information bits in the second segment minus the number of extra information bits allocated.
[0030] In one implementation, determining the target information bit count for each of the S segments based on the number of reference information bits and the first redundant bit count includes: when the first redundant bit count is less than the segment code length of the Sth segment, determining the target information bit count for the Sth segment as the number of reference information bits for the Sth segment minus the first redundant bit count; and the target information bit count for the first S-1 segments of the S segments is the number of reference information bits for the first S-1 segments. When the first number of redundant information bits is greater than or equal to the sum of the reference information bits of the last j segments in the above S segments, and less than the sum of the reference information bits of the last j+1 segments in the above S segments, the first number of redundant information bits is allocated to the last j segments. The target number of the last j segments is determined to be the parameter information bits of the last j segments minus the allocated number of redundant information bits. The target number of the first Sj segments in the above S segments is the reference information bits of the first Sj segments.
[0031] In one implementation, the smaller the segment code length, the larger the number of extra information bits allocated to the segment.
[0032] In one implementation, determining the number of reserved segments corresponding to each of the b-a+1 segmented code lengths based on the initial code length includes: determining the number of reserved segments corresponding to each of the b-a+1 segmented code lengths in ascending order of the segmented code lengths, based on the initial code length and the b-a+1 segmented code lengths.
[0033] In this embodiment, to ensure that the segment code lengths of the aforementioned S segments exhibit a decreasing trend (i.e., the segment code length of the (j+1)th segment of the S segments is less than or equal to the segment code length of the jth segment), after determining the initial code length, a certain number of segments with smaller segment code lengths can be reserved in advance. It can be understood that prioritizing the reservation of a certain number of segments with smaller segment code lengths ensures that the segment code length of the tail segment of the mother code after encoding the first information bit sequence is less than the maximum segment code length.
[0034] In one implementation, the determination of the number of reserved segments for each of the b-a+1 segmented code lengths based on the initial code length includes: when N1 < p*2 ∧a At that time, the segment code length is determined to be 2. ∧a The corresponding number of reserved segments is Segment code length 2 ∧j The corresponding reserved segment number is 0, a < j ≤ b; when At that time, the segment code length is 2 ∧j The corresponding reserved segment number is 0, and the segment code length is 2. ∧c+1 The corresponding number of reserved segments is Segmented code length 2 ∧v The corresponding number of reserved segments is the above p, a ≤ c ≤ b - 1, a ≤ v ≤ c, c + 1 < j ≤ b; when it is determined that the number of reserved segments corresponding to each of the above segmented code lengths is the above p.
[0035] In the embodiments of the present application, the value of p can be determined according to the actual situation. The lower the relative reception rate reporting rate, the larger the value of p.
[0036] In one implementation, determining the remaining number of segments corresponding to each of the above segmented code lengths based on the initial code length, the reserved code length, and the number of reserved segments corresponding to each of the above segmented code lengths includes: obtaining a second remaining code length by subtracting the reserved code length from the initial code length; based on the second remaining code length, successively determining the remaining number of segments corresponding to each of the b - a + 1 segmented code lengths from largest to smallest in terms of the segmented code length.
[0037] It should be noted that the larger the segmented code length, the better the coding gain and error correction ability. In the embodiments of the present application, in order to minimize the decoding delay limit, the number of reserved segments for the segments with a smaller segmented code length can be given first. Under the condition of meeting the decoding delay limit, the above remaining code length is preferentially allocated to the segments with a larger segmented code length to improve the overall coding performance of the first information sequence coding.
[0038] In one implementation, determining the remaining number of segments corresponding to each of the above segmented code lengths based on the initial code length, the reserved code length, and the number of reserved segments corresponding to each of the above segmented code lengths includes: when N1 < 2 ∧a the remaining number of segments z ∧c corresponding to the segmented code length 2 c is 0, and the remaining number of segments z ∧a corresponding to the segmented code length 2 a is 1, a < c ≤ b; when N1 ≥ 2 ∧a the remaining number of segments corresponding to each of the above segmented code lengths is successively determined from largest to smallest in terms of the segmented code length, and the remaining number of segments z ∧b corresponding to the segmented code length 2 b [[ID=3②]]is the remaining number of segments z ∧c corresponding to the segmented code length 2 c is a ≤ c < b, N res represents the second remaining code length.
[0039] In one implementation, the value of P is 1 or 2.
[0040] In one implementation, before determining the target code length after polar code encoding based on the number of information bits in the first information bit sequence and the first code rate, the method further includes: establishing a Bluetooth connection between the transmitting device and the receiving device; after dividing the first information bit sequence into S segments based on the first code rate and the initial code length, the method further includes: the transmitting device performing polar code encoding on the i-th information bit sequence based on the target information bit number of the i-th segment in the S segments and the segment code length of the corresponding segment of the i-th information bit sequence, where i is a positive integer less than S; and the transmitting device transmitting the information encoded by the i-th information bit sequence to the receiving device via the Bluetooth channel.
[0041] In a second aspect, an electronic device is provided, comprising: a communication interface, a memory, and a processor; the communication interface, the memory, and the processor are coupled together, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor reads the computer instructions from the memory, the electronic device performs any possible implementation as described in the first aspect.
[0042] Thirdly, this application provides a communication chip, which may include: a processor, and one or more interfaces coupled to the processor. The processor may be used to retrieve a portion or all of the implementation program of the polar code segmentation encoding method provided in the first aspect from memory, and execute the instructions contained in that portion or all of the program. The interface may be used to output the data processing results of the processor.
[0043] Fourthly, a computer-readable storage medium is provided, comprising instructions, characterized in that, when the instructions are executed on an electronic device, the electronic device performs any possible implementation as described in the first aspect.
[0044] Fifthly, a computer product is provided such that when the computer program product is run on a computer, the computer performs any of the possible implementations of the first aspect. Attached Figure Description
[0045] Figure 1 This application provides a schematic diagram of the system architecture of a communication system.
[0046] Figure 2 A decoding delay diagram provided for an embodiment of this application;
[0047] Figure 3 A flowchart illustrating a polar code segmentation encoding method provided in an embodiment of this application;
[0048] Figure 4Another decoding delay diagram provided for an embodiment of this application;
[0049] Figure 5 A flowchart illustrating a segmentation method provided in an embodiment of this application;
[0050] Figure 6 A flowchart illustrating another segmentation method provided in an embodiment of this application;
[0051] Figure 7 Another decoding delay diagram provided for an embodiment of this application;
[0052] Figure 8 A schematic diagram illustrating the principle of another polar code segmented encoding and segmented decoding provided for embodiments of this application;
[0053] Figure 9 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0054] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0055] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0056] Bluetooth communication technology is an open, global standard for wireless data and voice communication. It's a special short-range wireless technology that establishes a communication environment for fixed and mobile devices based on low-cost, short-range wireless connections. Bluetooth communication technology features low cost, low power consumption, short-range communication, high frequency (frequency hopping technology), and good security.
[0057] Figure 1 This illustration shows the network architecture of a Bluetooth communication system 10 according to an embodiment of this application. For example... Figure 1As shown, the Bluetooth communication system 10 may include: a terminal device 100 and at least one Bluetooth device near the terminal device 100, such as a speaker 101, a tablet computer 102, a smartwatch 103, and a Bluetooth headset 104. Wherein:
[0058] The terminal device 100 and / or the Bluetooth device can be stationary or mobile. In some embodiments of this application, the terminal device 100 can be implemented as a mobile phone, tablet computer, computer with wireless transceiver capabilities, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in smart grid, wireless terminal in transportation safety, etc. It is not limited to these embodiments. Figure 1 The speaker 101, tablet 102, smartwatch 103, and Bluetooth headset 104 shown are included. The communication system 10 may also include other Bluetooth devices, such as in-vehicle devices, wearable devices, etc.
[0059] Figure 1 Both the terminal device 100 and the Bluetooth device shown include a Bluetooth communication module, and the distance between the Bluetooth device and the terminal device 100 is within the preset range of Bluetooth communication. The terminal device 100 can transmit signals through its Bluetooth communication module to detect and scan for Bluetooth devices near the terminal device 100, enabling it to discover nearby Bluetooth devices via the Bluetooth communication protocol, establish Bluetooth connections with them, and transmit data to the connected Bluetooth devices. Conversely, the Bluetooth device can also scan and discover the terminal device 100 and establish a Bluetooth connection with it.
[0060] To enable interoperability between different devices on different platforms, Bluetooth communication protocols have been developed for various possible and universally applicable application scenarios, such as A2DP (Advanced Audio Distribution Profile) and HFP (Hands-Free Profile). In one implementation, the maximum payload indicator bit of a Bluetooth data frame is 10 bits, meaning the frame length ranges from 0 to 1024 bytes (i.e., 0 to 1024 * 8 bits).
[0061] Bluetooth communication system 10 is extremely sensitive to latency. For example, after receiving data, a Bluetooth headset needs to process the data and reply with an acknowledgment message within a very short time. Furthermore, systems requiring low power consumption typically limit the power of information reporting. The reporting rate of information bits to the MAC layer is limited by this power, and Bluetooth communication system 10 is primarily constrained by decoding latency and information reporting latency. Therefore, the requirement for low power consumption presents a greater challenge to achieving a low-latency Bluetooth system.
[0062] The embodiments of this application employ a segmented encoding method using Polar codes in a Bluetooth communication system to extend the maximum payload length and effectively improve transmission capability and system performance while ensuring low latency.
[0063] The ploar code segmentation encoding method provided in this application is not limited to the Bluetooth communication system described above. It is also applicable to the following communication systems: Narrow Band-Internet of Things (NB-IoT), Global System for Mobile Communications (GSM), Enhanced Data Rate for GSM Evolution (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access 2000 (CDMA2000), Time Division-Synchronization Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), and next-generation 5G mobile communication systems, etc. In other words, the ploar code segmentation encoding method provided in this application can be applied to information interaction between network devices and terminal devices in the above communication systems, as well as information interaction between network devices in the above communication systems. No specific limitations are made here.
[0064] The core idea of Polar codes lies in channel polarization, that is, on the encoding side, an encoding method is adopted to make each sub-channel exhibit different reliabilities. When the code length continues to increase, some channels will tend to be noise-free channels with a capacity close to 1, and some channels will tend to be fully noisy channels with a capacity close to 0. Then, information is directly transmitted on the channels with a capacity close to 1 to approximate the ideal channel capacity. Polar codes are the first coding method that has been theoretically proven to achieve the Shannon capacity. They have the characteristics of high performance and relatively low encoding and decoding complexity. At different code lengths, especially for finite codes, the performance of Polar codes is far superior to that of Turbo codes and LDPC codes.
[0065] Polar codes are a type of linear block code, and their generator matrix is F N , and its encoding process is as follows where is a binary row vector with a length of N (i.e., the code length). F N is an N×N matrix, and here is defined as the Kronecker product of log2 N matrices F2.
[0066] During the encoding process of Polar codes, according to the generator matrix F N the channel capacities corresponding to the information bits from 1 to N are calculated, and the k information bits are transmitted at the k positions with the largest channel capacities. The set of indices of the above k information bits in is denoted as I; the other N - k positions with smaller channel capacities are frozen bits, and the frozen bits are fixed values (such as 0) pre-agreed by the transmitter and receiver. c The set of indices of the above frozen bits in
[0067] is represented by the complement set I
[0068] of I. On the decoding side, decoding is performed based on algorithms such as the Successive Cancellation (SC) decoding algorithm or the Successive Cancellation List (SCL) decoding algorithm, etc., to obtain performance close to that of maximum likelihood decoding with relatively low implementation complexity. This embodiment does not impose special restrictions on the decoding algorithm. In this way, K information bits are encoded into an N-bit mother code, where K < N; for Polar codes, N must be a power of 2. The larger N is, the stronger the error correction ability and the greater the coding gain, but the decoding complexity and decoding delay are also greater.
[0067] Polar codes are linear block codes. When the transmitted data packet is very large and far exceeds the maximum mother code length set by Polar codes, the transmitted data can be segmented.
[0068] Furthermore, it should be noted that during the Polar code encoding process, the code length of the encoder output is always a power of 2. If the actual required code length is not a power of 2 due to the preset code rate, rate matching is required during the encoding process to obtain the desired code length. Rate matching methods for Polar codes include shortening, puncturing, and / or repeating. Typically, when the actual required code length is less than the encoder output code length, shortening and / or puncturing can be used; when the actual required code length is greater than the encoder output code length, repeating can be used. Specifically:
[0069] Shortening: that is, adjusting the information vector to be encoded This design ensures that certain bits in the encoded master code have fixed values (typically 0), while other bits in the master code are largely unaffected. This allows the transmitter to omit these bits with fixed values (e.g., 0) from the master code, while the receiver still recognizes these fixed values, effectively shortening the master code length. Since the receiver knows the shortened positions are fixed, it sets the likelihood ratio (LLR) of these positions to positive infinity during rate matching decoding.
[0070] Punching: Certain bits in the encoded master code are removed, while other bits in the master code are left largely unaffected. This allows the transmitter to avoid transmitting the removed bits from the master code. Unlike shortening, the removed bits in puncturing are not necessarily fixed values. For example, the removed bits may be 0 or 1. When decoding rate matching, the receiver fills the LLR (Local Rate Range) at the punctured positions with 0, indicating that the probability of these punctured bits being 0 or 1 is 50% each.
[0071] Repetition: Add a repeating bit sequence to the master code output by the encoder. The repeating bit sequence is a bit sequence that already exists in the master code.
[0072] The following describes the Polar code segmentation encoding method provided in the embodiments of this application, taking the terminal device 100 as an example. The proposed method is also applicable to the Bluetooth device side and network device side involved in the above communication system.
[0073] In some embodiments of this application, the terminal device 100 divides the first information bit sequence into n segments based on a preset segment code length L (e.g., 1024 bits) and a code rate of 1. Correspondingly, the encoded master code of the first information bit sequence includes n segments corresponding to the aforementioned n information bit sequences, and the segment code length of each segment is L, where L is an integer power of 2. The first n-1 segments of the aforementioned n information bit sequences have the same number of information bits, and the code rate of each segment is equal to the aforementioned code rate of 1. The last segment of the information bit sequence may or may not have the same number of information bits as the first n-1 segments. When they are unequal, the code rate of the last segment can be made equal to the aforementioned code rate of 1 by performing rate matching on the segments corresponding to the last segment (i.e., by rate matching methods such as puncturing, shortening, and / or repetition).
[0074] It should be noted that, in the embodiments of this application, the code length of each segment after encoding the information bit sequence is simply referred to as the segment code length.
[0075] For example, such as Figure 2 The diagram illustrates the decoding delay of the Polar code segmented encoding scheme provided in this application embodiment. After receiving each segment, the Bluetooth device begins decoding that segment and can report the decoded data to the upper layer while decoding. The overall decoding delay is the time from the completion of receiving the last segment (i.e., segment #n-1) (or the start of decoding) to the end of data reporting. For example, the total information bit sequence has 1000 bits, the code rate is 1 equal to 0.25, and the segment code length L is 1024. Based on the code rate 1 and L, the total information bit sequence is divided into 4 segments. The first 3 segments each have 256 bits, and the 4th segment has 232 bits.
[0076] Depend on Figure 2 It can be seen that the overall decoding latency is mainly limited by the decoding and reporting time of the last segment, that is, by the segment code length of the last segment. For the above Polar code segmentation coding scheme, increasing the segment code length L (e.g., choosing the maximum segment code length) can improve error correction capability and coding gain, but at the same time, the decoding complexity and decoding latency also increase; conversely, decreasing the segment code length L can reduce decoding complexity and decoding latency, but at the same time, the error correction capability and coding gain become worse.
[0077] This application also provides a segmented encoding method for Polar codes, which can effectively balance decoding latency and encoding performance, that is, it can effectively improve system performance while meeting low latency requirements.
[0078] For example, Figure 3This is a flowchart of the polar code segmentation encoding method provided in the embodiments of this application. For example... Figure 3 As shown, the Polar segmentation encoding method provided in this application includes, but is not limited to, steps S201 to S204. The possible implementations of this method are further described below.
[0079] S201. Determine the initial code length and target code length after encoding based on the number of information bits in the first information bit sequence and the first code rate.
[0080] In this embodiment, the terminal device 100 determines the target code length N2 based on the number of information bits K0 of the first information bit sequence to be encoded and the first code rate R. The value of N2 is ceil(K0 / R), where ceil(x) represents rounding down x. Specific implementations for determining the initial code length include, but are not limited to, implementation method 1 and implementation method 2.
[0081] Implementation method 1: Based on the target code length N2 and the maximum segment code length 2 ∧b Determine the initial code length N1, where N1 takes the value ceil(N2 / 2). ∧b )*2 ∧b Based on the above method for determining the initial code length, it is guaranteed that the initial code length after encoding is an integer multiple of the maximum segment code length.
[0082] Implementation Method 2: Based on the target code length N2 and the minimum segment code length 2 ∧a Determine the initial code length N1, where N1 takes the value ceil(N2 / 2). ∧a )*2 ∧a Based on the above method for determining the initial code length, it is guaranteed that the initial code length after encoding is an integer multiple of the minimum segment code length.
[0083] It should be noted that the segment code length corresponding to each segment after ploar code encoding is equal to a power of 2, and is less than or equal to the maximum segment code length of 2. ∧b (e.g., 1024), greater than or equal to the minimum segment code length 2. ∧a (e.g., 128). In this application embodiment, there are b-a+1 possible segment code lengths, where the c-th segment code length among the b-a+1 possible segment code lengths is 2. ∧c , where a, b, and c are positive integers, and a≤c≤b.
[0084] For example, if K0 is 10000 bits, the first code rate is 2 / 3, a equals 7, b equals 10, and N2 is calculated to be 15000 bits, then through implementation method 1 above, N1 is determined to be 15960 bits (i.e., 15 x 1024 bits). Through implementation method 2 above, N1 is determined to be 15104 bits (i.e., 14 x 1024 bits plus 768 bits).
[0085] Furthermore, in this embodiment, the first code rate is a preset encoding parameter, which the terminal device 100 can directly obtain; alternatively, the first code rate can be indirectly obtained by the terminal device 100 based on known information. In one implementation, the first code rate is determined based on a preset number of input information bits and a preset number of output information bits.
[0086] S202. Based on the first code rate and the initial code length, the mother code corresponding to the first information bit sequence is divided into S segments; wherein, the segment code length of the i-th segment in the above S segments is greater than or equal to the segment code length of the (i+1)-th segment, and the segment code length of the S-th segment in the above S segments is less than the maximum segment code length.
[0087] It is understood that in this embodiment, the terminal device 100 intends to segment and encode the first information bit sequence. To control the overall decoding delay of the encoded master code, this embodiment first determines the segment code length of each segment after encoding the information bit sequence, so that the segment code length of each segment in the master code exhibits a decreasing trend. That is, the initial code length of the master code is first divided into S segments, and then the first information bit sequence is divided into S segments according to the segment code lengths of the S segments. This embodiment can effectively improve system performance while ensuring the required decoding delay.
[0088] In some embodiments, the segment code length of the Sth segment among the S segments is less than the maximum segment code length. Thus, after the first information bit sequence is segmented and encoded using ploar codes, the segment code length of the last segment in the mother code is less than the maximum segment code length, effectively reducing the decoding and reporting time of the last segment.
[0089] In some embodiments, the segment code length of the last s segments of the S segments is less than the maximum segment code length, where s is a positive integer greater than 1 and less than S. It can be understood that at least two segments at the end of the S segments are less than the maximum segment code length, thus avoiding an excessively large difference in segment code length between the S-th segment and the (S-1)-th segment. It should be noted that if the difference in segment code length between the S-th segment and the (S-1)-th segment is too large, it is possible that when the S-th segment is received, the decoding and reporting of the (S-1)-th segment has not yet finished, thus affecting the overall decoding delay of the first information bit sequence. For example, as shown... Figure 4 As shown, the segment code length of the first S-1 segments in the S segments is the maximum segment code length, and the segment code length of the Sth segment (i.e., segment #S-1) in the above S segments is the minimum segment code length. The overall decoding delay of the first information bit sequence is affected by the decoding and reporting time of the S-1th segment (i.e., segment #S-2) in the above S segments.
[0090] In an embodiment of the present application, the terminal device 100 determines the number of segments for each of the above b - a + 1 segment lengths based on the initial length and the above b - a + 1 segment lengths; and divides the initial length into the above S segments based on the number of segments of the above b - a + 1 segment lengths.
[0091] In some embodiments, as Figure 5 shown, implementing step S202 may specifically include, but is not limited to, steps S202A to S202B.
[0092] Where:
[0093] S202A. Determine the number F1 of segments of the maximum segment length based on the initial length.
[0094] In some embodiments, the terminal device 100 calculates the initial length N1 through the above implementation manner 1, and the initial length is an integer multiple of the maximum segment length. The terminal device 100 determines that the value of the number F1 of segments of the maximum segment length is N1 / 2 ∧b - 1. For example, by determining through implementation manner 1 that N1 is equal to 15960 bit (i.e., 15 1024 bit), it can be calculated that F1 is equal to 14.
[0095] In some embodiments, the terminal device 100 calculates the initial length N1 through the above implementation manner 2, and the initial length is not an integer multiple of the maximum segment length. The terminal device 100 determines that the value of the number F1 of segments of the maximum segment length is floor(N1 / 2 ∧b ) or floor(N2 / 2 ∧b ). For example, by determining through implementation manner 1 that N1 is equal to 15104 bit (i.e., 14 1024 bit plus 768 bit), it can be calculated that F1 is equal to 14.
[0096] S202B. Decompose the first remaining length after removing F1 maximum segment lengths from the initial length into at least one non - maximum segment length, and determine the number of segments of the above at least one non - maximum segment length.
[0097] In an embodiment of the present application, the first remaining length N3 can be expressed as N1 - F1 * 2 ∧b , and the non - maximum segment length is 2 i , where a ≤ i < b. Referring to the above implementation manner 1 and implementation manner 2, the initial length N1 and the above b - a + 1 segment lengths are all integer multiples of the minimum segment length (i.e., 2 a ), so the above first remaining length is also an integer multiple of the minimum segment length. Therefore, the terminal device 100 can decompose the above first remaining length N3 into at least one non - maximum segment length, that is M iThis indicates that the segment code length is 2. i The number of segments of the segment.
[0098] S202C. The initial code length is divided into S segments according to the number of segments of the b-a+1 segment code lengths. The segment code length of the i-th segment in the above S segments is greater than or equal to the segment code length of the (i+1)-th segment. The segment code length of the S-th segment in the above S segments is less than the maximum segment code length.
[0099] It can be understood that the sum of the number of segments of the b-a+1 segment code lengths is S, and the initial code length of the mother code is divided into S segments according to the segment code length from largest to smallest.
[0100] This application embodiment can also implement step S202 through other segmentation methods. In some embodiments of this application, such as Figure 6 As shown, step S202 may specifically include, but is not limited to, steps S202D to S202G. Wherein:
[0101] S202D. Based on the initial code length, minimum segment code length, and maximum segment code length, determine the number of reserved segments corresponding to each segment code length among the b-a+1 segment code lengths and the reserved code length corresponding to the initial code length.
[0102] In this embodiment, to ensure that the code length of the last s segments of the aforementioned S segments is less than the maximum segment code length, and that the segment code lengths of the last s segments exhibit a decreasing trend (i.e., the segment code length of the (j+1)th segment among the last s segments is less than or equal to the segment code length of the jth segment), the terminal device 100, after determining the initial code length, can reserve a certain number of segments for the smaller segment code lengths. It can be understood that prioritizing the reservation of a certain number of segments for the smaller segment code lengths ensures that the segment code length of the tail segment of the mother code after encoding the first information bit sequence is less than the maximum segment code length.
[0103] In some embodiments, determining the number of reserved segments corresponding to the i-th segment code length among the b-a+1 segment code lengths and the reserved code length corresponding to the initial code length N1 includes: determining the number of reserved segments corresponding to the i-th segment code length among the b-a+1 segment code lengths according to the initial code length and the segment code length of each segment, in ascending order of segment code length; and determining the reserved code length corresponding to the initial code length based on the number of reserved segments corresponding to each segment code length.
[0104] In one implementation, determining the number of reserved segments corresponding to the i-th segment code length among the b-a+1 segment code lengths and the reserved code length corresponding to the initial code length N1 specifically includes: when N1 <p*2 ∧a At that time, the segment code length was determined to be 2. ∧a The number of reserved segments for the segmentation is The segment code length is 2. ∧jThe number of reserved segments in the segmented part is 0, a < j ≤ b; when the segmented code length is 2 ∧j The number of reserved segments in the segmented part is 0, and the segmented code length is 2 ∧c+1 The number of reserved segments in the segmented part is The segmented code length is 2 ∧v The number of reserved segments in the segmented part is p, where a ≤ c ≤ b - 1, a ≤ v ≤ c, c + 1 < j ≤ b; when it is determined that the number of reserved segments corresponding to each segmented code length is p. According to the number of reserved segments corresponding to each of the above segmented code lengths, the corresponding N1 reserved code length N res , m c represents the number of reserved segments in the segmented part with a segmented code length of 2 ∧c .
[0105] Since the reporting rate is very low relative to the receiving rate, after the current segment is received, the reporting of the previous segment has not ended, which will have a great impact on the decoding and reporting delays. In the embodiments of the present application, the value of p can be determined according to the actual situation. The lower the reporting rate relative to the receiving rate, the larger the value of p.
[0106] It should be noted that the Bluetooth bandwidth is equal to B1, the reporting bandwidth is equal to B2, and the code rate is R. N corresponds to S segments, and the segmented code lengths of the i-th segment and the (i + 1)-th segment in the above S segments are both N i and N i+1 . The receiving duration of the above (i + 1)-th segment is The reporting duration of the above i-th segment is When it will cause that after the above (i + 1)-th segment is received, the reporting of the above i-th segment has not ended, thereby affecting the starting point of the reporting of the above (i + 1)-th segment. At this time Therefore, in the above situation, it may affect the overall decoding delay. In the present application, N i ≥ N i+1 . To reduce the impact of the reporting of the above i-th segment on the reporting of the above (i + 1)-th segment, N i can be made equal to N i+1 . Therefore, in the embodiments of the present application, to effectively reduce the impact of the reporting of the above i-th segment on the decoding delay, p segments can be reserved in advance for the same segmented code length.
[0107] For example, if p is taken as 2, a is taken as 7, and b is taken as 8, then according to N1, the number of reserved segments corresponding to 4 segmented code lengths is shown in Table 1.
[0108]
[0109] Table 1
[0110] As can be seen from Table 1, when N1 < 256, the reserved code length corresponding to N1 is When 256 ≤ N1 < 768, the reserved code length corresponding to N1 is p * 2 ∧7 , that is, 256; when 768 ≤ N1 < 1792, the reserved code length corresponding to N1 is p * (2 ∧7 + 2 ∧8 ), that is, 768; when 1792 ≤ N1 < 3840, the reserved code length corresponding to N1 is p * (2 ∧7 + 2 ∧8 + 2 ∧9 ), that is, 1792; when 3840 ≤ N1, the reserved code length corresponding to N1 is p * (2 ∧7 + 2 ∧8 + 2 ∧8 + 2 ∧9 ), that is, 3840.
[0111] In some embodiments, p is taken as 1, and the terminal device 100 does not need to reserve multiple segments for segments with the same segmented code length, which is applicable to cases.
[0112] For example, when p is taken as 1, a is taken as 7, and b is taken as 8, the number of reserved segments corresponding to 4 kinds of segmented code lengths determined according to N1 is shown in Table 2. <00In some embodiments, determining the number of segments corresponding to the above b - a + 1 types of segment lengths according to the initial code length, reserved code length, and the number of reserved segments corresponding to each segment length specifically includes: The terminal device 100 obtains the second remaining code length according to the initial code length and the reserved code length; Based on the second remaining code length, the remaining number of segments corresponding to each segment length is determined in descending order of the segment length, that is, the second remaining code length is segmented again; The number of segments of the segment corresponding to each segment length is determined according to the number of reserved segments and the remaining number of segments corresponding to each segment length. It can be understood that by determining the remaining number of segments of each above-mentioned segment in descending order of the segment length, the above second remaining code length can be preferentially allocated to the segments with larger segment lengths.
[0118] It should be noted that the larger the segment length, the better the coding gain and error correction ability. In an alternative embodiment of step S202D, to minimize the decoding delay limit, the number of reserved segments of the segments with smaller segment lengths is given first. Under the condition of meeting the decoding delay limit, the above second remaining code length is preferentially allocated to the segments with larger segment lengths to improve the overall coding performance of the first information sequence coding.
[0119] In some embodiments, determining the remaining number of segments corresponding to the above b - a + 1 types of segment lengths according to the initial code length, reserved code length, and the number of reserved segments corresponding to each segment length specifically includes: When N1 < 2 ∧a the remaining number of segments z ∧c of the segment with a segment length of 2 c is 0, where a < c ≤ b, and the remaining number of segments z ∧a of the segment with a segment length of 2 a is 1; When N1 ≥ 2 ∧a the remaining number of segments corresponding to each above-mentioned segment length is determined in descending order of the segment length, and the remaining number of segments z ∧b of the segment with a segment length of 2 b is The remaining number of segments z ∧c of the segment with a segment length of 2 c is where a ≤ c < b.
[0120] For example, if 'a' is 7 and 'b' is 10, the four segment code lengths are determined to be 1024, 512, 256, and 128, respectively. Let's illustrate this with N1 values of 1024, 2048, 2560, and 6144. When N1 is 1024, the reserved code length is 896, and the second remaining code length is 128; when N1 is 2048, the reserved code length is 1920, and the second remaining code length is 128; when N1 is 2560, the reserved code length is 1920, and the second remaining code length is 640; when N1 is 6144, the reserved code length is 1920, and the second remaining code length is 4224. The number of remaining segments for the four segmentation types when N1 is 1024, 2048, 2560, and 6144 is shown in Table 3.
[0121] N1 Second remaining code length z 10 ]]> 1024 128 0 0 0 1 2048 128 0 0 0 1 2560 640 0 1 0 1 6144 4224 4 0 0 1
[0122] Table 3
[0123] S202F: Based on the number of reserved segments and the number of remaining segments corresponding to each segment code length (b-a+1), determine the number of segments corresponding to each segment code length.
[0124] In some embodiments, the terminal device 100 determines that the segment code length is 2. ∧c The number of segments M c M c =m c +z c Where a≤c≤b. It can be understood that M... b =F1.
[0125] For example, if 'a' is 7 and 'b' is 10, the four segment code lengths are 1024, 512, 256, and 128, respectively. When N1 is 2048, the reserved segments for the four segment code lengths are 1, 1, 1, and 1, respectively, and the remaining segments for the four segment code lengths are 0, 0, 0, and 1, respectively. Therefore, the number of segments for the four segmentation methods corresponding to N1 are 1, 1, 1, and 2, respectively.
[0126] S202G: Divide the initial code length into S segments according to the number of segments of the b-a+1 segment code lengths. The segment code length of the i-th segment in the above S segments is greater than or equal to the segment code length of the (i+1)-th segment. The segment code length of the S-th segment in the above S segments is less than the maximum segment code length.
[0127] Not limited to through Figure 5 and Figure 6 The segmentation method described in the relevant embodiments can be used by the terminal device 100 in this application embodiment to implement step S202 in other segmentation methods, which are not specifically limited here.
[0128] In some embodiments, the segment code length is 2∧i and segment code length 2 ∧i+2 The number of segments in each segment is greater than 0, and the segment code length is 2. ∧i+1 The number of segments in a segment code is 0, where a ≤ i ≤ b - 2. For example, the number of segments in segments with a segment code length of 1024 and 256 is greater than 0, while the number of segments in a segment code length of 512 is 0. In some embodiments, the segment code length is 2... ∧i and segment code length 2 ∧i+3 The number of segments in each segment is greater than 0, and the segment code length is 2. ∧i+1 and segment code length 2 ∧i+2 The number of segments in each segment is 0, and a≤i≤b-3. For example, the number of segments in segments with a segment code length of 1024 and 128 is greater than 0, while the number of segments in segments with a segment code length of 512 and 256 is 0.
[0129] It is understood that in the embodiments of this application, the two segment code lengths corresponding to two adjacent segments in the above S segments can be the same segment code length, or they can be two adjacent segment code lengths among the above b-a+1 segment code lengths, or they can be two non-adjacent segment code lengths among the above b-a+1 segment code lengths. No specific limitation is made here.
[0130] S203. Based on the segment code length and first code rate of the above S segments, determine the target information bit number of each segment, and divide the first information bit sequence into S segments based on the target information bit number of each segment.
[0131] In some embodiments, based on the segment code lengths of the S segments and the first code rate, the target information bit count corresponding to each segment is determined. Specifically, this includes: the terminal device 100 decomposes the information bit count K0 of the first information bit sequence into segments according to a protocol-defined decomposition method. This determines the target information bits of each segment corresponding to each segment code length. Wherein, K c The segment code length is 2. c The number of target information bits in the segment, K c <2 c , a≤c≤b.
[0132] In some embodiments, determining the target information bits corresponding to each segment based on the segment code lengths of the S segments and the first code rate specifically includes: First, the terminal device 100 determines the target information bit number K of the segments with the F1 largest segment code lengths among the S segments based on the first code rate R. b K b for ceil(2) ∧b *R)(or floor(2) ∧b *R)); then determine the number of remaining information bits K corresponding to the segment with a non-maximum segment code length. resEqual to N1 - F1 * K b ; Then, based on the remaining number of information bits K res and the number of segments of each non-maximum segment length, determine the target number of information bits for each segment of non-maximum segment length, that is, the target number of information bits for the segment with segment length 2 i where a ≤ i < b.
[0133] It can be understood that the maximum segment length among the segment lengths of the above S segments is 2 r , when r is less than b, the number of segments F1 of the segment with the maximum segment length is equal to 0, and the sum of the number of segments of the segments with non-maximum segment lengths is equal to S.
[0134] In some embodiments, the above determination of the target number of information bits for each segment of non-maximum segment length specifically includes: decomposing the remaining number of information bits K res by a decomposition method agreed upon by the protocol into so as to determine the target number of information bits for the segments corresponding to each non-maximum segment length. Among them, K i is the target number of information bits for the segment with segment length 2 i , K i < 2 i where a ≤ i < b.
[0135] In some embodiments, the above determination of the target number of information bits for each segment of non-maximum segment length specifically includes: based on the first code rate, determining the reference number of information bits for the segment corresponding to the non-maximum segment length 2 i , that is, ceil(2 ∧i * R) (or floor(2 ∧i * R)), a ≤ i < b. When the sum K1 refer of the reference numbers of information bits for the S - F1 segments of non-maximum segment lengths is greater than K[[ID=�8]] res , reduce the reference numbers of information bits for the above S - F1 segments of non-maximum segment lengths to obtain the target numbers of information bits for the above S - F1 segments. The above S - F1 segments of non-maximum segment lengths are reduced by a total of K1 refer - K res information bits.
[0136] Specifically, in one implementation, if K1 refer - K res is less than the reference number of information bits for the last segment among the above S segments, then determine the target number of information bits for the last segment as the reference number of information bits for this segment minus K1 refer - K res , and the target numbers of information bits for the other segments of non-maximum segment lengths except the above last segment are the reference numbers of information bits for this segment; when K1refer -K res If the sum of the reference information bits of the last j segments is greater than or equal to the sum of the reference information bits of the last j+1 segments, then decrease the number of reference information bits of the last j segments to obtain the target number of reference information bits for the last j segments. The total number of reference information bits for the last j segments is reduced by K1. refer -K res The number of target information bits for segments other than the last j segments is the number of reference information bits for that segment.
[0137] Specifically, in another implementation, the smaller the segment code length, the greater the reduction in the number of information bits, thus resulting in a lower code rate for segments with smaller code lengths. For example, a first weighting factor is set for the reduction in the number of information bits corresponding to the segment code length. The smaller the segment code length, the larger the first weighting factor, so that the smaller the segment code length, the more information bits are reduced, thereby resulting in a lower code rate for that segment. The number of information bits reduced in the i-th segment among the S segments can be represented as y. i *K i *x, where y i K is the first weighting factor corresponding to the segment code length of the i-th segment mentioned above. i Let a be the number of reference information bits for the i-th segment, a ≤ i ≤ a + j - 1, and let the number of information bits reduced for the last j segments satisfy the following condition. By solving for x in the above formula, we can calculate the number of information bits reduced for each of the last j segments, and thus determine the target number of information bits for the last j segments. When the calculated number of information bits reduced is not an integer, we can perform rounding (e.g., rounding up for all segments, rounding down for all segments, or rounding up for later segments and rounding down for earlier segments), and fine-tuning to make the total number of information bits reduced for the last j segments equal to K1. refer -K res The method of fine-tuning is not specifically limited. For example, if the total number of information bits reduced after rounding is greater than K1, then... refer -K res If there are t more, then subtract t from the last segment; if there are t fewer, then add t from any segment other than the last segment (e.g., the j-th segment from the end).
[0138] It should be noted that, under the same channel environment and the same segment code rate, the larger the segment code length, the lower the packet error rate and the greater the coding gain for that segment; conversely, under the same channel environment and the same segment code length, the smaller the segment code rate, the lower the packet error rate and the greater the coding gain for that segment. In some embodiments of this application, the number of target information bits for each segment can be adjusted to make the code rate of segments with smaller segment code lengths lower, thereby improving the coding performance of those segments.
[0139] For example, K0 is 10000 bits, N1 is 15960 bits (i.e., 15 x 1024 bits), a is 7, and b is 10. Through the above embodiment, F1 is determined to be 14, and the second remaining code length is 1024 bits. The second remaining code length can be divided into 512 bits, 256 bits, 128 bits, and 128 bits, corresponding to the last four segments of the aforementioned S segments. Therefore, the target information bit count for the segment with the largest segment length is determined to be 683, and the reference information bit counts for the last four segments are 342, 170, 86, and 86, respectively, i.e., K1. refer and K res They are 684 and 437 respectively, K1 refer -K res The result is 247. 247 is greater than the number of reference information bits in the last two segments (172), and less than the sum of the reference information bits in the last three segments (342). Therefore, 247 is subtracted from the total number of reference information bits in the last three segments. The weighting factor for a 256-bit segment code length is set to 0.4, and the weighting factor for a 128-bit segment code length is set to 0.6. After solving the above formula and rounding, it is determined that the 256-bit segment code length will be reduced by 97 bits, and the two segments of the 128-bit segment code length will be reduced by 75 bits and 75 bits respectively. The target information bit counts for the last four segments are 342 bits, 73 bits, 11 bits, and 11 bits, respectively.
[0140] In some embodiments, determining the target information bits corresponding to each segment based on the segment code lengths of the S segments and the first code rate specifically includes: the terminal device 100 determining the reference information bits of each segment in the S segments based on the first code rate and the segment code lengths of each segment; and determining the target information bits of each segment based on the reference information bits of each segment and the segment code length of that segment. Optionally, the segment code length in the S segments is determined to be 2 based on the code rate R and the segment code lengths of each segment. ∧c The number of reference information bits in the segment is ceil(2). ∧c *R)(or).
[0141] It is understandable that, in order to ensure that the number of reference information bits in the segment is a positive integer, it is necessary to (2 ∧c *R) rounded up, therefore, the sum of the reference information bits of the S segments in the above embodiment is K2 refer The number of information bits is greater than or equal to K0, and the segment code rates of the above S segments are nearly equal.
[0142] It should be noted that in this embodiment, the number of reference information bits for each segment can be determined first, and then the number of target information bits for each segment can be adjusted according to actual needs based on the number of reference information bits.
[0143] In some embodiments, determining the target information bit count of a segment based on the number of reference information bits and the segment code length of each segment includes: determining the target information bit count of each of the S segments based on the number of reference information bits and a first redundant bit count, wherein the sum of the target information bit counts of the S segments is the number of information bits K0 of the first information bit sequence, and the first redundant bit count is K0 minus the sum of the parameter information bits of the S segments, i.e., K2. refer -K0.
[0144] In some embodiments, determining the target information bit count of a segment based on the number of reference information bits and the segment code length of each segment may specifically include: determining the target information bit count of the i-th segment among the S segments as the number of reference information bits of that segment minus K2. refer -K0; Determine the target information bit count of the second segment (excluding the i-th segment) among the S segments as the reference information bit count of that segment. The second segment is any segment among the S segments except the i-th segment. Where 1≤i≤S, i can be a pre-defined value, and this application embodiment does not specifically limit this. In one implementation, i equals S, that is, the target information bit count of the S-th segment among the S segments is determined as the reference information bit count of that segment minus K2. refer -K0.
[0145] In some embodiments, the largest of the S segment code lengths is 2. r The segment code length of the above S segments is 2. r The number of segments is M. r , a≤r≤b; The above determination of the target information bit number of each segment in the above S segments based on the reference information bit number and the first redundant bit number of the above S segments includes: determining the segment code length of the above S segments to be 2 r The number of target information bits in the segment is equal to the segment code length of 2. rThe number of parameter information bits in the segment; allocate the first excess information bits to the SM in the above S segments. r Each segment code length is less than 2 b The number of target information bits in the segment determines the above SM. r Each segment code length is less than 2 b The target information bits of the second segment in the segmentation are the parameter information bits of the second segment minus the number of extra information bits allocated. The second segment is the aforementioned SM. r Each segment code length is less than 2 b Any segment in the segmentation.
[0146] In some embodiments, determining the target information bit count for each of the S segments based on the number of reference information bits and the first redundant bit count includes: when the first redundant bit count is less than the segment code length of the Sth segment, determining the target information bit count for the Sth segment as the number of reference information bits for the Sth segment minus the first redundant bit count; and the target information bit count for the first S-1 segments of the S segments is the number of reference information bits for the first S-1 segments. When the number of first redundant information bits is greater than or equal to the sum of the reference information bits of the last j segments in the S segments, and less than the sum of the reference information bits of the last (j+1) segments in the S segments, the first redundant information bits are allocated to the last j segments. The target information bit number of the last j segments is determined as the parameter information bit number of the last j segments minus the allocated redundant information bits. The target information bit number of the first Sj segments in the S segments is the reference information bit number of the first Sj segments. In one implementation, segments with smaller segment code lengths are allocated a larger number of redundant information bits.
[0147] In some embodiments, the largest segment code length among the above S segments is 2. ∧r The above-mentioned determination of the target information bit count for each segment based on the number of reference information bits and the segment code length specifically includes: based on the number of reference information bits for each segment, setting the segment code length to 2... ∧r The number of information bits is increased by segmenting the data to obtain the target number of information bits for that segment; for segments with a code length less than 2... ∧r The Sf segments reduce the number of information bits, thus obtaining the target number of information bits for that segment; where the segment code length is 2. ∧r M r Each segment adds a total of the first information bits, and the segment code length is less than 2. ∧r The Sf segments reduce the number of bits of the first information plus K2. refer -K0, and make the code rate of the segment with the smaller segment code length among the above Sf segments smaller.
[0148] In some embodiments, the segment with the largest segment code length among the S segments has a segment code length of 2. ∧r The above-mentioned determination of the target information bit count for each segment based on the number of reference information bits and the segment code length of each segment specifically includes: when r equals a, decreasing M. a The number of reference information bits for the minimum segment code length, to obtain the above M a The number of target information bits in each segment, M above a The total reduction of K2 across all segments refer -K0 information bits; when r is greater than a, the segment code length is determined to be 2. ∧r The number of target information bits in a segment is the number of reference information bits in that segment plus... The segment code length is 2. ∧c The number of target information bits in a segment is the number of reference information bits in that segment minus... in, a≤c <r, The segment code length is 2. ∧c The segmentation ratio parameter, It is a positive integer.
[0149] In one implementation, It should be noted that, At this time, the bitrate of the above Sf segments can show a decreasing trend.
[0150] For example, if 'a' is 7 and 'b' is 10, the four segment code lengths are 1024, 512, 256, and 128, respectively. K0 is 1024, and the code rate is 0.5. As derived from the scheme proposed in this application, N1 is 2048, and the number of segments corresponding to the above four segment code lengths is 1, 1, 1, and 2, respectively. The number of reference information bits corresponding to the above four segment code lengths are 512, 256, 128, and 64, respectively. Let... and If the values are 2, 4, and 6 respectively, the number of information bits corresponding to the four segment code lengths are 526, 250, 124, and 62. The segment code rates for the above four segments are 0.5137, 0.4883, 0.4844, 0.4844, and 0.4844 respectively. It can be seen that the segment code lengths of the four segments in the above mother code show a decreasing trend, and the segment code rates of the above four segments also show a decreasing trend.
[0151] It should be noted that when r equals b, and the number of segments M b When the value is large, it will cause the segment with the largest segment code length among the above S segments to increase the number of information bits too much, while the other segments will decrease the number of information bits too much.
[0152] In some embodiments, to avoid the above-mentioned problems, the determination of the target information bit count for each segment based on the number of reference information bits for each segment and the number of segments of each type specifically includes: when M b When T >, the segment code length is determined to be 2. ∧b M b The number of target information bits in the first T segments of a segment is the number of reference information bits in that segment plus... The above M b The last M in each segment b The number of target information bits in the -T segments is equal to the number of reference information bits in that segment, and the segment code length is 2. ∧c The number of target information bits in a segment is the number of reference information bits in that segment minus... Where T is a positive integer, a≤c <b, It is a positive integer.
[0153] It is understandable that, based on the number of reference information bits, by adjusting the number of target information bits in each segment, the code rate of the segment with the largest code length among the S segments can be increased, while the code rate of the segments with a non-largest code length among the S segments can be decreased. Furthermore, among the segments with a non-largest code length, the segments with smaller code lengths have lower code rates. This appropriately reduces the coding performance of the segments with larger code lengths and appropriately improves the coding performance of the segments with smaller code lengths, ultimately effectively improving the overall system performance.
[0154] S204. Based on the segment code length corresponding to each segment of information bit sequence, the above S segments of information bit sequence are encoded using ploar code. When the initial code length and the target code length are different, during the ploar code encoding process, the above S segments are rate matched according to the first code rate and the segment code length of the above S segments. After rate matching, the actual code length of the mother code (i.e. the above S segments) corresponding to the first information bit sequence is the target code length.
[0155] It should be noted that, due to the limitation that the segment length of the ploar code must be a power of 2, the total code rate after encoding the first information bit sequence is limited and cannot meet the preset first code rate. For example, if K0 is 10000 bits, the first code rate is 2 / 3, a equals 7, and b equals 10. Based on the first code rate, the target code length N2 is calculated to be 15000 bits. Using the above implementation method 1, the initial code length N1 is determined to be 15960 bits. The difference between N1 and N2 is 960 bits, and the code rate corresponding to N1 is approximately 0.6266. Alternatively, using the above implementation method 2, the initial code length N1 is determined to be 15104 bits. The difference between N1 and N2 is 104 bits, and the code rate corresponding to N1 is approximately 0.6621.
[0156] In this embodiment, when the initial code length and the target code length are the same, the terminal device 100 performs ploar code encoding on the S segments of the information bit sequence based on the segment code length corresponding to each segment. When the initial code length and the target code length are different, the terminal device 100 performs ploar code encoding on the S segments of the information bit sequence based on the segment code length corresponding to each segment, and performs rate matching on the S segments during the segment encoding process. The total number of bits for rate matching is the first number of bits that differ between the initial code length and the target code length, i.e., |N1-N2|. After rate matching, the total code length corresponding to the S segments is the target code length, thereby ensuring that the total code rate after encoding the first information bit sequence is a preset first code rate. The following is a detailed description of how rate matching is performed when the initial code length and the target code length are different.
[0157] In some embodiments, the target code length is greater than the initial code length. The terminal device adds redundant bits at preset positions in the S segments of the mother code and performs rate matching on each of the S segments with a total code length equal to the initial code length. The total number of bits required for rate matching in the S segments (i.e., the total number of redundant bits added to the S segments) is the first number of bits. Specifically, in one implementation, the terminal device 100 repeats the existing N1-N2 information bits in the mother code at preset positions in the S segments of the mother code. For example, it repeats the last N1-N2 information bits corresponding to the first non-maximum code length segment at the end of the segment, and adds zero redundant bits to other segments. In another implementation, the terminal device 100 adds a total of N1-N2 fixed-value redundant bits at preset positions in the S segments of the mother code. This fixed value is a preset fixed value known to both the sender and receiver (e.g., 0). For example, it adds N1-N2 redundant bits at the end of the first non-maximum code length segment, and adds zero redundant bits to other segments.
[0158] In some embodiments, the target code length is less than the initial code length. The terminal device performs rate matching on S segments with a total code length equal to the initial code length by means of puncturing and / or shortening. The total number of bits of the S segments that are punctured and / or shortened (i.e. the total number of bits of the S segments that need rate matching) is the first number of bits.
[0159] In the above-mentioned ploar code encoding process, based on the first code rate and the segment code lengths of the above-mentioned S segments, rate matching is performed on the above-mentioned S segments. After rate matching, the actual code length of the mother code (i.e., the above-mentioned S segments) corresponding to the first information bit sequence is the target code length. Specifically, this includes: determining the initial number of bits for rate matching of the above-mentioned first segment based on the segment code length of the first segment among the above-mentioned S segments; determining the number of bits for rate matching of the above-mentioned first segment as the initial number of bits of the first segment rounded down or up and then adding the adjustment number of the first segment. The adjustment number of the first segment is determined based on the difference between the sum of the rounded values of the initial number of bits of the S segments and the first number of bits. Here, the first segment can be any segment of the above-mentioned S segments.
[0160] It is understood that in this embodiment of the application, the first number of bits for rate matching is shared by at least one of the S segments. The following details how to determine the number of bits required for rate matching for each of the S segments, with specific implementation methods including, but not limited to, implementation methods 3 to 6.
[0161] Implementation method 3: Based on the proportion of each segment code length in the initial code length, determine the number of bits required for rate matching of the segment corresponding to that segment code length.
[0162] For example, the segment code length is 2. i The proportion of the segments in the initial code length is 2. i / N1, the initial number of bits required for rate matching in this segment is 2. i / N1*|N1-N2|. It should be noted that in this embodiment, when the calculated initial number of bits for rate matching is not an integer, rounding can be performed (e.g., rounding up for all segments, rounding down for all segments, or rounding up for later segments and down for earlier segments), and fine-tuning is used to make the total number of bits for rate matching of the above S segments equal to N1-N2. The fine-tuning method is not specifically limited; it can be understood that the fine-tuning involves adding or subtracting the adjustment bits corresponding to each segment, and the adjustment bits can be equal to 0. For example, after rounding, if the total number of bits for rate matching is g more than N1-N2, then g are subtracted from the total number of bits for rate matching of the last segment, i.e., the adjustment bits for the last segment are -g, and the adjustment bits for other segments are 0; if g are less, then g are added from a preset segment other than the last segment (e.g., the second to last segment), i.e., the adjustment bits for the last segment are g, and the adjustment bits for other segments are 0.
[0163] Implementation Method 4: Each segment requires the same initial number of bits for rate matching, i.e., |N1-N2| / S. If the calculated initial number of bits for rate matching is not an integer, rounding and fine-tuning are performed to ensure that the total number of bits for rate matching of the above S segments is N1-N2. Specifically, the implementation of rounding and fine-tuning can be referred to the aforementioned Implementation Method 3.
[0164] Implementation Method 5: Set a second weighting factor for rate matching corresponding to different segment code lengths. When the target code length is less than the initial code length, the smaller the segment code length, the smaller the second weighting factor corresponding to it. Optionally, the segment code length is 2... c+1 The corresponding second weighting factor and segment code length 2 c The ratio of the corresponding second weighting factor is greater than 2. The segment code length of the above S segments is 2. c The initial number of bits required for rate matching in the corresponding segment can be expressed as h. c *x, where h c Indicates segment code length 2 c The corresponding second weighting factor, the initial number of bits for rate matching of the above S segments satisfies By solving for x in the above formula, the initial number of bits required for rate matching for each segment can be calculated. If the calculated initial number of bits for rate matching is not an integer, rounding and fine-tuning are performed to make the total number of bits for rate matching of the above S segments N1-N2. Specifically, the implementation of rounding and fine-tuning can be referred to the aforementioned implementation method 3.
[0165] It should be noted that the smaller the segment code length, the smaller the corresponding second weight factor, which means that the number of bits punctured and / or shortened in segments with smaller code lengths is less; segment code length 2 c+1 The corresponding second weighting factor and segment code length 2 c When the ratio of the second weighting factor is greater than 2, the bitrate of segments with longer code lengths can increase more significantly, while the bitrate of segments with shorter code lengths can increase less significantly, thus effectively balancing the coding performance of different segments.
[0166] Implementation Method 6: The first bit number of rate matching is distributed among the F1 segments corresponding to the maximum segment code length. The initial bit number of rate matching for each of the F1 segments is (N1-N2) / F1. If the calculated initial bit number of rate matching is not an integer, it is rounded and fine-tuned so that the total number of bits for rate matching of the F1 segments is N1-N2. Specifically, the implementation of rounding and fine-tuning can be referred to the aforementioned Implementation Method 3.
[0167] For example, K0 is 10000 bits, N1 is 15960 bits, N2 is 15000 bits, and N1-N2 equals 960 bits. The first information bit sequence is divided into 18 segments, corresponding to 14 segments of 1024 bits, 1 segment of 512 bits, 1 segment of 256 bits, and 2 segments of 128 bits. These 18 segments require a total of 960 bits of rate matching. Using implementation method 3, the number of bits required for rate matching for the 1024-bit, 512-bit, 256-bit, and 128-bit segments are calculated to be 64 bits, 32 bits, 16 bits, and 8 bits, respectively. Using implementation method 4, the number of bits required for rate matching for each segment is calculated to be 24 bits. Through implementation method 5, the second weighting factors for 1024-bit, 512-bit, 256-bit, and 128-bit segments are set to 2.7, 0.9, 0.3, and 0.1, respectively. Calculations show that the first five 1024-bit segments require 67 bits for rate matching, the last nine 1024-bit segments require 66 bits, and the 512-bit, 256-bit, and 128-bit segments require 22 bits, 7 bits, and 2 bits, respectively. Through implementation method 6, the first seven 1024-bit segments require 69 bits for rate matching, the last seven 1024-bit segments require 68 bits, and the other segments require 0 bits.
[0168] Based on the example above, Figure 7 An exemplary diagram illustrating a decoding delay provided in an embodiment of this application is shown. Figure 7 As shown in the embodiments of this application, after segmenting the first information bit sequence into ploar codes, the segment code length of the tail segment will show a decreasing trend. Since the decoding delay of the first information bit sequence is mainly limited by the decoding and reporting time of the last segment, implementing the embodiments of this application can significantly reduce the decoding delay.
[0169] Figure 8 This is a schematic diagram illustrating the principle of ploar segmented encoding and segmented decoding provided in an embodiment of this application.
[0170] See Figure 8 The sending device and the receiving device establish a Bluetooth connection.
[0171] At the transmitting end, the first information bit sequence to be encoded is divided into S segments. Specifically, the transmitting end divides the master code corresponding to the first information bit sequence into S segments and determines the target information bit count for each of the S segments; then, based on the target information bit count for each of the S segments, the first information bit sequence is divided into S segments. Next, each segment is ploar encoded according to its segment code length, and rate matching is performed during the encoding process; the encoded bit sequence is then digitally modulated and transmitted via a wireless channel (e.g., Bluetooth channel).
[0172] At the receiving end, after receiving the data sent by the sending end, the receiving end performs ploar segmented decoding on the data after digital demodulation. Specifically, according to the ploar segmented encoding method provided in the embodiments of this application, the segment code lengths and rate matching information of the S segments corresponding to the first information bit sequence are determined; based on the segment code lengths and rate matching information of the S segments, the received data is ploar decoded, and rate matching is de-matched during the ploar decoding process to obtain the first information bit sequence.
[0173] The sending end and the receiving end can be... Figure 1 The terminal device 100 or Bluetooth device in the Bluetooth communication system shown can also be a network device or terminal device in other wireless communication systems mentioned above.
[0174] The hardware structure of a terminal device 100 provided in the embodiments of this application is described below.
[0175] Figure 9 An exemplary schematic diagram of the structure of the terminal device 100 provided in an embodiment of this application is shown.
[0176] like Figure 9 As shown, the terminal device 100 may include: a processor 301, a memory 302, a wireless communication processing module 303, an antenna 304, a power switch 305, a wired LAN communication processing module 306, a USB communication processing module 307, and an audio module 308. Among them:
[0177] Processor 301 can be used to read and execute computer-readable instructions. In a specific implementation, processor 301 mainly includes a controller, an arithmetic logic unit (ALU), and registers. The controller is primarily responsible for instruction decoding and issuing control signals for the operations corresponding to the instructions. The ALU is primarily responsible for storing register operands and intermediate operation results temporarily stored during instruction execution. In a specific implementation, the hardware architecture of processor 301 can be an application-specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, or an NP architecture, etc.
[0178] In some embodiments, the processor 301 can be used to parse signals received by the wireless communication module 303 and / or the wired LAN communication processing module 306, such as a probe request broadcast by the terminal 100, etc. The processor 301 can be used to perform corresponding processing operations based on the parsing results, such as generating a probe response, etc.
[0179] In some embodiments, the processor 301 can also be used to generate signals that are transmitted outward by the wireless communication module 303 and / or the wired LAN communication processing module 306, such as Bluetooth broadcast signals and beacon signals.
[0180] Memory 302 is coupled to processor 301 and is used to store various software programs and / or multiple sets of instructions. In specific implementations, memory 302 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 302 may store an operating system, such as uCOS, VxWorks, RTLinux, or other embedded operating systems. Memory 302 may also store communication programs that can be used for communication with terminal 100, one or more servers, or accessory devices.
[0181] The wireless communication module 303 includes a Bluetooth communication module 303A, and may also include one or more of the following: a UWB communication module 303B, a WLAN communication module 303C, and an infrared communication module 303D. The Bluetooth communication module 303A can be integrated onto a system-on-chip (SOC), and the UWB communication module 303A can also be integrated into other communication modules (e.g., the WLAN communication module 303C) in hardware (or software).
[0182] In some embodiments, one or more of the Bluetooth communication module 303A, UWB communication module 303B, WLAN communication module 303C, and infrared communication module 303D can listen to signals emitted by other devices (such as Bluetooth device 101), such as measurement signals, scanning signals, etc., and can send response signals, such as measurement responses, scanning responses, etc., so that other devices (such as Bluetooth device 101) can discover terminal device 10 and establish wireless communication connections with other devices (such as Bluetooth device 101) through one or more short-range wireless communication technologies of Bluetooth, UWB, WLAN, or infrared to perform data transmission.
[0183] In other embodiments, one or more of the Bluetooth communication module 303A, UWB communication module 303B, WLAN communication module 303C, and infrared communication module 303D may also transmit signals, such as broadcasting UWB measurement signals or beacon signals, so that other devices (such as Bluetooth device 101) can discover the terminal device 100 and establish a wireless communication connection with other devices (such as Bluetooth device 101) through one or more short-range wireless communication technologies such as Bluetooth, UWB, WLAN, or infrared to transmit data.
[0184] The wireless communication module 303 may also include a cellular mobile communication module (not shown). The cellular mobile communication processing module can communicate with other devices (such as servers) via cellular mobile communication technology.
[0185] Antenna 304 can be used to transmit and receive electromagnetic wave signals. Antennas from different communication modules can be reused or used independently to improve antenna utilization. For example, the antenna of Bluetooth communication module 303A can be reused as the antenna of WLAN communication module 303B. Alternatively, Bluetooth communication module 303A can use a separate antenna.
[0186] The power switch 305 can be used to control the power supply to the terminal device 100.
[0187] The wired LAN communication processing module 306 can be used to communicate with other devices in the same LAN via a wired LAN, and can also be used to connect to a WAN via a wired LAN to communicate with devices in the WAN.
[0188] The USB communication processing module 307 can be used to communicate with other devices via a USB interface (not shown).
[0189] The audio module 308 can be used to output audio signals through the audio output interface, thus enabling the terminal device 100 to support audio playback. The audio module can also be used to receive audio data through the audio input interface. The terminal device 100 can be a media playback device such as a wireless headset or speaker.
[0190] It should be understood that, Figure 9 The terminal device 100 shown is merely an example, and the terminal device 100 may have more than Figure 9 The more or fewer components shown can be combined into two or more components, or they can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0191] In the embodiments of this application, the hardware structure of the Bluetooth device and network device described in the relevant embodiments of the communication system 10 can also be referred to the relevant description of the terminal device 100, and will not be repeated here.
[0192] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A segmented encoding method for polar codes, characterized in that, include: The target code length after polar code encoding is determined based on the number of information bits in the first information bit sequence and the first code rate, and the initial code length is determined based on the target code length, wherein the initial code length is an integer multiple of the minimum segment code length; Based on the first code rate and the initial code length, the first information bit sequence is divided into S information bit sequences, each of which corresponds to one of the S encoded segments; wherein, the segment code length of the i-th segment in the S segments is greater than or equal to the segment code length of the (i+1)-th segment in the S segments, the segment code length of the S-th segment in the S segments is less than the maximum segment code length, the sum of the segment code lengths of the S segments is equal to the initial code length, and the segment code length of each segment is a power of 2; When the initial code length and the target code length are different, during the polar code encoding process of the S segments of information bit sequence, rate matching is performed on the S segments, and the sum of the segment code lengths of the S segments after rate matching is the target code length. In the process of polar code encoding the S segments of information bit sequence, rate matching is performed on the S segments, and the sum of the segment code lengths of the S segments after rate matching is the target code length, including: When the target code length is less than the initial code length, during the polar code encoding of the S segments of information bit sequence, rate matching is performed on the S segments by puncturing and / or shortening. When the target code length is greater than the initial code length, during the polar code encoding process of the S segments of information bit sequence, redundant bits are added at preset positions of the S segments, and rate matching is performed on the S segments respectively. The total number of bits for the S segment rate matching is the first number of bits, which is the difference between the initial code length and the target code length.
2. The method according to claim 1, characterized in that, The minimum segment code length is The maximum segment code length is , The c-th segment code length in the segment code length is The a、 The b and stated c It is a positive integer. Based on the first code rate and the initial code length, the first information bit sequence is divided into S information bit sequences, each of which corresponds to one of the S encoded segments, including: Based on the first code rate, the initial code length is divided into the S segments; Based on the segment code length of the S segments, determine the number of target information bits for each of the S segments; Based on the target information bit number of each segment, the first information bit sequence is divided into the S segments of information bit sequence.
3. The method according to claim 1, characterized in that, The target code length corresponding to the first information bit sequence for , wherein This represents the number of information bits in the first information bit sequence. This represents the first bit rate.
4. The method according to claim 3, characterized in that, The initial code length Values The initial code length is an integer multiple of the maximum segment code length. Indicates to x Round up; Alternatively, the initial code length Values .
5. The method according to any one of claims 1 to 4, characterized in that, In the process of polar code encoding the S segments of information bit sequence, rate matching is performed on the S segments, and the sum of the segment code lengths of the S segments after rate matching is the target code length, including: Based on the segment code length of the first segment among the S segments, determine the initial number of bits for rate matching of the first segment; The number of bits for the first segment rate matching is determined by rounding down or up the initial number of bits of the first segment and adding the adjustment number of the first segment. The adjustment number of the first segment is determined based on the difference between the sum of the rounded values of the initial number of bits of the S segments and the first number of bits.
6. The method according to claim 5, characterized in that, The segment code length of the first segment is , The step of determining the initial number of bits for rate matching of the first segment based on the segment code length of the first segment among the S segments includes: Based on the proportion of the segment code length of the first segment in the initial code length, the initial number of bits required for rate matching of the first segment is determined as follows. .
7. The method according to claim 5, characterized in that, The Each segment code length corresponds to a second weighting factor for rate matching, and the segment code length of the first segment is... , ; The step of determining the initial number of bits for rate matching of the first segment based on the segment code length of the first segment among the S segments includes: The initial number of bits for the first segment rate matching is determined to be: The Indicates segment code length The corresponding second weighting factor is that the sum of the initial bit counts of the S segmented rate matching is equal to the first bit count.
8. The method according to claim 7, characterized in that, When the target code length is less than the initial code length, the smaller the segment code length, the smaller the second weighting factor corresponding to the segment code length; when the target code length is greater than the initial code length, the smaller the segment code length, the larger the second weighting factor corresponding to the segment code length.
9. The method according to claim 5, characterized in that, The largest segment code length among the S segments is , The segment code length of the S segments is The number of segments is The segment code length of the S segments is less than The number of bits for rate matching in the segment is 0; determining the initial number of bits for rate matching in the first segment based on the segment code length of the first segment among the S segments includes: The segment code length of the S segments is determined to be of The initial number of bits for rate matching in the first segment of the segments is: .
10. The method according to claim 5, characterized in that, The step of determining the initial number of bits for rate matching of the first segment based on the segment code length of the first segment among the S segments includes: The initial number of bits for rate matching of the first segment in the S segments is determined as follows: .
11. The method according to any one of claims 2 to 4, characterized in that, The step of dividing the initial code length into the S segments based on the first code rate includes: Based on the initial code length and the The segment code length is determined to be... The number of segments for each segmented code length; Based on the above The initial code length is divided into S segments, wherein the segment code length of the i-th segment is greater than or equal to the segment code length of the (i+1)-th segment, and the segment code length of the S-th segment is less than the maximum segment code length.
12. The method according to claim 11, characterized in that, The basis is the initial code length and the The segment code length is determined to be... The number of segments for each segmented code length, including: Based on the initial code length and the maximum segment code length Determine the number of segments in the segment with the maximum segment length. F 1; Remove the initial code length from the F The first remaining code length after the maximum segmented code length is decomposed into at least one non-maximum segmented code length, and the number of segments in each non-maximum segmented code length is determined, wherein the non-maximum segmented code length is a segmented code length less than 1. The segment code length.
13. The method according to claim 12, characterized in that, When the initial code length is an integer multiple of the maximum segment code length, the F The value of 1 is ; When the initial code length is not an integer multiple of the maximum segment code length, the F The value of 1 is , Indicates to x Round down to the nearest integer.
14. The method according to claim 11, characterized in that, The basis is the initial code length and the The segment code length is determined to be... The number of segments for each segmented code length, including: Based on the initial code length and the The segment code length is determined to be... The number of reserved segments corresponding to each segment code length; Based on the number of reserved segments corresponding to each segment code length, the reserved code length corresponding to the initial code length is determined; Based on the initial code length, the reserved code length, and the number of reserved segments corresponding to each segment code length, determine the number of remaining segments corresponding to each segment code length; The number of segments for each segment code length is determined as the sum of the reserved number of segments and the remaining number of segments for each segment code length.
15. The method according to any one of claims 2 to 4, characterized in that, The step of determining the target information bits for each of the S segments based on the segment code lengths of the S segments includes: The information bit number of the first information bit sequence is decomposed into the following according to the decomposition method agreed upon in the protocol: The This indicates that the segment code length of the S segments is The number of segments in the segmentation, the This indicates that the segment code length of the S segments is The number of target information bits in the segment. , .
16. The method according to any one of claims 2 to 4, characterized in that, The step of determining the target information bits for each of the S segments based on the segment code lengths of the S segments includes: Based on the first bit rate and the... Given the segment code lengths, determine the segment code length of each of the S segments as follows: The number of reference information bits in the segment is or , ; Based on the number of reference information bits and the number of first redundant information bits in the S segments, the target number of information bits for each of the S segments is determined, and the sum of the target information bits of the S segments is the number of information bits in the first information bit sequence. The first number of redundant information bits is the sum of the number of parameter information bits in the S segments minus the number of redundant information bits in the S segments. .
17. The method according to claim 16, characterized in that, The determination of the target information bit count for each of the S segments based on the reference information bit count and the first redundant information bit count includes: The target information bit count of the i-th segment among the S segments is determined to be the parameter information bit count of the i-th segment minus the first excess information bit count. The target information bit count of the second segment among the S segments excluding the i-th segment is determined to be the parameter information bit count of the second segment. .
18. The method according to claim 17, characterized in that, The i The value is S.
19. The method according to claim 16, characterized in that, The largest of the S segment code lengths is The segment code length of the S segments is The number of segments is , The step of determining the target information bit count for each of the S segments based on the number of reference information bits and the first redundant information bits includes: The segment code length of the S segments is determined to be The number of target information bits in the segment is the segment code length. The number of bits of parameter information in each segment; The first excess information bits are allocated to the S segments. Each segment code length is less than The number of target information bits in the segment is used to determine the... Each segment code length is less than The number of target information bits in the second segment of the segment is the number of parameter information bits in the second segment minus the number of extra information bits allocated.
20. The method according to claim 16, characterized in that, The determination of the target information bit count for each of the S segments based on the number of reference information bits in the S segments and the first redundant information bit count includes: When the number of the first redundant information bits is less than the segment code length of the Sth segment among the S segments, the target information bit number of the Sth segment is determined to be the reference information bit number of the Sth segment minus the first redundant information bits, and the target information bit number of the first S-1 segments among the S segments is the reference information bit number of the first S-1 segments. When the first number of redundant information bits is greater than or equal to the sum of the reference information bits of the last j segments in the S segments, and less than the sum of the reference information bits of the last j+1 segments in the S segments, the first number of redundant information bits is allocated to the last j segments. The target number of information bits of the last j segments is determined to be the parameter information bits of the last j segments minus the allocated number of redundant information bits. The target number of information bits of the first Sj segments in the S segments is the reference information bits of the first Sj segments.
21. The method according to claim 19 or 20, characterized in that, The smaller the segment code length, the more redundant information bits are allocated to the segment.
22. The method according to claim 14, characterized in that, The determination of the initial code length The number of reserved segments corresponding to each segment code length in the various segment code lengths includes: Based on the initial code length and the The segment code length is determined sequentially according to the segment code length from smallest to largest. The number of reserved segments corresponding to each segment code length in the segment code length.
23. The method according to claim 22, characterized in that, The determination of the initial code length The number of reserved segments corresponding to each segment code length in the various segment code lengths includes: when At that time, determine the segment code length. The corresponding number of reserved segments is Segment code length The corresponding reserved segment number is 0. ; when At that time, segment code length The corresponding reserved segment number is 0, and the segment code length is... The corresponding number of reserved segments is Segment code length The corresponding number of reserved segments is as described , , , ; when When, the number of reserved segments corresponding to each segment code length is determined to be the same as the number of reserved segments. .
24. The method according to claim 14, characterized in that, The step of determining the number of remaining segments corresponding to each segment code length based on the initial code length, the reserved code length, and the number of reserved segments corresponding to each segment code length includes: The second remaining code length is obtained by subtracting the reserved code length from the initial code length. Based on the second remaining code length, the segment code lengths are determined sequentially from largest to smallest. The number of remaining segments corresponding to each segment code length.
25. The method according to claim 24, characterized in that, The step of determining the number of remaining segments corresponding to each segment code length based on the initial code length, the reserved code length, and the number of reserved segments corresponding to each segment code length includes: when At that time, segment code length Corresponding number of remaining segments =0, segment code length Corresponding number of remaining segments =1, ; when At that time, the number of remaining segments corresponding to each segment code length is determined in descending order of segment code length. Corresponding number of remaining segments for Segment code length Corresponding number of remaining segments for , , This indicates the second remaining code length.
26. The method according to claim 23, characterized in that, The P The value can be 1 or 2.
27. The method according to claim 1, characterized in that, Before determining the target code length after polar code encoding based on the number of information bits in the first information bit sequence and the first code rate, the method further includes: The transmitting device and the receiving device establish a Bluetooth connection; After dividing the first information bit sequence into S segments based on the first code rate and the initial code length, the method further includes: The transmitting device performs polar code encoding on the i-th information bit sequence based on the target information bit number of the i-th information bit sequence in the S-segment information bit sequence and the segment code length of the segment corresponding to the i-th information bit sequence, where i is a positive integer less than S; The transmitting device transmits the information encoded by the bit sequence of the i-th segment to the receiving device via a Bluetooth channel.
28. An electronic device comprising a memory, one or more processors, multiple application programs, and one or more programs; wherein, The one or more programs are stored in the memory; characterized in that, when the one or more processors execute the one or more programs, the electronic device causes the electronic device to implement the method as described in any one of claims 1 to 27.
29. A computer storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 27.
30. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1 to 27.
Citation Information
Patent Citations
Polar code segment coding method and communication equipment
CN112583522A