Wireless communication methods, terminal devices and network devices

WO2026199404A1PCT designated stage Publication Date: 2026-10-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/085538
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2026-10-01

Smart Images

  • Figure CN2025085538_01102026_PF_FP_ABST
    Figure CN2025085538_01102026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are wireless communication methods, terminal devices and network devices. A method comprises: a terminal device receiving a first medium access control control element (MAC CE) sent by a network device, the first MAC CE being used for carrying a first parameter, and the first parameter being used for one or more of the following: generating a key for communication with a target cell after a Layer 1 / Layer 2 triggered mobility (LTM) handover; and generating a key for communication with the target cell after recovery from an LTM handover failure. Compared with conventional LTM processes, the present application enables the terminal device to, after a successful LTM handover and / or recovery from an LTM handover failure, generate a key for communication with the target cell on the basis of the first parameter carried in the first MAC CE, thereby helping to improve the security of information transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Wireless communication methods, terminal equipment and network equipment Technical Field

[0001] This application relates to the field of communication technology, and more specifically, to wireless communication methods, terminal devices, and network devices. Background Technology

[0002] In some scenarios, after L1 / L2 triggered mobility (LTM) handover is completed, the terminal device needs to perform a key update. However, how to provide the terminal device with the first parameter for generating the key during the LTM process is an urgent problem to be solved. Summary of the Invention

[0003] This application provides a wireless communication method, terminal device, and network device. The various aspects covered by this application are described below.

[0004] In a first aspect, a wireless communication method is provided, comprising: a terminal device receiving a first Media Access Control (MAC) CE sent by a network device, the first MAC CE being used to carry a first parameter, the first parameter being used for one or more of the following: generating a key for communicating with a target cell after a Layer 1 / Layer 2-triggered Mobility LTM handover; generating a key for communicating with the target cell after an LTM handover failure recovery.

[0005] In a second aspect, a wireless communication method is provided, comprising: a network device sending a first Media Access Control (MAC) CE to a terminal device, the first MAC CE being used to carry a first parameter, the first parameter being used for one or more of the following: generating a key for communicating with a target cell after a Layer 1 / Layer 2-triggered Mobility LTM handover; generating a key for communicating with a target cell after an LTM handover failure recovery.

[0006] Thirdly, a terminal device is provided, comprising: a receiving unit, configured to receive a first Media Access Control (MAC) CE sent by a network device, the first MAC CE being configured to carry a first parameter, the first parameter being configured to: generate a key for communication with a target cell after a Layer 1 / Layer 2 triggered mobility LTM handover; generate a key for communication with a target cell after an LTM handover failure recovery.

[0007] Fourthly, a network device is provided, comprising: a transmitting unit, configured to transmit a first Media Access Control (MAC) CE to a terminal device, the first MAC CE being configured to carry a first parameter, the first parameter being configured to: generate a key for communication with a target cell after a Layer 1 / Layer 2 triggered mobility LTM handover; generate a key for communication with a target cell after an LTM handover failure recovery.

[0008] Fifthly, a terminal device is provided, including a processor, a memory, and a communication interface, wherein the memory is used to store one or more computer programs, and the processor is used to invoke the computer programs in the memory, causing the terminal device to perform some or all of the steps in the method of the first aspect.

[0009] In a sixth aspect, a network device is provided, including a processor, a memory, and a transceiver, wherein the memory is used to store one or more computer programs, and the processor is used to invoke the computer programs in the memory to cause the network device to perform some or all of the steps in the method of the second aspect.

[0010] Seventhly, embodiments of this application provide a communication system including the aforementioned terminal device and / or network device. In another possible design, the system may further include other devices that interact with the terminal device or network device as described in the embodiments of this application.

[0011] Eighthly, embodiments of this application provide a computer-readable storage medium storing a computer program that causes a communication device (e.g., a terminal device or a network device) to perform some or all of the steps in the methods described above.

[0012] Ninthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a communication device (e.g., a terminal device or a network device) to perform some or all of the steps of the methods described in the foregoing aspects. In some implementations, the computer program product may be a software installation package.

[0013] In a tenth aspect, embodiments of this application provide a chip including a memory and a processor, the processor being able to call and run a computer program from the memory to implement some or all of the steps described in the methods of the foregoing aspects.

[0014] In this application, the network device sends a first medium access control element (MAC CE) to the terminal device to carry a first parameter. This first parameter can be used to generate a key for communication with the target cell after LTM handover and / or to generate a key for communication with the target cell after LTM handover recovery failure. Compared to the traditional LTM process, the terminal device can generate a key for communication with the target cell based on the first parameter carried by the first MAC CE after successful LTM handover and / or after LTM handover failure recovery, which helps improve the security of information transmission. Attached Figure Description

[0015] Figure 1 shows a wireless communication system 100 used in an embodiment of this application.

[0016] Figure 2 is an example diagram of the key derivation method according to an embodiment of this application.

[0017] Figure 3 is a schematic flowchart of the LTM process.

[0018] Figure 4 is a schematic flowchart of a wireless communication method according to an embodiment of this application.

[0019] Figure 5 is an example diagram of the first MAC CE carrying the first parameter.

[0020] Figure 6 is an example diagram of the first MAC CE carrying the first parameter and the first indication information.

[0021] Figure 7 is an example diagram of the first MAC CE carrying the first parameter, the second indication information and the third indication information.

[0022] Figure 8 is an example diagram of another first MAC CE carrying first parameters, second indication information and third indication information.

[0023] Figure 9 is a schematic diagram of a terminal device according to an embodiment of this application.

[0024] Figure 10 is a schematic diagram of a network device according to an embodiment of this application.

[0025] Figure 11 is a schematic structural diagram of a communication device according to an embodiment of this application. Detailed Implementation

[0026] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0027] Figure 1 illustrates a wireless communication system 100 according to an embodiment of this application. The wireless communication system 100 may include a network device 110 and a terminal device 120. The network device 110 may be a device that communicates with the terminal device 120. The network device 110 may provide communication coverage for a specific geographical area and may communicate with the terminal device 120 located within that coverage area.

[0028] Figure 1 illustrates an exemplary network device and two terminals. Optionally, the wireless communication system 100 may include multiple network devices, and each network device may include other terminal devices within its coverage area. This application embodiment does not limit this.

[0029] Optionally, the wireless communication system 100 may also include other network entities such as a network controller and a mobility management entity, which is not limited in this embodiment.

[0030] It should be understood that the technical solutions of the embodiments of this application can be applied to various communication systems, such as: 5th generation (5G) systems or new radio (NR), long term evolution (LTE) systems, LTE frequency division duplex (FDD) systems, LTE time division duplex (TDD) systems, etc. The technical solutions provided in this application can also be applied to future communication systems, such as 6th generation mobile communication systems, satellite communication systems, and so on.

[0031] The terminal device in this application embodiment can also be referred to as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station (MS), mobile terminal (MT), remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device. The terminal device in this application embodiment can be a device that provides voice and / or data connectivity to a user, and can be used to connect people, objects, and machines, such as a handheld device with wireless connectivity, vehicle-mounted device, etc. The terminal devices in the embodiments of this application can be mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, self-driving, remote medical surgery, smart grids, transportation safety, smart cities, and smart homes, etc. Optionally, the UE can act as a base station. For example, the UE can act as a scheduling entity, providing sidelink signals between UEs in V2X or D2D, etc. For example, cellular phones and cars communicate with each other using sidelink signals. Cellular phones and smart home devices communicate without relaying communication signals through a base station.

[0032] The network device in this application embodiment can be a device for communicating with a terminal device. This network device can also be called an access network device or a wireless access network device, such as a base station. In this application embodiment, the network device can refer to a radio access network (RAN) node (or device) that connects the terminal device to the wireless network. A base station can broadly encompass, or be replaced by, various names including: NodeB, evolved NodeB (eNB), next-generation NodeB (gNB), relay station, access point, transmitting and receiving point (TRP), transmitting point (TP), master MeNB, secondary SeNB, multi-mode radio (MSR) node, home base station, network controller, access node, wireless node, access point (AP), transmission node, transceiver node, baseband unit (BBU), remote radio unit (RRU), active antenna unit (AAU), remote radio head (RRH), central unit (CU), distributed unit (DU), positioning node, etc. A base station can be a macro base station, micro base station, relay node, donor node, or similar, or a combination thereof. A base station can also refer to a communication module, modem, or chip installed within the aforementioned equipment or apparatus. Base stations can also be mobile switching centers, devices that perform base station functions in device-to-device (D2D), vehicle-to-everything (V2X), and machine-to-machine (M2M) communications, network-side devices in 6G networks, and devices that perform base station functions in future communication systems. Base stations can support networks using the same or different access technologies. The embodiments of this application do not limit the specific technologies or device forms used in the network equipment.

[0033] Base stations can be fixed or mobile. For example, a helicopter or drone can be configured to act as a mobile base station, and one or more cells can move depending on the location of the mobile base station. In other examples, a helicopter or drone can be configured as a device to communicate with another base station.

[0034] In some deployments, the network device in this application embodiment may refer to a CU or a DU, or the network device may include both a CU and a DU. The gNB may also include an AAU.

[0035] Network devices and terminal devices can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; they can also be deployed on water; and they can also be deployed in the air on airplanes, balloons, and satellites. This application does not limit the scenario in which the network devices and terminal devices are located.

[0036] It should be understood that all or part of the functions of the communication device in this application can also be implemented by software functions running on hardware, or by virtualization functions instantiated on a platform (e.g., a cloud platform).

[0037] Key update mechanism

[0038] Referring to Figure 2, the security key update mechanism includes two types: horizontal derivation and vertical derivation. The horizontal derivation method is based on K... gNB / K eNB The target cell's physical cell identifier (PCI) and downlink (DL) frequency generation K eNB* / K NG-RAN* The vertical derivation method, on the other hand, generates the next hop (NH) parameter based on the next hop chaining count (NCC), and then generates K based on the NH, the target cell PCI, and the downlink frequency. eNB* / K NG-RAN* Among them, K gNB / K eNB K is the key used by the source base station. eNB* / K NG-RAN* The key used by the target base station.

[0039] From the perspective of the terminal device, the terminal device determines which key derivation method to execute based on the NCC indicated by the network device. In some scenarios, the NCC indicated by the network device and the K on the current terminal device side... gNB If the associated NCC is the same, the terminal device selects the horizontal derivation method to generate the key. In other scenarios, the NCC indicated by the network device is the same as the K on the current terminal device side. gNB If the associated NCC is different, the terminal device will choose the vertical derivation method to generate the key.

[0040] LTM

[0041] To reduce latency and signaling overhead during the handover process and ensure service continuity, LTM (Local Time Management) has been introduced in some protocols (e.g., 3GPP R18). For ease of understanding, the LTM process will be explained below with reference to Figure 2.

[0042] As shown in Figure 3, the LTM process can include the LTM preparation phase, the LTM execution phase, and the LTM completion phase.

[0043] During the LTM preparation phase, LTM may include steps S310 to S330.

[0044] In step S310, the terminal device reports the measurement results to the network device. These measurement results can be Layer 3 measurements. The network device can then determine whether to initiate an LTM procedure and trigger candidate cell preparation based on the measurement results reported by the terminal device.

[0045] In step S320, the network device sends a radio resource control (RRC) message containing the LTM configuration (or LTM candidate configuration) to the terminal device. For example, the network device may send a radio resource control reconfiguration message (RRCReconfiguration message) to the terminal device to indicate the LTM configuration.

[0046] In some embodiments, the LTM configuration sent by the network device to the terminal device may include the LTM configuration corresponding to one or more candidate cells.

[0047] In some embodiments, the terminal device may also store the LTM configuration indicated by the network device.

[0048] In step S330, the terminal device sends a reconfiguration complete message (RRCReconfigurationComplete message) to the network device.

[0049] In some embodiments, referring to steps S340a and S340b, after the terminal device completes the LTM preparation phase, it can perform uplink / downlink synchronization with the candidate cell in advance to shorten the interruption latency during the handover process. This process can be understood as the early synchronization phase.

[0050] During the LTM execution phase, LTM may include steps S350 and S360.

[0051] In step S350, the terminal device performs Layer 1 measurement on each candidate cell and reports the Layer 1 measurement results to the network device.

[0052] In some implementations, after receiving the Layer 1 measurement results reported by the terminal device, the network device can determine the target cell based on the Layer 1 measurement results.

[0053] In step S360, the network device sends a cell handover command to the terminal device, instructing the terminal device to hand over to the target cell. For example, the network device can instruct the terminal device to hand over to the target cell via MAC CE.

[0054] In some implementations, after receiving a cell handover command, the terminal device can detach from the source cell and apply the target configuration (i.e., apply the configuration of the target cell).

[0055] In step S370, the terminal device determines whether to perform random access channel-less (RACH-less) LTM or random access channel-based (RACH-based) LTM based on whether there is a valid timing advance (TA) for the target cell.

[0056] In some embodiments, if the terminal device currently has a valid TA for the target cell, the terminal device performs RACH-less LTM.

[0057] In some embodiments, if the terminal device does not currently have a valid TA or transmission configuration indicator (TCI) status identifier for the target cell, the terminal device performs RACH-based LTM, that is, the terminal device initiates a random access procedure to the target cell during the LTM execution phase.

[0058] During the LTM completion phase, LTM may include step S380.

[0059] In step S380, the terminal device indicates that LTM is complete. For example, the terminal device may send an indication message that LTM has been successfully completed to the target cell.

[0060] In some implementations, the terminal device indicates that LTM has been successfully completed by sending an RRCReconfigurationComplete message to the target cell.

[0061] In some embodiments, if the terminal device performs RACH-based LTM in step S370, then when the random access procedure is successfully completed, the terminal device considers the LTM procedure to be successfully completed.

[0062] In some embodiments, if the terminal device performs RACH-based LTM in step S370, then when the terminal device confirms that the network device has successfully received the first uplink data, the terminal device considers the LTM process to be successfully completed.

[0063] It should be noted that after completing one LTM process, multiple subsequent LTM processes can be performed based on the candidate cell configuration received in step S320, that is, steps S340 to S380 above can be repeated.

[0064] In the LTM process described above, the network devices of multiple candidate cells and the source cell are managed by the same CU. That is, the candidate cells are intra-CU cells, and the LTM process described above is called the intra-CU LTM process. When the terminal device hands over between these cells, key updates are not required.

[0065] In some scenarios, after LTM handover is completed, the terminal device needs to perform a key update. However, how to provide the terminal device with the first parameter for generating the key during the LTM process is a problem that urgently needs to be solved.

[0066] For example, when the network equipment of the LTM candidate cell and the source cell belong to different CUs, due to the CU change, the terminal device needs to generate a key for communication with the target cell after the LTM handover. As mentioned above, traditional LTM is for scenarios where the network equipment of the candidate cell and the source cell belong to the same CU; the terminal device does not need to update the key after the LTM handover. Therefore, it is necessary to consider how to provide the terminal device with the first parameter for key generation during the LTM process.

[0067] To address the aforementioned issues, this application provides a wireless communication method. In this method, a network device sends a first MAC CE carrying a first parameter to a terminal device. The first parameter can be used to generate a key for communication with the target cell after LTM handover and / or to generate a key for communication with the target cell after LTM handover recovery failure. Compared to the traditional LTM process, the terminal device can generate a key for communication with the target cell based on the first parameter carried in the first MAC CE after successful LTM handover and / or after LTM handover failure recovery, which helps improve the security of information transmission.

[0068] For ease of understanding, the wireless communication method of this application embodiment is described below with reference to FIG4. The method shown in FIG4 includes step S410.

[0069] In step S410, the network device sends a first MAC CE to the terminal device, the first MAC CE being used to carry the first parameter.

[0070] In some implementations, the first MAC CE can be an existing MAC CE or a newly defined MAC CE.

[0071] In some implementations, the newly defined MAC CE uses a new logical channel identification (LCID) or a new extended logical channel identification (eLCID).

[0072] In some implementations, the first MAC CE is used to instruct the terminal device to perform LTM handover; that is, the first MAC CE is the existing LTM cell switch command MAC CE.

[0073] In some implementations, if the first MAC CE is an existing LTM cell handover command MAC CE, the first MAC CE is also used to carry one or more of the following: target configuration ID; timing advance command; TCI state ID; uplink (UL) TCI state ID; synchronization signal block / physical broadcast channel (SS / PBCH) index; contention-free random access (CFRA) resource configuration; reserved bits (R); and indication field (C).

[0074] In some implementations, CFRA resource configuration can be one or more of the following: random access preamble index; physical random access channel (PRACH) mask index; repetition number.

[0075] In some implementations, the repetition count can be the number of times message 1 (Msg1) is repeated.

[0076] In some implementations, the length of the first MAC CE is variable, meaning that the length of the first MAC CE can vary depending on the content it carries.

[0077] In some implementations, the first parameter is used to generate a key. This can be understood as the first parameter being used to generate a key for communication with the target cell, or in other words, the first parameter being used to generate a key required by the terminal device for information transmission in the target cell.

[0078] In some implementations, the first parameter is used to generate the key, or in other words, the first parameter is used to derive the key, or the first parameter is used to generate the key.

[0079] In some implementations, the first parameter is NCC as mentioned above.

[0080] In some implementations, the first parameter is used to generate the master key. For example, the first parameter is NCC, which is used to generate the master key.

[0081] In some implementations, the master key can be K as mentioned above. gNB or K eNB .

[0082] In some implementations, the first parameter is used to generate the key for communication with the target cell. This can be understood as the key for communication between the terminal device and the target cell being derived from the master key generated based on the first parameter.

[0083] In some implementations, the first parameter is used to generate the key for communication with the target cell. This can be understood as the key used by the terminal device to communicate with the target cell being derived from a secondary key. The secondary key is derived from the master key generated by the first parameter and the secondary node (SN) counter (or sk-counter). For example, if the first parameter is NCC, and the target cell configuration includes a secondary cell group (SCG), the terminal device generates the master key K based on the NCC. gNB Based on K gNB A secondary key is generated with the SN counter, and finally, the secondary key is used to derive the key for communicating with the target cell.

[0084] In some implementations, the secondary key can be one or more of the following: K SN SK gNB SK eNB .

[0085] In some implementations, the key used to communicate with the target cell can be a control plane key (RRC key, such as the integrity protection key K). RRCint and encryption / decryption key K RRCenc ) and / or keys used for the user plane (user plane (UP) key, such as integrity protection key K) UPint and encryption / decryption key K UPenc ).

[0086] In some implementations, the first parameter is used to generate a key. This can be understood as the first parameter being used for one or more of the following: generating a key for communication with the target cell after LTM handover; generating a key for communication with the target cell after LTM handover failure recovery.

[0087] In some implementations, the first parameter is used to generate the key for communication with the target cell after LTM handover. This can be understood as the first parameter being used to generate the key for communication between the terminal device and the target cell after LTM handover is completed.

[0088] In some implementations, the target cell selected during LTM handover is the candidate cell indicated by the LTM cell handover command, hereinafter referred to as the "first cell". Therefore, in some scenarios, the first parameter can also be said to be used to generate the key for communication with the first cell after LTM handover.

[0089] In some implementations, the first cell uses the Target config ID carried by the LTM cell handover command MAC CE.

[0090] In some implementations, the first parameter is used to generate the key for communication with the target cell after LTM handover failure recovery. This can be understood as follows: when the terminal device performs LTM handover and the LTM handover fails, the terminal device triggers the RRC reconstruction process. During the RRC reconstruction process, the terminal device performs cell reselection. The first parameter is used to generate the key for communication between the terminal device and the target cell after successful cell reselection.

[0091] In some implementations, if an LTM handover fails, the terminal device performs cell reselection during the recovery process. If the selected target cell is an LTM candidate cell, the terminal device executes the LTM procedure and applies the configuration of the selected LTM candidate cell. This failure recovery process is called "fast failure recovery." For example, if the network device is configured with attemptLTM-Switch, after an LTM handover failure, if the target cell selected by the terminal device is an LTM candidate cell indicated by the LTM candidate configuration in step S320 above, then the terminal device executes the LTM procedure on the selected candidate cell.

[0092] In this embodiment, the triggering condition for LTM handover failure of the terminal device is not limited. For example, if timer T304 times out, it is considered that LTM handover has failed.

[0093] In some implementations, if the terminal device performs the above-mentioned fast failure recovery after an LTM handover failure, the first parameter is used to generate the key for communication with the target cell after the fast failure recovery, and the target cell belongs to the LTM candidate cell.

[0094] In this embodiment, the number of bits occupied by the first parameter in the first MAC CE is not limited. For example, the first parameter may occupy 3 bits or 4 bits.

[0095] Similarly, in the embodiments of this application, the position of the first parameter in the first MAC CE is not limited. For example, the first MAC CE is an LTM cell handover command MAC CE, and the bit field carrying the first parameter is a reserved bit field of the LTM cell handover command MAC CE or a newly added bit field. As another example, the first MAC CE is a newly defined MAC CE, and a new bit field carrying the first parameter is defined in the first MAC CE.

[0096] In some implementations, a portion of the first parameter takes valid values, while the other portion takes invalid values. For example, referring to Figure 5, the first MAC CE is the LTM cell handover command MAC CE, and the first parameter is NCC, carried in the bit field NCC, occupying 4 bits. The value range of the bit field NCC is 0 to 15. When the value of the bit field NCC is between 0 and 7, it is a valid value; when the value of the bit field NCC is other than 7, it is an invalid value.

[0097] In some implementations, all values ​​of the first parameter are valid. For example, referring to Figure 6, the first MAC CE is the LTM cell handover command MAC CE, and the first parameter is NCC, which is carried in the bit field NCC, occupies 3 bits, and the value range of the bit field NCC is 0-7, all of which are valid values.

[0098] In some implementations, the value of the first parameter can be used to determine the key to be generated, or in other words, the value of the first parameter can be used to determine whether a key needs to be generated. That is to say, the terminal device can determine whether a key for communication with the target cell needs to be generated based on the value of the first parameter.

[0099] In some implementations, whether to generate a key is determined based on whether the value of the first parameter is valid. In this case, the bit field carrying the first parameter in the first MAC CE is a fixed field; that is, the first MAC CE always carries the first parameter, and whether to generate a key is determined based on whether the value of the bit field carrying the first parameter is valid.

[0100] In some implementations, if the first parameter is invalid, the terminal device will not generate a key. For example, referring to Figure 5, the first MAC CE is the LTM cell handover command MAC CE, and the first parameter is NCC, which is carried in the bit field NCC, occupying 4 bits. The value range of the bit field NCC is 0 to 15. If the value of the bit field NCC is an invalid value of 8, the terminal device will determine not to generate a key.

[0101] In some implementations, if the first parameter is a valid value, the terminal device generates a key. For example, referring to Figure 5, the first MAC CE is the LTM cell handover command MAC CE, and the first parameter is NCC, which is carried in the bit field NCC, occupying 4 bits. The value range of the bit field NCC is 0 to 15. If the value of the bit field NCC is a valid value of 0 to 7, the terminal device determines to generate a key.

[0102] In some implementations, if all values ​​of the first parameter are valid, the presence or absence of the first parameter determines whether a key should be generated. In this case, the bit field carrying the first parameter in the first MAC CE is optional; that is, the first MAC CE may or may not carry the first parameter, and the decision to generate a key is based on whether the first MAC CE carries the first parameter.

[0103] In some implementations, if all values ​​of the first parameter are valid and the first MAC CE carries the first parameter, then the terminal device determines not to generate a key.

[0104] In some implementations, if all values ​​of the first parameter are valid and the first MAC CE does not carry the first parameter, then the terminal device determines to generate the key.

[0105] In some implementations, the first MAC CE is also used to carry first indication information. This first indication information indicates whether the first MAC CE carries a first parameter. That is, based on the first indication information carried by the first MAC CE, the terminal device can determine whether the first MAC CE carries a first parameter, and thus determine whether to generate a key. Carrying the first indication information on the first MAC CE helps improve the flexibility of transmitting the first parameter.

[0106] In some implementations, the first instruction information is carried in the first instruction field of the first MAC CE.

[0107] In the embodiments of this application, the number of bits occupied by the first indicator field is not limited. For example, the first indicator field may occupy 1 bit.

[0108] Similarly, in the embodiments of this application, the position of the first indicator field in the first MAC CE is not limited. For example, the first MAC CE may be an existing MAC CE, and the first indicator field may be a reserved bit field in the first MAC CE or a newly added bit field. As another example, the first MAC CE may be a newly defined MAC CE, and a new first indicator field may be defined in the first MAC CE.

[0109] In some implementations, the first MAC CE is the LTM cell handover command MAC CE, and the first indication field is a reserved bit field of the LTM cell handover command MAC CE. For example, referring to Figure 6, the first MAC CE is the LTM cell handover command MAC CE, and the first indication field is bit field C1, occupying 1 bit. If the value of bit field C1 is 1, it indicates that the first MAC CE carries the first parameter; if the value of bit field C1 is 0, it indicates that the first MAC CE does not carry the first parameter. For another example, if the value of bit field C1 is 0, it indicates that the first MAC CE carries the first parameter; if the value of bit field C1 is 1, it indicates that the first MAC CE does not carry the first parameter.

[0110] In some implementations, the first MAC CE carries first indication information but no first parameter. The first indication information indicates that the first MAC CE does not carry the first parameter. Therefore, the terminal device can determine that the first MAC CE does not carry the first parameter based on the first indication information, and thus determine that no key will be generated. For example, referring to Figure 6, the first MAC CE is an LTM cell handover command MAC CE. The first indication field is bit field C1, occupying 1 bit, and the first parameter is NCC. The value of bit field C1 is 0, indicating that the first MAC CE does not carry NCC. Therefore, the terminal device can determine that the first MAC CE does not carry NCC based on the value of bit field C1, and thus determine that no key will be generated.

[0111] In some implementations, the first MAC CE carries a first parameter and first indication information. The first indication information indicates that the first MAC CE carries the first parameter, and all values ​​in the bit field occupied by the first parameter are valid. The terminal device determines that the first MAC CE carries the first parameter based on the first indication information, and then determines the generation key. For example, referring to Figure 6, the first MAC CE is an LTM cell handover command MAC CE. The first indication field is bit field C1, occupying 1 bit. The first parameter is NCC, carried in the bit field NCC, occupying 3 bits. The value range of bit field NCC is 0 to 7, all of which are valid values. If the value of bit field C1 is 0, it indicates that the first MAC CE carries the first parameter. The terminal device determines that the first MAC CE carries NCC based on the value of bit field C1, and then determines the generation key.

[0112] In some implementations, the first MAC CE carries a first parameter and first indication information. The first indication information indicates that the first MAC CE carries the first parameter. The value of the bit field occupied by the first parameter includes valid and invalid values. The terminal device determines that the first MAC CE carries the first parameter based on the first indication information, and then determines whether to generate a key based on the value of the first parameter. For example, referring to Figure 6, the first MAC CE is an LTM cell handover command MAC CE. The first indication field is bit field C1, occupying 1 bit. The first parameter is NCC, carried in bit field NCC, occupying 4 bits. The value range of bit field NCC is 0 to 15. When the value of bit field NCC is between 0 and 7, it is a valid value; when the value of bit field NCC is other values, it is an invalid value. When the value of bit field C1 is 0, it indicates that the first MAC CE carries the first parameter. The terminal device determines that the first MAC CE carries NCC based on the value of bit field C1, and then determines whether to generate a key based on the value of bit field NCC.

[0113] In some implementations, the first MAC CE carries a first parameter but not a first indication information. All values ​​in the bit field occupied by the first parameter are valid, thus the terminal device determines the generated key. For example, referring to Figure 5, the first MAC CE is an LTM cell handover command MAC CE. The first parameter is NCC, carried in the bit field NCC, occupying 4 bits. The value range of the NCC bit field is 0-15, all of which are valid. Since the first MAC CE carries the NCC bit field but not the first indication information, and all values ​​in the NCC bit field are valid, the terminal device can determine the generated key.

[0114] In some implementations, the first MAC CE carries a first parameter but not a first indication information. The value of the bit field occupied by the first parameter includes both valid and invalid values. The terminal device determines whether to generate a key based on the value of the first parameter. For example, referring to Figure 5, the first MAC CE is an LTM cell handover command MAC CE. The first parameter is NCC, carried in the bit field NCC, occupying 4 bits. When the value of the bit field NCC is between 0 and 7, it is a valid value; when the value of the bit field NCC is other than 7, it is an invalid value. The first MAC CE carries the bit field NCC but does not carry the first indication information. The terminal device can determine whether to generate a key based on the value of the bit field NCC.

[0115] In some implementations, if the first parameter is used to generate the key for communication with the target cell after LTM handover failure recovery, the first parameter is associated with the first candidate cell, and the target cell belongs to the first candidate cell.

[0116] In some implementations, the first parameter is associated with the first candidate cell, which can be understood as the first parameter being used to generate the key used to transmit information in the first candidate cell.

[0117] In some implementations, the first parameter is associated with one or more first candidate cells.

[0118] In some implementations, the target cell is a first candidate cell, which can be understood as the target cell being one of one or more first candidate cells associated with the first parameter.

[0119] In some implementations, since the target cell is selected after LTM handover failure recovery and the target cell is the first candidate cell, it can be understood that the first candidate cell is used for LTM handover failure recovery, or that LTM handover failure recovery is based on the first candidate cell, or that during the LTM handover failure recovery process, the terminal device selects the target cell from the first candidate cell.

[0120] In some implementations, if the first parameter is used to generate the key for communication with the target cell after LTM handover, the first parameter is associated with the second candidate cell, and the target cell belongs to the second candidate cell.

[0121] In some implementations, the first parameter is associated with the second candidate cell, which can be understood as the first parameter being used to generate the key used to transmit information in the second candidate cell.

[0122] In some implementations, the first parameter is associated with one or more second candidate cells.

[0123] In some implementations, the target cell is a second candidate cell, which can be understood as the target cell being one of one or more second candidate cells associated with the first parameter.

[0124] In some implementations, since the target cell is selected during the LTM handover process and is a second candidate cell, it can be understood that the second candidate cell is used for the LTM handover process, or that the LTM handover process is based on the second candidate cell, or that during the LTM handover process, the terminal device selects the target cell from the second candidate cell.

[0125] In some implementations, if the first parameter is used to generate the key for communicating with the target cell after LTM handover and the key for communicating with the target cell after LTM handover failure recovery, the first parameter is associated with the first candidate cell and the second candidate cell.

[0126] In some implementations, the first candidate cell is a predefined or LTM candidate cell indicated by an LTM candidate configuration. For example, the first candidate cell is an LTM candidate cell defined by the protocol for the terminal device. Another example is an LTM candidate cell indicated by an LTM candidate configuration sent by the network device via an RRC message.

[0127] In some implementations, the first candidate cell is predefined; in other words, the first candidate cell is the default.

[0128] In some implementations, the first candidate cell can be one or more of the following: the identifier associated with the first candidate cell is the same as the identifier associated with the source cell; the identifier associated with the first candidate cell is different from the identifier associated with the source cell; or the first candidate cell belongs to one or more candidate cells associated with the source cell.

[0129] In some implementations, the aforementioned identifier can be an identifier that indicates whether a key has been generated.

[0130] In some implementations, the identifier can be information indicating the CU to which the network device in the cell belongs. For example, the identifier can be the ID of the CU to which the network device in the cell belongs.

[0131] In some implementations, the ID of the CU to which the network device belongs in the cell can be indicated using ltm-NoSecurityChangeID.

[0132] In some implementations, if the identifier is the ID of the CU to which the network device of the cell belongs, then the identifier associated with the first candidate cell is the same as the identifier associated with the first cell. This can be understood as the ID of the CU associated with the first candidate cell being the same as the ID of the CU associated with the first cell; that is, the network device of the first candidate cell belongs to the same CU as the network device of the first cell. For example, if the first cell uses a Target config ID and the ID of the CU to which the cell's network device belongs is indicated by ltm-NoSecurityChangeID, then the first candidate cell is another candidate cell that has the same ltm-NoSecurityChangeID as the candidate cell indicated by the Target config ID.

[0133] In some implementations, if the identifier is the ID of the CU to which the network device of the cell belongs, and the identifier associated with the first candidate cell is different from the identifier associated with the source cell, it can be understood that the ID of the CU associated with the first candidate cell is different from the ID of the CU associated with the source cell. In other words, the network device of the first candidate cell belongs to a different CU than the network device of the source cell, or the first candidate cell is an inter-CU cell. For example, if the ID of the CU to which the network device of the cell belongs is indicated by ltm-NoSecurityChangeID, the first candidate cell is all other candidate cells that have different ltm-NoSecurityChangeIDs from the source cell.

[0134] In some implementations, the candidate cells associated with the source cell can be understood as candidate cells whose associated identifier is the same as one of the identifiers associated with the source cell. For example, the identifier is the ID of the CU to which the network device belongs, indicated by ltm-NoSecurityChangeID. The source cell is associated with one or more ltm-NoSecurityChangeIDs. The candidate cells whose associated ltm-NoSecurityChangeID is the same as one of the one or more ltm-NoSecurityChangeIDs associated with the source cell are the candidate cells associated with the source cell.

[0135] In some implementations, the first candidate cell belongs to one or more candidate cells associated with the source cell. This can be understood as the source cell being associated with one or more identifiers, and the first candidate cell being one or more candidate cells whose associated identifier is the same as one of the identifiers associated with the source cell. For example, the identifier is the ID of the CU to which the network device of the cell belongs, indicated by ltm-NoSecurityChangeID. The source cell is associated with at least one ltm-NoSecurityChangeID, and each ltm-NoSecurityChangeID is associated with one or more candidate cells. The first candidate cell is one or more of the one or more candidate cells associated with one or more ltm-NoSecurityChangeIDs. As another example, the source cell is associated with two ltm-NoSecurityChangeIDs, with values ​​of 1 and 2 respectively. The first candidate cell belongs to at least one candidate cell associated with ltm-NoSecurityChangeIDs whose values ​​are 1 and 2.

[0136] In some implementations, the first candidate cell is an LTM candidate cell predefined or indicated by an LTM candidate configuration, and the first candidate cell is one or more of the following: the identifier associated with the first candidate cell is the same as the identifier associated with the first cell; the identifier associated with the first candidate cell is different from the identifier associated with the source cell; the first candidate cell belongs to one or more candidate cells associated with the source cell. That is, the first candidate cell is an LTM candidate cell among the predefined or indicated by an LTM candidate configuration that satisfies one or more of the following: the identifier associated with the first candidate cell is the same as the identifier associated with the first cell; the identifier associated with the first candidate cell is different from the identifier associated with the source cell; the first candidate cell belongs to one or more candidate cells associated with the source cell.

[0137] In some implementations, the first MAC CE is also used to carry second indication information, which indicates one or more of the following: whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery; the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery, and the target cell belongs to the first candidate cell.

[0138] In some implementations, whether the first parameter is used to generate the key for communication with the target cell after LTM handover failure recovery can be understood as whether the first parameter can be used to generate the key for communication with the target cell selected from the first candidate cell after LTM handover failure recovery, or in other words, whether the first parameter is used for LTM handover failure recovery based on the first candidate cell.

[0139] In some implementations, the first parameter is used to generate the key for communication with the target cell after LTM handover failure recovery. The target cell belongs to the first candidate cell. It can be understood that the first parameter is used to generate the key for communication with the target cell selected from the first candidate cell after LTM handover failure recovery.

[0140] In some implementations, the second indication information indicates that the first parameter is not used to generate the key for communicating with the target cell after LTM handover failure recovery, and the first parameter is used to generate the key for communicating with the first cell.

[0141] In some implementations, the first parameter is used to generate a key for communicating with the first cell. This can be understood as meaning that the first parameter cannot be used to generate a key for communicating with other candidate cells besides the first cell, or in other words, the first parameter is only used to generate a key for communicating with the first cell.

[0142] In some implementations, the first parameter is not used to generate the key for communication with the target cell after LTM handover failure recovery, but is used to generate the key for communication with the first cell. This can be understood as the first parameter not being used to generate the key for communication with the target cell after LTM handover failure recovery, but being used to generate the key for communication with the target cell after LTM handover, with the target cell being the first cell. Alternatively, the first parameter is not used for LTM handover failure recovery based on the first candidate cell, but is used for LTM handover process based on the second candidate cell, with the second candidate cell being the first cell.

[0143] In this embodiment, the number of bits occupied by the second indication information in the first MAC CE is not limited. For example, the second indication information occupies 1 bit. Another example is that the second indication information occupies 2 bits. Yet another example is that the second indication information includes a bitmap, occupying 8 bits.

[0144] Similarly, in the embodiments of this application, the position of the second indication information in the first MAC CE is not limited. For example, the first MAC CE may be an existing MAC CE, and the second indication information may be carried by a reserved bit field in the first MAC CE or a newly added bit field. As another example, the first MAC CE may be a newly defined MAC CE, and a new bit field carrying the second indication information may be defined in the first MAC CE.

[0145] In some implementations, the second indication information indicates whether the first parameter is used to generate the key for communication with the target cell after LTM handover recovery. For example, referring to Figure 7, the first MAC CE is the LTM cell handover command MAC CE, the second indication information is carried in bit field F, occupying 1 bit, and the first parameter is NCC, carried in bit field NCC, occupying 3 bits. All values ​​of bit field NCC are valid. When bit field F is 1, the value of the indication bit field NCC can be used to generate the key for communication with the target cell after LTM handover recovery. When bit field F is 0, the value of the indication bit field NCC cannot be used to generate the key for communication with the target cell after LTM handover recovery. As another example, the first MAC CE is the LTM cell handover command MAC CE, the second indication information is carried in bit field F, occupying 2 bits, and the first parameter is NCC, carried in bit field NCC, occupying 3 bits. All values ​​of bit field NCC are valid. When bit field F is 01 or 10, it indicates that the value of bit field NCC can be used to generate a key for communication with the target cell after LTM handover recovery; when bit field F is 00 or 11, it indicates that the value of bit field NCC cannot be used to generate a key for communication with the target cell after LTM handover recovery.

[0146] In some implementations, the second indication information indicates the key used by the first parameter for communication with the target cell after fast failure recovery. The target cell belongs to the first candidate cell, which can be a predefined LTM candidate cell or an LTM candidate cell indicated by the LTM candidate configuration. For example, referring to Figure 7, the first MAC CE is the LTM cell handover command MAC CE, the second indication information is carried in the bit field F, occupying 1 bit, and the first parameter is NCC, carried in the bit field NCC, occupying 3 bits. The value of the bit field NCC is always a valid value. When the value of the bit field F is 1, the value of the indication bit field NCC can be used to generate the key for communication with the target cell selected from the LTM candidate cells indicated by the LTM candidate configuration after fast failure recovery.

[0147] In some implementations, the second indication information indicates that the first parameter is used to generate the key for communication with the target cell after LTM handover recovery. The target cell belongs to the first candidate cell, and the identifier associated with the first candidate cell is the same as the identifier associated with the first cell. For example, referring to Figure 7, the first MAC CE is the LTM cell handover command MAC CE, the second indication information is carried in the bit field F, occupying 1 bit, the first parameter is NCC, carried in the bit field NCC, occupying 3 bits, and the value of the bit field NCC is a valid value. The identifier is the ID of the CU to which the network device of the cell belongs, indicated by ltm-NoSecurityChangeID. The first cell is the candidate cell indicated by the Target config ID. When the bit field F is 1, the value of the indication bit field NCC can be used to generate the key for communication with the target cell after LTM handover recovery, and the first candidate cell is other candidate cells with the same ltm-NoSecurityChangeID as the candidate cell indicated by the Target config ID.

[0148] In some implementations, the second indication information indicates that the first parameter is used to generate the key for communication with the target cell after LTM handover recovery. The target cell belongs to the first candidate cell, and the identifier associated with the first candidate cell is different from the identifier associated with the source cell. For example, referring to Figure 7, the first MAC CE is the LTM cell handover command MAC CE, the second indication information is carried in the bit field F, occupying 1 bit, and the first parameter is NCC, carried in the bit field NCC, occupying 3 bits. The value of the bit field NCC is always a valid value, and the identifier is the ID of the CU to which the network device of the cell belongs, indicated by ltm-NoSecurityChangeID. When the value of the bit field F is 1, it indicates that the value of the bit field NCC can be used to generate the key for communication with the target cell after LTM handover recovery, and the first candidate cell is all other candidate cells that have different ltm-NoSecurityChangeIDs from the source cell.

[0149] In some implementations, the second indication information indicates that the first parameter is used to generate the key for communication with the target cell after LTM handover recovery. The target cell belongs to the first candidate cell, and the first candidate cell belongs to one or more candidate cells associated with the source cell. Referring to Figure 7, the first MAC CE is the LTM cell handover command MAC CE. The second indication information is carried in the bit field F, occupying 1 bit. The first parameter is NCC, carried in the bit field NCC, occupying 3 bits. The value of the bit field NCC is always a valid value, identified as the ID of the CU to which the network device of the cell belongs. It uses ltm-NoSecurityChangeID to indicate that the source cell is associated with two ltm-NoSecurityChangeIDs, with values ​​of 1 and 2 respectively. When the bit field F is 1, it indicates that the value of the bit field NCC can be used to generate the key for communication with the target cell after LTM handover recovery. The first candidate cell belongs to at least one candidate cell associated when the tm-NoSecurityChangeID value is 1 or 2.

[0150] In some implementations, the second indication information is used to indicate that the first parameter is used to generate the key for communication with the target cell after LTM handover recovery. The target cell belongs to the first candidate cell, the identifier associated with the first candidate cell is the same as the identifier associated with the first cell, and the first candidate cell belongs to one or more candidate cells associated with the source cell. For example, the first MAC CE is the LTM cell handover command MAC CE, the second indication information is carried in the bit field F, occupying 2 bits, the first parameter is NCC, carried in the bit field NCC, occupying 3 bits, the value of the bit field NCC is a valid value, the identifier is the ID of the CU to which the network device of the cell belongs, indicated by ltm-NoSecurityChangeID, and the first cell is the candidate cell indicated by the Target config ID. When bit field F is 01, it indicates that the value of bit field NCC can be used to generate a key for communication with the target cell after LTM handover recovery. The first candidate cell is any other candidate cell that has the same ltm-NoSecurityChangeID as the candidate cell indicated by the Target config ID. When bit field F is 10, it indicates that the value of bit field NCC can be used to generate a key for communication with the target cell after LTM handover recovery. The first candidate cell is any other candidate cell that has a different ltm-NoSecurityChangeID from the source cell.

[0151] In some implementations, the second indication information indicates that the first parameter is not used to generate the key for communication with the target cell after LTM handover recovery, and the first parameter is used to generate the key for communication with the first cell. For example, referring to Figure 7, the first MAC CE is the LTM cell handover command MAC CE, the second indication information is carried in the bit field F, occupying 1 bit, the first parameter is NCC, carried in the bit field NCC, occupying 3 bits, and the value of the bit field NCC is a valid value, identified as the ID of the CU to which the network device of the cell belongs, indicated by ltm-NoSecurityChangeID, and the first cell is the candidate cell indicated by the Target config ID. When the value of the bit field F is 0, it indicates that the value of the bit field NCC cannot be used to generate the key for communication with the target cell after LTM handover recovery, and the value of the bit field NCC is used to generate the key for communication with the candidate cell indicated by the Target config ID. For example, the first MAC CE is the LTM cell handover command MAC CE. The second indication information is carried in the bit field F, occupying 2 bits. The first parameter is NCC, carried in the bit field NCC, occupying 3 bits. The value of the bit field NCC is always a valid value, identified as the ID of the CU to which the network device of the cell belongs, indicated by ltm-NoSecurityChangeID. The first cell is the candidate cell indicated by the Target config ID. When the value of the bit field F is 00, it indicates that the value of the bit field NCC cannot be used to generate the key for communication with the target cell after LTM handover recovery. The value of the bit field NCC is used to generate the key for communication with the candidate cell indicated by the Target config ID.

[0152] In some implementations, the second indication information is used only to indicate the first candidate cell. For example, the second indication information indicates that the identifier associated with the first candidate cell is different from the identifier associated with the source cell.

[0153] In some implementations, the second indication information includes a bit map that indicates the first candidate cell.

[0154] In some implementations, the second indication information implicitly indicates the first candidate cell through the value of each bit in the bitmap.

[0155] In some implementations, each bit of the aforementioned bitmap corresponds to a first candidate cell and / or an identifier associated with that first candidate cell. For example, referring to Figure 8, the first MAC CE is the LTM cell handover command MAC CE, and the second indication information includes a bitmap. The bitmap is carried in bit fields S0 to S7, occupying 8 bits, and is identified as the ID of the CU to which the network device of the cell belongs, indicated by ltm-NoSecurityChangeID. Each bit field corresponds to an ltm-NoSecurityChangeID, and the first candidate cell is the candidate cell associated with the ltm-NoSecurityChangeID when the value of bit fields S0 to S7 is 1. As another example, referring to Figure 8, the first MAC CE is the LTM cell handover command MAC CE, and the second indication information includes a bitmap. The bitmap is carried in bit fields S0 to S7, and each bit field corresponds to a candidate cell ID. The candidate cell ID indicates the ID of the candidate cell, and the first candidate cell is the candidate cell indicated by the candidate cell ID when the value of bit fields S0 to S7 is 1.

[0156] In some implementations, the second indication information displays an indication of the first candidate cell, or in other words, the second indication information includes information associated with the first candidate cell.

[0157] In some implementations, the information associated with the first candidate cell can be the ID of the first candidate cell and / or the associated identifier. For example, the candidate cell ID is indicated using candidate cell ID, the identifier is the ID of the CU to which the network device of the cell belongs, and is indicated using ltm-NoSecurityChangeID. The second indication information includes candidate cell ID and / or ltm-NoSecurityChangeID, indicating that the first candidate cell is the candidate cell indicated by candidate cell ID and / or the candidate cell associated with ltm-NoSecurityChangeID.

[0158] In some implementations, the first MAC CE is also used to carry third indication information, which is used to indicate whether the first MAC CE carries second indication information.

[0159] In some implementations, the third instruction information is carried in the second instruction field of the first MAC CE.

[0160] In this embodiment, the number of bits occupied by the second indicator field is not limited. For example, the second indicator field may occupy 1 bit.

[0161] Similarly, in the embodiments of this application, the position of the second indicator field in the first MAC CE is not limited. For example, the first MAC CE is an existing MAC CE, and the second indicator field is a reserved bit field in the first MAC CE or a newly added bit field. As another example, the first MAC CE is a newly defined MAC CE, and a new second indicator field is defined in the first MAC CE.

[0162] In some implementations, the first MAC CE carries third indication information, which instructs the first MAC CE to carry second indication information. For example, referring to Figure 7, the first MAC CE is an LTM cell handover command MAC CE, and the second indication field is bit field C1, occupying 1 bit. The value of bit field C1 is 1, indicating that the first MAC CE carries the second indication information.

[0163] In some implementations, the first MAC CE carries third indication information, which indicates that the first MAC CE does not carry the second indication information. For example, referring to Figure 7, the first MAC CE is an LTM cell handover command MAC CE, and the second indication field is bit field C1, with a value of 0, indicating that the first MAC CE does not carry the second indication information.

[0164] In some implementations, if the third indication information indicates that the first MAC CE does not carry the second indication information, then the first parameter is used to generate the key for communication with the target cell after LTM handover. This can be understood as follows: if the third indication information indicates that the first MAC CE does not carry the second indication information, then the first parameter is not used to generate the key for communication with the target cell after LTM handover failure recovery; instead, the first parameter is used to generate the key for communication with the target cell after LTM handover, and the target cell belongs to the second candidate cell. For example, referring to Figure 7, the first MAC CE is the LTM cell handover command MAC CE, and the second indication field is bit field C1. The value of bit field C1 is 0, indicating that the first MAC CE does not carry the second indication information. In this case, the first parameter is used to generate the key for communication with the target cell after LTM handover.

[0165] In some implementations, if the third indication information indicates that the first MAC CE does not carry the second indication information, then the first parameter is used to generate the key for communication with the target cell after LTM handover, and the second candidate cell is one or more of the following: the identifier associated with the second candidate cell is the same as the identifier associated with the first cell; the second candidate cell and the first cell are the same cell.

[0166] In some implementations, if the identifier is the ID of the CU to which the network device of the cell belongs, then the identifier associated with the second candidate cell is the same as the identifier associated with the first cell. This can be understood as the CU ID associated with the second candidate cell being the same as the CU ID associated with the first cell; that is, the network device of the second candidate cell belongs to the same CU as the network device of the first cell. For example, if the first cell uses Target config ID as the indicator, the identifier is the ID of the CU to which the network device of the cell belongs, and ltm-NoSecurityChangeID is used as the indicator, then the second candidate cell is another candidate cell that has the same ltm-NoSecurityChangeID as the candidate cell indicated by Target config ID.

[0167] In some implementations, the second candidate cell is the same as the first cell. This can be understood as the second candidate cell being the same as the first cell, or in other words, the second candidate cell being the first cell.

[0168] In some implementations, the third instruction information and the first instruction information mentioned above are carried in the same instruction field, that is to say, the first instruction field is the same as the second instruction field.

[0169] In some implementations, if the third indication information and the first indication information are carried in the same indication field, then the indication field is used to indicate whether the first MAC CE carries the first parameter and / or the second indication information.

[0170] In some implementations, the first indication information indicates that the first MAC CE carries the first parameter, and the first MAC CE carries the second indication information. For example, referring to Figure 7, the first MAC CE is an LTM cell handover command MAC CE, and both the first indication field and the second indication field are bit field C1. When the value of bit field C1 is 1, the first indication information indicates that the first MAC CE carries the first parameter, and also indicates that the first MAC CE carries the second indication information.

[0171] In some implementations, the third indication information and the first indication information are carried in different indication fields. That is to say, the first indication field is different from the second indication field, or the second indication field is an independent indication field. For example, referring to Figure 7, the first MAC CE is the LTM cell handover command MAC CE, the first indication field is the bit field C1, and the second indication field is one of the reserved bit fields R, occupying 1 bit.

[0172] In some implementations, if the second indication field is an independent indication field, and the third indication information indicates that the first MAC CE does not carry the second indication information, then the first parameter is used to generate the key for communication with the target cell after LTM handover. The second candidate cell is one or more of the following: the identifier associated with the second candidate cell is the same as the identifier associated with the first cell; the second candidate cell and the first cell are the same cell. For example, referring to Figure 6, the first MAC CE is the LTM cell handover command MAC CE, the second indication field is bit field C1, occupying 1 bit, and the first cell is indicated by the Target config ID. The value of bit field C1 is 0, indicating that the first MAC CE does not carry the second indication information. Then the first parameter is used to generate the key for communication with the target cell after LTM handover, and the second candidate cell is the candidate cell indicated by the Target config ID.

[0173] In some implementations, the terminal device determines whether to generate a key and / or a first parameter based on the first MAC CE.

[0174] In some implementations, the terminal device determines whether to generate a key based on the first MAC CE. This can be understood as the terminal device determining whether to generate a key for communication with the target cell after LTM handover and / or to generate a key for communication with the target cell after LTM handover recovery failure based on the first MAC CE.

[0175] In some implementations, if the first MAC CE carries a first parameter, and the value of the first parameter includes both valid and invalid values, then the terminal device determines whether to generate a key based on the first MAC CE. This can be understood as the terminal device determining whether to generate a key based on the value of the first parameter.

[0176] In some implementations, if the first MAC CE carries first indication information and the values ​​of the first parameters are all valid, the terminal device determines whether to generate a key based on the first MAC CE. This can be understood as the terminal device determining whether to generate a key based on the first indication information.

[0177] In some implementations, if the first MAC CE carries first indication information and the value of the first parameter includes valid and invalid values, then the terminal device determines whether to generate a key based on the first MAC CE. This can be understood as the terminal device determining whether to generate a key based on the first indication information and / or the value of the first parameter.

[0178] In some implementations, if the first MAC CE carries the second indication information and the first parameter, the terminal device determines whether to generate a key based on the first MAC CE. This can be understood as the terminal device determining whether to generate a key based on the value of the second indication information and / or the first parameter, whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery, and the first candidate cell and / or the second candidate cell.

[0179] In some implementations, if the first MAC CE carries third indication information and first parameter, the terminal device determines whether to generate a key based on the first MAC CE. This can be understood as the terminal device determining whether to generate a key based on the value of the third indication information and / or the first parameter, whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery, and the first candidate cell and / or the second candidate cell.

[0180] In some implementations, if the first MAC CE carries third indication information, second indication information, and first parameter, the terminal device determines whether to generate a key based on the first MAC CE. This can be understood as the terminal device determining whether to generate a key based on the value of the third indication information, second indication information, and first parameter, whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery, and the first candidate cell and / or the second candidate cell.

[0181] In some implementations, if the first MAC CE carries a first parameter, and / or the value of the first parameter is valid, the terminal device generates a key based on the first parameter.

[0182] In some implementations, the key is generated by the RRC layer of the terminal device based on the first parameter, which is obtained by the RRC layer of the terminal device from the MAC layer of the terminal device.

[0183] In some implementations, the first parameter is always a valid value. If the first MAC CE carries the first parameter, the MAC layer of the terminal device that receives the first MAC CE provides the first parameter to the RRC layer of the terminal device.

[0184] In some implementations, the value of the first parameter includes valid and invalid values. If the first MAC CE carries a parameter and the value of the first parameter is valid, then the MAC layer of the terminal device that receives the first MAC CE provides the first parameter to the RRC layer of the terminal device.

[0185] In this embodiment, the method by which the terminal device generates the key is not limited. The terminal device can generate the key using either the horizontal derivation method or the vertical derivation method described above. For example, if the first parameter is NCC, the NCC value carried by the first MAC CE is 1, the first cell is cell A, and the NCC value associated with the network device of the source cell of the terminal device is also 1, then the terminal device can use the horizontal derivation method based on 1 to generate a key for transmitting information in cell A. As another example, if the first parameter is NCC, the NCC value carried by the first MAC CE is 1, and the NCC value associated with the network device of the source cell of the terminal device is 2, then the terminal device can use the vertical derivation method based on 1 to generate a key for transmitting information in cell A.

[0186] In some implementations, the terminal device generates a key based on the first parameter. This can be understood as the terminal device generating a master key based on the first parameter, and the key used for communication with the target cell is derived from the master key. For example, the terminal device generates a master key K based on the first parameter. gNB Then use the master key K gNB Derive an RRC key, which is used as a key for communication with the target cell.

[0187] In some implementations, the terminal device generates a key based on the first parameter. This can be understood as the terminal device generating a master key based on the first parameter, and then deriving a secondary key based on the master key and the SN counter. The key used by the terminal device to communicate with the target cell is derived from the secondary key. For example, if the first cell configuration includes an SCG configuration, the terminal device generates a master key K based on the first parameter. gNB Then use the master key K gNB And SN counter derived auxiliary key SK gNB Then use the secondary key SK gNB The UP key is derived and used as the key for communication with the target cell.

[0188] In some implementations, if the identifier associated with the first cell is different from the identifier associated with the source cell, and the terminal device has not obtained the first parameter, the terminal device sends an RRC re-establishment request to the network device.

[0189] In some implementations, the identifier is the CU ID to which the network device of the cell belongs. If the identifier associated with the first cell is different from the identifier associated with the source cell, it can be understood that the network device of the first cell belongs to a different CU than the network device of the source cell, or that the first cell is an inter-CU cell.

[0190] In some implementations, if the first cell is an inter-CU cell and the terminal device is performing an LTM process, then the current LTM process can be called an "inter-CU LTM process".

[0191] In some implementations, since the first parameter is carried by the first MAC CE, the terminal device does not obtain the first parameter. This can be understood as the terminal device's RRC layer not obtaining the first parameter provided by the terminal device's MAC layer.

[0192] In some implementations, if the identifier associated with the first cell is different from the identifier associated with the source cell, and the terminal device does not obtain the first parameter, the terminal device assumes that the first parameter was not obtained when it was required, and the LTM process may have failed. In this case, it sends an RRC re-establishment request to the network device.

[0193] In some implementations, if the identifier associated with the first cell is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, then the terminal device sends an RRC re-establishment request to the network device.

[0194] In some implementations, the identifier is the CU ID to which the network device of the cell belongs. If the identifier associated with the first cell is the same as the identifier associated with the source cell, it can be understood that the network device of the first cell belongs to the same CU as the network device of the source cell, or in other words, the first cell is an intra-CU cell.

[0195] In some implementations, if the first cell is an intra-CU cell and the terminal device is performing an LTM process, then the current LTM process can be called an "intra-CU LTM process".

[0196] In some implementations, if the identifier associated with the first cell is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the terminal device assumes that obtaining the first parameter when it is not needed indicates that the LTM process may have failed, or that the original first parameter has a security issue, and then sends an RRC re-establishment request to the network device.

[0197] In some implementations, if the identifier associated with the first cell is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the terminal device generates a key based on the first parameter and sends a packet data convergence protocol (PDCP) re-establishment request and a radio link control (RLC) re-establishment request.

[0198] The method embodiments of this application have been described in detail above with reference to Figures 1 to 8. The apparatus embodiments of this application will be described in detail below with reference to Figures 9 to 11. It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments; therefore, any parts not described in detail can be referred to the foregoing method embodiments.

[0199] Figure 9 is a schematic diagram of a terminal device according to an embodiment of this application. The terminal device 900 shown in Figure 9 includes a receiving unit 910.

[0200] The receiving unit 910 is used to receive a first Media Access Control (MAC) CE sent by the network device. The first MAC CE is used to carry a first parameter, which is used for one or more of the following: generating a key for communication with the target cell after LTM handover triggered by Layer 1 / Layer 2; generating a key for communication with the target cell after LTM handover failure recovery.

[0201] In some implementations, the first MAC CE is also used to carry first indication information, which indicates whether the first MAC CE carries the first parameter.

[0202] In some implementations, the value of the first parameter is used to determine the generation of the key.

[0203] In some implementations, if the value of the first parameter is valid, the terminal device generates the key.

[0204] In some implementations, the first MAC CE is further configured to carry second indication information, which indicates whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery; and / or the second indication information indicates that the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery, wherein the target cell belongs to the first candidate cell.

[0205] In some implementations, the first MAC CE is also used to carry second indication information, which indicates that the first parameter is not used to generate a key for communication with the target cell after LTM handover failure recovery, and is used to generate a key for communication with the first cell, which is a candidate cell indicated by the LTM cell handover command.

[0206] In some implementations, the first candidate cell is a predefined or LTM candidate cell indicated by an LTM candidate configuration.

[0207] In some implementations, the first candidate cell is one or more of the following: the identifier associated with the first candidate cell is the same as the identifier associated with the first cell; the identifier associated with the first candidate cell is different from the identifier associated with the source cell; the first candidate cell belongs to one or more candidate cells associated with the source cell.

[0208] In some implementations, the second indication information includes the identity ID of the first candidate cell and / or the identifier associated with the first candidate cell.

[0209] In some implementations, the first MAC CE is also used to carry third indication information, which is used to indicate whether the first MAC CE carries the second indication information.

[0210] In some implementations, if the third indication information indicates that the first MAC CE does not carry the second indication information, the first parameter is used to generate a key for communication with the target cell after LTM handover. The target cell belongs to a second candidate cell, and the second candidate cell is one or more of the following: the identifier associated with the second candidate cell is the same as the identifier associated with the first cell; the second candidate cell and the first cell are the same cell.

[0211] In some implementations, the third indication information and the first indication information are carried in the same indication field. The first indication information indicates that the first MAC CE carries the first parameter, and the first MAC CE carries the second indication information.

[0212] In some implementations, if the first MAC CE carries the first parameter, and / or the value of the first parameter is valid, the terminal device further includes: a generation unit, used to generate the key based on the first parameter.

[0213] In some implementations, if the identifier associated with the candidate cell indicated by the LTM cell handover command is different from the identifier associated with the source cell, and the terminal device has not obtained the first parameter, the terminal device further includes: a sending unit, used to send a Radio Resource Control (RRC) re-establishment request to the network device.

[0214] In some implementations, if the identifier associated with the candidate cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the terminal device further includes: a sending unit, used to send an RRC re-establishment request to the network device.

[0215] In some implementations, if the identifier associated with the candidate cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the terminal device further includes: a generation unit, used to generate the key based on the first parameter, and send a Packet Data Convergence Protocol (PDCP) re-establishment request and a Radio Link Control (RLC) re-establishment request.

[0216] In some implementations, the first MAC CE is used to instruct the terminal device to perform the LTM handover.

[0217] In some implementations, the first parameter is used to generate the master key.

[0218] Figure 10 is a schematic diagram of a network device according to an embodiment of this application. The network device 1000 shown in Figure 10 includes: a transmitting unit 1010.

[0219] The sending unit 1010 is used to send a first Media Access Control (MAC) CE to the terminal device. The first MAC CE is used to carry a first parameter, which is used for one or more of the following: generating a key for communication with the target cell after LTM handover triggered by Layer 1 / Layer 2; generating a key for communication with the target cell after LTM handover failure recovery.

[0220] In some implementations, the first MAC CE is also used to carry first indication information, which indicates whether the first MAC CE carries the first parameter.

[0221] In some implementations, the value of the first parameter is used to determine the generation of the key.

[0222] In some implementations, if the value of the first parameter is valid, the terminal device generates the key.

[0223] In some implementations, the first MAC CE is further configured to carry second indication information, which indicates whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery; and / or the second indication information indicates that the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery, wherein the target cell belongs to the first candidate cell.

[0224] In some implementations, the first MAC CE is also used to carry second indication information, which indicates that the first parameter is not used to generate a key for communication with the target cell after LTM handover failure recovery, and is used to generate a key for communication with the first cell, which is a candidate cell indicated by the LTM cell handover command.

[0225] In some implementations, the first candidate cell is a predefined or LTM candidate cell indicated by an LTM candidate configuration.

[0226] In some implementations, the first candidate cell is one or more of the following: the identifier associated with the first candidate cell is the same as the identifier associated with the first cell; the identifier associated with the first candidate cell is different from the identifier associated with the source cell; the first candidate cell belongs to one or more candidate cells associated with the source cell.

[0227] In some implementations, the second indication information includes the identity ID of the first candidate cell and / or the identifier associated with the first candidate cell.

[0228] In some implementations, the first MAC CE is also used to carry third indication information, which is used to indicate whether the first MAC CE carries the second indication information.

[0229] In some implementations, if the third indication information indicates that the first MAC CE does not carry the second indication information, the first parameter is used to generate a key for communication with the target cell after LTM handover. The target cell belongs to the second candidate cell, and the second candidate cell is one or more of the following: the identifier associated with the second candidate cell is the same as the identifier associated with the first cell; the second candidate cell and the first cell are the same cell.

[0230] In some implementations, the third indication information and the first indication information are carried in the same indication field. The first indication information indicates that the first MAC CE carries the first parameter, and the first MAC CE carries the second indication information.

[0231] In some implementations, if the identifier associated with the candidate cell indicated by the LTM cell handover command is different from the identifier associated with the source cell, and the terminal device has not obtained the first parameter, the network device further includes: a receiving unit, configured to receive a Radio Resource Control (RRC) re-establishment request sent by the terminal device.

[0232] In some implementations, if the identifier associated with the candidate cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the network device further includes: a receiving unit, configured to receive a Radio Resource Control (RRC) re-establishment request sent by the terminal device.

[0233] In some implementations, the first MAC CE is used to instruct the terminal device to perform the LTM handover.

[0234] In some implementations, the first parameter is used to generate the master key.

[0235] In an optional embodiment, the receiving unit 910 may be a transceiver 1130. The terminal device 900 may also include a processor 1110 and a memory 1120, as shown in FIG11.

[0236] In an optional embodiment, the transmitting unit 1010 may be a transceiver 1130. The network device 1000 may also include a processor 1110 and a memory 1120, as shown in FIG11.

[0237] Figure 11 is a schematic structural diagram of a communication device according to an embodiment of this application. The dashed lines in Figure 11 indicate that the unit or module is optional. This device 1100 can be used to implement the methods described in the above method embodiments. Device 1100 can be a chip, a terminal device, or a network device.

[0238] Apparatus 1100 may include one or more processors 1110. The processor 1110 may support apparatus 1100 in implementing the methods described in the preceding method embodiments. The processor 1110 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a central processing unit (CPU). Alternatively, the processor may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0239] The apparatus 1100 may further include one or more memories 1120. The memories 1120 store a program that can be executed by the processor 1110, causing the processor 1110 to perform the methods described in the preceding method embodiments. The memories 1120 may be independent of the processor 1110 or integrated within the processor 1110.

[0240] The device 1100 may also include a transceiver 1130. The processor 1110 can communicate with other devices or chips via the transceiver 1130. For example, the processor 1110 can send and receive data with other devices or chips via the transceiver 1130.

[0241] This application also provides a computer-readable storage medium for storing a program. This computer-readable storage medium can be applied to a terminal or network device provided in this application, and the program causes a computer to execute the methods performed by the terminal or network device in various embodiments of this application.

[0242] This application also provides a computer program product. The computer program product includes a program. The computer program product can be applied to a terminal or network device provided in this application embodiment, and the program causes a computer to execute the methods performed by the terminal or network device in various embodiments of this application.

[0243] This application also provides a computer program. This computer program can be applied to the terminal or network device provided in this application, and the computer program causes the computer to execute the methods performed by the terminal or network device in various embodiments of this application.

[0244] It should be understood that the terms "system" and "network" in this application can be used interchangeably. Furthermore, the terminology used in this application is only for explaining specific embodiments of the application and is not intended to limit the application. The terms "first," "second," "third," and "fourth," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. In addition, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0245] In the embodiments of this application, the term "instruction" can be a direct instruction, an indirect instruction, or an indication of a relationship. For example, A instructing B can mean that A directly instructs B, such as B being able to obtain information through A; it can also mean that A indirectly instructs B, such as A instructing C, so B can obtain information through C; or it can mean that there is a relationship between A and B.

[0246] In the embodiments of this application, the term "correspondence" can indicate a direct or indirect correspondence between two things, or an association between two things, or a relationship such as instruction and being instructed, configuration and being configured.

[0247] In this application embodiment, "predefined" or "preconfigured" can be implemented by pre-storing corresponding codes, tables, or other means that can be used to indicate relevant information in the device (e.g., including terminal devices and network devices). This application does not limit the specific implementation method. For example, predefined can refer to what is defined in the protocol.

[0248] In this application embodiment, the "protocol" may refer to a standard protocol in the field of communication, such as the LTE protocol, the NR protocol, and related protocols applied to future communication systems. This application does not limit this.

[0249] In the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0250] In the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0251] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0252] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0253] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0254] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can read or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs, DVDs) or semiconductor media (e.g., solid-state disks, SSDs), etc.

[0255] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for wireless communication, characterized in that, include: The terminal device receives a first Media Access Control (MAC) CE sent by the network device. The first MAC CE carries a first parameter, which is used for one or more of the following: Generate the key for communication with the target cell after Layer 1 / Layer 2 triggers mobility LTM handover; Generate a key for communication with the target cell after LTM handover failure recovery.

2. The method as described in claim 1, characterized in that, The first MAC CE is also used to carry first indication information, which indicates whether the first MAC CE carries the first parameter.

3. The method as described in claim 1 or 2, characterized in that, The value of the first parameter is used to determine the generation of the key.

4. The method as described in claim 3, characterized in that, If the value of the first parameter is valid, the terminal device generates the key.

5. The method according to any one of claims 1-4, characterized in that, The first MAC CE is further configured to carry second indication information, which indicates whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery; and / or The second indication information is used to indicate that the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery, wherein the target cell belongs to the first candidate cell.

6. The method according to any one of claims 1-5, characterized in that, The first MAC CE is also used to carry second indication information, which indicates that the first parameter is not used to generate a key for communication with the target cell after LTM handover failure recovery, and is used to generate a key for communication with the first cell, which is a candidate cell indicated by the LTM cell handover command.

7. The method as described in claim 5, characterized in that, The first candidate cell is a predefined or LTM candidate cell indicated by the LTM candidate configuration.

8. The method according to any one of claims 5-7, characterized in that, The first candidate cell is one or more of the following: The identifier associated with the first candidate cell is the same as the identifier associated with the first cell; The identifier associated with the first candidate cell is different from the identifier associated with the source cell; The first candidate cell belongs to one or more candidate cells associated with the source cell.

9. The method according to any one of claims 5-8, characterized in that, The second indication information includes the identity ID of the first candidate cell and / or the identifier associated with the first candidate cell.

10. The method according to any one of claims 5-9, characterized in that, The first MAC CE is also used to carry third indication information, which is used to indicate whether the first MAC CE carries the second indication information.

11. The method as described in claim 10, characterized in that, If the third indication information indicates that the first MAC CE does not carry the second indication information, the first parameter is used to generate the key for communication with the target cell after LTM handover. The target cell belongs to the second candidate cell, and the second candidate cell is one or more of the following: The identifier associated with the second candidate cell is the same as the identifier associated with the first cell; The second candidate cell is the same cell as the first cell.

12. The method as described in claim 10 or 11, characterized in that, The third indication information and the first indication information are carried in the same indication field. The first indication information indicates that the first MAC CE carries the first parameter, and the first MAC CE carries the second indication information.

13. The method according to any one of claims 1-12, characterized in that, If the first MAC CE carries the first parameter, and / or the value of the first parameter is valid, the method further includes: The terminal device generates the key based on the first parameter.

14. The method according to any one of claims 1-12, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is different from the identifier associated with the source cell, and the terminal device has not obtained the first parameter, the method further includes: The terminal device sends a Radio Resource Control (RRC) re-establishment request to the network device.

15. The method according to any one of claims 1-12, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the method further includes: The terminal device sends an RRC re-establishment request to the network device.

16. The method according to any one of claims 1-12, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the method further includes: The terminal device generates the key based on the first parameter and sends a Packet Data Convergence Protocol (PDCP) re-establishment request and a Radio Link Control (RLC) re-establishment request.

17. The method according to any one of claims 1-16, characterized in that, The first MAC CE is used to instruct the terminal device to perform the LTM handover.

18. The method according to any one of claims 1-17, characterized in that, The first parameter is used to generate the master key.

19. A method for wireless communication, characterized in that, include: The network device sends a first Media Access Control (MAC) CE to the terminal device. The first MAC CE carries a first parameter, which is used for one or more of the following: Generate the key for communication with the target cell after Layer 1 / Layer 2 triggers mobility LTM handover; Generate a key for communication with the target cell after LTM handover failure recovery.

20. The method as described in claim 19, characterized in that, The first MAC CE is also used to carry first indication information, which indicates whether the first MAC CE carries the first parameter.

21. The method as described in claim 19 or 20, characterized in that, The value of the first parameter is used to determine the generation of the key.

22. The method as described in claim 21, characterized in that, If the value of the first parameter is valid, the terminal device generates the key.

23. The method according to any one of claims 19-22, characterized in that, The first MAC CE is further configured to carry second indication information, which indicates whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery; and / or The second indication information is used to indicate that the first parameter is used to generate the key for communication with the target cell after LTM handover failure recovery, and the target cell belongs to the first candidate cell.

24. The method according to any one of claims 19-23, characterized in that, The first MAC CE is also used to carry second indication information, which indicates that the first parameter is not used to generate a key for communication with the target cell after LTM handover failure recovery, and is used to generate a key for communication with the first cell, which is a candidate cell indicated by the LTM cell handover command.

25. The method as described in claim 23, characterized in that, The first candidate cell is a predefined or LTM candidate cell indicated by the LTM candidate configuration.

26. The method according to any one of claims 23-25, characterized in that, The first candidate cell is one or more of the following: The identifier associated with the first candidate cell is the same as the identifier associated with the first cell; The identifier associated with the first candidate cell is different from the identifier associated with the source cell; The first candidate cell belongs to one or more candidate cells associated with the source cell.

27. The method according to any one of claims 23-26, characterized in that, The second indication information includes the identity ID of the first candidate cell and / or the identifier associated with the first candidate cell.

28. The method according to any one of claims 23-27, characterized in that, The first MAC CE is also used to carry third indication information, which is used to indicate whether the first MAC CE carries the second indication information.

29. The method as described in claim 28, characterized in that, If the third indication information indicates that the first MAC CE does not carry the second indication information, the first parameter is used to generate the key for communication with the target cell after LTM handover, and the second candidate cell associated with the first parameter is one or more of the following: The identifier associated with the second candidate cell is the same as the identifier associated with the first cell; The second candidate cell is the same cell as the first cell.

30. The method as described in claim 28 or 29, characterized in that, The third indication information and the first indication information are carried in the same indication field. The first indication information indicates that the first MAC CE carries the first parameter, and the first MAC CE carries the second indication information.

31. The method according to any one of claims 19-29, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is different from the identifier associated with the source cell, and the terminal device has not obtained the first parameter, the method further includes: The network device receives a Radio Resource Control (RRC) re-establishment request sent by the terminal device.

32. The method according to any one of claims 19-29, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the method further includes: The network device receives a Radio Resource Control (RRC) re-establishment request sent by the terminal device.

33. The method according to any one of claims 19-32, characterized in that, The first MAC CE is used to instruct the terminal device to perform the LTM handover.

34. The method according to any one of claims 19-33, characterized in that, The first parameter is used to generate the master key.

35. A terminal device, characterized in that, include: A receiving unit is configured to receive a first Media Access Control (MAC) CE sent by a network device, wherein the first MAC CE carries a first parameter, and the first parameter is used for one or more of the following: Generate the key for communication with the target cell after Layer 1 / Layer 2 triggers mobility LTM handover; Generate a key for communication with the target cell after LTM handover failure recovery.

36. The terminal device as described in claim 35, characterized in that, The first MAC CE is also used to carry first indication information, which indicates whether the first MAC CE carries the first parameter.

37. The terminal device as described in claim 35 or 36, characterized in that, The value of the first parameter is used to determine the generation of the key.

38. The terminal device as described in claim 37, characterized in that, If the value of the first parameter is valid, the terminal device generates the key.

39. The terminal device as described in any one of claims 35-38, characterized in that, The first MAC CE is further configured to carry second indication information, which indicates whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery; and / or The second indication information is used to indicate that the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery, wherein the target cell belongs to the first candidate cell.

40. The terminal device as described in any one of claims 35-39, characterized in that, The first MAC CE is also used to carry second indication information, which indicates that the first parameter is not used to generate a key for communication with the target cell after LTM handover failure recovery, and is used to generate a key for communication with the first cell, which is a candidate cell indicated by the LTM cell handover command.

41. The terminal device as described in claim 39, characterized in that, The first candidate cell is a predefined or LTM candidate cell indicated by the LTM candidate configuration.

42. The terminal device as described in any one of claims 39-41, characterized in that, The first candidate cell is one or more of the following: The identifier associated with the first candidate cell is the same as the identifier associated with the first cell; The identifier associated with the first candidate cell is different from the identifier associated with the source cell; The first candidate cell belongs to one or more candidate cells associated with the source cell.

43. The terminal device as described in any one of claims 39-42, characterized in that, The second indication information includes the identity ID of the first candidate cell and / or the identifier associated with the first candidate cell.

44. The terminal device as described in any one of claims 39-43, characterized in that, The first MAC CE is also used to carry third indication information, which is used to indicate whether the first MAC CE carries the second indication information.

45. The terminal device as described in claim 44, characterized in that, If the third indication information indicates that the first MAC CE does not carry the second indication information, the first parameter is used to generate the key for communication with the target cell after LTM handover. The target cell belongs to the second candidate cell, and the second candidate cell is one or more of the following: The identifier associated with the second candidate cell is the same as the identifier associated with the first cell; The second candidate cell is the same cell as the first cell.

46. ​​The terminal device as described in claim 44 or 45, characterized in that, The third indication information and the first indication information are carried in the same indication field. The first indication information indicates that the first MAC CE carries the first parameter, and the first MAC CE carries the second indication information.

47. The terminal device as described in any one of claims 35-46, characterized in that, If the first MAC CE carries the first parameter, and / or the value of the first parameter is valid, the terminal device further includes: A generation unit is used to generate the key based on the first parameter.

48. The terminal device as described in any one of claims 35-46, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is different from the identifier associated with the source cell, and the terminal device has not obtained the first parameter, the terminal device further includes: The transmitting unit is used to send a Radio Resource Control (RRC) re-establishment request to the network device.

49. The terminal device as described in any one of claims 35-46, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the terminal device further includes: The sending unit is used to send an RRC re-establishment request to the network device.

50. The terminal device as described in any one of claims 35-46, characterized in that, If the identifier associated with the target cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the terminal device further includes: The generation unit is used to generate the key based on the first parameter and send a Packet Data Convergence Protocol (PDCP) re-establishment request and a Radio Link Control (RLC) re-establishment request.

51. The terminal device as described in any one of claims 35-50, characterized in that, The first MAC CE is used to instruct the terminal device to perform the LTM handover.

52. The terminal device as described in any one of claims 35-51, characterized in that, The first parameter is used to generate the master key.

53. A network device, characterized in that, include: The sending unit is configured to send a first Media Access Control Element (MAC CE) to the terminal device, wherein the first MAC CE carries a first parameter, and the first parameter is used for one or more of the following: Generate the key for communication with the target cell after Layer 1 / Layer 2 triggers mobility LTM handover; Generate a key for communication with the target cell after LTM handover failure recovery.

54. The network device as described in claim 53, characterized in that, The first MAC CE is also used to carry first indication information, which indicates whether the first MAC CE carries the first parameter.

55. The network device as described in claim 53 or 54, characterized in that, The value of the first parameter is used to determine the generation of the key.

56. The network device as described in claim 55, characterized in that, If the value of the first parameter is valid, the terminal device generates the key.

57. The network device as described in any one of claims 53-56, characterized in that, The first MAC CE is further configured to carry second indication information, which indicates whether the first parameter is used to generate a key for communication with the target cell after LTM handover failure recovery; and / or The second indication information is used to indicate the first parameter for generating the key for communication with the target cell after LTM handover failure recovery, wherein the target cell belongs to the first candidate cell.

58. The network device as described in any one of claims 53-57, characterized in that, The first MAC CE is also used to carry second indication information, which indicates that the first parameter is not used to generate a key for communication with the target cell after LTM handover failure recovery, and is used to generate a key for communication with the first cell, which is a candidate cell indicated by the LTM cell handover command.

59. The network device as described in claim 57, characterized in that, The first candidate cell is a predefined or LTM candidate cell indicated by the LTM candidate configuration.

60. The network device as described in any one of claims 57-59, characterized in that, The first candidate cell is one or more of the following: The identifier associated with the first candidate cell is the same as the identifier associated with the first cell; The identifier associated with the first candidate cell is different from the identifier associated with the source cell; The first candidate cell belongs to one or more candidate cells associated with the source cell.

61. The network device as described in any one of claims 57-60, characterized in that, The second indication information includes the identity ID of the first candidate cell and / or the identifier associated with the first candidate cell.

62. The network device as described in any one of claims 57-61, characterized in that, The first MAC CE is also used to carry third indication information, which is used to indicate whether the first MAC CE carries the second indication information.

63. The network device as described in claim 62, characterized in that, If the third indication information indicates that the first MAC CE does not carry the second indication information, the first parameter is used to generate the key for communication with the target cell after LTM handover. The target cell belongs to the second candidate cell, and the second candidate cell is one or more of the following: The identifier associated with the second candidate cell is the same as the identifier associated with the first cell; The second candidate cell is the same cell as the first cell.

64. The network device as described in claim 62 or 63, characterized in that, The third indication information and the first indication information are carried in the same indication field. The first indication information indicates that the first MAC CE carries the first parameter, and the first MAC CE carries the second indication information.

65. The network device as described in any one of claims 53-64, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is different from the identifier associated with the source cell, and the terminal device has not obtained the first parameter, the network device further includes: The receiving unit is used to receive the Radio Resource Control (RRC) re-establishment request sent by the terminal device.

66. The network device as described in any one of claims 53-64, characterized in that, If the identifier associated with the candidate cell indicated by the LTM cell handover command is the same as the identifier associated with the source cell, and the terminal device obtains the first parameter, the network device further includes: The receiving unit is used to receive the Radio Resource Control (RRC) re-establishment request sent by the terminal device.

67. The network device as described in any one of claims 53-66, characterized in that, The first MAC CE is used to instruct the terminal device to perform the LTM handover.

68. The network device as described in any one of claims 53-67, characterized in that, The first parameter is used to generate the master key.

69. A terminal device, characterized in that, The device includes a transceiver, a memory, and a processor. The memory is used to store a program, and the processor is used to invoke the program in the memory and control the transceiver to receive or send signals so that the terminal performs the method as described in any one of claims 1-18.

70. A network device, characterized in that, The device includes a transceiver, a memory, and a processor. The memory stores a program, and the processor invokes the program in the memory and controls the transceiver to receive or transmit signals so that the network device performs the method as described in any one of claims 19-34.

71. An apparatus, characterized in that, Includes a processor for calling a program from memory to cause the device to perform the method as described in any one of claims 1-34.

72. A chip, characterized in that, Includes a processor for calling a program from memory, causing a device on which the chip is mounted to perform the method as described in any one of claims 1-34.

73. A computer-readable storage medium, characterized in that, It contains a program that causes a computer to perform the method as described in any one of claims 1-34.

74. A computer program product, characterized in that, Includes a program that causes a computer to perform the method as described in any one of claims 1-34.

75. A computer program, characterized in that, The computer program causes the computer to perform the method as described in any one of claims 1-34.