1. A grant-free transmission method, comprising:obtaining, by a terminal device, an interleaving pattern based on at least one of a cell identity of the terminal device, a terminal device identifier, time-domain resource information, or frequency-domain resource information by using a formula;

interleaving data based on the obtained interleaving pattern, to obtain interleaved data; and

sending the interleaved data,

wherein the obtaining, by the terminal device, the interleaving pattern based on at least one of the cell identity of the terminal device, the terminal device identifier, the time-domain resource information, and the frequency-domain resource information by using the formula comprising:

obtaining the interleaving pattern based on the terminal device identifier n by using the following formulas:

?i(j)=mod(?(j)+a,K),0=1, . . . ,K?1, and

a=mod(n,K), wherein

?(j) is an initial ranking number of a column j of a base interleaving matrix corresponding to the interleaving pattern; ?i(j) is a ranking number of the column j after the column j is interleaved; a represents a quantity of times that cyclic shift is performed on initial ranking corresponding to ?(j); n is the terminal device identifier; the base interleaving matrix comprises K columns, wherein K is a positive integer; and mod represents modulo processing,

obtaining the interleaving pattern based on the terminal device identifier n by using the following formulas:

?i(x)=mod(a+f1x+f2x2,K),x=0, . . . ,K?1, and

a=mod(n,K), wherein

K is a size of a to-be-transmitted bit block, wherein K is a positive integer; values of f1 and f2 are related to K; a represents a quantity of times that cyclic shift is performed on an input bit; x represents a sequence number of the input bit; and ?i(X) represents a sequence number for outputting an interleaved input bit,

obtaining the interleaving pattern based on the cell identity N of the terminal device, the terminal device identifier n, and a frame number or timeslot number m by using the following formulas:

whereinfp(.) is generated by using a pseudo random sequence, and an initial value cinit is N; ?(i) is an initial ranking number of a column j of a base interleaving matrix corresponding to the interleaving pattern; ?i(j) is a ranking number of the column j after the column j is interleaved; a represents a quantity of times that cyclic shift is performed on initial ranking corresponding to ?(j); n is the terminal device identifier; the base interleaving matrix comprises K columns, wherein K is a positive integer; and mod represents modulo processing, and

obtaining the interleaving pattern based on the cell identity N of the terminal device, the terminal device identifier n, and a frame number or timeslot number m by using the following formulas:

whereinfp(.) is generated by using a pseudo random sequence, and an initial value cinit is N; K is a size of a to-be-transmitted bit block, wherein K is a positive integer; values of f1 and f2 are related to K; a represents a quantity of times that cyclic shift is performed on an input bit x represents a sequence number of the input bit and ?i(X) represents a sequence number for outputting an interleaved input bit.