A communication method, performed by a user equipment, wherein the method is applied to a random access process and comprises: receiving indication information of at least one of a plurality of carriers carried in broadcast signaling sent by a network device, wherein the indication information comprises access probability information of each of the plurality of carriers, a quantity of the plurality of carriers is n, an access probability of an i th carrier in the n carriers is P(i), 1≤i≤n, 0≤a≤1, and a sum of access probabilities of the plurality of carriers is 1; and determining, based on the indication information, one carrier from the plurality of carriers as a target carrier to perform random access, wherein the determining, based on the indication information, one carrier from the plurality of carriers as a target carrier to perform random access includes: generating a random number a, by the user equipment, where a is a non-negative rational number; and determining, based on a correspondence between the random number a and a probability interval constituted of access probabilities of the plurality of carriers, the target carrier to perform random access, wherein the determining, based on a correspondence between the random number a and a probability interval constituted of access probabilities of the plurality of carriers, the target carrier to perform random access comprises: when 0≤a<P, selecting a first carrier in the n carriers as the target carrier to perform random access; when a=P, selecting a first carrier or a second carrier in the n carriers as the target carrier to perform random access; when P +...+P(j)<a<P +...+P(j+1), selecting a (j+1) th carrier in the n carriers as the target carrier to perform random access; or when P +...+P(j)=a, selecting a j th or a (j+1) th carrier in the n carriers as the target carrier to perform random access, wherein 1<j≤n, and n is a positive integer. receiving indication information of at least one of a plurality of carriers carried in broadcast signaling sent by a network device, wherein the indication information comprises access probability information of each of the plurality of carriers, a quantity of the plurality of carriers is n, an access probability of an i th carrier in the n carriers is P(i), 1≤i≤n, 0≤a≤1, and a sum of access probabilities of the plurality of carriers is 1; and determining, based on the indication information, one carrier from the plurality of carriers as a target carrier to perform random access, wherein the determining, based on the indication information, one carrier from the plurality of carriers as a target carrier to perform random access includes: generating a random number a, by the user equipment, where a is a non-negative rational number; and determining, based on a correspondence between the random number a and a probability interval constituted of access probabilities of the plurality of carriers, the target carrier to perform random access, wherein the determining, based on a correspondence between the random number a and a probability interval constituted of access probabilities of the plurality of carriers, the target carrier to perform random access comprises: when 0≤a<P, selecting a first carrier in the n carriers as the target carrier to perform random access; when a=P, selecting a first carrier or a second carrier in the n carriers as the target carrier to perform random access; when P +...+P(j)<a<P +...+P(j+1), selecting a (j+1) th carrier in the n carriers as the target carrier to perform random access; or when P +...+P(j)=a, selecting a j th or a (j+1) th carrier in the n carriers as the target carrier to perform random access, wherein 1<j≤n, and n is a positive integer. when 0≤a<P, selecting a first carrier in the n carriers as the target carrier to perform random access; when a=P, selecting a first carrier or a second carrier in the n carriers as the target carrier to perform random access; when P +...+P(j)<a<P +...+P(j+1), selecting a (j+1) th carrier in the n carriers as the target carrier to perform random access; or when P +...+P(j)=a, selecting a j th or a (j+1) th carrier in the n carriers as the target carrier to perform random access, wherein 1<j≤n, and n is a positive integer.