In the examples, s_id is an identity of a first Orthogonal Frequency Division Multiplexing (OFDM) symbol of a PRACH (0≤s_id≤14); t_id is an identity of a first slot (that is, a slot) of the PRACH in a first system frame (0≤t_id<80); f_id is a frequency domain (for example, in one BWP) identity of the PRACH (0≤f_id<8); bwp_id is a BWP identity of the PRACH (0≤bwp_id<maxBWP); maxBWP is a maximum quantity of BWPs; ul_carrier_id is an uplink carrier identity of the PRACH (for example, “0” is a Normal Uplink (NUL) carrier, and “1” is a Supplement Uplink (SUL) carrier); and carrier_id is a cell identity or a carrier identity of the PRACH (0≤carrier<maxCarrier), where maxCarrier is a maximum quantity of cells or carriers.
Optionally, before step 203, the following steps are further included in this embodiment of the present disclosure.
Step 203a: The network device monitors a part or an entirety of second frequency resources in the N second frequency resources.
Step 203b: If the network device detects that X second frequency resources in the some or all second frequency resources are free, the network device uses at least one of the X second frequency resources as the target second frequency resource.
X is less than or equal to N, and X is a positive integer greater than or equal to 1.
Further optionally, in this embodiment of the present disclosure, the foregoing step 203a specifically includes the following content: