Patent Description:
In a 5th generation (5th generation, <NUM>) communication system, a terminal device may be connected to a data network (data network, DN) through a user plane function network element (user plane function, UPF). A specific UPF and a specific DN that are used by the terminal device for communication are determined in a session establishment process. After session establishment is completed, because a location of the terminal device is not fixed, when the location of the terminal device changes, a communication path between the terminal device and the DN is long if the terminal device still uses the UPF and the DN that are used in the session establishment process. Document "<NPL>, defines Stage <NUM> procedures and Network Function Services for the <NUM> system architecture, which is descried in the TS <NUM> and for the policy and charging control framework which is described in TS <NUM>. <NPL>, corrects <NUM> behavior and refers to appropriate stage <NUM> TS <NUM>.

Embodiments of the present invention disclose methods and apparatus, to shorten a communication path between a terminal device and a DN.

According to a first aspect, a communication method is disclosed. The method is applied to an application function network element (application function, AF), An AF receives DN identification information from a session management function network element (session management function, SMF), where the DN identification information includes an identifier of at least one DN that supports serving a first terminal device at a current location; and sends a first message to the SMF when the first terminal device has not accessed a first DN, where the first message includes an identifier of the first DN, the identifier of the at least one DN that supports serving the first terminal device at the current location includes the identifier of the first DN, and the first message is used to establish a data path between a UPF corresponding to the first DN and a classifier node.

Embodiments of the present invention disclose a communication methods and apparatus to shorten a communication path between a terminal device and a DN. Details are separately described in the following.

To better understand a communication method and apparatus, disclosed in embodiments of the present invention, the following first describes a network architecture used in embodiments of the present invention. <FIG> is a schematic diagram of a <NUM> network architecture according to an embodiment of the present invention. As shown in <FIG>, the <NUM> network architecture may include user equipment (user equipment, UE), a (radio) access network (radio access network, (R)AN) device, a UPF, a DN, an access and mobility management function network element (access and mobility management function, AMF), an SMF, a policy control function network element (policy control function, PCF), an AF, a unified data management network element (unified data management, UDM), an authentication server function network element (authentication server function, AUSF), and a network slice selection function network element (network slice selection function, NSSF). Different network elements or devices may communicate with each other through an interface. A name of an interface shown in <FIG> is merely an example for description. This is not specifically limited in embodiments of the present invention.

The UE may also be referred to as a terminal device, a mobile station (mobile station, MS), a mobile terminal (mobile terminal, MT), or the like, and is a device that provides voice and/or data connectivity for a user. The terminal device may be a handheld terminal, a notebook computer, a subscriber unit (subscriber unit), a cellular phone (cellular phone), a smartphone (smartphone), a wireless data card, a personal digital assistant (personal digital assistant, PDA) computer, a tablet computer, a wireless modem (modem), a handheld (handheld) device, a laptop computer (laptop computer), a cordless phone (cordless phone), a wireless local loop (wireless local loop, WLL) station, a machine type communication (machine type communication, MTC) terminal, or another device that can access a network. In <FIG>, the terminal device is merely shown by using UE as an example, and the terminal device is not limited. The UE may access the DN by establishing a session from the UE sequentially to the (R)AN device, the UPF, and then the DN, namely, a protocol data unit (protocol data unit, PDU) session.

The (R)AN device is a device that provides radio access for the UE, and is mainly responsible for functions such as radio resource management, quality of service (quality of service, QoS) flow management, and data compression and encryption on an air interface side. The (R)AN device may include base stations in various forms, such as a macro base station, a micro base station (also referred to as a small cell), a relay station, and an access point. The (R)AN device may further include a wireless fidelity (wireless fidelity, Wi-Fi) access point (access point, AP). The (R)AN device may further include a worldwide interoperability for microwave access (worldwide interoperability for microwave access, WiMax) base station (base station, BS).

The UPF is mainly responsible for processing a user packet, such as forwarding and charging. The user packet may be received from the DN, and transmitted to the UE through the RAN device. Alternatively, the user packet may be received from the UE through the RAN device, and forwarded to the DN. A transmission resource and a scheduling function in the UPF that provide a service for the UE are managed and controlled by the SMF.

The DN may be an internet (internet), an internet protocol (internet protocol, IP) multi-media service (IP multi-media service, IMS) network, a regional network (namely, a local network, for example, a multi-access edge computing (multi-access edge computing, MEC) network), or the like. The DN is a destination that a PDU session of the UE accesses. The DN includes an application server, and the application server may perform data transmission with the UE, to provide a service for the UE.

The AMF may access non-access stratum (non-access stratum, NAS) signaling (including session management (session management, SM) signaling) of the UE through an N1 interface and access RAN signaling through an N2 interface, to complete a UE registration procedure, SM signaling forwarding, and mobility management.

The SMF is mainly responsible for session management in a mobile network, for example, a session establishment, modification, release, or update procedure. For example, specific functions are allocation of an IP address to a user and selection of a UPF that provides a packet forwarding function.

The PCF may be responsible for terminal device policy management, including a mobility related policy and a PDU session related policy, such as a QoS policy and a charging policy.

The AF mainly supports interaction with a 3rd generation partnership project (3rd generation partnership project, 3GPP) core network to provide a service, to affect service flow routing, access network capability exposure, policy control, and the like.

The UDM is responsible for user key management, user identifier processing, subscription data access authorization, UE network function entity management, session and service continuity management, SMS message push, lawful interception, subscription management, SMS message management, and user data management and control, such as subscription information management.

The AUSF may be responsible for performing authentication and authorization on access of the UE.

Each of the foregoing network elements in the core network may also be referred to as a functional entity, and may be a network element implemented on dedicated hardware, or may be a software instance running on dedicated hardware, or an instance of a virtualization function on an appropriate platform. For example, the virtualization platform may be a cloud platform.

It should be noted that the architecture of the communication system shown in <FIG> is not limited to including only the network elements shown in the figure, and may further include another device not shown in the figure. Details are not described herein in the present invention one by one.

It should be noted that a distribution form of the network elements in the core network is not limited in embodiments of the present invention. The distribution form shown in <FIG> is merely an example, and is not limited in the present invention.

It should be understood that names of all network elements in the present invention are merely used as examples. In future communication, for example, <NUM>, names of the network elements may also be referred to as other names. Alternatively, in future communication, for example, <NUM>, the network elements in the present invention may be replaced with other entities, devices, or the like that have a same function. This is not limited in the present invention. Unified descriptions are provided herein, and details are not described below again.

It should be noted that the <NUM> network architecture shown in <FIG> does not constitute a limitation on the <NUM> network. Optionally, the method in embodiments of the present invention is further applicable to various future communication systems, for example, <NUM> or another communication network.

There is only one UPF in the <NUM> network architecture shown in <FIG>. Based on the foregoing basic architecture, <NUM> further supports insertion of a plurality of session anchor UPFs on a user plane path of a PDU session, to support a connection to a local (local) DN, so that the UE can access a nearby application server in the local DN. <FIG> is a schematic diagram of a network architecture according to an embodiment of the present invention. As shown in <FIG>, a plurality of UPFs are introduced into an architecture of a communication system. The plurality of UPFs may be respectively an uplink classifier (uplink classifier, ULCL)/branching point (branching point, BP), a UPF PDU session anchor (PDU session anchor, PSA) <NUM>, and a UPF PSA <NUM>. The ULCL/BP may distribute an uplink data packet from UE to the PSA <NUM> or the PSA <NUM> according to a distribution rule, or may send a data packet from the PSA <NUM> or the PSA <NUM> to UE. There is an N6 interface between the PSA <NUM> and a DN. For example, the DN may be a DN located in a central data center (data center, DC). There is an N6 interface between the PSA <NUM> and a local DN. For example, the local DN may be located in a local DC or an MEC node. The local DN may also be understood as deploying an application server in an edge hosting environment (edge hosting environment, EHE) closer to the UE, or may be referred to as an edge network (edge data network, EDN). When the UE has a service requirement, an SMF may insert a UPF (namely, a local (local, L) PSA) corresponding to the local DN, so that the UE can access a nearby application server in the local DN. For example, the PAS <NUM> in <FIG> is an L-PSA. It should be noted that a quantity of UPFs in <FIG> is merely an example, and more or fewer UPFs may alternatively be included. This is not limited in the present invention.

It should be noted that only one L-PSA is shown in <FIG>. It should be understood that a plurality of L-PSAs may alternatively be included. This is not limited in the present invention. <FIG> is a schematic diagram of another network architecture according to an embodiment of the present invention. As shown in <FIG>, there may be a plurality of L-PSAs in the network architecture, for example, an L-PSA <NUM> and an L-PSA <NUM> in <FIG>. In this network architecture, a ULCL/BP may be connected to the plurality of L-PSAs. In this example, the ULCL/BP may be co-deployed with the L-PSA <NUM>, and is connected to an MEC <NUM>; and the L-PSA <NUM> may be connected to an MEC <NUM>, and a PSA may be connected to a central DC. It should be understood that the ULCL/BP and the L-PSA <NUM> may alternatively be two independent network elements or devices.

Based on the foregoing network architecture, <FIG> is a schematic flowchart of a communication method according to an embodiment of the present invention. A function performed by a terminal device in the present invention may alternatively be performed by a module (for example, a chip) in the terminal device, a function performed by an AF in the present invention may alternatively be performed by a module (for example, a chip) in the AF, and a function performed by an SMF in the present invention may alternatively be performed by a module (for example, a chip) in the SMF. As shown in <FIG>, the communication method may include the following steps.

<NUM>: The SMF sends DN identification information to the AF.

Correspondingly, the AF receives the DN identification information from the SMF.

When there is a service related to a first terminal device, the SMF may send the DN identification information to the AF. The DN identification information may include an identifier of at least one DN that supports serving the first terminal device at a current location; or the DN identification information may include an identifier of at least one DN available to the first terminal device. The identifier of the DN may be an identity of the DN itself. For example, the identifier of the DN may be a data network name (data network name, DNN), or another DN identity (identity, ID). Alternatively, the identifier of the DN may be a DN access identifier. For example, the DN access identifier (DN access identifier, DNAI) may be used to identify a user plane path between a UPF and the DN, and may be considered as an identifier of the DN. Alternatively, the identifier of the DN may be an identifier of an MEC node or a DC, and may be used to indicate a location of the MEC node or the DC. Alternatively, the identifier of the DN may be subnet information of the DN, and a corresponding DN may be determined based on the subnet information. Alternatively, the identifier of the DN may be address information of an application server included in the DN, and a corresponding DN may be determined based on the address information.

It should be noted that, in the present invention, the at least one DN that supports serving the first terminal device at the current location may be a plurality of DNs, namely, two or more DNs.

In addition, the identifier, of the DN, included in the DN identification information may be an identifier of an available DN, and the available DN may alternatively be described as a DN supported by the SMF.

In an implementation, the SMF may configure or obtain a service scope of the DN. The service scope of the DN may be a specific location set, for example, a set of one or more of a tracking area (tracking area, TA) <NUM>, a TA <NUM>,. ; a RAN_1 and a RAN_2; a cell (Cell)_1 and a Cell_2; or the like. Alternatively, the service scope of the DN may be a set of pieces of geographical location information, for example, a longitude and a latitude, or an administrative region. Alternatively, the service scope of the DN may be a set of service scopes of one or more UPFs corresponding to the DN. The one or more UPFs may serve the DN. The service scope of the UPF may be a specific location set or a set of pieces of geographical location information. Alternatively, the service scope of the DN may be identified by a service scope of the application server (application server, AS) and/or an enabler server (enabler server, ES) deployed in the DN. A representation form of the service scope of the AS or the ES is the same as that described above, and details are not described again. In a PDU session establishment process, or when a location of the first terminal device changes, or a related service or event is detected, the SMF may obtain the current location of the first terminal device, for example, a TA <NUM> or a Cell_1. The SMF may obtain the current location of the first terminal device from an AMF. Alternatively, the SMF may subscribe to location information or a location change related event of the first terminal device from an AMF. Alternatively, the SMF may subscribe to, from an AMF, an event such as movement, of the first terminal device, into or out of the service scope of the DN. After detecting that the first terminal device moves, the AMF may notify the SMF of the current location of the first terminal device in real time. After obtaining the current location of the first terminal device, the SMF may first determine whether the current location of the first terminal device is within the service scope of the DN. If the current location of the first terminal device is within the service scope of the DN, the SMF determines that the DN supports serving the first terminal device at the current location. Assuming that the SMF configures or obtains service scopes of M DNs, after obtaining the current location of the first terminal device, the SMF may determine that N DNs in the M DNs support serving the first terminal device at the current location. Alternatively, another network element or functional entity may determine the DN identification information and then send the DN identification information to the SMF. A process of determining the DN identification information is similar to that performed by the SMF, and details are not described again. Then, the SMF may send the DN identification information to the AF. M is an integer greater than <NUM>, and N is an integer less than or equal to M.

In another implementation, the SMF may determine that a DN adjacent to the current location of the first terminal device is the DN that supports serving the first terminal device at the current location. For example, a distance between the current location of the first terminal device and a location of the DN does not exceed X kilometers. The SMF or another network element may calculate the distance between the current location of the first terminal device and the location of the DN, and then notify the SMF of the distance. Then, the SMF may send the DN identification information to the AF.

In another implementation, the SMF may configure or obtain, from another network element, a DN supported by the SMF. The SMF may determine, as the DN identification information, identifiers corresponding to all DNs supported by the SMF, or determine, as the DN identification information based on a configuration or a policy, an identifier corresponding to a subset of all DNs supported by the SMF. Then, the SMF may send the DN identification information to the AF.

In another implementation, when the first terminal device has inserted a ULCL/BP in a session establishment process, the DN identification information may be an identifier of a DN corresponding to an L-PSA that supports a connection to the ULCL/BP, for example, identifiers of DNs corresponding to an L-PSA <NUM> and an L-PSA <NUM> shown in <FIG>. Assuming that the ULCL/BP may be connected to M L-PSAs, the SMF may determine, as the DN identification information, identifiers of DNs corresponding to the M L-PSAs, or the SMF may determine, as the DN identification information based on a configuration or a policy, identifiers of N DNs in DNs corresponding to the M L-PSAs. Then, the SMF may send the DN identification information to the AF.

In another implementation, a location of the first terminal device may not be considered for the DN identification information sent by the SMF to the AF. For example, the SMF may determine a piece of recommended DN identification information based on a configuration or a policy, or obtain the DN identification information from another network element. This is not limited.

In addition, before, after, or when sending the DN identification information to the AF, the SMF may send, to the AF, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device.

In an implementation, the SMF may send, to the AF, the identifier of the DN that has been accessed by the first terminal device. Specifically, the SMF may send the identifier of the DN and indication information indicating "access has been performed" to the AF. According to a protocol, a configuration, or another manner reached by the SMF and the AF, if the SMF sends, by default, the identifier of the DN that has been accessed, the SMF may not send the indication information indicating "access has been performed".

In another implementation, the SMF may send, to the AF, the identifier of the DN that has not been accessed by the first terminal device. Specifically, the SMF may send the identifier of the DN and indication information indicating "access has not been performed" to the AF. According to a protocol, a configuration, or another manner reached by the SMF and the AF, if the SMF sends, by default, the identifier of the DN that has not been accessed, the SMF may not send the indication information indicating "access has not been performed".

In another implementation, the SMF may send, to the AF, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device. Specifically, the SMF may send, to the AF, the DN identification information and indication information indicating that a DN corresponding to an identifier in the corresponding DN identification information indicating "access has been performed and/or has not been performed". A form of the information sent by the SMF to the AF may not be limited. For example, the information may be in a form of a key-value pair, or may be in another form. For example, assuming that the DN identification information includes identifiers of K DNs, the information may be shown in Table <NUM>, or may be shown in Table <NUM>.

<NUM>: When the first terminal device has not accessed a first DN, the AF sends a first message to the SMF.

Correspondingly, the SMF receives the first message from the AF.

After the AF receives the DN identification information from the SMF, when the first terminal device has not accessed the first DN, it indicates that if the first terminal device needs to access the first DN, the first terminal device needs to create a user plane path from the first terminal device to the first DN, namely, a data path, to perform communication. When the first terminal device has accessed the first DN, it indicates that the user plane path from the first terminal device to the first DN has been created, and the AF may not send the first message to the SMF. The first message may include an identifier of the first DN, the identifier of the at least one DN that supports serving the first terminal device at the current location includes the identifier of the first DN, and the AF may select an identifier from the DN identification information as the identifier of the first DN.

When the AF receives, from the SMF, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, the AF determines based on the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, whether the first terminal device has accessed the first DN, to determine whether to send the first message to the SMF. The identifier of the DN that has been accessed and/or has not been accessed by the first terminal device is actively sent by the SMF to the AF.

After receiving the DN identification information from the SMF, and receiving, from the AF, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, the AF may determine the first DN based on the DN identification information and the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device. In an implementation, the AF may first determine whether there is an intersection set between the DN identification information and the identifier of the DN that has been accessed by the first terminal device. When there is an intersection set, the AF may select the identifier of the first DN from the intersection set. When there is no intersection set, the AF may select the identifier of the first DN from the DN identification information. When a quantity of identifiers, of DNs, included in the intersection set is greater than <NUM>, the AF may select the identifier of the first DN from the intersection set based on one or more of a priority, a delay, and a load status of the application server or the DN. When there is no intersection set, the AF may alternatively select the identifier of the first DN from the DN identification information based on one or more of a priority, a delay, and a load status of the application server or the DN. In another implementation, if the SMF sends, to the AF, the DN identification information and indication information indicating that a DN corresponding to an identifier in the corresponding DN identification information indicating "access has been performed and/or has not been performed", the AF may preferentially select the identifier of the DN that has been accessed as the identifier of the first DN. If a quantity of selected identifiers of DNs that have been accessed is greater than <NUM>, a selection manner is the same as that described above. Details are not described again.

<NUM>: The SMF establishes a data path between a UPF corresponding to the first DN and a classifier node.

After receiving the first message from the AF, the SMF may establish the data path between the UPF corresponding to the first DN and the classifier node, that is, may establish, based on the first message, the data path between the UPF corresponding to the first DN and the classifier node, for example, a data path between the ULCL/BP and the L-PSA <NUM> shown in <FIG>. In other words, after receiving the first message from the AF, the SMF reconfigures the data path of the session of the first terminal, including: adding or inserting the UPF corresponding to the first DN and the classifier node. The classifier node may be a ULCL, or may be a BP, or may be another network element or device having an equivalent function. The data path may also be referred to as a user plane path. When no offloading node is inserted into the data path of the session of the first terminal, that is, no offloading node exists, the classifier node may be first inserted, and then the data path between the UPF corresponding to the first DN and the classifier node is established. When the classifier node already exists, that is, the classifier node has been inserted, the path between the UPF corresponding to the first DN and the classifier node may be established. The UPF corresponding to the first DN and the classifier node may be co-deployed, or may be independent.

After receiving the first message from the AF, the SMF establishes in response to the first message, the data path between the UPF corresponding to the first DN and the classifier node. Then, the SMF may send, to the AF, indication information used to indicate whether the data path between the UPF corresponding to the first DN and the classifier node is successfully established. When the establishment succeeds, the indication information used to indicate that the data path between the UPF corresponding to the first DN and the classifier node is successfully established may be sent to the AF, to indicate that the establishment succeeds. When the establishment fails, the indication information used to indicate that the data path between the UPF corresponding to the first DN and the classifier node is unsuccessfully established may be sent to the AF, to indicate that the establishment fails.

The SMF may send an identifier of an application to the AF. The AF may determine the first DN based on the DN identification information, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, and the identifier of the application, that is, determine the identifier of the first DN.

In an implementation, the AF may not need to consider which DN does not include or deploy an application server that the first terminal device wants to access. For example, when different DNs include or deploy a same application server, the AF may determine the first DN based on the DN identification information and the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device. In another implementation, when application servers included or deployed in different DNs are different, the AF needs to determine an application server that the first terminal device is accessing/wants to access. In other words, the AF needs to determine an identifier of an application that the first terminal device is accessing/wants to access. In an implementation, the SMF may send, to the AF, an identifier of an application that the first terminal device is accessing/wants to access, or the AF may detect, by itself, an identifier of an application that the first terminal device is currently accessing. After the AF receives the identifier of the application from the SMF, or after detects the identifier of the application that the first terminal device is currently accessing, the AF may determine the first DN based on the DN identification information, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, and the identifier of the application.

Specifically, the AF may determine the first DN based on the DN identification information, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, the identifier of the application, and an identifier of an application server corresponding to the identifier in the DN identification information. For example, if the SMF sends identifiers of the K DNs to the AF, the AF may determine, based on identifiers of application servers corresponding to the DNs, application servers corresponding to identifiers of applications deployed in the M DNs in the K DNs, and the AF may select the first DN from the M DNs. In addition, the AF may determine the M DNs in the K DNs based on the received identifiers of the DNs that have been accessed and/or have not been accessed by the first terminal device, application servers corresponding to identifiers of applications are deployed in N DNs in the M DNs, and the AF may select the first DN from the N DNs. It can be learned that selection may be first performed based on the identifier of the application and the identifier of the application server, and then selection is performed based on the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device; or selection may be first performed based on the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, and then selection is performed based on the identifier of the application and the identifier of the application server. Alternatively, there may be another selection manner. A sequence of determining the first DN based on the foregoing pieces of information may not be limited. The identifier of the application server corresponding to the identifier in the DN identification information may be configured in the SMF. In this case, the SMF further needs to send the identifier of the application server corresponding to the identifier in the DN identification information to the AF. The SMF may actively send the identifier of the application server corresponding to the identifier in the DN identification information to the AF; or the AF may first send a request to the SMF, and the SMF first sends, based on the request, the identifier of the application server corresponding to the identifier in the DN identification information to the AF. The identifier of the application server corresponding to the identifier in the DN identification information may alternatively be configured in the AF.

Based on the foregoing network architecture, <FIG> is a schematic flowchart of another communication method according to an embodiment of the present invention. A function performed by a device or a network element in the present invention may alternatively be performed by a module (for example, a chip) in the device or the network element. As shown in <FIG>, the communication method may include the following steps.

<NUM>: A first terminal device establishes a session.

A process in which the first terminal device establishes the session may specifically include: The first terminal device may send a session establishment request to an AMF, the AMF may select, based on the session establishment request, an SMF to serve the session, and the SMF may select one or more UPFs to serve the session, and establish a user plane path of the session. The user plane path may include a path between an access network device serving the first terminal device and a UPF.

<NUM>: The SMF sends DN identification information to an AF.

Optionally, the SMF may send an identifier of an application to the AF. The application may be an application that the first terminal device is accessing/wants to access. The DN identification information and the identifier of the application may be included in one message and sent to the AF, or may be separately sent.

<NUM>: The SMF sends, to the AF, an identifier of a DN that has been accessed and/or has not been accessed by the first terminal device.

In another implementation, the SMF may send a message to the AF. The message may include the identifier sent by the SMF to the AF in step <NUM> and the identifier sent by the SMF to the AF in step <NUM>.

<NUM>: The AF determines a first DN based on the DN identification information and the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device.

Optionally, the AF may determine the application that the first terminal device is accessing/wants to access. A determining manner includes but is not limited to the following manners: The SMF may send, to the AF, the application that the first terminal device is accessing/wants to access, or the AF may detect, by itself, the application that the first terminal device is accessing/wants to access.

Optionally, the AF may first determine, based on the identifier of the application server corresponding to the DN, which DNs corresponding to identifiers in the DN identification information include the application that the first terminal device is accessing/wants to access. The identifier of the application server corresponding to the DN may be stored in a data table, a key-value pair, a context, or another form. A storage form is not limited. For example, the identifier of the application server corresponding to the DN may be shown in Table <NUM> or Table <NUM>.

The identifier of the application server corresponding to the DN may be configured on the AF, or may be sent by the SMF to the AF. The SMF may send identifiers of application servers corresponding to all configured DNs to the AF, or may send only identifiers of application servers corresponding to identifiers in the DN identification information to the AF. For example, M DNs and identifiers of corresponding application servers are configured on the SMF, the DN identification information includes identifiers of N DNs, and the SMF may send identifiers of application servers corresponding to the M DNs or the N DNs to the AF. N herein is an integer less than or equal to M.

Further, the AF may determine, with reference to the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, the first DN in the foregoing determined DNs that include the application that the first terminal device is accessing/wants to access.

Optionally, the AF may first select, from the DN identification information, an identifier of a DN that has been accessed by the first terminal device. If the DN includes the application that the first terminal device is accessing/wants to access, the AF determines that the DN is the first DN.

Optionally, the AF may determine the first DN based on one or more of factors such as the DN identification information, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, the identifier of the application server corresponding to the DN, and the application that the first terminal device is accessing/wants to access, and the first terminal device has not accessed the first DN.

<NUM>: When the first terminal device has not accessed the first DN, the AF sends a first message to the SMF.

Optionally, the AF may send an identifier of the first DN to the SMF. The identifier of the first DN may be included in the first message, or may be sent separately from the first message.

In an implementation, the identifier of the first DN may be a DNAI.

In another implementation, the AF may determine one application server included in the first DN, and the identifier of the first DN may be an address of the application server.

<NUM>: The SMF sends, to the AF, indication information used to indicate whether the data path between the UPF corresponding to the first DN and the classifier node is successfully established.

For detailed descriptions of step <NUM> to step <NUM>, refer to the foregoing related descriptions.

For better understanding embodiments of the present invention, the following first describes an application scenario of embodiments of the present invention. <FIG> is a schematic diagram of establishing communication between UE and a local DN according to an embodiment of the present invention. As shown in <FIG>, the UE may send DNS request information to an AF network element, where the DNS request information may carry or include an identifier of an application. After receiving the DNS request information from the UE, the AF may obtain a current location of the UE from an SMF. Then, the AF may determine address information of the UE. The address information of the UE may be subnet information corresponding to a data network that supports serving the UE at the current location. Then, the AF may send the DNS request information and the address information of the UE to a DNS server. After receiving the address information of the UE and the DNS request information that are from the AF, the DNS server may determine address information of an application server corresponding to the identifier of the application, and send the address information of the application server corresponding to the identifier of the application to the AF. The address information of the application server corresponding to the identifier of the application includes first address information. Optionally, the DNS server may determine the first address information in the address information of the application server corresponding to the identifier of the application, and send the first address information to the AF. In this way, the AF does not need to determine the first address information. After receiving, from the DNS server, the address information of the application server corresponding to the identifier of the application, the AF may determine the first address information in the address information of the application server corresponding to the identifier of the application, and may send, to the SMF, a message including the first address information. After receiving the message, the SMF may establish a user plane path between a UPF (namely, a local UPF) corresponding to the local DN corresponding to the first address information and a classifier node. In addition, the AF may further send the first address information to the UE. After receiving the first address information from the AF, the UE may communicate with the local DN corresponding to the first address information.

In the foregoing process, after receiving a DNS response from the DNS server, the AF needs to send a message to the SMF regardless of whether the user plane path needs to be re-established. However, when the user plane path has been established, the AF does not need to send the message to the SMF. This causes a waste of resources. In addition, because a correspondence between location information of the UE and a DN and a correspondence between the DN and an application server deployed in the DN are configured on both the SMF and the AF, redundant deployment is caused.

Based on the foregoing network architecture, <FIG> is a schematic flowchart of still another communication method according to an embodiment of the present invention. A function performed by a terminal device in the present invention may alternatively be performed by a module (for example, a chip) in the terminal device, a function performed by an AF in the present invention may alternatively be performed by a module (for example, a chip) in the AF, a function performed by an SMF in the present invention may alternatively be performed by a module (for example, a chip) in the SMF, and a function performed by a DNS server in the present invention may alternatively be performed by a module (for example, a chip) in the DNS server. As shown in <FIG>, the communication method may include the following steps.

<NUM>: A first terminal device sends, to the AF, first DNS request information including an identifier of an application.

Correspondingly, the AF may receive, from the first terminal device, the first DNS request information including the identifier of the application.

When the first terminal device has a service requirement, the first terminal device may send, to the AF, the first DNS request information including the identifier of the application. The identifier of the application may be a fully qualified domain name (fully qualified domain name, FQDN), or may be an ID of the application, or may be other information that can uniquely identify the application.

Before, after, or when the AF receives, from the first terminal device, the first DNS request information including the identifier of the application, the AF may further receive an identifier of a DN in a DN set from the SMF. The DN set is a set of DNs that support serving the first terminal device at a current location. For detailed descriptions, refer to the descriptions in step <NUM>.

Before, after, or when the AF receives, from the first terminal device, the first DNS request information including the identifier of the application, the AF may further receive, from the SMF, an identifier of a DN that has been accessed and/or has not been accessed by the first terminal device. For detailed descriptions, refer to the descriptions in step <NUM>.

Before, after, or when the AF receives, from the first terminal device, the first DNS request information including the identifier of the application, the AF may further receive, from the SMF, an identifier of an application server corresponding to the DN. For detailed descriptions, refer to the descriptions in step <NUM>.

The AF may send request information to the SMF. Correspondingly, the SMF receives the request information from the AF, and then the SMF may send one or more of the foregoing information to the AF, including but not limited to the identifier of the DN in the DN set, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, and the identifier of the application server corresponding to the DN.

The AF may send second request information to the SMF, where the second request information includes the identifier of the application and an identifier of the first terminal device. Correspondingly, the SMF receives the second request information from the AF, and then the SMF may select a first DN from the DN set based on the identifier of the first terminal device, the identifier of the application, and the identifier of the DN in the DN set, and send an identifier of the first DN to the AF. In an implementation, the SMF may first determine the current location of the first terminal device based on the identifier of the first terminal device, then determine the DN set based on the current location of the first terminal device, and then select the first DN from the DN set based on the identifier of the application, the identifier of the DN in the DN set, and the identifier of the application server corresponding to the DN. For a selection manner, refer to the foregoing descriptions.

<NUM>: The AF determines the first DN based on the identifier of the application.

After receiving, from the first terminal device, the first DNS request information including the identifier of the application, the AF may determine the first DN based on the identifier of the application. The first DN includes an application server corresponding to the identifier of the application. That is, the application server corresponding to the identifier of the application is deployed in the first DN.

Before the AF determines the first DN based on the identifier of the application, the AF may send the request information to the SMF, to request the information described in step <NUM>, including the identifier of the DN in the DN set, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, and the identifier of the application server corresponding to the DN. The AF may determine the first DN based on these pieces of information received from the SMF and the identifier of the application. For a specific determining manner, refer to descriptions in step <NUM>, step <NUM>, and step <NUM>.

The AF may receive the identifier of the first DN from the SMF. The first DN may be determined by the SMF based on a request of the AF.

The AF may obtain, from a DNS server, address information of the application server corresponding to the identifier of the application; and determine the first DN for the first terminal device based on the obtained address information, where the obtained address information includes address information of the application server corresponding to the identifier of the application included in the first DN.

The AF may send the first DNS request information and address information of the first terminal device to the DNS server. After receiving the first DNS request information and the address information of the first terminal device that are from the AF, the DNS server may determine, based on the first DNS request information and the address information of the first terminal device, the address information of the application server corresponding to the identifier of the application, and then may send the address information of the application server corresponding to the identifier of the application to the AF. The AF may receive, from the DNS server, the address information of the application server corresponding to the identifier of the application. The address information of the first terminal device may be address information corresponding to a data network in a data network set. For example, one DNAI corresponds to one piece of subnet information. The DNS server herein is a centralized DNS server, also referred to as a central DSN server, and is a DNS server to which the first terminal device establishes a connection in a session establishment process. When a quantity of pieces of address information of the first terminal device is greater than <NUM>, the AF may include the address information of the first terminal device in the first DNS request information at a time and send the first DNS request information to the DNS server, or the AF may send a plurality of pieces of first DNS request information to the DSN server. Each piece of first DNS request information may carry one piece of address information in the address information of the first terminal device. The address information of the first terminal device may be an identifier of a DN that supports serving the first terminal device at the current location within a service scope, or may be an IP address of a DN that supports serving the first terminal device at the current location within a service scope, or may be subnet information of a DN that supports serving the first terminal device at the current location within a service scope. The IP address of the DN or the subnet information of the DN may be obtained by converting the identifier of the DN. The DNS server may return, for one piece of address information in the address information of the first terminal device, the address information of the application server corresponding to the identifier of the application, or may not return the address information of the application server corresponding to the identifier of the application.

The SMF may send the address information of the first terminal device to the AF. The address information of the first terminal device may be actively sent by the SMF, or may be sent by the SMF after the SMF receives third request information from the AF. The third request information may include the identifier of the first terminal device. Before sending the address information of the first terminal device to the AF, the SMF may further determine the address information of the first terminal device based on an identifier of a DN corresponding to a location of the terminal device. It can be learned that the address information of the first terminal device may be actively sent by the SMF to the AF, or may be sent by the SMF to the AF when the AF sends a request to the SMF.

The SMF may alternatively send the identifier of the DN in the DN set to the AF. The AF may determine the address information of the first terminal device based on the identifier of the DN in the DN set. It can be learned that the address information of the first terminal device may alternatively be determined by the AF based on the information sent by the SMF.

Alternatively, the AF may send the first DNS request information to the DNS server corresponding to the address information of the first terminal device, that is, separately send the first DNS request information to a local DSN server corresponding to each piece of address information in the address information of the first terminal device. The address information of the first terminal device may be subnet information corresponding to the DN. The DNS server corresponding to the address information of the first terminal device may be understood as a DNS server corresponding to the DN, for example, a local DNS server that performs DNS resolution for a local DN. After receiving the first DNS request inform from the AF, the DNS server corresponding to the address information of the first terminal device may determine the address information of the application server corresponding to the identifier of the application, and then send the address information of the application server corresponding to the identifier of the application to the AF. The AF receives the address information of the application server corresponding to the identifier of the application of the DNS server corresponding to the address information of the first terminal device. For a DSN server corresponding to one piece of address information in the address information of the first terminal device, the address information of the application server corresponding to the identifier of the application may be returned, or the address information of the application server corresponding to the identifier of the application may not be returned. A reason that the address information may not be returned may be that the application server corresponding to the identifier of the application may be deployed, or load of the application server corresponding to the identifier of the application may be heavy, or there may be another reason. This is not limited herein.

After obtaining, from the DNS server, the address information of the application server corresponding to the identifier of the application, when a quantity of pieces of the obtained address information is <NUM>, the AF may determine the address information as the address information of the application server corresponding to the identifier of the application included in the first DN. When a quantity of pieces of the obtained address information is greater than <NUM>, the first DN may be determined for the first terminal device based on the obtained address information and one or more of the DN that the first terminal device currently accesses, a priority of the application server or the DN, a delay of the application server or the DN, and a load status of the application server or the DN. To reduce a quantity of established data paths, the first DN may be preferentially selected from DNs that the first terminal device currently accesses.

When there are a plurality of DNs that can be used by the first terminal device for access, the first DN may be preferentially selected from DNs that have been accessed by the first terminal device. In this way, step <NUM> and step <NUM> may not need to be performed, thereby reducing a quantity of processing steps.

After the AF determines the first DN based on the identifier of the application, if the first terminal device has not accessed the first DN, the AF may send the first message to the SMF. When the first terminal device has accessed the first DN, the AF may not send the first message to the SMF.

After receiving the first message from the AF, the SMF may reconfigure a user plane path or a data path for a session of the first terminal device, and may establish the data path between the UPF corresponding to the first DN and the classifier node. The first message may carry or include the identifier of the first DN. For details, refer to step <NUM> or step <NUM>. The user plane path in this embodiment of the present invention is the data path.

After establishing the data path between the UPF corresponding to the first DN and the classifier node, if the data path between the UPF corresponding to the first DN and the classifier node is successfully established, the SMF may send, to the AF, a message indicating that the data path between the UPF corresponding to the first DN and the classifier node is successfully established. After receiving the message, the AF may send, to the first terminal device, the address information of the application server corresponding to the identifier of the application included in the first DN. After receiving the address information, the first terminal device may communicate with the application server corresponding to the address information. In one case, the AF may first send, to the SMF or a PCF, the address information of the application server corresponding to the identifier of the application included in the first DN, and then the SMF or the PCF may send, to the first terminal device by using a NAS message, the address information of the application server corresponding to the identifier of the application included in the first DN; or the user plane path may be the SMF-the UPF-the first terminal device, or the like. In another case, the AF may send, to the first terminal device through the user plane path, the address information of the application server corresponding to the identifier of the application included in the first DN. The user plane path may be the AF-the inserted UPF-the first terminal device.

Optionally, if establishment of the data path between the UPF corresponding to the first DN and the classifier node fails, the SMF may send, to the AF, a message indicating that establishment of the data path between the UPF corresponding to the first DN and the classifier node fails.

Based on the foregoing network architecture, <FIG> and <FIG> are a schematic flowchart of still another communication method according to an embodiment of the present invention. As shown in <FIG> and <FIG>, the communication method may include the following steps.

<NUM>: An SMF configures an identifier of a DN corresponding to a terminal device location.

In one case, the SMF may further configure an identifier of an application server corresponding to the DN. In another case, an identifier of an application server corresponding to the DN may be configured in an AF. In addition, the SMF may further configure subnet information corresponding to the identifier of the DN.

In addition, the SMF may determine network segment information of multi-access edge computing (multi-access edge computing, MEC) or network segment information of the DN based on an identifier of a network segment corresponding to the DN. The SMF may be configured with the identifier of the network segment corresponding to the DN. The identifier of the network segment corresponding to the DN may alternatively be configured on the AF, and is sent by the AF to the SMF.

The AF may be an MEC platform, or may be an edge application server (edge application server, EAS), or may be an edge enabler server (edge enabler server, EES), or may be an edge configuration server (edge configuration server, ECS), or may be another device, platform, or server having an equivalent function, for example, a DNS AF.

<NUM>: The first terminal device sends, to the AF, first DNS request information including an identifier of an application.

Correspondingly, the AF receives, from the first terminal device, the first DNS request information including the identifier of the application.

<NUM>: The AF determines a first DN based on the identifier of the application.

Step <NUM> may include: a: The AF determines the first DN based on the identifier of the application, an identifier of a DN in a DN set, and an identifier of an application server corresponding to the DN. This step may further include: The AF sends first request information to the SMF, as described in step <NUM>.

Step <NUM> may also include: b: The AF sends, to the SMF, second request information including the identifier of the application and an identifier of the first terminal device, the SMF determines the first DN based on the identifier of the first terminal device, the identifier of the application, the identifier of the DN corresponding to the terminal device location, and the identifier of the application server corresponding to the DN, and the SMF sends an identifier of the first DN to the AF.

Step <NUM> may also include: c: The AF obtains, from a DNS server, address information of an application server corresponding to the identifier of the application, and determines the first DN for the first terminal device based on the obtained address information.

a, b, and c are three parallel technical solutions.

<NUM>: When the first terminal device has not accessed the first DN, the AF sends, to the SMF, a first message including the identifier of the first DN.

<NUM>: The SMF sends, to the AF, a message indicating whether the data path between the UPF corresponding to the first DN and the classifier node is successfully established.

<NUM>: The AF sends, to the first terminal device, the address information of the application server corresponding to the identifier of the application included in the first DN.

<NUM>: The first terminal device accesses, through the UPF corresponding to the first DN, the application server corresponding to the identifier of the application included in the first DN.

Mutual reference may be made between the foregoing several embodiments, mutual reference may be made between descriptions of related information in different embodiments, and descriptions of related information in different locations are not limited thereto, and are also applicable to corresponding content in other locations.

Based on the foregoing network architecture, <FIG> is a schematic diagram of a structure of a communication apparatus according to an embodiment of the present invention. As shown in <FIG>, the communication apparatus may include:.

In an embodiment, the receiving unit <NUM> is further configured to receive indication information from the SMF, where the indication information is used to indicate whether the data path is successfully established.

In an embodiment, the receiving unit <NUM> is further configured to receive, from the SMF, an identifier of a DN that has been accessed and/or has not been accessed by the first terminal device.

In an embodiment, the communication apparatus may further include:
a determining unit <NUM>, configured to determine the first DN based on the DN identification information and the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device.

In an embodiment, the receiving unit <NUM> is further configured to receive an identifier of an application from the SMF; and
the determining unit <NUM> is specifically configured to determine the first DN based on the DN identification information, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, and the identifier of the application.

For more detailed descriptions of the receiving unit <NUM>, the sending unit <NUM>, and the determining unit <NUM>, directly refer to related descriptions of the AF in the method embodiments shown in <FIG> and <FIG>.

Based on the foregoing network architecture, <FIG> is a schematic diagram of a structure of another communication apparatus according to an embodiment of the present invention. As shown in <FIG>, the communication apparatus may include:.

In an embodiment, the sending unit <NUM> is further configured to send indication information to the AF, where the indication information is used to indicate whether the data path is successfully established.

In an embodiment, the sending unit <NUM> is further configured to send, to the AF, an identifier of a DN that has been accessed and/or has not been accessed by the first terminal device.

In an embodiment, the DN identification information and the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device are used by the AF to determine the first DN.

In an embodiment, the sending unit <NUM> is further configured to send an identifier of an application to the AF; and
that the DN identification information and the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device are used by the AF to determine the first DN includes:
the DN identification information, the identifier of the DN that has been accessed and/or has not been accessed by the first terminal device, and the identifier of the application are used by the AF to determine the first DN.

For more detailed descriptions of the sending unit <NUM>, the receiving unit <NUM>, and the establishment unit <NUM>, directly refer to related descriptions of the SMF in the method embodiments shown in <FIG> and <FIG>.

Based on the foregoing network architecture, <FIG> is a schematic diagram of a structure of still another communication apparatus according to an embodiment of the present invention. As shown in <FIG>, the communication apparatus may include:.

In an embodiment, the receiving unit <NUM> is further configured to receive an identifier of a DN in a DN set from the SMF, where the DN set is a set of DNs that support serving the first terminal device at a current location; and
the determining unit <NUM> is specifically configured to determine the first DN based on the identifier of the application and the identifier of the DN in the DN set.

In an embodiment, the sending unit <NUM> is further configured to: before the receiving unit <NUM> receives the identifier of the DN in the DN set from the SMF, send first request information to the SMF, where the first request information includes an identifier of the first terminal device, and the first request information is used by the SMF to determine the DN set based on the identifier of the DN corresponding to the location of the terminal device.

In an embodiment, that the determining unit <NUM> determines the first DN based on the identifier of the application and the identifier of the DN in the DN set includes:
selecting the first DN from the DN set based on the identifier of the application, the identifier of the DN in the DN set, and an identifier of the application server corresponding to the DN in the DN set.

In an embodiment, the receiving unit <NUM> is further configured to receive, from the SMF, the identifier of the application server corresponding to the DN in the DN set.

In an embodiment, the determining unit <NUM> is specifically configured to:.

In an embodiment, that the determining unit <NUM> obtains, from a DNS server, address information of the application server corresponding to the identifier of the application includes:.

In an embodiment, that the determining unit <NUM> determines the first DN for the first terminal device based on the obtained address information includes:
when a quantity of pieces of the obtained address information is greater than <NUM>, determining the first DN for the first terminal device based on the obtained address information and one or more of the DN that the first terminal device currently accesses, a priority of the application server or the DN, a delay of the application server or the DN, and a load status of the application server or the DN.

In an embodiment, the receiving unit <NUM> is further configured to receive the address information of the first terminal device from the SMF.

In an embodiment, the sending unit <NUM> is further configured to: before the receiving unit <NUM> receives the address information of the first terminal device from the SMF, send third request information to the SMF, where the third request information includes an identifier of the first terminal device, and the third request information is used by the SMF to determine the address information of the first terminal device based on an identifier of a DN corresponding to a location of the terminal device.

In an embodiment, the receiving unit <NUM> is further configured to receive an identifier of a DN in a DN set from the SMF; and
the determining unit <NUM> is further configured to determine the address information of the first terminal device based on the identifier of the DN in the DN set, where the DN set is a set of DNs that support serving the first terminal device at a current location.

In an embodiment, the sending unit <NUM> is further configured to send, to the first terminal device, the address information of the application server corresponding to the identifier of the application included in the first DN.

For more detailed descriptions of the receiving unit <NUM>, the determining unit <NUM>, and the sending unit <NUM>, directly refer to related descriptions of the AF in the method embodiments shown in <FIG> and <FIG> and <FIG>.

In an embodiment, the communication apparatus may further include:.

In an embodiment, the receiving unit <NUM> is further configured to: before the sending unit <NUM> sends the identifier of the DN in the DN set to the AF, receive first request information from the AF, where the first request information includes an identifier of the first terminal device; and
the communication apparatus may further include:
a determining unit <NUM>, configured to determine the DN set based on the identifier of the first terminal device and the identifier of the DN corresponding to the location of the terminal device.

In an embodiment, the sending unit <NUM> is further configured to send, to the AF, an identifier of the application server corresponding to the DN in the DN set; and
that the identifier of the DN in the DN set is used by the AF to determine the first DN includes:
the identifier of the DN in the DN set and the identifier of the application server corresponding to the DN in the DN set are used by the AF to determine the first DN.

In an embodiment, the receiving unit <NUM> is further configured to receive second request information from the AF, where the second request information includes the identifier of the application and an identifier of the first terminal device;.

In an embodiment, the determining unit <NUM> is further configured to determine address information of the first terminal device based on an identifier of a DN corresponding to a location of the terminal device; and
the sending unit <NUM> is further configured to: send the address information of the first terminal device to the AF, where the address information of the first terminal device is used by the AF to obtain, from a DNS server, address information of the application server corresponding to the identifier of the application; and determine the first DN for the first terminal device based on the obtained address information.

In an embodiment, the receiving unit <NUM> is further configured to receive third request information from the AF, where the third request information carries an identifier of the first terminal device; and
that the determining unit <NUM> determines address information of the first terminal device based on an identifier of a DN corresponding to a location of the terminal device includes:
determining the address information of the first terminal device based on the identifier of the first terminal device and the identifier of the DN corresponding to the location of the terminal device.

In an embodiment, that the AF obtains, from a DNS server, address information of the application server corresponding to the identifier of the application includes:
The AF sends the first DNS request information and address information of the first terminal device to the DNS server; and receives, from the DNS server, the address information of the application server corresponding to the identifier of the application.

In an embodiment, that the AF obtains, from a DNS server, address information of the application server corresponding to the identifier of the application includes:
The AF sends the first DNS request information to the DNS server corresponding to address information of the first terminal device; and receives, from the DNS server corresponding to the address information of the first terminal device, the address information of the application server corresponding to the identifier of the application.

In an embodiment, that the AF determines the first DN for the first terminal device based on the obtained address information includes:
When a quantity of pieces of the obtained address information is greater than <NUM>, the AF determines the first DN for the first terminal device based on the obtained address information and one or more of the DN that the first terminal device currently accesses, a priority of the application server or the DN, a delay of the application server or the DN, and a load status of the application server or the DN.

In an embodiment, the sending unit <NUM> is further configured to send a DN in a DN set to the AF, where the DN in the DN set is used by the AF to determine the address information of the first terminal device, and the DN set is a set of DNs that support serving the first terminal device within a service scope.

For more detailed descriptions of the receiving unit <NUM>, the establishment unit <NUM>, the sending unit <NUM>, and the determining unit <NUM>, directly refer to related descriptions of the SMF in the method embodiments shown in <FIG> and <FIG> and <FIG>.

Based on the foregoing network architecture, <FIG> is a schematic diagram of a structure of still another communication apparatus according to an embodiment of the present invention. As shown in <FIG>, the communication apparatus may include a processor <NUM>, a memory <NUM>, an input interface <NUM>, an output interface <NUM>, and a bus <NUM>. The memory <NUM> may exist independently, and may be connected with the processor <NUM> through the bus <NUM>. Alternatively, the memory <NUM> may be integrated with the processor <NUM>. The bus <NUM> is configured to implement connections between these components.

In an embodiment, the communication apparatus may be an SMF or a module (for example, a chip) in the SMF. When computer program instructions stored in the memory <NUM> are executed, the processor <NUM> is configured to control the sending unit <NUM> and the receiving unit <NUM> to perform the operations performed in the foregoing embodiment. The processor <NUM> is further configured to perform the operations performed by the establishment unit <NUM> in the foregoing embodiment. The input interface <NUM> is configured to perform the operations performed by the receiving unit <NUM> in the foregoing embodiment. The output interface <NUM> is configured to perform the operations performed by the sending unit <NUM> in the foregoing embodiment. The SMF or the module in the SMF may be further configured to perform various methods performed by the SMF in the method embodiments in <FIG> and <FIG>. Details are not described again.

In an embodiment, the communication apparatus may be an AF or a module (for example, a chip) in the AF. When computer program instructions stored in the memory <NUM> are executed, the processor <NUM> is configured to control the receiving unit <NUM> and the sending unit <NUM> to perform the operations performed in the foregoing embodiment. The processor <NUM> is further configured to perform the operations performed by the determining unit <NUM> in the foregoing embodiment. The input interface <NUM> is configured to perform the operations performed by the receiving unit <NUM> in the foregoing embodiment. The output interface <NUM> is configured to perform the operations performed by the sending unit <NUM> in the foregoing embodiment. The AF or the module in the AF may be further configured to perform various methods performed by the AF in the method embodiments in <FIG> and <FIG> and <FIG>. Details are not described again.

In an embodiment, the communication apparatus may be an SMF or a module (for example, a chip) in the SMF. When computer program instructions stored in the memory <NUM> are executed, the processor <NUM> is configured to control the receiving unit <NUM> and the sending unit <NUM> to perform the operations performed in the foregoing embodiment. The processor <NUM> is further configured to perform the operations performed by the establishment unit <NUM> and the determining unit <NUM> in the foregoing embodiment. The input interface <NUM> is configured to perform the operations performed by the receiving unit <NUM> in the foregoing embodiment. The output interface <NUM> is configured to perform the operations performed by the sending unit <NUM> in the foregoing embodiment. The SMF or the module in the SMF may be further configured to perform various methods performed by the SMF in the method embodiments in <FIG> and <FIG> and <FIG>. Details are not described again.

Claim 1:
A communication method applied to an application function network element, comprising:
receiving (<NUM>) data network identification information from a session management function network element, wherein the data network identification information comprises an identifier of at least one data network that supports serving a first terminal device at a current location, and the at least one data network comprises a first data network; and
in response to determining, based on the data network identification information, that the first terminal device has not accessed the first data network, sending (<NUM>) a first message to the session management function network element, wherein the first message comprises an identifier of the first data network, and the first message is used to establish a data path between a user plane function network element corresponding to the first data network and a classifier node, wherein the classifier node distributes an uplink data packet from the first terminal to a user plane function network element corresponding to one of the at least one data network according to a distribution rule or sends a data packet from a user plane function network element corresponding to one of the at least one data network to the first terminal.