Communication method and related apparatus

By updating the target session context of the session management function network element, the problem of invalid interaction when the radio access network of the RRC inactive terminal equipment is changed is solved, thereby saving communication resources and improving efficiency.

WO2026026391A1PCT designated stage Publication Date: 2026-02-05HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/104990
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-27
Filing Date
2025-06-27
Publication Date
2026-02-05

AI Technical Summary

Technical Problem

In a communication system architecture where RAN equipment and session management function network elements are directly connected, when a terminal device in the RRC inactive state undergoes a radio access network change, there is invalid interaction between the session management function network element and the anchor network equipment, resulting in a waste of communication resources.

Method used

The first session management function network element receives a message indicating that the terminal device has changed its radio access network, updates the target session context, and deletes or replaces the identification information of the anchor network device to avoid invalid interaction with the anchor network device.

Benefits of technology

This reduces invalid interactions between session management network elements and anchor network devices, saving communication resources and improving communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025104990_05022026_PF_FP_ABST
    Figure CN2025104990_05022026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of wireless communications, and in particular relates to a communication method and a related apparatus. The method comprises: a first session management function network element receiving a first message. The first message is used for indicating the occurrence of a radio access network change in a terminal device, and comprises at least one of first identification information of a first network device that is currently being accessed by the terminal device, and a radio access network change notification of the terminal device. Alternatively, the first message is used for requesting an update of a first session, and comprises the first identification information of the first network device. The first network device is directly connected to the first session management function network element. The first session management function network element updates a target session context on the basis of the first message, wherein the updated target session context does not comprise identification information of an anchor network device of the terminal device. By using the method provided in the present application, the problem of invalid interaction between a session management function network element and an anchor network device caused by the occurrence of a radio access network change in a terminal device can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

A communication method and related apparatus

[0001] This application claims priority to Chinese Patent Application No. 202411026462.0, filed on July 27, 2024, entitled "A Communication Method and Related Device", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of wireless communication technology, and in particular to a communication method and related apparatus. Background Technology

[0003] With the rapid development of wireless communication technology, 5G (5th Generation) wireless communication technology has become a hot topic in the industry. In 5G technology, terminal devices are introduced to a new state called the Radio Resource Control (RRC) inactive state. The RRC inactive state can be considered an intermediate state between the RRC connected state and the RRC idle state. For terminal devices in the RRC inactive state, the radio access network (RAN) and core network (CN) maintain a connection for the terminal device, and both the RAN and CN sides store the context of the terminal device. The RAN device that maintains the control plane connection between the RAN and CN sides of the terminal device can be called an anchor network device. The anchor network device stores the context of the terminal device so that when the terminal device needs to restore the connection due to uplink requirements, it can quickly establish a communication channel with the CN side.

[0004] In practice, terminal devices in an RRC inactive state can move freely and connect to other RAN devices besides the anchor network device; that is, a radio access network change (RAN change) occurs. Existing connection recovery schemes specify how a terminal device in an RRC inactive state should trigger a transition from RRC inactive to RRC connected state (i.e., RRC connection recovery) in the event of a RAN change. However, this connection recovery scheme only applies to communication system architectures where the RAN device and the session management function (SMF) network element are not directly connected. For communication system architectures where the RAN device and the SMF network element are directly connected, there is no clear regulation on how to restore connection when a terminal device in an RRC inactive state undergoes a RAN change. This results in the SMF network element still interacting with the anchor network device after a RAN change, leading to a waste of communication resources. Summary of the Invention

[0005] To address the aforementioned issues, this application provides a communication method and related apparatus. In scenarios where a terminal device undergoes a wireless access network change, this method can avoid ineffective interactions between the session management function network element and the anchor network device, thereby reducing the waste of communication resources.

[0006] The present application is described below from multiple aspects. It is easy to understand that the different implementation methods and beneficial effects described below can be referenced from each other.

[0007] Firstly, this application provides a communication method. This method can be executed by a first session management function (SMS) network element, or by a component of the first SMS network element (e.g., a processor, chip, or chip system). The first SMS network element is used to manage a first session of a terminal device. The method includes: the first SMS network element receiving a first message. The first message can be used to indicate that the terminal device has undergone a radio access network (RAN) change, and the first message includes at least one of: first identification information of a first network device and a RAN change notification for the terminal device. Alternatively, the first message can be used to request an update to the first session, and the first message includes the first identification information of the first network device. Here, the first network device is the network device currently accessed by the terminal device, and the first network device is directly connected to the first SMS network element. The first SMS network element updates the target session context according to the first message, so that the updated target session context does not include the second identification information of a second network device. The target session context is the session context of the first session, and the second network device is the anchor network device of the terminal device, and the second network device is directly connected to the first SMS network element.

[0008] In the above implementation, the first session management function network element receives a first message indicating that the terminal device has undergone a radio access network change or requests an update to the first session it manages. It then updates its stored target session context so that the updated target session context no longer contains the identifier information of the anchor network device for the terminal device, thereby preventing the first session management function network element from interacting with the anchor network device. This method solves the problem of invalid interaction between the session management function network element and the anchor network device caused by a radio access network change in a terminal device in RRC connected state, reducing the waste of communication resources.

[0009] In conjunction with the first aspect, in one possible implementation, when the first message is used to indicate that the terminal device has undergone a radio access network change and the first message includes at least one of the first identification information of the first network device and the radio access network change indication of the terminal device, the first session management function network element updates the target session context according to the first message, which may include: the first session management function network element deleting the second identification information of the second network device included in the target session context according to the first message to obtain the updated target session context.

[0010] For example, if the first session management function network element includes a radio access network replacement instruction for the terminal device in the first message, it can delete the second identification information of the second network device included in the target session context to obtain an updated target session context.

[0011] In conjunction with the first aspect, in one possible implementation, when the first message is used to indicate that the terminal device has undergone a radio access network change and the first message includes at least one of the first identification information of the first network device and the radio access network change indication of the terminal device, the first session management function network element updates the target session context according to the first message, which may include: the first session management function network element replacing the second identification information of the second network device included in the target session context with the first identification information of the first network device according to the first message to obtain the updated target session context.

[0012] For example, the first session management function network element can replace the second identification information of the second network device included in the target session context with the first identification information of the first network device when the first message includes the first identification information of the first network device, so as to obtain the updated target session context.

[0013] In conjunction with the first aspect, in one possible implementation, when the first message is used to indicate that the terminal device has undergone a radio access network change and the first message includes at least one of first identification information and a radio access network change indication, the first message may originate from a first network element. The first network element is used to store the terminal device context of the terminal device or to be responsible for the access management of the terminal device.

[0014] In the above implementation, the first message is provided by the terminal device context that stores the terminal device or the first network element responsible for the access management of the terminal, which enables the first session management function network element to update the target session context in a timely manner, thereby effectively avoiding invalid interaction between the first session management function network element and the second network device.

[0015] In conjunction with the first aspect, in one possible implementation, the first session management function network element can send a second message to the first network element when the first condition is met. This second message can be used to subscribe to mobility events of the terminal device. Alternatively, the second message can be used to trigger the first network element to send the first message to the first session management function network element.

[0016] In the above implementation, the first session management function network element obtains the first message by subscription. On the one hand, this can avoid frequent interactions between the first session management function network element and the first network element, and on the other hand, it can ensure the timeliness of the first message by subscription.

[0017] Optionally, the mobility events subscribed to in the second message subscription may include: a change of radio access network by the terminal device.

[0018] Optionally, the first condition may include at least one of the following: a first session is established, the first session is in an active state, or the terminal device enters an RRC inactive state.

[0019] Optionally, if the first condition includes the terminal device entering an RRC inactive state, the method further includes: a first session management function network element receiving an RRC inactive state indication from the terminal device. Here, the RRC inactive state indication from the terminal device is used to indicate that the terminal device is in an RRC inactive state. The first session management function network element determines that the terminal device is in an RRC inactive state based on the RRC inactive state indication, and thus determines that the first condition is met.

[0020] Furthermore, the RRC inactivity status indication may originate from the second network device. Moreover, the RRC inactivity status indication may be sent by the second network device upon determining that the terminal device has entered an RRC inactivity state.

[0021] In conjunction with the first aspect, in one possible implementation, the second message may include a radio access network replacement notification request from the terminal device. Furthermore, the second message may also include the terminal device's fifth identification information.

[0022] In conjunction with the first aspect, in one possible implementation, the method may further include: when the second condition is met, the first session management function network element sends a third message to the first network element. This third message is used to unsubscribe from the mobility events of the terminal device.

[0023] In the above implementation, the subscription to the mobility event of the terminal device is canceled when the second condition is met. This can prevent the first network element from providing the first message to the first session management function network element when there is no need for it, thereby avoiding invalid interaction between the first session management function network element and the first network element.

[0024] Optionally, the second condition may include at least one of the following: the first session is released, the first session is in a deactivated state, or the terminal device leaves the RRC inactive state. Here, the terminal device leaving the RRC inactive state can also be understood as the terminal device being removed from the RRC inactive state.

[0025] In conjunction with the first aspect, in one possible implementation, the first network element may include a first access and mobility management function (AMF) network element or a unified data repository (UDR) network element.

[0026] Optionally, if the first network element is a unified database network element, the first message can be generated by the unified database based on the mobility information notification message provided by the first access and mobility management function network element.

[0027] Optionally, the mobile information notification message may include at least one of the following: the fifth identification information of the terminal device, the first identification information of the first network device, and the wireless access network replacement instruction of the terminal device.

[0028] In conjunction with the first aspect, in one possible implementation, where the first message is used to indicate that the terminal device has undergone a radio access network change and the first message includes at least one of the first identification information of the first network device and the radio access network change indication of the terminal device, the first message may further include the fifth identification information of the terminal device.

[0029] In conjunction with the first aspect, in one possible implementation, where the first message is used to request an update to the first session and includes first identification information of the first network device, the first message may originate from the first network device.

[0030] In the above implementation, since the first network device is a newly connected network device for the terminal device, the first network device provides the first message to request the update of the first session, which can also make the update of the target session context timely, thereby effectively avoiding invalid interaction between the first session management function network element and the anchor network device.

[0031] In conjunction with the first aspect, in one possible implementation, when the first message is used to request an update of the first session and the first message includes the first identification information of the first network device, the first session management function network element updates the target session context according to the first message, including: replacing the second identification information of the second network device in the target session context with the first identification information of the first network device to obtain the updated target session context.

[0032] In this case, the first message may further include access network tunnel information (AN tunnel info) of the first network device. The method also includes: the first session management function (SMS) network element sending the access network tunnel information of the first network device to the user plane function (UPF) network element, so that the UPF network element replaces the access network tunnel information corresponding to the second network device that it stores with the access network tunnel information corresponding to the first network device.

[0033] In conjunction with the first aspect, in one possible implementation, the method may further include: the first session management function network element sending a session context release (SM context) message to the second network device, instructing the second network device to release or delete its stored target session context. Optionally, the session context release message may include third identification information of the first session.

[0034] In conjunction with the first aspect, where the first message is used to request an update to the first session and includes the first identification information of the first network device, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may further include a session modification indication or a session modification message for the first session.

[0035] In conjunction with the first aspect, in one possible implementation, the first session is in an active state.

[0036] Secondly, this application provides a communication method. This method can be executed by a first network element or by a component of the first network element (e.g., a processor, chip, or chip system). The method includes: the first network element receiving a second message from a first session management function network element. The second message is used to subscribe to mobility events of a terminal device. The first network element is used to store the terminal device context of the terminal device or to be responsible for the access management of the terminal device. The first session management function network element is used to manage a first session of the terminal device. The first network element sends a first message to the first session management function network element. The first message is used to indicate that the terminal device has undergone a radio access network change, and the first message includes at least one of the following: first identification information of a first network device and a radio access network change indication of the terminal device. The first network device is the network device currently accessed by the terminal device, and the first network device is directly connected to the first session management function network element.

[0037] In the above implementation, when the first session management function network element subscribes to the mobility event of the terminal device, the first network element will send a first message so that the first session management function network element can know that the terminal device has changed its radio access network. This can avoid some invalid operations that the first session management function network element may perform because it does not know that the terminal device has changed its radio access network.

[0038] Optionally, the first message can be used by the first session management function network element to update the target session context of the first session, so that the updated target session context does not include the second identification information of the second network device. Here, the second network device is the anchor network device of the terminal device, and the second network device is directly connected to the first session management function network element.

[0039] In the above implementation, the first network element sends a first message to enable the first session management function network element to update its stored target session context. The updated target session context no longer contains the identifier information of the anchor network device for the terminal device. This way, the first session management function network element will no longer interact with the anchor network device, thereby reducing the waste of communication resources caused by invalid interactions. Alternatively, having the first message provided by the first network element that stores the terminal device's context or is responsible for the access management of that terminal device can also enable the first session management function network element to update the target session context in a timely manner.

[0040] In conjunction with the second aspect, in one possible implementation, the second message may include a radio access network replacement notification request from the terminal device. Optionally, the second message may also include the terminal device's fifth identification information.

[0041] In conjunction with the second aspect, in one possible implementation, sending a first message to the first session management function network element may include: sending the first message to the first session management function network element when a third condition is met. The third condition may include at least one of the following: receiving a fourth message from the first network device where the fourth message is used to update the location information of the terminal device; determining that the terminal device has undergone a radio access network change in the absence of RRC connection recovery; or determining that the terminal device has undergone a radio access network change in a non-handover scenario.

[0042] Optionally, the fourth message may be a mobility registration updating (MRU) message sent by the terminal device through the first network device.

[0043] In conjunction with the second aspect, in one possible implementation, the first network element may include a first access and mobility management function network element.

[0044] In conjunction with the second aspect, in one possible implementation, the first network element may include a unified database network element. It should be understood that this implementation is applicable to situations where the first access and mobility management function network element and the first session management function network element cannot communicate directly (e.g., no interface exists).

[0045] Optionally, if the first network element includes a unified database network element, the first message may be generated by the unified database network element based on a mobility information notification message sent by the first access and mobility management function network element. For example, the mobility information notification message may include at least one of the following: the fifth identification information of the terminal device, the first identification information of the first network device, and a radio access network replacement indication of the terminal device.

[0046] Furthermore, the first access and mobility management function network element sends a mobility information notification message to the unified database network element if the third condition is met. The specific details of the third condition are described above and will not be repeated here.

[0047] Furthermore, before sending the first message, the unified database network element can also determine that the first session is active.

[0048] Thirdly, this application provides a communication method. This method can be executed by a first network device or by a component of the first network device (e.g., a processor, chip, or chip system). The method includes: the first network device obtaining the terminal device context of a terminal device. The terminal device context includes third identification information of a first session of the terminal device and fourth identification information of a first session management function network element, which manages the first session. The first network device sends a first message to the first session management function network element. This first message requests an update to the first session, and includes the first identification information of the first network device. Here, the first network device is the network device currently accessed by the terminal device, and the first network device is directly connected to the first session management function network element.

[0049] In the above implementation, the first network device sends a first message to the first session management function network element according to the terminal device context of the terminal device to request the first session management function network element to update the first session. This can avoid some invalid operations that the first session management function network element may perform due to the failure to update the session context of the first session in a timely manner.

[0050] Furthermore, this first message can be used by the first session management function network element to update the target session context of the aforementioned first session, so that the updated target session context does not include the second identification information of the second network device. Here, the second network device is the anchor network device of the terminal device, and the second network device is directly connected to the first session management function network element.

[0051] In the above implementation, the first message enables the first session management function network element to update its stored target session context, and the updated target session context no longer contains the identification information of the anchor network device of the terminal device. This prevents the first session management function network element from interacting with the anchor network device, thereby reducing the waste of communication resources caused by invalid interactions.

[0052] In conjunction with the third aspect, in one possible implementation, the first network device obtaining the terminal device context of the terminal device may include: the first network device sending a fifth message to a first network element. This fifth message is used to request the terminal device context of the terminal device. The first network device may receive a sixth message from the first network element. This sixth message includes the terminal device context of the terminal device. The first network element is used to store the terminal device context of the terminal device or to be responsible for the access management of the terminal device.

[0053] Optionally, the fifth message can be a mobile registration update message for the terminal device.

[0054] In the above implementation, the first network device will actively request the terminal device context of the terminal device from the first network element, which can ensure the timeliness and reliability of obtaining the terminal device context.

[0055] In conjunction with the third aspect, in one possible implementation, the first network device may send a fifth message to the first network element if the RRC connection of the terminal device fails to be restored. Alternatively, the first network device may send a fifth message to the first network element after an RRC connection has been established between it and the terminal device.

[0056] Optionally, the first network device may determine that the terminal device's RRC connection recovery has failed based on the target RRC message provided by the terminal device. This target RRC message may include an RRC connection recovery failure indication from the terminal device and a mobile registration update message from the terminal device.

[0057] In conjunction with the third aspect, in one possible implementation, the terminal device context of the terminal device can be provided to the first network element by the second network device.

[0058] Optionally, the terminal device context of the terminal device may be sent by the second network device to the first network element when it is determined that the terminal device has entered the RRC inactive state.

[0059] In conjunction with the third aspect, in one possible implementation, the first network element may include a first access and mobility management function network element or a unified database network element.

[0060] In conjunction with the third aspect, in one possible implementation, when the first network element is a first access and mobility management function (MLM) network element, the terminal device context of the terminal device can be proactively pushed to the first network device by the first MLM network element. For example, after receiving a mobility registration update message from the terminal device, the first MLM network element can proactively send the terminal device context of the terminal device to the first network device.

[0061] In conjunction with the third aspect, in one possible implementation, the first network device obtaining the terminal device context of the terminal device may include: if the RRC connection of the terminal device is successfully restored, the first network device sends a retrieveUEcontext request to the second network device. Here, the second network device is the anchor network device of the terminal device. The first network device receives a retrieveUEcontext response from the second network device. This retrieval response includes the terminal device context of the terminal device.

[0062] Optionally, the context retrieval request may include the fifth identification information of the terminal device.

[0063] In conjunction with the third aspect, in one possible implementation, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may also include a session modification indication for the first session or a session modification message for the first session.

[0064] In conjunction with the third aspect, in one possible implementation, the first session is in an active state.

[0065] In conjunction with the third aspect, in one possible implementation, the method may further include: the first network device sending an eighth message to the second session management function network element. This eighth message requests the second session management function network element to update the session context of the second session, and the updated session context of the second session does not contain the second identification information of the second network device. The eighth message includes the sixth identification information of the second session.

[0066] Furthermore, the eighth message may also include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the eighth message may also include a session modification indication corresponding to the second session or a session modification message for the second session.

[0067] In conjunction with the third aspect, in one possible implementation, the second session is in an active state.

[0068] Fourthly, this application provides a communication method. This method can be executed by a terminal device or by a component of the terminal device (e.g., a processor, chip, or chip system). The method includes: in the event of a Radio Resource Control (RRC) connection recovery failure, the terminal device sends a fourth message to a first network device. The fourth message can be used to update the location information of the terminal device, where the first network device is the network device currently connected to by the terminal device, and the first network device is directly connected to a first session management function network element. The terminal device also sends a seventh message to the first network device. This seventh message can be used to request an update to the terminal device's first session, and the seventh message includes third identification information of the first session, which is managed by the first session management function network element.

[0069] In the above implementation, if the terminal device fails to restore the Radio Resource Control (RRC) connection, it will proactively send a seventh message to the first network device to prompt or trigger the update of the terminal device's first session. This can avoid some invalid operations that may occur due to the failure to update the first session in a timely manner.

[0070] Furthermore, this seventh message can be used to cause the first network device to send a first message to the first session management function network element. This first message can be used by the first session management function network element to update the target session context of the first session, so that the updated target session context does not include the second identification information of the second network device. Here, the second network device is the anchor network device of the terminal device, and the second network device is directly connected to the first session management function network element.

[0071] In the above implementation, the first message enables the first session management function network element to update its stored target session context, and the updated target session context no longer contains the identification information of the anchor network device of the terminal device. This prevents the first session management function network element from interacting with the anchor network device, thereby reducing the waste of communication resources caused by invalid interactions.

[0072] In conjunction with the fourth aspect, in one possible implementation, the first session can be in an active state.

[0073] In conjunction with the fourth aspect, in one possible implementation, the seventh message may also include a session modification instruction corresponding to the first session.

[0074] In conjunction with the fourth aspect, in one possible implementation, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may further include a session modification indication corresponding to the first session or a session modification message for the first session.

[0075] In conjunction with the fourth aspect, in one possible implementation, the seventh message may further include the sixth identification information of the second session of the terminal device. It should be understood that this second session can be managed by a second session management function network element other than the first session management function network element. Optionally, the seventh message may also include a session modification indication for the second session or a session modification message corresponding to the second session.

[0076] Alternatively, the terminal device may send a twelfth message to the first network device. This twelfth message requests an update to the terminal device's second session. The twelfth message includes the sixth identification information of the second session, which is managed by a second session management function network element other than the first session management function network element. Optionally, the twelfth message may also include a session modification indication for the second session or a session modification message corresponding to the second session.

[0077] Here, the first network device, the second network device, and the second session management function network element are also directly connected.

[0078] In this scenario, the first network device will also send an eighth message to the second session management function network element. This eighth message requests the second session management function network element to update the session context of the second session, and the updated session context of the second session will not contain the second identification information of the second network device. The eighth message includes the sixth identification information of the second session.

[0079] Furthermore, the eighth message may also include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may also include a session modification indication corresponding to the second session or a session modification message for the second session.

[0080] Fifthly, this application provides a communication method. This method can be executed by a first network device or by a component of the first network device (e.g., a processor, chip, or chip system). The method includes: the first network device receiving a fourth message sent by a terminal device in the event of an RRC connection recovery failure. The fourth message can be used to update the location information of the terminal device, the first network device being the network device currently accessed by the terminal device, and the first network device being directly connected to a first session management function network element. The first network device receives a seventh message from the terminal device. The seventh message can be used to request an update of the terminal device's first session, and includes third identification information of the first session, which is managed by the first session management function network element. The first network device sends a first message to the first session management function network element, wherein the first message can be used to request an update of the first session and includes first identification information of the first network device.

[0081] In the above implementation, the first network device will send a first message to the first session management function network element to request the update of the first session based on the seventh message sent by the terminal device. This can avoid some invalid operations that may occur in the first session management function network element due to the first session not being updated in time.

[0082] In conjunction with the fifth aspect, in one possible implementation, the seventh message may also include a session modification instruction corresponding to the first session.

[0083] In conjunction with the fifth aspect, in one possible implementation, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may further include a session modification indication or a session modification message corresponding to the first session.

[0084] In conjunction with the fifth aspect, in one possible implementation, the first network device may send a ninth message to a unified database network element or a network function repository function (NRF) network element. This ninth message may include third identification information of the first session. The first network device may receive a tenth message from the unified database network element or the NRF network element, wherein the tenth message includes fourth identification information of the first session management function network element that manages the first session.

[0085] In conjunction with the fifth aspect, in one possible implementation, the seventh message also includes the fourth identification information of the first session management function network element.

[0086] In conjunction with the fifth aspect, in one possible implementation, the first network device may receive an eleventh message from a first access and mobility management function network element. This eleventh message includes identification information for multiple sessions and identification information for multiple session management function network elements managing these multiple sessions. It should be understood that these multiple sessions include at least the first session, and the identification information of the multiple session management function network elements includes fourth identification information for at least the first session management function network element managing the first session. The first network device obtains the fourth identification information based on the eleventh message.

[0087] In conjunction with the fifth aspect, in one possible implementation, the seventh message may also include the sixth identification information of the second session of the terminal device. It should be understood that the second session can be managed by a second session management function network element other than the first session management function network element, and the first network device is also directly connected to this second session management function network element.

[0088] Alternatively, the first network device may receive a twelfth message from the terminal device, which can be used to request an update to the terminal device's second session. The twelfth message includes the sixth identification information of the second session. The second session is managed by the second session management function network element, and the first network device is also directly connected to the second session management function network element.

[0089] In this scenario, the method may further include: the first network device sending an eighth message to the second session management function network element. This eighth message requests the second session management function network element to update the session context of the second session, and the updated session context of the second session does not contain the second identification information of the second network device. The eighth message includes the sixth identification information of the second session. Further, the eighth message may also include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the eighth message may also include a session modification indication or a session modification message corresponding to the second session.

[0090] Optionally, in this case, the seventh message may also include a session modification instruction for the second session or a session modification message corresponding to the second session.

[0091] In conjunction with the fifth aspect, in one possible implementation, the ninth message may further include the sixth identification information of the second session. The tenth message may further include the seventh identification information of the second session management function network element that manages the second session.

[0092] In conjunction with the fifth aspect, in one possible implementation, the seventh message may also include the seventh identification information of the second session management function network element.

[0093] In conjunction with the fifth aspect, in one possible implementation, the multiple sessions in the eleventh message also include a second session, and the identification information of the multiple session management function network elements may also include the seventh identification information of the second session management function network element.

[0094] Sixthly, this application provides a communication method. This method can be executed by a terminal device or by a component of the terminal device (e.g., a processor, chip, or chip system). The method includes: acquiring target information. The target information includes tracking area information of a second network device, which is the anchor network device of the terminal device. Sending the target information to a first network device. The first network device is the network device currently accessed by the terminal device, and the tracking area information in the target information can be used to enable the first network device to obtain the terminal device context of the terminal device.

[0095] In the above implementation, the terminal device proactively provides the tracking area information of the anchor network device to the first network device currently accessing the network. Even when RRC connection restoration is required and the terminal device has undergone a radio access network change, and the first network device cannot directly obtain the terminal device context from the anchor network device, it can still obtain the terminal device context through this tracking area information. This avoids RRC connection restoration failure caused by the first network device's inability to obtain the terminal device context. Using this method improves the success rate of RRC connection restoration for the terminal device, thereby reducing the impact of RRC connection restoration failures.

[0096] In conjunction with the sixth aspect, in one possible implementation, the target information can be the inactive radio network temporary identifier (I-RNTI) of the terminal device.

[0097] In conjunction with the sixth aspect, in one possible implementation, the target information may also include the fifth identification information of the terminal device and the second identification information of the second network device.

[0098] In conjunction with the sixth aspect, in one possible implementation, the target information can be carried in an RRC connection recovery request sent by the terminal device to the first network device.

[0099] In a seventh aspect, this application provides a communication method. This method can be executed by a first access and mobility management function (AM) network element, or by a component (e.g., a processor, chip, or chip system) within the first AM AM network element. The method includes: the first AM AM network element receiving target information from a first network device. The target information may include tracking area information from a second network device, where the first network device is the network device currently accessed by the terminal device, and the second network device is the anchor network device of the terminal device. The first AM AM network element obtains the terminal device context of the terminal device based on the tracking area information and sends the obtained terminal device context to the first network device.

[0100] In the above implementation, the first access and mobility management function (AMU) network element obtains the terminal device context of the terminal device based on the tracking area information of the anchor network device provided by the first network device, and provides it to the first network device. Using this method, even when the first network device cannot directly obtain the terminal device context of the terminal device from the anchor network device, it can still obtain the terminal device context of the terminal device through the first AMU network element, thus avoiding RRC connection recovery failure caused by the first network device's inability to obtain the terminal device context.

[0101] In conjunction with the seventh aspect, in one possible implementation, the first access and mobility management network element obtaining the terminal device context of the terminal device based on the tracking area information may include: if the first tracking area information range corresponding to the first access and mobility management function network element includes the tracking area information, or if the first access and mobility management function network element manages the second network device, the first access and mobility management function network element may send a terminal device context retrieval request to the second network device. This context retrieval request may include the aforementioned target information. The first access and mobility management function network element may receive a context retrieval response from the second network device. This context retrieval response may include the terminal device context of the terminal device.

[0102] It is understood that the terminal context of the terminal device can be determined by the second network device based on the target information. For example, the target information may also include the fifth identification information of the terminal device. The second network device can query the terminal device context of the terminal device based on this fifth identification information.

[0103] In conjunction with the seventh aspect, in one possible implementation, the first access and mobility management network element obtaining the terminal device context of the terminal device based on the tracking area information may further include: when the range of the first tracking area information corresponding to the first access and mobility management function network element does not include tracking area information, or in other words, when the first access and mobility management function network element does not manage the second network device, the first access and mobility management function network element may send target information to the second access and mobility management function network element. Here, the range of the second tracking area information corresponding to the second access and mobility management function network element includes the tracking area information in the target information. Alternatively, the second access and mobility management function network element manages the second network device. The first access and mobility management function network element may receive the terminal device context from the second access and mobility management function network element.

[0104] In conjunction with the seventh aspect, in one possible implementation, the target information can be the I-RNTI of the terminal device.

[0105] In conjunction with the seventh aspect, in one possible implementation, the target information may also include the fifth identification information of the terminal device and the second identification information of the second network device.

[0106] Eighthly, this application provides a communication method. This method can be executed by a first network device or by a component of the first network device (e.g., a processor, chip, or chip system). The method includes: the first network device receiving target information from a terminal device. The target information may include tracking area information from a second network device. Here, the first network device is the network device currently accessed by the terminal device, and the second network device is the anchor network device of the terminal device. The first network device sends the target information to a first access and mobility management function (AM) network element. The first network device may receive terminal device context from the first AM AM network element. It should be understood that the terminal device context of the terminal device can be obtained by the first AM AM network element based on the target information.

[0107] In the above implementation, the first network device provides the tracking area information of the anchor network device provided by the terminal device to the first access and mobility management function (AMU) network element, so that the AMU network element can provide the terminal device context of the terminal device. Using this method, even if the first network device cannot directly obtain the terminal device context from the anchor network device, it can still obtain the terminal device context through the first AMU network element, thus avoiding RRC connection recovery failure caused by the first network device's inability to obtain the terminal device context.

[0108] In conjunction with aspect eight, in one possible implementation, the first network device may send the aforementioned target information to the first access and mobility management function network element when it is unable to directly obtain the terminal device context from the second network device. It should be understood that sending the target information only when it is impossible to obtain it directly from the second network device avoids repeatedly obtaining the terminal device context and saves communication resources.

[0109] In conjunction with the eighth aspect, in one possible implementation, the target information can be the I-RNTI of the terminal device.

[0110] In conjunction with the eighth aspect, in one possible implementation, the target information may also include the fifth identification information of the terminal device and the second identification information of the second network device.

[0111] Ninthly, this application provides a communication device comprising modules or units for performing the methods provided by any one of the first to eighth aspects or any possible implementation thereof.

[0112] In a tenth aspect, this application provides a computer program product including instructions that, when executed on a computer, cause the computer to perform the communication method provided by any one of the first to eighth aspects or any possible implementation thereof.

[0113] In one aspect, this application provides a computer-readable storage medium storing a computer program that, when executed, performs the communication method provided by any one of the first to eighth aspects or any possible implementation thereof.

[0114] In a twelfth aspect, this application provides a communication device, at least one processor, and a memory. The memory is used to store a computer program. The processor is used to execute the computer program stored in the memory, causing the communication device to perform the communication method provided by any one of the first to eighth aspects or any possible implementation thereof.

[0115] Optionally, the memory may be integrated with the processor, or the memory may be separated from the processor.

[0116] It should be understood that related data interaction processes, such as sending information, can be seen as the process of outputting information from the processor, and receiving information can be seen as the process of the processor receiving information. Specifically, the data output by the processor can be sent to the transmitter, and the input data received by the processor can come from the receiver. The transmitter and receiver can be collectively referred to as a transceiver.

[0117] In a thirteenth aspect, this application provides a chip that includes at least a processor. The processor executes computer execution instructions to cause a device on which the chip is mounted to perform the communication method provided by any one of the first to eighth aspects or any possible implementation thereof.

[0118] In conjunction with aspect thirteen, in one possible implementation, the chip may also include interface circuitry. This interface circuitry is used to receive computer execution instructions and transmit them to the processor.

[0119] In a fourteenth aspect, this application provides a communication system. This communication system may include the terminal device, first network device, second network device, first network element, and first session management function network element described above.

[0120] Optionally, the communication system may also include a second session management function network element.

[0121] It should be understood that the communication method provided by any one of the first to fifth aspects above, or any possible implementation of any one aspect, is applicable to this communication system.

[0122] In a fifteenth aspect, this application provides a communication system. This communication system may include the terminal device, first network device, second network device, and first access and mobility management function network element described above.

[0123] Optionally, the communication system may also include a second access and mobility management function network element.

[0124] It should be understood that the communication method provided by any of the sixth to eighth aspects above, or any possible implementation thereof, is applicable to the communication system. Attached Figure Description

[0125] Figure 1 is a schematic diagram of a network architecture provided in this application;

[0126] Figure 2 is a schematic diagram of the structure of a communication system provided in this application;

[0127] Figure 3 is a schematic diagram of another communication system provided in this application;

[0128] Figure 4 is a flowchart illustrating a communication method provided in this application;

[0129] Figure 5 is another flowchart illustrating a communication method provided in this application;

[0130] Figure 6 is another flowchart illustrating a communication method provided in this application;

[0131] Figure 7 is another flowchart illustrating a communication method provided in this application;

[0132] Figure 8 is another flowchart illustrating a communication method provided in this application;

[0133] Figure 9 is another flowchart illustrating a communication method provided in this application;

[0134] Figure 10 is another flowchart illustrating a communication method provided in this application;

[0135] Figure 11 is another flowchart illustrating a communication method provided in this application;

[0136] Figure 12 is another flowchart illustrating a communication method provided in this application;

[0137] Figure 13 is a schematic diagram of the structure of a communication device provided in this application;

[0138] Figure 14 is a schematic diagram of another communication device provided in this application. Detailed Implementation

[0139] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0140] It should be understood that the technical solutions provided in this application can be applied to various communication systems, such as: Long Term Evolution (LTE) systems, LTE Frequency Division Duplex (FDD) systems, LTE Time Division Duplex (TDD) systems, Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) communication systems, 5th Generation (5G) systems, or New Radio (NR). In addition, they can also be applied to subsequent evolution systems, such as 6th Generation communication systems, or even more advanced 7th Generation communication systems.

[0141] Please refer to Figure 1, which is a schematic diagram of a network architecture provided in this application. It should be understood that the network architecture shown in Figure 1 can be referred to as a network architecture where access network equipment and session management function network elements are directly connected. As shown in Figure 1, this network architecture may include three parts: user equipment (UE) 10, access network (AN) equipment, and core network (CN). The access network equipment is mainly used to implement functions related to the radio access of UE 10, and may include the RAN equipment 11 shown in Figure 1 and other equipment that may access via the air interface. The core network mainly includes one or more of the following: user plane function (UPF) network element 12, data network (DN) 13, session management function network element 14, registration function network element 15, policy control function (PCF) network element 16, short message service function (SMSF) network element 17, selection function network element 18, identity storage function network element 19, and unified data management (UDM) network element 20. It should be understood that interfaces exist between network elements to achieve distributed connectivity. For example, this network architecture can be a network architecture after introducing RAN services, in which case the interfaces between RAN device 11 and each network element can all be service-oriented interfaces.

[0142] To facilitate understanding of the functions of this network architecture, the functions of each network element will be briefly explained below.

[0143] User plane function element 12 is primarily responsible for processing user packets, such as forwarding and charging. It can serve as the anchor point for Protocol Data Unit (PDU) session connections, i.e., as a PDU session anchor (PSA). It is responsible for filtering UE10 data packets, data transmission or forwarding, rate control, generating charging information, handling Quality of Service (QoS) for user plane sessions, uplink authentication, transmission level verification, downlink packet buffering, and triggering downlink data notifications. User plane function element 12 can also serve as a branch point for multi-homed PDU sessions.

[0144] Data network 13 provides data transmission services to users, such as Internet Protocol (IP), IP Multimedia Service (IMS), and the Internet. Data network 13 may include an application server (AS), a software framework that provides an environment for applications to run, offering services such as security, data and transaction support, load balancing, and large-scale distributed system management. Terminal devices obtain application messages by communicating with the application server.

[0145] Session management function network element 14 is primarily responsible for all control plane functions of session management for terminal devices, including the selection and control of user plane function network element 12, IP address allocation and management, session QoS management, and obtaining policy and charging control (PCC) policies from policy control function network element 16. Session management function network element 14 also serves as the endpoint for the session management portion of non-access stratum (NAS) messages.

[0146] The registration function network element 15 can be used to provide access and authentication functions for UE10 (or user). For example, the registration function network element 15 may include access and mobility management function network element 151.

[0147] The policy control function network element 16 has the function of providing policy rules to the control plane function entity.

[0148] The SMS service function network element 17 is responsible for handling SMS services in the network, such as SMS registration and cancellation, SMS forwarding, and SMS call caching.

[0149] The selection function network element 18 can be used to select a core network element for UE 10. Specifically, core network elements in the network can register with the selection function network element 18, and then the selection function network element 18 can select a target core network element for UE 10 from the registered core network elements. The selection function network element 18 can also obtain the subscription data of UE 10 from the unified data management network element 20, and then select a target core network element for terminal device 10 based on the core network element registration information and the subscription data. For example, the selection function network element 18 may include a network function repository function (NFR) network element 181.

[0150] The identifier storage function network element 19 can be used to store the correspondence between the temporary identifier and the permanent identifier of UE10. After the network function registration function network element 181 obtains the correspondence between the temporary identifier and the permanent identifier of UE10, it can store the correspondence between the temporary identifier and the permanent identifier of UE10 in the identifier storage function network element 19. For example, the identifier storage function network element 19 can be a unified database network element 191.

[0151] The unified data management network element 20 is mainly responsible for the subscription data management of UE10, including the storage and management of UE10's identifier, access authorization of UE10, etc.

[0152] It should be noted that the naming of network elements in the core network in this application embodiment is exemplary and not limiting. As technology evolves, entities with the corresponding functions of each network element may adopt other naming methods, and no specific restrictions are imposed on this. For example, access and mobility management network elements may be named access management function network element, mobility management function network element, registration management function network element, etc.

[0153] It should be understood that the radio access network provided in this application can be a cellular system related to the 3rd Generation Partnership Project (3GPP), such as 4G, 5G mobile communication systems, or future-oriented evolution systems. The radio access network can also be an open RAN (O-RAN or ORAN), a cloud radio access network (CRAN), or a wireless fidelity (WiFi) system. Alternatively, the radio access network can also be a communication system that integrates two or more of the above systems.

[0154] It should be understood that in the embodiments of this application, the wireless access network device may sometimes be referred to as a RAN node, access network device, network device, RAN entity, or access node, etc. For ease of understanding, the embodiments of this application will uniformly use "network device" to describe it. In actual work, network devices are mainly used to help terminal devices achieve wireless access.

[0155] In one possible scenario, the network device can be a base station, an evolved NodeB (eNodeB), an access point (AP), a transmission reception point (TRP), a next-generation NodeB (gNB), a base station in a future mobile communication system, or an access node in a WiFi system. Optionally, the network device can also be a macro base station, a micro base station, an indoor station, a relay node, or a donor node. Optionally, the network device can also be a server, a wearable device, a vehicle, or an in-vehicle device. For example, the access network device in vehicle-to-everything (V2X) technology can be a roadside unit (RSU). All or part of the functions of the network device in this application can also be implemented through software functions running on hardware, or through virtualization functions instantiated on a platform (e.g., a cloud platform). The network device can also be equipped with communication modules, circuits, or chips that perform corresponding communication functions. The network device can also be configured with program instructions for performing corresponding communication functions and corresponding program instructions. The network device in this application may also be a logical node, logical module, or software that can implement all or part of the functions of a network device.

[0156] In another possible scenario, multiple network devices can collaborate to assist the terminal in achieving wireless access, with each network device performing a portion of the base station's functions. For example, the network devices can be a central unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU). The CU and DU can be configured separately or included in the same network element, such as a baseband unit (BBU). The RU can be included in radio equipment or radio units, such as a remote radio unit (RRU), an active antenna unit (AAU), or a remote radio head (RRH).

[0157] In different systems, CU (or CU-CP and CU-UP), DU, or RU may have different names, but those skilled in the art will understand their meaning. For example, in an ORAN system, CU can also be called O-CU (open CU), DU can also be called O-DU, CU-CP can also be called O-CU-CP, CU-UP can also be called O-CU-UP, and RU can also be called O-RU. For ease of description, this application uses CU, CU-CP, CU-UP, DU, and RU as examples. Any of the units among CU (or CU-CP, CU-UP), DU, and RU in this application can be implemented through software modules, hardware modules, or a combination of software and hardware modules.

[0158] It should be understood that in the embodiments of this application, the terminal device can be a device or module with corresponding communication functions. The terminal device can also be called a terminal, user equipment, mobile station, mobile terminal, etc. Terminals can be widely used in various scenarios, such as device-to-device (D2D), V2X communication, machine-type communication (MTC), Internet of Things (IoT), virtual reality, augmented reality, industrial control, autonomous driving, telemedicine, smart grids, smart furniture, smart offices, smart wearables, smart transportation, smart cities, etc. Terminals can be mobile phones, tablets, computers with wireless transceiver capabilities, wearable devices, vehicles, drones, helicopters, airplanes, ships, robots, robotic arms, smart home devices, transportation vehicles with wireless communication capabilities, communication modules, etc. It should be understood that the embodiments of this application do not limit the device form of the terminal device. In addition, the terminal device typically contains a communication module, circuit, or chip that performs the corresponding communication function. The terminal device can also be configured with program instructions for performing the corresponding communication function.

[0159] The preceding text has provided a brief description of the network architecture applicable to the method provided in this application. The following will describe the structures of various communication systems applicable to the embodiments of this application. It should be understood that the various communication systems applicable to the embodiments of this application can adopt the network architecture shown in Figure 1.

[0160] Please refer to Figure 2, which is a schematic diagram of the structure of a communication system provided in this application, applicable to the communication method provided in this application. As shown in Figure 2, the communication system may include a terminal device, a first network device and a second network device on the radio access network side, and a first session management function network element and a first network element on the core network side. In the embodiments of this application, the first network element refers to a terminal device context used to store the terminal device or a core network element responsible for the access management of the terminal device. For example, the first network element may be an access and mobility management function network element or a unified database network element, etc.

[0161] Optionally, as shown in Figure 2, the communication system may also include a second session management function network element.

[0162] The terminal device, the first network device, the second network device, the first session management function network element, and the possible second session management function network element can work together to implement the various steps of the communication method provided in this application. For specific implementation details, please refer to the corresponding description below.

[0163] Please refer to Figure 3, which is a schematic diagram of another communication system provided in this application, and is also applicable to the communication method provided in this application. As shown in Figure 3, the communication system may include a terminal device, a first network device and a second network device on the radio access network side, and a first access and mobility management function network element on the core network side.

[0164] Optionally, as shown in Figure 3, the communication system may also include a second access and mobility management function network element.

[0165] The terminal device, the first network device, the second network device, the first access and mobility management function network element, and the possible second access and mobility management function network element can work together to implement the various steps of the communication method provided in this application. For specific implementation details, please refer to the corresponding description below.

[0166] It should be understood that in the embodiments of this application, the communication systems shown in Figure 2 or Figure 3 are implemented based on the network architecture shown in Figure 1.

[0167] The preceding text has described the network architecture and communication system structure to which the communication method provided in this application is applicable, based on Figures 1-3. The following text will describe in detail the implementation process of the communication method provided in this application, in conjunction with the network architecture and communication system structure shown in Figures 1-3.

[0168] To facilitate understanding, several concepts involved in the embodiments of this application will be briefly explained first.

[0169] 1. RRC connection restoration of terminal devices (RRC Resume)

[0170] In 5G networks, terminal devices are introduced to a new state called RRC inactive state. RRC inactive state can be considered an intermediate state between RRC connected state and RRC idle state. Typically, when a terminal device moves out of the coverage area of ​​its currently connected network device and into the coverage area of ​​a new network device, if the terminal device has not established a connection with this new network device, it will enter the RRC inactive state. For terminal devices in the RRC inactive state, both the radio access network (RAN) and the core network maintain the connection for the terminal device, and both RAN and core networks save the terminal device's context so that when the terminal device needs to restore the connection due to uplink requirements, it can quickly establish a communication channel with the core network.

[0171] In this embodiment, RRC connection recovery of the terminal device refers to the transition process from RRC inactive state to RRC connected state triggered by the terminal device. Generally, this process may include: (1) When the terminal device is in RRC inactive, it may trigger the need for RRC connection recovery due to receiving instructions from the network device or needing to send data itself. (2) The terminal device sends an RRC connection recovery request to the network device to request recovery to the RRC connected state. This RRC connection recovery request usually includes the identity information of the terminal device and necessary context information. (3) After receiving the RRC connection recovery request, the network device will perform operations such as verifying the identity of the terminal device and checking the network resource status. If the network device determines that all conditions are met, it will inform the terminal device that the RRC connection recovery is successful through an RRC connection recovery response and re-establish the RRC connection with the terminal device. If a network device detects insufficient resources, security issues, or other technical failures, it will send an RRC Resume failure response to the terminal device to indicate that the RRC connection recovery has failed. The network device may also request the terminal device to retry the RRC connection recovery or take other appropriate measures.

[0172] As can be seen from the communication system structure shown in Figure 2 or Figure 3, in this embodiment, the RRC connection recovery of the terminal device can specifically be an RRC connection recovery requested by the terminal device from the first network device. If the first network device is unable to obtain the terminal device context for some reason, the RRC connection recovery will fail.

[0173] 2. Radio Access Network (RAN) Change

[0174] In this embodiment, wireless access network (WLAN) replacement refers to the process by which a terminal device disconnects from an old network device and connects to a new network device due to movement or other reasons. Referring to the communication system shown in Figure 2 or Figure 3, the first network device and the second network device belong to different access networks. As the terminal device moves, it moves from the coverage area of ​​the second network device to the coverage area of ​​the first network device. Therefore, the network device accessed by the terminal device is changed from the second network device to the first network device, i.e., the terminal device undergoes WLAN replacement. In this case, the second network device can also be referred to as the anchor network device of the terminal device. It should be understood that in this embodiment, the anchor network device can be understood as a network device that stores the control plane connection between the WLAN side and the core network side of the terminal device in the RRC inactive state. Alternatively, the anchor network device can be a WLAN device that stores the terminal device context when the terminal device is in the RRC inactive state. Alternatively, the anchor network device can be the WLAN device of the terminal device stored in the control plane network element of the core network side when the terminal device is in the RRC inactive state. It should also be understood that after the wireless access network replacement is completed, the anchor network device of the terminal device will be changed from the second network device to the first network device.

[0175] 3. Direct connection of network devices and session management functions to network elements

[0176] It should be understood that in the network architecture to which the communication method provided in this application embodiment applies, network devices and session management function network elements can be directly connected. For example, RAN device 11 and session management function network element 14 in Figure 1 are directly connected. Direct connection between network devices and session management function network elements can be understood as the ability for direct communication between them. For instance, directly connected network devices and session management function network elements can directly transmit messages or signaling through the NG interface (i.e., the interface between the radio access network and the 5G core network) or a service-oriented interface.

[0177] Correspondingly, "not directly connected between network devices and session management function network elements" means that network devices and session management function network elements cannot communicate directly and need to communicate indirectly through other network elements. For example, network devices and session management function network elements can communicate indirectly through access and mobility management function network elements.

[0178] Referring to the communication system shown in Figure 2, in this embodiment of the application, the first network device and the first session management function network element are directly connected. Similarly, the second network device and the first session management function network element are also directly connected.

[0179] Currently, terminal devices in an inactive RRC state can move freely and connect to other RAN devices besides the anchor network device, meaning the terminal device will experience a radio access network change. Existing RRC connection recovery schemes only apply to communication system architectures where the RAN device and session management function network element are not directly connected. For communication system architectures where the RAN device and session management function network element are directly connected, there are no clear regulations on how to restore RRC connections when a terminal device in an inactive RRC state experiences a radio access network change. This results in the session management function network element still interacting with the anchor network device after a RAN change, leading to a waste of communication resources.

[0180] Therefore, the technical problem to be solved by this application is: in scenarios where RRC connection restoration is required and the terminal device undergoes a change of radio access network, how to avoid invalid interaction between the session management function network element and the anchor network device, thereby reducing the waste of communication resources.

[0181] To address the aforementioned issues, this application provides a communication method. In this method, a first session management function network element receives a first message indicating a radio access network (RAN) change for the terminal device, and updates the target session context of the first session so that the updated target session context no longer contains the identification information of the anchor network device of the terminal device. This prevents the first session management function network element from interacting with the anchor network device of the terminal device. Therefore, using this method during the RRC connection recovery process can resolve the problem of invalid interaction between the session management function network element and the anchor network device caused by a RAN change for the terminal device, reducing the waste of communication resources.

[0182] Please refer to Figure 4, which is a flowchart illustrating a communication method provided in this application. It should be understood that the communication method shown in Figure 4 is applicable to the communication system shown in Figure 2 above. As shown in Figure 4, the method includes the following steps:

[0183] S415, the first network element sends the first message to the first session management function network element. Correspondingly, the first session management function network element receives the first message.

[0184] In some feasible implementations, the first network element can send a first message to the first session management function network element. This first message can be used to indicate that the terminal device has undergone a radio access network (RAN) change, and includes at least one of the following: first identification information of the first network device and a RAN change indication for the terminal device. Here, the first network device is the network device currently accessed by the terminal device, and the first network device is directly connected to the first session management function network element. It should be understood that the RAN change indication for the terminal device is information that can be directly used to indicate that the terminal device has undergone a RAN change, such as a RAN change notification. This first message can be used by the first session management function network element to update the target session context of the first session, so that the updated target session context no longer includes the second identification information of the second network device. Here, the second network device is the anchor network device of the terminal device that has undergone a RAN change, and the second network device is also directly connected to the first session management function network element. In this embodiment, the first network element can be used to store the terminal device context of the terminal device or to be responsible for the access management of the terminal device.

[0185] It should be noted that, in the embodiments of this application, the first network element can be implemented in various ways. The following will describe in detail the specific implementation process of step S415 in conjunction with the different implementation methods of the first network element.

[0186] Implementation method 1 for the first network element:

[0187] In one possible implementation, the first network element can be a first access and mobility management function network element. It is understood that this implementation is suitable for situations where the first session management function network element and the first access and mobility management function network element can communicate directly (e.g., there is an interface between them).

[0188] In this implementation, the first network element can send a first message to the first session management function network element when a preset third condition is met. Here, the third condition may include at least one of the following: receiving a fourth message from the first network device and the fourth message being used to update the location information of the terminal device; determining that the terminal device has undergone a radio access network change in the case of non-RRC connection recovery; or determining that the terminal device has undergone a radio access network change in a non-handover scenario.

[0189] In other words, if the first access and mobility management function (MLM) network element receives a fourth message from the first network device and determines that the fourth message is used to update the location information of the terminal device, it will send a first message to the first session management function (SMM) network element. Alternatively, if the first MLM network element determines that the terminal device has undergone a radio access network (RAN) change in a non-RRC connection recovery scenario, it will send a first message to the first SSM network element. Alternatively, if the first MLM network element determines that the terminal device has undergone a RAN change in a non-handover scenario, it will send a first message to the first SSM network element. Alternatively, if the first MLM network element determines that two or three of the above third conditions have occurred, it will send a first message to the first SSM network element.

[0190] It should be understood that the description of the third condition here is merely exemplary. In actual implementation, the third condition may also include other possible implementation methods, and this application does not impose any specific restrictions on this.

[0191] Method 2 for implementing the first network element:

[0192] In one possible implementation, the first network element may include a unified database network element. It is understood that this implementation is suitable for situations where the first session management function network element and the first access and mobility management function network element cannot communicate directly (e.g., there is no interface between them).

[0193] In this implementation, the first message can be generated by the first network element and sent to the first session management function network element.

[0194] Optionally, the first message may be generated and sent by the unified database network element based on the mobile information notification message sent by the first access and mobility management function network element.

[0195] Specifically, the first access and mobility management function network element can send a mobility information notification message to the unified database network element when it determines that the third condition mentioned above is met. This mobility information notification message is used to inform the terminal device that a radio access network change has occurred. Here, the specific content of the third condition can be found in the corresponding description in Implementation Method 1 above, and will not be repeated here.

[0196] For example, if the first access and mobility management function (MLM) network element receives a fourth message from the first network device and determines that the fourth message is used to update the location information of the terminal device, it will send a mobility information notification message to the unified database network element. Alternatively, if the first MLM network element determines that the terminal device has undergone a radio access network change in a non-RRC connection recovery scenario, it will send a mobility information notification message to the unified database network element. Alternatively, if the first MLM network element determines that the terminal device has undergone a radio access network change in a non-handover scenario, it will send a mobility information notification message to the unified database network element. Alternatively, if the first MLM network element determines that two or three of the third conditions have occurred, it will send the aforementioned mobility information notification message to the unified database network element.

[0197] Furthermore, once the unified database network element confirms that it has received a mobile information notification message from the first access and mobility management function network element, it can generate and send the aforementioned first message to the first session management function network element.

[0198] Optionally, in this embodiment, the unified database network element may only send the aforementioned first message to the session management function network element used to manage active sessions. For example, the first session management function network element sends a session status indication of the first session to the unified database network element. Then, if the unified database network element determines that the first session is active based on the session status indication of the first session, and also determines that it has received a mobility information notification message from the first access and mobility management function network element, it will send the aforementioned first message to the first session management function network element. Correspondingly, if the unified database network element determines that the first session is not active based on the session status indication of the first session, it will not send the aforementioned first message to the first session management function network element even if it receives a mobility information notification message from the first access and mobility management function network element. In other words, in this embodiment, the first session is an active session.

[0199] Optionally, the aforementioned mobile information notification message may include the fifth identification information of the terminal device, and at least one of the first identification information of the first network device mentioned above, and the wireless access network replacement instruction of the terminal device.

[0200] In the above implementation, the first message is provided by the terminal device context that stores the terminal device or the first network element responsible for the access management of the terminal, which enables the first session management function network element to update the target session context in a timely manner, thereby effectively avoiding invalid interaction between the first session management function network element and the second network device.

[0201] In one possible implementation, the fourth message can be a mobile registration update message (i.e., an MRU message) for the terminal device, or it can be any other message that can be used to indicate the update of the location information of the terminal device. This application does not limit the implementation of the fourth message.

[0202] For example, in one implementation of the first network element, the first access and mobility management function network element can send a first message to the first session management function network element upon receiving a mobile registration update message from the terminal device. In another implementation of the first network element, the first access and mobility management function network element can send a mobile information notification message to the unified database network element upon receiving a mobile registration update message from the terminal device, enabling the unified database network element to send a first message to the first session management function network element based on this mobile information notification message.

[0203] In one possible implementation, the aforementioned non-RRC connection recovery scenario can refer to scenarios other than RRC connection recovery triggered by the terminal device, such as a scenario where the terminal device's RRC connection recovery fails. In this scenario, the terminal device sends a mobile registration update message to the network device so that the network device can update and obtain the latest location information of the terminal device. In the embodiments of this application, non-RRC connection recovery can also be understood as RRC connection recovery failure.

[0204] In one possible implementation, the aforementioned non-handover scenario can refer to scenarios other than the terminal device sending an access network device handover message to the network device. For example, in the case of a terminal device sending a mobile registration update message to the network when the terminal device's RRC connection recovery fails.

[0205] For example, in implementation method one of the first network element, if the first access and mobility management function network element determines that the terminal device has undergone a radio access network change in a non-RRC connection recovery situation or a non-handover scenario, it can send a first message to the first session management function network element. In implementation method two of the first network element, if the first access and mobility management function network element determines that the terminal device has undergone a radio access network change in a non-RRC connection recovery situation or a non-handover scenario, it can send a mobility information notification message to the unified database network element.

[0206] In one possible implementation, the first message may further include the fifth identification information of the terminal device. In this case, the first message may specifically be a mobile information notification message for the terminal device.

[0207] S416, the first session management function network element updates the target session context according to the first message, and the updated target session context does not include the second identification information of the second network device.

[0208] In some feasible implementations, after receiving the first message, the first session management function network element can update the target session context according to the first message, so that the updated target session context does not include the second identification information of the second network device. Here, the target session context is the session context corresponding to the first session of the terminal device. The first session management function network element is used to manage the first session. The second network device is the anchor network device of the terminal device, and the second network device is directly connected to the first session management function network element. Before the terminal device undergoes a radio access network change, the terminal device connects to the second network device.

[0209] In one possible implementation, if the first message includes the first identification information of the first network device, the first session management function network element can replace the second identification information of the second network device in the target session context with the first identification information to obtain an updated target session context. That is, if the first session management function network element determines that the first message contains the first identification information of the first network device, it can replace the second identification information of the second network device in its stored target session context with the first identification information of the first network device, thereby ensuring that the updated target session context no longer contains the second identification information of the second network device. Alternatively, the first session management function network element updates the identification information of the access network device in the target session context, replacing the second identification information of the second network device with the first identification information to obtain an updated target session context.

[0210] In one possible implementation, if the first message includes a radio access network (RAN) change instruction for the terminal device, the first session management function network element can delete the second identification information of the second network device from the target session context to obtain an updated target session context. That is, if the first session management function network element determines that the first message contains a RAN change instruction for the terminal device, it can delete the second identification information of the second network device from its stored target session context, thereby ensuring that the updated target session context no longer contains the second identification information of the second network device.

[0211] In one possible implementation, when the first message includes both the first identification information of the first network device and the radio access network replacement instruction of the terminal device, the first session management function network element can replace the second identification information of the second network device in the target session context with the first identification information to obtain the updated target session context.

[0212] It should also be noted that, even if the first message includes a radio access network change instruction for the terminal device but does not include the first identification information of the first network device, the first session management function network element may still request the first network element to provide the first identification information of the first network device. Then, after deleting the second identification information of the second network device in the target session context, the first identification information of the first network device can be saved, thereby obtaining the updated target session context.

[0213] In the above scheme, the first network element sends a first message to the first session management function network element, indicating that the terminal device has undergone a radio access network change. The first session management function network element then updates its stored target session context based on this first message, so that the updated target session context no longer contains the identification information of the anchor network device of the terminal device. In this way, the first session management function network element will no longer interact with the anchor network device. Using this communication method during RRC connection recovery can solve the problem of invalid interaction between the session management function network element and the anchor network device caused by the terminal device's radio access network change, thus reducing the waste of communication resources.

[0214] In some possible implementations, the first session management function network element can obtain the first message by subscription. In this case, as shown in Figure 4, the method further includes the following steps:

[0215] S411, when the first session management function network element is satisfied, the second message is sent to the first network element. The second message is used to subscribe to the mobility events of the terminal device.

[0216] In some feasible solutions, the first session management function network element can send a second message to the first network element when a first condition is met. This second message can be used to request subscription to mobility events of the terminal device, or in other words, it can be used to trigger the first network to respond with the first message. In this embodiment, the mobility events subscribed to by the first session management function network element may include radio access network replacement or radio access network identification information. Optionally, the second message can be used to request subscription to mobility events of the terminal device in non-RRC connection recovery or non-handover scenarios.

[0217] In one alternative implementation, the first condition may include at least one of the following: a first session is established, the first session is in an active state, or the terminal device enters an RRC inactive state.

[0218] For example, the first session management function network element may send a second message to the first network element when the first session is established as described above. Alternatively, the first session management function network element may send a second message to the first network element when it determines that the first session is active. Alternatively, the first session management function network element may send a second message to the first network element when it determines that the terminal device has entered an RRC inactive state.

[0219] Optionally, if the first condition includes the terminal device entering an RRC inactive state, the first session management function network element can determine that the terminal device has entered an RRC inactive state based on the indication from the second network device. For example, as shown in FIG4, before step S411, the method may further include the following step: S410, the second network device sends an RRC inactive state indication of the terminal device to the first session management function network element. Specifically, the second network device may first determine whether the terminal device has entered an RRC inactive state. If it is determined to be so, it can send an RRC inactive state indication of the terminal device to the first session management function network element to inform the first session management function that the terminal device has entered an RRC inactive state. It should be understood that the second network device may also notify the first session management function to determine that the terminal device has entered an RRC inactive state through other possible means, and this application does not limit this.

[0220] Correspondingly, the first network element receives the second message from the first session management function network element. Then, if the first network element determines, based on the second message, that the first session management function network element has subscribed to the mobility events of the terminal device, it can perform the relevant operations in step S415. It should be understood that when the second message is used to request subscription to the mobility events of the terminal device in a non-RRC connection recovery or non-handover scenario, the first network element does not need to perform step S415 even if a radio access network device change is sent during a successful connection recovery process or handover scenario.

[0221] In the above implementation, the first session management function network element obtains the first message by subscription. On the one hand, this can avoid frequent interactions between the first session management function network element and the first network element, and on the other hand, it can ensure the timeliness of the first message by subscription.

[0222] In some possible implementations, when the third condition mentioned above includes receiving a fourth message from the first network device, this fourth message can be generated by the terminal device upon determining that its triggered RRC connection recovery has failed, and sent to the first network element via the first network device. For example, as shown in Figure 4, before step S415, the communication method may further include the following step: S412, the terminal device generates and sends a fourth message to the first network element via the first network device, the fourth message being used to update the terminal device's location information. Specifically, when the terminal device determines that the RRC connection recovery has failed, it can generate and send a fourth message to the first network device. For example, in the case of RRC connection recovery failure, the terminal device's access layer sends an RRC connection recovery failure indication to the non-access layer, and then the non-access layer triggers the terminal device to generate and send a fourth message to the first network device. Then, the first network device can forward this fourth message to the first network element.

[0223] Accordingly, the first network element receives the fourth message and determines, based on the fourth message, that the terminal device requests an update to its location information. Optionally, in either the first or second implementation of the first network element described above, the first access and mobility management function network element receives the aforementioned fourth message and determines that the terminal device requests an update to its location information.

[0224] Optionally, as shown in Figure 4, after step S412, the method may further include the following steps:

[0225] S413, the first network element sends an access network release message to the second network device. Correspondingly, the second network device receives the access network release message.

[0226] For example, after receiving the aforementioned fourth message and determining that the fourth message is used to update the location information of the terminal device, the first network element can generate and send an Access Network Release message (AN Release message) to the second network device. It should be understood that for both the first and second implementation methods of the first network element described above, the first access and mobility management function network element generates and sends the access network release message.

[0227] Optionally, the access network release message may include the fifth identification information of the terminal device.

[0228] S414, The second network device deletes the terminal device context of the terminal device.

[0229] For example, after receiving an access network release message from the first network element, the second network device may delete the terminal device context of the terminal device.

[0230] In some feasible implementations, as shown in Figure 4, after step S416, the method may further include the following steps:

[0231] S417, the first session management function network element sends a session context release message to the second network device. Correspondingly, the second network device receives the session context release message.

[0232] Optionally, after updating the target session context, the first session management function network element sends a session context release message to the second network device. Here, the session context release message may include third identification information of the first session. Correspondingly, the second network device can receive the context release message from the first session management function network element and delete its stored session context related to the first session.

[0233] In some feasible implementations, as shown in Figure 4, after step S416, the method may further include the following steps:

[0234] S418, the first session management function network element sends a session resource establishment message to the first network device. Correspondingly, the first network device receives the session resource establishment message.

[0235] Optionally, after determining that the update of the target session context is complete, the first session management function network element may generate and send a session resource establishment message to the first network device. For example, the session resource establishment message may include third identification information of the first session, fifth identification information of the terminal device, and target session context information (such as QoS parameter information).

[0236] S419, the first network device sends its access network tunnel information to the first session management function network element. Correspondingly, the first session management function network element receives the access network tunnel information from the first network device.

[0237] Optionally, after determining that it has received a session resource establishment message from the first session management function network element, the first network device may obtain the access network tunnel information of the first network device and send the access network tunnel information of the first network device to the first session management function network element. The access network tunnel information of the first network device can be used by the first network device to receive data.

[0238] In some feasible implementations, as shown in Figure 4, after step S416, the method may further include the following steps:

[0239] S420, if the second condition is met, the first session management function network element sends a third message to the first network element. The third message is used to unsubscribe from the mobility events of the terminal device. Correspondingly, the first network element receives the third message.

[0240] Optionally, if the first session management function network element has subscribed to the mobility events of the terminal device, the first session management function network element may also unsubscribe from the mobility events of the terminal device.

[0241] Specifically, if the second condition is met, the first session management network element can send a third message to the first network element to unsubscribe from the mobility events of the terminal device. Correspondingly, upon receiving the third message, the first session management function network element can determine that it has unsubscribed from the mobility events of the terminal device and cease sending the first message to the first session management function network element.

[0242] The second condition includes at least one of the following: the first session is released, the first session is in a deactivated state, or the terminal device leaves the RRC inactive state. Here, the terminal device leaving the RRC inactive state can also be understood as the terminal device being removed from the RRC inactive state.

[0243] It should be noted that, when the first network element adopts the implementation method one described above, the first session management network element can send a third message to the first access and mobility management function network element if the second condition is met. Accordingly, the first access and mobility management function network element can determine, based on the third message, that the first session management function network element has unsubscribed from the mobility events of the terminal device.

[0244] When the first network element adopts the second implementation method described above, the first session management network element can send a third message to the unified database network element if the second condition is met. Accordingly, the unified database network element can determine, based on the third message, that the first session management function network element has unsubscribed from the mobility events of the terminal device.

[0245] In the above implementation, the subscription to the mobility event of the terminal device is canceled when the second condition is met. This can prevent the first network element from providing the first message to the first session management function network element when there is no need for it, thereby avoiding invalid interaction between the first session management function network element and the first network element.

[0246] It should also be noted that, in the case where the second condition includes the terminal device leaving the RRC inactive state, the first session management function network element can determine that the terminal device has left the RRC inactive state based on the indication of the first network device or the second network device.

[0247] It should be understood that the preceding description of the execution timing between the steps in Figure 4 is merely exemplary. In actual implementation, the execution timing between certain steps can be adjusted according to actual application requirements, and this application does not impose any restrictions on this. For example, step S417 can be executed before or after step S418. Similarly, step S420 can be executed before or after step S419. Those skilled in the art should understand that any scheme obtained by adjusting the execution timing of the steps of the communication method shown in Figure 4 based on actual needs falls within the protection scope of this application.

[0248] To facilitate understanding of the communication method shown in Figure 4, the implementation procedure of the communication method shown in Figure 4 will be briefly explained below in the specific scenario of the terminal device triggering an RRC connection recovery failure and the terminal device undergoing a radio access network handover. Please refer to Figure 5, which is another flowchart of a communication method provided in this application. It should be understood that Figure 5 shows an example of the first network element adopting the implementation method one described above (i.e., the first network element includes the first access and mobility management function network element). These procedures are also applicable to the scenario where the first network element adopts the implementation method two described above, and will not be repeated to avoid redundancy.

[0249] As shown in Figure 5, the communication method may include the following steps:

[0250] S50, the terminal device, the second network device, the first access and mobility management function network element, and the first session management function network element interact to complete the registration of the terminal device and the establishment of the first session.

[0251] In this process, the terminal device will register with the first access and mobility management function network element, and the first session will be managed by the first session management function network element.

[0252] It should be understood that, since the terminal device is residing in the second network device at this time, the target session context of the first session in the first session management function network element stores the second identification information of the second network device.

[0253] S51, the terminal device enters the RRC inactive state and a radio access network change occurs. Accordingly, the first network device and the second network device are aware that the terminal device has entered the RRC inactive state.

[0254] S52, the second network device sends an RRC inactive status indication of the terminal device to the first session management function network element. Correspondingly, the first session management function network element receives the RRC inactive status indication of the terminal device.

[0255] S53, when the terminal device enters the RRC inactive state, the first session management function network element sends a second message to the first access and mobility management function network element. Correspondingly, the first access and mobility management function network element receives the second message.

[0256] S54, if the terminal device fails to restore the RRC connection, it sends a mobile registration update message to the first access and mobility management function (AMU) network element. Correspondingly, the first AMU network element receives the mobile registration update message.

[0257] S55, the first access and mobility management function network element sends an access network release message to the second network device. Correspondingly, the second network device receives the access network release message.

[0258] S56, the second network device deletes the terminal device context of the terminal device.

[0259] S57, if the first access and mobility management function network element initiates a subscription with the first session management function network element and the third condition is met, the first session management function network element sends a first message to the first session management function network element. Correspondingly, the first session management function network element receives the first message.

[0260] S58, the first session management function network element updates the target session context based on the first message.

[0261] S59, the first session management function network element sends a session context release message to the second network device. Correspondingly, the second network device receives the session context release message.

[0262] S60, the first session management function network element sends a session resource establishment message to the first network device. Correspondingly, the first network device receives the session resource establishment message.

[0263] S61, the first network device sends its access network tunnel information to the first session management function network element. The first session management function network element receives the access network tunnel information from the first network device.

[0264] The specific implementation process of steps S52 to S61 can be found in the corresponding process described in steps S410 to S419 above, and will not be repeated here.

[0265] S62, when the terminal device has uplink data to transmit, it sends a service request to the first session management function network element through the first network device. Correspondingly, the first session management function network element receives the service request.

[0266] Specifically, when a terminal device has uplink data to transmit, it can generate and send a service request to the first session management function network element through the first network device to request the first session management function network element to activate the first session. Correspondingly, the first session management function network element can activate the first session upon receiving the service request.

[0267] S63, if the second condition is met, the first session management function network element sends a third message to the first access and mobility management function network element. Correspondingly, the first access and mobility management function network element receives the third message.

[0268] The specific implementation process of step S63 can be found in the corresponding process described in step S420 above, and will not be repeated here.

[0269] To address the aforementioned issues, this application provides another communication method. In this method, the terminal device proactively sends a seventh message to the first network device requesting an update to the terminal device's first session, triggering the first network device to send a first message to the first session management function network element to update the first session. The first session management function network element can update the target session context of the first session based on the first message, ensuring that the updated target session context no longer contains the identification information of the terminal device's anchor network device. Thus, the first session management function network element will no longer interact with the terminal device's anchor network device.

[0270] Please refer to Figure 6, which is another flowchart illustrating a communication method provided in this application. It should be understood that the communication method shown in Figure 6 is also applicable to the communication system shown in Figure 2 above. As shown in Figure 6, the method includes the following steps:

[0271] S613, the terminal device sends a seventh message to the first network device to request an update to the first session of the terminal device. Correspondingly, the first network device receives the seventh message.

[0272] In some feasible implementations, the terminal device may generate and send a seventh message to the first network device. This seventh message can be used to request an update to the terminal device's first session. The seventh message may include third identification information of the first session, which may be managed by a first session management function network element. The first network device is the network device currently accessed by the terminal device, and the first network device is directly connected to the first session management function network element.

[0273] Optionally, the seventh message may also include a session modification instruction for the first session or a session modification message for the first session.

[0274] Optionally, the seventh message may specifically be an RRC message sent by the terminal device to the first network device. It should be understood that this is only an example, and in actual implementation, the seventh message may also have other possible forms, which are not limited in this application.

[0275] Optionally, the terminal device may first determine whether the first session is active. If the terminal device determines that the first session is active, it can generate and send a seventh message to the first network device. Conversely, if the terminal device determines that the first session is inactive, it will not send a seventh message to the first network device. It can also be understood that, in this embodiment, the first session is active.

[0276] S614, the first network device sends a first message to the first session management function network element. Correspondingly, the first session management function network element receives the first message.

[0277] In some feasible implementations, after receiving the seventh message from the terminal device, the first network device can generate a first message based on the seventh message to request an update to the first session, and send the first message to the first session management function network element. Correspondingly, the first session management function network element will receive the first message. The first message includes at least the first identification information of the first network device.

[0278] In one optional implementation, before sending the first message to the first session management function network element, the first network device needs to obtain the fourth identification information of the first session management function network element. The process of the first network device obtaining the fourth identification information of the first session management function network element will be described below.

[0279] Optionally, the seventh message may include the fourth identification information of the first session management function network element, and the first network device can obtain the fourth identification information of the first session management function network element through the seventh message. It should be understood that in this case, the terminal device will save the fourth identification information of the first session management function network element when establishing the first session.

[0280] Optionally, the first network device may query the unified database network element or the network function repository function (NRF) network element to obtain the fourth identification information of the first session management function network element.

[0281] For example, the first network device may send a ninth message to a unified database network element or a network function library network element. This ninth message may include third identification information of the first session, and may be used to request the unified database network element or network function library network element to provide identification information of the session management function network element managing the first session. Upon receiving the ninth message, the unified database network element or network function library network element may query the second session management function network element managing the first session, generate and send a tenth message to the first network device. This tenth message includes fourth identification information for the first session management function network element. The first network device may receive the tenth message from the unified database network element or network function library network element and obtain the fourth identification information of the first session management function network element.

[0282] Optionally, the fourth identification information of the first session management function network element may also be proactively provided by the first access and mobility management function network element.

[0283] For example, the first access and mobility management function network element may generate and send an eleventh message to the first network device. This eleventh message includes identification information for multiple sessions, as well as identification information for multiple session management function network elements managing these multiple sessions. It should be understood that all multiple sessions are active sessions, and at least the aforementioned first session is included. The identification information for the multiple session management function network elements includes at least the fourth identification information of the first session management function network element. Further, the first network device may receive the eleventh message from the first access and mobility management function network element and obtain the fourth identification information of the first session management function network element used to manage the first session based on the eleventh message.

[0284] It should be noted that the identification information of the aforementioned multiple sessions and the identification information of the multiple session management function network elements that manage these multiple sessions can be contained in a container, and this container can be provided to the first access and mobility management function network element by the unified database network element.

[0285] It should be understood that the first network device may also use other possible implementation methods to obtain the fourth identification information of the first session management function network element, and this application does not limit this.

[0286] In one alternative implementation, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device.

[0287] In one alternative implementation, the first message may also include a session modification instruction corresponding to the first session or a session modification message for the first session.

[0288] S615, the first session management function network element updates the target session context according to the first message, and the updated target session context does not include the second identification information of the second network device.

[0289] In some feasible implementations, after receiving the first message, the first session management function network element can update the target session context according to the first message, so that the updated target session context does not include the second identification information of the second network device. Here, the target session context is the session context of the first session. The second network device is the anchor network device of the terminal device, and the second network device is directly connected to the first session management function network element. Before the terminal device undergoes a radio access network change, the terminal device connects to the second network device.

[0290] In one possible implementation, after receiving the first message, the first session management function network element can replace the second identification information of the second network device in the target session context with the first identification information of the first network device, thereby obtaining the updated target session context.

[0291] Optionally, if the first message also includes access network tunnel information of the first network device, the first session management function network element may also send the access network tunnel information of the first network device to the user plane function network element, so that the user plane function network element replaces the access network tunnel information corresponding to the second network device that it has stored with the access network tunnel information corresponding to the first network device.

[0292] In the above scheme, the terminal device sends a seventh message to the first network device to request an update of the terminal device's first session, triggering the first network device to send a first message to the first session management function network element to update the first session. Upon receiving this first message, the first session management function network element updates the target session context of the first session according to the first message, ensuring that the updated target session context no longer contains the identifier information of the terminal device's anchor network device. This prevents the first session management function network element from interacting with the terminal device's anchor network device. Using this method in RRC connection recovery scenarios can solve the problem of invalid interaction between the session management function network element and the anchor network device caused by a change in the radio access network of the terminal device, reducing the waste of communication resources.

[0293] In some possible implementations, the terminal device may perform step S613 above if its triggered RRC connection recovery fails and a radio access network change occurs.

[0294] In this case, as shown in Figure 6, the method may also include the following steps:

[0295] S610, the terminal device sends a fourth message to the first access and mobility management function network element through the first network device. Correspondingly, the first access and mobility management function network element receives the fourth message.

[0296] In some feasible implementations, if the terminal device determines that its triggered RRC connection recovery has failed, it can generate and send a fourth message to the first network device. The first network device can then forward this fourth message to the first access and mobility management function network element. Here, this fourth message is used to update the terminal device's location information.

[0297] Optionally, the fourth message can be a mobile registration update message for the terminal device. It should be understood that the fourth message can also be other messages that can be used to update the location information of the terminal device, and this application does not limit the implementation of the fourth message.

[0298] For example, if a terminal device determines that its triggered RRC connection recovery has failed, it can generate a mobile registration update message and send the mobile registration update message to a first access and mobility management function network element through a first network device to request the first access and mobility management function network element to update the location information of the terminal device.

[0299] In some feasible implementations, as shown in Figure 6, the method may also include the following steps:

[0300] S611, the first access and mobility management function network element sends an access network release message to the second network device. Correspondingly, the second network device receives the access network release message.

[0301] For example, after receiving the fourth message and determining that the fourth message is used to update the location information of the terminal device, the first access and mobility management function network element can generate and send an access network release message to the second network device. Correspondingly, the second network device receives the access network release message.

[0302] Optionally, the access network release message may include the fifth identification information of the terminal device.

[0303] S612, the second network device deletes the terminal device context of the terminal device.

[0304] For example, after receiving an access network release message from the first access and mobility management function network element, the second network device may delete the terminal device context of the terminal device.

[0305] In some feasible implementations, as shown in Figure 6, after step S615, the method may further include the following steps:

[0306] S616, the first session management function network element sends a session context release message to the second network device. Correspondingly, the second network device receives the session context release message.

[0307] In some feasible implementations, as shown in Figure 6, after step S615, the method may further include the following steps:

[0308] S617, the first session management function network element sends a session resource establishment message to the first network device. Correspondingly, the first network device receives the session resource establishment message.

[0309] S618, the first network device sends its access network tunnel information to the first session management function network element. Correspondingly, the first session management function network element receives the access network tunnel information from the first network device.

[0310] Here, the specific implementation process of steps S616 to S618 can be found in the corresponding descriptions of steps S417 to S419 above, and will not be repeated here.

[0311] It should be understood that the timing representation of steps S616 and S617 in Figure 6 is merely exemplary. In actual implementation, step S616 may be executed before or after step S617, and this application does not impose any restrictions on this.

[0312] In some possible implementations, the terminal device can also establish other sessions besides the first session management function network element with other session management function network elements. In the event that the terminal device's RRC connection recovery fails and a radio access network change occurs, the problem of invalid interaction between these other session management function network elements and the second network device also needs to be addressed. Therefore, in the communication method provided in this application, the terminal device can also actively trigger these other session management function network elements to perform session context updates to avoid invalid interaction with the second network device. The following example uses a second session management function network element other than the first session management function network element. This second session management function network element manages the terminal device's second session, which is different from the first session described above. It should be understood that the second session management function network element is directly connected to the first network device, and also directly connected to the second network device.

[0313] Please refer to Figure 7, which is another flowchart illustrating a communication method provided in this application. As shown in Figure 7, the communication method may further include the following steps:

[0314] S619, the terminal device sends a twelfth message to the first network device to request an update to the second session of the terminal device. Accordingly, the first network device receives the twelfth message.

[0315] In some feasible implementations, after sending the fourth message, the terminal device may also send a twelfth message to the first network device. This twelfth message is used to request an update to the twelfth message of the terminal device's second session. This twelfth message includes at least the sixth identification information of the second session.

[0316] Optionally, the twelfth message may also include a session modification instruction for the second session or a session modification message for the second session.

[0317] Optionally, the twelfth message can also be an RRC message sent by the terminal device to the first network device. It should be understood that this is only an example, and in actual implementation, the twelfth message can take other possible forms, which this application does not limit.

[0318] Optionally, the terminal device may first determine whether the second session is active. If the terminal device determines that the second session is active, it can generate and send the twelfth message to the first network device. Conversely, if the terminal device determines that the second session is inactive, it will not send the twelfth message to the first network device. It can also be understood that, in this embodiment, the second session is also active.

[0319] In S620, the first network device sends the eighth message to the second session management function network element. Correspondingly, the second session management function network element receives the eighth message.

[0320] In some feasible implementations, after receiving the twelfth message from the terminal device, the first network device can generate an eighth message based on the twelfth message to request an update to the second session, and send the eighth message to the second session management function network element. Correspondingly, the second session management function network element will receive the eighth message. The eighth message includes at least the first identification information of the first network device.

[0321] Similarly, before sending the eighth message to the second session management function network element, the first network device also needs to obtain the seventh identification information of the second session management function network element. The process of the first network device obtaining the seventh identification information of the second session management function network element will be explained below, in conjunction with the process of the first network device obtaining the fourth identification information of the first session management function network element in step S614 above.

[0322] Optionally, the first network device can also query the unified database network element or the network function library network element to obtain the aforementioned seventh identification information.

[0323] For example, the ninth message sent by the first network device to the unified database network element or the network function library network element may also include the sixth identification information of the second session. Furthermore, the tenth message received by the first network device may also include the seventh identification information of the second session management function network element used to manage the second session.

[0324] Optionally, the seventh identification information of the second session management function network element can also be proactively provided by the first access and mobility management function network element.

[0325] For example, the eleventh message received by the first network device from the first access and mobility management function network element includes identification information for multiple sessions, as well as identification information for multiple session management function network elements managing these multiple sessions. Furthermore, the identification information for these multiple sessions includes sixth identification information for a second session, and the identification information for these multiple session management function network elements also includes seventh identification information for the second session management function network element. The first network device can also obtain the seventh identification information for the second session management function network element based on this eleventh message.

[0326] It should be understood that the first network device may also use other possible implementation methods to obtain the seventh identification information of the second session management function network element, and this application does not limit this.

[0327] In one optional implementation, the eighth message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Furthermore, the eighth message may also include a session modification indication or a session modification message corresponding to the second session.

[0328] In some feasible implementations, the terminal device may also skip step S619 and instead request an update to the terminal device's second session via the seventh message.

[0329] For example, the seventh message may also include a sixth identification information of the second session, and is also used to request an update to the second session. Here, requesting updates to two different sessions through the same message can save communication resources.

[0330] Optionally, in this case, the seventh message may also include a session modification instruction for the second session or a session modification message for the second session.

[0331] Optionally, in this case, the seventh message may also include the seventh identification information of the second session management function network element. It should be understood that this seventh identification information can be saved by the terminal device when establishing the second session. In this way, the first network device can obtain the seventh identification information of the second session management function network element based on the seventh message before sending the eighth message to the second session management function network element.

[0332] S621, the second session management function network element updates the session context of the second session according to the eighth message. The updated session context of the second session does not include the second identification information of the second network device.

[0333] In some feasible implementations, after receiving the eighth message, the second session management function network element can update the session context of the second session according to the eighth message, so that the updated session context of the second session does not include the second identification information of the second network device.

[0334] In one possible implementation, after receiving the eighth message, the second session management function network element can replace the second identification information of the second network device in the session context of the second session with the first identification information of the first network device, thereby obtaining the updated session context of the second session.

[0335] It should be understood that although steps S611 to S618 shown in Figure 6 are not directly shown in Figure 7, the implementation methods described in steps S611 to S618 are also applicable to the scheme shown in Figure 7. To avoid redundancy, they will not be described again here.

[0336] It should also be understood that the above description of the execution sequence between each step is merely exemplary. In actual implementation, the execution sequence between certain steps can be adjusted according to actual application requirements, and this application does not impose any restrictions on this. For example, step S611 can be executed before or after step S613. Similarly, step S616 can be executed before or after step S617. Those skilled in the art should understand that any scheme obtained by adjusting the execution sequence of each step of the communication method shown in Figure 6 or Figure 7 based on actual needs falls within the protection scope of this application.

[0337] To facilitate understanding of the communication method shown in Figure 6 or Figure 7, the following will provide an exemplary description of each step of the communication method shown in Figure 6 or Figure 7, taking into account a scenario where the terminal device triggers an RRC connection recovery failure and a radio access network handover occurs. Please refer to Figure 8, which is another flowchart illustrating a communication method provided in this application. It should be understood that Figure 8 illustrates an example where both the first session management function network element and the second session management function network element exist simultaneously.

[0338] As shown in Figure 8, the communication method may include the following steps:

[0339] S80, the terminal device, the second network device, the first access and mobility management function network element, the first session management function network element, and the second session management function network element interact to complete the registration of the terminal device and the establishment of the first and second sessions.

[0340] It should be understood that, since the terminal device is residing on the second network device at this time, the target session context of the first session and the session context of the second session both store the second identification information of the second network device.

[0341] S81, the terminal device enters the RRC inactive state and a radio access network change occurs. Accordingly, the first network device and the second network device are aware that the terminal device has entered the RRC inactive state.

[0342] S82, in the event that RRC connection recovery fails, the terminal device sends a mobile registration update message to the first access and session management function network element through the first network device. Correspondingly, the first access and session management function network element receives the mobile registration update message.

[0343] S83, the first access and mobility management function network element sends an access network release message to the second network device. Correspondingly, the second network device receives the access network release message.

[0344] S84, the second network device deletes the terminal device context of the terminal device.

[0345] In step S85, the terminal device sends a seventh message to the first network device requesting an update to the terminal device's first and second sessions. Correspondingly, the first network device receives the seventh message.

[0346] S86, the first network device sends a first message to the first session management function network element. Correspondingly, the first session management function network element receives the first message.

[0347] S87, the first session management function network element updates the target session context based on the first message.

[0348] The specific implementation process of steps S82 to S87 can be found in the corresponding descriptions in steps S610 to S615 above, and will not be repeated here.

[0349] S88, the first network device sends the eighth message to the second session management function network element. Correspondingly, the second session management function network element receives the eighth message.

[0350] S89, the second session management function network element updates the session context of the second session according to the eighth message.

[0351] For details on the implementation of steps S88 to S89, please refer to the corresponding descriptions in steps S620 to S621 above, which will not be repeated here.

[0352] S90, the first session management function network element sends a session context release message to the second network device. Correspondingly, the second network device receives the session context release message.

[0353] S91, the first session management function network element sends a session resource establishment message to the first network device. Correspondingly, the first network device receives the session resource establishment message.

[0354] S92, the first network device sends its access network tunnel information to the first session management function network element. The first session management function network element receives the access network tunnel information from the first network device.

[0355] Here, the specific implementation process of steps S90 to S92 can be found in the corresponding process described in steps S616 to S618 above, and will not be repeated here.

[0356] S93, when a terminal device has uplink data to transmit, it sends a service request to the first session management function network element through the first network device. Correspondingly, the first session management function network element receives the service request.

[0357] Specifically, when a terminal device has uplink data to be transmitted corresponding to the first session, it can generate and send a service request to the first session management function network element through the first network device to request the first session management function network element to activate the first session. Correspondingly, the first session management function network element can activate the first session upon receiving the service request.

[0358] It should be understood that after executing step S89, the second session management function network element can also perform similar operations to steps S90 to S93. To avoid redundancy, this will not be repeated here.

[0359] To address the aforementioned issues, this application provides another communication method. In this method, a first network device proactively sends a first message to a first session management function network element based on the context of the terminal device, requesting the first session management function network element to update the first session. The first session management network element updates the target session context of the first session based on the first message, ensuring that the updated target session context no longer contains the identification information of the anchor network device of the terminal device. Thus, the first session management function network element will no longer interact with the anchor network device of the terminal device.

[0360] Please refer to Figure 9, which is another flowchart illustrating a communication method provided in this application. It should be understood that the communication method shown in Figure 9 is also applicable to the communication information shown in Figure 2 above. As shown in Figure 9, the method includes the following steps:

[0361] S910, the first network device obtains the terminal device context of the terminal device.

[0362] In some possible implementations, the first network device can obtain the terminal device context of the terminal device. Here, the terminal device context of the terminal device includes at least the third identification information of the terminal device's first session and the fourth identification information of the first session management function network element. The first session management function network element is used to manage the first session. The first network device is the network device currently accessed by the terminal device. The first network device is directly connected to the first session management function network element.

[0363] Optionally, the terminal device context may also include the terminal device's fifth identification information and the session state information of the first session.

[0364] Optionally, the terminal device context may further include identification information of at least one session other than the first session, identification information of at least one session management function network element other than the first session management function network element, and session status information of each session in the aforementioned at least one session. Here, the aforementioned at least one session management function network element is used to manage the aforementioned at least one session.

[0365] S911, the first network device sends a first message to the first session management function network element. Correspondingly, the first session management function network element receives the first message.

[0366] In some feasible implementations, after obtaining the terminal device context of the terminal device, the first network device can generate and send a first message to the first session management function network element based on the terminal device context. This first message requests an update to the target session context of the first session, and includes at least the first identification information of the first network device. Correspondingly, the first session management function network element receives the first message.

[0367] For example, after obtaining the terminal device context of the terminal device, the first network device can determine whether the first session is active based on the terminal device context. If it is determined that the first session is active and that the terminal device has undergone a radio access network change, the first network device can determine the first session management function network element that manages the first session based on the terminal device context and send a first message to the first session management function network element.

[0368] In one optional implementation, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Furthermore, the first message may also include a session modification indication or a session modification message corresponding to the first session.

[0369] S912, the first session management function network element updates the target session context according to the first message, and the updated target session context does not include the second identification information of the second network device.

[0370] In some feasible implementations, after receiving the first message, the first session management function network element can update the target session context according to the first message, so that the updated target session context does not include the second identification information of the second network device. Here, the target session context is the session context of the first session. The second network device is the anchor network device of the terminal device. The second network device is directly connected to the first session management function network element. Before the terminal device undergoes a radio access network change, the terminal device connects to the second network device.

[0371] The specific implementation process of step S912 can be found in the corresponding description of step S615 above, and will not be repeated here.

[0372] In the above scheme, the first network device sends a first message to the first session management function network element based on the context of the terminal device, requesting the first session management function network element to update the first session. The first session management network element updates the target session context of the first session based on the first message, ensuring that the updated target session context no longer contains the identification information of the anchor network device of the terminal device. This prevents the first session management function network element from interacting with the anchor network device of the terminal device. Using this method during RRC connection recovery can resolve the problem of invalid interaction between the session management function network element and the anchor network device caused by a change in the radio access network of the terminal device, reducing the waste of communication resources.

[0373] In some possible implementations, the first network device can obtain the terminal device context of the terminal device in various ways. For example, the first network device can obtain the terminal device context of the terminal device from the second network device or the first network element. The specific implementation of step S910 will be explained below, combining two scenarios: RRC connection recovery failure and RRC connection recovery success.

[0374] Scenarios where RRC connection recovery fails:

[0375] Optionally, as shown in Figure 9, in the scenario where RRC connection recovery fails, the communication method may further include the following steps:

[0376] S9101, the terminal device sends a target RRC message to the first network device. Correspondingly, the first network device receives the target RRC message.

[0377] In some feasible implementations, upon determining that RRC link restoration has failed, the terminal device may generate and send a target RRC message to the first network device. This target RRC message can be used to indicate that the terminal device's RRC connection restoration has failed, and it may include an RRC connection restoration failure indication from the terminal device. Correspondingly, the first network device may receive the target RRC message and determine the RRC connection restoration failure triggered by the terminal device based on the terminal device's RRC connection restoration failure indication.

[0378] Optionally, the target RRC message may also include a mobile registration update message for the terminal device.

[0379] S9102, the first network device sends the fifth message to the first network element. Correspondingly, the first network element receives the fifth message.

[0380] In some feasible implementations, after the first network device determines that the RRC connection recovery triggered by the terminal device has failed, it can generate and send a fifth message to the first network element. This fifth message can be used to request the terminal device context of the terminal device. The first network element can be used to store the terminal device context of the terminal device or to manage the access of the terminal device. Correspondingly, the first network element can receive the fifth message and determine that the first network device is requesting the terminal device context of the terminal device.

[0381] Optionally, the fifth message may include the fifth identification information of the terminal device.

[0382] Optionally, the fifth message can be a mobile registration update message for the terminal device.

[0383] Optionally, the first network element can be a first access and mobility management function network element or a unified database network element.

[0384] In some feasible implementations, step S9101 may not be executed. In this case, the first network device may send the aforementioned fifth message to the first network element when establishing an RRC connection with the terminal device. That is, the first network device does not need to know whether the RRC connection recovery of the terminal device has failed; as long as it has established an RRC connection with the terminal device, it will proactively request the terminal device context of the terminal device from the first network element.

[0385] S9103, the first network element sends the sixth message to the first network device. Correspondingly, the first network device receives the sixth message.

[0386] In some feasible implementations, after receiving the fifth message from the first network device, the first network element can generate a sixth message based on its stored terminal device context and send the sixth message to the first network device. The sixth message includes the terminal device context of the terminal device.

[0387] In the above implementation, the first network device will actively request the terminal device context of the terminal device from the first network element, which can ensure the timeliness and reliability of obtaining the terminal device context.

[0388] Optionally, when the first network element is a first access and mobility management function network element, the first network element may also proactively send a sixth message to the first network device. For example, it is not necessary to determine whether a fifth message has been received; the first network element can send the sixth message to the first network device when it determines that it has received the mobile registration update message from the terminal device.

[0389] In some feasible implementations, as shown in Figure 9, the method may also include the following steps:

[0390] In S9100, the second network device sends the terminal device context of the terminal device to the first network element. Correspondingly, the first network element receives the terminal device context of the terminal device.

[0391] In some feasible implementations, the second network device may proactively send the terminal device context of the terminal device to the first network element. Optionally, the second network device may send the terminal device context of the terminal device to the first network element if it is determined that the RRC connection recovery of the terminal device has failed. Accordingly, the first network element receives and saves the terminal device context of the terminal device.

[0392] Scenarios where RRC connection restoration is successful:

[0393] Optionally, as shown in Figure 9, in the scenario where the RRC connection is successfully restored, the communication method may further include the following steps:

[0394] S9104, the terminal device sends an RRC connection restoration request to the first network device. The first network device receives the RRC connection restoration request.

[0395] In some feasible implementations, the terminal device sends an RRC connection restoration request to the first network device. The first network device can receive the RRC connection restoration request and establish a communication connection with the second network device.

[0396] S9105, the first network device sends a context retrieval request to the second network device. Correspondingly, the second network device receives the context retrieval request.

[0397] In some feasible implementations, after establishing a communication connection with the second network device, the first network device may send a context retrieval request to the second network device. Accordingly, the second network device receives the context retrieval request and determines that the first network device requires it to provide the terminal device context of the terminal device.

[0398] Optionally, the context retrieval request may include the fifth identification information of the terminal device.

[0399] S9106, the second network device sends a context retrieval response to the first network device. Correspondingly, the first network device receives the context retrieval response.

[0400] In some feasible implementations, after receiving a context retrieval request from the first network device, the second network device can generate a context retrieval response based on the terminal device's terminal device context and send the context retrieval response to the first network device. This context retrieval response includes the terminal device's terminal device context.

[0401] Accordingly, the first network device can receive the context retrieval response and extract the terminal device context of the terminal device.

[0402] In some possible implementations, as shown in Figure 9, the method may also include the following steps:

[0403] S913, the first network element sends an access network release message to the second network device. Correspondingly, the second network device receives the access network release message.

[0404] S914, the second network device deletes the terminal device context of the terminal device.

[0405] The specific implementation process of steps S913 to S914 can be found in the corresponding descriptions of steps S611 to S612, and will not be repeated here.

[0406] In some possible implementations, as shown in Figure 9, after step S912, the method may further include the following steps:

[0407] In S915, the first session management function network element sends a session context release message to the second network device. Correspondingly, the second network device receives the session context release message.

[0408] In some feasible implementations, as shown in Figure 9, after step S915, the method may further include the following steps:

[0409] S916, the first session management function network element sends a session resource establishment message to the first network device. Correspondingly, the first network device receives the session resource establishment message.

[0410] S917, the first network device sends its access network tunnel information to the first session management function network element. Correspondingly, the first session management function network element receives the access network tunnel information from the first network device.

[0411] The specific implementation process of steps S915 to S917 can be found in the corresponding descriptions of steps S616 to S618 above, and will not be repeated here.

[0412] In some possible implementations, the terminal device can also establish other sessions besides the first session management function network element with other session management function network elements. In the event that the terminal device's RRC connection recovery fails and a radio access network change occurs, the problem of invalid interaction between these other session management function network elements and the second network device also needs to be addressed. Therefore, in the communication method provided in this application, the terminal device can also actively trigger these other session management function network elements to perform session context updates to avoid invalid interaction with the second network device. The following example uses a second session management function network element other than the first session management function network element. This second session management function network element manages the terminal device's second session, which is different from the first session described above. It should be understood that the second session management function network element is directly connected to the first network device, and also directly connected to the second network device.

[0413] Please refer to Figure 10, which is another flowchart illustrating a communication method provided in this application. As shown in Figure 10, the communication method may further include the following steps:

[0414] S918, the first network device sends the eighth message to the second session management function network element. Correspondingly, the second session management function network element receives the eighth message.

[0415] In some feasible implementations, after obtaining the terminal context of the terminal device, the first network device can determine that the second session is also active based on the terminal context. Further, the first network device can query the second session management function network element that manages the second session based on the terminal context of the terminal device. Then, the first network device generates an eighth message to request an update to the second session and sends this eighth message to the second session management function network element. Correspondingly, the second session management function network element receives this eighth message. The eighth message includes at least the first identification information of the first network device.

[0416] Optionally, the eighth message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Furthermore, the eighth message may also include a session modification indication or a session modification message corresponding to the second session.

[0417] S919, the second session management function network element updates the session context of the second session according to the eighth message. The updated session context of the second session does not include the second identification information of the second network device.

[0418] The specific implementation process can be found in the description of step S621 above, and will not be repeated here.

[0419] It should be understood that although steps S913 to S917 shown in Figure 9 are not directly shown in Figure 10, the implementation methods described in steps S913 to S917 are also applicable to the scheme shown in Figure 10. To avoid redundancy, they will not be described again here.

[0420] It should also be understood that the above description of the execution timing between each step is merely exemplary. In actual implementation, the execution timing between certain steps can be adjusted according to actual application requirements, and this application does not impose any restrictions on this. For example, step S913 can be executed before or after step S912. As another example, step S915 can be executed before or after step S916. Those skilled in the art should understand that any scheme obtained by adjusting the execution timing of each step of the communication method shown in Figure 9 or Figure 10 based on actual needs falls within the protection scope of this application.

[0421] To facilitate understanding of the communication method shown in Figure 9 or Figure 10, the following will provide an exemplary description of each step of the communication method shown in Figure 9 or Figure 10, taking into account a scenario where the terminal device triggers an RRC connection recovery failure and a radio access network handover occurs. Please refer to Figure 11, which is another flowchart illustrating a communication method provided in this application. It should be understood that Figure 11 illustrates an example where both the first session management function network element and the second session management function network element exist simultaneously, and the first network element is assumed to be the first access and mobility management function network element.

[0422] As shown in Figure 11, the communication method may include the following steps:

[0423] S111, the terminal device, the second network device, the first access and mobility management function network element, the first session management function network element, and the second session management function network element interact to complete the registration of the terminal device and the establishment of the first and second sessions.

[0424] It should be understood that, since the terminal device is residing on the second network device at this time, the target session context of the first session and the session context of the second session both store the second identification information of the second network device.

[0425] S112, the terminal device enters the RRC inactive state and a radio access network change occurs. Accordingly, the first network device and the second network device are aware that the terminal device has entered the RRC inactive state.

[0426] S113, if the RRC connection recovery fails, the second network device sends the terminal device context of the terminal device to the first access and mobility management function network element. Correspondingly, the first access and mobility management function network element receives and saves the terminal device context of the terminal device.

[0427] S114, if the terminal device fails to restore the RRC connection, it sends an RRC connection restoration failure indication to the first network device. Correspondingly, the first network device receives the RRC connection restoration failure indication and determines that the terminal device's RRC connection restoration has failed.

[0428] S115, the first network device sends a fifth message to the first access and mobility management function network element. Correspondingly, the first access and mobility management function network element receives the fifth message.

[0429] S116, the first access and mobility management function network element sends a sixth message to the first network device. Correspondingly, the first network device receives the sixth message.

[0430] The specific implementation process of steps S113 to S116 can be found in the corresponding descriptions of steps S9100 to S9103 above, and will not be repeated here.

[0431] S117, the first network device sends a first message to the first session management function network element. Correspondingly, the first session management function network element receives the first message.

[0432] S118, the first session management function network element updates the target session context according to the first message, and the updated target session context does not include the second identification information of the second network device.

[0433] The specific implementation process of steps S117 to S118 can be found in the corresponding descriptions of steps S911 to S912 above, and will not be repeated here.

[0434] S119, the first network device sends the eighth message to the second session management function network element. Correspondingly, the second session management function network element receives the eighth message.

[0435] S120, the second session management function network element updates the session context of the second session according to the eighth message. The updated session context of the second session does not include the second identification information of the second network device.

[0436] The specific implementation process of steps S119 to S120 can be found in the corresponding descriptions of steps S918 to S919 above, and will not be repeated here.

[0437] S121, the first access and mobility management function network element sends an access network release message to the second network device. Correspondingly, the second network device receives the access network release message.

[0438] S122, the second network device deletes the terminal device context of the terminal device.

[0439] S123, the first session management function network element sends a session context release message to the second network device. Correspondingly, the second network device receives the session context release message.

[0440] S124, the first session management function network element sends a session resource establishment message to the first network device. Correspondingly, the first network device receives the session resource establishment message.

[0441] S125, the first network device sends its access network tunnel information to the first session management function network element. The first session management function network element receives the access network tunnel information from the first network device.

[0442] The specific implementation process of steps S121 to S125 can be found in the corresponding descriptions of steps S913 to S917 above, and will not be repeated here.

[0443] S126, when the terminal device has uplink data to transmit, it sends a service request to the first session management function network element through the first network device. Correspondingly, the first session management function network element receives the service request.

[0444] Specifically, when a terminal device has uplink data to be transmitted corresponding to the first session, it can generate and send a service request to the first session management function network element through the first network device to request the first session management function network element to activate the first session. Correspondingly, the first session management function network element can activate the first session upon receiving the service request.

[0445] It should be understood that after executing step S120, the second session management function can also perform similar operations to steps S121 to S126 above. To avoid redundancy, these will not be repeated here.

[0446] It should be noted that, in the embodiments of this application, both the first session and the second session can be active protocol data unit (PDU) sessions.

[0447] It should also be noted that, in this embodiment, the unified database network element can also be replaced by an unstructured data storage function (UDSF) network element. That is, in this embodiment, the steps performed by the unified database network element can also be performed by the unstructured data storage function network element. For example, the process described in step S415 above, where the unified database network element determines that it has received a mobility information notification message from the first access and mobility management function network element and sends a first message to the first session management function network element, can be performed by the unstructured data storage function network element.

[0448] It should also be noted that, in the embodiments of this application, the identification information of a session can be either the unique identifier of the session (i.e., session ID) or the unique identifier of the session context corresponding to the session (i.e., session context ID), and this application does not impose any specific restrictions on this. As mentioned above, the third identification information of the first session can be either the session ID of the first session or the session context ID corresponding to the target session context of the first session.

[0449] After a terminal device triggers RRC connection restoration, the first network device currently connected to the terminal device needs to obtain the terminal device context of the terminal device to ensure successful RRC connection restoration. Normally, the first network device requests the terminal device's anchor network device to provide the terminal device context. However, there may be situations where the first network device and the terminal device's anchor network device cannot communicate, such as when their interfaces are not connected. This can easily lead to the failure of the RRC connection restoration triggered by the terminal device.

[0450] Therefore, the technical problem that this application also needs to solve is: how to improve the success rate of RRC connection recovery of terminal devices.

[0451] To address this issue, this application provides another communication method. In this method, the terminal device proactively provides the tracking area (TA) information of the anchor network device to the first network device it is currently accessing. Therefore, even if the first network device directly obtains the terminal device context from the anchor network device, it can still obtain the terminal device context through the tracking area information. This avoids RRC connection recovery failures caused by the first network device's inability to obtain the terminal device context, thereby improving the success rate of RRC connection recovery for the terminal device.

[0452] Please refer to Figure 12, which is another schematic flowchart of a communication method provided in this application. It should be understood that the communication method shown in Figure 12 is applicable to the communication system shown in Figure 3 above. As shown in Figure 12, the method includes the following steps:

[0453] S1201, the terminal device obtains target information, which includes tracking area information of the second network device.

[0454] In some feasible implementations, the terminal device can obtain target information when it determines that RRC connection restoration is necessary. This target information may include the tracking area information of the second network device. It should be understood that, in this embodiment, the tracking area information of the second network device can be understood as the TA information corresponding to the cell covered by the second network device. Furthermore, in this embodiment, the terminal device has undergone a radio access network change; it is currently connected to the first network device, and the second network device is its anchor network device.

[0455] In one possible implementation, the target information mentioned above can be the inactive wireless network temporary identifier (i.e., I-RNTI) of the terminal device.

[0456] Furthermore, the target information can be provided or allocated to the terminal device by the second network device, that is, the second network device sends the target information to the terminal device.

[0457] Furthermore, when the target information is an inactive wireless network temporary identifier of the terminal device, the target information may also include the fifth identifier information of the terminal device and the second identifier information of the second network device.

[0458] Furthermore, the target information may also include radio access technology (RAT) information and public land mobile network (PLMN) information.

[0459] S1202, the terminal device sends target information to the first network device. Correspondingly, the first network device receives the target information.

[0460] In some feasible implementations, after obtaining the target information, the terminal device can send the target information to the first network device. Correspondingly, the first network device receives the target information.

[0461] In one alternative implementation, the terminal device may send the target information to the first network device upon triggering an RRC connection state recovery.

[0462] Furthermore, in this scenario, the terminal device can send an RRC resume request containing target information to the first network device. The first network device receives the RRC resume request and obtains the target information.

[0463] S1203, the first network device sends target information to the first access and mobility management function network element. Correspondingly, the first access and mobility management function network element receives the target information.

[0464] In some feasible implementations, after acquiring the target information, the first network device can send the target information to the first access and mobility management function network element. Correspondingly, the first access and mobility management function network element receives the target information. Here, the first access and mobility management function network element is responsible for the access and mobility management of the terminal device.

[0465] In one alternative implementation, the first network device may send target information to the first access and mobility management function network element if it determines that it cannot directly obtain the terminal device context of the terminal device from the second network device.

[0466] For example, if the first network device determines that its interface with the second network device is not working, and it determines that it cannot directly obtain the terminal device context of the terminal device from the second network device, then it can send target information to the first access and mobility management function network element.

[0467] For example, if the first network device sends a context retrieval request to the second network device but the second network device does not respond, it can be determined that the first network device cannot directly obtain the terminal device context of the terminal device from the second network device, and then the target information can be sent to the first access and mobility management function network element.

[0468] Here, target information is sent only when it cannot be obtained directly from the second network device, which avoids repeatedly obtaining the terminal device context and saves communication resources.

[0469] S1204, the first access and mobility management function network element obtains the terminal device context of the terminal device based on the tracking area information of the second network device.

[0470] In some feasible implementations, after obtaining the target information, the first access and mobility management function network element can extract the tracking area information of the second network device contained in the target information, and obtain the terminal device context of the terminal device based on the tracking area information.

[0471] S1205, the first access and mobility management function network element sends the terminal device context of the terminal device to the first network device. Correspondingly, the first network device receives the terminal device context of the terminal device.

[0472] In some feasible implementations, after obtaining the context of the terminal device, the first access and mobility management function network element can send the terminal device context of the terminal device to the first network device. Correspondingly, the first network device receives the terminal device context.

[0473] Optionally, the terminal device context may include the terminal device's fifth identification information, the identification information of at least one session of the terminal device, the identification information of at least one session management function network element, and the session state information of each session in the at least one session of the terminal device. Here, the aforementioned at least one session management function network element is used to manage at least one session of the terminal device.

[0474] Optionally, the terminal device context may also include the terminal device's authorization information, the terminal device's Quality of Service (QoS) flow information, etc.

[0475] In the above scheme, the terminal device proactively provides the tracking area information of the anchor network device to the first network device it is currently connected to. Therefore, even if the first network device directly obtains the terminal device context from the anchor network device, it can still obtain the terminal device context through this tracking area information. This avoids RRC connection recovery failures caused by the first network device's inability to obtain the terminal device context, improving the success rate of RRC connection recovery and reducing the impact of RRC connection recovery failures.

[0476] In some possible implementations, the first access and mobility management function network element can use various methods to obtain the terminal device context of the terminal device based on the tracking area information of the second network device, which will be described below.

[0477] Optionally, as shown in Figure 12, one method for obtaining the terminal device context may include the following steps:

[0478] S12041, the first access and mobility management function network element determines that the first tracking area information range of the first access and mobility management function network element includes the tracking area information of the second network device.

[0479] In some feasible implementations, the first access and mobility management function network element can obtain the first tracking area information range it manages. Then, the first access and mobility management function network element can determine whether the first tracking area information range includes the tracking area information of the second network device. If it is determined that it does, then the following step S12042 can be executed.

[0480] It should be understood that, in the embodiments of this application, the scope of the first tracking area information includes the tracking area information of the second network device, and can also be understood as the first access and mobility management function network element managing the second network device.

[0481] In step S12042, the first access and mobility management function network element sends a context retrieval request to the second network device. Correspondingly, the first network device receives the context retrieval request.

[0482] In some feasible implementations, the first access and mobility management function network element may send a context retrieval request for the terminal device to the second network device. This context retrieval request may include the aforementioned target information. This context retrieval request can be used to request the second network device to provide the terminal device context.

[0483] Correspondingly, the second network device receives the context retrieval request and obtains the target information.

[0484] S12043, the second network device sends a context retrieval response to the first access and mobility management function network element. Correspondingly, the first access and mobility management function network element receives the context retrieval response.

[0485] In some feasible implementations, after obtaining the target information, the second network device can query the terminal device context of the terminal device based on the fifth identification information of the terminal device included in the target information. Then, the second network device can generate a context retrieval response containing the terminal device context and send the context retrieval response to the first access and mobility management function network element.

[0486] Correspondingly, the first access and mobility management function network element receives the context retrieval response and obtains the terminal device context of the terminal device.

[0487] Optionally, as shown in Figure 12, the second method for obtaining the terminal device context may include the following steps:

[0488] S12044, the first access and mobility management function network element determines that the first tracking area information range of the first access and mobility management function network element does not include the tracking area information of the second network device.

[0489] In some feasible implementations, after the first access and mobility management function network element obtains the first tracking area information range it manages, if it determines that the first tracking area information range does not include the tracking area information of the second network device, it can perform the following step S12045.

[0490] It should be understood that, in the embodiments of this application, the first tracking area information range does not include the tracking area information of the second network device, and can also be understood as the first access and mobility management function network element not managing the second network device.

[0491] S12045, the first access and mobility management function (AMU) network element sends target information to the second AMU network element. Correspondingly, the second AMU network element receives the target information.

[0492] In some feasible implementations, after determining that the first tracking area information range does not include the tracking area information of the second network device, the first access and mobility management function network element may send target information to the second access and mobility management function network element. Correspondingly, the second access and mobility management function network element receives the target information.

[0493] In one feasible implementation, the second access and mobility management function (MLM) network element can be discovered by the first MLM network element, and the second tracking area information range corresponding to the second MLM network element includes the tracking area information of the second network device. In other words, the second network device is managed by the second MLM network element.

[0494] It should be understood that the first access and mobility management function network element can discover the second access and mobility management function network element in various possible ways, and this application does not limit this.

[0495] S12046, the second access and mobility management function network element determines that the second tracking area information range of the second access and mobility management function network element includes the tracking area information of the second network device.

[0496] In some feasible implementations, the second access and mobility management function network element can obtain the range of the second tracking area information it manages and determine whether the range of the second tracking area information includes the tracking area information of the second network device. If it is determined to be yes, then the following step S12047 can be executed.

[0497] S12047, the second access and mobility management function network element sends a context retrieval request to the second network device. Correspondingly, the second network device receives the context retrieval request.

[0498] In some feasible implementations, the second access and mobility management function network element may send a context retrieval request for the terminal device to the second network device. This context retrieval request includes the aforementioned target information. This context retrieval request is used to request the second network device to provide the terminal device context of the terminal device.

[0499] Correspondingly, the second network device receives the context retrieval request and obtains the target information.

[0500] S12048, the second network device sends a context retrieval response to the second access and mobility management function network element. Correspondingly, the second access and mobility management function network element receives the context retrieval response.

[0501] In some feasible implementations, after obtaining the target information, the second network device can query the terminal device context of the terminal device based on the fifth identification information of the terminal device included in the target information. Then, the second network device can generate a context retrieval response containing the terminal device context and send the context retrieval response to the second access and mobility management function network element.

[0502] Correspondingly, the first access and mobility management function network element receives the context retrieval response and obtains the terminal device context of the terminal device.

[0503] S12049, the second access and mobility management function (AM) network element sends the terminal device context of the terminal device to the first AM network element. Correspondingly, the first AM network element receives the terminal device context of the terminal device.

[0504] In some possible implementations, as shown in Figure 12, the method may also include the following steps:

[0505] S1206, the first network device sends an RRC connection restoration instruction to the terminal device. Correspondingly, the terminal device receives the RRC connection restoration instruction.

[0506] In some feasible implementations, after obtaining the terminal device context of the terminal device, the first network device can send an RRC connection recovery indication to the terminal device to instruct the terminal device to complete the recovery of the RRC connection state. Accordingly, the terminal device receives the RRC connection recovery indication and continues to complete the recovery of the RRC connection state.

[0507] S1207, the terminal device sends an RRC connection restoration completion indication to the first network device. Correspondingly, the first network device receives the RRC connection restoration completion indication.

[0508] In some feasible implementations, after the terminal device completes the restoration of the RRC connection state, it can send an RRC connection restoration completion indication to the first network device. Correspondingly, the first network device receives the RRC connection restoration completion indication and determines, based on this indication, that the terminal device has completed the restoration of the RRC connection state.

[0509] The communication method provided by the embodiments of this application has been described in detail above with reference to Figures 1 to 12. The communication device provided by the embodiments of this application will now be described in detail with reference to Figures 13 and 14. It should be understood that the description of the embodiments of the communication device corresponds to the description of the embodiments of the communication method; therefore, any parts not described in detail can be referred to the foregoing method embodiments.

[0510] It is understood that, in order to achieve the functions in the above embodiments, the first session management function network element in the methods shown in Figures 4 to 11, the first network element in the methods shown in Figures 4 to 5, the first network device in the methods shown in Figures 9 to 11, the terminal device in the methods shown in Figures 6 to 8, the first network device in the methods shown in Figures 6 to 8, the terminal device in the method shown in Figure 12, the first access and mobility management function network element in the method shown in Figure 12, or the first network device in the method shown in Figure 12 includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and method steps of the various examples described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware, software, or a combination of hardware and software. Whether a certain function is executed in hardware, software, or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0511] Please refer to Figure 13, which is a schematic diagram of the structure of a communication device provided in this application. As shown in Figure 13, the communication device 130 may include a processing unit 131 and a transceiver unit 132. The processing unit 131 and the transceiver unit 132 may be software, hardware, or a combination of software and hardware.

[0512] The transceiver unit 132 may include a sending unit and a receiving unit. The sending unit is used to implement the sending function, and the receiving unit is used to implement the receiving function. The transceiver unit 132 can implement both sending and / or receiving functions. The transceiver unit can also be described as a communication unit.

[0513] Optionally, the transceiver unit 132 can be used to receive information sent by other devices, and can also be used to send information to other devices. The processing unit 131 can be used to perform internal processing of the device.

[0514] In one possible design, the communication device 130 may correspond to the first session management function network element involved in the methods shown in Figures 4 to 11. For example, the communication device 130 may be the first session management function network element or a chip within the first session management function network element. The communication device 130 may include units for performing the operations performed by the first session management function network element in the methods shown in Figures 4 to 11, and each unit in the communication device 130 is respectively for implementing the operations performed by the first session management function network element in the methods shown in Figures 4 to 11.

[0515] For example, the transceiver unit 132 can be used to receive a first message. The first message can be used to indicate that the terminal device has undergone a radio access network change, and the first message includes at least one of the following: first identification information of a first network device and a radio access network change indication for the terminal device. Alternatively, the first message can be used to request an update to the first session, and the first message includes the first identification information of the first network device. Here, the first network device is the network device currently accessed by the terminal device, and the first network device is directly connected to the first session management function network element. The processing unit 131 is used to update the target session context according to the first message, so that the updated target session context does not include the second identification information of the second network device. The target session context is the session context of the first session, and the second network device is the anchor network device of the terminal device.

[0516] For example, when the first message is used to indicate that the terminal device has undergone a radio access network change and the first message includes at least one of the first identification information of the first network device and the radio access network change indication of the terminal device, the processing unit 131 is used to delete the second identification information of the second network device included in the target session context according to the first message to obtain an updated target session context.

[0517] For example, processing unit 131 can be used to delete the second identification information of the second network device included in the target session context when the first message includes a wireless access network replacement indication of the terminal device, so as to obtain an updated target session context.

[0518] For example, when the first message is used to indicate that the terminal device has undergone a radio access network change and the first message includes at least one of the first identification information of the first network device and the radio access network change instruction of the terminal device, the processing unit 131 is used to replace the second identification information of the second network device included in the target session context with the first identification information of the first network device according to the first message, so as to obtain an updated target session context.

[0519] For example, if the first message includes the first identification information of the first network device, the processing unit 131 is used to replace the second identification information of the second network device included in the target session context with the first identification information of the first network device to obtain the updated target session context.

[0520] For example, when the first message is used to indicate that a terminal device has undergone a radio access network change and the first message includes at least one of first identification information and a radio access network change indication, the first message may originate from a first network element. The first network element is used to store the terminal device context of the terminal device or to be responsible for the access management of the terminal device.

[0521] For example, the transceiver unit 132 can send a second message to the first network element when the first condition is met. This second message can be used to subscribe to mobility events of the terminal device. Alternatively, the second message can be used to trigger the first network element to send a first message to the first session management function network element.

[0522] For example, the first condition may include at least one of the following: a first session is established, the first session is in an active state, or the terminal device enters an RRC inactive state.

[0523] For example, when the first condition includes the terminal device entering an RRC inactive state, the transceiver unit 132 is configured to receive an RRC inactive state indication from the terminal device. Here, the RRC inactive state indication from the terminal device is used to indicate that the terminal device is in an RRC inactive state. The processing unit 131 is configured to determine that the terminal device is in an RRC inactive state based on the RRC inactive state indication, and thus determine that the first condition is met.

[0524] For example, the second message may include a radio access network replacement notification request corresponding to the terminal device. Furthermore, the second message may also include the fifth identification information of the terminal device.

[0525] For example, if the second condition is met, the transceiver unit 132 is used to send a third message to the first network element. This third message is used to unsubscribe from the mobility events of the terminal device.

[0526] For example, the second condition may include at least one of the following: the first session is released, the first session is in a deactivated state, or the terminal device leaves the RRC inactive state. Here, the terminal device leaving the RRC inactive state can also be understood as the terminal device being removed from the RRC inactive state.

[0527] For example, the first network element may include a first access and mobility management function network element or a unified database network element.

[0528] For example, when the first message is used to indicate that the terminal device has undergone a wireless access network change and the first message includes at least one of the first identification information of the first network device and the wireless access network change instruction of the terminal device, the first message may also include the fifth identification information of the terminal device.

[0529] For example, when the first message is used to request an update to the first session and the first message includes the first identification information of the first network device, the first message may originate from the first network device.

[0530] For example, when the first message is used to request an update of the first session and the first message includes the first identification information of the first network device, the processing unit 131 is used to replace the second identification information of the second network device in the target session context with the first identification information of the first network device to obtain the updated target session context.

[0531] For example, the first message may further include access network tunnel information of the first network device. The transceiver unit 132 is used to send the access network tunnel information of the first network device to the user plane function network element, so that the user plane function network element replaces the access network tunnel information corresponding to the second network device that it stores with the access network tunnel information corresponding to the first network device.

[0532] For example, the transceiver unit 132 is configured to send a session context release message to the second network device to instruct the second network device to release its stored target session context. Optionally, the session context release message may include third identification information of the first session.

[0533] For example, when the first message is used to request an update to the first session and includes the first identification information of the first network device, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may further include a session modification indication for the first session or a session modification message corresponding to the first session.

[0534] In one possible design, the communication device 130 may correspond to the first network element in the method shown in Figures 4 and 5. For example, the communication device 130 may be the first network element or a chip within the first network element. The communication device 130 may include units for performing the operations performed by the first network element in the method shown in Figures 4 and 5, and each unit in the communication device 130 is respectively responsible for implementing the operations performed by the first network element in the method shown in Figures 4 and 5.

[0535] For example, transceiver unit 132 is configured to receive a second message from a first session management function network element. This second message is used to subscribe to mobility events of the terminal device. The first network element is used to store the terminal device context of the terminal device or to manage the access of the terminal device. The first session management function network element is used to manage the first session of the terminal device. Transceiver unit 132 is also configured to send a first message to the first session management function network element. This first message is used to indicate that the terminal device has undergone a radio access network change, and the first message includes at least one of the following: first identification information of a first network device and a radio access network change indication of the terminal device. The first network device is the network device currently accessed by the terminal device.

[0536] For example, the first message can be used by the first session management function network element to update the target session context of the aforementioned first session, so that the updated target session context does not include the second identification information of the second network device. Here, the second network device is the anchor network device of the terminal device.

[0537] For example, the second message may include a radio access network replacement notification request corresponding to the terminal device. Optionally, the second message may also include the fifth identification information of the terminal device.

[0538] For example, the transceiver unit 132 can be used to send a first message to the first session management function network element when a third condition is met. The third condition includes at least one of the following: receiving a fourth message from the first network device where the fourth message is used to update the location information of the terminal device; determining that the terminal device has undergone a radio access network change in the absence of RRC connection recovery; or determining that the terminal device has undergone a radio access network change in a non-handover scenario.

[0539] For example, the fourth message may be a mobile registration update message sent by the terminal device through the first network device.

[0540] For example, the first network element may include a first access and mobility management function network element.

[0541] For example, the first network element may include a unified database network element.

[0542] For example, when the first network element includes a unified database network element, the first message is sent by the unified database network element.

[0543] In one possible design, the communication device 130 may correspond to the first network device in the methods shown in Figures 9 to 11. For example, the communication device 130 may be the first network device or a chip within the first network device. The communication device 130 may include units for performing the operations performed by the first network device in the methods shown in Figures 9 to 11, and each unit in the communication device 130 is respectively for implementing the operations performed by the first network device in the methods shown in Figures 9 to 11.

[0544] For example, processing unit 131 is used to obtain the terminal device context of the terminal device. The terminal device context includes third identification information of the first session and fourth identification information of the first session management function network element, which manages the first session. Transceiver unit 132 is used to send a first message to the first session management function network element. This first message requests an update to the first session, and includes first identification information of a first network device, which is the network device currently accessed by the terminal device.

[0545] For example, the first message can be used by the first session management function network element to update the target session context of the aforementioned first session, so that the updated target session context does not include the second identification information of the second network device. Here, the second network device is the anchor network device of the terminal device.

[0546] For example, transceiver unit 132 is configured to send a fifth message to the first network element. This fifth message requests the terminal device context of the terminal device. Transceiver unit 132 is also configured to receive a sixth message from the first network element. This sixth message includes the terminal device context of the terminal device. The first network element is configured to store the terminal device context of the terminal device or to be responsible for the access management of the terminal device.

[0547] For example, the fifth message mentioned above can be a mobile registration update message for the terminal device.

[0548] For example, the sixth message may also include the fifth identification information of the terminal device.

[0549] For example, transceiver unit 132 can be used to send the aforementioned fifth message to the first network element in the event that the RRC connection of the terminal device fails to be restored. Alternatively, transceiver unit 132 can be used to send the aforementioned fifth message to the first network element when an RRC connection is established between the first network device and the terminal device.

[0550] For example, the terminal device context of the terminal device may be provided to the first network element by the second network device. For instance, the terminal device context may be sent by the second network device to the first network element when it is determined that the terminal device has entered an RRC inactive state.

[0551] For example, the first network element may include a first access and mobility management function network element or a unified database network element.

[0552] For example, if the RRC connection of the terminal device is successfully restored, the transceiver unit 132 can be used to send a context retrieval request for the terminal device to a second network device. The second network device is the anchor network device of the terminal device. The transceiver unit 132 can also be used to receive a context retrieval response from the second network device. This context retrieval response includes the terminal device context of the terminal device.

[0553] For example, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may further include a session modification indication for the first session or a session modification message corresponding to the first session.

[0554] For example, the transceiver unit 132 is further configured to send an eighth message to the second session management function network element. This eighth message requests the second session management function network element to update the session context of the second session, and the updated session context of the second session does not contain the second identification information of the aforementioned second network device. The eighth message includes the sixth identification information of the second session.

[0555] In one possible design, the communication device 130 may correspond to the terminal device in the methods shown in Figures 6 to 8. For example, the communication device 130 may be the terminal device itself, or it may be a chip within the terminal device. The communication device 130 may include units for performing the operations executed by the terminal device in the methods shown in Figures 6 to 8, and each unit in the communication device 130 is respectively for implementing the operations executed by the terminal device in the methods shown in Figures 6 to 8.

[0556] For example, in the event of a failed Radio Resource Control (RRC) connection recovery, transceiver unit 132 is configured to send a fourth message to a first network device. This fourth message can be used to update the location information of the terminal device, where the first network device is the network device currently accessed by the terminal device. Transceiver unit 132 is also configured to send a seventh message to the first network device. This seventh message can be used to request an update to the terminal device's first session, and includes third identification information for the first session, which is managed by a first session management function network element.

[0557] For example, the seventh message mentioned above may also include a session modification instruction corresponding to the first session.

[0558] For example, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may further include a session modification indication or a session modification message corresponding to the first session.

[0559] For example, the seventh message may also include the sixth identification information of the second session of the terminal device. It should be understood that the second session can be managed by a second session management function network element other than the first session management function network element described above. Optionally, the seventh message may also include a session modification instruction for the second session or a session modification message corresponding to the second session.

[0560] For example, the transceiver unit is further configured to send a twelfth message to the first network device. This twelfth message is used to request an update to the second session of the terminal device. The twelfth message includes the sixth identification information of the aforementioned second session, which is managed by the second session management function network element.

[0561] In one possible design, the communication device 130 may correspond to the first network device in the methods shown in Figures 9 to 11. For example, the communication device 130 may be the first network device or a chip within the first network device. The communication device 130 may include units for performing the operations performed by the first network device in the methods shown in Figures 9 to 11, and each unit in the communication device 130 is respectively for implementing the operations performed by the first network device in the methods shown in Figures 9 to 11.

[0562] For example, transceiver unit 132 is configured to receive a fourth message sent by the terminal device in the event of an RRC connection session failure. This fourth message can be used to update the location information of the terminal device, where the first network device is the network device currently accessed by the terminal device. Transceiver unit 132 is also configured to receive a seventh message from the terminal device. This seventh message can be used to request an update to the terminal device's first session, and includes the third identification information of the first session, which is managed by the first session management function network element. The first network device sends a first message to the first session management function network element, where the first message can be used to request an update to the first session.

[0563] For example, the seventh message mentioned above may also include a session modification instruction corresponding to the first session.

[0564] For example, the first message may further include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Optionally, the first message may further include a session modification indication or a session modification message corresponding to the first session.

[0565] For example, transceiver unit 132 can be used to send a ninth message to a unified database network element or a network function library network element. The ninth message may include third identification information of the first session. Transceiver unit 132 can also be used to receive a tenth message from a unified database network element or a network function library network element, wherein the tenth message includes fourth identification information of a first session management function network element that manages the aforementioned first session.

[0566] For example, the seventh message mentioned above also includes the fourth identification information of the first session management function network element.

[0567] For example, transceiver unit 132 may receive an eleventh message from a first access and mobility management function network element. This eleventh message includes identification information for multiple sessions, and identification information for multiple session management function network elements managing these multiple sessions. It should be understood that the multiple sessions include at least the aforementioned first session, and the identification information of the multiple session management function network elements includes at least fourth identification information of the first session management function network element. Processing unit 131 may be used to determine, based on the eleventh message, the fourth identification information of the first session management function network element used to manage the first session.

[0568] For example, the seventh message may also include the sixth identification information of the second session of the terminal device. It should be understood that the second session may be managed by a second session management function network element other than the first session management function network element. Alternatively, the transceiver unit 132 may be used to receive a twelfth message from the terminal device, which may be used to request an update to the second session of the terminal device. This twelfth message includes the sixth identification information of the second session, and the second session is managed by the second session management function network element.

[0569] For example, the transceiver unit 132 can be used to send an eighth message to the second session management function network element. This eighth message requests the second session management function network element to update the session context of the second session, and the updated session context of the second session does not contain the second identification information of the second network device. The eighth message includes the sixth identification information of the second session. Further, the eighth message may also include the fifth identification information of the terminal device and the access network tunnel information of the first network device. Further, the eighth message may also include a session modification indication or a session modification message corresponding to the second session.

[0570] For example, the ninth message may also include the sixth identification information of the second session. The tenth message may also include the seventh identification information of the second session management function network element that manages the second session.

[0571] For example, the seventh message may also include the seventh identification information of the second session management function network element.

[0572] For example, the multiple sessions in the above eleventh message may also include a second session, and the identification information of the multiple session management function network elements may also include the seventh identification information of the second session management function network element.

[0573] In one possible design, the communication device 130 may correspond to the terminal device in the method shown in FIG12. For example, the communication device 130 may be the terminal device itself or a chip within the terminal device. The communication device 130 may include units for performing the operations performed by the terminal device in the method shown in FIG12, and each unit in the communication device 130 is respectively for implementing the operations performed by the terminal device in the method shown in FIG12.

[0574] For example, processing unit 131 is used to acquire target information. This target information includes tracking area information of a second network device, which is the anchor network device of the terminal device. Transceiver unit 132 is used to send the target information to a first network device. This first network device is the network device currently accessed by the terminal device, and the tracking area information in the target information can be used to enable the first network device to obtain the terminal device context of the terminal device.

[0575] For example, the target information could be a temporary identifier of an inactive wireless network for a terminal device.

[0576] For example, the target information may also include the fifth identification information of the terminal device and the second identification information of the second network device.

[0577] For example, the aforementioned target information can be carried in an RRC connection recovery request sent by the terminal device to the first network device.

[0578] In one possible design, the communication device 130 may correspond to the first access and mobility management function (MLM) network element in the method shown in FIG12. For example, the communication device 130 may be the first MLM network element or a chip within the first MLM network element. The communication device 130 may include units for performing the operations performed by the first MLM network element in the method shown in FIG12, and each unit in the communication device 130 is respectively responsible for implementing the operations performed by the first MLM network element in the method shown in FIG12.

[0579] For example, the transceiver unit 132 can be used to receive target information from a first network device. This target information may include tracking area information from a second network device, where the first network device is the network device currently accessed by the terminal device, and the second network device is the anchor network device of the terminal device. The processing unit 131 can be used to obtain the terminal device context of the terminal device based on the tracking area information. The transceiver unit 132 is also used to send the obtained terminal device context to the first network device.

[0580] For example, when the first tracking area information range corresponding to the first access and mobility management function network element includes tracking area information, or when the first access and mobility management function network element manages the second network device, the transceiver unit 132 can be used to send a context retrieval request for the terminal device to the second network device. The context retrieval request may include the aforementioned target information. The transceiver unit 132 can also be used to receive a context retrieval response from the second network device. The context retrieval response may include the terminal device context of the terminal device.

[0581] For example, when the first tracking area information range corresponding to the first access and mobility management function (AMU) network element does not include tracking area information, or in other words, when the first AMU network element does not manage the second network device, the transceiver unit 132 can be used to send target information to the second AMU network element. Here, the second tracking area information range corresponding to the second AMU network element includes the tracking area information in the target information. Alternatively, the second AMU network element manages the aforementioned second network device. The transceiver unit 132 can be used to receive terminal device context from the second AMU network element.

[0582] In one possible design, the communication device 130 may correspond to the first network device in the method shown in FIG12, such as the communication device 130 being the first network device or a chip within the first network device. The communication device 130 may include units for performing the operations performed by the first network device in the method shown in FIG12, and each unit in the communication device 130 is respectively for implementing the operations performed by the first network device in the method shown in FIG12.

[0583] For example, transceiver unit 132 can be used to receive target information from a terminal device. The target information may include tracking area information of a second network device. Here, the first network device is the network device currently accessed by the terminal device, and the second network device is the anchor network device of the terminal device. Transceiver unit 132 can be used to send the target information to a first access and mobility management function (AM) network element. Transceiver unit 132 can also be used to receive terminal device context from the first AM network element. It should be understood that the terminal device context of the terminal device can be obtained by the first AM network element based on the target information.

[0584] For example, the transceiver unit 132 may send the aforementioned target information to the first access and mobility management function network element when the processing unit 131 determines that the first network device cannot directly obtain the terminal device context of the terminal device from the second network device.

[0585] Please refer to Figure 14, which is a schematic diagram of another communication device provided in this application. This communication device 140 can be used to implement the operations performed by the first session management function network element in the methods shown in Figures 4 to 11, the first network element in the methods shown in Figures 4 to 5, the first network device in the methods shown in Figures 9 to 11, the terminal device in the methods shown in Figures 6 to 8, the first network device in the methods shown in Figures 6 to 8, the terminal device in the method shown in Figure 12, the first access and mobility management function network element in the method shown in Figure 12, or the first network device in the method shown in Figure 12. Alternatively, the communication device 140 can be the first session management function network element in the methods shown in Figures 4 to 11, the first network element in the methods shown in Figures 4 to 5, the first network device in the methods shown in Figures 9 to 11, the terminal device in the methods shown in Figures 6 to 8, the first network device in the methods shown in Figures 6 to 8, the terminal device in the method shown in Figure 12, the first access and mobility management function network element in the method shown in Figure 12, or the first network device in the method shown in Figure 12. The communication device 140 includes a processor 141, a memory 142, and a bus system 143.

[0586] Memory 142 is used to store related instructions and data. Memory 142 stores the following elements: executable modules or data structures, or subsets thereof, or extended sets thereof:

[0587] Operation instructions: This includes various operation instructions used to perform various operations.

[0588] Operating system: includes various system programs used to implement various basic business functions and handle hardware-based tasks.

[0589] Figure 14 shows only one memory, but of course, multiple memories can be set as needed.

[0590] The communication device 140 may further include a transceiver 144. The transceiver 144 may be a communication module or a transceiver circuit. In the embodiments of this application, the transceiver 144 is used to perform the message or information transmission and reception operations involved in the methods shown in Figures 4 to 12 above.

[0591] Processor 141 may be a controller, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. Processor 141 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0592] In specific applications, the various components of the communication device 140 are coupled together through a bus system 143. This bus system 143 may include, in addition to a data bus, a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 143 in Figure 14. Figure 14 is only schematically illustrated for ease of representation.

[0593] In specific implementation, the communication device 140 can execute the steps of the methods executed by the first session management function network element in the methods shown in Figures 4 to 11, the first network element in the methods shown in Figures 4 to 5, the first network device in the methods shown in Figures 9 to 11, the terminal device in the methods shown in Figures 6 to 8, the first network device in the methods shown in Figures 6 to 8, the terminal device in the method shown in Figure 12, the first access and mobility management function network element in the method shown in Figure 12, or the first network device in the method shown in Figure 12. Specifically, when the communication device 140 is used to implement the various steps performed by the first session management function network element in the methods shown in Figures 4 to 11, the first network element in the methods shown in Figures 4 to 5, the first network device in the methods shown in Figures 9 to 11, the terminal device in the methods shown in Figures 6 to 8, the first network device in the methods shown in Figures 6 to 8, the terminal device in the method shown in Figure 12, the first access and mobility management function network element in the method shown in Figure 12, or the first network device in the method shown in Figure 12, the processor 141 can implement the function of the processing unit 131, and the transceiver 144 is used to implement the function of the transceiver unit 132.

[0594] It should be noted that in practical applications, the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0595] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memory.

[0596] This application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a computer, implements the method steps performed by the first session management function network element, the first network element, the first network device, the first network device, the terminal device, the first network device, the terminal device, the first access and mobility management function network element, or the first network device in the method shown in Figures 4 to 11, Figures 6 to 8, Figures 6 to 8, Figures 12, or Figures 12.

[0597] This application also provides a computer program product that, when executed by a computer, implements the method steps performed by the first session management function network element in the methods shown in Figures 4 to 11, the first network element in the methods shown in Figures 4 to 5, the first network device in the methods shown in Figures 9 to 11, the terminal device in the methods shown in Figures 6 to 8, the first network device in the methods shown in Figures 6 to 8, the terminal device in the method shown in Figure 12, the first access and mobility management function network element in the method shown in Figure 12, or the first network device in the method shown in Figure 12.

[0598] This application also provides a chip, which includes at least a processor. The processor is configured to execute computer execution instructions to cause a device equipped with the chip to perform the method steps executed by the first session management function network element in the methods shown in Figures 4 to 11, the first network element in the methods shown in Figures 4 to 5, the first network device in the methods shown in Figures 9 to 11, the terminal device in the methods shown in Figures 6 to 8, the first network device in the methods shown in Figures 6 to 8, the terminal device in the method shown in Figure 12, the first access and mobility management function network element in the method shown in Figure 12, or the first network device in the method shown in Figure 12.

[0599] Optionally, the chip may also include interface circuitry. This interface circuitry is used to receive computer execution instructions and transmit them to the processor.

[0600] This application also provides a chip system including a processor for supporting the devices equipped with the chip system in implementing the method steps performed by the first session management function network element, the first network element, the first network device, the first network device, the terminal device, the first network device, the terminal device, the first access and mobility management function network element, or the first network device in the method shown in Figures 4 to 11, Figures 6 to 8, Figure 12, or Figure 12. For example, generating or processing the data and / or information involved in the above methods. In one possible design, the chip system further includes a memory for storing program instructions and data necessary for the data transmission device. The chip system may be composed of a chip or may include chips and other discrete devices.

[0601] In the above method 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 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 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 access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0602] In the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of different embodiments are consistent and can be referenced by each other. The technical features of different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0603] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process or execution thread, and components may be located on a single computer or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).

[0604] It should be understood that the term "embodiment" used throughout this specification means that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, various embodiments throughout this specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0605] It should be understood that in the embodiments of this application, the designations "first", "second", etc. are only for distinguishing different objects, such as different network devices, and do not constitute a limitation on the scope of the embodiments of this application. The embodiments of this application are not limited thereto.

[0606] It should also be understood that in this application, “when…”, “if” and “if” all refer to the network element making a corresponding processing under certain objective circumstances, and are not time-limited, nor do they require the network element to make a judgment when it is implemented, nor do they mean that there are other limitations.

[0607] It should also be understood that in the embodiments of this application, "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.

[0608] It should also be understood that the term "and / or" in this article 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 article generally indicates that the preceding and following related objects have an "or" relationship.

[0609] In this application, expressions such as "the item includes one or more of the following: A, B, and C" generally mean, unless otherwise specified, that the item can be any one of the following: A; B; C; A and B; A and C; B and C; A, B and C; A and A; A, A and A; A, A and B; A, A and C, A, B and B; A, C and C; B and B, B, B and B, B, B and C, C and C; C, C and C, and other combinations of A, B, and C. The above example uses three elements, A, B, and C, to illustrate the possible entries for the item. When expressed as "the item includes at least one of the following: A, B, ..., and X," that is, when the expression contains more elements, then the applicable entries for the item can also be obtained according to the aforementioned rules.

[0610] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0611] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0612] 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.

[0613] 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.

[0614] 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.

[0615] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0616] 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 communication method characterized by comprising: The method is suitable for a first session management function network element for managing a first session of a terminal device, and comprises the following steps: receiving a first message, wherein the first message is used to indicate that the terminal device has a radio access network replacement, and the first message comprises at least one of first identification information of a first network device and a radio access network replacement indication of the terminal device, or the first message is used to request to update the first session, and the first message comprises first identification information of a first network device, the first network device being a network device currently accessed by the terminal device, and the first network device being directly connected to the first session management function network element; updating a target session context according to the first message, wherein the target session context is a session context of the first session, and the updated target session context does not comprise second identification information of a second network device, the second network device being an anchor network device of the terminal device.

2. The method of claim 1, wherein, In a case where the first message is used to indicate that the terminal device has a radio access network replacement and the first message comprises at least one of the first identification information and the radio access network replacement indication, the first message is from a first network element, and the first network element is used to store a terminal device context of the terminal device or is responsible for access management of the terminal device.

3. The method of claim 2, wherein, The method further comprises the following steps: in a case where a first condition is met, sending a second message to the first network element, wherein the second message is used to subscribe to a mobility event of the terminal device, and the first condition comprises at least one of the following: the first session is established, the first session is in an active state, and the terminal device enters a radio resource control (RRC) inactive state.

4. The method of claim 3, wherein, The first condition comprises that the terminal device enters the RRC inactive state, and the method further comprises the following steps: receiving an RRC inactive state indication of the terminal device; determining that the first condition is met based on the RRC inactive state indication.

5. The method according to claim 3 or 4, characterized in that, The second message comprises a radio access network replacement notification request corresponding to the terminal device.

6. The method according to any one of claims 2-5, characterized in that, The step of updating the target session context according to the first message comprises the following steps: in a case where the first message comprises the first identification information, replacing second identification information in the target session context with the first identification information to obtain an updated target session context.

7. The method according to any one of claims 2 to 6, characterized in that, The step of updating the target session context according to the first message comprises the following steps: in a case where the first message comprises the radio access network replacement indication, deleting the second identification information in the target session context to obtain an updated target session context.

8. The method according to any one of claims 2 to 7, characterized in that, The method further comprises the following steps: in a case where a second condition is met, sending a third message to the first network element, wherein the third message is used to unsubscribe from the mobility event of the terminal device, and the second condition comprises at least one of the following: the first session is released, the first session is in a deactivated state, and the terminal device leaves the RRC inactive state.

9. The method of claim 1, wherein, In a case where the first message is used for requesting to update the first session and the first message comprises first identification information of the first network device, the first message is from the first network device.

10. A communication method characterized by comprising: The method is suitable for a first network element, the first network element is used for storing a terminal device context of a terminal device or is used for being responsible for access management of the terminal device, and the method comprises: receiving a second message from a first session management function network element, wherein the second message is used for subscribing to a mobility event of the terminal device, and the first session management function network element is used for managing a first session of the terminal device; sending a first message, wherein the first message is used for indicating that radio access network replacement of the terminal device occurs, and the first message comprises at least one of first identification information of a first network device and a radio access network replacement indication of the terminal device, the first network device being a network device currently accessed by the terminal device.

11. The method of claim 10, wherein, The second message comprises a radio access network replacement notification request corresponding to the terminal device.

12. The method according to claim 10 or 11, characterized in that, The sending of the first message comprises: sending the first message in a case where a third condition is met, wherein the third condition comprises at least one of the following: receiving a fourth message from the first network device, and the fourth message is used for updating location information of the terminal device; and determining that the terminal device occurs radio access network replacement in a case where non-RRC connection recovery occurs.

13. A communication method characterized by comprising: The method is suitable for a first network device, and the method comprises: obtaining a terminal device context of a terminal device, wherein the terminal device context comprises third identification information of a first session and fourth identification information of a first session management function network element, and the first session management function network element is used for managing the first session; sending a first message to the first session management function network element, wherein the first message is used for requesting to update the first session, and the first message comprises first identification information of a first network device, the first network device being a network device currently accessed by the terminal device.

14. The method of claim 13, wherein, The obtaining of the terminal device context of the terminal device comprises: sending a fifth message to a first network element, wherein the fifth message is used for requesting a terminal device context of the terminal device, and the first network element is used for storing the terminal device context of the terminal device or is used for being responsible for access management of the terminal device; receiving a sixth message from the first network element, wherein the sixth message comprises the terminal device context of the terminal device.

15. The method of claim 14, wherein, The fifth message is sent by the first network device in a case where radio resource control (RRC) connection recovery of the terminal device fails. Alternatively, the fifth message is sent by the first network device in a case where an RRC connection is established between the terminal device and the first network device.

16. The method of claim 13, wherein, The obtaining of the terminal device context of the terminal device comprises: in a case where RRC connection recovery of the terminal device succeeds, sending a context retrieval request of the terminal device to a second network device, wherein the second network device is an anchor network device of the terminal device. receiving a context retrieval response from the second network device, wherein the context retrieval response comprises terminal device context of the terminal device.

17. A method of communication, comprising: The method is suitable for a terminal device, and the method comprises: In the case of a failure of a radio resource control (RRC) connection recovery, sending a fourth message to a first network device, wherein the fourth message is used to update location information of the terminal device, and the first network device is a network device currently accessed by the terminal device; sending a seventh message to the first network device, wherein the seventh message is used to request an update of a first session of the terminal device, and the seventh message comprises third identification information of the first session.

18. The method of claim 17, wherein, The first session is in an active state.

19. A method of communication, comprising: The method is suitable for a terminal device, and the method comprises: obtaining target information, wherein the target information comprises tracking area information of a second network device, and the second network device is an anchor network device of the terminal device; sending the target information to a first network device currently accessed, wherein the tracking area information is used to enable the first network device to obtain terminal device context of the terminal device.

20. A method of communication, comprising: The method is suitable for a first access and mobility management function (AMF) network element, and the method comprises: receiving target information from a first network device, wherein the target information comprises tracking area information of a second network device, the first network device is a network device currently accessed by a terminal device, and the second network device is an anchor network device of the terminal device; obtaining terminal device context of the terminal device according to the tracking area information; sending the terminal device context to the first network device.

21. The method of claim 20, wherein, The obtaining of the terminal device context according to the tracking area information comprises: in the case that a first tracking area information range corresponding to the first AMF network element comprises the tracking area information, sending a context retrieval request of the terminal device to the second network device, wherein the context retrieval request comprises the target information; receiving a context retrieval response from the second network device, wherein the context retrieval response comprises terminal device context of the terminal device.

22. The method of claim 20, wherein, The obtaining of the terminal device context according to the tracking area information comprises: in the case that a first tracking area information range corresponding to the first AMF network element does not comprise the tracking area information, sending the target information to a second AMF network element, wherein a second tracking area information range corresponding to the second AMF network element comprises the tracking area information; receiving terminal device context of the terminal device from the second AMF network element.

23. A method of communication, comprising: The method is suitable for a first network device, and the method comprises: receiving target information from a terminal device, wherein the target information comprises tracking area information of a second network device, the first network device is a network device currently accessed by the terminal device, and the second network device is an anchor network device of the terminal device; sending the target information to a first access and mobility management function network element; receiving a terminal device context of the terminal device from the first access and mobility management function network element.

24. The method of claim 23, wherein, The sending the target information to a first access and mobility management function network element comprises: In a case that the terminal device context of the terminal device cannot be directly obtained from the second network device, the sending the target information to a first access and mobility management function network element.

25. A communications device, characterized by The communication apparatus comprises modules or units for implementing the communication method according to any one of claims 1-9, according to any one of claims 10-12, according to any one of claims 13-16, according to claim 17 or 18, according to claim 19, according to any one of claims 20-22, or according to claim 23 or 24.

26. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program which, when executed, implements the communication method according to any one of claims 1-9, according to any one of claims 10-12, according to any one of claims 13-16, according to claim 17 or 18, according to claim 19, according to any one of claims 20-22, or according to claim 23 or 24.

27. A chip, characterized by comprises a processor; The processor is configured to execute computer-executable instructions to cause the apparatus in which the chip is installed to perform the communication method according to any one of claims 1-9, according to any one of claims 10-12, according to any one of claims 13-16, according to claim 17 or 18, according to claim 19, according to any one of claims 20-22, or according to claim 23 or 24.

28. The chip of claim 27, wherein, The chip further comprises an interface circuit configured to receive the computer-executable instructions and transmit the computer-executable instructions to the processor.

29. A computer program product configured to cause a computer to perform the communication method according to any one of claims 1-9, according to any one of claims 10-12, according to any one of claims 13-16, according to claim 17 or 18, according to claim 19, according to any one of claims 20-22, or according to claim 23 or 24.

30. A communications device, characterized by comprises: at least one processor and a memory; The memory is configured to store a computer program; The processor is configured to execute the computer program stored in the memory to cause the communication apparatus to perform the communication method according to any one of claims 1-9, according to any one of claims 10-12, according to any one of claims 13-16, according to claim 17 or 18, according to claim 19, according to any one of claims 20-22, or according to claim 23 or 24.

Citation Information

Patent Citations

  • Communication method and device

    CN109819530A

  • Mobility management for RRC_inactive user equipment

    CN110832917A

  • Ta update in RRC_inactive state

    CN112005614A

  • Communication method and device

    CN117440450A

  • Communication method and related device

    CN119095126A