A rate matching method, comprising: obtaining to-be-encoded information bits; wherein a code rate R = K/M, K is a quantity of information bits, M is a target code length, and K and M are positive integers; polar encoding the to-be-encoded information bits, to obtain encoded bits; determining a rate matching manner based on M, R, and a target code length threshold; and rate matching based on the determined rate matching manner, the encoded bits to obtain bits after rate matching; wherein the method is characterized in that: when M is less than the target code length threshold and R is less than or equal to a first code rate threshold, the rate matching manner is determined to be a puncturing manner, and when the quantity of punctures P ≤ N/4, wherein N is a mother code length of the to-be-encoded information, the preset puncturing locations are first P bits from the start, or when P > N/4, the preset puncturing locations are bits 1 to N/4 and bits with index j, wherein j is determined according to the following formulas: j = N / 4 + 1,..., N / 4 + ⌈ P − N / 4 / 2 ⌉; and j = N / 2 + 1,..., N / 2 + ⌊ P − N / 4 / 2 ⌋; wherein a symbol ┌ ┐ indicates rounding up to the nearest integer, and a symbol └ ┘ indicates rounding down to the nearest integer; and when M is less than the target code length threshold and R is larger than a second code rate threshold, the rate matching manner is determined to be a shortening manner, and when the quantity of punctures P ≤ N/4, wherein N is a mother code length of the to-be-encoded information, the preset shortening locations are first P bits from the end, or when P > N/4, the preset shortening locations are bits (3N/4 + 1) to N and bits with index i, wherein i is determined according to the following formulas: i = 3 N / 4 − ⌈ P − N / 4 / 2 ⌉ + 1,..., 3N / 4; and i = N / 2 − ⌊ P − N / 4 / 2 ⌋ + 1,..., N / 2. obtaining to-be-encoded information bits; wherein a code rate R = K/M, K is a quantity of information bits, M is a target code length, and K and M are positive integers; polar encoding the to-be-encoded information bits, to obtain encoded bits; determining a rate matching manner based on M, R, and a target code length threshold; and rate matching based on the determined rate matching manner, the encoded bits to obtain bits after rate matching; wherein the method is characterized in that: when M is less than the target code length threshold and R is less than or equal to a first code rate threshold, the rate matching manner is determined to be a puncturing manner, and when the quantity of punctures P ≤ N/4, wherein N is a mother code length of the to-be-encoded information, the preset puncturing locations are first P bits from the start, or when P > N/4, the preset puncturing locations are bits 1 to N/4 and bits with index j, wherein j is determined according to the following formulas: j = N / 4 + 1,..., N / 4 + ⌈ P − N / 4 / 2 ⌉; and j = N / 2 + 1,..., N / 2 + ⌊ P − N / 4 / 2 ⌋; wherein a symbol ┌ ┐ indicates rounding up to the nearest integer, and a symbol └ ┘ indicates rounding down to the nearest integer; and when M is less than the target code length threshold and R is larger than a second code rate threshold, the rate matching manner is determined to be a shortening manner, and when the quantity of punctures P ≤ N/4, wherein N is a mother code length of the to-be-encoded information, the preset shortening locations are first P bits from the end, or when P > N/4, the preset shortening locations are bits (3N/4 + 1) to N and bits with index i, wherein i is determined according to the following formulas: i = 3 N / 4 − ⌈ P − N / 4 / 2 ⌉ + 1,..., 3N / 4; and i = N / 2 − ⌊ P − N / 4 / 2 ⌋ + 1,..., N / 2. when M is less than the target code length threshold and R is less than or equal to a first code rate threshold, the rate matching manner is determined to be a puncturing manner, and when the quantity of punctures P ≤ N/4, wherein N is a mother code length of the to-be-encoded information, the preset puncturing locations are first P bits from the start, or when P > N/4, the preset puncturing locations are bits 1 to N/4 and bits with index j, wherein j is determined according to the following formulas: j = N / 4 + 1,..., N / 4 + ⌈ P − N / 4 / 2 ⌉; and j = N / 2 + 1,..., N / 2 + ⌊ P − N / 4 / 2 ⌋; wherein a symbol ┌ ┐ indicates rounding up to the nearest integer, and a symbol └ ┘ indicates rounding down to the nearest integer; and when M is less than the target code length threshold and R is larger than a second code rate threshold, the rate matching manner is determined to be a shortening manner, and when the quantity of punctures P ≤ N/4, wherein N is a mother code length of the to-be-encoded information, the preset shortening locations are first P bits from the end, or when P > N/4, the preset shortening locations are bits (3N/4 + 1) to N and bits with index i, wherein i is determined according to the following formulas: i = 3 N / 4 − ⌈ P − N / 4 / 2 ⌉ + 1,..., 3N / 4; and