It should be noted that, if the second target cell included in the handover message is one of the candidate target cells that perform handover preparation in step 830, before sending the handover message, the first network device may or may not need to perform handover preparation with a network device to which the second target cell belongs. If the second target cell included in the handover message is not one of the candidate target cells that perform handover preparation in step 830, before sending the handover message, the first network device needs to perform handover preparation with a third network device to which the second target cell belongs. For a specific handover preparation process, refer to the description in step 330. Details are not described herein again. It should be understood that the third network device and the second network device in this application may be a same network device, or may be different network devices. This embodiment of this application is not limited thereto.
860. After the terminal device receives the handover message, the terminal device stops the process of searching for the first target cell, and performs random access to the second target cell based on the second random access channel resource.
Specifically, the terminal device selects, from the second beams, a third beam whose signal quality is higher than the beam threshold and on which the second dedicated random access resource is configured, to perform a contention-free random access process, where the third beam is one of the second beams, and the third beam belongs to the second target cell.