It should be understood that the first target cell may be a neighboring cell of the serving cell. In this embodiment of this application, one network device may serve a plurality of cells. The handover in this embodiment of this application may be a handover in the serving cell, may be a handover between a plurality of cells served by one network device, or may be a cell handover between different network devices. This embodiment of this application is not limited thereto.
For example, the serving cell and the first target cell may be a same cell. In this case, the handover is an intra-cell handover. For example, to change a key, the terminal device may perform an intra-cell handover. In an intra-cell handover scenario, the first network device to which the serving cell belongs and a second network device to which the first target cell belongs are a same network device. Optionally, the serving cell and the first target cell may be different cells. In an implementation, the serving cell and the first target cell may be different cells served by a same network device. Alternatively, in another implementation, the serving cell and the first target cell may be different cells served by different network devices. This embodiment of this application is not limited thereto.