INFORMATION PROCESSING METHOD AND APPARATUS, AND DEVICE
20200021310 ยท 2020-01-16
Assignee
Inventors
- Chen Zheng (Shanghai, CN)
- Xiaojian Liu (Shenzhen, CN)
- Yuejun Wei (Shanghai, CN)
- Xin Zeng (Shenzhen, CN)
Cpc classification
H03M13/1148
ELECTRICITY
International classification
Abstract
Embodiments of the present invention disclose an information processing method and apparatus, and a device. The method includes: if R.sub.real is greater than or equal to R.sub.min, determining, based on a maximum code block length K.sub.max of an LDPC (low-density parity-check code) code, a quantity C of code blocks into which a transport block is to be segmented, where R.sub.real is a largest one among an encoding code rate of the transport block, a code rate limit of the transport block, and a minimum code rate of the LDPC code, and R.sub.min is a minimum code rate corresponding to the maximum code block length of the LDPC code, or a larger one between a minimum code rate corresponding to the maximum code block length of the LDPC code and a code rate limit of the maximum code block length of the LDPC code.
Claims
1. An information processing method, comprising: obtaining an encoding code rate of a transport block; and if a first code rate R.sub.real is greater than or equal to a second code rate R.sub.min, determining, based on a maximum code block length K.sub.max of an LDPC (low-density parity-check code) code, a quantity C of code blocks into which the transport block is to be segmented, wherein the first code rate R.sub.real is a largest one among the encoding code rate of the transport block, a code rate limit of the transport block, and a minimum code rate of the LDPC code, and the second code rate R.sub.min is a minimum code rate corresponding to the maximum code block length of the LDPC code, or a larger one between a minimum code rate corresponding to the maximum code block length of the LDPC code and a code rate limit of the maximum code block length of the LDPC code.
2. The method according to claim 1, comprising: if the first code rate R.sub.real is less than the second code rate R.sub.min, determining, based on the first code rate R.sub.real and a maximum encoded length N.sub.CB of a code block, the quantity C of code blocks into which the transport block is to be segmented, wherein if the second code rate R.sub.min is the minimum code rate corresponding to the maximum code block length of the LDPC code, N.sub.CB is a maximum encoded length N.sub.max of the LDPC code; or if the second code rate R.sub.min is the larger one between the minimum code rate corresponding to the maximum code block length of the LDPC code and the code rate limit of the maximum code block length of the LDPC code, N.sub.CB is N.sub.CB,limit, and N.sub.CB,limit is a size of a buffer used by a receive end to store soft information of the code block.
3. The method according to claim 1, wherein the code rate limit of the maximum code block length of the LDPC code is K.sub.max/N.sub.CB,limit, and N.sub.CB,limit is a size of a buffer used by a receive end to store soft information of the code block.
4. The method according to claim 1, wherein the code rate limit of the transport block is (TBS+L.sub.TB,CRC)/N.sub.IR, TBS is a length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, and N.sub.IR is a size of a buffer used by a receive end to store soft information of the transport block.
5. The method according to claim 1, wherein the determining, based on the maximum code block length K.sub.max of the LDPC code, the quantity C of code blocks into which the transport block is to be segmented further comprises: determining, based on the maximum code block length K.sub.max of the LDPC code, the quantity C of code blocks into which the transport block is to be segmented, wherein a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(K.sub.maxL.sub.CB,CRC), wherein TBS is a length of the transport block, L.sub.TB,CRC is a length of the CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
6. The method according to claim 2, wherein the determining, based on the first code rate R.sub.real and the maximum encoded length N.sub.CB of the code block, the quantity C of code blocks into which the transport block is to be segmented further comprises: determining, based on the first code rate R.sub.real and the maximum encoded length N.sub.CB of the code block, the quantity of code blocks into which the transport block is to be segmented, wherein a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), or
C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), where TBS is a length of the transport block, L.sub.TB,CRC is a length of the CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
7. The method according to claim 6, wherein if a sum of the length of the transport block and the length of the CRC bits of the transport block is greater than the maximum code block length of the LDPC code, and the following condition (TBS+L.sub.TB,CRC)mod(R.sub.real*N.sub.CBL.sub.CB,CRC)<Th is satisfied, the value of C satisfies C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), or if a sum of the length of the transport block and the length of the CRC bits of the transport block is greater than the maximum code block length of the LDPC code, and the following condition (TBS+L.sub.TB,CRC)mod(R.sub.real*N.sub.CBL.sub.CB,CRC)Th is satisfied, the value of C satisfies C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), wherein Th is a preset threshold, and the preset threshold Th is equal to 0, or the preset threshold Th is less than or equal to a difference between the maximum code block length of the LDPC code and a length of R.sub.real*N.sub.CB and is greater than 0.
8. An information processing apparatus, wherein the apparatus comprises a processor and a memory, the memory is configured to store a transport block, and the processor is configured to perform the following operations: obtaining an encoding code rate of the transport block; and if a first code rate R.sub.real is greater than or equal to a second code rate R.sub.min, determining, based on a maximum code block length K.sub.max of an LDPC (low-density parity-check code) code, a quantity C of code blocks into which the transport block is to be segmented, wherein the first code rate R.sub.real is a largest one among the encoding code rate of the transport block, a code rate limit of the transport block, and a minimum code rate of the LDPC code, and the second code rate R.sub.min is a minimum code rate corresponding to the maximum code block length of the LDPC code, or a larger one between a minimum code rate corresponding to the maximum code block length of the LDPC code and a code rate limit of the maximum code block length of the LDPC code.
9. The apparatus according to claim 8, wherein if the first code rate R.sub.real is less than the second code rate R.sub.min, the processor is configured to determine, based on the first code rate R.sub.real and a maximum encoded length N.sub.CB of a code block, the quantity C of code blocks into which the transport block is to be segmented, wherein if the second code rate R.sub.min is the minimum code rate corresponding to the maximum code block length of the LDPC code, N.sub.CB is a maximum encoded length N.sub.max of the LDPC code; or if the second code rate R.sub.min is the larger one between the minimum code rate corresponding to the maximum code block length of the LDPC code and the code rate limit of the maximum code block length of the LDPC code, N.sub.CB is N.sub.CB,limit, and N.sub.CB,limit is a size of a buffer used by a receive end to store soft information of the code block.
10. The apparatus according to claim 8, wherein the code rate limit of the maximum code block length of the LDPC code is K.sub.max/N.sub.CB,limit, and N.sub.CB,limit is a size of a buffer used by a receive end to store soft information of the code block.
11. The apparatus according to claim 8, wherein the code rate limit of the transport block is (TBS+L.sub.TB,CRC)/N.sub.IR, TBS is a length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, and N.sub.IR is a size of a buffer used by a receive end to store soft information of the transport block.
12. The apparatus according to claim 8, wherein the processor is configured to determine, based on the maximum code block length K.sub.max of the LDPC code, the quantity C of code blocks into which the transport block is to be segmented, wherein a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(K.sub.maxL.sub.CB,CRC), wherein TBS is a length of the transport block, L.sub.TB,CRC is a length of the CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
13. The apparatus according to claim 8, wherein the processor is configured to determine, based on the first code rate and the maximum encoded length N.sub.CB of the code block, the quantity C of code blocks into which the transport block is to be segmented, wherein a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), or
C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), where TBS is a length of the transport block, L.sub.TB,CRC is a length of the CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
14. The apparatus according to claim 13, wherein if a sum of the length of the transport block and the length of the CRC bits of the transport block is greater than the maximum code block length of the LDPC code, and the following condition (TBS+L.sub.TB,CRC)mod(R.sub.real*N.sub.CBL.sub.CB,CRC)<Th is satisfied, the value of C satisfies C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), or if a sum of the length of the transport block and the length of the CRC bits of the transport block is greater than the maximum code block length of the LDPC code, and the following condition (TBS+L.sub.TB,CRC)mod(R.sub.real*N.sub.CBL.sub.CB,CRC)Th is satisfied, the value of C satisfies C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), wherein Th is a preset threshold, and the preset threshold Th is equal to 0, or the preset threshold Th is less than or equal to a difference between the maximum code block length of the LDPC code and a length of R.sub.real*N.sub.CB and is greater than 0.
15. An information processing apparatus, wherein the apparatus comprises a processor and a memory, the memory is configured to store a transport block, and the processor is configured to perform the following operations: determining whether a length obtained by encoding the transport block based on R.sub.min,K.sub.
16. The apparatus according to claim 15, wherein if the length obtained by encoding the transport block based on R.sub.min,K.sub.
17. The apparatus according to claim 16, wherein the processor is configured to determine, based on the length of the transport block and the minimum code rate of the LDPC code, the quantity of code blocks into which the transport block is to be segmented, wherein a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=min((TBS+L.sub.TB,CRC)/R.sub.min,K, G, N.sub.IR)/N.sub.CB, or
C=min((TBS+L.sub.TB,CRC)/R.sub.min,K, G, N.sub.IR)/N.sub.CB, where TBS is the length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, R.sub.min,K is the minimum code rate of the LDPC code, and N.sub.CB is a smaller value in a maximum encoded length N.sub.max of the LDPC code and the size of the buffer used by the receive end to store the soft information of the code block.
18. The apparatus according to claim 15, wherein the processor is configured to determine, based on the maximum code block length K.sub.max of the LDPC code, the quantity of code blocks into which the transport block is to be segmented, wherein the value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(K.sub.maxL.sub.CB,CRC), wherein TBS is a length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0077] To describe the technical solutions in the embodiments of the present invention or in the background more clearly, the following briefly describes the accompanying drawings required for describing the embodiments of the present invention or the background.
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
DESCRIPTION OF EMBODIMENTS
[0089] The following describes the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention.
[0090]
[0091] The first device needs to calculate, based on a size TBS of a to-be-sent transport block and other related information, a quantity of code blocks into which the transport block needs to be segmented and a size (or referred to as a length) of each code block. After obtaining the quantity of code blocks and the length of each code block through calculation, the first device segments the transport block based on the quantity and the length. After completing the segmentation, the first device independently encodes each code block and performs rate matching on each code block, and then performs a code block concatenation operation on the code blocks to combine the code blocks into one piece of information. This piece of information obtained through combination may be referred to as a target information. The first device sends the target information to the second device.
[0092] The second device receives the target information. The second device also needs to calculate, based on the size TBS of the transport block and other related information, the quantity of code blocks into which the transport block needs to be segmented, the size (or referred to as the length) of each code block, and a length obtained after rate matching of the transport block (which is the same as that performed by a rate matching module at the transmit end). Then the second device segments the target information based on the quantity of code blocks and the length of each code block that are obtained through calculation, and separately performs rate dematching, decoding, and a code block concatenation operation on code blocks obtained through segmentation, to restore data of the TBS.
[0093] It can be learned from the foregoing description that, both the first device and the second device need to calculate the quantity of code blocks into which the transport block is to be segmented, and a calculation rule may be agreed upon in advance according to a same protocol, so that the first device and the second device obtain a same result. In addition, the information used in the calculation process may be partially predefined in the protocol, or may be partially notified between the first device and the second device through communication. For example, the first device may send length information of the transport block to the second device, for use by the second device during subsequent calculation. In the following embodiments of the present invention, the first device is mainly used as an example to describe, by using the following several possible method procedures, how to calculate the quantity of code blocks into which the transport block is to be segmented. A calculation manner used by the second device to calculate the quantity of code blocks into which the transport block is to be segmented is the same as that used by the first device. Therefore, no additional description is provided in the embodiments of the present invention.
[0094]
[0095] Step S401: A first device obtains a current modulation and coding scheme (MCS).
[0096] Specifically, the first device may determine the current modulation and coding scheme MCS based on a current channel status. Usually, if the channel status is good, the first device may select a high code rate and higher-order modulation, and if the channel status is not good, the first device may select a low code rate and lower-order modulation.
[0097] Step S402: The first device determines, based on the obtained MCS, an encoding code rate for sending a transport block.
[0098] Specifically, the first device prestores correspondences between a plurality of MCSs and a plurality of code rates. After determining a modulation and coding scheme MCS, the first device may determine a code rate corresponding to the modulation and coding scheme MCS based on the correspondence. In other words, the first device may obtain the encoding code rate R of the transport block based on the MCS.
[0099] Step S403: The first device compares a value of a first code rate with a value of a second code rate.
[0100] Specifically, bit information obtained after the transport block TB is segmented and encoded is transmitted to a receive end, and the receive end may input the information into a register. Limited buffer cases may exist in the register, for example, a transport block TB limited buffer case and a code block CB limited buffer case. The transport block TB limited buffer specifically means that there is an upper limit value for memory resources occupied in the register by bits information obtained by encoding the entire transport block. In other words, a size of a buffer used by the receive end to store soft information of the transport block may also be referred to as a transport block buffer upper limit N.sub.IR. The code block CB limited buffer specifically means that there is an upper limit value for memory resources occupied in the register by bits information obtained by encoding a code block. In other words, a size of a buffer used by the receive end to store soft information of the code block may also be referred to as a code block buffer upper limit N.sub.CB,limit. As shown in
[0101] In different cases, the first code rate and the second code rate may be calculated in different manners. Examples are shown as follows:
[0102] When a transport block TB buffer is limited, the first device may calculate the first code rate based on a length of the transport block and the transport block buffer upper limit N.sub.IR. For example, a calculation formula may be R.sub.real=max{R,(TBS+L.sub.TB,CRC)/N.sub.IR, R.sub.min,K}, where R.sub.real is the first code rate, TBS is the length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, N.sub.IR is the transport block buffer upper limit, (TBS+L.sub.TB,CRC)/N.sub.IR is a code rate obtained through calculation based on the transport block buffer upper limit N.sub.IR, and may be referred to as a code rate limit, and R.sub.min,K is a minimum code rate of an LDPC code. The transport block buffer upper limit may be sent by the first device to a second device, or may be predefined in a communication protocol of the first device and a second device, or may be learned of by the first device in another manner.
[0103] When a code block CB buffer is limited, the first device may calculate the second code rate based on a maximum code block length of the LDPC and the code block buffer upper limit N.sub.CB,limit. For example, a calculation formula may be R.sub.min=max(R.sub.min,K.sub.
[0104] In an optional solution, the first code rate satisfies the following condition R.sub.real=max{R, (TBS+L.sub.TB,CRC)/N.sub.IR, R.sub.min,K}, where (TBS+L.sub.TB,CRC)/N.sub.IR may be referred to as a code rate limit of the transport block, R.sub.min,K is a minimum code rate of an LDPC code (a minimum code rate supported by the LDPC code), TBS is a length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block. Optionally, numerous values for measuring a code block length are predefined for the LDPC code, and each value for measuring a code block length corresponds to one code rate range. If a length of a code block is exactly equal to the value for measuring a code block length, the code block may be encoded based on a code rate in the code rate range corresponding to the value for measuring a code block length. It may be understood that, there is a largest value in the numerous values for measuring a code block length that are predefined in the LDPC code, and the largest value may be referred to as a maximum code block length of the LDPC. There is a minimum code rate in a code rate range corresponding to the maximum code block length of the LDPC.
[0105] In an optional solution, the second code rate is a minimum code rate corresponding to the maximum code block length of the LDPC code, or a larger one between a minimum code rate corresponding to the maximum code block length of the LDPC code and a code rate limit of the maximum code block length of the LDPC code. When the second code rate is the larger one between the minimum code rate corresponding to the maximum code block length of the LDPC code and the code rate limit of the maximum code block length of the LDPC code, the second code rate satisfies the following condition R.sub.min=max(R.sub.min,K.sub.
[0106] Step S404: If the first code rate is greater than or equal to the second code rate, the first device uses a maximum code block length of the LDPC code as a reference length for segmentation of the transport block.
[0107] In other words, if R.sub.realR.sub.min, it is determined that the reference length for segmentation of the transport block is K.sub.GB,max=K.sub.max.
[0108] Step S405: If the first code rate is less than the second code rate, the first device uses a product of the first code rate and a maximum encoded length N.sub.CB of a code block as a reference length for segmentation of the transport block.
[0109] In other words, if R.sub.real<R.sub.min, it is determined that the reference length for segmentation of the transport block is K.sub.GB,max=N.sub.CB*R.sub.real.
[0110] Step S406: The first device determines a quantity of code blocks into which the transport block is to be segmented.
[0111] Specifically, the first device may perform step S406 after performing step S404 or step S405. The quantity of code blocks into which the transport block is to be segmented is determined before specific segmentation. In other words, after the quantity of code blocks into which the transport block is to be segmented is determined, the segmentation is performed based on information about the quantity. A determining manner may be as follows: Relative values of a sum TBS+L.sub.TB,CRC of the length TBS of the transport block and the length L.sub.TB,CRC of the cyclic redundancy check CRC bits of the transport block and the reference length K.sub.CB,max are compared. If TBS+L.sub.TB,CRCK.sub.CB,max, the transport block does not need to be segmented, to be specific, the quantity C of code blocks CBs is C=1, and a length of the code block is K=TBS+L.sub.TB,CRC. If TBS+L.sub.TB,CRC>K.sub.CB,max, further determining needs to be performed. A determining manner is as follows:
[0112] It is determined whether a remainder obtained by dividing a first parameter by a second parameter is less than a preset threshold Th. The first parameter is a parameter obtained through calculation based on the length (Transport Block Size, TBS) of the transport block. The second parameter is a parameter obtained through calculation based on the reference length K.sub.CB,max. If the remainder is less than the preset threshold Th, the quantity of code blocks into which the transport block is to be segmented is equal to a rounded-down value obtained by dividing the first parameter by the second parameter. If the remainder is greater than the preset threshold Th, the quantity of code blocks into which the transport block is to be segmented is equal to a rounded-up value obtained by dividing the first parameter by the second parameter. In an optional solution, if the remainder obtained by dividing the first parameter by the second parameter is equal to the preset threshold Th, the quantity of code blocks into which the transport block is to be segmented is equal to a rounded-down value obtained by dividing the first parameter by the second parameter. In another optional solution, if the remainder obtained by dividing the first parameter by the second parameter is equal to the preset threshold Th, the quantity of code blocks into which the transport block is to be segmented is equal to a rounded-up value obtained by dividing the first parameter by the second parameter.
[0113] Optionally, the first parameter is equal to the sum TBS+L.sub.TB,CRC of the length TBS of the transport block and the length L.sub.TB,CRC of the cyclic redundancy check of the transport block, and the second parameter is equal to a difference K.sub.CB,maxL.sub.CB,CRC between the reference length K.sub.CB,max and a length L.sub.CB,CRC of cyclic redundancy check CRC bits of the code block.
[0114] In other words, if (TBS+L.sub.TB,CRC)mod(K.sub.CB,maxL.sub.CB,CRC)<Th, a value of C satisfies C=(TBS+L.sub.TB,CRC)/(K.sub.CB,maxL.sub.CB,CRC). In this case, if the transport block is segmented in units of K.sub.CB,max, a small part of bit information may remain. If one extra code block is obtained through segmentation due to this small part of extra information, a quantity of code blocks obtained through segmentation is relatively large. In general, it is not worthwhile to obtain one extra block through segmentation due to this small part of extra bit information.
[0115] If (TBS+L.sub.TB,CRC)mod(K.sub.CB,maxL.sub.CB,CRC)Th, a value of C satisfies C=(TBS+L.sub.TB,CRC)/(K.sub.CB,maxL.sub.CB,CRC). In this case, if the transport block is segmented in units of K.sub.CB,max, a relatively large amount of bit information may remain. In this case, one extra code block may be obtained through segmentation by performing rounding up, so that the relatively large amount of bit information can be effectively transmitted.
[0116] It should be noted that, the preset threshold Th may be a parameter that is preconfigured based on an actual situation and that is used for comparison. Optionally, the preset threshold Th is less than or equal to a difference between the maximum code block length K.sub.max of the LDPC and the reference length K.sub.CB,max and is greater than 0. In other words, 0<ThK.sub.maxK.sub.CB,max.
[0117] For ease of understanding, a specific example is used below for description. It is assumed that TBS=19600, L.sub.TB,CRC=24, K.sub.CB,max=4915, K.sub.max=6144, L.sub.CB,CRC=24, and Th=100. When the defined maximum code block length of the LDPC code is K.sub.CB,max=4915 bits, the corresponding minimum code rate is equal to 1/5. Based on these values, TBS+L.sub.TB,CRC>K.sub.CB,max may be obtained. Therefore, it may be determined that the transport block is to be segmented into a plurality of code blocks. Based on these values, (TBS+L.sub.TB,CRC)mod(K.sub.CB,maxL.sub.CB,CRC)=60 may be further obtained. Because Th=100, (TBS+L.sub.TB,CRC)mod(K.sub.CB,maxL.sub.CB,CRC)<Th is satisfied. Therefore, C=(TBS+L.sub.TB,CRC)/(K.sub.CB,maxL.sub.CB,CRC)=4. It may be understood that, if the transport block is to be segmented into four code blocks, a length of each code block is equal to (19600+24)/4=4906 bits, and after a CB CRC is added, a length of each code block is 4930 bits. The length of 4930 bits is slightly greater than K.sub.CB,max. In addition, it may be learned through calculation that a code rate at which the code block having the length of 4930 bits is encoded is approximately equal to (4930)/(4915/(1/5))=0.2006, and this is very close to the code rate 1/5. Therefore, in terms of a code rate, there is no big difference in subsequent encoding, regardless of a 4915-bit code block or a 4930-bit code block obtained through segmentation. However, in terms of a quantity of code blocks obtained through segmentation, in this embodiment of the present invention, the quantity of code blocks obtained through segmentation is smaller, so that subsequent encoding performance can be improved. As shown in
[0118] In addition, during code block segmentation, there may be a code block group (CB Group) segmentation method, to be specific, several code blocks are used as a group and a CBG CRC is added to the group. In this case, a length CG*L.sub.CBG,CRC of cyclic redundancy check CRC bits of all code block groups further needs to be added to a length (TBS+L.sub.TB,CRC) of the transport block before segmentation, where CG is a code block group quantity, and L.sub.CBG,CRC is a length of cyclic redundancy check CRC bits of a code block group. For example, during calculation of the code rate limit of the transport block, (TBS+L.sub.TB,CRC+CG*L.sub.CBG,CRC)/N.sub.IR is used. For another example, C=(TBS+L.sub.TB,CRC+CG*L.sub.CBG,CRC)/(K.sub.CB,maxL.sub.CB,CRC).
[0119] In the method in shown
[0120]
[0121] Step S701: A first device compares a value of a length obtained by encoding a transport block based on R.sub.min,K.sub.
[0122] Specifically, the length obtained by encoding the transport block based on R.sub.min,K.sub.
[0123] It should be noted that, numerous values for measuring a code block length may be predefined in an LDPC code, and each value for measuring a code block length corresponds to one code rate range. If a length of a code block is exactly equal to the value for measuring a code block length, the code block may be encoded based on a code rate in the code rate range corresponding to the value for measuring a code block length. It may be understood that, there is a largest value in the numerous values for measuring a code block length that are predefined in the LDPC code, and the largest value may be referred to as a maximum code block length of the LDPC. There is a minimum code rate R.sub.min,K.sub.
[0124] It should be noted that, R.sub.min,K.sub.
[0125] Step 5702: If the length obtained by encoding the transport block based on R.sub.min,K.sub.
[0126] Specifically, a rounded-up value obtained by dividing the third parameter by a fourth parameter may be determined as the quantity of code blocks CBs into which the transport block is to be segmented. Optionally, the fourth parameter is equal to the maximum code block length of the LDPC code or a value obtained through calculation based on the maximum code block length of the LDPC. When the fourth parameter is equal to the value obtained through calculation based on the maximum code block length K.sub.max of the LDPC, optionally, the fourth parameter is equal to a sum of the maximum code block length K.sub.max of the LDPC and a length L.sub.CB,CRC of cyclic redundancy check CRC bits of the code block. This may be expressed in the following formula: the fourth parameter X4=K.sub.max+L.sub.CS,CRC.
[0127] It may be understood that, when a size of the transport block is relatively large, the transport block needs to be segmented before transmission to obtain code blocks that have sizes smaller than that of the transport block. A quantity of code blocks into which the transport block is to be segmented needs to be determined before formal segmentation. It can be learned from the foregoing description that, in an optional solution, if (TBS+L.sub.TB,CRC)/R.sub.min,K.sub.
[0128] Step S703: If the length obtained by encoding the transport block based on R.sub.min,K.sub.
[0129] Specifically, the first device calculates, based on a value obtained by dividing the third parameter by the minimum code rate of the LDPC, the quantity of code blocks into which the transport block is to be segmented.
[0130] Specifically, the minimum code rate of the LDPC is a minimum code rate supported by the LDPC code, and may be denoted by R.sub.min,K. For ease of subsequent description, the value obtained by dividing the third parameter by the minimum code rate of the LDPC may be referred to as a fifth parameter. In other words, the fifth parameter X5=(TBS+L.sub.TB,CRC)/R.sub.min,K. The quantity of code blocks into which the transport block is to be segmented may be calculated based on the fifth parameter.
[0131] In an optional solution, a rounded-up value obtained by dividing a smallest value in the fifth parameter, N.sub.IR, and G by a sixth parameter is determined as the quantity of code blocks into which the transport block is to be segmented. The sixth parameter N.sub.CB is equal to a smaller value in a size N.sub.CB,limit of a buffer used by the receive end to store soft information of the code block and a maximum encoded length N.sub.max of the LDPC code. N.sub.CB,limit and N.sub.max may be defined in the communication protocol of the transmit end and the receive end, so that both the transmit end and the receive end can learn of N.sub.CB,limit and N.sub.max. Alternatively, N.sub.CB,limit and N.sub.max may be configured at the receive end, so that if the transmit end needs to learn of N.sub.CB,limit and N.sub.max, the receive end may send N.sub.CB,limit and N.sub.max to the transmit end. It can be learned from the foregoing description that, if (TBS+L.sub.TB,CRC)/R.sub.min,K.sub.
[0132] In addition, during code block segmentation, there may be a code block group (CB Group) segmentation method, to be specific, several code blocks are used as a group and a CBG CRC is added to the group. In this case, a length CG*L.sub.CBG,CRC of cyclic redundancy check CRC bits of all code block groups further needs to be added to a length (TBS+L.sub.TB,CRC) of the transport block before segmentation, where CG is a code block group quantity, and L.sub.CBG,CRC is a length of cyclic redundancy check CRC bits of a code block group. For example, the fifth parameter X5=(TBS+L.sub.TB,CRC+CG*L.sub.CBG,CRC)/R.sub.min,K. For another example, C=min((TBS+L.sub.TB,CRC+CG*L.sub.CBG,CRC)/R.sub.min,K, G, N.sub.IR)/N.sub.CB.
[0133] In the method in shown
[0134] The method in the embodiments of the present invention is described in detail above. An apparatus in the embodiments of the present invention is provided below.
[0135]
[0136] The memory 802 includes but is not limited to a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM), or a portable read-only memory (CD-ROM). The memory 802 is configured to store a related instruction or data, for example, a transport block. The transceiver 803 is configured to receive and send data.
[0137] The processor 801 may be one or more central processing units (CPU). When the processor 801 is one CPU, the CPU may be a single-core CPU, or may be a multi-core CPU.
[0138] The processor 801 in the apparatus 80 is configured to perform an information processing operation, or is configured to read program code stored in the memory 802, to perform an information processing operation. The information process operation specifically includes:
[0139] obtaining an encoding code rate of the transport block; and if a first code rate R.sub.real is greater than or equal to a second code rate R.sub.min, determining, based on a maximum code block length K.sub.max of an LDPC, a quantity C of code blocks into which the transport block is to be segmented, where the first code rate R.sub.real is a largest one among the encoding code rate of the transport block, a code rate limit of the transport block, and a minimum code rate of the LDPC code, and the second code rate R.sub.min is a minimum code rate corresponding to the maximum code block length of the LDPC code, or a larger one between a minimum code rate corresponding to the maximum code block length of the LDPC code and a code rate limit of the maximum code block length of the LDPC code.
[0140] In the foregoing operations, it is determined, based on relative values of the first code rate and the second code rate, how to calculate the quantity of code blocks into which the transport block is to be segmented, instead of directly calculating, based on the maximum code block length of the LDPC code, the quantity of code blocks into which the transport block is to be segmented. In the calculation process, a size of a buffer used by a receive end to store soft information of a code block is used, so that the quantity of code blocks obtained through calculation is more appropriate.
[0141] In an optional solution, if the first code rate R.sub.real is less than the second code rate R.sub.min, the processor is configured to determine, based on the first code rate R.sub.real and a maximum encoded length N.sub.CB of a code block, the quantity C of code blocks into which the transport block is to be segmented, where
[0142] if the second code rate R.sub.min is the minimum code rate corresponding to the maximum code block length of the LDPC code, N.sub.CB is a maximum encoded length N.sub.max of the LDPC code; or if the second code rate R.sub.min is the larger one between the minimum code rate corresponding to the maximum code block length of the LDPC code and the code rate limit of the maximum code block length of the LDPC code, N.sub.CB is N.sub.CB,limit, and N.sub.CB,limit is a size of a buffer used by a receive end to store soft information of the code block.
[0143] In another optional solution, the code rate limit of the maximum code block length of the LDPC code is K.sub.max/N.sub.CB,limit, and N.sub.CB,limit is the size of the buffer used by the receive end to store the soft information of the code block.
[0144] In another optional solution, the code rate limit of the transport block is (TBS+L.sub.TB,CRC)/N.sub.IR, TBS is a length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, and N.sub.IR is a size of a buffer used by the receive end to store soft information of the transport block.
[0145] In another optional solution, the processor is configured to determine, based on the maximum code block length K.sub.max of the LDPC, the quantity of code blocks into which the transport block is to be segmented, where a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(K.sub.maxL.sub.CB,CRC), where
[0146] TBS is the length of the transport block, L.sub.TB,CRC is the length of the CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
[0147] In another optional solution, the processor is configured to determine, based on the first code rate and the maximum encoded length N.sub.CB of the code block, the quantity of code blocks into which the transport block is to be segmented, where a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), or
C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), where
[0148] TBS is the length of the transport block, L.sub.TB,CRC is the length of the CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
[0149] In another optional solution, if a sum of the length of the transport block and the length of the CRC bits of the transport block is greater than the maximum code block length of the LDPC, and the following condition (TBS+L.sub.TB,CRC)mod(R.sub.real*N.sub.CBL.sub.CB,CRC)<Th is satisfied, the value of C satisfies C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), or
[0150] if a sum of the length of the transport block and the length of the CRC bits of the transport block is greater than the maximum code block length of the LDPC, and the following condition (TBS+L.sub.TB,CRC)mod(R.sub.real*N.sub.CBL.sub.CB,CRC)Th is satisfied, the value of C satisfies C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), where
[0151] Th is a preset threshold.
[0152] In another optional solution, the preset threshold Th is equal to 0, or the preset threshold Th is less than or equal to a difference between the maximum code block length of the LDPC and a length of R.sub.real*N.sub.CB and is greater than 0.
[0153] It should be noted that, for implementations of the operations, refer to the corresponding descriptions of the method embodiment shown in
[0154] In the apparatus 80 shown in
[0155]
[0156] The memory 902 includes but is not limited to a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM), or a portable read-only memory (CD-ROM). The memory 902 is configured to store a related instruction or data, for example, a transport block or program code. The transceiver 903 is configured to receive and send data.
[0157] The processor 901 may be one or more central processing units (CPU). When the processor 901 is one CPU, the CPU may be a single-core CPU, or may be a multi-core CPU.
[0158] The processor 901 in the apparatus 90 is configured to perform an information processing operation, or is configured to read the program code stored in the memory 902, to perform an information processing operation. The information process operation specifically includes:
[0159] determining whether a length obtained by encoding the transport block based on R.sub.min,K.sub.
[0160] In the foregoing operations, an estimated length obtained by encoding the transport block is compared with a smaller value in a size of a buffer used by the receive end to store soft information of a code block and a quantity of bits that are authorized by a system and that are used to transmit the transport block. If the estimated length obtained by encoding the transport block is larger, the quantity of code blocks into which the transport block is to be segmented is determined based on the maximum code block length K.sub.max of the LDPC. If the estimated length obtained by encoding the transport block is smaller, the quantity of code blocks into which the transport block is to be segmented is determined based on a length of the transport block and a minimum code rate of the LDPC. In this process, the size of the buffer used by the receive end to store the soft information of the code block is considered, so that the quantity of code blocks obtained through calculation is more appropriate.
[0161] In an optional solution, if the length obtained by encoding the transport block based on R.sub.min,K.sub.
[0162] In another optional solution, the processor is configured to determine, based on the length of the transport block and the minimum code rate of the LDPC, the quantity of code blocks into which the transport block is to be segmented, where a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=min((TBS+L.sub.TB,CRC)/R.sub.min,K, G, N.sub.IR)/N.sub.CB, or
C=min((TBS+L.sub.TB,CRC)/R.sub.min,K, G, N.sub.IR)/N.sub.CB, where
[0163] TBS is the length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, R.sub.min,K is the minimum code rate of the LDPC, and N.sub.CB is a smaller value in a maximum encoded length N.sub.max of the LDPC code and a size of a buffer used by the receive end to store soft information of the code block.
[0164] In another optional solution, the processor is configured to determine, based on the maximum code block length K.sub.max of the LDPC, the quantity of code blocks into which the transport block is to be segmented, where the value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(K.sub.maxL.sub.CB,CRC), where
[0165] TBS is the length of the transport block, L.sub.TB,CRC is the length of the cyclic redundancy check CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
[0166] It should be noted that, for implementations of the operations, refer to the corresponding descriptions of the method embodiment shown in
[0167] In the apparatus 90 in
[0168]
[0169] The obtaining unit 1001 is configured to obtain an encoding code rate of a transport block. If a first code rate R.sub.real is greater than or equal to a second code rate R.sub.min, the first determining unit 1002 is configured to determine, based on a maximum code block length K.sub.max of an LDPC, a quantity C of code blocks into which the transport block is to be segmented. The first code rate R.sub.real is a largest one among the encoding code rate of the transport block, a code rate limit of the transport block, and a minimum code rate of the LDPC code. The second code rate R.sub.min is a minimum code rate corresponding to the maximum code block length of the LDPC code, or a larger one between a minimum code rate corresponding to the maximum code block length of the LDPC code and a code rate limit of the maximum code block length of the LDPC code.
[0170] In the foregoing steps, it is determined, based on relative values of the first code rate and the second code rate, how to calculate the quantity of code blocks into which the transport block is to be segmented, instead of directly calculating, based on the maximum code block length of the LDPC code, the quantity of code blocks into which the transport block is to be segmented. In the calculation process, a size of a buffer used by a receive end to store soft information of a code block is used, so that the quantity of code blocks obtained through calculation is more appropriate.
[0171] In an optional solution, if the first code rate R.sub.real is less than the second code rate R.sub.min, the first determining unit 1002 is configured to determine, based on the first code rate R.sub.real and a maximum encoded length N.sub.CB of a code block, the quantity C of code blocks into which the transport block is to be segmented.
[0172] In another optional solution, the code rate limit of the maximum code block length of the LDPC code is K.sub.max/N.sub.CB,limit, and N.sub.CB,limit is a size of a buffer used by a receive end to store soft information of the code block.
[0173] In another optional solution, the code rate limit of the transport block is (TBS+L.sub.TB,CRC)/N.sub.IR, TBS is a length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, and N.sub.IR is a size of a buffer used by the receive end to store soft information of the transport block.
[0174] In another optional solution, that the first determining unit 1002 is configured to determine, based on a maximum code block length K.sub.max of an LDPC, a quantity of code blocks into which the transport block is to be segmented includes: determining, based on the maximum code block length K.sub.max of the LDPC, the quantity of code blocks into which the transport block is to be segmented, where a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(K.sub.maxL.sub.CB,CRC), where
[0175] TBS is the length of the transport block, L.sub.TB,CRC is the length of the CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
[0176] In another optional solution, the determining, based on the first code rate and a maximum encoded length N.sub.CB of a code block, the quantity of code blocks into which the transport block is to be segmented includes: determining, based on the first code rate and the maximum encoded length N.sub.CB of the code block, the quantity of code blocks into which the transport block is to be segmented, where a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), or
C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), where
[0177] TBS is the length of the transport block, L.sub.TB,CRC is the length of the CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
[0178] In another optional solution, if a sum of the length of the transport block and the length of the CRC bits of the transport block is greater than the maximum code block length of the LDPC, and the following condition (TBS+L.sub.TB,CRC)mod(R.sub.real*N.sub.CBL.sub.CB,CRC)<Th is satisfied, the value of C satisfies C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), or
[0179] if a sum of the length of the transport block and the length of the CRC bits of the transport block is greater than the maximum code block length of the LDPC, and the following condition (TBS+L.sub.TB,CRC)mod(R.sub.real*N.sub.CBL.sub.CB,CRC)Th is satisfied, the value of C satisfies C=(TBS+L.sub.TB,CRC)/(R.sub.real*N.sub.CBL.sub.CB,CRC), where
[0180] Th is a preset threshold.
[0181] In another optional solution, the preset threshold Th is equal to 0, or the preset threshold Th is less than or equal to a difference between the maximum code block length of the LDPC and a length of R.sub.real*N.sub.CB and is greater than 0. It should be noted that, for implementations of the units, refer to the corresponding descriptions of the method embodiment shown in
[0182] In the apparatus 100 in
[0183]
[0184] The fourth determining unit 1101 is configured to determine whether a length obtained by encoding a transport block based on R.sub.min,K.sub.
[0185] In the foregoing steps, an estimated length obtained by encoding the transport block is compared with a smaller value in a size of a buffer used by the receive end to store soft information of a code block and a quantity of bits that are authorized by a system and that are used to transmit the transport block. If the estimated length obtained by encoding the transport block is larger, the quantity of code blocks into which the transport block is to be segmented is determined based on the maximum code block length K.sub.max of the LDPC. If the estimated length obtained by encoding the transport block is smaller, the quantity of code blocks into which the transport block is to be segmented is determined based on a length of the transport block and a minimum code rate of the LDPC. In this process, the size of the buffer used by the receive end to store the soft information of the code block is considered, so that the quantity of code blocks obtained through calculation is more appropriate.
[0186] In an optional solution, if the length obtained by encoding the transport block based on R.sub.min,K.sub.
[0187] In another optional solution, that the fifth determining unit 1102 is configured to determine, based on a length of the transport block and a minimum code rate of the LDPC, the quantity of code blocks into which the transport block is to be segmented includes: determining, based on the length of the transport block and the minimum code rate of the LDPC, the quantity of code blocks into which the transport block is to be segmented, where a value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=min((TBS+L.sub.TB,CRC)/R.sub.min,K, G, N.sub.IR)/N.sub.CB, or
C=min((TBS+L.sub.TB,CRC)/R.sub.min,K, G, N.sub.IR)/N.sub.CB, where
[0188] TBS is the length of the transport block, L.sub.TB,CRC is a length of cyclic redundancy check CRC bits of the transport block, R.sub.min,K is the minimum code rate of the LDPC, and N.sub.CB is a smaller value in a maximum encoded length N.sub.max of the LDPC code and a size of a buffer used by the receive end to store soft information of the code block.
[0189] In another optional solution, that the fifth determining unit 1102 is configured to determine, based on the maximum code block length K.sub.max of the LDPC, a quantity of code blocks into which the transport block is to be segmented includes: determining, based on the maximum code block length K.sub.max of the LDPC, the quantity of code blocks into which the transport block is to be segmented, where the value of the quantity C of code blocks into which the transport block is to be segmented satisfies:
C=(TBS+L.sub.TB,CRC)(K.sub.maxL.sub.CB,CRC), where
[0190] TBS is the length of the transport block, L.sub.TB,CRC is the length of the cyclic redundancy check CRC bits of the transport block, and L.sub.CB,CRC is a length of CRC bits of the code block.
[0191] It should be noted that, for implementations of the units, refer to the corresponding descriptions of the method embodiment shown in
[0192] In the apparatus 110 in
[0193] It may be understood that, the apparatuses (for example, the apparatus 80, the apparatus 90, the apparatus 100, and the apparatus 110) described in the foregoing embodiments may be one module or component. Therefore, the apparatus may be deployed in some devices. An embodiment of the present invention provides a device in which the apparatus is deployed. The device may determine a quantity of transport blocks based on the foregoing features of the apparatus.
[0194] In conclusion, in the embodiments of the present invention, it is determined, based on the relative values of the first code rate and the second code rate, how to calculate the quantity of code blocks into which the transport block is to be segmented, instead of directly calculating, based on the maximum code block length of the LDPC code, the quantity of code blocks into which the transport block is to be segmented. In the calculation process, the size of the buffer used by the receive end to store the soft information of the code block is used, so that the quantity of code blocks obtained through calculation is more appropriate.
[0195] A person of ordinary skill in the art can understand that all or some procedures in the methods in the foregoing embodiments may be implemented by a computer program instructing related hardware. The program may be stored in a computer readable storage medium. When the program is executed, the procedures of the foregoing method embodiments may be performed. The storage medium includes any medium that can store program code, such as a ROM, a random access memory RAM, a magnetic disk, or an optical disc.