Data transmission method and apparatus
A data transmission method and apparatus are disclosed. The method includes a first communication apparatus obtains information bit information of an ith sub-block, where the information bit information of the ith sub-block includes information bits of the ith sub-block and an information bit length of the ith sub-block, and i is a positive integer; obtains a matrix order M of the RM corresponding to the first communication apparatus in the ith sub-block, where M is a positive integer; then obtains, based on M, a first P matrix and a first b vector that are used to generate an RM; then generates, based on the first P matrix and the first b vector, the RM sequence corresponding to the ith sub-block; and finally, outputs the RM sequence corresponding to the ith sub-block.
1. A data transmission method, comprising:
obtaining, by a first communication apparatus, information bit information of an ith sub-block, wherein i is a positive integer, and the information bit information of the ith sub-block comprises information bits of the ith sub-block and an information bit length of the ith sub-block;
obtaining, by the first communication apparatus, a matrix of order M, wherein M is a matrix order of a Reed-Muller (RM) sequence corresponding to the first communication apparatus in the ith sub-block, and M is a positive integer;
determining, by the first communication apparatus, a first P matrix and a first b vector based on M and the information bit information of the ith sub-block;
generating, by the first communication apparatus based on the first P matrix and the first b vector, the RM sequence corresponding to the ith sub-block; and
outputting, by the first communication apparatus, the RM sequence corresponding to the ith sub-block.
2. The method according to claim 1 , wherein the determining, by the first communication apparatus, the first P matrix and the first b vector based on M and the information bit information of the ith sub-block comprises:
obtaining, by the first communication apparatus, a P-matrix set and a b-vector set based on M; and
determining, by the first communication apparatus, the first P matrix from the P-matrix set based on the information bit information of the ith sub-block; and
determining the first b vector from the b-vector set.
3. The method according to claim 2 , wherein the obtaining, by the first communication apparatus, the P-matrix set and the b-vector set based on M comprises one of:
performing:
generating, by the first communication apparatus, a size of the P-matrix set and a size of the b-vector set based on M and the information bit length of the ith sub-block; and
generating, by the first communication apparatus, the P-matrix set and the b-vector set based on M, the size of the P-matrix set, the size of the b-vector set, and an information bit set, wherein the information bit set comprises information bits of at least one of the first sub-block to the ith sub-block; or
performing:
generating, by the first communication apparatus, a size of the P-matrix set and a size of the b-vector set based on M and a length of encoded information bits of the ith sub-block, wherein the length of the encoded information bits of the ith sub-block is a sum of a length of check bits after the check bits are added to the ith sub-block and the information bit length of the ith sub-block; and
generating, by the first communication apparatus, the P-matrix set and the b-vector set based on M, the size of the P-matrix set, the size of the b-vector set, and an information bit set.
4. The method according to claim 3 , wherein the information bit set comprises information bits of at least one of the first sub-block to the ith sub-block; or
wherein the information bit set comprises at least one of the encoded information bits of the first sub-block to the encoded information bits of the ith sub-block, and wherein the encoded information bits comprise check bits and information bits of the sub-block.
5. The method according to claim 3 , wherein one of:
the generating, by the first communication apparatus, a size of the P-matrix set and a size of the b-vector set based on M and the information bit length of the ith sub-block comprises:
determining, based on the information bit length of the ith sub-block being greater than or equal to M, the size of the P-matrix set based on the information bit length of the ith sub-block and M, and the size of the b-vector set is determined by M; or
determining, based on the information bit length of the ith sub-block being less than M, the size of the P-matrix set is 1, and the size of the b-vector set is determined by the information bit length of the ith sub-block; or
the generating, by the first communication apparatus, a size of the P-matrix set and a size of the b-vector set based on M and a length of encoded information bits of the ith sub-block comprises:
determining, based on the length of the encoded information bits of the ith sub-block being greater than or equal to M, the size of the P-matrix set based on the length of the encoded information bits of the ith sub-block and M, and the size of the b-vector set is determined by M; or
determining, based on the length of the encoded information bits of the ith sub-block being less than M, the size of the P-matrix set is 1, and the size of the b-vector set is determined by the length of the encoded information bits of the ith sub-block.
6. The method according to claim 3 , wherein the generating, by the first communication apparatus, the P-matrix set and the b-vector set based on M, the size of the P-matrix set, the size of the b-vector set, and the information bit set comprises:
generating, by the first communication apparatus, elements of all P matrices in the P-matrix set based on M, the size of the P-matrix set, and the information bit set;
generating elements of all b vectors in the b-vector set based on M, the size of the b-vector set, and the information bit set;
generating, by the first communication apparatus, the P-matrix set according to a preset filling rule and elements of all P matrices in the P-matrix set; and
generating the b-vector set based on a length of the b vector and the elements of all b vectors in the b-vector set.
7. The method according to claim 2 , wherein the obtaining, by the first communication apparatus, the P-matrix set and the b-vector set based on M comprises:
selecting, by the first communication apparatus, at least two P-matrix subsets and at least two b-vector subsets based on M, wherein the P-matrix set comprises the at least two P-matrix subsets, and the b-vector set comprises the at least two b-vector subsets.
8. The method according to claim 2 , wherein the determining, by the first communication apparatus, the first P matrix from the P-matrix set based on the information bit information of the ith sub-block, and determining the first b vector from the b-vector set comprises:
obtaining, by the first communication apparatus, an index value of each P matrix in the P-matrix set and an index value of each b vector in the b-vector set;
selecting, by the first communication apparatus, a bit value x and a bit value y based on the information bits of the ith sub-block and the information bit length of the ith sub-block, wherein the bit value x and the bit value y cover the information bits of the ith sub-block; and
determining, by the first communication apparatus, the first P matrix based on the bit value x, and determining the first b vector based on the bit value y.
9. A data transmission method, comprising:
sending, by a second communication apparatus, configuration information to a first communication apparatus, wherein the configuration information indicates a matrix order M, M is a matrix order of a Reed-Muller (RM) sequence corresponding to the first communication apparatus in an ith sub-block, and M and i are positive integers;
receiving, by the second communication apparatus, the RM sequence that is corresponding to the ith sub-block and that is sent by the first communication apparatus;
obtaining, by the second communication apparatus, a first P matrix and a first b vector based on the RM sequence; and
obtaining, by the second communication apparatus, information bits of the ith sub-block based on the first P matrix and the first b vector.
10. The method according to claim 9 , wherein the obtaining, by the second communication apparatus, the information bits of the ith sub-block based on the first P matrix and the first b vector comprises:
obtaining, by the second communication apparatus, a bit value x based on the first P matrix, and obtaining a bit value y based on the first b vector; and
obtaining, by the second communication apparatus, information bit information of the ith sub-block based on the bit value x, the bit value y, and a mapping rule.
11. The method according to claim 9 , wherein the method further comprises, before the obtaining, by the second communication apparatus, information bits of the ith sub-block based on the first P matrix and the first b vector:
parsing, by the second communication apparatus, the RM sequence corresponding to the ith sub-block to obtain the first P matrix and the first b vector.
12. The method according to claim 9 , wherein the configuration information carries M; or
the configuration information carries time-frequency resource information of the ith sub-block, and the time-frequency resource information indicates a quantity of available time-frequency resources.
13. A first communication apparatus, comprising:
a processor; and
a non-transitory computer-readable storage medium storing a program to be executed by the processor, the program including instructions to:
obtain information bit information of an ith sub-block, wherein i is a positive integer, and the information bit information of the ith sub-block comprises information bits of the ith sub-block and an information bit length of the ith sub-block;
obtain a matrix order M, wherein M is a matrix order of a Reed-Muller (RM) sequence corresponding to the first communication apparatus in the ith sub-block, and M is a positive integer;
determine a first P matrix and a first b vector based on M and the information bit information of the ith sub-block;
generate, based on the first P matrix and the first b vector, the RM sequence corresponding to the ith sub-block; and
output the RM sequence corresponding to the ith sub-block.
14. The first communication apparatus according to claim 13 , wherein the determining the first P matrix and the first b vector based on M and the information bit information of the ith sub-block comprises:
obtaining P-matrix set and a b-vector set based on M; and
determining the first P matrix from the P-matrix set based on the information bit information of the ith sub-block; and
determining the first b vector from the b-vector set.
15. The first communication apparatus according to claim 14 , wherein the obtaining the P-matrix set and the b-vector set based on M comprises:
selecting at least two P-matrix subsets and at least two b-vector subsets based on M, wherein the P-matrix set comprises the at least two P-matrix subsets, and the b-vector set comprises the at least two b-vector subsets.
16. The first communication apparatus according to claim 14 , wherein the determining the first P matrix from the P-matrix set based on the information bit information of the ith sub-block, and determining the first b vector from the b-vector set comprises:
obtaining, by the first communication apparatus, an index value of each P matrix in the P-matrix set and an index value of each b vector in the b-vector set;
selecting, by the first communication apparatus, a bit value x and a bit value y based on the information bits of the ith sub-block and the information bit length of the ith sub-block, wherein the bit value x and the bit value y cover the information bits of the ith sub-block; and
determining, by the first communication apparatus, the first P matrix based on the bit value x, and determining the first b vector based on the bit value y.
17. The first communication apparatus according to claim 14 , wherein the obtaining the P-matrix set and the b-vector set based on M comprises one of:
performing:
generating a size of the P-matrix set and a size of the b-vector set based on M and the information bit length of the ith sub-block; and
generating the P-matrix set and the b-vector set based on M, the size of the P-matrix set, the size of the b-vector set, and an information bit set, wherein the information bit set comprises information bits of at least one of the first sub-block to the ith sub-block; or
performing:
generating a size of the P-matrix set and a size of the b-vector set based on M and a length of encoded information bits of the ith sub-block, wherein the length of the encoded information bits of the ith sub-block is a sum of a length of check bits after the check bits are added to the ith sub-block and the information bit length of the ith sub-block; and
generating the P-matrix set and the b-vector set based on M, the size of the P-matrix set, the size of the b-vector set, and an information bit set.
18. The first communication apparatus according to claim 17 , wherein the information bit set comprises information bits of at least one of the first sub-block to the ith sub-block; or
the information bit set comprises at least one of the encoded information bits of the first sub-block to the encoded information bits of the ith sub-block, and the encoded information bits comprise check bits and information bits of the sub-block.
19. The first communication apparatus according to claim 17 , wherein one of:
the generating the size of the P-matrix set and the size of the b-vector set based on M and the information bit length of the ith sub-block comprises:
determining, based on the information bit length of the ith sub-block being greater than or equal to M, the size of the P-matrix set based on the information bit length of the ith sub-block and M, and the size of the b-vector set is determined by M; or
determining, based on the information bit length of the ith sub-block being less than M, the size of the P-matrix set is 1, and the size of the b-vector set is determined by the information bit length of the ith sub-block; or
the generating the size of the P-matrix set and the size of the b-vector set based on M and the length of encoded information bits of the ith sub-block comprises:
determining, based on the length of the encoded information bits of the ith sub-block being greater than or equal to M, the size of the P-matrix set based on the length of the encoded information bits of the ith sub-block and M, and the size of the b-vector set is determined by M; or
determining, based on the length of the encoded information bits of the ith sub-block being less than M, the size of the P-matrix set is 1, and the size of the b-vector set is determined by the length of the encoded information bits of the ith sub-block.
20. The first communication apparatus according to claim 17 , wherein the generating the P-matrix set and the b-vector set based on M, the size of the P-matrix set, the size of the b-vector set, and the information bit set comprises:
generating elements of all P matrices in the P-matrix set based on M, the size of the P-matrix set, and the information bit set;
generating elements of all b vectors in the b-vector set based on M, the size of the b-vector set, and the information bit set; and
generating the P-matrix set according to a preset filling rule and elements of all P matrices in the P-matrix set; and
generating the b-vector set based on a length of the b vector and the elements of all b vectors in the b-vector set.