Communication method and application device

By retaining session-related information during network handover and quickly deactivating or activating user-identified sessions, the problem of slow service recovery during terminal device handover is solved, enabling rapid restoration of user plane connections and improving the continuity and stability of network services.

CN122073754APending Publication Date: 2026-05-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-11-22
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

When terminal devices switch from the 5G core network to a communication system that does not support user ID-based services, existing technologies result in slow service recovery and an inability to quickly restore user ID-based services.

Method used

The first network element receives a message indicating that the terminal device has changed its network access type or user identifier, and sends a message to the second network element indicating whether to deactivate or activate the session in order to retain session-related information, reduce signaling interaction, and achieve rapid restoration of user plane connection.

Benefits of technology

It shortens the service recovery time during network handover, improves the continuity and stability of network services, and adapts to the stable service requirements under complex and high-frequency handover scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122073754A_ABST
    Figure CN122073754A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and an application device. The method comprises the steps that a first message is received, and the first message is used for indicating that the type of an access network of first terminal equipment is changed or the identification of a user using the first terminal equipment is changed; sending a second message to the second network element, the second message comprising identification information and first indication information, the first indication information being used for indicating to deactivate a session associated with the identification information; wherein the identification information comprises at least one of the following items: a first user identification, a session management context identification corresponding to the first user identification, and a session identification corresponding to the first user identification; the first user identifier is an identifier of a first user using the first terminal device. Through the technical scheme provided by the invention, the service based on the user identifier can be quickly recovered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a communication method and application device. Background Technology

[0002] Currently, when a terminal device connects to a 5G system (5GS), the 5G core network (5GC) typically identifies the user of the terminal device through a user identity (User ID) and provides differentiated services based on the needs of different users.

[0003] However, communication systems other than 5GS, such as Evolved Packet System (EPS), do not support user-identity-based services. Therefore, when a terminal device logged in with a particular user identity switches from a 5GS access network to a communication system access network that does not support user-identity-based services, the network releases all Protocol Data Unit (PDU) sessions associated with that user identity. When the terminal device switches back to a 5GS access network, the network needs to re-establish all PDU sessions associated with that user identity, severely impacting service recovery speed. Furthermore, in scenarios where the terminal device accesses the network from a 5GS perspective, when the user identity of the terminal device changes, the network releases all PDU sessions associated with that user identity. When the user identity re-logins to the terminal device, the network needs to re-establish all PDU sessions associated with that user identity, resulting in slow service recovery.

[0004] Therefore, how to quickly restore services based on user identifiers is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] This application provides a communication method and application device that can quickly restore services based on user identifiers.

[0006] In a first aspect, embodiments of this application provide a communication method. This method can be executed by a first network element, by a module applied to the first network element (e.g., a processor, chip, or chip system), or by a logical node, logical module, or software capable of implementing all or part of the functions of the first network element. Optionally, the first network element is an access and mobility management function (AMF). The method may include: receiving a first message; sending a second message to a second network element. The first message is used to indicate a change in the access network type of a first terminal device or a change in the user identifier of the first terminal device; the second message includes identification information and first indication information, the first indication information being used to indicate the deactivation of the session associated with the identification information.

[0007] The identification information includes at least one of the following: a first user identifier, a session management context identifier corresponding to the first user identifier, and a session identifier corresponding to the first user identifier; the first user identifier is the identifier of the first user using the first terminal device.

[0008] After receiving a first message indicating a change in the network access type of the first terminal device, the first network element sends a second message to the second network element, instructing the second network element to deactivate the session associated with the first user identifier. In this way, the network side can retain session-related information when services based on the user identifier cannot proceed due to a change in the network access type of the first terminal device. This facilitates the rapid re-establishment of the session user plane connection, enabling quick recovery of services associated with the first user identifier. This shortens the service recovery time during network handover, reduces signaling interactions, and thus improves the continuity and stability of network services. Alternatively, after receiving the first message indicating a change in the user identifier of the first terminal device, the first network element retains session-related information such as the context corresponding to the first user identifier and sends a second message to the second network element, instructing the second network element to deactivate the session associated with the first user identifier. This allows for rapid establishment of the user plane connection when the first user identifier re-logs in within a short period, enabling rapid network access for services associated with the first user identifier. This further improves the continuity and stability of network services and makes network resource utilization more efficient. Thus, the network side can more flexibly respond to frequent handover requirements and provide more stable service quality in complex and high-frequency handover scenarios.

[0009] It should be noted that the session mentioned in this application can be a data connection session used to transmit data packets. For example, a session can be a PDU session or other forms of session. This application uses a PDU session as an example for illustration. All PDU sessions described in this application can be replaced with sessions, and all sessions can be replaced with PDU sessions. Further details will not be elaborated hereafter.

[0010] It should be noted that deactivating the session associated with the identification information can be replaced by releasing the user plane connection of the session associated with the identification information, or releasing the connection between the session management network element and the user plane network element. Further details will not be elaborated upon hereafter.

[0011] In one possible implementation, the first message is used to indicate a change in the access network type of the first terminal device, including: the first message instructing the first terminal device to switch from the 5GS access network to the EPS access network. Thus, after the first terminal device switches from the 5GS access network to the EPS access network, the network does not need to execute all steps of the process for establishing a session associated with the first user identifier of the first terminal device. Since the network retains the relevant information of the session, re-establishing the session only requires establishing the user plane connection of the session, significantly shortening the service recovery time during the access network switching process and achieving rapid recovery of the user plane connection, thereby improving the continuity and stability of network services. Furthermore, the network can more flexibly respond to the needs of frequent access network switching and provide more stable service quality in complex and high-frequency switching scenarios.

[0012] It should be noted that this application uses 5GS access network and EPS access network as examples. In practice, this application can use other access network handover scenarios, such as using the first message to instruct the first terminal device to switch from the first access network to the second access network. In this scenario, the first access network supports user-identity-based services, while the second access network does not. Alternatively, the first terminal device can use user-identity-based services in the first access network, but prohibits their use in the second access network. The access network can also be replaced by an access base station, or a network element connected or selected during access. Further details will not be elaborated upon hereafter.

[0013] In one possible implementation, the first message is used to instruct the user identifier using the first terminal device to change, including: the first message instructing the first user identifier to register; or the first message includes the authentication result of the second user identifier and the second user identifier, and the first message instructs the user identifier using the first terminal device to change to the second user identifier, for example, the first user identifier changes to the second user identifier. Thus, after the user identifier using the first terminal device changes, the network side retains the relevant information of the session associated with the first user identifier on the first terminal device. If the first user identifier logs back into the first terminal device, the network does not need to execute all steps of the process for establishing all sessions associated with the first user identifier on the first terminal device. Since the network side retains the relevant information of the session, re-establishing the session only requires establishing the user plane connection of the session, achieving rapid recovery of the user plane connection, thereby improving the continuity and stability of network services. Furthermore, the network can more flexibly respond to the needs of frequent user identifier switching, and can provide more stable service quality in complex and high-frequency switching scenarios.

[0014] Wherein, if the first message includes the second user identifier and the authentication result of the second user identifier, the authentication result of the second user identifier may include authentication success or authentication failure. If the authentication result is authentication success, the first message is used to instruct the user identifier using the first terminal device to be changed to the second user identifier, for example, the first user identifier is changed to the second user identifier.

[0015] Optionally, the network can limit the time for the first user identifier to re-login to the first terminal device. That is, the network retains the session's relevant information only for a limited time. In other words, the session's relevant information will not be deleted within the limited time, but will be deleted after the limited time has elapsed. The session's relevant information may include session context information, user plane tunnel information, etc. This avoids re-obtaining the session's relevant information after the first user identifier re-logins to the first terminal device, allowing for rapid recovery of services based on the first user identifier.

[0016] In one possible implementation, the method may further include: receiving a third message, the third message indicating a change in the access network type of the first terminal device or a change in the user identifier of the first terminal device; and sending a fourth message to a second network element, the fourth message including identification information and second indication information, the second indication information being used to indicate the activation of the session associated with the identification information. Through this implementation, after receiving the third message, the first network element sends a fourth message to the second network element, instructing the second network element to activate the session associated with the identification information, thereby significantly shortening the service recovery time of the first user identifier, reducing signaling interaction, and achieving rapid recovery of the user plane connection.

[0017] It should be noted that activating a session associated with identification information can be replaced by establishing a user plane connection for a session associated with identification information, or establishing a connection between a session management network element and a user plane network element. Further details will not be elaborated upon hereafter.

[0018] In one possible implementation, the third message is used to indicate a change in the access network type of the first terminal device, including: the third message instructing the first terminal device to switch from the EPS access network to the 5GS access network. Thus, during the switch from the EPS access network to the 5GS access network, the network side can establish a user plane connection for a session associated with the first user identifier of the first terminal device based on the session information retained by the network side. This makes network resource utilization more efficient, significantly shortens the service recovery time during access network switching, and achieves rapid service recovery, thereby improving the continuity and stability of network services. Furthermore, the network can more flexibly respond to the needs of frequent access network switching, and can provide more stable service quality in complex and high-frequency switching scenarios.

[0019] In one possible implementation, the third message is used to indicate a change in the user identifier using the first terminal device, including: the third message indicating registration of the first user identifier; or the third message including the first user identifier and its authentication result, indicating that the user identifier using the first terminal device is changed to the first user identifier, for example, the second user identifier is changed to the first user identifier. Through this implementation, after the first user identifier re-logins into the first terminal device, the network does not need to execute all steps of the process for establishing all sessions associated with the first user identifier of the first terminal device. Since the network side retains the relevant information of the session, re-establishing the session only requires establishing a user plane connection, thereby making network resource utilization more efficient, significantly shortening the service recovery time after the user identifier of the first terminal device changes, achieving rapid service recovery, and thus improving the continuity and stability of network services. Furthermore, the network can more flexibly respond to service needs in scenarios with frequent user identifier switching, and can provide more stable service quality in complex and high-frequency switching scenarios.

[0020] Wherein, if the third message is used to instruct the first user identifier to register, for example, the third message may be a registration request message from the terminal device, which may include the first user identifier. If the third message is used to instruct the user identifier using the first terminal device to be changed to the first user identifier, the third message includes the first user identifier and the authentication result of the first user identifier. The authentication result of the first user identifier may include authentication success or authentication failure. If the authentication result is authentication success, then the third message is used to instruct the user identifier using the first terminal device to be changed to the first user identifier, for example, the second user identifier is changed to the first user identifier.

[0021] In one possible implementation, the method may further include: updating the state of the first user identifier after receiving the first message. This embodiment indicates that the state of the first user identifier changes from an active state to a deactivated state or a disabled state. The updated state indicates that the network only retains information related to the first user identifier on the first terminal device, and the first terminal device cannot execute service processes based on the first user identifier.

[0022] In one possible implementation, the method may further include: after receiving the first message, retaining the context corresponding to the first user identifier. By retaining the context corresponding to the first user identifier, the service recovery time of the session associated with the first user identifier can be shortened, thereby achieving rapid recovery of the user plane connection.

[0023] It should be noted that the context corresponding to the user identifier can also be replaced with information or session information corresponding to the user identifier, such as session tunnel information, session parameters such as data network name (DNN) or single-network slice selection assistance information (S-NSSAI), session control plane network element information, etc.

[0024] In one possible implementation, the method may further include: after receiving the first message, if the first message contains a second user identifier, storing the second user identifier. Thus, after receiving the third message, the session associated with the second user identifier can be determined based on the second user identifier, and the second user identifier can be modified or the session associated with the second user identifier can be deactivated.

[0025] Secondly, embodiments of this application provide a communication method. This method can be executed by a second network element, by a module applied to the second network element (e.g., a processor, chip, or chip system), or by a logical node, logical module, or software capable of implementing all or part of the functions of the second network element. Optionally, the second network element is a session management function (SMF). The method may include: receiving a second message from a first network element, the second message including identification information and first indication information, the first indication information being used to instruct the deactivation of the session associated with the identification information; wherein the identification information includes at least one of the following: a first user identifier, a session management context identifier corresponding to the first user identifier, and a session identifier corresponding to the first user identifier; the first user identifier is the identifier of a first user using a first terminal device; and deactivating the session associated with the identification information.

[0026] In one possible implementation, the method may further include: receiving a fourth message from a first network element, the fourth message including identification information and second indication information, the second indication information being used to indicate the activation of a session associated with the identification information; and activating the session associated with the identification information.

[0027] It should be understood that the implementing entity of the second aspect can be the second network element, the specific content of the second aspect corresponds to the content of the first aspect, and the corresponding features of the second aspect and the beneficial effects achieved can be referred to the description of the first aspect. To avoid repetition, detailed descriptions are appropriately omitted here.

[0028] Thirdly, embodiments of this application provide a communication device for executing the methods in the first aspect and its possible implementations, and the second aspect and its possible implementations. The communication device includes units for executing the methods in the first aspect and its possible implementations, and the second aspect and its possible implementations. The units in the third aspect can also be replaced by modules or means, etc. The aforementioned units can be implemented in software, in hardware, or in a combination of software and hardware.

[0029] Fourthly, a communication device is provided, which can be a first network element, a second network element, or a device within the first network element and the second network element. The device may include a processor, a memory, an input interface, and an output interface. The input interface is used to receive information from other communication devices outside the device, and the output interface is used to output information to other communication devices outside the device. The processor invokes a computer program stored in the memory to execute the communication method provided by the first aspect or any embodiment of the first aspect, or the second aspect or any embodiment of the second aspect.

[0030] Fifthly, this application provides a communication system comprising a first network element and a second network element. When the first network element and the second network element are running in the system, the first network element is used to execute any of the communication methods or any possible implementations thereof described in the first aspect, and the second network element is used to execute any of the communication methods or any possible implementations thereof described in the second aspect.

[0031] In a sixth aspect, this application provides a computer-readable storage medium comprising instructions or a computer program that, when executed, causes the methods described in the first aspect and any possible implementation thereof, and the second aspect and any possible implementation thereof, to be performed.

[0032] In a seventh aspect, this application provides a computer program product including instructions that, when the computer program product is run on a communication device, cause the methods described in the first aspect and any possible implementation thereof, and the second aspect and any possible implementation thereof, to be executed.

[0033] Eighthly, this application provides a chip including at least one processor for calling and executing instructions stored in a memory, such that the methods described in the first aspect and any possible implementation thereof, and the second aspect and any possible implementation thereof, are executed.

[0034] Ninthly, this application provides a chip system including at least one processor for calling and executing instructions stored in a memory, such that the methods described in the first aspect and any possible implementation thereof, and the second aspect and any possible implementation thereof, are executed.

[0035] In a tenth aspect, this application provides a communication device, which includes a processor and may further include a memory for implementing the methods of the first aspect and any possible implementation thereof, and the second aspect and any possible implementation thereof. The device may be a chip system, which may be composed of chips or may include chips and other discrete devices. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0037] Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application;

[0038] Figure 2a This is a schematic diagram of a 5G network architecture based on a service-oriented interface provided in an embodiment of this application;

[0039] Figure 2b This is a schematic diagram of a non-roaming architecture for 5GS and EPS interoperability provided in an embodiment of this application;

[0040] Figure 3 This is a schematic diagram of a car-sharing scenario provided in an embodiment of this application;

[0041] Figure 4 This is a schematic diagram of a method for switching access networks provided by existing technology;

[0042] Figure 5a This is a schematic diagram illustrating a method for updating a user identifier from an active state to a deactivated state, provided by existing technology.

[0043] Figure 5b This is a schematic diagram illustrating another method provided by existing technology for updating a user identifier from an active state to a deactivated state;

[0044] Figure 6 This is a flowchart illustrating a communication method provided in an embodiment of this application;

[0045] Figure 7 This is a schematic diagram of a session deactivation method provided in an embodiment of this application;

[0046] Figure 8 This is a flowchart illustrating another communication method provided in an embodiment of this application;

[0047] Figure 9 This is a flowchart illustrating another communication method provided in an embodiment of this application;

[0048] Figure 10 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0049] Figure 11 This is a schematic diagram of another communication device provided in an embodiment of this application. Detailed Implementation

[0050] The terms "first" and "second," etc., used in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0051] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0052] In this application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0053] In this application, "send request" can be understood as one device sending a request to another device, or it can also be understood as one logic module within a device sending a request to another logic module. For example, "terminal device send request" can be understood as a terminal device sending a request to another device (such as a terminal), or it can be understood as logic module 1 in the terminal device sending a request to logic module 2 in the terminal device.

[0054] In this application, "receive request" can be understood as one device receiving a request from another device, or it can also be understood as a logical module within a device receiving a request from another logical module. For example, "terminal device receive request" can be understood as a terminal device receiving a request from another device (such as a terminal), or it can be understood as logical module 1 in the terminal device receiving a request from logical module 2 in the terminal device.

[0055] In this application, "send a request to... (e.g., a terminal)" can be understood as the destination of the request being the terminal. This can include sending the request directly or indirectly to the terminal. "Receive a request from... (e.g., a terminal)" or "receive a request from... (e.g., a terminal)" can be understood as the source of the information being the terminal, and can include receiving the request directly or indirectly from the terminal. The request may undergo necessary processing between the source and destination, such as format changes, but the destination can understand a valid request from the source. Similar expressions in this application can be interpreted similarly, and will not be elaborated further here.

[0056] The technical solutions of this application embodiment can be applied to various communication systems, such as: Global System for Mobile Communication (GSM) system, Code Division Multiple Access (CDMA) system, Wideband Code Division Multiple Access (WCDMA) system, General Packet Radio Service (GPRS), Long Term Evolution (LTE) system, LTE Frequency Division Duplex (FDD) system, LTE Time Division Duplex (TDD) system, Universal Mobile Telecommunications System (UMTS) system, Enhanced Data Rate for GSM Evolution (EDGE) system, and Worldwide Interoperability for Microwave Access (WiMAX) system. The technical solutions of this application embodiment can also be applied to other communication systems, such as public land mobile network (PLMN) systems, LTE-A advanced systems, the 5th generation (5G) systems, new radio (NR) systems, machine-to-machine (M2M) systems, or other communication systems that will evolve in the future, etc. This application embodiment does not limit this.

[0057] To better understand the embodiments of this application, the system architecture involved in the embodiments of this application is described below:

[0058] For example, please refer to Figure 1 , Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application. Figure 1As shown, the communication system may include at least one terminal device and at least one network device. The terminal device can be connected to the network device wirelessly or via a wired connection, enabling uplink (UL) or downlink (DL) communication. Terminal devices can also connect to each other wirelessly or via a wired connection, enabling sidelink (SL) communication.

[0059] Terminal equipment can also refer to modules (e.g., chips) used in terminal equipment. Terminal equipment is an entity on the user side used to receive or transmit signals, such as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device. Terminal devices can also include mobile phones, cellular phones, cordless phones, session initiation protocol (SIP) phones, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, wireless terminals in self-driving vehicles, wireless terminals in remote medical care, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, and wireless terminals in smart homes. The embodiments of this application do not limit the types of devices used, including wireless terminals in the home, wearable devices (such as smartwatches, smart bracelets, pedometers, etc.), terminal devices in 5G networks, and terminal devices in PLMNs that evolve after 5G. Terminal devices can be deployed on land, including indoors or outdoors, handheld, wearable, or vehicle-mounted, or on water (such as ships), or in the air (such as airplanes, balloons, and satellites).

[0060] By way of example and not limitation, in this embodiment, the terminal device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on only one type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry.

[0061] Furthermore, in this embodiment, the terminal device can also be a terminal device in an Internet of Things (IoT) system. IoT is an important component of information technology development, and its main technical characteristic is connecting objects to networks through communication technology, thereby realizing an intelligent network of human-machine interconnection and machine-to-machine interconnection. In this embodiment, IoT technology can achieve massive connectivity, deep coverage, and terminal power saving through technologies such as narrowband (NB). Additionally, in this embodiment, the terminal device can also include sensors such as smart printers, train detectors, and gas station sensors, whose main functions include collecting data (for some terminal devices), receiving control information and downlink data from network devices, and transmitting uplink data to network devices by sending electromagnetic waves. In future communication systems, the session management network element can still be an SMF network element, or it can have other names; this application does not limit this.

[0062] exist Figure 1 In this example, network devices are exemplified using access network (AN) devices. Access network devices, also known as radio access network (RAN) devices, or simply access networks, are nodes or devices that connect terminal devices to a wireless network. In other words, the access network provides access services to terminal devices, enabling them to access (or connect to) the network. Access networks can support both wired and wireless access.

[0063] A network area network (RAN) typically includes base stations and radio antennas. A base station is a network device with wireless transceiver capabilities used to communicate with terminal devices, or it can be a device that connects terminal devices to a wireless network. A base station can be a node (or device) in the RAN, or it can be an evolved Node B (eNB or eNodeB) in LTE, a next-generation Node B (gNB) in 5G networks, a base station in a future public land mobile network (PLMN), a broadband network gateway (BNG), an aggregation switch, or a non-3rd generation partnership project (3GPP) access device, etc. Base stations can include various forms of macro base stations, micro base stations (also known as small stations), relay stations, access points, equipment that implements base station functions in communication systems evolved after 5G, access points (APs), transmitting and receiving points (TRPs), transmitting points (TPs) in WiFi systems, mobile switching centers, and equipment that performs base station functions in device-to-device (D2D), vehicle-to-everything (V2X), and machine-to-machine (M2M) communications. They can also include centralized units (CUs) and distributed units (DUs) in cloud radio access networks (C-RAN) systems, and network equipment in NTN communication systems, which can be deployed on high-altitude platforms or satellites.

[0064] The RAN of 5GS is the next-generation radio access network (NG-RAN), which is responsible for transmitting data between terminal equipment and 5GC; the RAN of EPS is the evolved universal terrestrial radio access network (E-UTRAN), which is responsible for transmitting data between terminal equipment and evolved packet core (EPC).

[0065] It should be noted that, in cases such as Figure 1Although the network architecture shown includes an access network and terminal devices, the application scenario may not be limited to the access network and terminal devices. For example, it may also include devices for carrying virtualized network functions. These are obvious to those skilled in the art and will not be described in detail here.

[0066] also, Figure 1 The number and types of network devices and terminal devices included in the network architecture shown are merely examples, and the embodiments of this application are not limited thereto. For example, it may also include more or fewer terminal devices communicating with the network devices. Similarly, it may include more or fewer network devices communicating with the terminal devices. For the sake of brevity, they are not described one by one in the accompanying drawings.

[0067] Optionally, the communication system may also include Figure 1 Network devices not shown include, for example, core network (CN) devices and data network devices.

[0068] In different communication systems, core network equipment (hereinafter referred to as core network) can correspond to different devices. For example, in a 3G communication system, the core network can correspond to the Serving GPRS Support Node (SGSN) and / or the Gateway GPRS Support Node (GGSN); in a 4G communication system, the core network can correspond to the EPC, which implements core functions such as user access, session management, policy control, and data forwarding. The EPC can include Mobility Management Entity (MME) network elements, Serving Gateway (SGW), Home Subscriber Server (HSS) network elements, and Packet Data Network Gateway (PGW); in a 5G communication system, the core network can correspond to the 5GC, which is responsible for managing terminal device access, session management, data flow control, and network service quality. The 5GC can be a standalone core network, a non-standalone core network, a private 5G core network, a cloud-native core network, an edge computing core network, a hybrid cloud core network, etc. The 5GC can include policy control function (PCF) network elements, unified data management (UDM) network elements, etc. Network elements such as management (UDM), access and mobility management function (AMF), session management function (SMF), user plane function (UPF), network repository function (NRF), and authentication server function (AUSF).

[0069] The following is combined Figure 2a This section introduces the devices, interfaces, network elements, and networks in a service-oriented interface-based 5G network architecture, combining... Figure 2b This section introduces the devices, interfaces, network elements, and networks in the non-roaming architecture for 5GS and EPS interoperability. For example... Figure 2a As shown, a 5G network architecture based on service-oriented interfaces may include:

[0070] 1) AMF Network Element: The AMF network element is responsible for access management and mobility management of terminal equipment in 5GC and is one of the core components of the control plane in 5GC. It mainly handles control signaling related to user access and mobility, but does not participate in the forwarding of actual user data. The main functions of AMF include user access control, mobility management, session management cooperation, user registration management, policy and quality of service management, etc. The access and mobility management function network elements described in this application can all be replaced by AMF network elements or AMF. In future communication systems, access and mobility management function network elements can still be AMF network elements, or they can have other names; this application does not limit this.

[0071] 2) SMF Network Element: The SMF network element is a dedicated network element in 5GC for managing user sessions. It is primarily responsible for data flow control, session establishment and release, user IP address allocation, and quality of service management. The SMF is a core component of the control plane in 5GC, working in conjunction with the UPF to implement flow control of user data. The main functions of the SMF include: session management, IP address allocation, policy and quality of service control, traffic splitting and data path selection, UPF management, and slice management. The session management network element described in this application can be replaced with an SMF network element or simply SMF. In future communication systems, the session management network element can still be an SMF network element, or it can have other names; this application does not limit its use.

[0072] 3) NRF Network Elements: NRF network elements are used in 5GC to provide registration, discovery, and status query for other 5G network functions. All user plane function network elements described in this application can be replaced with NRF network elements or NRF. In future communication systems, network repository function network elements can still be NRF network elements, or they can have other names; this application does not limit this.

[0073] 4) UDM Network Element: The UDM network element is responsible for user subscription data management in 5GC, including user authentication, authorization, and policy configuration. All user plane function network elements described in this application can be replaced with UDM network elements or UDM. In future communication systems, the unified data management network element can still be a UDM network element, or it can have other names; this application does not limit this.

[0074] 5) AUSF Network Element: The AUSF network element is used in 5GC to perform user authentication functions and ensure the validity of user identities. All user plane function network elements described in this application can be replaced with AUSF network elements or AUSF. In future communication systems, the authentication server function network element can still be an AUSF network element, or it can have other names; this application does not limit this.

[0075] 6) PCF Network Element: The PCF network element is responsible for managing and distributing network policy control in 5GC, such as Quality of Service (QoS) and traffic management policies. All user plane function network elements described in this application can be replaced with PCF network elements or PCF. In future communication systems, policy control function network elements can still be PCF network elements, or they can have other names; this application does not limit this.

[0076] 7) UPF Network Element: In 5GC, the UPF network element is responsible for forwarding and processing user data streams. It transmits data between terminal equipment and the data network. All user plane function network elements described in this application can be replaced with UPF network elements or UPF. In future communication systems, user plane network elements can still be UPF network elements, or they can have other names; this application does not limit this.

[0077] 8) Terminal equipment: A description of the terminal equipment can be found in [reference needed]. Figure 1 The description of the terminal device will not be repeated here.

[0078] 9) NG-RAN: For a description of NG-RAN, please refer to [link / reference]. Figure 1 The description of NG-RAN will not be repeated here.

[0079] 10) Data Network (DN): DN refers to the target network for end-user data. DN can be the Internet or a private network for enterprises.

[0080] 11) N1 interface: The N1 interface is the interface connecting the terminal equipment and the AMF network element, and is used for control signaling.

[0081] N2 Interface: The N2 interface connects NG-RAN and AMF and is used to manage 5G user access and mobility control.

[0082] N3 Interface: The N3 interface connects the NG-RAN and UPF and is used to transmit 5G user data streams.

[0083] N4 Interface: The N4 interface connects the SMF and UPF and is used for user plane control, helping the SMF manage user data sessions.

[0084] N6 Interface: The N6 interface connects the UPF and DN, and is used for the transmission of user data between the core network and the external network.

[0085] Nnf interface, Npcf interface, Namf interface, Nudm interface, Nausf interface, Nsmf interface: The above interfaces are the interfaces between various functional network elements, used for data communication between different functional network elements.

[0086] Figure 2aThe devices, network elements, and network in this architecture are interconnected through corresponding interfaces to jointly realize functions such as user access, authentication, session management, and policy control. This architecture allows for modular design, making the network more flexible and scalable, and adapting to the requirements of 5GS for low latency, high bandwidth, and multi-device connectivity.

[0087] like Figure 2b As shown, the non-roaming architecture for 5GS and EPS interoperability can include:

[0088] 1) MME network element: The MME network element is mainly used in EPC for the mobility management function of 4G network, including controlling user access and mobility management, and supporting signaling and authentication.

[0089] 2) SGW: SGW is responsible for forwarding user data and plays a key role in mobility management within 4G networks.

[0090] 3) HSS Network Element: The HSS network element stores user subscription information and authentication information in the EPC. When combined with UDM, it can provide similar functions in 5G networks.

[0091] 4) PGW: The PGW consists of the Packet Data Network Gateway-Control Plane (PGW-C) and the Packet Data Network Gateway-User Plane (PGW-U). PGW-C is the control plane portion of the PGW in the EPC. PGW-C is responsible for the control and management of user data, such as session establishment, IP address allocation, policy control, and traffic management. It typically communicates with the SGW and PCF to coordinate user data transmission. PGW-C manages user sessions on the control plane, ensuring users can communicate with external data networks (such as the Internet). PGW-U is the user plane portion of the PGW in the EPC, responsible for the actual packet forwarding and processing. PGW-U directly handles the transmission of user data streams, transmitting data from terminal devices to external data networks or back to terminal devices from external networks. PGW-U and PGW-C work together; PGW-C is responsible for policy management on the control plane, while PGW-U focuses on efficient data forwarding and transmission.

[0092] 5) N7 Interface: The N7 interface connects the PCF and SMF and is used for the exchange of management policy control information.

[0093] N8 Interface: The N8 interface connects the UDM and AMF and is used to transmit user identity and subscription information in 5G networks.

[0094] N10 Interface: The N10 interface connects the UDM and SMF, and is used for user subscription data interaction, helping the SMF manage sessions and control.

[0095] N11 Interface: The N11 interface connects the AMF and SMF and is used for session and mobility management.

[0096] N15 Interface: The N15 interface connects the PCF and AMF and is used for the exchange of policy control information.

[0097] N26 Interface: The N26 interface connects the AMF and MME, and is the interface between 4G and 5G networks, used to support handover across 4G / 5G networks.

[0098] S1-MME Interface: The S1-MME interface connects the E-UTRAN and the MME, and is used to manage user access and mobility in 4G networks.

[0099] S1-U Interface: The S1-U interface connects the E-UTRAN and SGW and is used to transmit user data in the 4G network.

[0100] S5-C Interface: The S5-C interface connects the SGW and PGW-C, and is used for control plane connection to manage 4G user data sessions.

[0101] S5-U Interface: The S5-U interface connects the SGW and PGW-U and is used to transmit 4G user data.

[0102] S6a Interface: The S6a interface connects the MME and HSS and is used for user authentication and subscription information transmission in the 4G network.

[0103] 6) Descriptions of AMF network elements, SMF network elements, UDM network elements, PCF network elements, UPF network elements, N1 interfaces, N2 interfaces, N3 interfaces, N4 interfaces, N6 interfaces, Nnf interfaces, Npcf interfaces, Namf interfaces, Nudm interfaces, Nausf interfaces, and Nsmf interfaces can be found in the respective references. Figure 2a For the corresponding descriptions, please refer to the descriptions of NG-RAN and E-UTRAN. Figure 1 The descriptions of NG-RAN and E-UTRAN will not be repeated here.

[0104] Figure 2b The devices, network elements, and networks in the system are interconnected through corresponding interfaces to jointly achieve seamless switching of terminal devices between 5GS and EPS.

[0105] This application does not limit the form of network elements such as AMF and SMF, terminal devices, and network devices such as NG-RAN. The device used to implement the AMF network element function can be an AMF network element in 5GC, or a device capable of supporting the AMF network element to implement this function, such as a chip system. This device can be installed in or used in conjunction with an AMF network element. Similarly, the device used to implement the SMF network element function can be an SMF network element in 5GC, or a device capable of supporting the SMF network element to implement this function, such as a chip system. This device can be installed in or used in conjunction with an SMF network element. The device used to implement the terminal device function can be a terminal device; or a device capable of supporting the terminal device to implement this function, such as a chip system. This device can be installed in or used in conjunction with a terminal device. Similarly, the device used to implement the network device function can be a network device; or a device capable of supporting the network device to implement this function, such as a chip system. This device can be installed in or used in conjunction with a network device. In the embodiments of this application, the chip system can be composed of chips, or it can include chips and other discrete components. AMF network elements and SMF network elements can also be called functional entities. They can be network components implemented on dedicated hardware, software instances running on dedicated hardware, or instances of virtualized functions on appropriate platforms. For example, the virtualization platform mentioned above can be a cloud platform.

[0106] Figure 2a and Figure 2b The system architecture shown does not limit the number of AMF and SMF network elements. For example, it can include multiple AMF and SMF network elements. For the sake of simplicity, they are not described one by one in the attached figures.

[0107] To facilitate understanding of the embodiments of this application, the specific technical problems to be solved by this application are analyzed and proposed.

[0108] Currently, network services for terminal devices are implemented based on subscription permanent identifiers (SUPIs). When a user's terminal device requests a service from the 5GC, the 5GC provides the corresponding service by identifying the SUPI. The SUPI is a fixed identifier for the terminal device; therefore, operators can only identify the terminal device, but cannot directly confirm the specific user. In this situation, operators can only assume that the SUPI represents the current user of the terminal device.

[0109] User identifiers enable more flexible service delivery. The 19th version of the 3GPP protocol TR22.904 introduces the new concept of user identifiers, which are the identifiers of the specific user currently using the terminal device. Only one user identifier can be logged into the terminal device at any given time. Through user identifiers, 5GC can identify the current user of the terminal device, rather than just the device's own identifier. This allows 5GC to provide differentiated services tailored to the current user's needs.

[0110] Taking a car-sharing vehicle as an example, each car is equipped with a fixed SUPI (Supply, Product, and Access) at the factory, thus the car is already recognized by 5GC as a terminal device. However, without a user identifier, the network only knows that it is a car, but cannot determine the driver's identity. The introduction of a user identifier allows 5GC to identify whether user A or user B is using the car, thereby providing personalized services based on the different needs of users. Figure 3 This is a schematic diagram of a car-sharing scenario provided in an embodiment of this application, such as... Figure 3 As shown:

[0111] User A requires autonomous driving services and enhanced mobile broadband (eMBB) services, both of which require high bandwidth and low latency. 5GC will allocate these resources to User A based on User A's user identifier #1 when logging into the shared car. User B requires autonomous driving services, and 5GC will provide basic communication services to User B based on User B's user identifier #2 when logging into the shared car.

[0112] This differentiated service relies on the network's ability to identify active user identifiers on the current device. In one possible implementation, the network determines whether it can provide service to the user based on the state of the user identifier. For example, the state of a user identifier in the network can be categorized as follows:

[0113] Active state: When a user logs in to the terminal using a user ID, the network sets that user ID to an active state, at which point the network will provide the device with the service that the user ID is subscribed to.

[0114] Idle or inactive state: When a user ID becomes idle or inactive on the device, the network releases the session resources associated with that user ID.

[0115] The introduction of user identifiers enables user identification and personalized services, allowing terminal devices to provide differentiated services based on the needs of different users when switching between them. This not only enhances service flexibility but also allows 5GC to better meet the personalized needs of different users.

[0116] However, since only 5GC supports user ID-based services, when a terminal device logged in with that user ID switches from the 5GS access network to another communication system access network that does not support user ID-based services, or when the user ID is deregistered in the terminal device, the network will release all resources of the PDU session associated with that user ID, including:

[0117] Internet Protocol (IP) resource release: If the session type is an IP-based PDU session, then all IP addresses and IP prefixes allocated to that session must be released.

[0118] User plane function (UPF) resource release: Releases all resources used by the PDU session in the UPF, including the UPF used as the endpoint of the N3 / N9 connection.

[0119] Air interface resource release: Releases all air interface resources occupied by this PDU session. Air interface resources are a part of radio resources, mainly referring to the communication resources between terminal equipment and base stations. The management of radio resources also involves the coordination of the core network, such as the connection between SMF and UPF.

[0120] Therefore, when the terminal device switches from a communication system access network that does not support user ID-based services to a 5GS access network, or when the user ID is re-logind to the terminal device, the network needs to re-establish the PDU session associated with the user ID.

[0121] In scenarios where the terminal device switches from a 5GS access network to another communication system access network that does not support user identifier-based services, the network releases all PDU sessions associated with that user identifier. When the terminal device switches back to the 5GS access network, the network needs to re-establish the PDU sessions associated with that user identifier, severely impacting service recovery speed. For an example, please refer to [link to example]. Figure 4 , Figure 4 This is a schematic diagram of a method for switching access networks provided by existing technology. Figure 4 The steps S400 to S418 may be included, wherein steps S400 to S413 include the terminal device switching from the 5GS access network to the EPS access network, and steps S414 to S418 include the terminal device switching from the EPS access network to the 5GS access network.

[0122] S400: Establishment of PDU sessions and / or quality of service flow (QoS flow) in 5GS.

[0123] Terminal equipment accesses 5GC via NG-RAN and establishes PDU sessions and / or QoS flows. Each PDU session has a unique PDU session identifier, and each QoS flow has a unique QoS flow identifier. Multiple QoS flows can be transmitted within a single PDU session, and each QoS flow has its own QoS parameters. The QoS parameters differ between different QoS flows.

[0124] S401: NG-RAN sends a handover request to AMF.

[0125] Correspondingly, the AMF receives a handover request from the NG-RAN.

[0126] NG-RAN decides to switch the terminal device to E-UTRAN and sends a handover request (handover required) to AMF. Specifically, NG-RAN can decide whether to switch to E-UTRAN through mobility function initiation decisions. For example, mobility function initiation decisions can be triggered by coverage (such as when the base station receives a measurement report indicating that the signal quality of the serving cell where the terminal device is located has deteriorated and a report of good quality from a neighboring cell in another system has been received), or by service triggers, etc.

[0127] S402: The AMF sends a Network Session Management Function Protocol Data Unit Session Context Request (Nsmf_PDUSession_Context Request) message to the SMF.

[0128] Correspondingly, the SMF receives the Nsmf_PDUSession_Context Request message from the AMF.

[0129] The AMF determines whether a switch to E-UTRAN is needed based on the handover request in step S401. If a switch is needed, the AMF will send an Nsmf_PDUSession_Context Request to the SMF to obtain the mapping information between "PDU session" and "EPS bearer" from the SMF. That is, the AMF needs to know how each PDU session is mapped to the bearer of the 4G network.

[0130] In this process, the AMF sends a request message to the SMF that meets the criteria.

[0131] S403: SMF sends a session modification message to UPF, and UPF returns a response message to SMF regarding the session modification message.

[0132] After receiving a request from the AMF, the SMF checks which EPS bearer contexts can be transferred to the 4G network. If they can be transferred, the SMF sends a session modification message to the UPF through the N4 interface to establish a core network tunnel for each eligible EPS bearer.

[0133] S404: The SMF sends a Network Session Management Function Protocol Data Unit Session Context Response (Nsmf_PDUSession_Context Response) message to the AMF.

[0134] Correspondingly, the AMF receives the Nsmf_PDUSession_Context Response message from the SMF.

[0135] The Nsmf_PDUSession_Context Response message includes EPS bearer contexts, which contain detailed information about the 4G network bearers. After receiving the context, the AMF will determine which EPS bearer identifiers (EBIs) corresponding to which PDU sessions can be transmitted on the EPS.

[0136] Each EPS bearer has a unique EBI; a packet data network (PDN) connection can contain multiple EPS bearers to meet various quality of service requirements; EPS bearers aggregate IP streams with the same quality of service requirements for management and transmission; and a PDN connection is a connection between a terminal device and an external network, allowing the terminal device to access specific network services.

[0137] S405: The AMF sends a relocation request to the MME.

[0138] Correspondingly, the MME receives relocation requests from the AMF.

[0139] AMF sends a relocation request to MME to switch to MME. The relocation request includes the context of the AMF storage.

[0140] S406: The MME sends a session creation request to the SGW, and the SGW sends a response message to the MME.

[0141] The session creation request message sent by the MME to the SGW includes relevant information about the PDN connection (such as the bearer context); the response message returned by the SGW to the MME includes relevant information about the PDN connection (such as the SGW's IP address).

[0142] S407: The MME sends a handover request to the E-UTRAN, and the E-UTRAN sends an acknowledgment message for the handover request to the MME.

[0143] The MME sends a handover request to the E-UTRAN, requesting the establishment of a context in the E-UTRAN.

[0144] S408: The MME sends a relocation response message to the AMF.

[0145] Correspondingly, the AMF receives a relocation response message from the MME.

[0146] S409: AMF sends a handover command message to the terminal device.

[0147] Correspondingly, the terminal device receives a handover command message from the AMF.

[0148] AMF sends a handover command message to the terminal device via E-UTRAN. The terminal device re-associates the QoS flow and EBI based on the handover command message. For QoS flows and PDU sessions that have not been assigned an EBI, the terminal device will delete the relevant QoS flow rules, PDU sessions and related resources.

[0149] S410: The terminal device sends a handover notification message to the MME.

[0150] Correspondingly, the MME receives handover notification messages from the terminal devices.

[0151] The terminal device sends a handover notification message to the MME via E-UTRAN.

[0152] S411: The MME sends a relocation completion message to the AMF.

[0153] Correspondingly, the AMF receives a relocation complete message from the MME.

[0154] S412: The AMF sends a Network Session Management Function Protocol Data Unit Session Release Session Management Context (Nsmf_PDUSession_Release SMContext) message to the SMF, and the SMF sends a response message Nsmf_PDUSession_ReleaseSMContext to the AMF.

[0155] AMF requests SMF to release PDU sessions that are not intended to be transferred to EPC. For example, the PDU session can be a PDU session that does not meet the transfer conditions of EBI, or a PDU session that failed to be recovered by the Nsmf_PDUSession_Release SMContext message.

[0156] S413: Core network removes service quality flows that have not been successfully transferred to EPS and related policies and charging control (PCC) rules.

[0157] After the above process, the switch from EPS to 5GS is completed.

[0158] S414: E-UTRAN sends a handover request to MME.

[0159] Accordingly, the MME receives a handover request from the E-UTRAN.

[0160] S415: The MME sends a relocation request to the AMF.

[0161] Correspondingly, the AMF receives relocation requests from the MME.

[0162] The MME sends a relocation request to the AMF, requesting a switch to the AMF. This relocation request may include the context stored by the MME.

[0163] S416: AMF, SMF, and UPF work together to establish a PDU session.

[0164] The AMF, SMF, and UPF collaborate to establish a PDU session, including establishing a session management context, N4 connection, N3 tunnel, and session management policy. For example, the AMF finds the address or identifier of the SMF+PGW-C associated with all PDN connections; the SMF finds the corresponding PDU session based on the EPS bearer context; the SMF establishes the aforementioned PDU session, assigns a session management policy to the user, and sets up the relevant N4 connection and N3 tunnel; the SMF returns the relevant information of the aforementioned PDU session to the AMF, which may include the mapping between the Quality of Service Flow Identifier (QFI) and EBI in the session, core network tunnel information, etc.

[0165] Optional, S417: AMF selects a new AMF based on the slice information.

[0166] If the AMF cannot meet the specific slicing requirements of the terminal device, it will select a new AMF based on the slicing information returned by the SMF and send the terminal device-related information (including context) to the new AMF. For example, if the AMF does not currently support some slicing functions, a new AMF that supports all slicing functions will be selected.

[0167] S418: AMF and NG-RAN interaction information to meet the specific slicing requirements of terminal equipment, and each network element completes the handover from EPS to 5GS.

[0168] The interaction information between the AMF (which can be a new AMF, or the original AMF if no new AMF is selected, and will not be elaborated further) and NG-RAN is designed to meet the specific slice requirements of the terminal device. For example, the AMF sends a handover request to the NG-RAN, and the NG-RAN sends a confirmation message of the handover request to the AMF.

[0169] Optionally, the AMF can be updated with relevant information to meet the specific slice requirements of the terminal device.

[0170] Each network element completes the handover from EPS to 5GS. Specifically, the AMF sends a session management context update message to all SMFs related to the session; upon receiving the update message from the AMF, the SMF updates its stored session association information (which may include relevant AMF information and NG-RAN information), and sends a session modification message to the UPF through the N4 interface to notify the UPF to update the corresponding session information; the AMF sends information to the MME to update relevant AMF information and the EPS bearer information of the successful handover, which may include the EPS bearer list, tunnel endpoint identifier (TEID), etc.

[0171] After the above process, the switch from EPS to 5GS is completed.

[0172] Figure 4 When the corresponding technology is applied to terminal devices that log in with user IDs in scenarios where they switch between 5GS access network and EPS access network, the session associated with the user ID is released due to the access network switch, which will seriously reduce the recovery speed of network services.

[0173] In scenarios where terminal devices access the network via 5GS, when a user identifier registers with the terminal device, the network releases all PDU sessions associated with that user identifier. When the user identifier logs back into the terminal device, the terminal device needs to re-request the network to establish a session associated with that user identifier, resulting in slow service recovery. For an example, please refer to [link to example]. Figure 5a and Figure 5b , Figure 5a and Figure 5b These are schematic diagrams illustrating a method for updating a user identifier from an active state to a deactivated state, provided by existing technologies. Figure 5a and Figure 5b In this process, all sessions associated with the user's identifier will be released. Figure 5a Displaying a user identifier to register on a terminal device triggers a change in the user's own state from active to inactive, or triggers the release of its associated session. This may include the following steps:

[0174] Optional, S5a01: The user disconnects from the terminal device.

[0175] S5a02: The terminal device sends a non-access stratum (NAS) message to the AMF.

[0176] Correspondingly, AMF receives NAS messages from the terminal device.

[0177] When the terminal device receives a user's disconnection request, detects that the user has disconnected, or the user actively triggers the logout, the terminal device sends a NAS message (such as a logout request or PDU session release request) to the AMF. This message may include the terminal device identifier (such as 5G-GUTI), the user identifier, and the user identifier indication. Optionally, it may also include an unlink indication, which is used to indicate that the user identifier and the terminal device are disconnected, or that the user identifier has logged out.

[0178] S5a03: The AMF checks whether a session associated with the user identifier in the NAS message in step S5a02 exists in the terminal context. If it does, the session associated with that user identifier is released.

[0179] This step can also be understood as the AMF checking whether the user identifier in the NAS message was previously connected to the terminal device. Specifically, the AMF can check whether the user identifier or the session information associated with the user identifier exists in the terminal context. If it exists, it means that there is a session associated with the user identifier, and the AMF releases the session associated with the user identifier. Optionally, the AMF removes the user identifier from the terminal context or updates the status of the user identifier in the terminal context to a deactivated or idle state.

[0180] S5a04: The AMF sends a Network Session Management Function Protocol Data Unit Session Release Session Management Context Request (Nsmf_PDUSession_Release SMContextRequest) message to the SMF.

[0181] Correspondingly, the SMF receives the Nsmf_PDUSession_Release SMContextRequest message from the AMF.

[0182] AMF sends an Nsmf_PDUSession_Release SMContextRequest message to SMF (which includes the user identifier or the PDU session identifier associated with the user identifier or the session management context identifier of the PDU session) to release all PDU sessions associated with the user identifier.

[0183] S5a05: Continue executing the PDU session release process.

[0184] The PDU session release procedure is used to release all resources associated with the session, including all UPF resources used by the PDU session (including UPFs used as the endpoint of N3 / N9 connections), all air interface resources used by the PDU session, and if the session is an IP type PDU session, all IP addresses / IP prefixes allocated to the session must also be released.

[0185] Specifically, it could be TS23.502 in the 3GPP protocol. Figure 4 3.4.2 Steps 2a to 15.

[0186] S5a06: AMF sends NAS messages to the terminal device.

[0187] Correspondingly, the terminal device receives NAS messages from AMF.

[0188] AMF sends a NAS message (which can be a deregistration accept message or a PDU session release command) to the terminal device to indicate that the user identifier has been disconnected.

[0189] Figure 5b Displaying a second user identifier to log in to a terminal device can trigger the first user identifier's state to change from active to deactivated, or trigger the release of the session associated with the first user identifier. This can include the following steps:

[0190] S5b01: Authentication and authorization of the first user identifier. The AMF stores the first user identifier in the terminal context and establishes a PDU session for the first user identifier.

[0191] The first user ID requests to connect to the terminal device, and the network performs authentication and authorization for the first user ID. When the first user ID is successfully authenticated and authorized, the AMF stores the first user ID in the terminal context and / or updates the state of the first user ID to an active state, and establishes one or more PDU sessions associated with the first user ID.

[0192] S5b02: Authentication and authorization of the second user identifier.

[0193] The second user ID requests to connect to the terminal device, and the network performs authentication and authorization on the second user ID.

[0194] S5b03: The AMF stores the second user identifier in the terminal context and checks whether the second user identifier is associated with an existing PDU session.

[0195] When the second user identifier is successfully authenticated and authorized, the AMF stores the second user identifier in the terminal context or updates the state of the second user identifier to the active state, and releases all PDU sessions associated with the first user identifier. If there are PDU sessions not associated with the first user identifier (such as PDU sessions associated with the terminal device), those PDU sessions should be retained.

[0196] Optionally, when the AMF determines that the second user identifier is different from the first user identifier previously stored in the terminal context, the AMF replaces the first user identifier with the second user identifier and verifies whether the second user identifier is related to the PDU session associated with the first user identifier. Based on the verification result, only the PDU sessions not associated with the second user identifier are released.

[0197] S5b04: AMF sends an Nsmf_PDUSession_Release SMContextRequest message to SMF.

[0198] Correspondingly, the SMF receives the Nsmf_PDUSession_Release SMContextRequest message from the AMF.

[0199] AMF sends an Nsmf_PDUSession_Release SMContextRequest message to SMF (which includes the session management context identifier of the PDU session associated with the first user identifier) ​​to release all PDU sessions associated with the first user identifier.

[0200] S5b05: Continue executing the PDU session release procedure.

[0201] The PDU session release procedure is used to release all resources associated with the session, including all UPF resources used by the PDU session (including UPFs used as the endpoint of N3 / N9 connections), all air interface resources used by the PDU session, and if the session is an IP type PDU session, all IP addresses / IP prefixes allocated to the session must also be released.

[0202] Specifically, it could be in the 3GPP protocol TS23.502 Figure 4 3.4.2 Steps 2a to 15.

[0203] S5b06: Execute the PDU session establishment process.

[0204] This step can also be understood as establishing a new PDU session for the second user identifier.

[0205] Specifically, it could be in TS23.502 Figure 4 The steps in .3.2.2.

[0206] Figure 5a and Figure 5b When the corresponding technology is applied to scenarios where the user identity of the terminal device changes, since all sessions associated with the first user identity are released, the sessions need to be re-established after the first user identity re-logs into the terminal device, which will severely reduce the recovery speed of network services.

[0207] Therefore, in scenarios involving ping-pong handover from 5GS access network to EPS access network and back to 5GS access network, as well as in scenarios involving rapid user identifier switching, how to quickly restore services based on user identifiers is an urgent technical problem to be solved.

[0208] The technical problem to be solved by the embodiments of this application is: how to quickly restore services based on user identifiers.

[0209] Based on the above, this application proposes a communication method for quickly restoring services based on user identifiers.

[0210] The following descriptions will illustrate these methods through various embodiments. It should be understood that these methods can be used in combination. The technical solutions provided in this application are not limited to the processes described below. Furthermore, the scenario descriptions in the embodiments of this application are merely illustrative and do not limit the solutions of this application to the described scenarios; they are also applicable to scenarios with similar problems.

[0211] The first network element in the embodiments of this application (as described in the corresponding embodiments below) can be Figure 2a or Figure 2b The AMF network element in the 5GC shown in this application embodiment, the function performed by the first network element, can also be performed by a device (e.g., a chip, a chip system, or a circuit) in the first network element. The second network element in this application embodiment can be... Figure 2a or Figure 2b The SMF network element in the 5GC shown can also have its functions, performed by the second network element in this embodiment, performed by a device (e.g., a chip, a chip system, or a circuit) within the second network element. The first terminal device in this embodiment can be... Figure 1 , Figure 2a or Figure 2b The terminal device shown in this application embodiment, the functions performed by the first terminal device, can also be performed by a device (e.g., a chip, a chip system, or a circuit) within the first terminal device. The first network device in this application embodiment can be... Figure 1 , Figure 2a or Figure 2bThe NG-RAN shown in this application embodiment, the functions performed by the first network device can also be performed by a device (e.g., a chip, a chip system, or a circuit) in the first network device. This application embodiment is described uniformly here and will not be repeated hereafter.

[0212] In this application embodiment, the third network element can be a proxy service function network element or an authentication network element. The proxy service function network element is responsible for forwarding user authentication-related request messages to the authentication network element. For example, the proxy service function network element may include an authentication, authorization, and accounting-proxy (AAA-P) network element, a network slice-specific authentication and authorization function (NSSAAF) network element; the authentication network element may include an authentication, authorization, and accounting (AAA) network element, a UDM network element, an AUSF network element, etc., used to perform user authentication. The functions performed by the third network element in this application embodiment can also be performed by devices within the third network element (e.g., a chip, a chip system, or a circuit). This application embodiment does not specifically limit the third network element; it is understood that other third network elements suitable for actual applications can also be selected, and will not be elaborated further hereafter.

[0213] Please see Figure 6 , Figure 6 This is a flowchart illustrating a communication method provided in an embodiment of this application. For example... Figure 6 As shown:

[0214] Step S601: The first network element receives the first message.

[0215] The first message can be implemented in the following two possible ways:

[0216] In one possible implementation, the first message is used to indicate a change in the access network type of the first terminal device. For example, the first message can be used to indicate that the first terminal device switches from the 5GS access network to the EPS access network.

[0217] In a second possible implementation, the first message is used to instruct the user identifier using the first terminal device to change. For example, the first message can be used to instruct the first user identifier to register. Registering can also be understood as the first user identifier logging out of the terminal device. Alternatively, the first message can include a second user identifier and its authentication result. The first message can be used to instruct the user identifier using the first terminal device to change to the second user identifier (the second user identifier can be the identifier of a second user using the first terminal device after the first user identifier logs out, which will not be elaborated further). Changing the user identifier using the first terminal device to the second user identifier can also be understood as the first user identifier switching to the second user identifier logging into the terminal device.

[0218] The first possible implementation of the first message corresponds to the one described later. Figure 8 The method described, and the second possible implementation of the first message, correspond to what will be discussed later. Figure 9 The method described.

[0219] The first network element can receive the first message in one of the following steps: S601a, S601b, or S601c. Specifically, if the first network element receives the first message using the method corresponding to step S601a, then the methods corresponding to steps S601b or S601c do not need to be executed. Similarly, if the first network element receives the first message using the method corresponding to step S601b, then the methods corresponding to steps S601a or S601c do not need to be executed. Likewise, if the first network element receives the first message using the method corresponding to step S601c, then the methods corresponding to steps S601a or S601b do not need to be executed.

[0220] Step S601a: The first network device sends a first message to the first network element.

[0221] In this step, the possible implementation of the first message can correspond to the first possible implementation of the first message in step S601, or it can correspond to the following description. Figure 8 The method described in step S802, namely, the first message can be used to indicate a change in the access network type of the first terminal device. For example, the first terminal device sends a first message to a first network element, and the first network element receives the first message. The first message can be a handover required message, used to instruct the first terminal device to switch from the 5GS access network to the EPS access network.

[0222] Alternatively, step S601a can be replaced by step S601b or step S601c:

[0223] Step S601b: The first terminal device sends a first message to the first network element.

[0224] In this step, the possible implementation of the first message can correspond to the second possible implementation of the first message in step S601, or it can correspond to the following description. Figure 9 The method described in step S902, namely, the first message can be used to instruct the user identifier of the first terminal device to change. For example, the first message can be used to instruct the first user identifier to register. Specifically, the first terminal device sends the first message to the first network element, and the first network element receives the first message. The first message can be a NAS message, used to instruct the first user identifier to register, or it can be understood as instructing the first user identifier to log out of the terminal device.

[0225] Alternatively, step S601b above can be replaced by step S601c:

[0226] Step S601c: The third network element sends the first message to the first network element.

[0227] In step S601c, the possible implementation of the first message can correspond to the second possible implementation of the first message in S601, or it can correspond to the following description. Figure 9 The method described in step S903, namely, the first message can be used to indicate a change in the user identifier of the user using the first terminal device. For example, the first message may include a second user identifier and the authentication result of the second user identifier. The first message can be used to indicate that the user identifier of the user using the first terminal device has changed to the second user identifier. Specifically, the third network element sends the first message to the first network element, and the first network element receives the first message. The first message may include the second user identifier and the authentication result of the second user identifier. The first message is used to indicate that the user identifier of the user using the first terminal device has changed to the second user identifier. This can also be understood as the first user identifier changing to the second user identifier, or as the login terminal device of the first user identifier switching to the login terminal device of the second user identifier.

[0228] The first message may include the second user identifier and the authentication result of the second user identifier. Specifically, the first message may be an authentication response message for the second user identifier, which may include authentication result indication information for the second user identifier and the second user identifier. This authentication result indication information is used to indicate whether the second user or the second user identifier has successfully or failed authentication. For example, the authentication result indication information for the second user identifier may be bit indication information, enumeration-type indication information, or a single message. For instance, when the authentication result indication information for the second user identifier is bit indication information, bit 0 indicates authentication failure, and bit 1 indicates authentication success. Another example is when the authentication result indication information for the second user identifier is enumeration-type indication information, where the string "Failure" indicates authentication failure, and the string "Success" indicates authentication success. Yet another example is when the authentication result indication information for the second user identifier is a single message, where the string "EAP-Failure" indicates authentication failure, and the string "EAP-Success" indicates authentication success. This application does not specifically limit the authentication result indication information of user identifiers (including first user identifier and second user identifier). It is understood that other user identifiers that conform to actual applications can also be selected for authentication result indication information, which will not be described in detail hereafter.

[0229] Optionally, in step S601, after receiving the first message, the first network element checks whether a PDU session associated with the first user identifier exists, and executes step S602 based on the check result. For example, after receiving the first message, the first network element can check whether the first user identifier exists in the terminal context, or check whether the first user identifier is in an active state in the terminal context. If it exists, then step S602 is executed. Alternatively, after receiving the first message, the first network element can also execute step S602 based on a pre-configuration. Alternatively, after receiving the first message, if the first message includes a user identifier and its authentication result, the first network element can check whether the user identifier in the first message is the same as the first user identifier existing in the terminal context. If they do not match, then step S602 is executed. This application does not limit the specific method.

[0230] Step S602: The first network element sends a second message to the second network element, the second message including identification information and first indication information.

[0231] The second message includes identification information and first instruction information. The first instruction information is used to instruct the deactivation of the session associated with the identification information. The identification information is associated with a first user identifier. For example, the identification information can be the first user identifier, the session management context identifier corresponding to the first user identifier, or the session identifier corresponding to the first user identifier. This application embodiment does not specifically limit the identification information. It is understood that other identification information associated with the first user identifier that conforms to the actual application can also be selected, which will not be described in detail hereafter.

[0232] For example, the second message can be a session context update request, such as a Network Session Management Function Protocol Data Unit Session Context Update Request (Nsmf_PDUSessionContext_Updaterequest). This application does not specifically limit the second message; it is understood that other second messages suitable for actual applications can also be selected, and will not be elaborated further hereafter.

[0233] For example, the first indication information can be bit-level indication information or byte-level indication information, such as the string "inactive" used to indicate the execution of a deactivation action, or it can be the name of the second message, such as Nsmf_PDUSessionContext_Update request. This application does not specifically limit the form of the first indication information; it is understood that other forms of first indication information that conform to actual applications can also be selected, and will not be elaborated further hereafter.

[0234] The first network element can send the second message to the second network element through Hypertext Transfer Protocol Version 2 (HTTP / 2), the N11 interface, a RESTful API based on representation state transition architecture, NRF-based service discovery, or service-based architecture (SBA) service routing mechanisms. It is understood that the first network element sends the second message to all second network elements associated with all PDU sessions associated with the first user identifier. This application embodiment does not specifically limit the method by which the first network element sends the second message to the second network element; it is understood that other methods suitable for actual applications can also be chosen, which will not be elaborated further hereafter.

[0235] Step S603: The second network element deactivates the session associated with the identification information.

[0236] The second network element receives a second message from the first network element and deactivates the session associated with the identification information. The second network element can determine to deactivate the session associated with the identification information in various ways. For example, the second network element can determine to deactivate the session based on the name of the second message; the second network element can also determine to deactivate the session based on the first indication information in the second message; or the second network element can determine to deactivate the session based on local configuration. This application embodiment does not specifically limit the method by which the second network element determines to deactivate the session associated with the identification information. It is understood that other methods that conform to actual applications can also be selected, and will not be elaborated further hereafter.

[0237] The method for deactivating sessions associated with identification information using the second network element can be referred to in the following section. Figure 7 The description will not be repeated here.

[0238] Figure 6 In the illustrated method embodiment, after receiving a first message indicating a change in the network access type of the first terminal device, the first network element sends a second message to the second network element, instructing the second network element to deactivate the session associated with the first user identifier. In this way, the network side can retain session-related information when services based on the user identifier cannot proceed due to a change in the network access type of the first terminal device. This facilitates the rapid re-establishment of the session user plane connection, enabling quick recovery of services associated with the first user identifier. This shortens the service recovery time during network handover, reduces signaling interactions, and thus improves the continuity and stability of network services. Alternatively, after receiving the first message indicating a change in the user identifier of the first terminal device, the first network element retains session-related information such as the context corresponding to the first user identifier and sends a second message to the second network element, instructing the second network element to deactivate the session associated with the first user identifier. This allows for rapid establishment of the user plane connection when the first user identifier re-logs in within a short period, achieving rapid network access for services associated with the first user identifier. This further improves the continuity and stability of network services and makes network resource utilization more efficient. Thus, the network side can more flexibly respond to frequent handover requirements and provide more stable service quality in complex and high-frequency handover scenarios.

[0239] In some feasible examples, the method may further include: receiving a third message indicating that the access network type of the first terminal device has changed or the user identifier of the first terminal device has changed; and sending a fourth message to the second network element, the fourth message including the identification information and a second indication information, the second indication information being used to indicate the activation of the session associated with the identification information.

[0240] The third message is used to indicate a change in the access network type of the first terminal device, including: the third message is used to indicate that the first terminal device switches from the EPS access network to the 5GS access network.

[0241] The third message is used to indicate a change in the user identifier of the user using the first terminal device, including: the third message is used to indicate registration of the first user identifier; or the third message includes the first user identifier and the authentication result of the first user identifier, and the third message is used to indicate that the user identifier of the user using the first terminal device is changed to the first user identifier.

[0242] The above third piece of information can be referenced. Figure 8 or Figure 9 The description will not be elaborated here.

[0243] for Figure 6 The method embodiments shown below, along with their specific implementations and beneficial effects, can be found in the following text. Figure 8 , Figure 9 The description, that is, Figure 8 , Figure 9 The example shown is Figure 6 The specific implementation of the illustrated embodiment is omitted to avoid redundancy. Figure 6 The specific details are elaborated in the examples. Among them, Figure 8 The method implementation can correspond to step S601a above; Figure 9 The method implementation can correspond to step S601b or step S601c as described above.

[0244] Please see Figure 8 , Figure 8 This is a flowchart illustrating another communication method provided in an embodiment of this application. The fourth network element in this embodiment can be... Figure 2b The MME network element shown in this embodiment, whose function is performed by the fourth network element, can also be performed by a device (e.g., a chip, a chip system, or a circuit) within the fourth network element. The fifth network element in this embodiment can be... Figure 2a or Figure 2b The UPF network element is shown. In this embodiment, the function performed by the fifth network element can also be performed by a device within the fifth network element (e.g., a chip, a chip system, or a circuit). Further details will not be provided hereafter.

[0245] Figure 8 In the illustrated method embodiment, the first network element receives a first message from the first network device, which instructs the first terminal device to switch from the 5GS access network to the EPS access network. For example... Figure 8 As shown:

[0246] Step S801: The first network element stores the first user identifier.

[0247] Specifically, after the first user identifier logs into the first terminal device, and the third network element confirms that the authentication result of the first user identifier is successful, the first network element saves the first user identifier.

[0248] The first network element stores the first user identifier, which can be implemented in any of the following ways:

[0249] In the first possible implementation, the first network element updates the state of the first user identifier to the active state.

[0250] In the second possible implementation, the first network element stores the first user identifier in the terminal context.

[0251] The third possible implementation is that the first network element stores the first user identifier and the authentication result of the first user identifier.

[0252] The first network element can quickly find and manage the session context information associated with the first user identifier by storing the first user identifier.

[0253] Alternatively, the steps performed by the first network element can also be performed by the UDM. For example, the UDM can update the status of the first user identifier to an active state, or save the first user identifier in the subscription information, or save the first user identifier and the authentication result of the first user identifier.

[0254] Step S802: The first network device sends a first message to the first network element, the first message being used to indicate that the access network type of the first terminal device has changed.

[0255] For example, the first message is used to instruct the first terminal device to switch from the 5GS access network to the EPS access network. For a detailed description, please refer to step S601a above, which will not be repeated here.

[0256] Step S803: Optionally, the first network element updates the status of the first user identifier and retains the context corresponding to the first user identifier.

[0257] The first network element receives the first message and updates the status of the first user identifier. This can be done by the first network element updating the status of the first user identifier to a deactivated state or a disabled state (suspend).

[0258] The first network element receives the first message and retains the context corresponding to the first user identifier. Optionally, the first network element starts a timer, which indicates the time for the first network element to retain the context corresponding to the first user identifier. If the timer does not expire, the first network element will retain the context corresponding to the first user identifier.

[0259] The phrase "the first network element retains the context corresponding to the first user identifier" can also be understood as the first network element not deleting the context corresponding to the first user identifier. Specifically, the first network element has already saved the context corresponding to the first user identifier before performing this step, and... Figure 4 Unlike existing technologies, the method corresponding to this step does not delete the context corresponding to the first user identifier.

[0260] Step S804: The first network element sends a second message to the second network element, the second message including identification information and first indication information.

[0261] The description of step S804 can be found in step S602 above, and will not be repeated here.

[0262] Step S805: The second network element deactivates the session associated with the identification information.

[0263] The description of step S805 can be found in step S603 above, and will not be repeated here.

[0264] Step S806: The first terminal device, the first network device, and multiple network elements continue to execute the process of deactivating the session associated with the identification information.

[0265] For example, to perform a session that deactivates the associated identification information, see [link to documentation]. Figure 7 , Figure 7 This is a schematic diagram of a session deactivation method provided in an embodiment of this application. For example, the first network element can execute... Figure 7 The schematic diagram shows some steps performed by the AMF network element; the second network element can perform... Figure 7 The schematic diagram shows some of the steps performed by the SMF network element. Figure 7 This may include the following steps:

[0266] S701: SMF receives an instruction message to deactivate the session and triggers the process of deactivating the session.

[0267] The instruction message can be an instruction message for deactivating the session from the AMF, or a data notification from the UPF.

[0268] When the UPF directly connected to the N3 interface terminal (the UPF can also be called UPF (N3 terminating), which will not be described further hereafter) is released, execute S702a-S703b:

[0269] S702a: SMF sends an N4 session release request to UPF (N3 terminating).

[0270] Correspondingly, UPF (N3 terminating) receives N4 session release requests from SMF.

[0271] S702b: UPF (N3 terminating) sends an N4 session release response to SMF.

[0272] Correspondingly, the SMF receives the N4 session release response from the UPF (N3 terminating).

[0273] SMF triggers the process of releasing the N4 connection, releasing the UPF (N3 terminating) and all intermediate UPFs before the N3 terminating UPF. The intermediate UPFs may include UPFs configured with caching functionality. The UPFs configured with caching functionality can also be called UPFs (to buffer), which will not be described further hereafter.

[0274] Optionally, S703a: SMF sends an N4 session modification request to UPF (to buffer).

[0275] Correspondingly, the UPF(to buffer) receives N4 session modification requests from the SMF.

[0276] Optionally, S703b: UPF(to buffer) sends an N4 session modification response to SMF.

[0277] Correspondingly, the SMF receives the N4 session modification response from the UPF (to buffer).

[0278] SMF enables data caching. Specifically, in steps S2a-S2b, if a UPF is released, the SMF initiates an N4 session modification procedure to the UPF connected to the released UPF, instructing the deletion of the core network tunnel information of the N9 tunnel connected to the released UPF. The UPF connected to the released UPF can be a UPF (to buffer), a PDU session anchor, or another intermediate UPF. Subsequently, the UPF connected to the released UPF, according to the caching instruction from the SMF, caches, discards, or forwards downlink data packets of the PDU session that need to be deactivated to the SMF.

[0279] If UPF(N3 terminating) is not released, execute S704a-S704b:

[0280] S704a: The SMF sends an N4 session modification request to the UPF (N3 terminating).

[0281] Correspondingly, UPF (N3 terminating) receives N4 session modification requests from SMF.

[0282] S704b: UPF (N3 terminating) sends an N4 session modification response to SMF.

[0283] Correspondingly, the SMF receives the N4 session modification response from the UPF (N3 terminating).

[0284] SMF initiates an N4 session modification procedure to UPF (N3 terminating), instructing the removal of N3 tunnel information for the PDU session that needs to be deactivated.

[0285] S705: An AMF-SMF communication message to indicate the release of air interface resources for a PDU session.

[0286] Specifically, the AMF sends an Access and Mobility Management Function Communication N1N2 (Namf_Communication_N1N2) message to the SMF, and the SMF sends a response message to the AMF containing the Namf_Communication_N1N2 message.

[0287] S706: AMF sends an N2 PDU session resource release command to NG-RAN.

[0288] Correspondingly, NG-RAN receives the N2 PDU session resource release command from AMF.

[0289] AMF instructs NG-RAN to release the air interface resources for the PDU session.

[0290] S707: NG-RAN sends a command to the terminal device to release RAN-specific resources, and the terminal device sends a response message to NG-RAN.

[0291] NG-RAN and the terminal equipment cooperate to release the air interface resources of the PDU session.

[0292] S708: NG-RAN sends an N2 PDU session resource release response to AMF.

[0293] Correspondingly, the AMF receives an N2 PDU session resource release response from the NG-RAN.

[0294] NG-RAN sends an N2 PDU session resource release response to AMF, indicating that the air interface resources of the PDU session are released.

[0295] S709: The AMF sends a Network Session Management Function Protocol Data Unit Session Update Session Management Context (Nsmf_PDUSession_Update SMContext) message to the SMF, and the SMF sends a response message to the AMF.

[0296] Step S709 is used to confirm that the release process of air interface resources has been completed.

[0297] Figure 7 The session deactivation procedure shown terminates some user plane resources associated with the session, but the control plane resources associated with the session, such as the session-related context stored in the network, are retained. Therefore, re-establishing the session only requires establishing the user plane connection of the session, thereby quickly restoring the session's services, reducing signaling interactions, and improving the continuity and stability of network services.

[0298] Step S807: The first terminal device, the first network device, and multiple network elements execute the process of the first terminal device switching from the 5GS access network to the EPS access network.

[0299] For example, the first network element can perform Figure 4 The schematic diagram shows some steps S0 to S13 performed by the AMF network element; the second network element can perform... Figure 4 The diagram illustrates some steps S0 to S13 performed by the SMF network element. These will not be elaborated upon further here.

[0300] Step S808: The fourth network element sends a third message to the first network element.

[0301] The third message is used to instruct the first terminal device to switch from the EPS access network to the 5GS access network. The third message may be a relocation request from the fourth network element, and may include the identifier of the first terminal device and / or the context stored by the fourth network element.

[0302] Step S809: Optionally, the first network element updates the status of the first user identifier.

[0303] If the first network element receives the third message and, in step S803, the first network element updates the state of the first user identifier to a deactivated or disabled state, then in this step, the first network element updates the state of the first user identifier. Specifically, the first network element checks whether it has the context of the first terminal device based on the context stored by the fourth network element in step S808. If it has the context of the first terminal device, and the first user identifier is stored in the terminal context or the state of the first user identifier is deactivated or disabled, then the first user identifier is updated to an activated state.

[0304] Step S810: The first network element sends a fourth message to the second network element, the fourth message including identification information and second indication information.

[0305] The fourth message includes identification information and second indication information. The second indication information is used to indicate the activation of the session associated with the identification information, or to indicate the establishment of a user plane connection for the session associated with the identification information (the user plane connection can be an N3 connection or an air interface connection).

[0306] For example, the fourth message can be a session context update request (Nsmf_PDUSession_Context_Update request). This application does not specifically limit the fourth message; it is understood that other fourth messages suitable for actual applications can also be selected, and will not be elaborated further hereafter.

[0307] For example, the second indication information can be bit-level indication information or byte-level indication information, such as the string "active" used to indicate the execution of an activation action, or it can be the name of the fourth message, such as Nsmf_PDUSession_Context_Update request. This application does not specifically limit the form of the second indication information; it is understood that other forms of second indication information that conform to actual applications can also be selected, and will not be elaborated further hereafter.

[0308] The first network element can send a fourth message to the second network element through methods such as HTTP / 2, N11 interface, RESTful API, NRF-based service discovery, and SBA service routing mechanism. It is understood that the first network element sends the fourth message to all second network elements associated with all PDU sessions associated with the first user identifier. This application embodiment does not specifically limit the method by which the first network element sends the fourth message to the second network element; it is understood that other methods suitable for actual applications can also be chosen, which will not be elaborated further hereafter.

[0309] Alternatively, step S810 above can be replaced by step S811:

[0310] Step S811: The fifth network element sends the fifth message to the second network element.

[0311] The fifth message may be a data notification including the first user identifier, used to indicate the activation of the session associated with the first user identifier, that is, to indicate the session associated with the identifier information.

[0312] The fifth network element sends a fifth message to the second network element. For example, if the fifth network element receives a downlink data packet and the data packet belongs to the session corresponding to the first user identifier, then the fifth network element sends a fifth message to the second network element.

[0313] Step S812: The second network element activates the session associated with the identification information.

[0314] The second network element receives a fourth message from the first network element, or a fifth message from the fifth network element, and activates the session associated with the identification information (activating the session associated with the identification information can also be referred to as establishing a user plane connection for the session associated with the identification information, which will not be elaborated further). The second network element can determine the activation of the session associated with the identification information in various ways. For example, the second network element can determine the activation of the session based on the name of the fourth message; the second network element can also determine the activation of the session based on the second indication information in the fourth message; or the second network element can determine the activation of the session based on its local configuration. This application embodiment does not specifically limit the method by which the second network element determines the activation of the session associated with the identification information. It is understood that other methods that conform to actual applications can also be selected, which will not be elaborated further.

[0315] Step S813: The first terminal device, the first network device, and multiple network elements continue to execute the process of activating the session associated with the identification information.

[0316] The process of the first network element and the second network element continuing to execute the session associated with the activation identification information may include the following two steps:

[0317] Step 1: Establish the N3 tunnel. The N3 tunnel is used to transmit downlink data packets of the session associated with the identification information to the first terminal device.

[0318] For example, the second network element sends an N1 message to the first terminal device through the first network element. For instance, the second network element sends a Namf_Communication_N1N2MessageTransfer message to the first network element. This message may include SUPI, session identifier, and N1 session management container (N1 SM container) message. The N1 SM container message may include indication information indicating that the 5GC connects to the first terminal device.

[0319] The second network element sends an N2 message to the first network device. For example, the second network element sends N2 session management information to the first network device. The N2 session management information may include N3 tunnel information, QoS flow related information in the session such as QFI, slice information, etc.

[0320] Step 2: Establish wireless resources.

[0321] For example, if the first terminal device is in a connected state, after receiving the N1 message, the first network element will send a session management context update request message to the second network element. The second network element will select a suitable fifth network element and establish an N4 connection, and interact with the first network device to establish a radio resource control connection (RRC) to reserve air interface resources. If the first terminal device is in an idle state, the first network element will send a paging message through the access network. After receiving the paging message, the first terminal device will activate the session and respond to the first network element. The first network element will update the session management context stored in the second network element, and the second network element will establish an N4 connection and an RRC connection with the first network device.

[0322] This application does not impose specific limitations on the order and method of establishing N3 tunnels and wireless resources. It is understood that other methods of establishing N3 tunnels and wireless resources that are suitable for actual applications can also be selected, which will not be described in detail hereafter.

[0323] Step S814: The first terminal device, the first network device, and multiple network elements execute the process of the first terminal device switching from the EPS access network to the 5GS access network.

[0324] For example, the first network element can perform Figure 4 The schematic diagram shows some steps S414 to S418 performed by the AMF network element; the second network element can perform... Figure 4 The diagram illustrates some steps S414 to S418 performed by the SMF network element. These will not be elaborated upon here.

[0325] Optionally, the methods corresponding to steps S812 and S813 can be executed first, followed by the method corresponding to step S814; or the method corresponding to step S814 can be executed first, followed by the methods corresponding to steps S812 and S813.

[0326] Optionally, step S809 may be after step S808 and before steps S810 and S811; or after steps S810 and S811 and before steps S812 and S813; or after steps S812 and S813 and before step S814; or after step S814 and before steps S812 and S813; or after steps S812, S813, and S814.

[0327] Figure 8In the illustrated method embodiment, after the first network element receives a first message instructing the first terminal device to switch from the 5GS access network to the EPS access network, it sends a second message to the second network element to instruct the second network element to deactivate the session associated with the first user identifier. In this way, the network side can retain session-related information when services based on the user identifier cannot be performed due to a change in the access network type of the first terminal device. This helps the first terminal device quickly re-establish the session user plane connection when switching from the EPS access network to the 5GS access network, thus quickly restoring services associated with the first user identifier. This shortens the service recovery time during access network switching, reduces signaling interactions, and improves the continuity and stability of network services. Therefore, the network side can more flexibly respond to the needs of frequent access network switching and provide more stable service quality in complex and high-frequency switching scenarios.

[0328] Please see Figure 9 , Figure 9 This is a flowchart illustrating another communication method provided in an embodiment of this application. Figure 9 In the illustrated method embodiment, the first message received by the first network element is used to indicate a change in the user identifier of the user using the first terminal device. For example... Figure 9 As shown:

[0329] Step S901: The first network element stores the first user identifier.

[0330] The description of step S901 can be found in step S801 above, and will not be repeated here.

[0331] Step S902: The first terminal device sends a first message to the first network element, the first message being used to indicate that the user identifier of the user using the first terminal device has changed.

[0332] For example, the first message can be used to instruct the first user ID to register. For a detailed description, please refer to step S601b above, which will not be repeated here.

[0333] Alternatively, step S902 above can be replaced by step S903:

[0334] Step S903: The third network element sends a first message to the first network element, the first message being used to indicate that the user identifier of the user using the first terminal device has changed.

[0335] For example, the first message may include the second user identifier and the authentication result of the second user identifier. The first message is used to indicate that the user identifier of the user using the first terminal device is changed to the second user identifier. For a detailed description, please refer to step S601c above, which will not be repeated here.

[0336] Optionally, the first message is used to indicate a change in the user identifier of the user using the first terminal device, and can be implemented through other steps besides step S902 or step S903.

[0337] Step S904: Optionally, the first network element updates the status of the first user identifier and retains the context corresponding to the first user identifier.

[0338] The description of step S904 can be found in step S803 above, and will not be repeated here.

[0339] Step S905: Optionally, if the first message includes a second user identifier, then the first network element stores the second user identifier.

[0340] The first network element stores the second user identifier, which can be any of the following possible implementations:

[0341] In the first possible implementation, after the first network element confirms that the authentication result of the second user identifier is successful, it can store the second user identifier in the terminal context.

[0342] In a second possible implementation, the first network element can store the association between the first terminal device and the second user identifier.

[0343] In the third possible implementation, the first network element can update the status of the second user identifier to the active state.

[0344] The first network element can quickly find and manage the session context information associated with the second user identifier by storing the second user identifier.

[0345] Step S906: The first network element sends a second message to the second network element, the second message including identification information and first indication information.

[0346] The description of step S906 can be found in step S602 above, and will not be repeated here.

[0347] Step S907: The second network element deactivates the session associated with the identification information.

[0348] The description of step S907 can be found in step S603 above, and will not be repeated here.

[0349] Step S908: The first network element and the second network element continue to execute the process of deactivating the session associated with the identification information.

[0350] The description of step S908 can be found in step S806 above, and will not be repeated here.

[0351] The third message is used to indicate a change in the user identifier of the first terminal device, and there are two possible implementation methods:

[0352] In one possible implementation, the third message can be used to instruct the first user to register.

[0353] In a second possible implementation, the third message includes a first user identifier and the authentication result of the first user identifier, and the third message is used to indicate that the user identifier of the user using the first terminal device is changed to the first user identifier.

[0354] In this context, step S909 corresponds to a third message used to indicate a first possible implementation of changing the user identifier of the first terminal device, and step S910 corresponds to a third message used to indicate a second possible implementation of changing the user identifier of the first terminal device.

[0355] Step S909: The first terminal device sends a third message to the first network element.

[0356] The third message can be used to instruct the first user identifier to register. For example, the third message can be a registration request message from the first terminal device, which may include the first user identifier.

[0357] Alternatively, step S909 above can be replaced by step S910:

[0358] Step S910: The third network element sends a third message to the first network element, the third message including the first user identifier and the authentication result of the first user identifier.

[0359] The third message is used to instruct the user identifier of the user using the first terminal device to be changed to the first user identifier. This can be understood as the third message being used to instruct the second user identifier to be changed to the first user identifier, or it can be understood as the third message being used to instruct the second user identifier to log in to the first terminal device to be changed to the first user identifier to log in to the first terminal device.

[0360] The third message may include the first user identifier and the authentication result of the first user identifier. Specifically, the third message may be an authentication response message for the first user identifier. The authentication response message may include the first user identifier and authentication result indication information for the first user identifier. The authentication result indication information is used to indicate whether the first user or the first user identifier has successfully authenticated or failed to authenticate.

[0361] If the third message includes the authentication result of successful authentication of the first user identifier, then proceed with step S911 and subsequent steps.

[0362] Optionally, the third message is used to indicate a change in the user identifier of the first terminal device, which can be achieved through other steps besides step S909 or step S910.

[0363] Step S911: Optionally, the first network element updates the status of the first user identifier.

[0364] After receiving the third message, if the first network element updates the state of the first user identifier to a deactivated or disabled state in step S904, then the first network element updates the state of the first user identifier in this step. Specifically, the first network element can check the state of the first user identifier; if the state of the first user identifier is deactivated or disabled, then it updates the state of the first user identifier to an activated state.

[0365] Step S912: The first network element sends a fourth message to the second network element, the fourth message including identification information and second indication information.

[0366] After receiving the third message, the first network element can check the status of the first user identifier. If the status of the first user identifier is deactivated or disabled, it can send a fourth message to the second network element. Alternatively, after receiving the third message, the first network element can send a fourth message to the second network element based on the pre-configuration.

[0367] The description of the first network element sending the fourth message to the second network element can be found in step S810 above, and will not be repeated here.

[0368] Step S913: The second network element activates the session associated with the identification information.

[0369] The description of step S913 can be found in step S812 above, where the second network element receives the fourth message and activates the session associated with the identification information. It will not be repeated here.

[0370] Step S914: The first network element and the second network element continue to execute the process of the session associated with the activation identification information.

[0371] The description of step S914 can be found in step S813 above, and will not be repeated here.

[0372] Optionally, step S911 can be after step S909 and step S910 and before step S912; it can also be after step S912 and before step S913 and step S914; or it can be after step S913 and step S914.

[0373] Figure 9In the illustrated method embodiment, after receiving a first message indicating a change in the user identifier of the first terminal device, the first network element retains session-related information such as the context corresponding to the first user identifier and sends a second message to the second network element to instruct the second network element to deactivate the session associated with the first user identifier. This enables rapid establishment of the user plane connection when the first user identifier re-logins within a short period, achieving rapid network access for the services of the first user identifier. This improves the continuity and stability of network services and makes network resource utilization more efficient. In this way, the network side can more flexibly respond to the needs of frequent user identifier switching and provide more stable service quality in complex and high-frequency switching scenarios.

[0374] The apparatus involved in the embodiments of this application is described below.

[0375] It is understood that, in order to achieve the functions in the above embodiments, the network elements in the network device include hardware structures and / or software modules corresponding to perform 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 or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0376] Figure 10 This is a schematic diagram of a communication device provided in an embodiment of this application. These communication devices can be used to implement the functions of the first network element and the second network element in the above method embodiments, and therefore can also achieve the beneficial effects of the above method embodiments.

[0377] like Figure 10 As shown, the communication device 1000 includes a transceiver unit 1001 and a processing unit 1002. The communication device 1000 is used to implement the above-mentioned... Figure 6 , Figure 8 , Figure 9 The method embodiment shown illustrates the function of the first network element. Wherein:

[0378] Transceiver unit 1001 is used to receive a first message, the first message being used to indicate that the access network type of the first terminal device has changed or the user identifier of the first terminal device has changed.

[0379] The transceiver unit 1001 is further configured to send a second message to the second network element. The second message includes identification information and first indication information. The first indication information is used to instruct the deactivation of the session associated with the identification information. The identification information includes at least one of the following: a first user identifier, a session management context identifier corresponding to the first user identifier, and a session identifier corresponding to the first user identifier. The first user identifier is the identifier of a first user using the first terminal device.

[0380] In one possible implementation, the first message is used to indicate the access network type of the first terminal device, including: the first message is used to indicate that the first terminal device switches from a 5GS access network to an EPS access network.

[0381] In one possible implementation, the first message is used to indicate a change in the user identifier of the user using the first terminal device, including: the first message instructing the first user identifier to register; or the first message includes a second user identifier and the authentication result of the second user identifier, and the first message instructs the user identifier of the user using the first terminal device to be changed to the second user identifier.

[0382] In one possible implementation, the transceiver unit 1001 is further configured to receive a third message, the third message being used to indicate that the access network type of the first terminal device has changed or the user identifier of the first terminal device has changed; the transceiver unit 1001 is further configured to send a fourth message to the second network element, the fourth message including the identification information and the second indication information, the second indication information being used to indicate the activation of the session associated with the identification information.

[0383] In one possible implementation, the third message is used to indicate a change in the access network type of the first terminal device, including: the third message is used to indicate that the first terminal device switches from the EPS access network to the 5GS access network.

[0384] In one possible implementation, the third message is used to indicate a change in the user identifier of the user using the first terminal device, including: the third message indicating registration of the first user identifier; or the third message including the first user identifier and the authentication result of the first user identifier, the third message indicating that the user identifier of the user using the first terminal device is changed to the first user identifier.

[0385] In one possible implementation, the processing unit 1002 is configured to update the status of the first user identifier after receiving the first message.

[0386] In one possible implementation, the processing unit 1002 is further configured to retain the context corresponding to the first user identifier after receiving the first message.

[0387] In one possible implementation, the processing unit 1002 is further configured to, after receiving the first message, store the second user identifier if the first message contains the second user identifier.

[0388] The communication device 1000 is also used to achieve the above. Figure 6 , Figure 8 , Figure 9 The method embodiment shown illustrates the function of the second network element. Wherein:

[0389] The transceiver unit 1001 is configured to receive a second message from a first network element. The second message includes identification information and first indication information. The first indication information is used to instruct the deactivation of the session associated with the identification information. The identification information includes at least one of the following: a first user identifier, a session management context identifier corresponding to the first user identifier, and a session identifier corresponding to the first user identifier. The first user identifier is the identifier of a first user using a first terminal device.

[0390] Processing unit 1002 is used to deactivate the session associated with the identification information.

[0391] In one possible implementation, the transceiver unit 1001 is further configured to receive a fourth message from the first network element, the fourth message including the identification information and the second indication information, the second indication information being used to indicate the activation of the session associated with the identification information; the processing unit 1002 is further configured to activate the session associated with the identification information.

[0392] Please see Figure 11 , Figure 11 This is a schematic diagram of another communication device provided in an embodiment of this application. The device 110 is used to implement the functions of the network element of this application. For example, the network element can be an access network device, a terminal device, a DU, or a CU. The device 110 can be the network element, or a device that can be installed in the network element, or a device that can be used in conjunction with the network element; there are no limitations. For example, the device can be a chip or a chip system. Figure 11As shown, the device 110 includes an interface 111 and a processor 112. Optionally, the processor 112 is used to execute a program 114. The processor 112 may store the program 114 or obtain the program 114 from other devices or equipment (e.g., from memory 113 or downloaded from a third-party website). Optionally, the device 110 includes a memory 113. The memory 113 is used to store a program 115. The program 115 may be pre-stored or loaded later. Optionally, the memory 113 may also be used to store necessary data. These components work together to provide the various functions described in this application.

[0393] Processor 112 may include one or more processors as a combination of computing devices. Processor 112 may include one or more of the following: microprocessor, microcontroller, digital signal processor (DSP), digital signal processing device (DSPD), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), programmable logic device (PLD), gated logic, transistor logic, discrete hardware circuitry, processing circuitry, or other suitable hardware, firmware, and / or combinations of hardware and software configured to perform the various functions described in this application. Processor 112 may be a general-purpose processor or a special-purpose processor. For example, processor 112 may be a baseband processor or a central processing unit (CPU). A baseband processor may be used to process communication protocols and communication data. A CPU may be used to execute software programs and process data within those software programs.

[0394] Interface 111 may include any suitable hardware or software for enabling communication with one or more computer devices (such as the network elements of this application). For example, in some embodiments, interface 111 may include wires for coupling wired connections or terminals and / or pins for coupling wireless connections with wireless transceivers. In some embodiments, interface 111 may include a transmitter, receiver, transceiver, and / or antenna. The interface may be configured to enable communication between computer devices (such as the network elements of this application) using any available protocol (such as 3GPP standard protocols).

[0395] In this application, "program" refers to software in a broad sense. The software can be program code, a program, a subroutine, an instruction set, code, a code segment, a software module, an application program, a software application, etc. The program can run on a processor and / or computer to perform the various functions and / or processes described in this application.

[0396] Memory 113 may store necessary data required by processor 112 when executing software. Memory 113 may be implemented using any suitable storage technology. For example, memory 113 may be any available storage medium accessible to the processor and / or computer. Non-limiting examples of storage media include: random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), removable media, optical disc storage, magnetic disk storage media, magnetic storage devices, flash memory, registers, state memory, remote mounting memory, local or remote memory components, or any other medium that can carry or store software, data, or information and is accessible to the processor / computer.

[0397] The memory 113 and processor 112 can be configured separately or integrated together. The processor 112 can read information from, store, and / or write information to the memory 113. The memory 113 can be integrated into the processor 112. The processor 112 and memory 113 can be housed in an integrated circuit (e.g., an application-specific integrated circuit, ASIC). This integrated circuit can be located in the network element of this disclosure or in other network nodes.

[0398] Optionally, the apparatus 110 in the embodiments of this application can be used to perform the methods described in the embodiments of this application.

[0399] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, can implement the processes related to the first network element and the second network element in the communication method provided in the above method embodiments.

[0400] This application also provides a computer program product that, when run on a computer or processor, causes the computer or processor to execute one or more steps of any of the above-described communication methods. If the constituent modules of the aforementioned devices are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0401] This application also provides a chip or chip system, including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform some or all of the steps described in any of the corresponding method embodiments above. This chip system may be composed of chips or may include chips and other discrete devices.

[0402] This application also provides a communication system, which includes a first network element and a second network element, and the specific description can be found in the method described above.

[0403] It should be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be a hard disk drive (HDD), a solid-state drive (SSD), 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. 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 (DRRAM). Memory is any other medium capable of carrying or storing desired program code having an instruction or data structure form and accessible by a computer, but is not limited thereto. The memory in the embodiments of this application may also be circuitry or any other means capable of implementing storage functions for storing program instructions and / or data.

[0404] It should also be understood that the processor mentioned in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0405] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) is integrated into the processor.

[0406] It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.

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

[0408] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments provided 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.

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

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

[0411] 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 the embodiments of this application, depending on actual needs.

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

[0413] 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 technology, 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, ROM, RAM, magnetic disks, or optical disks.

[0414] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0415] The modules / units in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0416] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A communication method applied to a first network element, characterized in that, The method includes: Receive a first message, the first message being used to indicate that the access network type of the first terminal device has changed or the user identifier of the first terminal device has changed; A second message is sent to the second network element. The second message includes identification information and first indication information. The first indication information is used to instruct the deactivation of the session associated with the identification information. The identification information includes at least one of the following: a first user identifier, a session management context identifier corresponding to the first user identifier, and a session identifier corresponding to the first user identifier. The first user identifier is the identifier of the first user using the first terminal device.

2. The method according to claim 1, characterized in that, The first message is used to indicate the network type accessed by the first terminal device, including: The first message is used to instruct the first terminal device to switch from the 5GS access network to the EPS access network.

3. The method according to claim 1, characterized in that, The first message is used to indicate a change in the user identifier of the user using the first terminal device, including: The first message is used to instruct the first user ID to register; or The first message includes a second user identifier and the authentication result of the second user identifier. The first message is used to indicate that the user identifier using the first terminal device is changed to the second user identifier.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: Receive a third message, the third message being used to indicate that the access network type of the first terminal device has changed or the user identifier of the first terminal device has changed; A fourth message is sent to the second network element. The fourth message includes the identification information and the second indication information, and the second indication information is used to indicate the activation of the session associated with the identification information.

5. The method according to claim 4, characterized in that, The third message is used to indicate a change in the access network type of the first terminal device, including: The third message is used to instruct the first terminal device to switch from the EPS access network to the 5GS access network.

6. The method according to claim 4, characterized in that, The third message is used to indicate a change in the user identifier using the first terminal device, including: The third message is used to instruct the first user identifier to register; or The third message includes the first user identifier and the authentication result of the first user identifier, and the third message is used to indicate that the user identifier of the user using the first terminal device is changed to the first user identifier.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: Upon receiving the first message, update the status of the first user identifier.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: After receiving the first message, retain the context corresponding to the first user identifier.

9. The method according to claim 6, characterized in that, The method further includes: Upon receiving the first message, if the first message contains the second user identifier, the second user identifier is stored.

10. A communication method applied to a second network element, characterized in that, The method includes: A second message is received from a first network element. The second message includes identification information and first indication information. The first indication information is used to instruct the deactivation of the session associated with the identification information. The identification information includes at least one of the following: a first user identifier, a session management context identifier corresponding to the first user identifier, and a session identifier corresponding to the first user identifier. The first user identifier is the identifier of a first user using a first terminal device. Deactivate the session associated with the identified information.

11. The method according to claim 10, characterized in that, The method further includes: Receive a fourth message from the first network element, the fourth message including the identification information and the second indication information, the second indication information being used to indicate the activation of the session associated with the identification information; Activate the session associated with the identification information.

12. A communication device applied to a first network element, characterized in that, include: A transceiver unit is configured to receive a first message, which indicates that the access network type of the first terminal device has changed or the user identifier of the first terminal device has changed. The transceiver unit is further configured to send a second message to the second network element. The second message includes identification information and first indication information. The first indication information is used to instruct the deactivation of the session associated with the identification information. The identification information includes at least one of the following: a first user identifier, a session management context identifier corresponding to the first user identifier, and a session identifier corresponding to the first user identifier. The first user identifier is the identifier of a first user using the first terminal device.

13. The apparatus according to claim 12, characterized in that, The first message is used to indicate the network type accessed by the first terminal device, including: The first message is used to instruct the first terminal device to switch from the 5GS access network to the EPS access network.

14. The apparatus according to claim 12, characterized in that, The first message is used to indicate a change in the user identifier of the user using the first terminal device, including: The first message is used to instruct the first user ID to register; or The first message includes a second user identifier and the authentication result of the second user identifier. The first message is used to indicate that the user identifier using the first terminal device is changed to the second user identifier.

15. The apparatus according to any one of claims 12-14, characterized in that, The device further includes: The transceiver unit is used to receive a third message, which is used to indicate that the access network type of the first terminal device has changed or the user identifier of the first terminal device has changed. The transceiver unit is also configured to send a fourth message to the second network element, the fourth message including the identification information and the second indication information, the second indication information being used to indicate the activation of the session associated with the identification information.

16. The apparatus according to claim 15, characterized in that, The third message is used to indicate a change in the access network type of the first terminal device, including: The third message is used to instruct the first terminal device to switch from the EPS access network to the 5GS access network.

17. The apparatus according to claim 15, characterized in that, The third message is used to indicate a change in the user identifier using the first terminal device, including: The third message is used to instruct the first user identifier to register; or The third message includes the first user identifier and the authentication result of the first user identifier, and the third message is used to indicate that the user identifier of the user using the first terminal device is changed to the first user identifier.

18. The apparatus according to any one of claims 12-17, characterized in that, The device further includes: The processing unit is configured to update the status of the first user identifier after receiving the first message.

19. The apparatus according to any one of claims 12-18, characterized in that, The device further includes: The processing unit in the device is used to retain the context corresponding to the first user identifier after receiving the first message.

20. The apparatus according to claim 17, characterized in that, The device further includes: The processing unit in the device is used to receive the first message and, if the first message contains the second user identifier, store the second user identifier.

21. A communication device applied to a second network element, characterized in that, The device includes: The transceiver unit is configured to receive a second message from a first network element. The second message includes identification information and first indication information. The first indication information is used to instruct the deactivation of the session associated with the identification information. The identification information includes at least one of the following: a first user identifier, a session management context identifier corresponding to the first user identifier, and a session identifier corresponding to the first user identifier. The first user identifier is the identifier of a first user using a first terminal device. A processing unit is used to deactivate the session associated with the identification information.

22. The apparatus according to claim 21, characterized in that, The device further includes: The transceiver unit is used to receive a fourth message from the first network element. The fourth message includes the identification information and the second indication information, and the second indication information is used to indicate the activation of the session associated with the identification information. The processing unit is used to activate the session associated with the identification information.

23. A communication device, characterized in that, The communication device includes a processor and a storage medium, the storage medium storing instructions that, when executed by the processor, cause the method according to any one of claims 1 to 11 to be implemented.

24. A computer-readable storage medium or computer program product, characterized in that, Includes instructions that, when executed by a processor, cause the method according to any one of claims 1 to 11 to be performed.

25. A chip or chip system, characterized in that, It includes at least one processor for retrieving and executing instructions stored in a memory, causing a communication device equipped with a chip or chip system to perform the method as described in any one of claims 1 to 11.

26. A communication system, characterized in that, It includes a first network element and a second network element, wherein the first network element is used to implement the method as described in any one of claims 1-9, and the second network element is used to implement the method as described in any one of claims 10-11.