Communication method, device, and system

Through the cooperation between the first network element and the second network element, the server address is directly obtained from the domain name server, which solves the problem that the terminal device cannot query the server address in time, and improves transmission efficiency and network performance.

WO2025148809A1PCT designated stage expired Publication Date: 2025-07-17HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/070612
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-11
Filing Date
2025-01-03
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

After accessing the network, the terminal device cannot query the server's address in time, resulting in the inability to use the services provided by the server.

Method used

The first network element receives the query message of the terminal device, sends a query request to the second network element, and the second network element obtains the server address according to the processing rules and returns it to the terminal device, realizing the method of directly obtaining the server address from the domain name server.

Benefits of technology

It reduces transmission delay, reduces network load, and ensures that terminal equipment can obtain server addresses in a timely manner to use corresponding services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025070612_17072025_PF_FP_ABST
    Figure CN2025070612_17072025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application are a communication method, device, and system. The method comprises: a first network element receives a first query message comprising a first domain name from a terminal device, the first query message being used for querying an address of a server which provides, to the terminal device, a service corresponding to the first domain name; and the first network element sends, to a second network element, a second query message used for querying the address of the server corresponding to the first domain name. The second query message comprises the first domain name and the address of the terminal device; or the second query message comprises the first domain name, and the second query message is sent by the first network element to the second network element by means of a tunnel; the first network element receives a second response comprising the address of the server; and the first network element sends a first response comprising the address of the server to the terminal device. On the basis of the method, the first network element can support queries of the terminal device with respect to the server address, enabling the terminal device to use the service provided by the server.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method, device and system

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on January 11, 2024, with application number 202410052197.7 and application name “A Communication Method, Device and System”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of communications, and more particularly, to a communication method, device, and system. Background Art

[0004] After connecting to a network, a terminal device can transmit data for a service through the network to the server providing that service, thereby using the service provided by that server. To achieve this transmission, the terminal device needs to query the server's address and include the server's address in the data packet carrying the data, so that the data packet is correctly routed to the server. If the server address query fails, the terminal device cannot use the service provided by that server. Summary of the Invention

[0005] The embodiments of the present application provide a communication method, apparatus, and system that can support a terminal device in querying a server address, thereby helping the terminal device to use services provided by the server.

[0006] In a first aspect, a communication method is provided. The method may be executed by a first network element, or may be executed by a chip or circuit of the first network element, which is not limited in this application. For ease of description, the following description is based on an example of execution by the first network element.

[0007] The method includes: a first network element receiving a first query message from a terminal device, the first query message including a first domain name and an address of the terminal device, the first query message being used to query the address of a server providing a service corresponding to the first domain name for the terminal device; the first network element sending a second query message to a second network element, the second query message being used to query the address of the server corresponding to the first domain name; the first network element receiving a second response to the second query message, the second response including the address of the server; and the first network element sending a first response to the first query message to the terminal device, the first response including the address of the server. The source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name and the address of the terminal device; or the source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name, and the second query message is sent by the first network element to the second network element via a tunnel.

[0008] Based on this method, the first network element can respond to the query of the terminal device and provide the address of the server to the terminal device so that the terminal device can use the service provided by the server according to the address.

[0009] The second response may be received by the first network element from the second network element through the tunnel.

[0010] The tunnel corresponds to the address of the terminal device. For example, the tunnel is used to transmit a query message related to a session of the terminal device, and the session of the terminal device corresponds to the address of the terminal device.

[0011] The target address information of the second query message may indicate the address of the second network element.

[0012] In combination with the first aspect, in some implementations of the first aspect, the first network element receives a third query message from the terminal device, the third query message includes a second domain name and the address of the terminal device, and the third query message is used to query the address of the server that provides the service corresponding to the second domain name to the terminal device; the first network element sends a fourth query message to the first domain name server, the fourth query message includes the second domain name, and the fourth query message is used to query the address of the server corresponding to the second domain name; the first network element receives a fourth response to the fourth query message from the first domain name server, the fourth response includes the address of the second server, and the second server is used to provide the service corresponding to the second domain name; the first network element sends a third response to the third query message to the terminal device, and the third response includes the address of the second server.

[0013] Based on this method, the first network element can directly receive the address of the server queried by the third query message from the domain name server. Since the third query message passes through a shorter transmission path (for example, not passing through the second network element), the transmission delay is reduced. The first network element can provide the server address to the terminal device in a timely manner, and can also reduce the transmission load of the network.

[0014] In combination with the first aspect, in some implementations of the first aspect, the first network element receives a fifth query message from a second terminal device, the fifth query message includes the first domain name and the address of the second terminal device, and the fifth query message is used to query the address of the server that provides the service corresponding to the first domain name to the second terminal device; the first network element sends a sixth query message to the second domain name server, the sixth query message includes the first domain name, and the sixth query message is used to query the address of the server corresponding to the first domain name; the first network element receives a sixth response to the sixth query message from the second domain name server, the sixth response includes the address of a third server, and the third server is used to provide the service corresponding to the first domain name; the first network element sends a fifth response to the fifth query message to the second terminal device, and the fifth response includes the address of the third server.

[0015] Based on this method, the first network element can directly receive the address of the server queried by the fifth query message from the domain name server. Since the fifth query message passes through a shorter transmission path (for example, not passing through the second network element), the transmission delay is reduced. The first network element can provide the server address to the terminal device in a timely manner, and can also reduce the transmission load of the network.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the first network element sends a second query message to the second network element, including: when the first domain name meets a first condition, the first network element sends the second query message to the second network element, and the first condition includes: there is no second processing rule that matches the first domain name and corresponds to the terminal device.

[0017] The second processing rule may be a processing rule in which the source address information indicates the address of the terminal device and includes the first domain name.

[0018] Based on this method, when the processing rules corresponding to the terminal device in the first network element do not match the first domain name, that is, when there is no processing rule matching the first domain name in the processing rules corresponding to the terminal device in the first network element, the first network element sends a second query message to the second network element, and obtains the address of the server through the second network element. The address of the server is obtained based on the processing rules matching the first domain name, rather than from the default domain name server, which helps the terminal device to use higher quality services based on the address of the server.

[0019] In combination with the first aspect, in some implementations of the first aspect, the method also includes: the first network element receives first indication information from the first session management network element, and the first indication information is used to indicate the first condition. The first network element can, under the instruction of the first session management network element, select a second query message that meets the first condition and send it to the second network element, thereby realizing the management of the first network element by the first session management network element.

[0020] In conjunction with the first aspect, in certain implementations of the first aspect, when the source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name and the address of the terminal device, the option information in the second query message includes the address of the terminal device, and the option information is used to determine the address of the server. The first network element may provide the address of the terminal device to the second network element via an existing "option" field in the second query message, so that the second network element can determine the address of the terminal device and then obtain an appropriate server address according to a processing rule.

[0021] In conjunction with the first aspect, in certain implementations of the first aspect, the source address information in the second query message indicates the address of the first network element, the second query message is sent by the first network element to the second network element via a tunnel, and when the second query message includes the first domain name, the second query message also includes an identifier of the tunnel between the first network element and the second network element. The first network element provides the identifier of the tunnel to the second network element via the second query message, thereby facilitating the second network element to identify the tunnel.

[0022] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the first network element receiving an identifier of the tunnel from a first session management network element.

[0023] In conjunction with the first aspect, in certain implementations of the first aspect, the second query message is sent by the first network element to the second network element based on the address of the second network element, and the method further includes: the first network element receiving the address of the second network element from the first session management network element. The first network element may send the second query message to the second network element based on the address of the second network element provided by the first session management network element, thereby enabling management of the first network element by the first session management network element.

[0024] In combination with the first aspect, in certain implementations of the first aspect, the first network element is used to obtain the address of the server that provides services to the terminal device according to the instructions of the first session management network element, and the second network element is used to obtain the address of the server that provides services to the terminal device according to the instructions of the second session management network element, and the first session management network element and the second session management network element serve the session of the terminal device.

[0025] In a second aspect, a communication method is provided. The method may be executed by a second network element, or may be executed by a chip or circuit of the second network element, which is not limited in this application. For ease of description, the following description is based on an example of execution by the second network element.

[0026] The method includes: a second network element receiving a second query message from a first network element, the second query message being used to query an address of a server corresponding to a first domain name; the second network element obtaining the address of the server according to a first processing rule matching the first domain name; and the second network element sending a second response to the second query message to the first network element, the second response including the address of the server. The source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name and the address of the terminal device; or the source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name, and the second query message is received by the second network element from the first network element via a tunnel.

[0027] Based on this method, the second network element can obtain the server address according to the first processing rule that matches the first domain name, which helps the terminal device use the service provided by the server according to the server address. The second network element can send a second response to the first network element through the tunnel.

[0028] In conjunction with the second aspect, in certain implementations of the second aspect, the source address information included in the first processing rule indicates the address of the terminal device. The second network element obtains the address of the server based on the processing rule corresponding to the terminal device, which helps the terminal device use higher quality services based on the address.

[0029] In combination with the second aspect, in certain implementations of the second aspect, the method also includes: when the address of the first network element meets the second condition, the second network element determines the first processing rule based on the option information in the second query message, and the second condition includes: there is no source address information indicating the processing rule for the address of the first network element.

[0030] Based on this method, when the processing rules of the second network element do not contain source address information indicating the processing rules of the address of the first network element, that is, when the source address information included in the processing rules of the second network element is not the address of the first network element, the second network element obtains the address of the server according to the processing rules determined by the option information, rather than directly obtaining the address of the server from the default domain name server, which helps the terminal device to use higher quality services based on the address of the server.

[0031] In conjunction with the second aspect, in certain implementations of the second aspect, the method further includes: the second network element receiving second indication information from a second session management network element, the second indication information indicating the second condition. Based on the indication from the second session management network element, the second network element determines, based on the option information, a processing rule for query messages that meet the condition, thereby enabling management of the second network element by the second session management network element.

[0032] In conjunction with the second aspect, in certain implementations of the second aspect, the method further includes: the second network element determining a third processing rule based on source address information in the second query message, the source address information included in the third processing rule corresponding to the address of the first network element, and the third processing rule further including: option information for indicating the address of the terminal device corresponding to the first processing rule; and the second network element determining the first processing rule based on the option information in the second query message. Based on the clear indication of the third processing rule, the second network element can more accurately determine the first processing rule based on the option information.

[0033] In conjunction with the second aspect, in certain implementations of the second aspect, the method further includes: the second network element determining a fourth processing rule based on source address information in the second query message, the source address information included in the fourth processing rule corresponding to the address of the first network element, the fourth processing rule further including: sending a domain name to a second session management network element; the second network element sending the first domain name to the second session management network element based on the fourth processing rule, the second session management network element servicing the session of the terminal device; the second network element receiving a fifth processing rule from the second session management network element, the fifth processing rule including option information indicating the address of the terminal device corresponding to the first processing rule; and the second network element determining the first processing rule based on the option information in the second query message. Under the direction of the fifth processing rule from the second session management network element, the second network element determines the first processing rule based on the option information, thereby enabling the second session management network element to manage the second network element.

[0034] In conjunction with the second aspect, in certain implementations of the second aspect, the source address information included in the first processing rule indicates the address of the first network element, and the first processing rule further includes: optional information including the address of the terminal device. For example, the detection template portion included in the first processing rule includes: optional information including the address of the terminal device. Based on the source address information and the optional information, the second network element can determine which processing rules are consistent with the second query message, thereby facilitating targeted processing of the second query message and obtaining an appropriate server address.

[0035] In conjunction with the second aspect, in certain implementations of the second aspect, the source address information in the second query message indicates the address of the first network element, the second query message is sent by the first network element to the second network element via a tunnel, and when the second query message includes the first domain name, the tunnel is used to indicate the address of the terminal device, and the source address information included in the first processing rule indicates the address of the terminal device. Under the guidance of the tunnel, the second network element can quickly and accurately determine the first processing rule corresponding to the terminal device's address, which helps to more promptly determine the appropriate server address.

[0036] In combination with the second aspect, in certain implementations of the second aspect, the method further includes: when the address of the first network element satisfies a second condition, the second network element determines the first processing rule based on the tunnel through which the second query message is received, and the second condition includes: there is no processing rule whose source address information indicates the address of the first network element. Based on this method, when there is no processing rule whose source address information indicates the address of the first network element in the processing rule of the second network element, that is, when the source address information included in the processing rule of the second network element is not the address of the first network element, the second network element obtains the address of the server according to the processing rule determined by the tunnel, rather than directly obtaining the address of the server from the default domain name server, which helps the terminal device use higher quality services based on the address of the server.

[0037] In conjunction with the second aspect, in certain implementations of the second aspect, the method further includes: the second network element receiving second indication information from a second session management network element, where the second indication information indicates the second condition. Based on the indication from the second session management network element, the second network element determines a processing rule based on the tunnel for query messages that meet the condition, thereby enabling the second session management network element to manage the second network element.

[0038] In conjunction with the second aspect, in certain implementations of the second aspect, the method further includes: the second network element determining a sixth processing rule based on source address information in the second query message, the source address information included in the sixth processing rule corresponding to the address of the first network element, the sixth processing rule further including: a tunnel indicating the address of a terminal device corresponding to the first processing rule; and the second network element determining the first processing rule based on the tunnel through which the second query message is received. Based on the explicit indication of the sixth processing rule, the second network element can more accurately determine the first processing rule based on the option information.

[0039] In conjunction with the second aspect, in certain implementations of the second aspect, the method further includes: the second network element determining a seventh processing rule based on source address information in the second query message, the source address information included in the seventh processing rule corresponding to the address of the first network element, the seventh processing rule further including: sending a domain name to a second session management network element; the second network element sending the first domain name to the second session management network element based on the seventh processing rule, the second session management network element servicing the session of the terminal device; the second network element receiving an eighth processing rule from the second session management network element, the eighth processing rule including: a tunnel indicating the address of the terminal device corresponding to the first processing rule; the second network element determining the first processing rule based on the tunnel through which the second query message is received. Based on the indication of the eighth processing rule from the second session management network element, the second network element determines the processing rule based on the tunnel, thereby enabling the second session management network element to manage the second network element.

[0040] In conjunction with the second aspect, in certain implementations of the second aspect, the method further includes: source address information in the second query message indicates the address of the first network element; the second query message is sent by the first network element to the second network element via a tunnel; and when the second query message includes the first domain name, the source address information included in the first processing rule indicates the tunnel. By checking whether the source address information included in the first processing rule corresponds to the tunnel, the second network element can quickly determine the first processing rule, which helps to promptly send the server address to the first network element and improve response efficiency.

[0041] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes: the second query message also includes an identifier of the tunnel between the first network element and the second network element. The second network element can accurately determine the tunnel for transmitting the second query message based on the identifier of the tunnel.

[0042] In conjunction with the second aspect, in certain implementations of the second aspect, the second response is sent by the second network element to the first network element based on the address of the first network element, and the method further includes: the second network element receiving the address of the first network element from a second session management network element. Based on the address of the first network element provided by the second session management network element, the second network element may send the second response to the first network element, thereby facilitating management of the first network element by the first session management network element.

[0043] In a third aspect, a communication method is provided. The method can be executed by a first network element and a second network element, or by chips or circuits of the first network element and the second network element, which is not limited in this application. For ease of description, the following description is based on an example of execution by the first network element and the second network element.

[0044] The method includes: a first network element receiving a first query message from a terminal device, the first query message including a first domain name and an address of the terminal device, the first query message being used to query an address of a server providing a service corresponding to the first domain name for the terminal device; the first network element sending a second query message to a second network element, the second query message being used to query an address of a server corresponding to the first domain name; wherein source address information in the second query message indicates the address of the first network element, the second query message including the first domain name and the address of the terminal device; or, source address information in the second query message indicates the address of the first network element, the second query message including the first domain name, and the second query message being sent by the first network element to the second network element via a tunnel; the first network element receiving the second query message from the first network element, and obtaining the address of the server according to a first processing rule matching the first domain name; the second network element sending a second response to the second query message to the first network element, the second response including the address of the server; and the first network element receiving the second response from the second network element and sending a first response to the first query message to the terminal device, the first response including the address of the server.

[0045] In a fourth aspect, a communication system is provided, comprising a first network element and a second network element, wherein the first network element is configured to execute the method described in the first aspect or any implementation thereof, and the second network element is configured to execute the method described in the second aspect or any implementation thereof.

[0046] In combination with the fourth aspect, in some implementations of the fourth aspect, the communication system further includes a first session management network element, and the first session management network element is used to: instruct the first network element to send a second query message to the second network element.

[0047] In combination with the fourth aspect, in some implementations of the fourth aspect, the communication system further includes a second session management network element, where the second session management network element is configured to send a first processing rule matching the first domain name to the second network element.

[0048] The beneficial effects of the third and fourth aspects and any implementation thereof can be referred to the relevant descriptions in the first and second aspects and their implementations, and will not be elaborated here.

[0049] In a fifth aspect, a communication method is provided. The method can be executed by a first network element and a second network element, or can be executed by chips or circuits of the first network element and the second network element, which is not limited in this application. For ease of description, the following description is based on an example of execution by the first network element and the second network element.

[0050] The method includes: a first network element receives a first query message from a terminal device, the first query message includes a first domain name and an address of the terminal device, the first query message is used to query the address of a server that provides services corresponding to the first domain name to the terminal device; the first network element sends a second query message to a second network element, the source address information in the second query message indicates the address of the terminal device, the second query message includes the first domain name, and the second query message is used to query the address of the server corresponding to the first domain name; the second network element receives the second query message from the first network element, obtains the address of the server according to a first processing rule, the first processing rule matches the first domain name, and the source address information included in the first processing rule indicates the address of the terminal device; the second network element sends a first response to the first query message to the terminal device, and the first response includes the address of the server.

[0051] In a sixth aspect, a communication method is provided, which can be executed by a first network element, or by a chip or circuit of the first network element, which is not limited in this application. For ease of description, the following description is based on an example of execution by the first network element.

[0052] The method includes: a first network element receives a first query message from a terminal device, the first query message includes a first domain name and the address of the terminal device, and the first query message is used to query the address of a server that provides services corresponding to the first domain name to the terminal device; the first network element sends a second query message to a second network element, the source address information in the second query message indicates the address of the terminal device, the second query message includes the first domain name, and the second query message is used to query the address of the server corresponding to the first domain name.

[0053] Based on the methods provided in the fifth and sixth aspects, the first network element sends a second query message to the second network element based on the first query message from the terminal device, the source address information in the second query message indicates the address of the terminal device, the second network element obtains the address of the server based on the first processing rule of the address of the terminal device indicated by the source address information, and provides the server address to the terminal device so that the terminal device can use the services provided by the server.

[0054] In combination with the fifth aspect and the sixth aspect, in some implementations of the fifth aspect and the sixth aspect, the method also includes: the first network element receives a third query message from the terminal device, the third query message includes a second domain name and the address of the terminal device, and the third query message is used to query the address of the server that provides the service corresponding to the second domain name to the terminal device; the first network element sends a fourth query message to the first domain name server, the fourth query message includes the second domain name, and the fourth query message is used to query the address of the server corresponding to the second domain name; the first network element receives a fourth response to the fourth query message from the first domain name server, the fourth response includes the address of the second server, and the second server is used to provide the service corresponding to the second domain name; the first network element sends a third response to the third query message to the terminal device, and the third response includes the address of the second server.

[0055] Based on this method, the first network element can directly receive the address of the server queried by the third query message from the domain name server. Since the third query message passes through a shorter transmission path (for example, not passing through the second network element), the transmission delay is reduced. The first network element can provide the server address to the terminal device in a timely manner, and can also reduce the transmission load of the network.

[0056] In combination with the fifth aspect and the sixth aspect, in some implementations of the fifth aspect and the sixth aspect, the method also includes: the first network element receives a fifth query message from the second terminal device, the fifth query message includes the first domain name and the address of the second terminal device, and the fifth query message is used to query the address of the server that provides the service corresponding to the first domain name to the second terminal device; the first network element sends a sixth query message to the second domain name server, the sixth query message includes the first domain name, and the sixth query message is used to query the address of the server corresponding to the first domain name; the first network element receives a sixth response to the sixth query message from the first domain name server, the sixth response includes the address of a third server, and the third server is used to provide the service corresponding to the first domain name; the first network element sends a fifth response to the fifth query message to the second terminal device, and the fifth response includes the address of the third server.

[0057] Based on this method, the first network element can directly receive the address of the server queried by the fifth query message from the domain name server. Since the fifth query message passes through a shorter transmission path (for example, not passing through the second network element), the transmission delay is reduced. The first network element can provide the server address to the terminal device in a timely manner, and can also reduce the transmission load of the network.

[0058] In combination with the fifth aspect and the sixth aspect, in certain implementations of the fifth aspect and the sixth aspect, the first network element sends a second query message to the second network element, including: when the first domain name meets a first condition, the first network element sends the second query message to the second network element, and the first condition includes: there is no second processing rule that matches the first domain name and corresponds to the terminal device.

[0059] Based on this method, when the processing rules corresponding to the terminal device in the first network element do not match the first domain name, that is, when there is no processing rule matching the first domain name in the processing rules corresponding to the terminal device in the first network element, the first network element sends a second query message to the second network element. The address of the server is obtained based on the processing rules matching the first domain name, rather than from the default domain name server, which helps the terminal device to use higher quality services based on the address of the server.

[0060] In combination with the fifth and sixth aspects, in certain implementations of the fifth and sixth aspects, the method further includes: the first network element receiving first indication information from a first session management network element, where the first indication information is used to indicate the first condition. Under the instruction of the first session management network element, the first network element may select a second query message that meets the first condition and send it to the second network element, thereby enabling the first session management network element to manage the first network element.

[0061] In combination with the fifth aspect and the sixth aspect, in certain implementations of the fifth aspect and the sixth aspect, the second processing rule is: the source address information indicates the address of the terminal device and includes a processing rule for the first domain name.

[0062] In combination with the fifth aspect and the sixth aspect, in certain implementations of the fifth aspect and the sixth aspect, the method also includes: the first network element modifies the first query message into the second query message in the following manner: the address of the first network element indicated by the destination address information of the first query message is replaced with an address indicating the second network element; the source address information in the first query message remains unchanged.

[0063] In combination with the fifth aspect and the sixth aspect, in certain implementations of the fifth aspect and the sixth aspect, the second query message is sent by the first network element to the second network element based on the address of the second network element, and the method also includes: the first network element receives the address of the second network element from the first session management network element.

[0064] In combination with the fifth aspect and the sixth aspect, in certain implementations of the fifth aspect and the sixth aspect, the first network element is used to obtain the address of the server that provides services to the terminal device according to the instructions of the first session management network element, and the second network element is used to obtain the address of the server that provides services to the terminal device according to the instructions of the second session management network element, and the first session management network element and the second session management network element serve the session of the terminal device.

[0065] In a seventh aspect, a communication method is provided. The method may be executed by a first session management network element, or may be executed by a chip or circuit of the first session management network element, which is not limited in this application. For ease of description, the following description is based on an example of execution by the first session management network element.

[0066] The method includes: a first session management network element sends first indication information to a first network element, wherein the first indication information is used to indicate: when a first domain name in a first query message from a terminal device meets a first condition, a second query message is sent to a second network element, wherein the first condition includes: there is no second processing rule that matches the first domain name and corresponds to the terminal device; wherein the first query message is used to query the address of a server that provides the terminal device with a service corresponding to the first domain name, and the second query message is used to query the address of the server corresponding to the first domain name.

[0067] Based on this method, the first session management network element sends a clear first indication message to the first network element, which helps the first network element to send a second query message to the second network element when the first condition is met to obtain the address of the server so that the terminal device can use the services provided by the server according to the address of the server.

[0068] In conjunction with the seventh aspect, in some implementations of the seventh aspect, the first indication information is further used to indicate that: the source address information in the second query message indicates the address of the terminal device, and the second query message includes the first domain name. The first indication information helps the first network element to send the second query message to the second network element to conform to the correct format.

[0069] In conjunction with the seventh aspect, in certain implementations of the seventh aspect, the first indication information is further used to indicate: the source address information in the second query message indicates the address of the terminal device, and the second query message includes the first domain name, including: the first indication information is further used to instruct the first network element to modify the first query message into the second query message in the following manner: the address of the first network element indicated by the destination address information of the first query message is replaced with an address indicating the second network element; the source address information in the first query message remains unchanged. The first indication information helps the first network element obtain the second processing rule that conforms to the correct format in accordance with the correct processing method.

[0070] In an eighth aspect, a communication system is provided, comprising a first network element and a second network element. The first network element is configured to execute the method described in the sixth aspect or any implementation thereof; the second network element is configured to: receive the second query message from the first network element, obtain the address of the server according to a first processing rule, wherein the first processing rule matches the first domain name, and the source address information included in the first processing rule indicates the address of the terminal device; and the second network element is further configured to: send a first response to the first query message to the terminal device, the first response including the address of the server.

[0071] In combination with the eighth aspect, in some implementations of the eighth aspect, the communication system also includes a first session management network element, which is used to execute the method described in the seventh aspect or any implementation thereof.

[0072] In combination with the eighth aspect, in certain implementations of the eighth aspect, the communication system also includes a second session management network element, which is used to: send a first processing rule to the second network element that matches the first domain name and includes source address information indicating the address of the terminal device.

[0073] The beneficial effects of the above-mentioned eighth aspect or any of its implementation methods can be referred to the relevant descriptions in the fifth to seventh aspects and their implementation methods, and will not be repeated here.

[0074] In the ninth aspect, a communication device is provided, which includes a module for implementing the method described in the first aspect or any of its implementations; or, the communication device includes a module for implementing the method described in the second aspect or any of its implementations; or, the communication device includes a module for implementing the method described in the third aspect or any of its implementations; or, the communication device includes a module for implementing the method described in the fourth aspect or any of its implementations; or, the communication device includes a module for implementing the method described in the sixth aspect or any of its implementations; or, the communication device includes a module for implementing the method described in the seventh aspect or any of its implementations.

[0075] In the tenth aspect, a communication device is provided, comprising a processor, a memory, and an optional transceiver, wherein the memory is used to store instructions, and when the instructions are executed by the processor, the processor implements the method described in the first aspect or any of its implementations; or, the processor implements the method described in the second aspect or any of its implementations; or, the processor implements the method described in the third aspect or any of its implementations; or, the processor implements the method described in the fourth aspect or any of its implementations; or, the processor implements the method described in the sixth aspect or any of its implementations; or, the processor implements the method described in the seventh aspect or any of its implementations.

[0076] The transceiver is used for receiving and / or sending signals.

[0077] In the eleventh aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are run on a computer, the computer executes the method described in the first aspect or any of its implementations; or, the computer executes the method described in the second aspect or any of its implementations; or, the computer executes the method described in the third aspect or any of its implementations; or, the computer executes the method described in the fourth aspect or any of its implementations; or, the computer executes the method described in the eighth aspect or any of its implementations; or, the computer executes the method described in the ninth aspect or any of its implementations.

[0078] In the twelfth aspect, a computer program product comprising instructions is provided, which, when the instructions are run on a computer, enables the computer to execute the method described in the first aspect or any of its implementations; or, enables the computer to execute the method described in the second aspect or any of its implementations; or, enables the computer to execute the method described in the third aspect or any of its implementations; or, enables the computer to execute the method described in the fourth aspect or any of its implementations; or, enables the computer to execute the method described in the sixth aspect or any of its implementations; or, enables the computer to execute the method described in the seventh aspect or any of its implementations.

[0079] In the thirteenth aspect, a chip is provided, which includes a processor and a communication interface, and the processor reads instructions stored in the memory through the communication interface, and is used to execute the method described in the above-mentioned first aspect or any of its implementations; or, is used to execute the method described in the above-mentioned second aspect or any of its implementations; or, is used to execute the method described in the above-mentioned third aspect or any of its implementations; or, is used to execute the method described in the above-mentioned fourth aspect or any of its implementations; or, is used to execute the method described in the above-mentioned sixth aspect or any of its implementations; or, is used to execute the method described in the above-mentioned seventh aspect or any of its implementations.

[0080] Optionally, as an implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instruction is executed, the processor is used to execute the method described in the above-mentioned first aspect or any of its implementations; or, the processor is used to execute the method described in the above-mentioned second aspect or any of its implementations; or, the processor is used to execute the method described in the above-mentioned third aspect or any of its implementations; or, the processor is used to execute the method described in the above-mentioned fourth aspect or any of its implementations; or, the processor is used to execute the method described in the above-mentioned sixth aspect or any of its implementations; or, the processor is used to execute the method described in the above-mentioned seventh aspect or any of its implementations.

[0081] The beneficial effects of the above-mentioned ninth to thirteenth aspects or any of their implementation methods can be referred to the relevant descriptions in the first to eighth aspects and their implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] FIG1 is a schematic diagram of a network architecture 100 applicable to an embodiment of the present application;

[0083] FIG2 is a flow chart of a communication method 200 provided in an embodiment of the present application;

[0084] FIG3 is a schematic diagram of a format of a query message provided in an embodiment of the present application;

[0085] FIG4 is a flow chart of a communication method 300 provided in an embodiment of the present application;

[0086] FIG5 is a flow chart of a communication method 400 provided in an embodiment of the present application;

[0087] FIG6 is a flow chart of a communication method 500 provided in an embodiment of the present application;

[0088] FIG7 is a flow chart of a communication method 600 provided in an embodiment of the present application;

[0089] FIG8 is a schematic block diagram of a communication device 1000 provided in an embodiment of the present application;

[0090] FIG9 is a schematic block diagram of another communication device 2000 provided in an embodiment of the present application;

[0091] FIG10 is a schematic diagram of a chip system 3000 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0092] To use a service, a terminal device needs to know the address of the server that provides that service. It can then use this address to transmit service data to the server. In edge computing (EC) scenarios, there may be multiple edge application servers (EASs) providing the same service. The network can select a suitable EAS from these EASs for the terminal device and provide the EAS address to the terminal device. This process is called EAS discovery.

[0093] FIG1 is a schematic diagram of a network architecture 100 for implementing EAS discovery provided by an embodiment of the present application. The network architecture is based on a fifth-generation (5G) mobile communication network based on a service-based architecture (SBA) in a non-roaming scenario of the 3rd Generation Partnership Project (3GPP). For parts not described in detail, reference may be made to existing protocols. As shown in FIG1 , the network architecture 100 may include a terminal device 110, a (radio) access network ((R)AN) 120, a core network (CN), and a data network (DN) 140. The (R)AN 120 and the core network may be collectively referred to as the operator network portion.

[0094] Among them, the terminal device 110 is a device that provides voice and / or data connectivity to the user. The terminal device 110 can also be called user equipment (UE). The terminal device 110 in this application is a device with wireless transceiver functions, which can communicate with one or more core network (CN) devices via the access network device (or also called access device) in the (radio) access network (R)AN 120. The terminal device 110 can also be called an access terminal, terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, user agent or user device, etc. The terminal device 110 can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; it can also be deployed on the water (such as ships, etc.); it can also be deployed in the air (such as airplanes, balloons and satellites, etc.). The terminal device 110 may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a smartphone, a mobile phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), or the like. Alternatively, the terminal device 110 may be a handheld device with wireless communication capabilities, a computing device, or other device connected to a wireless modem, an in-vehicle device, a wearable device, an unmanned aerial vehicle (UAV), or a terminal in the Internet of Things (IoT), the Internet of Vehicles (IoV), any terminal in a 5G network or future networks, a relay user device, or a terminal in a future evolving 6G network. The relay user device may be, for example, a 5G residential gateway (RG). For example, the terminal device 110 may be a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control, a wireless terminal in unmanned driving, a wireless terminal in telemedicine, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, or a wireless terminal in a smart home. The terminal device here refers to a 3GPP terminal. The embodiments of the present application do not limit the type or category of terminal devices.

[0095] (R)AN 120 may include one or more access network elements or access network devices, and the interface between the access network device and the terminal device may be a Uu interface (or air interface, that is, the messages exchanged between the access network device and the terminal device may be called air interface messages). Of course, in future communications, the interface name may remain unchanged or may be replaced by other names, and this application is not limited to this. (R)AN 120 is a device that provides wireless communication functions for the terminal device 110, and can connect the terminal device to a node or device of a wireless network, and may also be called a network device. (R)AN 120 can be regarded as a subnetwork of the operator network, and is an implementation system between a service node in the operator network and the terminal device 110. For example, the terminal device 110 can connect to a service node of the operator network through (R)AN 120, thereby obtaining the services provided by the service node. (R)AN 120 includes but is not limited to: the next generation node base station (gNB) in the 5G system, the evolved node B (eNB) in the long term evolution (LTE), the radio network controller (RNC), the node B (NB), the base station controller (BSC), the base transceiver station (BTS), the home base station (for example, home evolved node B, or home node B, HNB), the base band unit (BBU), the transmitting and receiving point (TRP), the transmitting point (TP), the small base station equipment, the mobile switching center, or the network equipment in the future network, etc.The access network device may also be a module or unit that performs the functions of a base station, for example, a centralized unit (CU) and a distributed unit (DU); in a possible network structure, the CU may be used to support communications under protocols such as radio resource control (RRC), packet data convergence protocol (PDCP), and service data adaptation protocol (SDAP); and the DU may be used to support communications under radio link control (RLC) layer protocols, media access control (MAC) layer protocols, and physical layer protocols. The embodiments of the present application do not limit the specific technology and specific device form adopted by the access network device. In systems using different wireless access technologies, the names of devices having access network device functions may be different. For the convenience of description, in all embodiments of the present application, the above-mentioned devices that provide wireless communication functions for the terminal device 110 are collectively referred to as access network devices or RAN for short. It should be understood that the embodiments of the present application do not limit the specific type of access network device.

[0096] The DN 140 may also be referred to as a packet data network (PDN), in which one or more servers for providing services to the terminal device 110 are deployed.

[0097] In network architecture 100, after accessing the core network through (R)AN 120, terminal device 110 can transmit data for a service provided by a server in DN 140 via (R)AN 120 and the core network, and use the service provided by the server. This process involves the access and mobility management function (AMF) network element 131, session management function (SMF) network element 132, and user plane function (UPF) network element 133 in the core network. These network elements are briefly described below.

[0098] The AMF network element 131 is used to control access to the terminal device 110 and implement mobility management for the terminal device 110, such as managing the mobility status of the terminal device 110, allocating temporary user identities, and authenticating and authorizing the terminal device 110. The AMF network element 131 can also select an SMF network element 132 for the terminal device. Control plane signaling, such as non-access stratum messages, can be transmitted between the AMF network element 131 and the terminal device 110, and between the AMF network element 131 and the (R)AN 120.

[0099] The SMF network element 132 is used to manage sessions of the terminal device 110, including establishing, modifying, and releasing sessions. It is also used to select a UPF network element 133 for the session of the terminal device 110 and control the UPF network element 133. The session of the terminal device is used to transmit service data between the terminal device and can be a protocol data unit (PDU) session. Signaling can be exchanged between the SMF network element 132 and the AMF network element 131.

[0100] The UPF network element 133 supports sessions for the terminal device 110. For example, it routes and forwards service data between the terminal device 110 and the DN 140, and implements user-plane-related functions such as data detection, usage reporting, quality of service (QoS) processing, uplink packet detection, and downlink packet storage. The user plane connection between the UPF network element 133 and the (R)AN 120, as well as the IP connection between the UPF network element 133 and the DN 140, are used to transmit service data for the terminal device 110. The SMF network element 132 can send control plane signaling to the UPF network element 133, and the UPF network element 133 can report information about the session for the terminal device 110 to the SMF network element 132. The UPF network element 133 is also called a PDU session anchor (PSA).

[0101] The core network also includes an EASDF network element 134 for assisting in EAS discovery. The SMF network element 132 can select the EASDF network element 134 for a session with the terminal device 110. The EASDF network element 134 can receive, from the SMF network element 132, DNS processing rules for processing Domain Name System (DNS) messages related to the session. The terminal device 110 can send a DNS query message to the EASDF network element 134 via the session. For example, the terminal device 110 can send a DNS query message to the EASDF network element 134 via the (R)AN 120 and the UPF network element 133. Correspondingly, the EASDF network element 134 can receive the DNS query message from the terminal device 110 via the UPF network element 133 and the (R)AN 120. The EASDF network element 134 can also send a DNS response message to the terminal device 110 via the UPF network element 133 and the (R)AN 120. The DNS query message is used to query the address of the server providing services to the terminal device, and the DNS response message includes the server address. There is an Internet Protocol (IP) connection between the EASDF network element 134 and the DNS server 150. After the EASDF network element 134 processes the DNS query message according to the DNS processing rules, it sends the processed DNS query message to the DNS server through the IP connection. The EASDF network element 134 also receives a DNS response message from the DNS server through the IP connection, processes the DNS response message according to the DNS processing rules, and sends the processed DNS response message to the UPF network element 133.

[0102] The network architecture 100 also includes a DNS server 150, which is used to resolve the domain name in the DNS query message, determine the address of the server that can provide the service corresponding to the domain name, and send a DNS response message including the server address to the EASDF network element 134 through the IP connection between the EASDF network element 134.

[0103] In the EC scenario, a portion of DN 140 can be deployed near terminal device 110. This portion is called the local portion of DN 140. One or more EASs 141 can be deployed in the local portion of DN 140. These close EASs 141 provide services to terminal device 110, helping to reduce the end-to-end latency of service data transmission and improving the service experience of the terminal device. To support EC, the core network can select a UPF network element close to terminal device 110, such as UPF network element 133-1 in Figure 1, to support terminal device 110 access to the local portion of DN 140. In other words, UPF network element 133-1 is used to support local access of terminal device 110 to DN 140, to support local access of terminal device 110, or to support data transmission between terminal device 110 and the local portion of DN 140. UPF network element 133-1 can also be called a local PSA (L-PSA). The UPF network element 133 can be considered as the session anchor point of the terminal device 110 at the central site, and the UPF network element 133-1 is the session anchor point of the session at the local site.

[0104] The core network may also include a UPF network element 133-2, which is used to offload uplink service data, for example, routing uplink service data sent by the terminal device 110 to the local part of the DN 140 to the UPF network element 133-1. In this architecture, the user plane interface between the UPF network element 133 and the (R)AN 120 can be replaced by a user plane interface between the UPF network element 133 and the UPF network element 133-2, and a user plane interface between the UPF network element 133-2 and the (R)AN 120. That is, user plane data transmission between the UPF network element 133 and the (R)AN 120 is forwarded by the UPF network element 133-2. In addition, service data exchanged between the terminal device 110 and the local part of the DN 140 can be transmitted between the UPF network element 133-2 and the UPF network element 133-1. The UPF network element 133-2 can be called an uplink classifier (UL CL) or a branching point (BP). It should be noted that the UPF network element 133-1 and the UPF network element 133-2 can be the same UPF network element.

[0105] The core network may further include an intermediate SMF (I-SMF) network element 132-1 for controlling the UPF network element 133-1 and the UPF network element 133-2. For example, when the terminal device 110 is outside the service range of the SMF network element 132, that is, when the SMF network element 132 cannot control the UPF network element 133-1 and the UPF network element 133-2, the AMF network element 131 inserts the I-SMF network element 132-1 between the AMF network element 131 and the SMF network element 132. Control plane interfaces exist between the I-SMF network element 132-1 and the UPF network element 133-1, and between the I-SMF network element 132-1 and the UPF network element 133-2. I-SMF network element 132-1 can decide whether to insert a UL CL or BP, select UPF network element 133-2 from the controlled UPF network elements as the UL CL or BP, and configure diversion rules for UPF network element 133-2. For other functions of I-SMF network element 132-1, refer to the above description of SMF network element 132.

[0106] The I-SMF network element 132-1 can also select an intermediate EASDF (I-EASDF) network element 134-1 for the session of the terminal device, and configure the DNS processing rules for the I-EASDF network element 134-1 to process the DNS messages related to the session through the control plane interface. There is a user plane interface between the I-EASDF network element 134-1 and the UPF network element 133-1, and there is an IP connection between the I-EASDF network element 134-1 and one or more DNS servers (such as the DNS server 150 in Figure 1). The interaction between the I-EASDF network element 134-1 and the UPF network element 133-1, as well as the interaction between the I-EASDF network element 134-1 and the DNS server, can refer to the above description of the EASDF network element 134, which will not be repeated here.

[0107] The core network may also include one or more of the following network elements: a network exposure function (NEF) network element, a network function repository function (NRF) network element, a policy control function (PCF) network element, a unified data management function (UDM) network element, a unified data repository function (UDR) network element, a network data analysis function (NWDAF) network element, an authentication server function (AUSF) network element, an access and mobility management function (AMF) network element, or a session management function (SMF) network element. Among them, the network element may also be referred to as a network function (NF), which is not limited in the embodiments of the present application. The functions of the above network elements can refer to existing protocols and will not be repeated here.

[0108] It should be understood that the above-mentioned network elements or NFs can be physical entities in hardware devices, software instances running on dedicated hardware, or virtualized functions instantiated on a shared platform (e.g., a cloud platform). In terms of form, the above-mentioned network functions NFs can be independent devices or integrated into the same device to implement different functions.

[0109] It should be understood that the network architecture applied to the embodiment of the present application is only a network architecture described from the perspective of a service-oriented architecture, and the network architecture applicable to the embodiment of the present application is not limited thereto, and any network architecture that can realize the functions of the above-mentioned NF entities is applicable to the embodiment of the present application. In addition, the above naming is only defined for the convenience of distinguishing different functions and should not constitute any limitation to this application. This application does not exclude the possibility of adopting other naming in 5G networks and other future networks. For example, in the sixth-generation (6th-generation, 6G) mobile communication network, some or all of the above-mentioned NFs may use the terminology in 5G, or may adopt other names, etc.

[0110] The following is a brief introduction to DNS messages and DNS processing rules. For parts not fully explained, please refer to existing protocols.

[0111] (1) DNS message

[0112] DNS messages include DNS query messages and DNS response messages. The RFC 1035 protocol published by the Internet Engineering Task Force (IETF) specifies the format of DNS messages. A DNS query message includes at least source address information, target address information, and a fully qualified domain name (FQDN). A DNS response message includes at least source address information, target address information, and the address of the EAS corresponding to the FQDN.

[0113] The source address information in the DNS message is used to indicate the address of the device or network element that sent the DNS message. The recipient can determine the source of the DNS message based on the source address information. The target address information in the DNS message is used to indicate the address of the device or network element that receives the DNS message, that is, it is used to indicate the address of the target device or network element of the DNS message. The device or network element that the DNS message passes through during transmission can be routed based on the target address information to ensure that the DNS message is successfully transmitted to the target device or network element. The target device or network element can also determine that the DNS message is sent to itself based on the target address information, and then process the DNS message. For example, the source address information in the DNS query message sent by the terminal device to the EASDF network element is used to indicate the address of the terminal device, and the target address information is used to indicate the address of the EASDF network element.

[0114] The FQDN corresponds to the service. The DNS query message includes the FQDN, indicating that the DNS query message queries the address of the EAS corresponding to the FQDN, that is, the address of the EAS that can provide the service corresponding to the FQDN.

[0115] Optionally, the DNS query message also includes an ECS option (client subnet option) for DNS extensions (EDNS), which is used to determine the address of the EAS. That is, the DNS server can select an EAS for the terminal device based on the information in the ECS option. For example, the ECS option can include the location information of the terminal device, so that the DNS server can select an EAS that is closer to the terminal device to provide services to the terminal device based on the terminal device's location information.

[0116] (2) DNS message processing rules

[0117] DNS message processing rules consist of two parts: a detection template and an action. The EASDF network element checks whether a received DNS message matches the detection template in the DNS message processing rule. If so, the EASDF network element processes the DNS message according to the action in the DNS message processing rule. Hereinafter, "matching a DNS message with a detection template in a DNS message processing rule" will be referred to as "matching a DNS message with a DNS message processing rule."

[0118] Among them, the detection template includes a DNS message type, and the DNS message type can be a DNS query or a DNS response. When the DNS message type is a DNS query, the detection template also includes source address information. The EASDF network element compares whether the source address information included in the detection template and the source address information in the DNS query message are the same. If they are the same, the DNS query message can be processed according to the action included in the DNS message processing rule. Exemplarily, during the establishment of a session of a terminal device, the SMF network element configures one or more DNS message processing rules for the EASDF network element to process DNS messages related to the session. The source address information included in these DNS message processing rules indicates the address of the terminal device, and the address of the terminal device corresponds to the session.

[0119] Optionally, the detection template also includes an FQDN range. In this case, the EASDF network element also checks whether the FQDN in the DNS query message belongs to the FQDN range. If so, the EASDF network element can process the DNS query message according to the actions included in the DNS message processing rule.

[0120] When the DNS message type is DNS response, the detection template may further include an FQDN range and / or an EAS address range. The EASDF network element compares whether the FQDN in the DNS response message belongs to the FQDN range and / or whether the EAS address in the DNS response message belongs to the EAS address. If so, the EASDF network element may process the DNS response message according to the action included in the DNS message processing rule.

[0121] The actions included in the DNS message processing rules include at least one of the following actions: reporting, control, or forwarding. The reporting action is used to indicate that the information in the DNS message is reported to the SMF network element. The control action is used to indicate that the DNS message is cached, the cached DNS response message is sent to the terminal device, or the cached DNS response message is discarded. The forwarding action includes the following three options:

[0122] Option A: The DNS processing rule also includes information for constructing an ECS option. The forwarding action is used to instruct to construct an ECS option based on the information and add the ECS option to the DNS message, or to replace the ECS option in the DNS query message received from the terminal device with the ECS option.

[0123] Option B: The DNS processing rule also includes the address of the DNS server, and the forwarding action is used to instruct to send a DNS query message to the address of the DNS server.

[0124] Option C: If there is no DNS server address in the DNS processing rule, the forwarding action is used to instruct to send the DNS query message to the locally pre-configured default DNS server or resolver.

[0125] Option D: This forwarding action is used to indicate a direct response to a DNS query message.

[0126] In summary, the DNS processing rules can be formatted as follows:

[0127] If the action included in the DNS message processing rule #1 that matches the DNS query message is reporting, the EASDF network element sends the information in the DNS query message, such as FQDN, to the SMF network element, and the SMF network element sends the DNS message processing rule #2.

[0128] In one implementation (referred to as Option A), DNS message processing rule #2 includes information for constructing the ECS option. For example, the SMF network element may determine the information for constructing the ECS option based on one or more of the FQDN, EAS deployment information, or terminal device location information. In another implementation (referred to as Option B), the DNS message processing rule includes the address of the local DNS server. In yet another implementation (referred to as Option C), the DNS message processing rule instructs the EASDF network element to forward the DNS query message to a preconfigured DNS server or resolver.

[0129] For option A, the EASDF network element constructs an ECS option based on the information in the DNS message processing rules and adds the ECS option to the DNS query message, or replaces the ECS option in the DNS query message with the ECS option, and sends the processed DNS query message to the central DNS (C-DNS) server.

[0130] For option B, the EASDF network element sends a DNS query message to the local DNS server according to the local DNS server IP address in the DNS message processing rules. If the DNS query message includes the ECS option, the EASDF network element removes the ECS option from the DNS query message before sending the DNS query message.

[0131] For option C, or when the DNS query message does not match any DNS message processing rules, the EASDF network element sends the DNS query message to a pre-configured DNS server or resolver.

[0132] For option D, the EASDF network element creates a DNS response message based on the EAS address provided by the SMF network element and sends the DNS response message to the terminal device. In this case, the EASDF network element does not need to send a DNS query message to the DNS server.

[0133] In the case of option A, B, or C above, the EASDF network element receives a DNS response message from the DNS server and processes the DNS response message according to the DNS message processing rule #3 that matches the DNS response message. For example, when the action included in the DNS message processing rule #3 is reporting, the EASDF network element caches the DNS response message locally and sends the FQDN and / or EAS address in the DNS response message to the SMF network element. Then, the EASDF network element processes the DNS response message according to the DNS message processing rule #4 that matches the DNS response message received from the SMF network element. For example, if the DNS message processing rule #4 includes a control action for instructing to send the cached DNS response message to the terminal device, the EASDF network element sends the DNS response message to the terminal device.

[0134] Figure 2 is a flow chart of a communication method 200 provided in an embodiment of the present application. As shown in Figure 2, the communication method 200 can be executed by a terminal device, a first network element, and a second network element, or can be executed by modules and / or devices (for example, chips or integrated circuits, etc.) with corresponding functions installed in the terminal device, the first network element, and the second network element, and this application is not limited. For the sake of convenience of description, the following description is based on the terminal device, the first network element, and the second network element as the execution subjects. The communication method 200 can be applied to the network architecture 100 shown in Figure 1. For example, the terminal device is the terminal device 110, the first network element is the I-EASDF network element 134-1, and the second network element is the EASDF network element 134. The query message, response message, and processing rules in the embodiment of the present application can be DNS query messages, DNS response messages, and DNS message processing rules. For the parts not described in detail, please refer to the above description and existing protocols. As shown in Figure 2, the communication method 200 includes the following multiple steps.

[0135] S210. The terminal device sends a first query message to the first network element. Correspondingly, the first network element receives the first query message from the terminal device.

[0136] The first query message includes the first domain name and the address of the terminal device, and the first query message is used to query the address of the server that provides the service corresponding to the first domain name to the terminal device.

[0137] For example, the source address information of the first query message indicates the address of the terminal device, such as the source address information of the first query message is the address of the terminal device. The address of the terminal device corresponds to the session of the terminal device, so it can be considered that the first query message is related to the session, or the first query message corresponds to the session. The address of the terminal device can be the IP address of the terminal device, the first domain name can be the FQDN, the first query message can be a DNS query message, and the server can be EAS.

[0138] For example, the terminal device sends a first query message to the first network element via an access network device, a first user plane network element, and a local session anchor. The access network device may be an access network device in (R)AN 120; the first user plane network element is used to implement uplink data offload and may be UPF network element 133-2; the local session anchor is used to support local access of the terminal device and may be UPF network element 133-1. The first user plane network element and the local session anchor may be the same user plane network element.

[0139] Before step S210 , the communication method 200 further includes: the first session management network element sending the address of the first network element to the terminal device, and correspondingly, the terminal device receives the address of the first network element from the first session management network element.

[0140] For example, the first session management network element selects the first network element to serve the terminal device, that is, provides the terminal device with the server address. The terminal device may include the address of the first network element in the first query message, for example, the target address information of the first query message indicates the address of the first network element. The first network element may serve as the default DNS server for the terminal device.

[0141] The first user plane network element may send the first query message to the local session anchor point based on the source address information or the target address information. For example, if the first user plane network element is a UL CL, the first user plane network element determines that the first query message needs to be sent to the local session anchor point based on the target address information; if the first user plane network element is a BP, the first user plane network element determines that the first query message needs to be sent to the local session anchor point based on the source address information.

[0142] S220. The first network element sends a second query message to the second network element. Correspondingly, the second network element receives the second query message from the first network element, where the second query message is used to query the address of the server corresponding to the first domain name.

[0143] For example, the second query message is sent by the first network element to the second network element based on the address of the second network element. Before the first network element sends the second query message to the second network element, the communication method 200 also includes: the first network element receives the address of the second network element from the first session management network element, and correspondingly, the first session management network element sends the address of the second network element to the first network element.

[0144] For example, the second session management network element sends the address of the second network element to the first session management network element. Correspondingly, the first session management network element receives the address of the second network element from the second session management network element and sends the address of the second network element to the first network element. After receiving the address of the second network element, the first network element may send a second query message to the second network element based on the address of the second network element in step S220.

[0145] For example, the second query message is sent by the first network element to the second network element through the local session anchor and the session anchor. Before the first network element sends the second query message to the second network element, the communication method 200 also includes: the first network element receives the address of the local session anchor from the first session management network element.

[0146] Exemplarily, the first network element sends a second query message to the local session anchor point based on the address of the local session anchor point. Then, the local session anchor point sends the second query message to the first user plane network element. The first user plane network element then sends the second query message to the session anchor point. Finally, the session anchor point sends the second query message to the second network element.

[0147] The first session management network element and the second session management network element serve the session of the terminal device. The terminal device is located within the service range of the first session management network element. The first session management network element may be the I-SMF network element 132-1 in Figure 1. The first session management network element may also be referred to as a local session management network element or a local network element. The second session management network element may be the SMF network element 132. The second session management network element may be referred to as an anchor session management network element. This embodiment of the application does not limit the names of the network elements. The local session anchor is used to transmit session-related data of the terminal device according to the instructions of the first session management network element, supports local connection of the terminal device, and may be the UPF network element 133-1 in Figure 1. The session anchor is used to transmit session-related data of the terminal device according to the instructions of the second session management network element. It may be the UPF network element 133 in Figure 1.

[0148] Optionally, when the first domain name satisfies the first condition, the first network element sends a second query message to the second network element, where the first condition includes: there is no second processing rule that matches the first domain name and corresponds to the terminal device. That is, when the processing rule corresponding to the terminal device in the first network element does not match the first domain name, or when there is no processing rule that matches the first domain name among the processing rules corresponding to the terminal device in the first network element, the first network element sends a second query message to the second network element. The correspondence between the processing rule and the terminal device can be that the source address information in the processing rule matches the address of the terminal device, or the source address information in the processing rule indicates the address of the terminal device, or the source address information in the processing rule is the address of the terminal device.

[0149] The second processing rule may be a processing rule in which the source address information indicates the address of the terminal device and includes the first domain name. Exemplarily, the format of the second processing rule is as follows:

[0150] In one implementation, before the first network element sends the second query message to the second network element, the communication method 200 further includes: the first network element receiving first indication information from the first session management network element, and in response, the first session management network element sending the first indication information to the first network element, where the first indication information is used to indicate the first condition. Thus, in step S220, the first network element sends the second query message to the second network element based on the first indication information if the first domain name meets the first condition.

[0151] For example, the address of the second network element is a default (or preconfigured) forwarding address. When the first domain name meets the first condition, the first network element sends a second query message to the second network element based on the default forwarding address. Exemplarily, the first session management network element configures the address of the second network element as the default forwarding address for the first network element. For another example, the first indication information is also used to indicate the address of the second network element. When the first domain name meets the first condition, the first network element sends a second query message to the second network element based on the first indication information. For another example, the first session management network element sends the first indication information and the address of the second network element to the first network element.

[0152] The first indication information may also be used to indicate the format of the second query message. The format of the second query message includes:

[0153] Format A: The source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name and the address of the terminal device; or

[0154] Format B: The source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name.

[0155] Optionally, for format A, the option information in the second query message includes the terminal device's address. That is, the option information portion of the second query message carries the terminal device's address, and the terminal device's address occupies information bits corresponding to the option information portion. This option information is used to determine the server's address. The second query message may be a DNS query message, and the option information may be an ECS option.

[0156] When the first indication information indicates format B, the first indication information may also be used to instruct the first network element to send the second query message through a tunnel between the first network element and the second network element. For example, a tunnel is established between the first network element and the second network element, and the tunnel is used to transmit messages related to a session of the terminal device between the first network element and the second network element, that is, the tunnel corresponds to the session of the terminal device.

[0157] Alternatively, the format of the second query message is a default format, for example, the format of the second query message is defined by a standard or configured by the first session management network element for the first network element. When the first domain name meets the first condition, the first network element generates a second query message according to the default format and sends the second query message to the second network element.

[0158] The first indication information can also be used to indicate the address of the second network element; or, the first session management network element also sends the address of the second network element to the first network element. The first session management network element can send the address of the second network element and the first indication information to the first network element through the same message or different messages. This embodiment of the present application does not limit this.

[0159] Alternatively, the address of the second network element is a default forwarding address. For example, the first session management network element configures the address of the second network element as the default forwarding address for the first network element. When the first domain name meets the first condition, the first network element sends a second query message to the second network element according to the default forwarding address.

[0160] In another implementation, a first network element receives processing rule 2A from a first session management network element, and in response, the first session management network element sends processing rule 2A to the first network element. Processing rule 2A includes source address information indicating an address of a terminal device, includes a first condition, and further includes sending a second query message to a second network element.

[0161] For example, the detection template in the processing rule 2A includes the first condition, and the action included in the processing rule 2A indicates sending a second query message to the second network element. Exemplarily, the processing rule 2A may adopt the following format:

[0162] After receiving the first query message, the first network element determines that the source address information included in processing rule 2A is the same as the source address information in the first query message, and the first query message meets the first condition. Then, the first network element sends a second query message to the second network element according to the action included in processing rule 2A.

[0163] Optionally, processing rule 2A further includes a format of the second query message, and the format of the second query message may be the aforementioned format A or format B. When the format of the second query message included in processing rule 2A is format B, processing rule 2A may further include: sending the second query message through a tunnel between the first network element and the second network element. Exemplarily, processing rule 2A may adopt the following format:

[0164] Optionally, the processing rule 2A further includes the address of the second network element. Exemplarily, the processing rule 2A may adopt the following format:

[0165] It should be understood that processing rule 2A may include the format of the second query message and the address of the second network element, which will not be repeated here.

[0166] S230. The second network element obtains an address of a server according to a first processing rule matching the first domain name, where the server is used to provide a service corresponding to the first domain name to the terminal device.

[0167] The first processing rule matches the first domain name, which may be that the first processing rule includes the first domain name, or the first domain name belongs to a domain name range included in the first processing rule, and the domain name range can be included in the detection template of the first processing rule.

[0168] When the second query message adopts a different format and the first processing rule is different, the manner in which the second network element determines the first processing rule may also be different, which are respectively introduced below.

[0169] Format A: The source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name and the address of the terminal device.

[0170] For example, the option information in the second query message includes the address of the terminal device. That is, the option information portion of the second query message carries the address of the terminal device, and the terminal device address occupies information bits corresponding to the option information portion. The option information is used to determine the address of the server. The second query message may be a DNS query message, and the option information may be an ECS option.

[0171] The second query message conforms to the prescribed format. As shown in Figure 3, bits n1 to n2 of the second query message are source address information, bits n3 to n4 are the first domain name, and bits n5 to n6 are option information. At least one of bits n5 to n6 indicates the address of the terminal device, where n1 to n6 are non-negative integers with increasing values. It should be noted that Figure 3 is an example of the format of the second query message. The embodiments of the present application do not restrict the order of the source address information, the first domain name, and the option information in the second query message, nor the number of bits occupied by each part. The second query message may also include other parts.

[0172] In one implementation (method 2-1), the source address information included in the first processing rule indicates the address of the terminal device. Exemplarily, in step S230, the second network element may determine the first processing rule according to any one of the following methods 2-1-1 to 2-1-4.

[0173] Method 2-1-1: When the address of the first network element meets the second condition, the second network element determines the first processing rule based on the option information in the second query message, and the second condition includes: there is no source address information indicating the processing rule of the address of the first network element.

[0174] There is no processing rule in which the source address information indicates the address of the first network element, or there is no processing rule corresponding to the address of the first network element.

[0175] For example, after receiving the second query message, the second network element first searches for a processing rule whose source address information corresponds to the address of the first network element based on the source address information in the second query message. If no processing rule whose source address information corresponds to the address of the first network element is found, the second network element searches for a processing rule whose source address information indicates the address of the terminal device based on the address of the terminal device included in the optional information in the second query message, and determines that the processing rule whose source address information indicates the address of the terminal device and matches the first domain name is the first processing rule.

[0176] Optionally, before the second network element receives the second query message from the first network element, the communication method 200 further includes: the second network element receiving second indication information from the second session management network element. The second indication information is used to indicate a second condition, that is, the second indication information is used to indicate: when there is no processing rule corresponding to the source address information in the query message, the processing rule is determined based on the option information in the query message; or the second indication information is used to indicate: when there is no processing rule corresponding to the source address information in the query message, the option information in the query message indicates the address of the terminal device corresponding to the first processing rule, wherein the "address of the terminal device corresponding to the first processing rule" is the address of the terminal device indicated by the source address information included in the first processing rule. Based on the second indication information, if the address of the first network element satisfies the second condition, the second network element determines the first processing rule based on the option information in the second query message.

[0177] Method 2-1-2: The second network element determines the third processing rule based on the source address information in the second query message. The source address information included in the third processing rule corresponds to the address of the first network element. The third processing rule also includes: option information used to indicate the address of the terminal device corresponding to the first processing rule. Then, the second network element determines the first processing rule based on the option information in the second query message.

[0178] The source address information included in the third processing rule corresponds to the address of the first network element, and the source address information included in the third processing rule indicates the address of the first network element; or, the source address information included in the third processing rule is a wildcard, and any information can match the wildcard.

[0179] When the source address information included in the third processing rule is a wildcard, the third processing rule has the lowest priority among all processing rules. The second network element checks whether each processing rule matches the second query message in descending order of priority. It should be understood that only when the second query message does not match any other processing rules will the second network element check whether the source address information included in the third processing rule corresponds to the second query message.

[0180] Optionally, the second network element has a context including at least one processing rule, and the at least one processing rule includes a third processing rule, then "the third processing rule has the lowest priority among all processing rules" is replaced with the third processing rule having the lowest priority among all processing rules included in the context. The second network element determines that the context matches the second query message, and then checks whether the processing rules in the context match the second query message in descending order of priority. When the second query message does not match any other processing rules in the context, the second network element will check whether the source address information included in the third processing rule corresponds to the second query message. The context matching the second query message includes that the context includes the address or wildcard of the first network element, and the source address of the second query message is the address of the first network element. Optionally, it also includes that the context includes the address of the terminal device, and the second query message includes the address of the terminal device, such as the option information of the second query message includes the address of the terminal device.

[0181] Optionally, the third processing rule further includes a domain name range, and the domain name range includes the first domain name.

[0182] The third processing rule further includes: optional information for indicating an address of a terminal device corresponding to the first processing rule, and the action indication optional information included in the third processing rule may include the address of the terminal device corresponding to the first processing rule. Upon confirming that the third processing rule matches the second query message, the second network element processes the second query message according to the action included in the third processing rule, i.e., determines the first processing rule based on the optional information in the second query message.

[0183] The third processing rule may be in the following format:

[0184] Optionally, before the second network element receives the second query message from the first network element, the communication method 200 further includes: the second network element receives a third processing rule from the second session management network element, and correspondingly, the second session management network element sends the third processing rule to the second network element.

[0185] Method 2-1-3: The second network element determines the fourth processing rule based on the source address information in the second query message, the source address information included in the fourth processing rule corresponds to the address of the first network element, and the fourth processing rule also includes: sending the domain name to the second session management network element; the second network element sends the first domain name to the second session management network element according to the fourth processing rule, and the second session management network element serves the session of the terminal device; the second network element receives the fifth processing rule from the second session management network element, and the fifth processing rule includes: option information is used to indicate the address of the terminal device corresponding to the first processing rule; the second network element determines the first processing rule based on the option information in the second query message.

[0186] Among them, the source address information included in the fourth processing rule corresponds to the address of the first network element, and the source address information included in the fourth processing rule indicates the address of the first network element; or, the source address information included in the fourth processing rule is a wildcard, and any information can match the wildcard. When the source address information included in the fourth processing rule is a wildcard, the fourth processing rule has the lowest priority among all processing rules. The specific implementation can refer to the description of the third processing rule above, which will not be repeated here. Optionally, the fourth processing rule also includes a domain name range, and the domain name range includes the first domain name.

[0187] For example, the fourth processing rule includes an action of reporting. Exemplarily, the fourth processing rule may adopt the following format:

[0188] Optionally, before the second network element receives the second query message from the first network element, the communication method 200 further includes: the second network element receives a fourth processing rule from the second session management network element, and correspondingly, the second session management network element sends the fourth processing rule to the second network element.

[0189] The fifth processing rule includes: option information for indicating the address of the terminal device corresponding to the first processing rule. Alternatively, the action indication option information included in the fifth processing rule includes the address of the terminal device corresponding to the first processing rule.

[0190] Optionally, the fifth processing rule matches the second query message, that is, the source address information included in the fifth processing rule indicates the address of the first network element or is a wildcard, and the domain name range included in the fifth processing rule includes the first domain name. After receiving the fifth processing rule from the second session management network element, the second network element confirms that the fifth processing rule matches the second query message, and then determines the first processing rule based on the fifth processing rule and the option information in the second query message.

[0191] For example, the fifth processing rule may adopt the following format:

[0192] Optionally, the second network element sends a first message to the second session management network element, the first message including a first domain name and first identification information, wherein the first identification information is used to indicate the second query message. Correspondingly, the second session management network element receives the first message and, based on the first domain name, sends a second message to the second network element, the second message including a fifth processing rule and the first identification information. After receiving the second message, the second network element may confirm, based on the first identification information, that the fifth processing rule is used to process the second query message, and then, based on the fifth processing rule, determine the first processing rule according to the option information in the second query message. In this manner, the fifth processing rule may not include source address information and domain name range. The second session management network element may be SMF network element 132 in Figure 1 .

[0193] In method 2-1-3, the second network element receiving the fifth processing rule from the second session management network element can be replaced by the second network element receiving the third indication information from the second session management network element, and the third indication information is used to indicate: the option information includes the address of the terminal device corresponding to the first processing rule.

[0194] Method 2-1-4: The second network element determines the first processing rule based on the fourth indication information from the first network element and the option information in the second query message, wherein the fourth indication information is used to indicate: the option information includes the address of the terminal device corresponding to the first processing rule.

[0195] For example, in step S220, the first network element sends the second query message and the fourth indication information to the second network element, and correspondingly, the second network element receives the second query message and the fourth indication information from the first network element. For another example, the second query message includes the fourth indication information, and illustratively, the fourth indication information is one bit, and the value of the fourth indication information is a first value (such as "0"), then the indication option information includes the address of the terminal device corresponding to the first processing rule.

[0196] Then, the second network element obtains the address of the terminal device from the option information of the second query message according to the fourth indication information, and determines that the source address information indicates the address of the terminal device and the processing rule that matches the first domain name is the first processing rule.

[0197] In another implementation manner (method 2-2), the source address information included in the first processing rule indicates the address of the first network element, and the first processing rule further includes: the optional information includes the address of the terminal device. That is, the first processing rule is used to process a query message that meets the third condition, where the third condition includes: (1) the source address information in the query message indicates the address of the first network element; (2) the domain name in the query message falls within the domain name range included in the first processing rule; (3) the optional information in the query message includes the address of the terminal device.

[0198] For example, the detection template of the first processing rule includes: the option information includes the address of the terminal device. Exemplarily, the first processing rule can adopt the following format:

[0199] After receiving the second query message, the second network element checks whether the second query message meets the third condition. If so, the second network element confirms that the first processing rule matches the second query message, and then processes the second query message according to the action in the first processing rule.

[0200] Optionally, the second network element stores a first context including at least one processing rule, the at least one processing rule including the first processing rule and also including a third processing rule or a fourth processing rule. After receiving the second query message and before searching for the processing rule, the second network element further determines whether the first context matches the second query message. Exemplarily, when the processing rule is a DNS message handling rule or a DNS rule, the first context is a DNS context or an EASDF context.

[0201] For example, the first context includes the address of the first network element and the address of the terminal device, and the second network element confirms that the first context and the second query message match, including: the second network element confirms that the address of the first network element included in the first context is the same as the address of the first network element indicated by the source address information of the second query message, and the address of the terminal device included in the first context is the same as the address of the terminal device included in the option information in the second query message.

[0202] For another example, the first context includes the address of the terminal device, and the second network element does not find a matching context based on the address of the first network element indicated by the source address information of the second query message, and then determines that the first context matches the second query message based on the fact that the address of the terminal device included in the option information is the same as the address of the terminal device included in the first context.

[0203] After the second network element confirms that the first context matches the second query message, it can search for a matching processing rule from the processing rules included in the first context according to the above methods 2-1-1 to 2-1-4.

[0204] Format B: The source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name, and the second query message is sent by the first network element to the second network element through the tunnel.

[0205] For example, in step S220, the first network element sends a second query message to the second network element through the tunnel, and correspondingly, the second network element receives the second query message from the first network element through the tunnel.

[0206] In one implementation (method 2-3), the tunnel is used to indicate the address of the terminal device, and the source address information included in the first processing rule indicates the address of the terminal device. For example, the tunnel is used to transmit messages related to a session of the terminal device between the first network element and the second network element. The address of the terminal device corresponds to the session of the terminal device. The second network element can determine the address of the terminal device based on the tunnel through which the second query message is received, and further determine that the processing rule whose source address information indicates the address of the terminal device and matches the first domain name is the first processing rule.

[0207] For example, the second network element can determine first tunnel identification information based on the tunnel, where the first tunnel identification information is used to indicate the tunnel, or the first tunnel identification information is used to indicate the endpoint of the tunnel on the second network element side. Next, the second network element determines the address of the terminal device based on the correspondence between the tunnel identification information and the address of the terminal device, and further determines the first processing rule. Exemplarily, the second network element can determine the first processing rule based on any of the following methods 2-3-1 to 2-3-3.

[0208] Method 2-3-1: When the address of the first network element meets the second condition, the second network element determines the first processing rule based on the tunnel through which the second query message is received. The second condition includes: there is no source address information indicating the processing rule of the address of the first network element.

[0209] There is no processing rule in which the source address information indicates the address of the first network element, or there is no processing rule corresponding to the address of the first network element.

[0210] For example, after receiving the second query message, the second network element first searches for a processing rule whose source address information corresponds to the address of the first network element based on the source address information in the second query message. If no processing rule whose source address information corresponds to the address of the first network element is found, the second network element determines the address of the terminal device based on the tunnel through which the second query message is received, and determines that the processing rule whose source address information indicates the address of the terminal device and matches the first domain name is the first processing rule.

[0211] Optionally, before the second network element receives the second query message from the first network element, the communication method 200 further includes: the second network element receiving fifth indication information from the second session management network element. The fifth indication information is used to indicate that, when no processing rule corresponding to the source address information in the query message exists, a processing rule is determined based on the tunnel through which the query message is received; or, the fifth indication information is used to indicate that, when no processing rule corresponding to the source address information in the query message exists, the tunnel through which the query message is received indicates the address of the terminal device corresponding to the first processing rule. Based on the fifth indication information, if the address of the first network element satisfies the second condition, the second network element determines the first processing rule based on the tunnel through which the query message is received.

[0212] Method 2-3-2: The second network element determines the sixth processing rule based on the source address information in the second query message. The source address information included in the sixth processing rule corresponds to the address of the first network element. The sixth processing rule also includes: a tunnel is used to indicate the address of the terminal device corresponding to the first processing rule; the second network element determines the first processing rule based on the tunnel through which the second query message is received.

[0213] Among them, the source address information included in the sixth processing rule corresponds to the address of the first network element, and the source address information included in the sixth processing rule indicates the address of the first network element; or, the source address information included in the sixth processing rule is a wildcard, and any information can match the wildcard. When the source address information included in the sixth processing rule is a wildcard, the sixth processing rule has the lowest priority among all processing rules. The specific implementation can refer to the description of the third processing rule above, which will not be repeated here. Optionally, the sixth processing rule also includes a domain name range, and the domain name range includes the first domain name.

[0214] The sixth processing rule further includes: a tunnel is used to indicate the address of the terminal device corresponding to the first processing rule, and the sixth processing rule may include an action indication: a tunnel is used to indicate the address of the terminal device corresponding to the first processing rule. When the second network element confirms that the sixth processing rule matches the second query message, it processes the second query message according to the action included in the sixth processing rule, that is, determines the first processing rule based on the tunnel through which the second query message is received.

[0215] For example, the sixth processing rule may adopt the following format:

[0216] Optionally, before the second network element receives the second query message from the first network element, the communication method 200 further includes: the second network element receives a sixth processing rule from the second session management network element, and correspondingly, the second session management network element sends the sixth processing rule to the second network element.

[0217] Method 2-3-3: The second network element determines the seventh processing rule based on the source address information in the second query message. The source address information included in the seventh processing rule corresponds to the address of the first network element. The seventh processing rule also includes: sending the domain name to the second session management network element; the second network element sends the first domain name to the second session management network element according to the seventh processing rule, and the second session management network element serves the session of the terminal device; the second network element receives the eighth processing rule from the second session management network element, and the eighth processing rule includes: a tunnel is used to indicate the address of the terminal device corresponding to the first processing rule; the second network element determines the first processing rule based on the tunnel through which the second query message is received.

[0218] Among them, the source address information included in the seventh processing rule corresponds to the address of the first network element, and the source address information included in the seventh processing rule indicates the address of the first network element; or, the source address information included in the seventh processing rule is a wildcard, and any information can match the wildcard. When the source address information included in the seventh processing rule is a wildcard, the seventh processing rule has the lowest priority among all processing rules. The specific implementation can refer to the description of the third processing rule above, which will not be repeated here. Optionally, the seventh processing rule also includes a domain name range, and the domain name range includes the first domain name.

[0219] For example, the seventh processing rule includes the action of reporting. Exemplarily, the seventh processing rule may adopt the following format:

[0220] Optionally, before the second network element receives the second query message from the first network element, the communication method 200 further includes: the second network element receives the seventh processing rule from the second session management network element, and correspondingly, the second session management network element sends the seventh processing rule to the second network element.

[0221] The eighth processing rule includes: a tunnel is used to indicate the address of the terminal device corresponding to the first processing rule. Alternatively, the eighth processing rule includes an action indication: a tunnel is used to indicate the address of the terminal device corresponding to the first processing rule.

[0222] Optionally, the eighth processing rule matches the second query message, that is, the source address information included in the eighth processing rule indicates the address of the first network element or is a wildcard, and the domain name range included in the eighth processing rule includes the first domain name. After receiving the eighth processing rule from the second session management network element, the second network element confirms that the eighth processing rule matches the second query message, and then determines the first processing rule based on the eighth processing rule and the tunnel through which the second query message is received.

[0223] Exemplarily, the eighth processing rule may adopt the following format:

[0224] Optionally, the second network element sends a first message to the second session management network element, the first message including a first domain name and first identification information, wherein the first identification information is used to indicate the second query message. Correspondingly, the second session management network element receives the first message and sends a second message to the second network element based on the first domain name, the second message including an eighth processing rule and the first identification information. After receiving the second message, the second network element may confirm, based on the first identification information, that the eighth processing rule is used to process the second query message, and then, based on the eighth processing rule, determine the first processing rule according to the tunnel through which the second query message is received. In this manner, the eighth processing rule may not include source address information and domain name range. The second session management network element may be the SMF network element 132 in Figure 1 .

[0225] In method 2-3-3, the eighth processing rule received by the second network element from the second session management network element can be replaced by the second network element receiving the sixth indication information from the second session management network element, and the sixth indication information is used to indicate: the tunnel is used to indicate the address of the terminal device corresponding to the first processing rule.

[0226] Method 2-3-4: The second network element determines the first processing rule based on the seventh indication information from the first network element and the tunnel through which the second query message is received, wherein the seventh indication information is used to indicate: the tunnel is used to indicate the address of the terminal device corresponding to the first processing rule.

[0227] For example, in step S220, the first network element sends the second query message and the seventh indication information to the second network element, and correspondingly, the second network element receives the second query message and the seventh indication information from the first network element. For another example, the second query message includes the seventh indication information. Exemplarily, the seventh indication information is one bit, and the value of the seventh indication information is a first value (such as "0"), then the indication tunnel is used to indicate the address of the terminal device corresponding to the first processing rule.

[0228] Then, based on the seventh indication information, the second network element determines the address of the terminal device according to the tunnel through which the second query message is received, and further determines that the source address information indicates the address of the terminal device and the processing rule that matches the first domain name is the first processing rule.

[0229] Optionally, the second query message includes first tunnel identification information, and the first tunnel identification information is used to indicate the tunnel between the first network element and the second network element, or the first tunnel identification information is used to indicate the port of the tunnel on the second network element side. In this case, the "tunnel is used to indicate the address of the terminal device corresponding to the first processing rule" in the above-mentioned methods 2-3-1 to 2-3-4 can be replaced with "the tunnel identification information is used to indicate the address of the terminal device corresponding to the first processing rule", and "the second network element determines the address of the terminal device according to the tunnel through which the second query message is received" can be replaced with "the second network element determines the address of the terminal device according to the first tunnel identification information in the second query message".

[0230] For example, the second network element stores the correspondence between the tunnel identification information and the address of the terminal device. The second network element receives the second query message through the tunnel and determines the address of the corresponding terminal device according to the first tunnel identification information in the second query message.

[0231] For example, the first tunnel identification information is assigned by the second network element to the tunnel. Based on the first tunnel identification information, the second network element can determine that the second query message was sent by the first network element through the tunnel. Further, based on the tunnel corresponding to a session of the terminal device, and the session of the terminal device corresponding to the address of the terminal device, the second network element can determine the address of the terminal device. In this example, before step S220, the communication method 200 also includes the following steps S223 to S226 (not shown in the figure).

[0232] S223. The second session management network element sends eighth indication information to the second network element. Correspondingly, the second network element receives the eighth indication information from the second session management network element, where the eighth indication information is used to instruct the second network element to allocate tunnel identification information for the tunnel.

[0233] S224. The second network element sends the first tunnel identification information to the second session management network element. Correspondingly, the second session management network element receives the first tunnel identification information from the second network element.

[0234] For example, the second network element allocates first tunnel identification information to the tunnel according to the eighth indication information, and sends the first tunnel identification information to the second session management network element.

[0235] S225. The second session management network element sends the first tunnel identification information to the first session management network element. Correspondingly, the first session management network element receives the first tunnel identification information from the second session management network element.

[0236] S226. The first session management network element sends the first tunnel identification information to the first network element. Correspondingly, the first network element receives the first tunnel identification information from the first session management network element.

[0237] Based on the above steps S223 to S226, the first network element obtains the first tunnel identification information, and then in step S220, sends a second query message including the first tunnel identification information to the second network element.

[0238] In another implementation (method 2-4), the source address information included in the first processing rule indicates a tunnel. The second network element determines, based on the tunnel through which the second query message is received, that the source address information indicates the tunnel and that the processing rule that matches the first domain name is the first processing rule. Exemplarily, the first processing rule may be in the following format:

[0239] Optionally, the second query message also includes the first tunnel identification information between the first network element and the second network element. For example, based on the above steps S223 to S226, the first network element obtains the first tunnel identification information, and then in step S220, sends a second query message including the first tunnel identification information to the second network element. In this case, the second network element can determine that the source address information indicates the first tunnel identification information and the processing rule that matches the first domain name is the first processing rule. Exemplarily, the first processing rule can adopt the following format:

[0240] After determining the first processing rule in the above manner, the second network element processes the second query message and obtains the server address according to the first processing rule, such as the actions included in the first processing rule. For example, the server address is received from a domain name system server, or the server address is determined based on information provided by the second session management network element. For specific implementation, please refer to the description of DNS processing rules above and will not be repeated here.

[0241] Optionally, the second network element stores a first context including at least one processing rule, the at least one processing rule including the first processing rule and also including a sixth processing rule or a seventh processing rule. After receiving the second query message and before searching for the processing rule, the second network element further determines that the first context matches the second query message.

[0242] For example, the first context includes the address of the first network element and the address of the terminal device, and the second network element confirms that the first context and the second query message match, including: the second network element confirms that the address of the first network element included in the first context is the same as the address of the first network element indicated by the source address information of the second query message, and the address of the terminal device included in the first context is the same as the address of the terminal device corresponding to the tunnel.

[0243] For example, the first context includes the address of the terminal device. The second network element does not find a matching context based on the address of the first network element indicated by the source address information of the second query message, and then determines that the first context matches the second query message based on the fact that the address of the terminal device corresponding to the tunnel is the same as the address of the terminal device included in the first context.

[0244] After confirming that the first context and the second query message match, the second network element can search for a matching processing rule from the processing rules included in the first context according to the above methods 2-3-1 to 2-3-4.

[0245] S240. The second network element sends a second response to the second query message to the first network element. Correspondingly, the first network element receives the second response from the second network element, where the second response includes the address of the server.

[0246] For example, the second response is sent by the second network element to the first network element based on the address of the first network element. Based on this approach, before the second network element sends the second response to the first network element, the communication method 200 further includes: the second network element receiving the address of the first network element from the second session management network element, and correspondingly, the second session management network element sending the address of the first network element to the second network element.

[0247] For example, the first session management network element sends the address of the first network element to the second session management network element. In response, the second session management network element receives the address of the first network element from the first session management network element and sends the address of the first network element to the second network element. After receiving the address of the first network element, the second network element may send a second response to the first network element based on the address of the first network element in step S240.

[0248] In the case where the second query message is sent by the first network element to the second network element through a tunnel in format B, the second response is sent by the second network element to the first network element through the tunnel, and correspondingly, the first network element receives the second response from the second network element through the tunnel.

[0249] Optionally, the second response also includes second tunnel identification information, and the second tunnel identification information is used to indicate the tunnel between the first network element and the second network element, or the second tunnel identification information is used to indicate the port of the tunnel on the first network element side. For example, the second tunnel identification information is allocated by the first network element to the tunnel. The first network element can determine that the second response is sent by the second network element through the tunnel based on the second tunnel identification information. Further, based on the fact that the tunnel corresponds to a session of the terminal device, and the session of the terminal device corresponds to the address of the terminal device, the second network element can send the first response to the terminal device based on the address of the terminal device in step S250. In this example, before step S240, the communication method 200 also includes the following steps S241 to S244 (not shown in the figure).

[0250] S241. The first session management network element sends ninth indication information to the first network element. Correspondingly, the first network element receives ninth indication information from the first session management network element, wherein the ninth indication information is used to instruct the first network element to allocate tunnel identification information for the tunnel.

[0251] S242. The first network element sends second tunnel identification information to the first session management network element. Correspondingly, the first session management network element receives the second tunnel identification information from the first network element.

[0252] For example, the first network element allocates second tunnel identification information to the tunnel according to the ninth indication information, and sends the second tunnel identification information to the first session management network element.

[0253] S243. The first session management network element sends second tunnel identification information to the second session management network element. Correspondingly, the second session management network element receives the second tunnel identification information from the first session management network element.

[0254] S244. The second session management network element sends the second tunnel identification information to the second network element. Correspondingly, the second network element receives the second tunnel identification information from the second session management network element.

[0255] Based on the above steps S241 to S244, the second network element obtains the second tunnel identification information, and then in step S240, sends a second response including the second tunnel identification information to the first network element.

[0256] S250. The first network element sends a first response to the first query message to the terminal device. Correspondingly, the terminal device receives the first response from the first network element, wherein the first response includes the address of the server.

[0257] For example, after the first network element receives the second response, it determines that the second response is a response to the second query message, and the second query message is sent by the first network element to the second network element based on the first query message. Then the first network element sends the first response to the terminal device based on the source address information in the first query message.

[0258] Exemplarily, the first query message includes first identification information, and the first identification information is used to indicate the first query message. When the first network element sends a second query message to the second network element based on the first query message, the first identification information is carried in the second query message. The second response also includes the first identification information, indicating that the second response is a response to the second query message, so that the first network element can determine the first query message based on the first identification information in the second response and send the first response to the terminal device based on the source address information in the first query message.

[0259] For another example, when the second response is sent by the second network element to the first network element through a tunnel, the first network element may send the first response to the terminal device based on the tunnel through which the second response is received, or based on the second tunnel identifier included in the second response. Exemplarily, the first network element determines that the tunnel or the second tunnel identifier corresponds to a session with the terminal device, and that the session of the terminal device corresponds to the address of the terminal device, and then sends the first response to the terminal device based on the address of the terminal device.

[0260] Based on the above-described communication method 200, after receiving the first query message from the terminal device, the first network element sends a second query message including the address of the terminal device to the second network element, or sends the second query message to the second network element through a tunnel. The second network element can determine a first processing rule that matches the first domain name based on the address of the terminal device in the second query message, or based on the tunnel through which the second query message is transmitted, and obtain the address of the server based on the first processing rule, thereby providing the terminal device with the address of the server corresponding to the first domain name, so that the terminal device can use services provided by the server based on the address of the server.

[0261] Optionally, the communication method 200 further includes the following step S260 (not shown in the figure).

[0262] S260. The terminal device sends uplink data to the server according to the address of the server. Correspondingly, the server receives the uplink data from the terminal device, where the uplink data is related to the service corresponding to the first domain name.

[0263] For example, a terminal device sends uplink data to a server via an access network device, a first user-plane network element, and a local session anchor. Correspondingly, the server receives uplink data from the terminal device via the access network device, the first user-plane network element, and the local session anchor. For example, the terminal device can include the server's address in a data packet carrying the uplink data, so that the access network device, the first user-plane network element, and the local session anchor can correctly route the data packet to the server based on the server's address.

[0264] Based on the above method, the terminal device sends uplink data to the server according to the address of the server, thereby using the service corresponding to the first domain name to realize service data transmission between the terminal device and the server.

[0265] Optionally, the communication method 200 further includes the following steps S271 to S276 (not shown in the figure).

[0266] S271. The terminal device sends a third query message to the first network element. In response, the first network element receives the third query message from the terminal device. The third query message includes the second domain name and is used to query the address of a server that provides a service corresponding to the second domain name to the terminal device.

[0267] The specific implementation of step S271 can refer to step S220 and will not be repeated here.

[0268] S272: The first network element sends a fourth query message to the first domain name server. In response, the first domain name server receives the fourth query message from the first network element. The fourth query message includes the second domain name and is used to query the address of the server corresponding to the second domain name.

[0269] For example, after receiving the third query message, the first network element determines a ninth processing rule that matches the second domain name and corresponds to the terminal device, processes the third query message according to the ninth processing rule, and sends a fourth query message to the first domain name server. The ninth processing rule can match the second domain name by assuming that the second domain name falls within the range of domain names covered by the ninth processing rule; the ninth processing rule can correspond to the terminal device by assuming that the source address information in the ninth processing rule indicates the address of the terminal device. The specific implementation of the first network element processing the third query message according to the ninth processing rule can refer to the above description of the processing rules.

[0270] In this example, before the first network element receives the third query message from the terminal device, the communication method 200 also includes: the first session management network element sends the ninth processing rule to the first network element, and correspondingly, the first network element receives the ninth processing rule from the first session management network element.

[0271] S273: The first domain name server sends a fourth response to the fourth query message to the first network element. In response, the first network element receives the fourth response from the first domain name server. The fourth response includes an address of a second server, and the second server is configured to provide a service corresponding to the second domain name.

[0272] S274. The first network element sends a third response to the third query message to the terminal device. Correspondingly, the terminal device receives the third response from the first network element, where the third response includes the address of the second server.

[0273] For example, the first network element processes the fourth response according to the processing rules that match the fourth response (such as the processing rules that match the second domain name and / or the address of the second server) and sends the third response to the terminal device. For specific implementation, please refer to the above description of the processing rules.

[0274] S275. The terminal device sends uplink data to the second server according to the address of the second server. Correspondingly, the second server receives the uplink data from the terminal device, where the uplink data is related to the service corresponding to the second domain name.

[0275] S276. The terminal device receives downlink data from the second server. Correspondingly, the second server sends the downlink data to the terminal device, and the downlink data is related to the service corresponding to the second domain name.

[0276] Optionally, the communication method 200 further includes the following steps S281 to S286 (not shown in the figure).

[0277] S281: The second terminal device sends a fifth query message to the first network element. In response, the first network element receives the fifth query message from the second terminal device. The fifth query message includes the first domain name and is used to query the address of a server that provides a service corresponding to the first domain name to the second terminal device.

[0278] The specific implementation of step S281 can refer to step S220 and will not be repeated here.

[0279] S282: The first network element sends a sixth query message to the second domain name server. In response, the second domain name server receives the sixth query message from the first network element. The sixth query message includes the first domain name and is used to query the address of the server corresponding to the first domain name.

[0280] For example, after receiving the sixth query message, the first network element determines a tenth processing rule that matches the first domain name and corresponds to the second terminal device, processes the sixth query message according to the tenth processing rule, and sends the sixth query message to the second domain name server. The matching of the tenth processing rule with the first domain name may be that the first domain name falls within the domain name range covered by the tenth processing rule; the corresponding correspondence of the tenth processing rule with the second terminal device may be that the source address information in the tenth processing rule indicates the address of the second terminal device. The specific implementation of the first network element processing the sixth query message according to the tenth processing rule can refer to the above description of the processing rules.

[0281] In this example, before the first network element receives the fifth query message from the second terminal device, the communication method 200 also includes: the first session management network element sends the tenth processing rule to the first network element, and correspondingly, the first network element receives the tenth processing rule from the first session management network element.

[0282] S283. The first domain name server sends a sixth response to the sixth query message to the first network element. Correspondingly, the first network element receives the sixth response from the first domain name server. The sixth response includes the address of the third server, and the third server is used to provide the service corresponding to the first domain name.

[0283] S284. The first network element sends a fifth response to the fifth query message to the second terminal device. Correspondingly, the second terminal device receives the fifth response from the first network element, where the fifth response includes the address of the third server.

[0284] For example, the first network element processes the sixth response according to the processing rules that match the sixth response (such as the processing rules that match the first domain name and / or the address of the third server) and sends the fifth response to the terminal device. For specific implementation, please refer to the above description of the processing rules.

[0285] S285. The second terminal device sends uplink data to the third server according to the address of the third server. Correspondingly, the third server receives the uplink data from the second terminal device, where the uplink data is related to the service corresponding to the first domain name.

[0286] S286. The second terminal device receives downlink data from the third server. Correspondingly, the third server sends the downlink data to the second terminal device. The downlink data is related to the service corresponding to the first domain name.

[0287] Based on the above method, after receiving a query message, the first network element can process the query message according to a processing rule that matches the domain name in the query message and corresponds to the terminal device sending the query message, thereby obtaining the server address from the domain name server. During this process, the query message sent by the terminal device reaches the first network element via the first user plane network element and the local session anchor point. The first network element processes the query message and obtains the server address. In the prior art, query messages sent by the terminal device must be transmitted via the first user plane network element and the session anchor point to the second network element for processing. On the one hand, because the local session anchor point is typically deployed close to the terminal device and the distance between the session anchor point and the terminal device is relatively long, the method provided in the embodiments of the present application can shorten the query message transmission path, reduce end-to-end latency, and promptly provide the server address to the terminal device. On the other hand, the number of query messages transmitted by the session anchor point and the number of query messages processed by the second network element and the second session management network element are reduced, which helps reduce the load on the session anchor point, the second network element, and the second session management network element.

[0288] FIG4 is a flow chart of a communication method 300 provided in an embodiment of the present application. A possible implementation of the communication method 200 is described by taking the first network element as an I-EASDF network element 134-1, the second network element as an EASDF network element 134, the first session management network element as an I-SMF network element 132-1, and the second session management network element as an SMF network element 132 as an example. As shown in FIG4 , the communication method 300 can be executed by an I-EASDF network element, an EASDF network element, an I-SMF network element, and an SMF network element, or by modules and / or devices (e.g., chips or integrated circuits, etc.) with corresponding functions installed in the I-EASDF network element, the EASDF network element, the I-SMF network element, and the SMF network element, but this application does not limit this. For ease of description, the following description is based on the I-EASDF network element, the EASDF network element, the I-SMF network element, and the SMF network element as the execution entities. For parts not fully described, reference can be made to existing protocols and the above description of the communication method 200.

[0289] S301. The AMF network element sends a request message 1 to the I-SMF network element. Correspondingly, the I-SMF network element receives the request message 1 from the AMF network element.

[0290] Among them, the AMF network element can be the AMF network element 131 in Figure 1, and the request message 1 is used to request the establishment of a session management (SM) context. For example, the request message 1 can be an Nsmf_PDUSession_CreateSMContext Request message.

[0291] One possible scenario (recorded as scenario 1) is that during the establishment of a session of a terminal device, when the SMF network element cannot serve the session of the terminal device, the AMF network element selects the I-SMF network element and sends a request message 1 to the I-SMF network element. Another possible scenario (recorded as scenario 2) is that during the establishment of a session of a terminal device, the AMF network element selects the SMF network element to provide services for the session of the terminal device. When the terminal device moves out of the service range of the SMF network element, the AMF network element selects the I-SMF network element and sends a request message 1 to the I-SMF network element. The specific implementation can refer to the existing protocol and will not be repeated here. Among them, the session of the terminal device can be a protocol data unit (PDU) session.

[0292] Request message 1 includes the address information of the SMF network element, which is used to send messages to the SMF network element.

[0293] Optionally, the request message 1 also includes an SM context identifier, which is used to indicate the SM context corresponding to the session of the terminal device stored in the SMF network element. That is, the SMF network element can find the SM context corresponding to the session of the terminal device from the locally stored SM context according to the SM context identifier. For example, in case 2, the SMF network element establishes the SM context corresponding to the session during the establishment of the session of the terminal device, allocates the SM context identifier to the SM context corresponding to the session, and sends the SM context identifier to the AMF network element.

[0294] S302. The I-SMF network element sends a request message 2 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives the request message 2 from the I-SMF network element.

[0295] The request message 2 is used to request the establishment of a DNS context for the session of the terminal device. Optionally, the request message 2 is a Neasdf_DNSContext_Create request message.

[0296] Request message 2 may include the address of the terminal device, which may be an IP address corresponding to the session of the terminal device. For example, in case 2, before the I-SMF network element sends request message 2 to the I-EASDF network element, the communication method 300 further includes: the I-SMF network element obtains the SM context corresponding to the session of the terminal device from the SMF network element, and the SM context includes the address of the terminal device. Exemplarily, the communication method 300 further includes the following steps S302-a and S302-b (not shown in the figure).

[0297] S302-a. The I-SMF network element sends a request message 3 to the SMF network element according to the address information of the SMF network element. Correspondingly, the SMF network element receives the request message 3 from the I-SMF network element.

[0298] The request message 3 is used to request the SM context corresponding to the session of the terminal device. For example, the request message 3 may be an Nsmf_PDUSession_Context Request message.

[0299] Request message 3 includes the SM context identifier. For example, the I-SMF network element includes the SM context identifier in request message 1 in request message 3 and sends it to the SMF network element.

[0300] S302-b. The SMF network element sends the SM context to the I-SMF network element. Correspondingly, the I-SMF network element receives the SM context from the SMF network element.

[0301] For example, the SMF network element searches for the SM context corresponding to the session of the terminal device from the locally stored SM context according to the SM context identifier in the request message 3, and sends it to the I-SMF network element through the response message 3.

[0302] The SM context includes the address of the terminal device, and the I-SMF network element then includes the address of the terminal device in the request message 2 and sends it to the I-EASDF network element.

[0303] For example, when the I-SMF network element stores EAS deployment information (EDI) locally, it sends a request message 2 to the I-EASDF network element. The EDI corresponds to a specific part of the DN and is used to indicate how the edge service is deployed in the specific part of the DN. The EDI includes one or more FQDNs, each of which corresponds to a service supported (or capable of providing) by a server deployed in the specific part of the DN. The EDI stored locally in the I-SMF network element may be pre-configured in the I-SMF network element, or may be obtained by the I-SMF network element before receiving the request message 1. For example, the I-SMF network element may obtain EDI from the NEF network element. The specific implementation method may refer to the method for the SMF network element to obtain EDI in the existing protocol, which will not be repeated here. In the following, the EDI pre-configured in the I-SMF network element and the EDI obtained by the I-SMF network element are collectively referred to as the EDI in the I-SMF network element.

[0304] For another example, when the I-SMF network element has the EAS discovery capability or the I-SMF network element supports EAS discovery, it sends a request message 2 to the I-EASDF network element.

[0305] Optionally, the request message 2 also includes one or more DNS message processing rules, and the one or more DNS message processing rules correspond to the session of the terminal device. It can also be understood that the one or more DNS message processing rules are used to process DNS messages related to the session of the terminal device. Among them, the DNS message related to the session of the terminal device can be understood as the DNS query message sent by the terminal device through the session and the DNS response message corresponding to the DNS query message. Based on case 1, the source address information included in the one or more DNS message processing rules can be a wildcard. Based on case 2, the source address information included in the one or more DNS message processing rules indicates the address of the terminal device. For example, the I-SMF network element obtains the address of the terminal device according to steps S302-a and S302-b, and sets the source address information included in the one or more DNS message processing rules to the address of the terminal device.

[0306] The one or more DNS message processing rules may be determined based on the EDI in the I-SMF network element. When the I-SMF network element has the capability to discover EAS but does not store EDI locally, before the I-SMF network element sends the request message 2 to the I-EASDF network element, the communication method 300 further includes: the I-SMF network element obtains the EDI.

[0307] Optionally, the EDI in the I-SMF network element is related to the service scope of the I-SMF network element. For example, the service scope of the I-SMF network element corresponds to one or more data network access identifiers (DNAIs), that is, the service scope of the I-SMF network element can be indicated by one or more DNAIs, and the DNAI included in the EDI corresponds to the service scope of the I-SMF network element.

[0308] In this implementation, the I-SMF network element obtaining EDI includes: the I-SMF network element obtaining EDI related to the service scope of the I-SMF network element. Exemplarily, the I-SMF network element sends a subscription request message to the NEF network element, and the subscription request message includes at least one DNAI among the DNAIs corresponding to the service scope of the I-SMF network element, which is used to indicate that the I-SMF network element subscribes to the change notification of the EDI including the at least one DNAI. Accordingly, when the EDI including the at least one DNAI changes, the NEF network element sends the latest EDI to the I-SMF network element. The subscription request message can also instruct the NEF network element to immediately notify the current status of the EDI including the at least one DNAI. Accordingly, when the EDI including the at least one DNAI is available, the NEF network element immediately sends the EDI to the I-SMF network element.

[0309] Before the I-SMF network element sends the request message 2 to the I-EASDF network element, the communication method 300 may further include: the I-SMF network element selects the I-EASDF network element. The implementation method of the I-SMF network element selecting the I-EASDF network element can refer to the method of the SMF network element selecting the EASDF network element in the prior art, which will not be repeated here.

[0310] S303. The I-EASDF network element sends a response message 2 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 2 from the I-EASDF network element.

[0311] Response message 2 is a response to request message 2. Response message 2 includes the address of the I-EASDF network element, which is used to send messages to the I-EASDF network element. The address may be an IP address. Response message 2 may be a Neasdf_DNSContext_Create response message.

[0312] Response Message 2 may also include DNS context identification information, which indicates the DNS context established by the I-EASDF network element for the terminal device's session. Based on this identification information, the I-EASDF network element can uniquely determine the DNS context corresponding to the session from among multiple DNS contexts. For example, based on Request Message 2, the I-EASDF network element establishes a DNS context for the terminal device's session and assigns identification information to the DNS context. The DNS context includes information from Request Message 2, such as the terminal device's address and one or more DNS message processing rules.

[0313] S304. The I-SMF network element sends a request message 4 to the SMF network element. Correspondingly, the SMF network element receives the request message 4 from the I-SMF network element.

[0314] Request message 4 is used to request the establishment or update of a session of a terminal device. For example, in case 1, request message 4 is used to request the establishment of a session of a terminal device and also includes the address of the terminal device; in case 2, request message 4 is used to request the update of a session of a terminal device.

[0315] The request message 4 includes the address of the I-EASDF network element. For example, the I-SMF network element sends the address of the I-EASDF network element in the response message 2 to the SMF network element via the request message 4.

[0316] Optionally, the request message 4 also includes the FQDN included in the EDI in the I-SMF network element (hereinafter referred to as the local FQDN).

[0317] S305. The SMF network element sends a request message 5 to the EASDF network element. Correspondingly, the EASDF network element sends a request message 5 to the SMF network element.

[0318] In case 1, the request message 5 is used to request the establishment of a DNS context corresponding to the session of the terminal device, and the request message 5 includes the address of the I-EASDF network element.

[0319] The request message 5 includes any one of the following: instruction information 30, DNS processing rule 3A, or DNS processing rule 3B.

[0320] Instruction information 30 is used to indicate that, when no DNS processing rule corresponding to the source address information in the DNS query message exists, a DNS processing rule is determined based on the terminal device address in the ECS option; or, alternatively, instruction information 30 is used to indicate that the ECS option includes the terminal device address. The DNS processing rule corresponding to the source address information in the DNS query message means that the source address information included in the DNS processing rule indicates the source address information in the DNS query message.

[0321] The source address information included in the DNS processing rule 3A indicates the address of the I-EASDF network element, or the source address information in the DNS processing rule 3A is a wildcard. The DNS processing rule 3A further includes: determining the DNS processing rule based on the address of the terminal device in the ECS option; or the DNS processing rule 3A further includes: the ECS option includes the address of the terminal device.

[0322] The source address information included in the DNS processing rule 3B indicates the address of the I-EASDF network element, or the source address information of the DNS processing rule 3B is a wildcard. The DNS processing rule 3B also includes: sending the domain name in the DNS message to the SMF network element, for example, the action included in the DNS processing rule 3B is reporting.

[0323] The indication information 30, DNS processing rule 3A, and DNS processing rule 3B are similar to the second indication information, the third processing rule, and the fourth processing rule in the communication method 200, respectively. For details not described in detail, please refer to the above description.

[0324] Alternatively, the request message 5 includes a DNS processing rule 3C, wherein the source address information included in the DNS processing rule 3C indicates the address of the I-EASDF network element, and the DNS processing rule 3C further includes: an ECS option including the address of the terminal device. That is, the DNS processing rule 3C is used to process a DNS query message that meets the following conditions: (1) the source address information indicates the address of the I-EASDF network element; (2) the FQDN falls within the FQDN range; and (3) the ECS option includes the address of the terminal device.

[0325] DNS processing rule 3C also includes an action corresponding to each FQDN in the FQDN range. For a DNS query message that meets the above conditions, the EASDF network element can process the DNS query message according to the action corresponding to the FQDN in the DNS query message.

[0326] Exemplarily, the DNS processing rule 3C may adopt the following format (where k is a positive integer):

[0327] Optionally, the request message 5 further includes one or more DNS processing rules, where the source address information of the one or more DNS processing rules indicates the address of the terminal device. Exemplarily, the one or more DNS processing rules may adopt the following format:

[0328] The one or more DNS processing rules are generated based on the EDI in the SMF network element. The EDI in the SMF network element may be pre-configured in the SMF network element or obtained by the SMF network element from the NEF network element. Hereinafter, the FQDN included in the EDI in the SMF network element is referred to as the central FQDN. The FQDN in the one or more DNS processing rules belongs to the central FQDN.

[0329] Optionally, the FQDN in the one or more DNS processing rules does not belong to the local FQDN. For example, when the request message 4 includes the local FQDN, the SMF network element generates the one or more DNS processing rules based on the difference between the central FQDN and the local FQDN, that is, the FQDN remaining after the central FQDN is removed from the local FQDN.

[0330] It should be understood that when the central FQDN is the same as the local FQDN, the SMF network element sends a response message 4 to the I-SMF network element for the request message 4. The response message 4 is used to indicate that the session of the terminal device is successfully established, and steps S305 to S309 can be skipped.

[0331] In case 2, during the establishment of the terminal device's session, the SMF network element sends one or more DNS processing rules to the EASDF network element. The one or more DNS processing rules correspond to the terminal device's session, that is, are used to process DNS messages related to the terminal device's session. The source address information included in the one or more DNS processing rules indicates the address of the terminal device. The EASDF network element establishes a DNS context corresponding to the terminal device's session, and the one or more DNS processing rules are stored in the DNS context.

[0332] Request message 5 is used to request an update of the DNS context corresponding to the session of the terminal device. Request message 5 includes the address of the I-EASDF network element. Request message 5 also includes any one of the following: indication information 30, DNS processing rule 3A, DNS processing rule 3B, or DNS processing rule 3C.

[0333] When request message 4 includes the local FQDN, request message 5 also includes the local FQDN, request message 5 can be used to instruct the EASDF network element to delete the local FQDN included in the DNS processing rule corresponding to the session of the terminal device. Alternatively, request message 5 includes the difference between the central FQDN and the local FQDN.

[0334] When the central FQDN is the same as the local FQDN, that is, the difference set between the central FQDN and the local FQDN is an empty set, the SMF network element sends a response message 4 to the I-SMF network element for the request message 4. The response message 4 is used to indicate that the session update of the terminal device is successful, and steps S305 to S309 can be skipped. In this case, the SMF network element can also instruct the EASDF network element to delete the DNS context corresponding to the session of the terminal device.

[0335] S306. The EASDF network element sends a response message 5 to the SMF network element. Correspondingly, the SMF network element receives the response message 5 from the EASDF network element.

[0336] The response message 5 is a response to the request message 5, and the response message 5 includes the address of the EASDF network element.

[0337] For example, in case 1, the EASDF network element establishes a DNS context corresponding to the session of the terminal device according to the request message 5, and the DNS context includes one or more DNS processing rules in the request message 5.

[0338] For another example, in case 2, the EASDF network element modifies the DNS context corresponding to the terminal device's session according to request message 5. For example, when request message 5 includes a local FQDN, the EASDF network element deletes the local FQDN included in the DNS processing rule corresponding to the terminal device's session; or, when request message 5 includes a difference set between the central FQDN and the local FQDN, the EASDF network element retains the FQDNs in the DNS processing rule corresponding to the terminal device's session that belong to the difference set and deletes the remaining FQDNs.

[0339] S307. The SMF network element sends a response message 4 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 4 from the SMF network element.

[0340] Response message 4 is a response to request message 4, and includes the address of the EASDF network element. Optionally, in case 1, response message 4 also includes the address of the terminal device, and the address of the terminal device corresponds to the session.

[0341] S308. The I-SMF network element sends message 6 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives message 6 from the I-SMF network element.

[0342] In one implementation (method 3-1), message 6 includes indication information 31, which is used to indicate: for a DNS query message related to a session with a terminal device, if there is no DNS processing rule that matches the FQDN in the DNS query message, then an ECS option is constructed based on the address of the terminal device, and the DNS query message including the ECS option is forwarded to the EASDF network element. Optionally, message 6 includes indication information 31 and the address of the EASDF network element, or indication information 31 also includes the address of the EASDF network element.

[0343] In another implementation (method 3-2), message 6 includes a DNS processing rule 3D, wherein the source address information included in the DNS processing rule 3D indicates the address of the terminal device; the DNS processing rule 3D has the lowest priority, and the domain name included is a wildcard or empty, or the DNS processing rule 3D includes the condition: there is no DNS processing rule that matches the FQDN in the DNS query message; the DNS processing rule 3D also includes the following actions: build an ECS option based on the address of the terminal device, and forward the DNS query message including the ECS option to the EASDF network element. Optionally, the DNS processing rule 3D also includes the address of the EASDF network element, or the message 6 includes the DNS processing rule 3D and the address of the EASDF network element. Exemplarily, the DNS processing rule 3D can adopt the following format:

[0344] It should be noted that the priority of DNS processing rule 3D is lower than other DNS processing rules in the DNS context corresponding to the session.

[0345] The indication information 31 and the DNS processing rule 3D are similar to the first indication message and the processing rule 2A in the communication method 200 respectively. For any details not explained in detail, please refer to the above description.

[0346] Optionally, in case 1, message 6 also includes the address of the terminal device, such as the I-SMF sends the address of the terminal device in the response message 4 to the I-EASDF network element through message 6.

[0347] S309. The I-EASDF network element sends a response message 6 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 6 from the I-EASDF network element.

[0348] The response message 6 is a response to the message 6. For example, when the message 6 is used to request the update of the DNS processing rule, the response message 6 can be used to indicate that the DNS processing rule update is successful. Step S309 is optional.

[0349] When the message 6 includes the DNS processing rule 3D, the I-EASDF network element may save the DNS processing rule 3D to the DNS context corresponding to the session of the terminal device.

[0350] When message 6 includes the address of the terminal device, the I-EASDF network element may modify the source address information of the DNS processing rule in the DNS context corresponding to the session of the terminal device from a wildcard to the address of the terminal device.

[0351] S310. The I-SMF network element sends the address of the I-EASDF network element to the terminal device. Correspondingly, the terminal device receives the address of the I-EASDF network element from the I-SMF network element.

[0352] The terminal device uses the I-EASDF network element as the DNS server corresponding to the session of the terminal device.

[0353] S311. The terminal device sends a DNS query message 1 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives the DNS query message 1 from the terminal device.

[0354] The source address information in the DNS query message 1 indicates the address of the terminal device. The DNS query message 1 includes the FQDN 1. The DNS query message 1 is used to query the address of the server that provides the terminal device with the service corresponding to the FQDN 1. For example, the terminal device sends the DNS query message 1 to the I-EASDF network element through the (R)AN, UL CL / BP, and L-PSA.

[0355] It should be noted that step S311 and step S310 may not be consecutive. After receiving the address of the I-EASDF network element in step S310, the terminal device may wait until it needs to access the service before executing step S311.

[0356] S312. The I-EASDF network element sends a DNS query message 2 to the EASDF network element according to the DNS query message 1. Correspondingly, the EASDF network element receives the DNS query message 2 from the I-EASDF network element.

[0357] The source address information of the DNS query message 2 indicates the address of the I-EASDF network element, the target address information indicates the address of the EASDF network element, the DNS query message 2 includes the FQDN 1, and the ECS option in the DNS query message 2 includes the address of the terminal device.

[0358] For example, based on method 3-1, after the I-EASDF network element receives the DNS query message 1, it searches for the DNS processing rule that matches the DNS query message 1 from the DNS context corresponding to the session of the terminal device, that is, it searches for the DNS processing rule 3E whose source address information indicates the address of the terminal device and the FQDN range includes FQDN 1.

[0359] When DNS processing rule 3E exists in the DNS context, the I-EASDF network element processes the DNS query message 1 according to the actions included in the DNS processing rule 3E, thereby obtaining the address of the server and sending the address of the server to the terminal device. The specific implementation can refer to the existing protocol. In this case, step S312 and subsequent steps can be skipped.

[0360] When DNS processing rule 3E does not exist, the I-EASDF network element constructs an ECS option using the terminal device's address according to indication information 31, i.e., includes the terminal device's address in the ECS option, and adds the ECS option to DNS query message 1 to obtain DNS query message 2. Alternatively, the ECS option is used to replace the ECS option in DNS query message 1 to obtain DNS query message 2, and then sends DNS query message 2 to the EASDF network element. In this implementation, the source address information of DNS query message 2 indicates the address of the I-EASDF network element, DNS query message 2 includes FQDN 1, and the ECS option of DNS query message 2 includes the terminal device's address.

[0361] For another example, based on method 3-2, after the I-EASDF network element receives the DNS query message 1, it checks in order from high to low priority of the DNS processing rules whether the DNS processing rules in the DNS context corresponding to the session match the DNS query message 1. When the I-EASDF network element checks the DNS processing rule 3D, the source address information included in the DNS processing rule 3D is the same as the source address information in the DNS query message 1, and the FQDN 1 in the DNS query message 1 meets the condition: there is no DNS processing rule that matches the FQDN, the I-EASDF network element confirms that the DNS processing rule 3D matches the DNS query message 1. Then, the I-EASDF network element sends a DNS query message 2 to the EASDF network element according to the action included in the DNS processing rule 3D. For the specific implementation, refer to the above method in which the I-EASDF network element sends the DNS query message 2 to the EASDF network element according to the indication information 31, which will not be repeated here.

[0362] It should be understood that DNS processing rule 3D has the lowest priority. If the DNS context includes DNS processing rule 3E, the I-EASDF network element will check DNS processing rule 4E before checking DNS processing rule 3D, and confirm that DNS processing rule 3E matches DNS query message 1, and then process DNS query message 1 according to the actions included in DNS processing rule 3E, so as to obtain the address of the server and send the address of the server to the terminal device. In this case, step S312 and subsequent steps can be skipped.

[0363] S313. The EASDF network element processes the DNS query message 2 to obtain the address of the EAS.

[0364] In one implementation (method 3-3), after receiving DNS query message 2, the EASDF network element searches for a DNS processing rule that matches DNS query message 2, that is, searches for a DNS processing rule whose source address information matches the address of the I-EASDF network element and whose FQDN range includes FQDN 1. If no DNS processing rule that matches DNS query message 2 is found, the EASDF network element obtains the address of the terminal device from the ECS option of DNS query message 2 according to indication information 30, and then searches for a DNS processing rule whose source address information indicates the address of the terminal device and whose FQDN range includes FQDN 1 (represented as DNS processing rule 3F).

[0365] In another implementation (method 3-4), after receiving DNS query message 2, the EASDF network element searches for a DNS processing rule whose source address information matches the address of the I-EASDF network element. The EASDF network element finds DNS processing rule 3A that meets this condition, obtains the terminal device address from the ECS option in DNS query message 2 according to DNS processing rule 3A, and then searches for DNS processing rule 3F.

[0366] In another implementation method (method 3-5), after receiving the DNS query message 2, the EASDF network element searches for the DNS processing rule whose source address information matches the address of the I-EASDF network element. The EASDF network element finds the DNS processing rule 3A that meets the condition, and sends the FQDN 1 to the SMF network element according to the DNS processing rule 3A. Then, the EASDF network element receives the DNS processing rule 3G or indication information 32 from the SMF network element. The DNS processing rule 3G or indication information 32 is used to indicate that the DNS processing rule is determined according to the address of the terminal device in the ECS option, or to indicate that the ECS option includes the address of the terminal device. The EASDF network element obtains the address of the terminal device from the ECS option of the DNS query message 2 according to the DNS processing rule 3G or indication information 32, and then searches for the DNS processing rule 3F. Among them, the DNS processing rule 3G or indication information 32 is similar to the fifth processing rule or the third indication information in the communication method 200, and can refer to the above description.

[0367] In another implementation method (method 3-6), in step S312, the I-EASDF network element also sends indication information 33 to the EASDF network element, where the indication information 33 is used to indicate that the DNS processing rule is determined according to the address of the terminal device in the ECS option, or to indicate that the ECS option includes the address of the terminal device.

[0368] The second network element obtains the address of the terminal device from the ECS option of the DNS query message 2 according to the instruction information 33, and then searches the DNS processing rule 3F. The instruction information 33 is similar to the fourth instruction information in the communication method 200, and can be referred to the above description.

[0369] In the above methods 3-3 to 3-6, if the EASDF network element finds the DNS processing rule 3F, it processes the DNS query message 2 according to the DNS processing rule 3F to obtain the address of the EAS; if the DNS processing rule 3F is not found, the address of the EAS is obtained from the default DNS server. The specific implementation can refer to the existing protocol and will not be repeated here.

[0370] S314. The EASDF network element sends a DNS response message 2 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives the DNS response message 2 from the EASDF network element.

[0371] The DNS response message 2 is a response to the DNS query message 2, and the DNS response message 2 includes the address of the EAS.

[0372] For example, in step S313, the EASDF network element sends DNS query message 3 to the DNS server according to DNS processing rule 3F. Subsequently, the EASDF network element receives DNS response message 3 from the DNS server, which includes the EAS address. The EASDF network element searches for a DNS processing rule that matches DNS response message 3, processes DNS response message 3 according to the DNS processing rule (for specific implementation, refer to existing protocols), and sends DNS response message 2 to the I-EASDF network element. DNS response message 2 and DNS response message 3 can be the same, or DNS response message 2 can be the result of processing DNS response message 3.

[0373] S315. The I-EASDF network element sends a DNS response message 1 to the terminal device. Correspondingly, the terminal device receives the DNS response message 1 from the I-EASDF network element.

[0374] The DNS response message 1 is a response to the DNS query message 1, and the DNS response message 1 includes the address of the EAS.

[0375] For example, the I-EASDF network element determines the address of the terminal device based on the DNS response message 1, and then sends the DNS response message 1 to the terminal device based on the address of the terminal device. Exemplarily, the DNS query message 1 includes an identifier, which is used to indicate the DNS query message 1. The DNS query message 2, the DNS response message 2, and the DNS response message 1 all include the identifier. The I-EASDF network element can determine that the DNS response message 1 is a response to the DNS query message 1 based on the identifier, and determine the address of the terminal device based on the source address information of the DNS query message 1.

[0376] Optionally, the communication method 300 further includes the following step S316.

[0377] S316. The terminal device sends uplink service data to the EAS according to the EAS address. Correspondingly, the EAS receives the uplink service data from the terminal device.

[0378] The uplink service data is the uplink data of the service corresponding to FQDN 1, that is, the terminal device can send service data to the EAS according to the address of the EAS, thereby accessing the EAS and using the service corresponding to FQDN 1.

[0379] For example, the terminal device sends service data to the EAS via the (R)AN 120, the UPF network element 133-2 and the UPF network element 133-1. Correspondingly, the EAS receives service data from the terminal device via the (R)AN 120, the UPF network element 133-2 and the UPF network element 133-1.

[0380] Based on the above method, the I-SMF network element selects the I-EASDF network element to provide EAS discovery service for the terminal device. After receiving the DNS query message 1 from the terminal device, the I-EASDF network element sends a DNS query message 2 to the EASDF network element, and includes the address of the terminal device in the ECS option of the DNS query message 2. In this way, the EASDF network element can accurately find the DNS processing rules according to the address of the terminal device included in the ECS option to specifically process the DNS query message 2, thereby providing the terminal device with the address of the server, and the terminal device can then use the services provided by the server according to the address.

[0381] In addition, if the I-EASDF network element finds a processing rule that matches the DNS query message 1, it can directly process the DNS query message 1 according to the processing rule to obtain the server address. There is no need to send the DNS query message 2 to the EASDF network element. The EAS address can be provided to the terminal device in a timely manner, thereby improving the response efficiency. In contrast, in the prior art, the DNS query messages sent by the terminal device need to be forwarded to the EASDF network element via the PSA. Since the PSA and EASDF network elements are usually deployed at a location far away from the terminal device, this will cause the transmission path of the DNS query message to be circuitous and the response delay to be too large. Furthermore, the I-EASDF network element and the I-SMF network element can process at least part of the DNS messages related to the terminal device. The number of DNS messages that the PSA needs to transmit and the number of DNS messages that the SMF network element and the EASDF network element need to process are reduced, which can reduce the load on the PSA, SMF network element and EASDF network element.

[0382] FIG5 is a flow chart of a communication method 400 provided in an embodiment of the present application. Taking the first network element as an I-EASDF network element 134-1, the second network element as an EASDF network element 134, the first session management network element as an I-SMF network element 132-1, and the second session management network element as an SMF network element 132 as an example, another possible implementation of the communication method 200 is described. As shown in FIG5 , the communication method 400 can be executed by an I-EASDF network element, an EASDF network element, an I-SMF network element, and an SMF network element, or by modules and / or devices (e.g., chips or integrated circuits, etc.) with corresponding functions installed in the I-EASDF network element, the EASDF network element, the I-SMF network element, and the SMF network element, but this application does not limit this. For ease of description, the following description is based on the I-EASDF network element, the EASDF network element, the I-SMF network element, and the SMF network element as the execution entities. For parts not fully described, reference can be made to existing protocols and the above description of the communication method 200.

[0383] S401. The AMF network element sends a request message 1 to the I-SMF network element. Correspondingly, the I-SMF network element receives the request message 1 from the AMF network element.

[0384] The request message 1 is used to request the establishment of a session management (SM) context.

[0385] S402. The I-SMF network element sends a request message 2 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives the request message 2 from the I-SMF network element.

[0386] Request message 2 is used to request the establishment of a DNS context for the session of the terminal device.

[0387] Optionally, request message 2 includes indication information 40. Indication information 40 is used to instruct the I-EASDF network element to allocate tunnel identification information for a tunnel between the I-EASDF network element and the EASDF network element. The tunnel is used to transmit DNS messages related to the session of the terminal device. That is, the tunnel corresponds to the session of the terminal device. Indication information 40 can also be used to instruct the I-EASDF network element to allocate tunnel identification information for the session of the terminal device.

[0388] S403. The I-EASDF network element sends a response message 2 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 2 from the I-EASDF network element.

[0389] The response message 2 is a response to the request message 2. For example, the response message 2 may be used to indicate that the DNS context establishment is complete.

[0390] Optionally, the response message 2 includes the tunnel identification information 1 assigned by the I-EASDF network element to the tunnel. The tunnel identification information 1 is used to indicate the tunnel, or in other words, the tunnel identification information 1 is used to indicate the port of the tunnel on the I-EASDF network element side. The tunnel identification information 1 can also be used to indicate the session of the terminal device. For example, the I-EASDF network element assigns tunnel identification information 1 to the tunnel according to the indication information 40, and sends the tunnel identification information 1 to the I-SMF network element through the response message 2. When other network elements send a DNS message to the I-EASDF network element, the tunnel identification information 1 is included in the DNS message, so that the I-EASDF network element can uniquely determine the session of the terminal device based on the tunnel identification information 1, that is, determine that the DNS message is related to the session of the terminal device.

[0391] S404. The I-SMF network element sends a request message 4 to the SMF network element. Correspondingly, the SMF network element receives the request message 4 from the I-SMF network element.

[0392] The request message 4 is used to request to establish or update a session of the terminal device. Optionally, the request message 4 includes the tunnel identification information 1.

[0393] Steps S401 to S404 are similar to steps S301 to S304 , and for parts not fully described, reference may be made to the above description.

[0394] S405. The SMF network element sends a request message 5 to the EASDF network element. Correspondingly, the EASDF network element sends a request message 5 to the SMF network element.

[0395] In case 1, the request message 5 is used to request the establishment of a DNS context corresponding to the session of the terminal device, and the request message 5 includes the address of the I-EASDF network element. Optionally, the request message 5 also includes tunnel identification information 1.

[0396] The request message 5 also includes indication information 41, which is used to instruct the EASDF network element to allocate tunnel identification information for the tunnel. Instruction information 41 can also be used to instruct the EASDF network element to allocate tunnel identification information for the session of the terminal device. For example, indication information 41 can be the eighth indication information in the communication method 200.

[0397] The request message 5 further includes any one of the following: instruction information 42, DNS processing rule 4A, or DNS processing rule 4B.

[0398] Indication information 42 is used to indicate that when no DNS processing rule corresponding to the source address information in the DNS query message exists, a DNS processing rule is determined based on the tunnel through which the DNS query message is received. Indication information 42 can also be used to indicate that when no DNS processing rule corresponding to the source address information in the DNS query message exists, a DNS processing rule is determined based on the tunnel identification information in the DNS query message. The DNS processing rule corresponding to the source address information in the DNS query message is the source address information included in the DNS processing rule indicating the source address information in the DNS query message.

[0399] Among them, the source address information included in the DNS processing rule 4A indicates the address of the I-EASDF network element, or the source address information of the DNS processing rule 4A is a wildcard; the DNS processing rule 4A also indicates: determine the DNS processing rule for processing the DNS query message according to the address of the terminal device corresponding to the tunnel or tunnel identifier.

[0400] The source address information included in the DNS processing rule 4B indicates the address of the I-EASDF network element, or the source address information of the DNS processing rule 4B is a wildcard. The DNS processing rule 4B further indicates: sending the domain name in the DNS message to the SMF network element, for example, the action included in the DNS processing rule 4B is reporting.

[0401] The indication information 42 , the DNS processing rule 4A, and the DNS processing rule 4B are similar to the fifth indication information, the sixth processing rule, and the seventh processing rule in the communication method 200 , respectively. For details not described in detail, please refer to the above description.

[0402] Optionally, the request message 5 also includes one or more DNS processing rules, where the source address information of the one or more DNS processing rules indicates the address of the terminal device. For example, the one or more DNS processing rules are generated based on the EDI in the SMF network element. Optionally, the FQDN in the one or more DNS processing rules does not belong to the local FQDN. For a detailed description of the one or more DNS processing rules, please refer to the description of the communication method 200.

[0403] It should be understood that when the central FQDN is the same as the local FQDN, the SMF network element sends a response message 4 to the I-SMF network element for the request message 4. The response message 4 is used to indicate that the session of the terminal device is successfully established, and steps S405 to S409 can be skipped.

[0404] In case 2, during the establishment of the terminal device's session, the SMF network element sends one or more DNS processing rules to the EASDF network element. The one or more DNS processing rules correspond to the terminal device's session, that is, are used to process DNS messages related to the terminal device's session. The source address information included in the one or more DNS processing rules indicates the address of the terminal device. The EASDF network element establishes a DNS context corresponding to the terminal device's session, and the one or more DNS processing rules are stored in the DNS context.

[0405] Request message 5 is used to request an update of the DNS context corresponding to the session of the terminal device. Request message 5 includes the address of the I-EASDF network element and indication information 41. Request message 5 also includes any of the following: indication information 42, DNS processing rule 4A, and DNS processing rule 4B. Optionally, request message 5 also includes tunnel identification information 1.

[0406] When request message 4 includes the local FQDN, request message 5 also includes the local FQDN, request message 5 can be used to instruct the EASDF network element to delete the local FQDN included in the DNS processing rule corresponding to the session of the terminal device. Alternatively, request message 5 includes the difference between the central FQDN and the local FQDN.

[0407] When the central FQDN is the same as the local FQDN, that is, the difference set between the central FQDN and the local FQDN is an empty set, the SMF network element sends a response message 4 to the I-SMF network element for the request message 4. The response message 4 is used to indicate that the session update of the terminal device is successful, and steps S405 to S409 can be skipped. In this case, the SMF network element can also instruct the EASDF network element to delete the DNS context corresponding to the session of the terminal device.

[0408] S406. The EASDF network element sends a response message 5 to the SMF network element. Correspondingly, the SMF network element receives the response message 5 from the EASDF network element.

[0409] The response message 5 is a response to the request message 5, and the response message 5 includes the address of the EASDF network element.

[0410] The response message 5 also includes tunnel identification information 2, which is used to indicate the tunnel. In other words, the tunnel identification information 2 is used to indicate the port of the tunnel on the EASDF network element side. The tunnel identification information 2 can also be used to indicate the session of the terminal device. For example, the EASDF network element allocates tunnel identification information 2 to the tunnel based on the indication information 41 and sends the tunnel identification information 2 to the SMF network element via the response message 5. When other network elements send a DNS message to the EASDF network element, the tunnel identification information 2 is included in the DNS message, so that the EASDF network element can uniquely determine the session of the terminal device based on the tunnel identification information 2, that is, determine that the DNS message is related to the session of the terminal device.

[0411] S407. The SMF network element sends a response message 4 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 4 from the SMF network element.

[0412] The response message 4 is a response to the request message 4 , and the response message 4 includes the address of the EASDF network element and the tunnel identification information 2 .

[0413] Optionally, the communication method 400 further includes: the SMF network element sending the DNS processing rule 4C to the EASDF network element. In this implementation, the request message 5 may not include any of the following: indication information 42, DNS processing rule 4A, and DNS processing rule 4B.

[0414] The source address information included in the DNS processing rule 4C indicates a tunnel. For example, the source address information included in the DNS processing rule 4C indicates tunnel identification information 2 .

[0415] For example, the DNS processing rule 4C may adopt the following format:

[0416] S408. The I-SMF network element sends message 6 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives message 6 from the I-SMF network element.

[0417] In one implementation (method 4-1), message 6 includes indication information 43, which is used to indicate: for a DNS query message related to a session with a terminal device, if there is no DNS processing rule that matches the FQDN in the DNS query message, then forward the DNS query message to the EASDF network element through the tunnel corresponding to the session with the terminal device. Optionally, message 6 includes indication information 43 and the address of the EASDF network element, or indication information 43 also includes the address of the EASDF network element.

[0418] In another implementation (method 4-2), message 6 includes DNS processing rule 4D. The source address information included in DNS processing rule 4D indicates the address of the terminal device; DNS processing rule 4D has the lowest priority, and the domain name information included is a wildcard or empty, or DNS processing rule 4D includes the condition: there is no DNS processing rule that matches the FQDN in the DNS query message; DNS processing rule 4D also includes the following action: forwarding the DNS query message to the EASDF network element through the tunnel corresponding to the session with the terminal device. Optionally, DNS processing rule 4D also includes the address of the EASDF network element, or DNS processing rule 4D also includes the address of the EASDF network element and tunnel identification information 2, or message 6 includes DNS processing rule 4D and the address of the EASDF network element, or message 6 includes DNS processing rule 4D, the address of the EASDF network element and tunnel identification information 2. Exemplarily, DNS processing rule 4D can adopt the following format:

[0419] It should be noted that the priority of DNS processing rule 4D is lower than other DNS processing rules in the DNS context corresponding to the session.

[0420] The indication information 43 and the DNS processing rule 4D are similar to the first indication message and the processing rule 2A in the communication method 200 respectively. For any details not explained in detail, please refer to the above description.

[0421] S409. The I-EASDF network element sends a response message 6 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 6 from the I-EASDF network element.

[0422] The response message 6 is a response to the message 6. For example, when the message 6 is used to request the update of the DNS processing rule, the response message 6 can be used to indicate that the DNS processing rule update is successful. Step S409 is optional.

[0423] When the message 6 includes the DNS processing rule 4D, the I-EASDF network element may save the DNS processing rule 4D into the DNS context corresponding to the session of the terminal device.

[0424] S410. The I-SMF network element sends the address of the I-EASDF network element to the terminal device. Correspondingly, the terminal device receives the address of the I-EASDF network element from the I-SMF network element.

[0425] The terminal device uses the I-EASDF network element as the DNS server corresponding to the session of the terminal device.

[0426] S411. The terminal device sends a DNS query message 1 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives the DNS query message 1 from the terminal device.

[0427] The source address information in the DNS query message 1 indicates the address of the terminal device. The DNS query message 1 includes the FQDN 1. The DNS query message 1 is used to query the address of the server that provides the terminal device with the service corresponding to the FQDN 1. For example, the terminal device sends the DNS query message 1 to the I-EASDF network element through the (R)AN, UL CL / BP, and L-PSA.

[0428] It should be noted that step S411 and step S410 may not be consecutive. After receiving the address of the I-EASDF network element in step S410, the terminal device may wait until it needs to access the service before executing step S411.

[0429] S412. The I-EASDF network element sends a DNS query message 2 to the EASDF network element through a tunnel corresponding to the session with the terminal device according to the DNS query message 1. Correspondingly, the EASDF network element receives the DNS query message 2 from the I-EASDF network element through the tunnel.

[0430] The source address information of the DNS query message 2 indicates the address of the I-EASDF network element, and the destination address information indicates the address of the EASDF network element. Optionally, the DNS query message 2 also includes tunnel identification information 2. For example, the DNS query message 2 may have a tunnel layer, which includes the tunnel identification information 2, such as the tunnel identification information allocated by the EASDF.

[0431] For example, based on method 4-1, after the I-EASDF network element receives the DNS query message 1, it searches for the DNS processing rule that matches the DNS query message 2 from the DNS context corresponding to the session of the terminal device, that is, it searches for the DNS processing rule 4E whose source address information indicates the address of the terminal device and the FQDN range includes FQDN 1.

[0432] When DNS processing rule 4E exists in the DNS context, the I-EASDF network element processes the DNS query message 1 according to the actions included in the DNS processing rule 4E, thereby obtaining the address of the server and sending the address of the server to the terminal device. The specific implementation can refer to the existing protocol. In this case, step S412 and subsequent steps can be skipped.

[0433] When the DNS processing rule 4E does not exist, the I-EASDF network element sends a DNS query message 2 to the EASDF network element through the tunnel corresponding to the session with the terminal device according to the instruction information 43.

[0434] For another example, based on method 4-2, after receiving DNS query message 1, the I-EASDF network element checks, in descending order of priority, whether the DNS processing rules in the DNS context corresponding to the session match DNS query message 1. When the I-EASDF network element detects DNS processing rule 4D, and the source address information included in the DNS processing rule is the same as the source address information in DNS query message 1, and FQDN 1 in DNS query message 1 meets the condition that there is no DNS processing rule matching the FQDN, the I-EASDF network element confirms that DNS processing rule 4D matches DNS query message 1, and then, based on the action included in DNS processing rule 4D, sends DNS query message 2 to the EASDF network element through the tunnel corresponding to the session with the terminal device. It should be understood that DNS processing rule 4D has the lowest priority. If the DNS context includes DNS processing rule 4E, the I-EASDF network element will check DNS processing rule 4E before checking DNS processing rule 4D, and confirm that DNS processing rule 4E matches DNS query message 1, and then process DNS query message 1 according to the actions included in DNS processing rule 4E, so as to obtain the address of the server and send the address of the server to the terminal device. In this case, step S412 and subsequent steps can be skipped.

[0435] S413. The EASDF network element processes the DNS query message 2 to obtain the address of EAS1.

[0436] In one implementation (method 4-3), after receiving DNS query message 2, the EASDF network element searches for a DNS processing rule that matches DNS query message 2, that is, searches for a DNS processing rule whose source address information matches the address of the I-EASDF network element and whose FQDN range includes FQDN 1. If no DNS processing rule that matches DNS query message 2 is found, the EASDF network element determines, based on indication information 42, that the tunnel through which DNS query message 2 is received corresponds to a session of the terminal device, or determines that tunnel identification information 2 included in DNS query message 2 corresponds to a session of the terminal device, and then searches for a DNS processing rule whose source address information indicates the address of the terminal device and whose FQDN range includes FQDN 1 (recorded as DNS processing rule 4F).

[0437] In another implementation (method 4-4), after receiving DNS query message 2, the EASDF network element searches for a DNS processing rule whose source address information matches the address of the I-EASDF network element. The EASDF network element finds DNS processing rule 4A that meets this condition, and determines based on DNS processing rule 4A that the tunnel through which DNS query message 2 is received corresponds to a session of the terminal device, or determines that tunnel identification information 2 included in DNS query message 2 corresponds to a session of the terminal device. It then searches for a DNS processing rule (referred to as DNS processing rule 4F) whose source address information indicates the address of the terminal device and whose FQDN range includes FQDN 1.

[0438] In another implementation method (method 4-5), after receiving the DNS query message 2, the EASDF network element searches for a DNS processing rule whose source address information matches the address of the I-EASDF network element. The EASDF network element finds the DNS processing rule 4B that meets the condition, and sends the FQDN 1 to the SMF network element according to the DNS processing rule 4B. Then, the EASDF network element receives the DNS processing rule 4G or indication information 44 from the SMF network element. The DNS processing rule 4G or indication information 44 is used to indicate the DNS processing rule for processing the DNS query message according to the address of the terminal device corresponding to the tunnel or tunnel identifier. Then, the EASDF network element determines that the tunnel through which the DNS query message 2 is received corresponds to the session of the terminal device, or determines that the tunnel identification information 2 included in the DNS query message 2 corresponds to the session of the terminal device, based on the DNS processing rule 4G or indication information 44, and then searches for the DNS processing rule 4F. Among them, the DNS processing rule 4G and indication information 44 are similar to the eighth processing rule and the sixth indication information in the communication method 200, respectively, and can refer to the above description.

[0439] In another implementation method (method 4-6), in step S412, the I-EASDF network element also sends indication information 45 to the EASDF network element, and the indication information 45 is used to indicate the DNS processing rules for processing the DNS query message based on the address of the terminal device corresponding to the tunnel or tunnel identifier.

[0440] Based on indication information 45, the EASDF network element determines that the tunnel through which DNS query message 2 is received corresponds to the session of the terminal device, or determines that tunnel identification information 2 included in DNS query message 2 corresponds to the session of the terminal device, and then searches DNS processing rule 4F. Indication information 45 is similar to the seventh indication information in communication method 200, and reference can be made to the description above.

[0441] In the above methods 4-3 to 4-6, if the EASDF network element finds the DNS processing rule 4F, it processes the DNS query message 2 according to the DNS processing rule 4F to obtain the address of EAS1; if the DNS processing rule 4F is not found, the address of EAS1 is obtained from the default DNS server. The specific implementation can refer to the existing protocol and will not be repeated here.

[0442] S414. The EASDF network element sends a DNS response message 2 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives the DNS response message 2 from the EASDF network element.

[0443] The DNS response message 2 is a response to the DNS query message 2, and the DNS response message 2 includes the address of EAS1.

[0444] S415. The I-EASDF network element sends a DNS response message 1 to the terminal device. Correspondingly, the terminal device receives the DNS response message 1 from the I-EASDF network element.

[0445] The DNS response message 1 is a response to the DNS query message 1, and the DNS response message 1 includes the address of the EAS 1.

[0446] For example, the I-EASDF network element determines the address of the terminal device according to the DNS response message 1, and then sends the DNS response message 1 to the terminal device according to the address of the terminal device.

[0447] In one example, DNS query message 1 includes identification information, which is used to indicate DNS query message 1. DNS query message 2, DNS response message 2 and DNS response message 1 all include the identification information. The I-EASDF network element can determine that DNS response message 1 is a response to DNS query message 1 based on the identification information, and determine the address of the terminal device based on the source address information of DNS query message 1.

[0448] In another example, the DNS response message 1 includes tunnel identification information 1. The I-EASDF network element can determine that the DNS response message 1 is related to the session of the terminal device based on the tunnel identification information 1, and then determine that the address corresponding to the session is the address of the terminal device.

[0449] Optionally, the communication method 400 further includes the following step S416.

[0450] S416. The terminal device sends uplink service data to EAS1 according to the address of EAS1. Correspondingly, EAS1 receives the uplink service data from the terminal device.

[0451] The uplink service data is uplink data of the service corresponding to FQDN 1, that is, the terminal device can send service data to EAS1 according to the address of EAS1, thereby accessing EAS1 and using the service corresponding to FQDN 1.

[0452] Steps S414 to S416 are similar to steps S314 to S316, and reference may be made to the above description, which will not be repeated here.

[0453] Based on the above method, the I-SMF network element selects the I-EASDF network element to provide EAS discovery service for the terminal device. After the I-EASDF network element receives the DNS query message 1 from the terminal device, it sends the DNS query message 2 to the EASDF network element through the tunnel. The EASDF network element can determine the address of the terminal device according to the tunnel, and then accurately find the DNS processing rules to process the DNS query message 2 in a targeted manner, so as to provide the terminal device with the address of the server, and the terminal device can then use the services provided by the server according to the address.

[0454] In addition, if the I-EASDF network element finds a processing rule that matches DNS query message 1, it can directly process DNS query message 1 according to the processing rule to obtain the server address, without sending DNS query message 2 to the EASDF network element. The EAS address can be provided to the terminal device in a timely manner, improving response efficiency. Furthermore, the I-EASDF network element and the I-SMF network element can process at least some DNS messages related to the terminal device, reducing the number of DNS messages that the PSA needs to transmit and the number of DNS messages that the SMF network element and the EASDF network element need to process, which can reduce the load on the PSA, SMF network element, and EASDF network element.

[0455] Figure 6 is a flow chart of another communication method 500 provided in an embodiment of the present application. As shown in Figure 6, the communication method 500 can be executed by a terminal device, a first network element, and a second network element, or can be executed by modules and / or devices (for example, chips or integrated circuits, etc.) with corresponding functions installed in the terminal device, the first network element, and the second network element, and this application is not limited. For the sake of convenience of description, the following description is based on the terminal device, the first network element, and the second network element as the execution subjects. The communication method 500 can be applied to the network architecture 100 shown in Figure 1. For example, the terminal device is the terminal device 110, the first network element is the I-EASDF network element 134-1, and the second network element is the EASDF network element 134. The query message, response message, and processing rules in the embodiment of the present application can be DNS query messages, DNS response messages, and DNS message processing rules. For the parts not described in detail, please refer to the above description and existing protocols. As shown in Figure 6, the communication method 500 includes the following multiple steps.

[0456] S510. The terminal device sends a first query message to the first network element. Correspondingly, the first network element receives the first query message from the terminal device.

[0457] Among them, the source address information of the first query message indicates the address of the terminal device, the target address information indicates the address of the first network element, the first query message includes the first domain name, and the first query message is used to query the address of the server that provides services corresponding to the first domain name to the terminal device.

[0458] The specific implementation of step S510 can refer to step S210 and will not be repeated here.

[0459] S520. The first network element sends a second query message to the second network element. Correspondingly, the second network element receives the second query message from the first network element, where the second query message is used to query the address of the server corresponding to the first domain name.

[0460] The source address information of the second query message indicates the address of the terminal device, the target address information indicates the address of the second network element, and the second query message includes the first domain name.

[0461] For example, the first network element modifies the first query message into the second query message in the following manner: the address of the first network element indicated by the destination address information of the first query message is replaced with the address of the second network element; the source address information in the first query message remains unchanged. In other words, the first network element maintains the source address information in the first query message unchanged and replaces the destination address information in the first query message from the address of the first network element to the address of the second network element.

[0462] The above-mentioned operation of the first network element replacing the target address information in the first query message from the address of the first network element to the address of the second network element can be called address replacement (such as IP replacement), that is, the first network element performs address replacement on the first query message to obtain the second query message, and the second query message is the result after the first network element performs address replacement on the first query message.

[0463] For example, the second query message is sent by the first network element to the second network element based on the address of the second network element. Before the first network element sends the second query message to the second network element, the communication method 500 also includes: the first network element receives the address of the second network element from the first session management network element, and correspondingly, the first session management network element sends the address of the second network element to the first network element.

[0464] For example, the second query message is sent by the first network element to the second network element through the local session anchor point and the session anchor point. Before the first network element sends the second query message to the second network element, the communication method 500 also includes: the first network element receives the address of the local session anchor point from the first session management network element.

[0465] Optionally, if the first domain name satisfies a first condition, the first network element sends a second query message to the second network element, where the first condition includes: there is no second processing rule that matches the first domain name and corresponds to the terminal device. The second processing rule may be a processing rule in which the source address information indicates the address of the terminal device and includes the first domain name.

[0466] In one implementation, before the first network element sends the second query message to the second network element, the communication method 200 further includes: the first network element receiving tenth indication information from the first session management network element, and in response, the first session management network element sending the tenth indication information to the first network element, where the tenth indication information is used to indicate the first condition. Thus, in step S220, the first network element sends the second query message to the second network element based on the tenth indication information if the first domain name meets the first condition.

[0467] The tenth indication information may also be used to indicate that the source address information in the second query message indicates the address of the terminal device; or, the tenth indication information may also be used to instruct the first network element to perform address replacement on the first query message.

[0468] In another implementation, the first network element receives processing rule 5A from the first session management network element, and in response, the first session management network element sends processing rule 5A to the first network element. Processing rule 5A includes source address information indicating an address of a terminal device, includes a first condition, and further includes sending a second query message to the second network element.

[0469] After receiving the first query message, the first network element determines that the source address information included in the processing rule 5A is the same as the source address information in the first query message, and the first query message meets the first condition. Then, the first network element sends a second query message to the second network element according to the action included in the processing rule 5A.

[0470] Optionally, the processing rule 5A further includes: performing address replacement, or the processing rule 5A further includes: the source address information in the second query message indicates the address of the terminal device. Exemplarily, the processing rule 5A may adopt the following format:

[0471] Optionally, processing rule 5A further includes the address of the second network element.

[0472] It should be understood that processing rule 5A may include the format of the second query message and the address of the second network element, which will not be described in detail here.

[0473] For the parts of step S520 that are not fully described, please refer to the description of step S220.

[0474] S530. The second network element obtains an address of a server according to a first processing rule that matches the first domain name. The server is used to provide a service corresponding to the first domain name to the terminal device.

[0475] The source address information of the first processing rule indicates the address of the terminal device, and the domain name range of the first processing rule includes the first domain name. Exemplarily, the first processing rule may adopt the following format:

[0476] The specific implementation of the second network element obtaining the address of the server according to the first processing rule can refer to the above description of the DNS processing rule and the existing protocol, which will not be repeated here.

[0477] S540. The second network element sends a first response to the first query message to the terminal device. Correspondingly, the terminal device receives the first response from the second network element. The first response includes the address of the server.

[0478] For example, the second network element sends a first response to the terminal device based on the source address information in the second query message. The specific implementation can refer to the existing protocol.

[0479] Based on the above-mentioned communication method 500, after receiving the first query message from the terminal device, the first network element sends a second query message whose source address information indicates the address of the terminal device to the second network element. The second network element then uses the first processing rule whose source address information is the address of the terminal device to process the second query message to obtain the address of the server, so that the terminal device can query the address of the server and then use the services provided by the server according to the address.

[0480] Optionally, the communication method 500 further includes step S260.

[0481] Based on the above method, the terminal device sends uplink data to the server according to the address of the server, so that the terminal device can use the service corresponding to the first domain name to realize service data transmission between the terminal device and the server.

[0482] Optionally, the communication method 500 further includes steps S271 to S276 and / or steps S281 to S286 (not shown in the figure). Based on this method, it is helpful to provide the server address to the terminal device in a timely manner, reduce response latency, and also help reduce the load on the session anchor point, the second network element, and the second session management network element.

[0483] FIG7 is a flow chart of a communication method 600 provided in an embodiment of the present application. A possible implementation of the communication method 500 is described by taking the first network element as the I-EASDF network element 134-1, the second network element as the EASDF network element 134, and the first session management network element as the I-SMF network element 132-1 as an example. As shown in FIG7 , the communication method 600 can be executed by an I-EASDF network element, an EASDF network element, and an I-SMF network element, or by modules and / or devices (e.g., chips or integrated circuits, etc.) with corresponding functions installed in the I-EASDF network element, the EASDF network element, and the I-SMF network element, and this application does not limit this. For ease of description, the following description is based on the I-EASDF network element, the EASDF network element, and the I-SMF network element as the execution entities. For parts not fully described, reference can be made to existing protocols and the above description of the communication method 500.

[0484] S601. The AMF network element sends a request message 1 to the I-SMF network element. Correspondingly, the I-SMF network element receives the request message 1 from the AMF network element.

[0485] S602. The I-SMF network element sends a request message 2 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives the request message 2 from the I-SMF network element.

[0486] S603. The I-EASDF network element sends a response message 2 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 2 from the I-EASDF network element.

[0487] S604. The I-SMF network element sends a request message 4 to the SMF network element. Correspondingly, the SMF network element receives the request message 4 from the I-SMF network element.

[0488] Steps S601 to S604 are similar to steps S301 to S304 , and for parts not fully described, reference may be made to the above description.

[0489] S605. The SMF network element sends a request message 5 to the EASDF network element. Correspondingly, the EASDF network element sends a request message 5 to the SMF network element.

[0490] In case 1, request message 5 is used to request the establishment of a DNS context corresponding to the session of the terminal device. Optionally, request message 5 also includes one or more DNS processing rules, and the source address information of the one or more DNS processing rules indicates the address of the terminal device. For example, the one or more DNS processing rules are generated based on the EDI in the SMF network element. Optionally, the FQDN in the one or more DNS processing rules does not belong to the local FQDN. For a detailed introduction to the one or more DNS processing rules, please refer to the description of communication method 200.

[0491] It should be understood that when the central FQDN is the same as the local FQDN, the SMF network element sends a response message 4 to the I-SMF network element for the request message 4. The response message 4 is used to indicate that the session of the terminal device is successfully established, and steps S605 to S609 can be skipped.

[0492] In scenario 2, during the establishment of a terminal device's session, the SMF network element sends one or more DNS processing rules to the EASDF network element. These one or more DNS processing rules correspond to the terminal device's session, i.e., are used to process DNS messages related to the terminal device's session. The source address information included in these one or more DNS processing rules indicates the terminal device's address. The EASDF network element establishes a DNS context corresponding to the terminal device's session, which stores the one or more DNS processing rules. Request message 5 is used to request an update of the DNS context corresponding to the terminal device's session.

[0493] For example, when request message 4 includes the local FQDN and request message 5 also includes the local FQDN, request message 5 can be used to instruct the EASDF network element to delete the local FQDN included in the DNS processing rule corresponding to the session of the terminal device. Alternatively, request message 5 includes the difference between the central FQDN and the local FQDN.

[0494] When the central FQDN is the same as the local FQDN, that is, the difference set between the central FQDN and the local FQDN is an empty set, the SMF network element sends a response message 4 to the I-SMF network element for the request message 4. The response message 4 is used to indicate that the session update of the terminal device is successful, and steps S605 to S609 can be skipped. In this case, the SMF network element can also instruct the EASDF network element to delete the DNS context corresponding to the session of the terminal device.

[0495] S606. The EASDF network element sends a response message 5 to the SMF network element. Correspondingly, the SMF network element receives the response message 5 from the EASDF network element.

[0496] The response message 5 is a response to the request message 5, and the response message 5 includes the address of the EASDF network element.

[0497] S607. The SMF network element sends a response message 4 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 4 from the SMF network element.

[0498] The response message 4 is a response to the request message 4, and the response message 4 includes the address of the EASDF network element.

[0499] S608. The I-SMF network element sends message 6 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives message 6 from the I-SMF network element.

[0500] In one implementation manner (method 6-1), message 6 includes indication information 60. The indication information 60 is used to indicate that: for a DNS query message related to a session of a terminal device, if there is no DNS processing rule that matches the FQDN in the DNS query message, then forward the DNS query message to the EASDF network element after the following modification: replace the address of the I-EASDF network element indicated by the destination address information with the address of the EASDF network element. The indication information 60 can also be used to indicate that: for a DNS query message related to a session of a terminal device, if there is no DNS processing rule that matches the FQDN in the DNS query message, then forward the result of performing address replacement on the DNS query message to the EASDF network element, wherein the address replacement includes: replacing the address of the I-EASDF network element indicated by the destination address information with the address of the EASDF network element.

[0501] In another implementation (method 6-2), message 6 includes a DNS processing rule 6A, wherein the source address information included in the DNS processing rule 6A indicates the address of the terminal device; the DNS processing rule 6A includes a condition: there is no DNS processing rule matching the FQDN in the DNS query message. The DNS processing rule 6A further includes the following actions: forwarding the DNS query message modified as follows to the EASDF network element: replacing the address of the I-EASDF network element indicated by the destination address information with the address of the EASDF network element; or, the DNS processing rule 6A further includes the following actions: forwarding the result of performing the address replacement on the DNS query message to the EASDF network element.

[0502] It should be noted that the priority of DNS processing rule 6A is lower than other DNS processing rules in the DNS context corresponding to the session.

[0503] The instruction information 60 and the DNS processing rule 6A are similar to the tenth instruction message and the processing rule 5A in the communication method 500, respectively. For details not explained in detail, please refer to the above description.

[0504] S609. The I-EASDF network element sends a response message 6 to the I-SMF network element. Correspondingly, the I-SMF network element receives the response message 6 from the I-EASDF network element.

[0505] The response message 6 is a response to the message 6. For example, when the message 6 is used to request the update of the DNS processing rule, the response message 6 can be used to indicate that the DNS processing rule update is successful. Step S609 is optional.

[0506] When the message 6 includes the DNS processing rule 6A, the I-EASDF network element may save the DNS processing rule 6A to the DNS context corresponding to the session of the terminal device.

[0507] S610. The I-SMF network element sends the address of the I-EASDF network element to the terminal device. Correspondingly, the terminal device receives the address of the I-EASDF network element from the I-SMF network element.

[0508] The terminal device uses the I-EASDF network element as the DNS server corresponding to the session of the terminal device.

[0509] S611. The terminal device sends a DNS query message 1 to the I-EASDF network element. Correspondingly, the I-EASDF network element receives the DNS query message 1 from the terminal device.

[0510] The source address information in the DNS query message 1 indicates the address of the terminal device, the target address information indicates the address of the I-EASDF network element, and the DNS query message 1 includes FQDN 1. The DNS query message 1 is used to query the address of the server that provides the terminal device with the service corresponding to FQDN 1. For example, the terminal device sends the DNS query message 1 to the I-EASDF network element via the (R)AN, UL CL / BP, and L-PSA.

[0511] It should be noted that step S611 and step S610 may not be consecutive. After receiving the address of the I-EASDF network element in step S610, the terminal device may wait until it needs to access the service before executing step S611.

[0512] S612. The I-EASDF network element sends a DNS query message 2 to the EASDF network element according to the DNS query message 1. Correspondingly, the EASDF network element receives the DNS query message 2 from the I-EASDF network element.

[0513] The source address information of the DNS query message 2 indicates the address of the I-EASDF network element, the target address information indicates the address of the EASDF network element, and the DNS query message 2 includes the FQDN 1.

[0514] For example, based on method 6-1, after the I-EASDF network element receives the DNS query message 1, it searches for the DNS processing rule that matches the DNS query message 1 from the DNS context corresponding to the session of the terminal device, that is, it searches for the DNS processing rule 6B whose source address information indicates the address of the terminal device and the FQDN range includes FQDN 1.

[0515] When DNS processing rule 6B exists in the DNS context, the I-EASDF network element processes the DNS query message 1 according to the actions included in DNS processing rule 6B, thereby obtaining the address of the server and sending the address of the server to the terminal device. The specific implementation can refer to the existing protocol. In this case, step S612 and subsequent steps can be skipped.

[0516] When DNS processing rule 6B does not exist, the I-EASDF network element keeps the source address information in the DNS query message 1 unchanged according to the indication information 60, and changes the target address information in the DNS query message 1 from the address indicating the I-EASDF network element to the address indicating the EASDF network element, and sends the modified DNS query message, i.e., DNS query message 2, to the EASDF network element.

[0517] For another example, based on method 6-2, after receiving DNS query message 1, the I-EASDF network element checks, in descending order of priority, whether the DNS processing rules in the DNS context corresponding to the session match DNS query message 1. When the I-EASDF network element detects DNS processing rule 6A, and the source address information included in DNS processing rule 6A is the same as the source address information in DNS query message 1, and FQDN 1 in DNS query message 1 meets the following conditions: there is no DNS processing rule matching the FQDN, or the domain name included in DNS processing rule 6A is a wildcard or empty, the I-EASDF network element confirms that DNS processing rule 6A matches DNS query message 1. Then, the I-EASDF network element sends DNS query message 2 to the EASDF network element according to the action included in DNS processing rule 6A. For specific implementation, refer to the above method in which the I-EASDF network element sends DNS query message 2 to the EASDF network element according to instruction information 60, which will not be repeated here.

[0518] It should be understood that DNS processing rule 6A has the lowest priority. If the DNS context includes DNS processing rule 6B, the I-EASDF network element will check DNS processing rule 6B before checking DNS processing rule 6A, and confirm that DNS processing rule 6B matches DNS query message 1, and then process DNS query message 1 according to the actions included in DNS processing rule 6B, thereby obtaining the address of the server and sending the address of the server to the terminal device. In this case, step S612 and subsequent steps can be skipped.

[0519] S613. The EASDF network element processes the DNS query message 2 to obtain the address of the EAS.

[0520] For example, the EASDF network element processes DNS query message 2 according to DNS processing rule 6C, wherein the source address information of DNS processing rule 6C indicates the address of the terminal device, and the FQDN range included in DNS processing rule 6C includes FQDN 1. For specific implementation, please refer to the above description of DNS processing rules and existing protocols.

[0521] S614. The EASDF network element sends a DNS response message 1 to the terminal device. Correspondingly, the terminal device receives the DNS response message 1 from the EASDF network element. For example, the DNS response message 1 may reach the terminal device via the PSA, the diversion point, and the (R)AN, that is, it may not pass through the I-EASDF network element.

[0522] The DNS response message 1 is a response to the DNS query message 1, and the DNS response message 1 includes the address of the EAS.

[0523] The specific implementation of step S614 can refer to the existing protocol and will not be repeated here.

[0524] Optionally, the communication method 600 further includes the following step S615.

[0525] S615. The terminal device sends uplink service data to the EAS according to the EAS address. Correspondingly, the EAS receives the uplink service data from the terminal device.

[0526] The uplink service data is the uplink data of the service corresponding to FQDN 1, that is, the terminal device can send service data to the EAS according to the address of the EAS, thereby accessing the EAS and using the service corresponding to FQDN 1.

[0527] Based on the above method, the I-SMF network element selects the I-EASDF network element to provide EAS discovery service for the terminal device. After the I-EASDF network element receives the DNS query message 1 from the terminal device, it sends a DNS query message 2 to the EASDF network element and keeps the source address information unchanged. In this way, the EASDF network element can accurately determine the corresponding DNS processing rules to process the DNS query message 2 according to the address of the terminal device indicated by the source address information, thereby obtaining a suitable server address to provide to the terminal device. The terminal device can then use the service provided by the server according to the address. The EASDF network element can also directly send the server address to the terminal device based on the source address information of the DNS query message, without the need to forward it through the I-EASDF network element, which helps to improve response efficiency.

[0528] In addition, if the I-EASDF network element finds a processing rule that matches DNS query message 1, it can directly process DNS query message 1 according to the processing rule to obtain the server address, without sending DNS query message 2 to the EASDF network element. The EAS address can be provided to the terminal device in a timely manner, improving response efficiency. Furthermore, the I-EASDF network element and the I-SMF network element can process at least some DNS messages related to the terminal device, reducing the number of DNS messages that the PSA needs to transmit and the number of DNS messages that the SMF network element and the EASDF network element need to process, which can reduce the load on the PSA, SMF network element, and EASDF network element.

[0529] Figure 8 is a schematic diagram of the structure of a communication device 1000 provided in an embodiment of the present application. As shown in Figure 8, the device 1000 may include a transceiver unit 1010 and a processing unit 1020. The transceiver unit 1010 can implement corresponding communication functions, and the processing unit 1020 is used to perform data processing, or in other words, the transceiver unit 1010 is used to perform operations related to receiving and sending, and the processing unit 1020 is used to perform other operations in addition to receiving and sending. The transceiver unit 1010 can also be referred to as a communication interface or a communication unit.

[0530] In one possible design, the communication device 1000 may correspond to the first network element in the above method embodiment, or a component of the first network element (such as a chip).

[0531] The communication device 1000 can implement the steps or processes corresponding to those executed by the first network element in the above method embodiment, wherein the transceiver unit 1010 can be used to perform operations related to the transmission and reception of the first network element in the above method embodiment, and the processing unit 1020 can be used to perform operations related to the internal processing of the first network element in the above method embodiment.

[0532] Exemplarily, the transceiver unit 1010 is used to receive a first query message from a terminal device, the first query message including a first domain name and the address of the terminal device, the first query message being used to query the address of a server that provides services corresponding to the first domain name to the terminal device; the transceiver unit 1010 is also used to send a second query message to a second network element, the second query message being used to query the address of a server corresponding to the first domain name; the transceiver unit 1010 is also used to receive a second response to the second query message, the second response including the address of the server; the transceiver unit 1010 is also used to send a first response to the first query message to the terminal device, the first response including the address of the server; wherein the source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name and the address of the terminal device; or, the source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name, and the second query message is sent by the first network element to the second network element through a tunnel.

[0533] In which, when the device 1000 is used to execute the method in Figure 2, the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as steps S210, S220, S240, or S250; the processing unit 1020 can be used to execute the internal processing steps in the method.

[0534] In which, when the device 1000 is used to execute the method in Figure 4, the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as steps S302, S303, S308, S309, S311, S312, S314, or S315; the processing unit 1020 can be used to execute the internal processing steps in the method.

[0535] In which, when the device 1000 is used to execute the method in Figure 5, the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as steps S402, S403, S408, S409, S411, S412, S414, or S415; the processing unit 1020 can be used to execute the internal processing steps in the method.

[0536] Exemplarily, the transceiver unit 1010 is used to receive a first query message from a terminal device, the first query message including a first domain name and the address of the terminal device, and the first query message is used to query the address of a server that provides services corresponding to the first domain name to the terminal device; the transceiver unit 1010 is also used to send a second query message to a second network element, the source address information in the second query message indicates the address of the terminal device, the second query message includes the first domain name, and the second query message is used to query the address of the server corresponding to the first domain name.

[0537] When the device 1000 is used to execute the method in FIG6 , the transceiver unit 1010 may be used to execute the steps of sending and receiving information in the method, such as step S510 or S520 ; the processing unit 1020 may be used to execute the internal processing steps in the method.

[0538] In which, when the device 1000 is used to execute the method in Figure 7, the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as steps S602, S603, S608, S609, or S611; the processing unit 1020 can be used to execute the internal processing steps in the method.

[0539] It should be understood that the specific process of each unit executing the above steps can be found in the description of the above embodiment and will not be repeated here.

[0540] In another possible design, the communication device 1000 may correspond to the second network element in the above method embodiment, or a component of the second network element (such as a chip).

[0541] The communication device 1000 can implement the steps or processes corresponding to those executed by the second network element in the above method embodiment, wherein the transceiver unit 1010 can be used to perform operations related to transceiver transmission of the second network element in the above method embodiment, and the processing unit 1020 can be used to perform operations related to internal processing of the second network element in the above method embodiment.

[0542] Exemplarily, the transceiver unit 1010 is used to receive a second query message from the first network element, and the second query message is used to query the address of the server corresponding to the first domain name; wherein the source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name and the address of the terminal device; or, the source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name, and the second query message is received by the second network element from the first network element through a tunnel; the processing unit 1020 is used to obtain the address of the server according to a first processing rule matching the first domain name; the transceiver unit 1010 is also used to send a second response to the second query message to the first network element, and the second response includes the address of the server.

[0543] When the device 1000 is used to execute the method in FIG2 , the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as step S220 or S240; the processing unit 1020 can be used to execute the internal processing steps in the method, such as step S230.

[0544] In which, when the device 1000 is used to execute the method in Figure 4, the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as steps S305, S306, S312, or S314; the processing unit 1020 can be used to execute the internal processing steps in the method, such as step S313.

[0545] In which, when the device 1000 is used to execute the method in Figure 5, the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as steps S405, S406, S412, or S414; the processing unit 1020 can be used to execute the internal processing steps in the method, such as step S413.

[0546] When the device 1000 is used to execute the method in FIG6 , the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as step S520 or S540; the processing unit 1020 can be used to execute the internal processing steps in the method, such as step S530.

[0547] In which, when the device 1000 is used to execute the method in Figure 7, the transceiver unit 1010 can be used to execute the steps of sending and receiving information in the method, such as steps S605, S606, S612 or S614; the processing unit 1020 can be used to execute the internal processing steps in the method, such as step S613.

[0548] It should be understood that the specific process of each unit executing the above steps can be found in the description of the above embodiment and will not be repeated here.

[0549] It should be understood that the device 1000 here is embodied in the form of a functional unit. The term "unit" here can refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit and / or other suitable components that support the described functions. In an optional example, the above-mentioned transceiver unit 1010 can also be a transceiver circuit (for example, it can include a receiving circuit and a transmitting circuit), and the processing unit 1020 can be a processing circuit.

[0550] The apparatus 1000 of each of the above-mentioned solutions has the function of implementing the corresponding steps performed by the network element (such as the first network element, the second network element, or the first session management network element) in the above-mentioned method. This function can be implemented by hardware, or by hardware executing the corresponding software implementation. The hardware or software includes one or more modules corresponding to the above-mentioned functions; for example, the transceiver module can be replaced by a transceiver (for example, the sending unit in the transceiver module can be replaced by a transmitter, and the receiving unit in the transceiver module can be replaced by a receiver), and other units, such as the processing module, can be replaced by a processor to respectively perform the transceiver operations and related processing operations in each method embodiment.

[0551] Figure 9 is a schematic diagram of another communication device 2000 provided in an embodiment of the present application. The device 2000 includes one or more processors 2010 and one or more memories 2020. The processor 2010 is configured to execute computer programs or instructions stored in the memory 2020, or to read data / signaling stored in the memory 2020, to perform the methods described in the above method embodiments. The memory 2020 is configured to store computer programs or instructions and / or data. The memory 2020 may be integrated with the processor 2010, or may be provided separately.

[0552] Optionally, as shown in Figure 9, the apparatus 2000 further includes a transceiver 2030, which is configured to receive and / or transmit signals. For example, the processor 2010 is configured to control the transceiver 2030 to receive and / or transmit signals.

[0553] As a solution, the device 2000 is used to implement the operations performed by the first network element in each of the above method embodiments.

[0554] As another solution, the device 2000 is used to implement the operations performed by the second network element in the above various method embodiments.

[0555] As another solution, the apparatus 2000 is used to implement the operations performed by the first session management network element in each of the above method embodiments.

[0556] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0557] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory and / or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM includes the following forms: 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 link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0558] 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) can be integrated into the processor. It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0559] 10 is a schematic diagram of a chip system 3000 provided in an embodiment of the present application. The chip system 3000 (or also referred to as a processing system) includes a logic circuit 3010 and an input / output interface 3020 .

[0560] Logic circuit 3010 may be a processing circuit in chip system 3000. Logic circuit 3010 may be coupled to a storage unit and call instructions in the storage unit, so that chip system 3000 can implement the methods and functions of various embodiments of the present application. Input / output interface 3020 may be an input / output circuit in chip system 3000, outputting information processed by chip system 3000 or inputting data or signaling information to be processed into chip system 3000 for processing.

[0561] As a solution, the chip system 3000 is used to implement the operations performed by the first network element, the second network element, or the first session management network element in each of the above method embodiments. For example, the logic circuit 3010 is used to implement the internal processing-related operations performed by the first network element, the second network element, or the first session management network element in the above method embodiments; and the input / output interface 3020 is used to implement the sending and / or receiving-related operations performed by the first network element, the second network element, or the first session management network element in the above method embodiments.

[0562] The explanation of the relevant contents and beneficial effects of any of the above-mentioned devices can be referred to the corresponding method embodiments provided above, which will not be repeated here.

[0563] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0564] An embodiment of the present application further provides a communication system, comprising a first network element and a second network element, wherein the first network element is configured to implement the operations performed by the first network element in each of the above method embodiments, and the second network element is configured to implement the operations performed by the second network element in each of the above method embodiments. Optionally, the communication system further comprises one or more network elements selected from a first session management network element or a second session management network element, wherein the first session management network element is configured to implement the operations performed by the first session management network element in each of the above method embodiments, and the second session management network element is configured to implement the operations performed by the second session management network element in each of the above method embodiments.

[0565] The present application also provides a computer-readable storage medium storing computer instructions for implementing the methods performed by the first network element, the second network element, or the first session management network element in each of the above-described method embodiments. For example, when the computer program is executed by a computer, the computer can implement the methods performed by the first network element, the second network element, or the first session management network element in each of the above-described method embodiments.

[0566] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. For example, the computer can be a personal computer, a server, or a network device, etc. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)). For example, the available medium includes, but is not limited to, various media that can store program code, such as a USB flash drive, a mobile hard disk, ROM, RAM, a magnetic disk, or an optical disk.

[0567] In order to facilitate understanding of the embodiments of the present application, the following explanations are made.

[0568] First, in the various embodiments of the present application, unless otherwise specified or logically conflicting, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0569] Second, in the embodiments of this application, "plurality" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the associated objects are in an "or" relationship.

[0570] Third, in the embodiments of the present application, "first," "second," and various numerical references (e.g., #1, #2, etc.) are used to distinguish between different messages for ease of description and are not intended to limit the scope of the embodiments of the present application. For example, they are used to distinguish between different messages, rather than to describe a specific order or precedence. It should be understood that the objects described in this manner can be interchanged where appropriate to describe scenarios other than the embodiments of the present application.

[0571] Fourth, in the embodiments of the present application, descriptions such as "when...", "in the case of...", and "if" all mean that the device will perform corresponding processing under certain objective circumstances. It does not limit the time, nor does it require the device to perform judgment actions when implemented, nor does it mean that there are other limitations.

[0572] Fifth, in the embodiments of the present application, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or apparatuses.

[0573] Sixth, in the embodiments of the present application, "used for indication" may include direct indication and indirect indication. When describing that a certain indication information is used to indicate A, it may include that the indication information directly indicates A or indirectly indicates A, and does not necessarily mean that the indication information carries A.

[0574] The indication methods involved in the embodiments of this application should be understood to encompass various methods that enable the party to be indicated to obtain information to be indicated. The information to be indicated can be sent as a whole or divided into multiple sub-information and sent separately. The transmission period and / or timing of these sub-information can be the same or different. This application does not limit the specific transmission method.

[0575] In the embodiments of the present application, the "indication information" may be an explicit indication, i.e., a direct indication via signaling, or may be obtained based on parameters indicated by the signaling, in combination with other rules, other parameters, or by deduction. It may also be an implicit indication, i.e., based on a rule or relationship, or based on other parameters, or by deduction. This application does not impose specific limitations on this.

[0576] Seventh, in the embodiments of the present application, "storage" may refer to storage in one or more memories. The one or more memories may be provided separately or integrated into an encoder or decoder, a processor, or a communication device. The one or more memories may also be partially provided separately and partially integrated into a decoder, a processor, or a communication device. The type of memory may be any form of storage medium and is not limited by this application.

[0577] Eighth, in the embodiments of the present application, "communication" can also be described as "data transmission", "information transmission", "data processing", etc. "Transmission" includes "sending" and "receiving", which is not limited in the present application.

[0578] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A communication method, characterized in that, The method includes: A first network element receives a first query message from a terminal device. The first query message includes a first domain name and the address of the terminal device, and is used to query the address of a server that provides services corresponding to the first domain name for the terminal device. The first network element sends a second query message to a second network element. The second query message is used to query the address of the server corresponding to the first domain name. Wherein, the source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name and the address of the terminal device; or, The source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name, and the second query message is sent by the first network element to the second network element through a tunnel. The first network element receives a second response to the second query message. The second response includes the address of the server. The first network element sends a first response to the first query message to the terminal device. The first response includes the address of the server.

2. The method according to claim 1, wherein The method further includes: The first network element receives a third query message from the terminal device. The third query message includes a second domain name and the address of the terminal device, and is used to query the address of a server that provides services corresponding to the second domain name for the terminal device. The first network element sends a fourth query message to a first domain name server. The fourth query message includes the second domain name, and is used to query the address of the server corresponding to the second domain name. The first network element receives a fourth response to the fourth query message from the first domain name server. The fourth response includes the address of a second server, and the second server is used to provide services corresponding to the second domain name. The first network element sends a third response to the third query message to the terminal device. The third response includes the address of the second server.

3. The method according to claim 1 or 2, characterized in that, The method further includes: The first network element receives a fifth query message from a second terminal device. The fifth query message includes the first domain name and the address of the second terminal device, and is used to query the address of a server that provides services corresponding to the first domain name for the second terminal device. The first network element sends a sixth query message to a second domain name server. The sixth query message includes the first domain name, and is used to query the address of the server corresponding to the first domain name. The first network element receives a sixth response to the sixth query message from the second domain name server. The sixth response includes the address of a third server, and the third server is used to provide services corresponding to the first domain name. The first network element sends a fifth response to the fifth query message to the second terminal device. The fifth response includes the address of the third server.

4. The method according to any one of claims 1 to 3, characterized in that, The first network element sending a second query message to the second network element includes: When the first domain name meets the first condition, the first network element sends the second query message to the second network element, where the first condition includes: there is no second processing rule that matches the first domain name and corresponds to the terminal device.

5. The method according to claim 4, characterized in that, The method further includes: The first network element receives first indication information from a first session management network element, where the first indication information is used to indicate the first condition.

6. The method according to claim 4 or 5, characterized in that, The second processing rule is: a processing rule in which the source address information indicates the address of the terminal device and includes the first domain name.

7. The method according to any one of claims 1-6, characterized in that When the source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name and the address of the terminal device, The option information in the second query message includes the address of the terminal device, and the option information is used to determine the address of the server.

8. The method according to any one of claims 1 to 6, characterized in that, When the source address information in the second query message indicates the address of the first network element, the second query message is sent by the first network element to the second network element through a tunnel, and the second query message includes the first domain name, The second query message further includes an identifier of the tunnel between the first network element and the second network element.

9. The method according to claim 8, wherein The method further includes: The first network element receives the identifier of the tunnel from a first session management network element.

10. The method according to any one of claims 1-9, characterized in that, The second query message is sent by the first network element to the second network element according to the address of the second network element, and the method further includes: the first network element receives the address of the second network element from a first session management network element.

11. A communication method, characterized in that, The method includes: The second network element receives a second query message from the first network element, where the second query message is used to query the address of a server corresponding to the first domain name; wherein, the source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name and the address of the terminal device; or The source address information in the second query message indicates the address of the first network element, the second query message includes the first domain name, and the second query message is received by the second network element from the first network element through a tunnel; The second network element obtains the address of the server according to a first processing rule that matches the first domain name; The second network element sends a second response to the second query message to the first network element, where the second response includes the address of the server.

12. The method according to claim 11, wherein When the source address information in the second query message indicates the address of the first network element, and the second query message includes the first domain name and the address of the terminal device, The option information in the second query message includes the address of the terminal device, and the option information is used to determine the address of the server.

13. The method according to claim 12, wherein The source address information included in the first processing rule indicates the address of the terminal device.

14. The method according to claim 13, wherein The method further includes: When the address of the first network element satisfies a second condition, the second network element determines the first processing rule according to the option information in the second query message, where the second condition includes: there is no processing rule whose source address information indicates the address of the first network element.

15. The method according to claim 13, wherein The method further includes: The second network element determines a third processing rule according to the source address information in the second query message, where the source address information included in the third processing rule corresponds to the address of the first network element, and the third processing rule further includes: the option information is used to indicate the address of the terminal device corresponding to the first processing rule; The second network element determines the first processing rule according to the option information in the second query message.

16. The method according to claim 13, wherein The method further includes: The second network element determines a fourth processing rule according to the source address information in the second query message, where the source address information included in the fourth processing rule corresponds to the address of the first network element, and the fourth processing rule further includes: sending a domain name to a second session management network element; The second network element sends the first domain name to the second session management network element according to the fourth processing rule; The second network element receives a fifth processing rule from the second session management network element, where the fifth processing rule includes: the option information is used to indicate the address of the terminal device corresponding to the first processing rule; The second network element determines the first processing rule according to the option information in the second query message.

17. The method according to claim 12, wherein The source address information included in the first processing rule indicates the address of the first network element, and the first processing rule further includes: the option information includes the address of the terminal device.

18. The method according to claim 11, wherein When the source address information in the second query message indicates the address of the first network element, the second query message is sent by the first network element to the second network element through a tunnel, and the second query message includes the first domain name, The source address information included in the first processing rule indicates the address of the terminal device; The method further includes: The second network element determines the address of the terminal device according to the tunnel.

19. The method according to claim 18, wherein The method further includes: When the address of the first network element satisfies a second condition, the second network element determines the address of the terminal device according to the tunnel, where the second condition includes: there is no processing rule whose source address information indicates the address of the first network element.

20. The method according to claim 18, wherein The method further includes: The second network element determines a sixth processing rule according to the source address information in the second query message, where the source address information included in the sixth processing rule corresponds to the address of the first network element, and the sixth processing rule further includes: determining the address of the terminal device corresponding to the first processing rule according to the tunnel.

21. The method according to claim 18, wherein The method further includes: The second network element determines a seventh processing rule according to the source address information in the second query message, where the source address information included in the seventh processing rule corresponds to the address of the first network element, and the seventh processing rule further includes: sending a domain name to a second session management network element; The second network element sends the first domain name to the second session management network element according to the seventh processing rule; The second network element receives an eighth processing rule from the second session management network element, and the eighth processing rule includes: determining an address of a terminal device corresponding to the first processing rule according to a tunnel.

22. The method according to claim 11, wherein When the source address information in the second query message indicates an address of the first network element, the second query message is sent by the first network element to the second network element through a tunnel, and the second query message includes the first domain name. The source address information included in the first processing rule indicates the tunnel.

23. The method according to any one of claims 18-22, characterized in that, The second query message further includes an identifier of the tunnel between the first network element and the second network element.

24. The method according to any one of claims 11-23, characterized in that, The second response is sent by the second network element to the first network element according to the address of the first network element, and the method further includes: The second network element receives the address of the first network element from the second session management network element.

25. A communication system, characterized in that, Including a first network element and a second network element, where: The first network element is configured to execute the method according to any one of claims 1-10; The second network element is configured to execute the method according to any one of claims 11-24.

26. The system according to claim 25, wherein The system further includes a first session management network element, and the first session management network element is configured to: instruct the first network element to send a second query message to the second network element.

27. The system according to claim 25 or 26, characterized in that, The system further includes a second session management network element, and the second session management network element is configured to: send a first processing rule matching the first domain name to the second network element.

28. A communication method, characterized in that, Including: The first network element receives a first query message from a terminal device, the first query message includes a first domain name and an address of the terminal device, and the first query message is used to query an address of a server that provides a service corresponding to the first domain name for the terminal device; The first network element sends a second query message to the second network element, and the second query message is used to query an address of a server corresponding to the first domain name; Wherein, the source address information in the second query message indicates an address of the first network element, and the second query message includes the first domain name and the address of the terminal device; or, The source address information in the second query message indicates an address of the first network element, the second query message includes the first domain name, and the second query message is sent by the first network element to the second network element through a tunnel; The second network element receives the second query message from the first network element, and obtains the address of the server according to a first processing rule matching the first domain name; The second network element sends a second response to the second query message to the first network element, and the second response includes the address of the server; The first network element receives the second response from the second network element, and sends a first response to the first query message to the terminal device, and the first response includes the address of the server.

29. A communication method, characterized in that, Including: The first network element receives a first query message from a terminal device, the first query message includes a first domain name and an address of the terminal device, and the first query message is used to query an address of a server that provides a service corresponding to the first domain name for the terminal device; The first network element sends a second query message to the second network element. The source address information in the second query message indicates the address of the terminal device. The second query message includes the first domain name, and the second query message is used to query the address of the server corresponding to the first domain name.

30. The method according to claim 29, wherein The method further includes: The first network element receives a third query message from the terminal device. The third query message includes a second domain name and the address of the terminal device, and the third query message is used to query the address of the server that provides the service corresponding to the second domain name for the terminal device; The first network element sends a fourth query message to the first domain name server. The fourth query message includes the second domain name, and the fourth query message is used to query the address of the server corresponding to the second domain name; The first network element receives a fourth response to the fourth query message from the first domain name server. The fourth response includes the address of the second server, and the second server is used to provide the service corresponding to the second domain name; The first network element sends a third response to the third query message to the terminal device. The third response includes the address of the second server.

31. The method according to claim 29 or 30, characterized in that, The method further includes: The first network element receives a fifth query message from a second terminal device. The fifth query message includes the first domain name and the address of the second terminal device, and the fifth query message is used to query the address of the server that provides the service corresponding to the first domain name for the second terminal device; The first network element sends a sixth query message to the second domain name server. The sixth query message includes the first domain name, and the sixth query message is used to query the address of the server corresponding to the first domain name; The first network element receives a sixth response to the sixth query message from the first domain name server. The sixth response includes the address of the third server, and the third server is used to provide the service corresponding to the first domain name; The first network element sends a fifth response to the fifth query message to the second terminal device. The fifth response includes the address of the third server.

32. The method according to any one of claims 29 - 31, characterized in that, The first network element sends a second query message to the second network element, including: When the first domain name meets the first condition, the first network element sends the second query message to the second network element. The first condition includes: there is no second processing rule that matches the first domain name and corresponds to the terminal device.

33. The method according to claim 32, wherein The method further includes: The first network element receives first indication information from the first session management network element. The first indication information is used to indicate the first condition.

34. The method according to claim 32, wherein The second processing rule is: the processing rule whose source address information indicates the address of the terminal device and includes the first domain name.

35. The method according to any one of claims 29 - 34, characterized in that, The method further includes: The first network element modifies the first query message into the second query message in the following manner: The address of the first network element indicated by the destination address information of the first query message is replaced with the address indicating the second network element; The source address information in the first query message remains unchanged.

36. The method according to any one of claims 29 - 35, characterized in that, The second query message is sent by the first network element to the second network element according to the address of the second network element. The method further includes: The first network element receives the address of the second network element from a first session management network element.

37. The method according to any one of claims 29-36, characterized in that, The first network element is used to obtain the address of a server providing services for the terminal device according to an indication of a first session management network element, and the second network element is used to obtain the address of a server providing services for the terminal device according to an indication of a second session management network element. The first session management network element and the second session management network element serve the session of the terminal device.

38. A communication method, characterized in that, It includes: The first session management network element sends first indication information to the first network element. The first indication information is used to indicate that when a first domain name in a first query message from a terminal device meets a first condition, a second query message is sent to the second network element. The first condition includes: there is no second processing rule that matches the first domain name and corresponds to the terminal device. Wherein, the first query message is used to query the address of a server providing services corresponding to the first domain name for the terminal device, and the second query message is used to query the address of a server corresponding to the first domain name.

39. The method according to claim 38, wherein: The first indication information is further used to indicate that: the source address information in the second query message indicates the address of the terminal device, and the second query message includes the first domain name.

40. The method according to claim 39, wherein: The first indication information is further used to indicate that: the source address information in the second query message indicates the address of the terminal device, and the second query message includes the first domain name, including: The first indication information is further used to instruct the first network element to modify the first query message into the second query message in the following manner: the address of the first network element indicated by the destination address information of the first query message is replaced with the address indicating the second network element; the source address information in the first query message remains unchanged.

41. A communication method, characterized in that, It includes: The first network element receives a first query message from a terminal device. The first query message includes a first domain name and the address of the terminal device. The first query message is used to query the address of a server providing services corresponding to the first domain name for the terminal device. The first network element sends a second query message to the second network element. The source address information in the second query message indicates the address of the terminal device. The second query message includes the first domain name. The second query message is used to query the address of a server corresponding to the first domain name. The second network element receives the second query message from the first network element, and obtains the address of the server according to a first processing rule. The first processing rule matches the first domain name, and the source address information included in the first processing rule indicates the address of the terminal device. The second network element sends a first response to the first query message to the terminal device. The first response includes the address of the server.

42. 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 execute the method according to any one of claims 29-37. The second network element is configured to: receive a second query message from the first network element, and obtain the address of a server according to a first processing rule, where the first processing rule matches a first domain name, and the source address information included in the first processing rule indicates the address of a terminal device; The second network element is further configured to: send a first response to the first query message to the terminal device, where the first response includes the address of the server.

43. The system according to claim 42, wherein The system further includes a first session management network element, and the first session management network element is configured to execute the method according to any one of claims 38-40.

44. The system according to claim 42 or 43, characterized in that, The system further includes a second session management network element, and the second session management network element is configured to: send a first processing rule that matches the first domain name and whose included source address information indicates the address of the terminal device to the second network element.

45. A communication device, characterized in that, comprising a module for executing the method according to any one of claims 1-24, or comprising a module for executing the method according to any one of claims 29-40.

46. A communication device, characterized in that, comprising a processor and a memory, where the memory is configured to store instructions, and when the instructions are executed by the processor, the processor executes the method according to any one of claims 1-24, or when the instructions are executed by the processor, the processor executes the method according to any one of claims 29-40.

47. A computer program product comprising instructions, characterized in that, When the instructions run on a computer, the computer is caused to execute the method according to any one of claims 1-24, or the computer is caused to execute the method according to any one of claims 29-40.

48. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium, and when the instructions run on a computer, the computer is caused to execute the method according to any one of claims 1-24, or the computer is caused to execute the method according to any one of claims 29-40.

Citation Information

Patent Citations

  • Communication method and device

    CN115884152A

  • Communication method and device

    CN117014987A

  • Domain name system query processing for edge application services

    CN117242760A

  • Method and device for edge application server discovery

    US20220263788A1