The seventh predetermined rule includes at least one of the following: fourth frequency resources satisfying a first condition are monitored, and a quantity of monitored fourth frequency resources is less than or equal to an eighth threshold; and the eighth predetermined rule includes at least one of the following: fourth frequency resources satisfying the first condition are selected, and a quantity of selected fourth frequency resources is less than or equal to a ninth threshold; where the first condition is that a frequency measurement value corresponding to the fourth frequency resource is greater than or equal to a second threshold, the eighth threshold is less than or equal to L, and the ninth threshold is less than or equal to J.
The network device provided by this embodiment of the present disclosure 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.
The network device provided by this embodiment of the present disclosure can implement the process of the foregoing method embodiment shown in