Optionally, in a process in which the processing unit determines the first target cell that satisfies the trigger condition, the transceiver unit is further configured to: receive a handover message sent by the first network device, where the handover message includes an identifier of a second target cell and a dedicated random access resource required for accessing the second target cell, and the dedicated random access resource includes a preamble index and a time-frequency resource; and stop the determining process, and perform contention-free random access to the second target cell based on the dedicated random access resource.
The processing unit may be configured to continue to determine, based on the conditional handover configuration information when the contention-free random access to the second target cell fails, the first target cell that satisfies the trigger condition.
Optionally, after the terminal device completes the handover, the processing unit is further configured to: release the conditional handover configuration information.
In this embodiment of this application, the first network device sends the configuration information to the terminal device. For example, the first network device sends the configuration information to the terminal device when link communication quality is relatively good, so that a success rate of sending the configuration information can be ensured. Further, the terminal device determines the target cell based on the configuration information, and performs random access to the determined target cell, to complete a handover procedure, thereby improving a handover success rate.