For example, the second threshold may be configured independently based on a frequency corresponding to each second frequency resource. For example, a corresponding second threshold is configured independently for the frequency corresponding to each second frequency resource, or one second threshold may be configured for the N second frequency resources. This is not limited in the present disclosure.
For example, the sixth threshold is a maximum value of a quantity of frequency resources to be selected and monitored that is configured by the network device for the terminal, and may be a value that is less than or equal to N. The seventh threshold is a maximum value of a quantity of target second frequency resources to be selected that is configured by the network device for the terminal, and is less than or equal to X. For example, the network device may configure, for the terminal by sending configuration information to the terminal, the second threshold, the sixth threshold, and the seventh threshold corresponding to the N second frequency resources. The configuration information may be sent to the terminal by using one of the following messages: a PDCCH and RRC signaling.
In the random access method provided by this embodiment of the present disclosure, the network device allocates one or more frequency resources for various messages (such as the random access request and the random access response) in the random access process, so that the frequency resources used for the messages in the random access process do not overlap and that a delay and a failure rate of the random access process are reduced.