# Patent

## Title
Method and apparatus for processing information, communications device, and communications system

## Abstract

This application discloses a method and an apparatus for processing information, a communications device, and a communications system. The communications device is configured to obtain a starting position of an output bit sequence in a coded block in a circular buffer, and determine the output bit sequence in the coded block based on a length of the output bit sequence and the starting position. A value of the starting position is one of {p0, p1, p2, . . . , pkmax−1}, where 0≤pk<NCB, pk is an integer, k is an integer, 0≤k<kmax, NCB is a size of the coded block, and kmax is an integer greater than or equal to 4.

## Background
CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a continuation of U.S. patent application Ser. No. 16/529,438, filed on Aug. 1, 2019, which is a continuation of International Application No. PCT/CN2018/074574, filed on Jan. 30, 2018, which claims priority to Chinese Patent Application No. 201710064621.X, filed on Feb. 4, 2017. All of the aforementioned patent applications are hereby incorporated by reference in their entireties.


TECHNICAL FIELD
Embodiments of the present invention relate to the communications field, and in particular, to a method and an apparatus for processing information, a communications device, and a communications system.
BACKGROUND
In a wireless communications system, a hybrid automatic repeat request (HARQ) technology is an important technology that can well improve reliability of a data link.
A low-density parity-check (LDPC) code is a type of linear block code having a sparse check matrix, and is characterized by a flexible structure and a low decoding complexity. Because the LDPC code uses a partially-parallel iteration decoding algorithm, the LDPC code has a higher throughput than a conventional turbo code. The LDPC code may be used as a next-generation error-correcting code for communications systems and can be used to improve channel transmission reliability and power utilization; and can be widely applied to space communications, fiber optic communications, personal communications systems, ADSLs, magnetic recording devices, and the like. Currently, in 5th generation mobile communications, LDPC code scheme has been considered as one of channel coding schemes.
To support various code lengths and code rates, a communications device performs rate matching after channel coding to adjust a code rate of a coded block, and obtains a bit sequence that needs to be sent, so as to match a decoding code rate. During the rate matching, the communications device may further perform bit puncturing on LDPC coded blocks generated after the coding, to increase the code rate; or perform bit repetition on the LDPC coded blocks generated after the coding, to decrease the code rate.
In the rate matching process, a communications device at a transmit end selects a bit sequence that needs to be sent, performs processing such as interleaving and mapping on the bit sequence, and sends the processed bit sequence to a communications device at a receive end. The communications device at the receive end performs combining and decoding on soft values of the bit sequence and stored soft channel bits (soft channel bit) in decoding, to obtain a code block.
In the prior art, when the communications device at the transmit end uses an existing rate matching method, HARQ performance is relatively poor.
SUMMARY
Embodiments of the present invention provide a method and an apparatus for processing information, a communications device, and a communications system, to improve HARQ performance.
According to a first aspect, a method for processing information in a communications system is provided. The method includes:
obtaining a starting position k0(i) of an output bit sequence in a coded block; and
determining the output bit sequence in the coded block based on a length E(i) of the output bit sequence and the starting position k0(i), where the coded block is stored in a circular buffer, and i is an integer greater than or equal to 0.
According to a second aspect, a method for processing information in a communications system is provided. The method includes:
obtaining a starting position k0(i) of a soft bit sequence having a length of E(i) stored in a soft buffer; and
combining and storing the soft bit sequence in the soft buffer starting from the starting position k0(i).
In a possible implementation of the first aspect or the second aspect, for a retransmission, to be specific, for i>0, k0(i) is determined based on a starting position k0(i−1) of a previous transmission output bit sequence and a length E(i−1) of the previous transmission output bit sequence. k0(i)=(k0(i−1)+F(i−1)) mod NCB. NCB is a size of the coded block, and F(i−1) is a bit quantity required for sequentially obtaining E(i−1) output bits from the coded block starting from k0(i−1).
In this implementation, output bit sequences of two adjacent transmissions are consecutive, and no repeated bit exists between the two output bit sequences, so that when such output bit sequences are sent to a communications device at a receive end, relatively good decoding performance can be achieved.
In a possible implementation based on the foregoing implementation, if a bit at the end position in the coded block is transmitted, k0(i)=(k0(i−1)+F(i−1)+Eoffset) mod NCB; otherwise, k0(i)=(k0(i−1)+F(i−1)) mod NCB.
In this implementation, after all bits are transmitted, a quantity of repeated bits is reduced, thereby reducing a decoding performance loss.
In another possible implementation of the first aspect or the second aspect, a value of k0(i) is pk pk is one of {p0, p1, p2, . . . , pkmax−1}, 0≤pk<NCB, pk is an integer, k is an integer, 0≤k<max, NCB is a size of the coded block, and kmax is an integer greater than or equal to 4.
For example, kmax=2′′, and n is an integer greater than or equal to 2; or kmax=Nb, and Nb is a quantity of columns of a base matrix.
In another possible implementation based on the first aspect or the second aspect or the foregoing implementation, if k=0, p0=l·z, where l is an integer, and 0≤l<Nb; or if 0<k<kmax, Pk=(Pk−1+S) mod NCB·S is an integer. For example,




  
    S
    =
    
      ⌊
      
        
          N
          
            C
            ⁢
            B
          
        
        
          k
          max
        
      
      ⌋
    
  
  ,
  
    
      or
      ⁢
      
        
      
      ⁢
      S
    
    =
    
      ⌈
      
        
          N
          
            C
            ⁢
            B
          
        
        
          k
          max
        
      
      ⌉
    
  
  ,




or S=z, where z is a lifting size of the coded block. ┌ ┐ represents rounding up to an interger, and └ ┘ represents rounding down to an interger.

By using




  S
  =
  
    
      
        ⌊
        
          
            N
            
              C
              ⁢
              B
            
          
          
            k
            max
          
        
        ⌋
      
      ⁢
      
        
      
      ⁢
      or
      ⁢
      
        
      
      ⁢
      S
    
    =
    
      ⌈
      
        
          N
          
            C
            ⁢
            B
          
        
        
          k
          max
        
      
      ⌉
    
  




as an example, pk





  
    p
    k
  
  =
  
    
      
        (
        
          
            p
            
              k
              -
              1
            
          
          +
          
            ⌊
            
              
                N
                
                  C
                  ⁢
                  B
                
              
              
                k
                max
              
            
            ⌋
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        
          C
          ⁢
          B
        
      
      ⁢
      
        
      
      ⁢
      or
      ⁢
      
        
      
      ⁢
      
        p
        k
      
    
    =
    
      
        (
        
          
            p
            
              k
              -
              1
            
          
          +
          
            ⌈
            
              
                N
                
                  C
                  ⁢
                  B
                
              
              
                k
                max
              
            
            ⌉
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        
          N
          
            C
            ⁢
            B
          
        
        .
      
    
  




For another example, pk satisfies





  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            ⌊
            
              
                
                  N
                  
                    C
                    ⁢
                    B
                  
                
                ·
                k
              
              
                k
                max
              
            
            ⌋
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        
          C
          ⁢
          B
        
      
    
  
  ,
  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            ⌈
            
              
                
                  N
                  
                    C
                    ⁢
                    B
                  
                
                ·
                k
              
              
                k
                max
              
            
            ⌉
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        
          C
          ⁢
          B
        
      
    
  
  ,
  
    

  
  ⁢
  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            k
            ·
            
              ⌊
              
                
                  N
                  
                    C
                    ⁢
                    B
                  
                
                
                  k
                  max
                
              
              ⌋
            
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        
          C
          ⁢
          B
        
      
    
  
  ⁢
  
    
  
  ,
  
    
      or
      ⁢
      
        
      
      ⁢
      
        p
        k
      
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            k
            ·
            
              ⌈
              
                
                  N
                  
                    C
                    ⁢
                    B
                  
                
                
                  k
                  max
                
              
              ⌉
            
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        
          N
          
            C
            ⁢
            B
          
        
        .
      
    
  




In an example in which S=z and z is the lifting size of the coded block, pk=(k·z) mod NCB. In this implementation, a value of kmax may be Nb, and Nb is the quantity of columns of the base matrix.
The foregoing method can adapt to various initial transmission code rates, so that an interval between redundancy version transmissions does not vary greatly or does not include a large quantity of repeated bits, thereby achieving relatively stable performance.
In another possible implementation of the first aspect or the second aspect, a value of k0(i) is pk, pk is one of {p0, p1, p2 . . . , pkmax−1} 0≤pk<NCB, pk is an integer, k is an integer, 0≤k<kmax, NCB is a size of the coded block, and kmax is an integer greater than or equal to 4.
For example, kmax=2′′, and n is an integer greater than or equal to 2; or kmax=Nb, and Nb is a quantity of columns of a base matrix.
If pk>(Nb−Mb+j)*z, pk satisfies pk−pk−1≤pk+1−pk, where pm+1=(Nb−Mb+j)*z, 0<m+1<k<kmax−1, j is a quantity of parity bits corresponding to weight−2 columns in the coded block or j is a quantity of parity bits that correspond to weight-2 columns and that are not punctured in the coded block, and z is a lifting size of the coded block.
If pk<(Nb−Mb+j)*z, pk satisfies



  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            ⌊
            
              
                
                  (
                  
                    
                      p
                      
                        m
                        +
                        1
                      
                    
                    -
                    
                      p
                      0
                    
                  
                  )
                
                ·
                k
              
              
                m
                +
                1
              
            
            ⌋
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        p
        
          m
          +
          1
        
      
      ⁢
      
        
      
      ⁢
      or
    
  




  
    
      
        p
        k
      
      =
      
        
          (
          
            
              p
              0
            
            +
            
              ⌈
              
                
                  
                    (
                    
                      
                        p
                        
                          m
                          +
                          1
                        
                      
                      -
                      
                        p
                        0
                      
                    
                    )
                  
                  ·
                  k
                
                
                  m
                  +
                  1
                
              
              ⌉
            
          
          )
        
        ⁢
        mod
        ⁢
        
          
        
        ⁢
        
          p
          
            m
            +
            1
          
        
      
    
    ,
  



where pm+1=(Nb−Mb+j)*z, 0<k<m+1, j is the quantity of parity bits corresponding to weight-2 columns in the coded block or j is the quantity of parity bits that correspond to weight-2 columns and that are not punctured from the coded block, and z is the lifting size of the coded block.

According to the method, starting positions are more densely distributed at positions closer to information bits, and starting positions are more sparsely distributed at positions closer to the last bit of the coded block.
In the foregoing implementations, kmax may be an integer greater than 4. For example, kmax=5; or kmax=2′′, and kmax is 8 or above, for example, 8 or 16, where n is an integer greater than 2. For another example, kmax=Nb, and Nb is the quantity of columns of the base matrix of the coded block. An increase in kmax can reduce a distance between starting positions of redundancy versions. The redundancy version determined based on the starting position can also improve decoding performance of the communications device at the receive end.
In another possible implementation based on any one of the foregoing implementations, for the retransmission, to be specific, for i>0, the starting position k0(i) is determined based on the starting position k0(i−1) of the previous transmission output bit sequence and the length E(i−1) of the previous transmission output bit sequence.
In a possible implementation, to reduce a quantity of repeated redundancy bits, pk is a minimum value satisfying pk≥((k0(i−1)+F(i−1)) mod NCB); or if ((k0(i−1)+F(i−1)) mod NCB) is greater than a largest value in {p0, p1, p2 . . . , pkmax−1} pk is a smallest value in {p0, p1, p2 . . . , pkmax−1}.
In another possible implementation, to meet a sequential decoding requirement, Pk is a maximum value satisfying pk≤((k0(i−1)+F(i−1)) mod NCB); or if ((k0(i−1)+F(i−1)) mod NCB) is less than a smallest value in {p0, p1, p2 . . . , pkmax−1} pk is a largest value in {p0, p1, p2 . . . , pkmax−1}.
In another possible implementation, to compensate decoding performance losses caused by repeating bits and by skipping redundancy bits, if p0 ((k0 (i−1)+F(i−1)) mod NCB)≤pkmax−1, pk is a value in {p0, p1, p2 . . . , pkmax−1} that has a smallest difference with ((k0 (i−1)+F(i−1)) mod NCB); or if ((k0 (i−1)+F(i−1)) mod NCB) is less than a smallest value in {p0, p1, p2 . . . , pkmax−1} or ((k0 (i−1)+F(i−1)) mod NCB) is greater than a largest value in {p0, p1, p2 . . . , pkmax−1} pk is one of the smallest value in {p0, p1, p2 . . . , pkmax−1} and the largest valu pkmax−1 in {p0, p1, p2 . . . , pkmax−1} that has a smaller difference with ((k0 (i−1)+F(i−1)) mod NCB).
In another possible implementation, to compensate decoding performance losses caused by repeating bits and by skipping redundancy bits, the starting position k0(i) is determined based on the starting position k0(i−1) of the previous transmission output bit sequence, the length E(i−1) of the previous transmission output bit sequence, and a quantity i of transmissions.
In the foregoing implementations, F(i−1) is a bit quantity required for sequentially obtaining E(i−1) output bits from the coded block starting from k0(i−1).
In another possible implementation based on any one of the foregoing implementations, the starting position k0(i) is determined based on a redundancy version starting position number rvidx(i).
For example, for an adaptive retransmission, the redundancy version number rvidx(i) may be obtained through signaling.
For another example, for an adaptive retransmission or a non-adaptive retransmission, the redundancy version starting position number rvidx may be obtained based on a sequence of redundancy version starting position numbers and a quantity i of transmissions.
The sequence of the redundancy version starting position numbers is retrieved from a memory, or the numbering sequence of the redundancy version starting positions is determined based on an initial transmission code rate, or the sequence of the redundancy version starting position numbers is determined based on the length of the output bit sequence and the lifting size z.
According to a third aspect, an apparatus for processing information in a communications system is provided. The apparatus includes:
an obtaining unit, configured to obtain a starting position k0(i) of an output bit sequence in a coded block; and a processing unit, configured to determine the output bit sequence in the coded block based on a length E(i) of the output bit sequence and the starting position k0(i), where the coded block is stored in a circular buffer, and i is an integer greater than or equal to 0.
The apparatus may be configured to perform the method according to the first aspect or any possible implementation of the first aspect. For details, refer to the description of the foregoing aspect.
In a possible design, the apparatus for processing information according to this application may include a module correspondingly configured to perform the first aspect or any possible implementation of the first aspect in the foregoing method design. The module may be software and/or hardware.
According to a fourth aspect, an apparatus for processing information in a communications system is provided. The apparatus includes:
an obtaining unit, configured to obtain a starting position k0(i) of a soft bit sequence having a length of E(i) stored in a soft buffer; and a processing unit, configured to combine and store the obtained soft bit sequence in the soft buffer starting from the starting position k0(i).
The apparatus may be configured to perform the method according to the second aspect or any possible implementation of the second aspect. For details, refer to the description of the foregoing aspect.
In a possible design, the apparatus for processing information according to this application may include a module correspondingly configured to perform the second aspect or any possible implementation of the second aspect in the foregoing method design. The module may be software and/or hardware.
According to a fifth aspect, a communications device is provided. The communications device includes an encoder, a rate matcher, and a transceiver.
The encoder is configured to encode information data.
The rate matcher includes the apparatus for processing information according to the third aspect, and is configured to determine the output bit sequence in the foregoing embodiments.
The transceiver is configured to send a signal corresponding to the output bit sequence from the rate matcher.
According to a sixth aspect, a communications device is provided. The communications device includes a decoder, a rate de-matcher, and a transceiver.
The transceiver is configured to receive a signal corresponding to the soft bit sequence of the output bit sequence in the foregoing aspect.
The decoder is configured to decode soft channel bits in a soft buffer.
The rate de-matcher includes the apparatus for processing information according to the fourth aspect, and is configured to combine and store the soft channel bits of the output bit sequence in the foregoing aspect in the soft buffer.
According to a seventh aspect, an embodiment of the present invention provides a communications system. The system includes the communications device according to the fifth aspect and the communications device according to the sixth aspect.
According to another aspect, an embodiment of the present invention provides a computer storage medium including a program designed to execute the foregoing aspects.
According to still another aspect of this application, a computer program product including instructions is provided. When the computer program product is run on a computer, cause the computer to perform the methods according to the foregoing aspects.
According to the method and apparatus for processing information, the communications device, and the communications system in the embodiments of the present invention, the output bit sequence for the initial transmission or the retransmission is properly determined, so that decoding performance of the communications device at the receive end after receiving the soft bit sequence of the output bit sequence is improved, a decoding success rate is improved, and a quantity of retransmissions is further reduced.



BRIEF DESCRIPTION OF DRAWINGS
FIG. 1 is a schematic diagram of a base matrix of an LDPC code and permutation matrices;
FIG. 2 is a schematic structural diagram of a parity check matrix of an LDPC code;
FIG. 3 is a structural diagram of a communications system according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for processing information according to another embodiment of the present invention;
FIG. 5-1 is a schematic diagram of a coded block according to another embodiment of the present invention;
FIG. 5-2 is a schematic diagram of a coded block according to another embodiment of the present invention;
FIG. 5-3 is a schematic diagram of a coded block according to another embodiment of the present invention;
FIG. 6 is a flowchart of a method for processing information according to another embodiment of the present invention;
FIG. 7 is a structural diagram of an apparatus for processing information according to another embodiment of the present invention;
FIG. 8 is a structural diagram of an apparatus for processing information according to another embodiment of the present invention;
FIG. 9 is a structural diagram of a communications device according to another embodiment of the present invention; and
FIG. 10 is a structural diagram of a communications device according to another embodiment of the present invention.



DESCRIPTION OF EMBODIMENTS
The following describes technical solutions in embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention.
FIG. 1 is a schematic diagram of a base matrix of an LDPC code in a communications system and permutation matrices. The base matrix of the LDPC code includes mH*nH elements, wherein mH is a row count of the base matrix, nH is a column count of the base matrix. If the base matrix is lifted by using z as a lifting size, an (mH*z)*(nH*z) parity check matrix H may be obtained. To be specific, the parity check matrix H includes mH*nH blocks. Each block is obtained by performing cyclic shift on an identity matrix of size z*z. The lifting size z is usually determined based on a code block size supported by the system and an information data amount. FIG. 1 shows a base matrix, having a QC structure, of an LDPC code, where mH=13, and nH=38. A code rate of the base matrix is (nH−mH)/nH=0.6579. If the lifting size z=4, each element whose value is −1 in the matrix is lifted to an all-zero matrix of size 4*4, and other elements are lifted to permutation matrices of size 4*4. The permutation matrix may be obtained by performing cyclic shift on an identity matrix I for a corresponding quantity of times, and the quantity of shifts is equal to a value of a corresponding matrix element. As shown in FIG. 1, a corresponding permutation matrix obtained after an element whose value is 0 in the base matrix is lifted is an identity matrix I of size 4*4, a corresponding permutation matrix obtained after an element whose value is 1 is lifted is a matrix obtained by shifting an identity matrix once, and so on. Details are not described herein again.
After being lifted, the base matrix may be used as a parity check matrix used for encoding or decoding of the LDPC code. An LDPC code having a code length nil and an information sequence length kc is marked as an (nH, kc) LDPC code and may be uniquely determined by the parity check matrix H. The parity check matrix H is a sparse matrix, where each row of the check matrix H represents one parity check equation constraint and corresponds to j coded bits, each column represents one coded bit constrained by mH parity check equations, and any two parity check equations include at most one same coded bit. An example of a parity check matrix H of the LDPC code and a corresponding parity check equation is given in the following formula (1):




  
    
      
        H
        =
        
          
            
              
                
                  
                    
                      v
                      0
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      1
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      2
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      3
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      4
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      5
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      6
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      7
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      8
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      v
                      9
                    
                  
                  ⁢
                  
                    
                  
                
              
            
            
              
                
                  
                    {
                    
                      
                        
                          1
                        
                        
                          1
                        
                        
                          1
                        
                        
                          1
                        
                        
                          0
                        
                        
                          0
                        
                        
                          0
                        
                        
                          0
                        
                        
                          0
                        
                        
                          0
                        
                      
                      
                        
                          1
                        
                        
                          0
                        
                        
                          0
                        
                        
                          0
                        
                        
                          1
                        
                        
                          1
                        
                        
                          1
                        
                        
                          0
                        
                        
                          0
                        
                        
                          0
                        
                      
                      
                        
                          0
                        
                        
                          1
                        
                        
                          0
                        
                        
                          0
                        
                        
                          1
                        
                        
                          0
                        
                        
                          0
                        
                        
                          1
                        
                        
                          1
                        
                        
                          0
                        
                      
                      
                        
                          0
                        
                        
                          0
                        
                        
                          1
                        
                        
                          0
                        
                        
                          0
                        
                        
                          1
                        
                        
                          1
                        
                        
                          0
                        
                        
                          0
                        
                        
                          1
                        
                      
                      
                        
                          0
                        
                        
                          0
                        
                        
                          0
                        
                        
                          1
                        
                        
                          0
                        
                        
                          0
                        
                        
                          0
                        
                        
                          1
                        
                        
                          1
                        
                        
                          1
                        
                      
                    
                    }
                  
                  ⁢
                  
                    
                      
                        
                          c
                          0
                        
                      
                    
                    
                      
                        
                          c
                          1
                        
                      
                    
                    
                      
                        
                          c
                          2
                        
                      
                    
                    
                      
                        
                          c
                          3
                        
                      
                    
                    
                      
                        
                          c
                          4
                        
                      
                    
                  
                
              
            
          
          →
          
            {
            
              
                
                  
                    
                      
                        v
                        0
                      
                      +
                      
                        v
                        1
                      
                      +
                      
                        v
                        2
                      
                      +
                      
                        v
                        3
                      
                    
                    =
                    0
                  
                
              
              
                
                  
                    
                      
                        v
                        0
                      
                      +
                      
                        v
                        4
                      
                      +
                      
                        v
                        5
                      
                      +
                      
                        v
                        6
                      
                    
                    =
                    0
                  
                
              
              
                
                  
                    
                      
                        v
                        1
                      
                      +
                      
                        v
                        4
                      
                      +
                      
                        v
                        7
                      
                      +
                      
                        v
                        8
                      
                    
                    =
                    0
                  
                
              
              
                
                  
                    
                      
                        v
                        2
                      
                      +
                      
                        v
                        5
                      
                      +
                      
                        v
                        6
                      
                      +
                      
                        v
                        9
                      
                    
                    =
                    0
                  
                
              
              
                
                  
                    
                      
                        v
                        3
                      
                      +
                      
                        v
                        7
                      
                      +
                      
                        v
                        8
                      
                      +
                      
                        v
                        9
                      
                    
                    =
                    0
                  
                
              
            
          
        
      
    
    
      
        (
        1
        )
      
    
  




FIG. 2 shows an example of a parity check matrix H of the LDPC code. As shown in FIG. 2, the parity check matrix includes a kernel matrix and three extended matrix parts. Information data may be encoded and decoded by using four parity check matrices: a kernel matrix; a parity check matrix 1 including the kernel matrix and an extended matrix part 1; a parity check matrix 2 including the kernel matrix, the extended matrix part 1, and an extended matrix part 2; a complete matrix including the kernel matrix, the extended matrix part 1, the extended matrix part 2, and an extended matrix part 3. The parity check matrices each has a Raptor-like structure. The part corresponding to parity bits has dual structures, namely, a bidiagonal structure and a weight-1 column structure. The kernel matrix usually includes a bidiagonal structure part. If a quantity of information bits before coding is k, and a code length of an LDPC coded block generated based on the parity check matrix is n, a code rate is kc/nH. LDPC coded blocks having different code rates may be obtained by using different parity check matrices for encoding. It may be learned that in the coded blocks, an LDPC codeword generated based on the complete matrix has a largest code length and has a lowest code rate Rmin; an LDPC codeword generated based on the kernel matrix has a smallest code length and has a highest code rate Rmax; an LDPC codeword generated based on the parity check matrix 1 has a code rate R1; and an LDPC codeword generated based on the parity check matrix 2 has a code rate R2, and Rmin<R2<R1<Rmax. It should be noted that in the foregoing example, the complete matrix, the kernel matrix, the parity check matrix 1, or the parity check matrix 2 may all be used as a base matrix of the LDPC code, which can be lifted according to the lifting size to obtain a matrix for encoding or decoding.
In the communications system, transmission of information data between communications devices (for example, base stations or terminals) is susceptible to interference and errors, because a radio propagation environment is complex and variable. To reliably send information data, a communications device at a transmit end performs processing such as CRC attachment, channel coding, rate matching, and interleaving on the information data, maps interleaved coded bits into modulation symbols, and sends the modulation symbols to a communications device at a receive end. After receiving the modulation symbols, the receiving device correspondingly performs de-interleaving, rate de-matching, decoding, and CRC to recover the information data. These processes can reduce transmission errors and improve reliability of data transmission.
A communications system 300 shown in FIG. 3 may be widely applied to various types of communication such as voice communication and data communication. The communications system may include a plurality of wireless communications devices. For clarity, FIG. 3 shows only a communications device 30 and a communications device 31. Control information or data information is sent and received as an information sequence between the communications device 30 and the communications device 31. The communications device 30 serves as a communications device at a transmit end, to send the information sequence in transport blocks (transmission block, TB), and attaches CRC bits to each transport block. If a size of a transport block with CRC attachment exceeds a largest code block length, the transport block needs to be segmented into several code blocks (code block, CB). Code block CRC bits may also be attached to each code block, or code block group CRC bits may be attached to each group of code blocks, and filler bits may be further inserted into each code block. The communications device 30 performs channel coding on each code block, for example, performs LDPC coding to obtain a corresponding coded block. Each coded block includes information bits and parity bits. If the information bits include a filler bit, the filler bit is usually expressed as “null” (Null).
A coded block or a coded block on which bit rearrangement has been performed is stored in a circular buffer of the communications device 30, and the communications device 30 sequentially obtains a plurality of output bits from the coded block stored in the circular buffer, to obtain an output bit sequence. An output bit is a bit other than a filler bit in the coded block, and therefore the output bit sequence does not include any filler bit. The output bit sequence is sent after being interleaved and mapped into modulation symbols. When performing a retransmission, the communications device 30 selects another output bit sequence from the coded block in the circular buffer and sends the another output bit sequence. If obtaining the output bits sequentially reaches a last bit of the circular buffer, selection of an output bit continues starting from a start bit of the circular buffer.
After demodulating and de-interleaving the received modulation symbols, the communications device 31 stores soft values of the received output bit sequence in a corresponding position in a soft buffer (soft buffer). If retransmissions occur, the communications device 31 combines soft values of output bit sequences in all retransmissions and stores the combined soft values in the soft buffer. Combining herein means that if positions of output bits received at two transmissions are the same, soft values of the output bits received at the two transmissions are combined. Positions in the soft buffer of the communications device 31 are in a one-to-one correspondence with positions in the coded block in the circular buffer of the communications device 30. To be specific, if the position of the output bit in the coded block in the circular buffer of the communications device 30 is a pth bit, the position of the soft value of the output bit in the soft buffer of the communications device 31 is also a pth bit.
The communications device 31 decodes all soft values in the soft buffer to obtain a code block of an information sequence. The communications device 31 may obtain a transport block size. Therefore, a quantity of code blocks into which one transport block is segmented and a length of each code block may be determined. If the code block includes a CRC bit segment, the communications device 31 may further use the CRC bit segment to check the code block. The communications device 31 concatenates all the code blocks into one transport block, and further performs checking and concatenation on transport blocks to finally obtain the information sequence. It may be learned that the communications device 31 performs a reverse process of a method for processing information performed by the communications device 30.
It should be noted that in the embodiments of the present invention, the communications device 30 may be a network device such as a base station in the communications system, and correspondingly the communications device 31 may be a terminal. Alternatively, the communications device 30 may be a terminal in the communications system, and correspondingly the communications device 31 may be a network device such as a base station in the communications system.
For ease of understanding, some terms used in this application are described below.
In this application, terms “network” and “system” are often alternately used, but a person skilled in the art may understand their meanings. The terminal is a device having a communication function, and may include a handheld device having a wireless communication function, an in-vehicle device, a wearable device, a computing device, or another processing device connected to a wireless modem. The terminal may have different names in different networks, for example, user equipment, a mobile station, a subscriber unit, a station, a cellular phone, a personal digital assistant, a wireless modem, a wireless communications device, a handheld device, a laptop computer, a cordless telephone set, or a wireless local loop station. For ease of description, the terminal device is briefly referred to as a terminal in this application. The base station (base station, BS) may also be referred to as a base station device, and is a device deployed in a radio access network to provide a wireless communication function. In different wireless access systems, the base station may have different names. For example, a base station in a universal mobile telecommunications system (Universal Mobile Telecommunications System, UMTS) network is referred to as a NodeB (NodeB), a base station in an LTE network is referred to as an evolved NodeB (evolved NodeB, eNB or eNodeB), a base station in a new radio (new radio, NR) network is referred to as a transmission reception point (transmission reception point, TRP) or a next generation NodeB (generation NodeB, gNB), or base stations in various other evolved networks may also have other names. The present invention is not limited thereto.
FIG. 4 is a schematic flowchart of a method for processing information according to an embodiment of the present invention. The method may be applied to a communications system. The communications system includes a communications device 30 and a communications device 31. The method may be implemented by the communications device 30 and includes the following steps.
401: Obtain a starting position k0(i) of an output bit sequence in a coded block.
In the communications device 30, the coded block is stored in a circular buffer. A size of the coded block may be represented by NCB. The coded block may also include one or more filler bits. When the coded block is initially transmission or retransmission, the communications device 30 determines, in the coded block in the circular buffer, the output bit sequence used for the initial transmission or the retransmission. The output bit sequence does not include any filler bit. For ease of description, an ith transmission indicates an initial transmission or a retransmission, i=0 indicates an initial transmission, i>0 indicates a retransmission, and i is an integer. For example, i=1 indicates the first retransmission, i=2 indicates the second retransmission, and so on. An upper limit of retransmissions depends on a maximum retransmission times of the system. An output bit sequence for each initial transmission or retransmission may be a redundancy version of the coded block. k0(i) indicates a starting position of an output bit sequence for the ith transmission in the coded block of the circular buffer, which may also be referred to as a starting position of a redundancy version rv(i) for the ith retransmission.
402: Determine the output bit sequence in a circular buffer based on a length E(i) of the output bit sequence and the starting position k0(i).
The communications device 30 may determine the output bit sequence based on the length E(i) of the output bit sequence for the ith transmission and the starting position k0(i) obtained in step 401. For example, the communications device 30 sequentially obtains E(i) bits starting from a (k0(i)th bit of the coded block as the output bit sequence. The output bit sequence does not include any filler bit; therefore, if the communications device 30 obtains, as the output bit sequence, the E(i) bits in F(i) bits starting from the (k0(i))th bit of the coded block, a quantity of filler bits is F(i)−E(i). Therefore, an end location of the output bit sequence is k0(i)+F(i). F(i) is a bit quantity required for sequentially obtaining the E(i) output bits from the coded block starting from k0(i). F(i) is an integer greater than or equal to 0.
For example, after sending an output bit sequence for the initial transmission, namely, a 0th transmission, the communications device 30 receives a negative acknowledgement NACK from the communications device 31. The communications device 30 needs to determine a starting position k0(1) of an output bit sequence for the 1st transmission, namely, the 1st redundancy version rv(1). Therefore, the communications device obtains the starting position k0(1) of the output bit sequence in the coded block stored in the circular buffer, and determines the output bit sequence for the 1st transmission, namely, the redundancy version rv(1), based on a length E(1) of the output bit sequence and the starting position k0(1). The communications device 30 sends the output bit sequence rv(1) to the communications device 31. If the communications device 30 receives the NACK from the communications device 31, the communications device 30 needs to determine a starting position k0(2) of an output bit sequence for the 2nd transmission, namely, the 2nd redundancy version rv(2), and determine the output bit sequence for the 2nd transmission based on a length E(2) of the output bit sequence and the starting position k0(2), that is, determine the redundancy version rv(2). The rest can be deduced by analogy. The communications device may end the retransmission of the coded block until the maximum retransmission is reached or the communications device 30 receives a positive acknowledgement ACK from the communications device 31. Certainly, the communications device 30 may perform a plurality of retransmissions without considering the NACK or the ACK from the communications device 31.
During decoding, the communications device 31 at a receive end needs to perform combining and decoding on soft channel bits received in the initial transmission and soft channel bits of redundancy versions. For a coded block obtained through LDPC coding, a quantity of repeated bits or skipped bits between the redundancy versions needs to be reduced to improve decoding performance of the communications device at the receive end.
An LDPC coded block shown in FIG. 5-1 is used as an example. It is assumed that a code rate of a kernel matrix of the LDPC coded block before puncturing is 0.89, and a lowest code rate supported by the LDPC coded block is 0.33. The LDPC coded block includes information bits and redundancy bits. The information bits include systematic to-be-punctured bits and information bits that cannot be punctured. The redundancy bits include parity bits that correspond to weight-2 columns and that cannot be punctured, parity bits that correspond to weight-2 columns and that can be punctured, and parity bits that correspond to weight-1 columns and that can be punctured. Puncturing may also indicate not sending. A punctured bit is a bit not to be sent, and a bit that cannot be punctured means that the bit needs to be sent. The parity bits corresponding to weight-2 columns correspond to a column in a bidiagonal structure part in a parity check matrix, or in other words, correspond to a column in a bidiagonal structure part in a kernel matrix. An output bit sequence e0 including the information bits that are not punctured and the parity bits that correspond to weight-2 columns and that are not punctured has a highest code rate.
There are a plurality of sizes affecting decoding performance of the LDPC code. For example, during decoding of the LDPC code, a redundancy part other than the information bits usually needs to be selected in an encoding order to form a code word for decoding. For another example, for the LDPC code, parity bits corresponding to weight-2 columns are punctured to obtain a code rate higher than an original code rate supported by the kernel matrix. During retransmission, the punctured parity bits corresponding to weight-2 columns need to be retransmitted first, and then punctured parity bits in a weight-1 column part are sent. For another example, during retransmission, a higher proportion of repeated redundancy bits indicates poorer decoding performance.
As shown in FIG. 5-2, there are four starting position values p0, p1, p2, and p3. In the initial transmission, an output bit sequence, namely, a redundancy version 0, is obtained starting from the 0th starting position p0. In the 1st retransmission, an output bit sequence, namely, a redundancy version 1, is obtained starting from the 1st starting position p1. The redundancy version 0 and the redundancy version 1 are not continuous. A large quantity of skipped bits are not transmitted, and especially parity bits corresponding to weight-2 columns are not selected. After receiving the two redundancy versions, the communications device at the receive end performs combining and decoding. However, because redundant bits skipped in FIG. 5-2 are not transmitted to the communications device at the receive end, the redundant bits cannot be selected prior to redundant bits in the redundancy version 1 to form a code word for decoding. Consequently, decoding performance is greatly lowered. In addition, the skipped bits in FIG. 5-2 also include punctured parity bits corresponding to weight-2 columns, further degrading the decoding performance.
As shown in FIG. 5-3, in the initial transmission, an output bit sequence, namely, a redundancy version 0, is obtained starting from the 0th starting position p0. In the 1st retransmission, an output bit sequence, namely, a redundancy version 1, is obtained starting from the 1st starting position p1. Although the redundancy version 0 and the redundancy version 1 are continuous, if a code rate of the initial transmission is relatively low, there are a relatively large quantity of repeated bits, leading to a loss of the decoding performance.
In step 401, a value of k0(i) may be pk, and pk is one of {p0, p1, p2 . . . , pkmax−1}. In other words, there are kmax starting position values. 0≤pk<NCB, pk is an integer, k is an integer, 0≤k<kmax, NCB is a size of the coded block, and kmax is an integer greater than or equal to 4. For example, kmax=2n, and n is an integer greater than or equal to 2; or kmax=Nb, and Nb is a quantity of columns of a base matrix.
The subscript k in pk may be a redundancy version starting position number rvidx.
{p0, p1, p2 . . . , pkmax−1} may be defined in a plurality of manners. For example, the set may be a set including only elements p0, p1, p2 . . . , pkmax−1, or may be a subset of another set. The elements in the set {p0, p1, p2 . . . , pkmax−1} may be arranged in a particular order, or may not be arranged in a particular order. This is not specifically limited in this application.
In a first possible implementation, the kmax values {p0, p1, p2 . . . , pkmax−1} may be evenly distributed based on differences. A difference between two values a and b may be represented by |α−b|, and ∥ represents calculating an absolute value. For the value of the starting position of the coded block in the circular buffer, if pk≥pk−1, a difference between pk and pk−1 is |pk−Pk−Pk−1|; and if pk<pk−1, the difference between pk and pk−1 is |(pk+NCB)−pk−1|. For example, the difference is an integer S. A difference between two adjacent values is S. If k>0, pk may be obtained based on a previous value pk−1. For example, pk satisfies Pk=(Pk−1+S) mod NCB. Alternatively, pk may be obtained based on p0, and pk satisfies pk=(p0+k·S) mod NCB. p0 may be an integer multiple of a lifting size, and p0=l·z, where l is an integer, and 0≤l<Nb. If p0=0, the equation may be simplified as that pk satisfies pk=(k·S) mod NCB.
The kmax values {p0, p1, p2 . . . , pkmax−1} may be set based on the size NCB of the coded block. S may be




  
    ⌊
    
      
        N
        CB
      
      
        k
        max
      
    
    ⌋
  
  ⁢
  
    
  
  ⁢
  or
  ⁢
  
    
  
  ⁢
  
    
      ⌈
      
        
          N
          CB
        
        
          k
          max
        
      
      ⌉
    
    .
  




In this case, if k>0, pk satisfies




  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            
              k
              -
              1
            
          
          +
          
            ⌊
            
              
                N
                CB
              
              
                k
                max
              
            
            ⌋
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        CB
      
    
  




  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            
              k
              -
              1
            
          
          +
          
            ⌈
            
              
                N
                CB
              
              
                k
                max
              
            
            ⌉
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        
          N
          CB
        
        .
      
    
  



or For another example, pk satisfies





  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            ⌊
            
              
                
                  N
                  CB
                
                ·
                k
              
              
                k
                max
              
            
            ⌋
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        CB
      
    
  
  ,
  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            ⌈
            
              
                
                  N
                  CB
                
                ·
                k
              
              
                k
                max
              
            
            ⌉
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        CB
      
    
  
  ,
  
    
      p
      k
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            k
            ·
            
              ⌊
              
                
                  N
                  CB
                
                
                  k
                  max
                
              
              ⌋
            
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        CB
      
    
  
  ,
  
    
      or
      ⁢
      
        
      
      ⁢
      
        p
        k
      
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            k
            ·
            
              ⌈
              
                
                  N
                  CB
                
                
                  k
                  max
                
              
              ⌉
            
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        
          N
          CB
        
        .
      
    
  




┌ ┐ represents rounding up to an integer, and └ ┘ represents rounding down to an integer. For example, 2.1 is rounded up to 3, and is rounded down to 2.
In an example in which the coded block has a length of 215 bits, kmax is 8, and the difference between adjacent values is




  
    
      ⌊
      
        215
        8
      
      ⌋
    
    =
    
      26
      ⁢
      
        
      
      ⁢
      bits
    
  
  ,




if p0=0, values in {p0, p1, p2 . . . , pkmax−1} satisfy





  
    
      p
      k
    
    =
    
      
        ⌊
        
          
            
              N
              CB
            
            ·
            k
          
          
            k
            max
          
        
        ⌋
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        N
        CB
      
    
  
  ,




and are {0, 26, 52, 78, 104, 130, 156, 182}. It may be learned that in the example, the elements in {p0, p1, p2 . . . , pkmax−1} may be distributed in ascending order at equal intervals. It should be noted that this is merely an example for description herein, and this application is not limited thereto. For example, the elements in {p0, p1, p2 . . . , pkmax−1} may also be arranged in descending order, and the difference between the adjacent elements may also have other values.

For another example, kmax=Nb, and Nb is a quantity of columns of the base matrix. NCB is obtained based on Nb·z and optionally through puncturing. Therefore, the difference between the adjacent values may be z. For any value pk, Pk=(k·z) mod NCB. For example, if Nb=50 and z=4, the values in {p0, p1, p2 . . . , pkmax−1} satisfy pk=(k·z) mod NCB, and are {0, 4, 8, . . . , 196}. It should be noted that this is merely an example for description herein, and this application is not limited thereto.
An increase in kmax can reduce a distance between the starting positions of the redundancy versions. The redundancy version determined based on the starting position can also improve decoding performance of the communications device at the receive end. For example, kmax may be an integer greater than 4. For example, kmax=5; or kmax=2n, and kmax is 8 or above, for example, 8 or 16, where n is an integer greater than 2. For another example, kmax=Nb, and Nb is the quantity of columns of the base matrix of the coded block. This is merely an example for description herein, and this application is not limited thereto.
In the foregoing method, an interval between redundancy version transmissions does not vary greatly or does not include a large quantity of repeated bit. Therefore, the foregoing method can adapt to various initial transmission code rates, and has relatively stable performance.
In a second possible implementation, the kmax values {p0, p1, p2 . . . , pkmax−1} may alternatively be set in a manner that differences between adjacent values are varied.
For example, pm+ is used as a demarcation point, kmax m−2 values after pm+1 may be set in a manner in which differences between adjacent values are in ascending order, as described in the above, kmax is an integer greater than or equal to 4. For example, pm+2−pm+1≤pm+3−pm+2. The m+1 value(s) between p0 and pm+1 may be evenly distributed based on a difference, which, for example, has a value of




  
    
      ⌊
      
        
          
            p
            
              m
              +
              1
            
          
          -
          
            p
            0
          
        
        
          m
          +
          1
        
      
      ⌋
    
    ⁢
    
      
    
    ⁢
    or
    ⁢
    
      
    
    ⁢
    
      ⌈
      
        
          
            p
            
              m
              +
              1
            
          
          -
          
            p
            0
          
        
        
          m
          +
          1
        
      
      ⌉
    
  
  ;




or may be set in another manner in which differences between adjacent values are varied. This is not limited herein. For example, if kmax=4, according to Pm+2−Pm+1≤Pm+3−Pm+2 and the subscript m+3 of Pm+3 is less than or equal to kmax−1, that is m+3≤3, thus m=0, therefore p2−p1≤p3−p2. Understandably, for a manner in which differences between adjacent values are varied, p2−p1<p3−p2, for a manner in which differences between adjacent values are even, p2−p1=p3−p2.

For example, during initial transmission, an output bit sequence having a high code rate is obtained, and includes information bits and parity bits that correspond to weight-2 columns and that are not punctured, for example, e0 in FIG. 5-1. A length of the output bit sequence is E0=(Nb−Mb+j)*z, where j is a quantity of parity bits corresponding to weight-2 columns or a quantity of parity bits that correspond to weight-2 columns and that are not punctured. A value of pm+1 may be (Nb−Mb+j)*z.
If pk>(Nb−Mb+j)*z, pk satisfies pk−pk−1≤pk+1−pk where m+1<k<kmax−1. As described in the above, kmax is an integer greater than or equal to 4. If kmax=4, kmax−1=3, that is to say m+1<k<3, as k is an integer, thus k=2, m=0. Therefore p2−p1≤p3−p2.
If pk<(Nb−Mb+j)*z, a difference between adjacent values in the m+1 value(s) between p0 and pm+1 is




  
    ⌊
    
      
        
          p
          
            m
            +
            1
          
        
        -
        
          p
          0
        
      
      
        m
        +
        1
      
    
    ⌋
  
  ⁢
  
    
  
  ⁢
  or
  ⁢
  
    
  
  ⁢
  
    
      ⌈
      
        
          
            p
            
              m
              +
              1
            
          
          -
          
            p
            0
          
        
        
          m
          +
          1
        
      
      ⌉
    
    .
  




For example, for k<m+1, pk satisfies





  
    p
    k
  
  =
  
    
      
        (
        
          
            p
            0
          
          +
          
            ⌊
            
              
                
                  (
                  
                    
                      p
                      
                        m
                        +
                        1
                      
                    
                    -
                    
                      p
                      0
                    
                  
                  )
                
                ·
                k
              
              
                m
                +
                1
              
            
            ⌋
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        p
        
          m
          +
          1
        
      
      ⁢
      
        
      
      ⁢
      or
      ⁢
      
        
      
      ⁢
      
        p
        k
      
    
    =
    
      
        (
        
          
            p
            0
          
          +
          
            ⌈
            
              
                
                  (
                  
                    
                      p
                      
                        m
                        +
                        1
                      
                    
                    -
                    
                      p
                      0
                    
                  
                  )
                
                ·
                k
              
              
                m
                +
                1
              
            
            ⌉
          
        
        )
      
      ⁢
      mod
      ⁢
      
        
      
      ⁢
      
        
          p
          
            m
            +
            1
          
        
        .
      
    
  




If pk=(Nb−Mb+j)*z, that is, pk=pm+1, and k=m+1.
According to the method, starting positions are more densely distributed at a position closer to information bits, and starting positions are more sparsely distributed at a position closer to a last bit of the coded block.
The base matrix shown in FIG. 1 is used as an example. Nb=38, Mb=13, and z=4. The last four columns in the kernel matrix Hk are a bidiagonal structure part, to be specific, corresponding columns of parity bits corresponding to weight-2 columns. Therefore, a quantity of the parity bits corresponding to weight-2 columns is four. If two columns are not punctured, a quantity of parity bits that correspond to weight-2 columns and that are not punctured is two. If j is a quantity of parity bits corresponding to weight-2 columns, Er0=116. If j is a quantity of parity bits that correspond to weight-2 columns and that are not punctured, Er0=108. In an example in which j is the quantity of parity bits that correspond to weight-2 columns and that are not punctured, kmax is 8, and the coded block has a length of 152 bits, p4=Er0=108, p0=2, and three values p1, p2, and p3 exist between p0 and p4. A difference between two adjacent values is




  
    ⌊
    
      106
      4
    
    ⌋
  
  =
  26.




Three values p5, p6, and p7 exist between p4 and the end bit of the coded block, with differences between them being in decreasing order. The differences are sequentially 6, 10, and 14. The kmax values are {2, 28, 54, 80, 108, 114, 124, 138}. It should be noted that the distribution of the elements in {p0, p1, p2 . . . , pkmax−1} in ascending order is merely an example herein. It may be understood that this application is not limited thereto, the elements in {p0, p1, p2 . . . , pkmax−1} may alternatively be distributed in descending order, and an interval between adjacent elements in {p0, p1, p2 . . . , pkmax−1} may alternatively be another value.

For the value pk in {p0, p1, p2 . . . , pkmax−1} k0(i) in step 401 may be obtained in a plurality of manners.
Based on the first implementation or the second implementation, in a third possible implementation, if i>0, the starting position k0(i) is determined based on a starting position k0(i−1) of a previous transmission output bit sequence and a length E(i−1) of the previous transmission output bit sequence.
For ease of description, a direction from a last position of the previous transmission output bit sequence to the last bit (an (NCB−1)th bit) of the coded block is used as a front-to-end direction, and a direction from the last position of the previous transmission output bit sequence to a start bit (a 0th bit) of the coded block is used as an end-to-front direction.
For example, to reduce a quantity of repeated redundancy bits, the starting position k0(i) may be obtained in a front-to-end direction based on the starting position k0(i−1) of the previous transmission output bit sequence and the length E(i−1) of the previous transmission output bit sequence. The output bit sequence does not include any filler bit; therefore, if F(i−1) is a bit quantity required for sequentially obtaining the E(i−1) output bits from the coded block starting from k0(i−1), the last position of the previous obtained output bit sequence is (k0(i−1)+F(i−1)−1) mod NCB. A value pk of a first starting position in the front-to-end direction from the last position of the previous obtained output bit sequence is used as k0(i). If the last position of the previous obtained output bit sequence is greater than a largest value in {p0, p1, p2 . . . , pkmax−1}, pk is a smallest value in {p0, p1, p2 . . . , pkmax−1}.
It may be learned that pk is a minimum value satisfying Pk≥((k0(i−1)+F(i−1)) mod NCB). If no value in {p0, p1, p2 . . . , pkmax−1} satisfies Pk≥((k0(i−1)+F(i−1)) mod NCB), in other words, ((k0(i−1)+F(i−1)) mod NCB) is greater than the largest value in {p0, p1, p2 . . . , pkmax−1}, pk is the smallest value in {p0, p1, p2 . . . , pkmax−1}.
The values {2, 28, 54, 80, 108, 114, 124, 138} in the foregoing implementation are used as an example. The starting position k0(i−1) of the previous transmission output bit sequence is 2, and the length E(i−1) of the previous transmission output bit sequence is 25 bits. There are 5 filler bits; therefore, the bit quantity F(i−1) required for sequentially obtaining the E(i−1) output bits from the coded block starting from k0(i−1) last time is 30. For the output bit sequence k0(i) for the ith transmission, k0(i)=54 if the method of obtaining the starting position in a front-to-end direction in this embodiment is used. If the starting position k0(i−1) of the previous transmission output bit sequence is 124, the length E(i−1) of the previous transmission output bit sequence is 30 bits, and there are no filler bits, the bit quantity required for sequentially obtaining the E(i−1) output bits from the coded block starting from k0(i−1) last time is 30, and k0(i)=2. It should be noted that this is merely an example herein, and this application is not limited thereto.
For another example, to meet a requirement of sequential decoding, the starting position k0(i) is obtained in an end-to-front direction based on the starting position k0(i−1) of the previous transmission output bit sequence and the length E(i−1) of the previous transmission output bit sequence. The output bit sequence does not include any filler bit; therefore, if F(i−1) is a bit quantity required for sequentially obtaining E(i−1) output bits from the coded block starting from k0(i−1), the last position of the previous obtained output bit sequence is (k0(i−1)+F(i−1)−1) mod NCB. A value pk of the first starting position in the end-to-front direction from the last position of the previous obtained output bit sequence is used as k0(i). If the end location of the previous obtained output bit sequence is less than a smallest value in {p0, p1, p2 . . . , pkmax−1}, pk is a largest value in {p0, p1, p2 . . . , pkmax−1}. It may be learned that pk is a maximum value satisfying pk≤((k0(i−1)+F (i−1)) mod NCB). If no value in {p0, p1, p2 . . . , pkmax−1} satisfies pk ((k0(i−1)+F (i−1)) mod NCB), in other words, ((k0(i−1)+F(i 1)) mod NCB) is less than the smallest value in {p0, p1, p2 . . . , pkmax−1} pk is the largest value in {p0, p1, p2 . . . , pkmax−1}.
The values {2, 28, 54, 80, 108, 114, 124, 138} in the foregoing embodiment and that the length of the coded block is 152 bits are still used as an example. The starting position k0(i−1) of the previous transmission output bit sequence is 2, and the length E(i−1) of the previous transmission output bit sequence is 25 bits. There are 5 filler bits. Therefore, the bit quantity F(i−1) required for sequentially obtaining the E(i−1) output bits from the coded block starting from k0(i−1) last time is 30. For the output bit sequence k0(i) for the transmission, k0(i)=28 if the method of obtaining the starting position in an end-to-front direction is used. If the starting position k0(i−1) of the previous transmission output bit sequence is 124, the length E(i−1) of the previous transmission output bit sequence is 20 bits, and there are nine filler bits, the bit quantity F(i−1) required for sequentially obtaining the E(i−1) output bits from the coded block starting from k0(i−1) last time is 29, and k0(i)=138. It should be noted that this is merely an example herein, and this application is not limited thereto.
For another example, to compensate decoding performance losses caused by repeating bits and by skipping redundancy bits, with reference to results of obtaining k0(i) in an end-to-front direction and obtaining k0(i) in a front-to-end direction in the foregoing two examples, a value of one of the two results that has a smaller difference with the end location of the previous obtained output bit sequence is used as k0(i). If p0≤((k0(i−1)+F (i−1)) mod NCB)≤pkmax−1, pk is a value in {p0, p1, p2 . . . , pkmax−1} that has a smallest difference with ((k0 (i−1)+F (i−1)) mod NCB); or if ((k0 (i−1)+F (i−1)) mod NCB) is less than a smallest value in {p0, p1, p2 . . . , pkmax−1} or ((k0 (i−1)+F (i−1)) mod NCB) is greater than a largest value in {p0, p1, p2 . . . , pkmax−1} pk is one of the smallest value in {p0, p1, p2 . . . , pkmax−1} and the largest value pkmax−1 in {p0, p1, p2 . . . , pkmax−1} that has a smaller difference with ((k0 (i−1)+F (i−1)) mod NCB). In a possible implementation, Pk+ and pk− may be determined first. pk+, is a value of the first starting position in the front-to-end direction from the last position of the previous obtained output bit sequence, pk− is a value of the first starting position in the end-to-front direction from the last position of the previous obtained output bit sequence, and pk is one of pk+ and pk− has a smaller difference with ((k0 (i−1)+F (i−1)) mod NCB). If a difference between pk+ and ((k0(i−1)+F (i−1)) mod NCB) is equal to that between pk− and ((k0(i−1)+F (i−1)) mod NCB), pk may be selected from the two arbitrarily or based on a value determining direction.
The values {2, 28, 54, 80, 108, 114, 124, 138} in the foregoing embodiment and that the length of the coded block is 152 bits are still used as an example. The starting position k0(i−1) of the previous transmission output bit sequence is 2, and the length E(i−1) of the previous transmission output bit sequence is 26 bits. The bit quantity F(i−1) required for sequentially obtaining the E(i−1) output bits from the coded block starting from k0(i−1) last time is 30. For the output bit sequence k0(i) for the ith transmission, k0(i)=28 if the method in this embodiment is used to obtain the starting position. If k0(i−1) is 124 bits, the length E(i−1) of the previous transmission output bit sequence is 29 bits, and the bit quantity F(i−1) required for sequentially obtaining the E(i−1) output bits from the coded block starting from k0(i−1) last time is 30, a value obtained in the front-to-end direction is p0=2, a difference between P0 and ((k0 (i−1)+F (i−1)) mod NCB) is 1, a value obtained in the end-to-front direction is p7=138, and a difference between p7 and ((k0 (i−1)+F (i−1)) mod NCB) is 15. Therefore, k0(i)=p0=2. It should be noted that this is merely an example herein, and this application is not limited thereto.
For another example, to compensate decoding performance losses caused by repeating bits and by skipping redundancy bits, a direction for obtaining the starting position k0(i) in the ith transmission is determined based on a correspondence between a quantity i of transmissions and the direction for obtaining the starting position k0(i), and the starting position k0(i) is obtained based on the last position of the previous transmission output bit sequence and the determined direction for obtaining the starting position k0(i). A table of the quantity i of transmissions and the direction for obtaining the starting position k0(i), for example, Table 1, may be set in the communications device. A largest quantity of retransmissions is three, and no obtaining direction needs to be set for the initial transmission.










TABLE 1







Quantity of transmissions
Obtaining direction









1
front-to-end



2
end-to-front



3
end-to-front










The values {2, 28, 54, 80, 108, 114, 124, 138} in the foregoing embodiment and that the length of the coded block is 152 bits are still used as an example. If a starting position k0(0) of an output bit sequence for the initial transmission is 2, a length E(0) of the output bit sequence for the initial transmission is 20 bits, and a quantity of filler bits is 10, F(0)=30 bits. It is assumed that there are a same quantity of filler bits each time when an output bit sequence is obtained, an output bit sequence for each transmission has a same length, and the starting position is obtained by using the correspondence in Table 1 above. For an output bit sequence for the 1st transmission, a starting position k0(1) is obtained in a front-to-end direction, and k0(1)=54. For an output bit sequence for the 2nd transmission, a starting position k0(2) is obtained in an end-to-front direction, and k0(2)=80. For an output bit sequence for the 3rd transmission, a starting position k0(3) is obtained, and k0(3)=108. It should be noted that this is merely an example herein, and this application is not limited thereto.
“End-to-front” and “front-to-end” in the obtaining directions may be indicated by using particular numerical values, and are not limited to a literal expression manner. For example, 0 represents “end-to-front”, and 1 represents “front-to-end”; or another numerical expression manner is used. The correspondence between the quantity i of transmissions and the direction for obtaining the starting position k0(i) may alternatively be defined in another form. This embodiment of the present invention is not limited thereto.
The direction for obtaining the starting position of the output bit sequence for the ith transmission may be determined based on the quantity i of transmissions. The starting position k0(i) is obtained in an end-to-front direction based on the direction for obtaining the starting position of the output bit sequence for the ith transmission, the starting position k0(i−1) of the previous transmission output bit sequence, and the length E(i−1) of the previous transmission output bit sequence.
Based on the first implementation or the second implementation, in a fourth possible implementation, an order in which the starting position is obtained during each transmission may be defined, and a value selection order of the subscript k in pk during each transmission may also be defined. The order may be indicated to the communications device at the receive end, or may be prestored in the communications device at the transmit end and the communications device at the receive end.
The subscript k in pk may be a redundancy version starting position number rvidx, a redundancy version starting position number in the ith transmission may be represented as rvidx(i), and the starting position k0(i) may be determined based on the redundancy version starting position number rvidx(i mod kmax).
A starting position obtaining method based on a fixed order may be used. In an embodiment, a value selection order of rvidx may be defined. A quantity of values in the value selection order may be kmax, or may be a largest quantity Rmax of retransmissions. For example, when kmax=8, the value selection order of rvidx is sequentially 0, 3, 6, 2, 5, 7, 4, and 1. For the initial transmission, an output bit sequence is determined starting from the p0th bit. For the first transmission, k0(1)=p3, and an output bit sequence is determined starting from the p0th bit. For the second transmission, k0(2)=p6, and the output bit sequence is determined starting from the p6th bit. The rest can be deduced by analogy. For the kmaxth transmission, the output bit sequence is determined starting from the pth bit again. To be specific, for the ith transmission, k=rvidx(i mod kmax), and k0(i)=pk. For another example, the maximum quantity Rmax of retransmissions is 3, and a value selection order set of rvidx is {0, 2, 3, 1}. In this case, for the initial transmission, and the output bit sequence is determined starting from the p0th bit. For the 1st transmission, k0(1)=p2, and the output bit sequence is determined starting from the p3th bit. For the 2nd transmission, k0(2) is p3. For the ith transmission, k=rvidx(i mod Rmax), and k0(i)=Pk.
Further, the value selection order of rvidx may also be determined based on a value of an initial transmission code rate, or may be determined based on a length E of an output bit sequence for each transmission and a lifting size z. In a non-adaptive retransmission scenario, a length of an output bit sequence in the initial transmission is equal to that of an output bit sequence in the retransmission. For example, the value selection order of rvidx is determined based on




  
    ⌈
    
      E
      z
    
    ⌉
  
  .




For example, kmax=8, and a 66*82 LDPC matrix is used. A quantity of columns of information bits is 16. For the coded block, for a correspondence between the value selection order of rvidx and the code rate of the initial transmission, refer to Table 2. For example, R0≥0.8, and the value selection order of rvidx is {0, 2, 4, 6}.










TABLE 2







Initial transmission code rate R0
Value selection order of rvidx









     R0 ≥ 0.8
0, 2, 4, 6



0.53 ≤ R0 < 0.8
0, 3, 6, 2



      R0 < 0.53
0, 4, 2, 6










For another example, kmax=8, and a 66*82 LDPC matrix is used. A quantity of columns of information bits is 16. For the coded block, refer to Table 3 for a correspondence between the value selection order of rvidx and the initial transmission code rate. For example,




  
    20
    <
    
      ⌈
      
        E
        z
      
      ⌉
    
    ≤
    30
  
  ,




and the value selection order of rvidx is {0, 3, 6, 2}.











TABLE 3







Length E of output bit




sequence and lifting
Value selection



size z
order of rvidx













  
    ⌈
    
      E
      z
    
    ⌉
  
  ≤
  20




0, 2, 4, 6



 







  20
  <
  
    ⌈
    
      E
      z
    
    ⌉
  
  ≤
  30




0, 3, 6, 2



 







  
    ⌈
    
      E
      z
    
    ⌉
  
  >
  30




0, 4, 2, 6










This manner is suitable for non-adaptive retransmission, and information about the starting position does not need to be indicated to the communications device at the receive end before each time of sending.
The starting position k0(i) of the output bit sequence in the coded block may alternatively be obtained based on rvidx indicated by the communications device at the transmit end. This manner is suitable for adaptive retransmission.
In a fifth possible implementation, for a retransmission, to be specific, for i>0, the output bit sequence for the ith transmission and an output bit sequence for the (i−1)th transmission are connected end to end. In this implementation, k0(i) is determined based on a starting position k0(i−1) of a previous transmission output bit sequence and a length E(i−1) of the previous transmission output bit sequence. The output bit sequence does not include any filler bit. Therefore, F(i−1) may be obtained based on k0(i−1) and E(i−1). F(i−1) is a bit quantity required for sequentially obtaining E(i−1) output bits from the coded block starting from k0(i−1). k0(i)=(k0(i−1)+F(i−1)) mod NCB. In this implementation, output bit sequences of two adjacent transmissions are consecutive, and no repeated bit exists between the two output bit sequences, so that when such output bit sequences are sent to the communications device at the receive end, relatively good decoding performance can be achieved.
Further, based on the retransmission manner with end-to-end connection, after all bits of the coded block have been transmitted once, an offset Eoffset is added for each retransmission, to be specific, k0(i)=(k0(i−1)+F (i−1)+Eoffset) mod NCB. In this implementation, if the end bit of the coded block is already transmitted, k0 (i)=(k0(i−1)+F (i−1)+Eoffset) mod NCB; otherwise, k0(i)=(k0(i−1)+F(i−1)) mod NCB. In this way, after all the bits are transmitted, an offset is added for each retransmission, so that a quantity of repeated bits is reduced, thereby reducing a decoding performance loss.
Optionally, after the method for processing information is performed, the communications device may further process the output bit sequence, so that the output bit sequence is used during sending or receiving. For example, the processing includes interleaving the output bit sequence, mapping the output bit sequence to modulation symbols, and the like. For the processing, refer to a corresponding processing method in the prior art, and details are not described herein.
FIG. 6 is a flowchart of a method for processing information according to an embodiment of the present invention. The method may be applied to a communications system. The communications system includes a communications device 30 and a communications device 31. The method may be implemented by the communications device 31 and includes the following steps.
601: Obtain a starting position k0(i) of a soft bit sequence having a length of E(i) stored in a soft buffer.
602: Combine and store the soft bit sequence in step 601 in the soft buffer starting from the starting position k0(i).
The communications device 30 sends the output bit sequence obtained in the foregoing embodiments to the communications device 31. It may be understood that the output bit sequence in the foregoing embodiments is an output bit sequence obtained after rate matching, the communications device 30 may perform processing such as interleaving and modulation on the output bit sequence obtained after the rate matching and send a signal corresponding to the output bit sequence, and the communications device 31 receives the output signal and performs demodulation and de-interleaving on the output signal, to obtain a soft bit sequence corresponding to the output bit sequence. To be specific, one bit in the output bit sequence corresponds to one soft channel bit (soft channel bit) in the soft bit sequence. Positions of the soft channel bits stored in the soft buffer of the communications device 31 are in a one-to-one correspondence with positions in the coded block in the circular buffer of the communications device 30. A size of the soft buffer and a size of the coded block in the circular buffer are also the same and may be NCB.
For example, an output bit sent by the communications device 30 is 1, and after channel transmission, the communications device 31 obtains a soft channel bit corresponding to the output bit, where the soft channel bit is 1.45. If a position of the output bit in the coded block is the 5th bit, the 5th soft channel bit in the soft buffer of the communications device 31 is 1.45. It should be noted that this is merely an example for description herein, and this embodiment of the present invention is not limited thereto. If the output bit sequence obtained by the communications device 30 includes nc output bits, the communications device 31 may obtain nc corresponding soft channel bits. If receiving soft channel bits of a same position at two times, the communications device 31 combines the two soft values. For example, if a soft channel bit received in the 1st transmission is 1.45 and a soft channel bit received in the 2nd transmission is 0.5, 1.95 is obtained after combining. It should be noted that this is merely an example herein, and this application is not limited thereto.
It may be learned that the starting position k0(i) and the obtaining manner thereof have features corresponding to the foregoing embodiments. Refer to the descriptions in the foregoing embodiments, and details are not described herein again. It should be noted that in the communications device 30, the starting position is relative to the coded block in the circular buffer; in the communications device 31, the starting position is relative to the soft buffer; on a side of the communications device 30, the output bit sequence is determined in the coded block in the circular buffer, and on a side of the communications device 31, the received soft bit sequence are stored in the soft buffer.
FIG. 7 is a schematic structural diagram of an apparatus 700 for processing information. The apparatus may be applied to the communications device 30 in the communications system shown in FIG. 3. The apparatus 700 may also be referred to as a rate matching apparatus. The apparatus 700 may be configured to implement the foregoing method embodiments. Refer to the descriptions in the foregoing method embodiments, and details are not described herein again.
The apparatus 700 may include an obtaining unit 701 and a processing unit 702.
The obtaining unit 701 is configured to obtain a starting position k0(i) of an output bit sequence in a coded block. The processing unit 702 is configured to determine the output bit sequence in the coded block based on a length E(i) of the output bit sequence and the starting position k0(i). The coded block is stored in a circular buffer, and i is an integer greater than or equal to 0. For details about how to obtain k0(i) and determine the output bit sequence based on E(i) and k0(i), refer to the descriptions in the foregoing method embodiments
FIG. 8 is a schematic structural diagram of an apparatus 800 for processing information. The apparatus may be applied to the communications device 31 in the communications system shown in FIG. 3. The apparatus 800 may also be referred to as a rate de-matching apparatus. The apparatus 800 may be configured to implement the foregoing method embodiments. For details, refer to the descriptions in the foregoing method embodiments. The apparatus 800 may include an obtaining unit 801 and a processing unit 802.
The obtaining unit 801 is configured to obtain a starting position k0(i) of a soft bit sequence having a length of E(i) stored in a soft buffer. The processing unit 802 is configured to combine and store the soft bit sequence obtained by the obtaining unit 801 in the soft buffer starting from the starting position k0(i).
FIG. 9 is a schematic structural diagram of a communications device. The communications device may be applied to the communications system shown in FIG. 3. The communications device 30 may include an encoder 301, a rate matcher 302, and a transceiver 303. The encoder 301 may also be referred to as an encoding unit, an encoding circuit, or the like, and is mainly configured to encode information data. The rate matcher 302 may also be referred to as a rate matching unit, a rate matching circuit, or the like, is mainly configured to determine, based on a coded block obtained by the encoder 301 by encoding, an output bit sequence to be sent, for example, configured to determine the output bit sequence in the foregoing embodiments, and may include, for example, the apparatus 700 in FIG. 7. The transceiver 303 may also be referred to as a transceiver unit, a transceiver, a transceiver circuit, or the like, and is mainly configured to receive and send radio frequency signals, for example, configured to send the output bit sequence in the foregoing embodiments to the communications device 31. The communications device 30 may further include other components, such as a component configured to generate a transport block CRC, a component configured to perform code block segmentation and CRC check, an interleaver, and a modulator, which can be respectively configured to implement functions of parts of the communications device 30 in FIG. 3.
It should be noted that the communications device 30 may include one or more memories and one or more processors. The memory stores instructions. The processor is coupled to the memory, to execute the instructions in the memory to perform steps described in the method embodiments. The memory may further include other instructions for the processor to execute to perform functions of other parts of the communications device 30, for example, code block segmentation, CRC check, interleaving, and modulation.
FIG. 10 is a schematic structural diagram of a communications device. The communications device may be applied to the communications system shown in FIG. 3. The communications device 31 may include a decoder 311, a rate de-matcher 312, and a transceiver 313. The rate de-matcher 312 may also be referred to as a rate de-matching unit or a rate de-matching circuit, may be configured to combine soft channel bits, for example, configured to combine and store the soft channel bits of the output bit sequence in the foregoing embodiments in a soft buffer, and may include, for example, the apparatus 800 in FIG. 8. The decoder 311 may also be referred to as a decoding unit or a decoding circuit, and is mainly configured to decode a received signal, for example, configured to decode a soft channel bit in the soft buffer. The transceiver 313 may also be referred to as a transceiver unit, a transceiver, a transceiver circuit, or the like, and is mainly configured to receive and send radio frequency signals, for example, configured to receive the output bit sequence in the foregoing embodiments that is sent by the communications device 30. The communications device 31 may further include other components, such as a component configured to perform CRC check on a transport block, a component configured to perform code block concatenation, a deinterleaver, and a demodulator, which can be respectively configured to implement functions of parts of the communications device 31 in FIG. 3.
It should be noted that the communications device 31 may include one or more memories and processors, to implement the functions of the parts of the communications device 31 in FIG. 3. A dedicated memory and processor may be disposed for each component. Alternatively, a plurality of components share a same memory and processor.
It should be noted that the communications device 31 may include one or more memories and one or more processors. The memory stores instructions. The processor is coupled to the memory, to execute the instruction in the memory to perform steps described in the method embodiments. The memory may further include other instructions for the processor to execute to perform functions of other parts of the communications device 30, for example, code block concatenation, deinterleaving, and demodulation.
A person skilled in the art may further understand that various illustrative logical blocks (illustrative logic block) and steps (step) that are listed in the embodiments of the present invention may be implemented by using electronic hardware, computer software, or a combination thereof. Whether the functions are implemented by using hardware or software depends on particular applications and a design requirement of the entire system. A person skilled in the art may use various methods to implement the functions for each particular application, but such an implementation should not be construed as going beyond the scope of the embodiments of the present invention.
The various illustrative logical units and circuits described in the embodiments of the present invention may implement or operate the described functions by using a design of a general purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or another programmable logical apparatus, a discrete gate or transistor logic, a discrete hardware component, or any combination thereof. The general purpose processor may be a microprocessor. Optionally, the general purpose processor may also be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented by a combination of computing apparatuses, for example, a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
Steps of the methods or algorithms described in the embodiments of the present invention may be directly embedded in hardware, in instructions executed by a processor, or in a combination thereof. The memory may be a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium in the art. For example, the memory may be connected to the processor so that the processor may read information from the memory and write information to the memory. Optionally, the memory may be further integrated into a processor. The processor and the memory may be disposed in an ASIC, and the ASIC may be disposed in UE. Optionally, the processor and the memory may be disposed in different components of the UE.
With descriptions of the foregoing implementations, a person skilled in the art may clearly understand that the present invention may be implemented by hardware, firmware or a combination thereof. When implemented by using a software program, the methods may be fully or partially implemented in a form of a computer program product, and the computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on the computer, the procedure or functions according to the embodiments of the present invention are all or partially generated. When the present invention is implemented by using a software program, the foregoing functions may be stored in a computer readable medium or transmitted as one or more instructions or code in the computer readable medium. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer readable storage medium, or may be transmitted from a computer readable storage medium to another computer readable storage medium. The computer readable medium includes a computer storage medium and a communications medium, where the communications medium includes any medium that cause a computer program to be transmitted from one place to another. The storage medium may be any available medium accessible to a computer. The following provides an example but does not impose a limitation: The computer readable medium may include a RAM, a ROM, an EEPROM, a CD-ROM, or another optical disc storage or a disk storage medium, or another magnetic storage device, or any other medium that can be used to carry or store expected program code in a form of instructions or data structures and can be accessed by a computer. In addition, any connection may be appropriately defined as a computer readable medium. For example, if software is transmitted from a website, a server or another remote source by using a coaxial cable, an optical fiber/cable, a twisted pair, a digital subscriber line (DSL) or wireless technologies such as infrared ray, radio and microwave, and the coaxial cable, optical fiber/cable, twisted pair, DSL or wireless technologies such as infrared ray, radio and microwave are included in a definition of a medium to which they belong. For example, a disk (Disk) and disc (disc) used in the present invention includes a compact disc (CD), a laser disc, an optical disc, a digital versatile disc (DVD), a floppy disk and a Blu-ray disc, where the disk generally copies data by a magnetic means, and the disc copies data optically by a laser means. The foregoing combination should also be included in the protection scope of the computer readable medium.
In conclusion, what is described above is merely example embodiments of the technical solutions of the present invention, but is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made without departing from the principle of the present invention shall fall within the protection scope of the present invention.

## Claims

1. A method for performing rate matching in a communications system, comprising:
obtaining, by a communication device, a size NCB of a coded block, wherein the coded block is obtained based on low-density parity-check (LDPC) code and stored in a circular buffer;
obtaining, by the communication device, a starting position of an output bit sequence in the coded block, wherein a value of the starting position is one of {p0, p1, p2, p3}, wherein p0=0, p1, p2, and p3 are integers based on the size NCB of the coded block, wherein 0<p1<p2<p3≤NCB, and p2−p1<p3−p2;
outputting, by the communication device, the output bit sequence, wherein the output bit sequence comprises a plurality of bits starting from the starting position in the coded block;
performing, by the communication device, interleaving on the output bit sequence to generate an interleaved output bit sequence;
generating, by the communication device, one or more modulation symbols based on the interleaved output bit sequence; and
transmitting, by the communication device, a transmission signal comprising the one or more modulation symbols.

2. The method according to claim 1, further comprising: determining a length of the output bit sequence that comprises the plurality of bits.

3. The method according to claim 1, wherein, during initial transmission, the output bit sequence includes information bits and parity bits that correspond to weight-2 columns.

4. The method according to claim 1, wherein the starting position is determined based on a redundancy version number.

5. The method according to claim 4, wherein the redundancy version number is obtained through signaling.

6. The method according to claim 4, wherein the redundancy version number is obtained based on a sequence of redundancy version numbers and a value of i, wherein i is an integer greater than or equal to 0, the value of i indicates an ith transmission.

7. The method according to claim 6, wherein the sequence of the redundancy version numbers is read from a memory, or the sequence of the redundancy version numbers is determined based on an initial transmission code rate.

8. An apparatus, comprising:
at least one processor; and
at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions instruct the at least one processor to:
obtain a size NCB of a coded block, wherein the coded block is obtained based on low-density parity-check (LDPC) code and stored in a circular buffer;
obtain a starting position of an output bit sequence in the coded block, wherein a value of the starting position is one of {p0, p1, p2, p3}, wherein p0=0, p1, p2, and p3 are integers based on the size NCB of the coded block, wherein 0<p1<p2<p3≤NCB, and p2−p1<p3−p2;
output the output bit sequence, wherein the output bit sequence comprises a plurality of bits starting from the starting position in the coded block;
perform interleaving on the output bit sequence to generate an interleaved output bit sequence; generate one or more modulation symbols based on the interleaved output bit sequence; and
transmit a transmission signal comprising the one or more modulation symbols.

9. The apparatus according to claim 8, wherein the instructions further instruct the at least one processor to determine a length of the output bit sequence that comprises the plurality of bits.

10. The apparatus according to claim 8, wherein, during initial transmission, the output bit sequence includes information bits and parity bits that correspond to weight-2 columns.

11. The apparatus according to claim 8, wherein the starting position is determined based on a redundancy version number.

12. The apparatus according to claim 11, wherein the redundancy version number is obtained through signaling.

13. The apparatus according to claim 11, wherein the redundancy version number is obtained based on a sequence of redundancy version numbers and a value of i, wherein i is an integer greater than or equal to 0, the value of i indicates an ith transmission.

14. The apparatus according to claim 13, wherein the sequence of the redundancy version numbers is read from a memory, or the sequence of the redundancy version numbers is determined based on an initial transmission code rate.

15. A non-transitory computer readable medium, wherein the non-transitory computer readable medium stores instructions that are executable by a computer, and the instructions comprise instructions to:
obtain a size NCB of a coded block, wherein the coded block is obtained based on low-density parity-check (LDPC) code and stored in a circular buffer;
obtain a starting position of an output bit sequence in the coded block, wherein a value of the starting position is one of {p0, p1, p2, p3}, wherein p0=0, p1, p2, and p3 are integers based on the size NCB of the coded block, wherein 0<p1<p2<p3≤NCB, and p2−p1<p3−p2;
output the output bit sequence, wherein the output bit sequence comprises a plurality of bits starting from the starting position in the coded block;
perform interleaving on the output bit sequence to generate an interleaved output bit sequence;
generate one or more modulation symbols based on the interleaved output bit sequence;
output the one or more modulation symbols; and
transmit a transmission signal comprising the one or more modulation symbols.