Domain name query methods, apparatus, devices, computer programs, and chips

By utilizing UPF devices for local domain name resolution caching, the method addresses slow query speeds and server load issues, enhancing query efficiency and compatibility with existing systems.

JP7871490B2Active Publication Date: 2026-06-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2023-10-11
Publication Date
2026-06-08

AI Technical Summary

Technical Problem

The existing domain name resolution process involves long network communication paths and excessive processing load on public network DNS servers, leading to slow query speeds and potential resolution failures.

Method used

Implementing a domain name query method using User Plane Function (UPF) devices to cache domain name to IP address mappings, allowing queries to be resolved locally without sending requests to public network DNS servers, thereby shortening communication paths and reducing server load.

Benefits of technology

This approach increases domain name query speed, reduces processing load on public DNS servers, and maintains high compatibility with existing infrastructure without requiring new device installations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007871490000001
    Figure 0007871490000001
  • Figure 0007871490000002
    Figure 0007871490000002
  • Figure 0007871490000003
    Figure 0007871490000003
Patent Text Reader

Abstract

This application discloses a domain name query method, apparatus, device, and storage medium in the field of mobile communications. The domain name query method includes the steps of receiving a Domain Name System (DNS) query request containing a queried domain name from a terminal device, querying cache data in a UPF for an Internet Protocol (IP) address corresponding to the queried domain name, and sending a DNS response containing the IP address corresponding to the queried domain name to the terminal device. The domain name query method according to this application not only accelerates domain name queries, but also has the advantages of being simple and efficient, low cost, and highly compatible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] [Cross-reference to Related Applications] This application claims the benefit of priority to Chinese Patent Application No. 2022114782954, filed with the China National Intellectual Property Administration on November 23, 2022, entitled "Domain Name Query Method, Apparatus, Device, and Storage Medium", the entire content of which is incorporated herein by reference.

[0002] [Technical Field] This application relates to the field of mobile communications, and particularly to domain name query technology.

Background Art

[0003] Domain name resolution is an Internet service that supports the mutual conversion between domain names and Internet Protocol (IP) addresses. In related technologies, domain name resolution usually involves sending a domain name query request sent from a terminal device through each network device to a domain name resolution server of the public network, querying the mapping relationship between the domain name and the IP address in the domain name resolution server of the public network, and returning the query result.

[0004] However, the network communication path between the domain name resolution server of the public network and the terminal device is too long, and the domain name resolution server of the public network usually needs to process a large number of domain name query requests in parallel, resulting in an excessive processing load. Therefore, in related technologies, the query speed of domain names is slow, which has an adverse impact on subsequent access to Internet services by terminal devices.

[0005] Thus, accelerating the query of domain names has become a problem that must be solved currently.

Summary of the Invention

Means for Solving the Problems

[0006] This application provides a domain name query method, apparatus, device, and storage medium that support the acceleration of domain name queries. The technical method is as follows:

[0007] According to one aspect of this application, a method for querying a domain name is provided that is performed by a computer device. The method is A step of receiving a DNS query request from a terminal device, wherein the DNS query request includes the domain name to be queried. The steps include determining the IP address corresponding to the domain name to be queried based on the cached data of the user plane function UPF, The process includes the step of sending a DNS response to the terminal device, wherein the DNS response includes an IP address corresponding to the domain name being queried.

[0008] According to one aspect of this application, a domain name query device is provided. The device is A receiving module for receiving DNS query requests from a terminal device, wherein the DNS query request includes a domain name to be queried, A processing module for querying the Internet Protocol IP address corresponding to the domain name to be queried from the cache data of the aforementioned device, The system includes a transmission module for sending a DNS response to the terminal device, wherein the DNS response includes an IP address corresponding to the domain name being queried.

[0009] According to another aspect of this application, a computer device is provided which includes a processor and memory in which a computer program is stored. When the computer program is loaded and executed by the processor, it causes the computer device to implement the domain name query method described above.

[0010] According to another aspect of this application, a computer-readable storage medium is provided in which a computer program is stored. When the computer program is loaded and executed by a processor, it causes the domain name query method described above to be implemented on the computer-readable storage medium.

[0011] According to another aspect of this application, a computer program product is provided which stores a computer program. When the computer program is loaded and executed by a processor, the computer program product implements the domain name query method described above.

[0012] According to another aspect of this application, a chip is provided that includes a programmable logic circuit and / or program instructions. A computer device incorporating the chip is configured to implement the domain name query method described above. [Effects of the Invention]

[0013] The beneficial effects of the technical method according to the embodiments of this application include at least the following: namely, This invention enables a computer device that implements the User Plane Function (UPF) to perform domain name queries. Compared to related technologies that send DNS query requests to public network DNS servers via long network communication paths, the method according to this application shortens the required network communication path and increases the domain name query speed because the computer device that implements UPF supports the completion of the domain name query corresponding to the DNS query request based on UPF cache data before the DNS query request is sent to the public network DNS server. Furthermore, since it is not necessary for the DNS query request to reach the public network DNS server, the number of DNS query requests processed by the DNS server is reduced, thereby easing the processing load on the public network DNS server. In addition, the method according to the embodiment of this application does not require the installation of new devices in the core network and can be implemented using existing computer devices that implement UPF, thus reducing the cost of implementing the method. Moreover, by performing domain name queries using existing computer devices that implement UPF, it is not necessary to set up complex offload rules separately, resulting in the advantages of high compatibility and low implementation difficulty. [Brief explanation of the drawing]

[0014] [Figure 1] This is a schematic diagram of the domain name query procedure in related technologies. [Figure 2] This is an architectural diagram of a communication system 200 according to several embodiments of this application. [Figure 3] This is a structural block diagram of a communication system according to several embodiments of this application. [Figure 4] This is a schematic diagram of a communication system according to several embodiments of this application. [Figure 5] This is a flowchart of a domain name query method according to several embodiments of this application. [Figure 6]It is a flowchart of a domain name query method according to some embodiments of the present application. [Figure 7] It is a flowchart of a domain name query method according to some embodiments of the present application. [Figure 8] It is a schematic diagram of a domain name query method according to some embodiments of the present application. [Figure 9] It is a schematic diagram of a domain name query method according to some embodiments of the present application. [Figure 10] It is a schematic diagram of a domain name query method according to some embodiments of the present application. [Figure 11] It is a schematic diagram of a domain name query method according to some embodiments of the present application. [Figure 12] It is a flowchart of a domain name query method according to some embodiments of the present application. [Figure 13] It is a structural block diagram of a domain name query device according to some embodiments of the present application. [Figure 14] It is a schematic configuration diagram of a communication device according to some embodiments of the present application.

Embodiments for Carrying Out the Invention

[0015] First, the related technologies in the embodiments of the present application will be briefly described.

[0016] Domain Name System (DNS): DNS realizes the mutual mapping between domain names and Internet Protocol (IP) addresses. Both domain names and IP addresses are used to label computing devices on the network, and a domain name corresponds to an alias of an IP address. A domain name is composed of variable-length alphanumeric characters and symbols (e.g., www.xxxx.com), while an IP address is represented by a strict sequence of four groups of numbers (e.g., 202.96.133.134).

[0017] Domain name resolution: For users, IP addresses are harder to remember than domain names, and entering a domain name into an input field for network communication is a more common, universal, and simpler method compared to directly entering an IP address into the input field.

[0018] However, since network communication protocols used in network communication are implemented based on IP addresses, and computers identify themselves using IP addresses rather than domain names during network communication, when a user enters a domain name into an input field, a service is required to support the mutual conversion between domain names and IP addresses for computer network communication. This service is called domain name resolution, and the server that provides this service is called a domain name resolution server or DNS server.

[0019] In related technologies, DNS domain name resolution typically involves a terminal device sending a domain name query request to a domain name resolution server on a public network (also called a wide area network). The public network's domain name resolution server queries the mapping relationship between the domain name and the IP address, and returns the query result. This process can also be considered as the flow of a domain name query. The public network's domain name resolution server can also be considered as a public domain name resolution server. The IP address is typically 8.8.8.8 or 114.114.114.114. Specifically, the flow of DNS domain name resolution commonly used in related technologies is shown in Figure 1. That is, a DNS request is sent from terminal device 101 to base station 102, and this DNS request includes the domain name that terminal device 101 is querying. This DNS request reaches the Internet 104 from the core network's user plane device (UPF) 103, and then is sent to the public network's DNS server 105 via each router and switch on the Internet 104. After a DNS request is received, the public network's DNS server 105 looks up the IP address corresponding to the domain name requested by the terminal device 101, then constructs and sends a corresponding DNS response based on the obtained IP address. This DNS response reaches the core network's UPF 103 via multiple routers and switches. The core network's UPF 103 finally sends this DNS response back to the terminal device 101 via the base station 102. The terminal device 101 can then perform subsequent access to internet services based on the received DNS response.

[0020] However, typically, the physical distance between the public network DNS server 105 and the terminal device 101 is long, resulting in a long network communication path between them. Furthermore, public network DNS servers usually need to process a large number of DNS requests in parallel, which places a heavy processing load on domain name resolution. As a result, the above method may cause the processing time required for domain name resolution to be too long, i.e., the time required for domain name queries to be too long. In serious cases, this could lead to domain name resolution failure, affecting the time and efficiency required for the terminal device to access services, and potentially preventing the terminal device from accessing internet services altogether.

[0021] To solve the aforementioned problems, this application proposes a domain name query method that accelerates domain name queries using a computer device that implements UPF, and that has the advantages of being low-cost, highly efficient, and highly compatible. This domain name query method, corresponding apparatus, devices, and storage media will be described below with reference to exemplary embodiments.

[0022] Figure 2 is an architectural diagram of a communication system 200 according to several embodiments of the present application. As shown in Figure 2, the communication system 200 may include at least one of a terminal device 201, an access network 203, a core network (CN) 205, and a data network (DN) 207. Here, the terminal device 201, the access network 203, and the core network 205 can be logically divided into two parts: a user plane responsible for managing the mobile network and a control plane responsible for transmitting service data.

[0023] Within this system, terminal device 201 serves as the entry point for interaction between the mobile user and the network, providing basic computing and storage functions, displaying a service window for the user, and accepting user input. Terminal device 201 transmits control signals and service data to the mobile network by establishing signal and data connections with the access network 203 using specific air interface technology.Terminal devices 201 may be deployed on land, on water, or in the air, and include, but are not limited to, handheld devices, wearable devices, in-vehicle devices, and Internet of Things devices, such as mobile phones, tablet computers, e-readers, laptop portable computers, desktop computers, televisions, game consoles, Mobile Internet Devices (MID), Augmented Reality (AR) terminals, Virtual Reality (VR) terminals and Mixed Reality (MR) terminals, wearable devices, steering wheels, electronic tags, controllers, wireless terminals in Industrial Control, wireless terminals in Self Driving, wireless terminals in Remote Medical, wireless terminals in Smart Grid, wireless terminals in Transportation Safety, wireless terminals in Smart Cities, wireless terminals in Smart Homes, wireless terminals in Remote Medical Surgery, cellular phones, cordless phones, and session initiation protocols (Session Examples include Initiation Protocol (SIP) telephones, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDAs), Set Top Boxes (STBs), and Customer Premise Equipment (CPE).

[0024] The access network 203 is configured to implement access-related functions, providing network access for authorized users within the cellcoverage area, and can transmit user data using transmission tunnels of different qualities depending on the user level, service requirements, etc. The access network 203 manages and rationally utilizes its own resources, provides access services for terminal devices 201 as needed, and can transfer control signals and user data between terminal devices 201 and the core network 205. The access network 203 may include access network devices. Access network devices are devices that provide access services for terminal devices 201 and may include radio access network (RAN) devices and AN devices. RAN devices are mainly radio network devices within a 3GPP network, and AN devices may be access network devices not defined by 3GPP. In systems using different radio access technologies, devices with base station functionality may have different names. For example, in 5th Generation Mobile Communication Technology (5G) systems, the device is called a RAN or Next Generation Node Basestation (gNB), while in Long Term Evolution (LTE) systems, the device is called an Evolved NodeB (eNB or eNodeB).

[0025] The core network 205 provides functions such as session management, mobility management, policy management, and security authentication for the terminal device 201 by maintaining mobile network subscription data and managing the network elements of the mobile network. For example, it provides network access authentication for terminal device 201 when it is connected. It allocates network resources for terminal device 201 when there is a service request for terminal device 201. It updates network resources for terminal device 201 when terminal device 201 moves. It provides a fast recovery mechanism for terminal device 201 when terminal device 201 is idle. It releases network resources for terminal device 201 when terminal device 201 is isolated. If terminal device 201 has service data, it provides data routing functionality for terminal device 201, for example, by forwarding uplink data to data network 207, or by receiving downlink data sent to terminal device 201 from data network 207 and forwarding it to access network 203, and then sending this downlink data to terminal device 201. Core network 205 is located on either a private network or a public network.

[0026] The data network 207 is configured to provide business services to users. The data network 207 may be a private network such as a local area network, an external network not managed or controlled by a carrier such as the Internet, or a dedicated network jointly deployed by a carrier such as an IP Multimedia Core Network Subsystem (IMS). Terminal devices 201 can access the data network 207 through an established Protocol Data Unit (PDU) session.

[0027] In some embodiments, at least one of the access network 203, core network 205, and data network 207 can be considered as a network device.

[0028] As an example, the communication system 200 has two communication scenarios: an uplink communication scenario and a downlink communication scenario. Here, uplink communication means that a signal is sent in the direction of terminal device 201, access network 203, core network 205, and data network 207. On the other hand, downlink communication means that a signal is sent in the direction of data network 207, core network 205, access network 203, and terminal device 201.

[0029] It should be understood that in some embodiments of this application, "5G" is also referred to as "5G New Radio (NR)" or "NR," and terminal devices are also referred to as User Equipment (UE), access terminals, subscriber units, subscriber stations, mobile stations, mobile consoles, remote stations, remote terminals, mobile devices, user terminals, terminals, wireless communication devices, user agents or user equipment.

[0030] The technical methods described in some embodiments of this application can be applied to 5G systems, LTE systems, evolutions of 5G systems and LTE systems, or next-generation (Beyond Fifth Generation, B5G) mobile communication systems, 6G systems, and subsequent evolutions. Here, the 5G system may include at least one of a non-standalone (NSA) network and a standalone (SA) network.

[0031] Figure 3 shows the detailed architecture determined based on Figure 2. Within this architecture, the core network's user plane includes the UPF. The core network's control plane includes the Authentication Server Functions (AUCF), Access and Mobility Management Function (AMF), Session Management Function (SMF), Network Slice Selection Function (NSSF), Network Exposure Function (NEF), Network Repository Function (NRF), Unified Data Management (UDM), Policy Control Function (PCF), and Application Function (AF). The functions of these functional entities are as follows:

[0032] The AMF (Application Function Manager) is primarily responsible for mobility management in mobile networks (e.g., user location updates, user network registration, user switching, etc.). The SMF (Simulation Function Manager) is primarily responsible for session management in mobile networks (e.g., session establishment, modification, release). The PCF (Personal Control Function Manager) primarily provides an integrated policy framework for controlling network behavior, providing policy rules to control layer network functions while simultaneously obtaining user enrollment information related to policy decisions. The AUSF (Application Usage Function Manager) is used to perform security authentication of terminals. The NEF (Network Function Manager) is primarily used to support the release of functions and events. The NRF (Network Functions Function Manager) is used to provide storage and selection functions for network function entity information for other network elements. The UDM (User Data Manager) is used to store user data such as subscription data and authentication or authorization data. The AF (Application Function Manager) is used to interact with the core network to provide application layer services, such as providing application layer data routing, providing access network function release functions, interacting with the policy framework to provide policy control, and interacting with the IMS (Information Management System).

[0033] In the embodiments of this application, the UPF not only plays a role in sending and receiving user data, but also has functions related to domain name queries. That is, the UPF can not only receive user data from the data network and transmit it to terminal devices via the access network, but can also receive user data from terminal devices via the access network and forward it to the data network. Furthermore, the UPF can also implement functions related to domain name resolution, such as domain name caching and domain name queries.

[0034] In the architecture shown in Figure 3, the N1 interface is the reference point between the UE and the AMF. The N2 interface is the reference point between the RAN and the AMF for sending Non-Access Stratum (NAS) messages, etc. The N3 interface is the reference point between the RAN and the UPF for sending user plane data, etc. The N4 interface is the reference point between the SMF and the UPF for sending tunnel identification information for the N3 connection, data cache display information, downlink data notification messages, and other information. The N6 interface is the reference point between the UPF and the DN for sending user plane data, etc. The NG interface is the interface between the RAN and the CN.

[0035] The interface names between the various network elements in Figures 2 and 3 are merely examples, and other names may be used in specific implementations, but are not specifically limited to the embodiments of this application. The names of the various network elements (e.g., SMF, AF, UPF, etc.) in Figures 2 and 3 are also merely examples and do not limit the function of the network elements. In networks in related technologies and other future networks, the various network elements described above may have other names, but are not specifically limited to the embodiments of this application. For example, in a 6G network, some or all of the various network elements described above may use the terminology used in 5G or other names, and are described uniformly here, but not further. It should also be understood that the names of the messages (or signal transduction) transmitted between the various network elements described above are also merely examples, and there are no restrictions on the function of the messages themselves.

[0036] Furthermore, the information (including, but not limited to, user equipment information and user personal information), data (including, but not limited to, data for analysis, data for storage, and data for display) and signals in this application are authorized by the user or fully authorized by all parties, and the collection, use, and handling of related data must comply with the relevant national and local laws, regulations, and standards. For example, the information in this application is obtained with full authorization, and the terminal device and server only temporarily store the information during program execution, and do not solidify the related data of that information for storage or secondary use.

[0037] Figure 4 is a flowchart of a domain name query method according to some exemplary embodiments of the present application. This embodiment will be described using as an example that the method is performed by a computer device for implementing the UPF shown in Figure 3. The method includes at least some of the following steps.

[0038] Step 410: The terminal device receives a DNS query request that includes the domain name to be queried (also called the "domain name to be queried" or "domain name waiting for query").

[0039] DNS query requests originate from the terminal device.

[0040] The terminal device sends a DNS query request for the target domain name to a DNS server on the data network. The DNS query request must pass through a network device, which is either an access network device or a core network device.

[0041] Step 430: Based on the UPF cache data, determine the IP address corresponding to the queried domain name.

[0042] UPF cache data includes all or part of a domain name, and data related to the IP address corresponding to that domain name.

[0043] For example, UPF cache data includes DNS cache data. DNS cache data contains the mapping relationship between domain names and IP addresses. UPF queries the DNS cache data for the IP address corresponding to the domain name being queried.

[0044] Step 450: Send a DNS response containing the IP address corresponding to the queried domain name to the terminal device.

[0045] A DNS response is a response sent to a terminal device in response to a DNS query request.

[0046] The UPF sends a DNS response containing the IP address corresponding to the queried domain name to the terminal device. For example, the UPF sends the DNS response containing the IP address corresponding to the queried domain name to an access network device, which then forwards it to the terminal device.

[0047] As described above, the method according to this application causes a computer device for implementing UPF to perform domain name queries. Compared with related technologies that send DNS query requests to public network DNS servers via longer network communication paths, the method according to this application shortens the required network communication path and increases the domain name query speed because the computer device for implementing UPF completes the domain name query corresponding to the DNS query request based on UPF cache data before the DNS query request is sent to the public network DNS server. In addition, since it is not necessary for the DNS query request to reach the public network DNS server, the number of DNS query requests processed by the DNS server is reduced, thereby reducing the processing load on the public network DNS server. Furthermore, the method according to the embodiment of this application does not require the installation of new devices in the core network and can be implemented using existing computer devices for implementing UPF, thus reducing the cost of implementing the method according to this application. In addition, by performing domain name queries using existing computer devices for implementing UPF, there is no need to separately set complex offload rules, resulting in the advantages of high compatibility and low implementation difficulty.

[0048] Figure 5 is a flowchart of a domain name query method according to some exemplary embodiments of the present application. This embodiment will be described using as an example that the method is performed by a computer device for implementing the UPF shown in Figure 3. The method includes at least some of the following steps.

[0049] Step 510: Receive a DNS query request from the terminal device that includes the domain name to be queried.

[0050] DNS query requests originate from the terminal device.

[0051] The terminal device sends a DNS query request for the target domain name to a DNS server on the data network. The DNS query request must pass through a network device, which is either an access network device or a core network device.

[0052] In some embodiments, a DNS query request includes: DNS query requests based on the User Datagram Protocol (UDP), DNS query requests based on the Transmission Control Protocol (TCP), It includes at least one DNS query request based on the Hypertext Transfer Protocol (HTTP).

[0053] In other words, a DNS query request is at least one of the following: a UDP-based DNS query request, a TCP-based DNS query request, and an HTTP-based DNS query request. That is, the method according to the embodiments of this application supports the processing of various DNS query requests, can be applied to a wider range of scenarios, and has high compatibility across various application scenarios.

[0054] Step 530: Based on the UPF cache data, determine the IP address corresponding to the queried domain name.

[0055] UPF cache data includes data related to domain names and the IP addresses corresponding to those domain names.

[0056] In some embodiments, UPF cache data includes DNS cache data, which is data relating to the mapping relationship between domain names and IP addresses. UPF queries the DNS cache data for the IP address corresponding to the domain name being queried. UPF cache data or UPF DNS cache data originates from DNS servers on the data network.

[0057] In some embodiments, the UPF cache data includes: Hot update cache data and, Regularly cached data and, Default cache data and, Static cache data and, It includes at least one of the dynamic cached data.

[0058] Hot update refers to an update method that updates the device in real time without requiring a restart or shutdown. Hot update cache data refers to data cached in the UPF by a hot update. Periodic cache data refers to data cached in the UPF within a set period, or data cached in the UPF in periodic mode, or data cached in the UPF in semi-periodic mode. Default cache data refers to data cached in the UPF using a pre-configured method, or initial cache data within the UPF. Static cache data refers to data cached in the UPF using a static caching method. Dynamic cache data refers to data cached in the UPF using a dynamic caching method.

[0059] In some embodiments, the UPF performs a hot update cache during operation when it receives a hot update cache request or hot update cache information from a DNS server, or when the hot update cache conditions are met. Based on the hot update cache request, hot update cache information, or hot update cache conditions, the UPF updates the data related to domain names and the IP addresses corresponding to those domain names in its cached data in real time. The data obtained after the real-time update is hot update cache data, or the data after the real-time update that is different from the data before the real-time update is hot update cache data.

[0060] For example, when the UPF's operating time reaches a first threshold, the UPF clears its cached data or UPF's DNS cached data, receives a DNS response from the DNS server based on the terminal device's DNS query request, and temporarily stores the domain name and the data related to the IP address corresponding to that domain name in the UPF's cached data or UPF's DNS cached data, thereby realizing a hot update cache. Here, the first threshold is predefined, pre-configured, autonomously determined by the UPF, or instructed by the DNS server. This update method can be implemented without shutting down or restarting the UPF, so the update process has little impact on terminal devices, and real-time updates of the UPF's cached data can be achieved while satisfying the domain name query requirements of terminal devices. Furthermore, this update method contributes to properly synchronizing the UPF's cached data with changes in DNS services within the data network, improving the timeliness of the UPF's DNS cached data.

[0061] In some embodiments, if the UPF receives a periodic cache request from a DNS server, receives periodic cache information from a DNS server, receives timer information, or satisfies periodic cache conditions, the UPF performs periodic caching based on a predetermined time within the periodic cache request, periodic cache information, timer information, or periodic cache conditions. Based on the periodic cache request, periodic cache information, timer information, or periodic cache conditions, the UPF updates the data related to domain names and IP addresses corresponding to those domain names within its cached data. The data obtained after the update is periodic cache data, or updated data that differs from the data before the update is periodic cache data. Here, the timer is predefined, pre-configured, autonomously determined by the UPF, or instructed by the DNS server. The periodic cache conditions are predefined, pre-configured, autonomously determined by the UPF, or instructed by the DNS server.

[0062] For example, when the time until the last update of UPF cache data reaches a second threshold, a data update request is sent to the DNS server, a data update response is received from the DNS server, and data related to the domain name and the IP address corresponding to that domain name in the data update response is temporarily stored in the UPF cache data or UPF DNS cache data, thereby achieving periodic caching. Here, the second threshold is predefined, pre-configured, autonomously determined by UPF, or instructed by the DNS server. This update method can be triggered by the DNS server, making its implementation more flexible, and can be autonomously triggered by UPF based on time, thus reducing wasted signaling resources. Furthermore, this update method can contribute to properly synchronizing UPF cache data with changes in DNS services within the data network, thereby improving the timeliness of UPF DNS cache data.

[0063] In some embodiments, the UPF performs default caching if it receives an initial cache request, initial cache information, a configuration cache request, configuration cache information, a preconfiguration cache request, preconfiguration cache information, or if the default cache conditions are met during the startup, initialization, configuration, or preconfiguration phases. Based on the initial cache request or initial cache information, or the configuration cache request or configuration cache information, or the preconfiguration cache request or preconfiguration cache information, or the default cache conditions, the UPF updates the data related to domain names and IP addresses corresponding to those domain names in its cache data. The data obtained after the update is the default cache data, and the updated data that differs from the data before the update is the default cache data.

[0064] For example, during the startup phase, UPF initializes its cache data, sends a data update request to the DNS server, receives a data update response from the DNS server, and temporarily stores the domain name and the IP address associated with that domain name in the data update response in UPF's cache data or UPF's DNS cache data, thereby performing default caching. This update method allows UPF to meet the domain name query requirements of some terminal devices when it first starts providing domain name query services, thus improving the efficiency of UPF's processing of domain name query requests.

[0065] In some embodiments, when static caching is required, for example, when UPF receives a static cache request or static cache information, or when static cache conditions are met, UPF performs static caching. Based on the static cache request, static cache information, or static cache conditions, UPF updates the data related to domain names and IP addresses corresponding to those domain names in its cached data. The data obtained after the update is static cached data, or updated data that differs from the data before the update is static cached data. This update method contributes to properly synchronizing UPF cached data with changes in DNS services within the data network, and can improve the timeliness of UPF's DNS cached data.

[0066] In some embodiments, when dynamic caching is required, for example, when UPF receives a dynamic cache request or dynamic cache information, or when dynamic cache conditions are met, UPF performs dynamic caching. Based on the dynamic cache request, dynamic cache information, or dynamic cache conditions, UPF updates the data related to domain names and IP addresses corresponding to those domain names in its cached data. The data obtained after the update is dynamic cached data, or updated data that is different from the data before the update is dynamic cached data. This update method contributes to properly synchronizing UPF cached data with changes in DNS services within the data network, and can improve the timeliness of UPF's DNS cached data.

[0067] Step 550: Generate a DNS response that includes the IP address corresponding to the queried domain name.

[0068] If the IP address corresponding to the queried domain name is included in the UPF's cached data, the UPF generates a DNS response based on the obtained IP address corresponding to the queried domain name.

[0069] UPF generates a DNS response based on the mapping relationship between the queried domain name and IP address obtained.

[0070] Step 570: Send a DNS response containing the IP address corresponding to the queried domain name to the terminal device.

[0071] The DNS response is sent to the terminal device.

[0072] The UPF sends a DNS response containing the IP address corresponding to the queried domain name to the terminal device. For example, the UPF sends the DNS response containing the IP address corresponding to the queried domain name to an access network device, which then transmits it to the terminal device.

[0073] As described above, in the method according to this application, if the IP address corresponding to the domain name to be queried is included in the UPF cache data, the computer device implementing the UPF completes the domain name query corresponding to the DNS query request based on the UPF cache data. Compared to sending the DNS query request to a DNS server in the public network, the required network communication path is shortened, and the domain name query speed can be increased. In addition, since it is not necessary for the DNS query request to reach a DNS server in the public network, the number of DNS query requests processed by the DNS server can be reduced, thereby reducing the processing load on the DNS server in the public network.

[0074] Figure 6 is a flowchart of a domain name query method according to some exemplary embodiments of the present application. This embodiment will be described using as an example that the method is performed by a computer device for implementing the UPF shown in Figure 3. The method includes at least some of the following steps.

[0075] Step 610: Receive a DNS query request from the terminal device that includes the domain name to be queried.

[0076] DNS query requests originate from the terminal device.

[0077] The terminal device sends a DNS query request containing the target domain name to a DNS server on the data network. The DNS query request must pass through a network device, which is either an access network device or a core network device. The source address of this DNS query request is the terminal device's address, and the target address is the DNS server's address.

[0078] In some embodiments, a DNS query request includes: DNS query requests based on UDP, TCP-based DNS query requests and It includes at least one DNS query request based on HTTP.

[0079] In other words, in some embodiments, a DNS query request is at least one of the following: a UDP-based DNS query request, a TCP-based DNS query request, and an HTTP-based DNS query request.

[0080] Step 630: Query the IP address corresponding to the domain name being queried within the UPF cache data.

[0081] UPF cache data includes data related to domain names and the IP addresses corresponding to those domain names.

[0082] UPF cache data includes DNS cache data. DNS cache data refers to data related to the mapping relationship between domain names and IP addresses. For example, UPF queries the IP address corresponding to the domain name being queried within its cache data.

[0083] In some embodiments, the UPF cache data includes: Hot update cache data and, Regularly cached data and, Default cache data and, Static cache data and, It includes at least one of the dynamic cached data.

[0084] Hot update refers to an update method that updates the device in real time without requiring a restart or shutdown. Hot update cache data refers to data cached in the UPF by a hot update. Periodic cache data refers to data cached in the UPF at a set time, or periodically, or semi-periodically. Default cache data refers to data cached in the UPF using a pre-configured method, or initial cache data within the UPF. Static cache data refers to data cached in the UPF using a static caching method. Dynamic cache data refers to data cached in the UPF using a dynamic caching method.

[0085] Step 650: Receive a DNS response that contains the IP address corresponding to the queried domain name.

[0086] If the UPF cache data does not contain an IP address corresponding to the queried domain name, it can send a DNS query request to a DNS server and receive a DNS response from the DNS server. This DNS server is located on the data network. This DNS response contains either the IP address corresponding to the queried domain name, or the mapping relationship between the queried domain name and the IP address.

[0087] The UPF receives DNS responses from the data network. These DNS responses either contain the IP address corresponding to the queried domain name, or they contain the mapping relationship between the queried domain name and the IP address.

[0088] For example, this DNS response is generated by a DNS server within the data network. The source address of this DNS response is the address of the DNS server, and the target address of this DNS response is the address of the terminal device.

[0089] Step 670: Send a DNS response containing the IP address corresponding to the queried domain name to the terminal device.

[0090] The DNS response is sent to the terminal device.

[0091] UPF ensures that DNS responses containing the IP addresses corresponding to the queried domain names are sent to terminal devices. For example, UPF sends DNS responses containing the IP addresses corresponding to the queried domain names to an access network device, which then forwards them to terminal devices.

[0092] Step 690: Save the IP address corresponding to the domain name being queried.

[0093] UPF stores the IP address corresponding to the queried domain name in the received DNS response in UPF cache data or UPF DNS cache data. UPF also stores the mapping relationship between the queried domain name and the IP address in the received DNS response in UPF cache data or UPF DNS cache data.

[0094] As described above, in the method according to this application, if the IP address corresponding to the queried domain name is not included in the UPF cache data, the DNS query request is sent to the DNS server, the DNS server performs a query for the domain name corresponding to the DNS query request, and further, the IP address corresponding to the queried domain name obtained from the DNS server is stored in the UPF cache data. In other words, the correspondence between the queried domain name and the IP address is stored in the UPF cache data, thereby enriching the correspondence between domain names and IP addresses stored in the UPF cache data. This makes it easier for the computer device implementing UPF to directly respond to more DNS query requests in the future, increases the speed and efficiency of domain name queries, and reduces the processing load on DNS servers on public networks.

[0095] Figure 7 is a schematic diagram of a domain name query method according to several exemplary embodiments of this application. This domain name query method will be described in general terms, using the communication system 200 shown in Figure 2 as an example.

[0096] Terminal device 701 sends a DNS query request that includes the domain name to be queried. The target address of this DNS query request is the address of DNS server 702 on the data network. For the DNS query request to reach DNS server 702, it must pass through network devices that include the access network 703 and the core network 704.

[0097] When UPF7042 (i.e., the computer device that implements UPF) receives a DNS query request, it determines the IP address corresponding to the queried domain name based on its cached data. UPF7042 is located on core network 704.

[0098] UPF7042 sends a DNS response to terminal device 701 that contains the IP address corresponding to the queried domain name. The DNS response must pass through access network 703 to reach terminal device 701.

[0099] This DNS response is generated by UPF7042 or DNS server 702.

[0100] When a DNS response is generated by UPF7042, UPF7042 generates the DNS response based on the IP address corresponding to the queried domain name in its cached data before sending the DNS response to terminal device 701. For the sake of distinction, the DNS response generated by UPF7042 is referred to here as the first DNS response.

[0101] When a DNS response is generated by DNS server 702, UPF7042 receives the DNS query request, sends the request to DNS server 702, and receives the DNS response returned by DNS server 702. UPF7042 also stores the mapping relationship between the queried domain name and IP address in the DNS response in its cache data. For distinction, the DNS response generated by DNS server 702 is referred to as the second DNS response.

[0102] As described above, in the method according to this application, if the IP address corresponding to the queried domain name is not included in the UPF cache data, the DNS query request is sent to the DNS server, the DNS server performs a query for the domain name corresponding to the DNS query request, and further, the IP address corresponding to the queried domain name obtained from the DNS server is stored in the UPF cache data. In other words, the correspondence between the queried domain name and the IP address is stored in the UPF cache data, thereby enriching the correspondence between domain names and IP addresses stored in the UPF cache data. This makes it easier for the computer device implementing UPF to directly respond to more DNS query requests in the future, increases the speed and efficiency of domain name queries, and reduces the processing load on DNS servers on public networks.

[0103] Figure 8 is a flowchart of a domain name query method according to some exemplary embodiments of the present application. This embodiment will be described using as an example that the method is performed by a computer device for implementing the UPF shown in Figure 3. The method includes at least some of the following steps.

[0104] Step 8010: Receive uplink data packets from the terminal device.

[0105] The UPF receives uplink data packets from terminal devices. The target address of these uplink data packets is the address of the DNS server. Here, the DNS server is located on the data network, the UPF is located on the core network, and the data network is connected to the core network.

[0106] When a terminal device expects or needs to obtain an IP address corresponding to a domain name, it includes a DNS query request in its uplink data packet and sends it to the network device. A DNS query request asks for the IP address corresponding to a domain name. Here, a DNS query request is also called a DNS resolution request.

[0107] The domain name corresponding to the IP address that the terminal device expected or needed to obtain is the domain name being queried, and it may also be understood that the domain name that the terminal device expected or needed to query is, in other words, the domain name being queried.

[0108] In some embodiments, a DNS query request includes: DNS query requests based on UDP, TCP-based DNS query requests and It includes at least one DNS query request based on HTTP.

[0109] In other words, a DNS query request is at least one of the following: a DNS query request based on UDP, a DNS query request based on TCP, or a DNS query request based on HTTP.

[0110] In some embodiments, a terminal device transmits an uplink data packet to an access network device, which then forwards the uplink data packet to the UPF. The access network device transmits the uplink data packet to the core network, where it is exchanged between functional entities within the core network before being delivered to the UPF.

[0111] Step 8020: Extract DNS query requests from uplink data packets.

[0112] The DNS request module detects whether the uplink data packet contains a DNS query request based on at least one of the target address and destination port of the message in the uplink data packet.

[0113] UPF detects a DNS query request within an uplink data packet if the target address of a message in the uplink data packet is a DNS server in the data network, or if the destination port of a message in the uplink data packet matches a port of the DNS resolution protocol. Here, the DNS resolution protocol includes at least one of UDP, TCP, or HTTP.

[0114] A data network includes at least one of the following: the Internet, a Wide Area Network (WAN), a Local Area Network (LAN), or a Private Network.

[0115] A DNS server within a data network is a public domain name resolution server, or a public domain name resolution server, a wide area network domain name resolution server, a local area network domain name resolution server, or a private network domain name resolution server.

[0116] The IP addresses of DNS servers within a data network are configured, pre-configured, pre-defined, or pre-defined by the communication protocol.

[0117] Step 8030: Resolve the queried domain name from the DNS query request.

[0118] In some embodiments, UPF processes DNS query requests using a domain name query model.

[0119] UPF obtains a recommended processing method for a DNS query request by inputting at least one of the following pieces of information into its domain name query model: the domain name to be queried, the IP address of the terminal device, the time the DNS query request was received, and the local area network identifier to which the terminal device belongs. Based on the recommended processing method, UPF processes the DNS query request.

[0120] For example, if the DNS query request is received during a busy period, the recommended processing method obtained by the domain name query model is to generate a DNS response from the UPF, in which case at least the following steps 8040, 8050, and 8080 are executed. If the DNS query request is received during an idle period, the recommended processing method obtained by the domain name query model is to generate a DNS response from the DNS server, in which case at least the following steps 8060, 8070, and 8080 are executed.

[0121] A busy period refers to the duration during which the UPF (Universal File Processor) is in a busy state. This period is predicted by a domain name query model based on past DNS query requests. For example, the domain name query model predicts the duration of a busy state for the UPF based on the processing time of past DNS query requests. If the processing time of past DNS query requests is greater than a first time threshold, it indicates that the UPF is in a busy state. Conversely, if the processing time of past DNS query requests is less than the first time threshold, it indicates that the UPF is not in a busy state.

[0122] The idle period refers to the period during which the UPF is in an idle state. This period is predicted by the domain name query model based on past DNS query requests. For example, the domain name query model predicts the period during which the UPF will be idle based on the processing time of past DNS query requests. If the processing time of past DNS query requests is less than a second time threshold, it indicates that the UPF is idle. On the other hand, if the processing time of past DNS query requests is greater than the second time threshold, it indicates that the UPF is not idle.

[0123] The first and second time thresholds may be the same or different. The first time threshold is predefined, pre-configured, autonomously determined by UPF, or instructed by the DNS server. The second time threshold is predefined, pre-configured, autonomously determined by UPF, or instructed by the DNS server.

[0124] For example, if the local area network identifier to which the terminal device belongs corresponds to the first identifier, the recommended processing method obtained through the domain name query model is to generate a DNS response from the DNS server, in which case at least the subsequent steps 8060, 8070, and 8080 are executed. On the other hand, if the local area network identifier to which the terminal device belongs corresponds to the second identifier, the recommended processing method obtained through the domain name query model is to generate a DNS response from the UPF, in which case at least the subsequent steps 8040, 8050, and 8080 are executed.

[0125] The first identifier is predicted by the domain name query model based on past DNS query requests. For example, the domain name query model predicts the first identifier based on how past DNS query requests were processed (whether the DNS response corresponding to a terminal device within a local area network was generated by UPF or by a DNS server). If the local area network identifier to which the terminal device belongs corresponds to the first identifier, it means that the probability that the IP address corresponding to the domain name queried by this terminal device within this local area network exists in the UPF cache data is lower than the first probability threshold, meaning that the UPF cache data is likely not to contain the IP address corresponding to the domain name queried by this terminal device within this local area network.

[0126] The second identifier is predicted by the domain name query model based on past DNS query requests. For example, the domain name query model predicts the second identifier based on how past DNS query requests were processed (whether the DNS response corresponding to a terminal device within a local area network was generated by UPF or by a DNS server). If the local area network identifier to which the terminal device belongs corresponds to the second identifier, it means that the probability that the IP address corresponding to the domain name queried by the terminal device within this local area network exists in the UPF cache data is higher than the second probability threshold, meaning that the UPF cache data has a high probability of containing the IP address corresponding to the domain name queried by the terminal device within the local area network.

[0127] In this context, the first probability threshold and the second probability threshold may be the same or different. The first probability threshold is either predefined, pre-configured, autonomously determined by UPF, or indicated by the DNS server. The second probability threshold is either predefined, pre-configured, autonomously determined by UPF, or indicated by the DNS server.

[0128] Step 8040: Query the IP address corresponding to the domain name being queried within the UPF cache data.

[0129] Here, UPF cache data is provided from DNS servers on the data network.

[0130] UPF cache data includes data related to domain names and the IP addresses corresponding to those domain names.

[0131] UPF cache data includes DNS cache data. DNS cache data refers to data related to the mapping relationship between domain names and IP addresses. For example, when UPF queries the IP address corresponding to the queried domain name within its DNS cache data, it can be understood as UPF querying the mapping relationship between the queried domain name and IP address within its DNS cache data.

[0132] Step 8050: Generate a first DNS response that includes the IP address corresponding to the queried domain name.

[0133] It is understood that the IP address corresponding to the queried domain name is included in the UPF cache data, or that the mapping relationship between the queried domain name and its IP address is included in the UPF cache data.

[0134] It is understood that either the IP address corresponding to the queried domain name is included in the UPF's DNS cache data, or the mapping relationship between the queried domain name and its IP address is included in the UPF's DNS cache data.

[0135] UPF generates a first DNS response based on the IP address corresponding to the obtained queried domain name. UPF generates a first DNS response based on the mapping relationship between the obtained queried domain name and IP address.

[0136] Step 8060: Receive a second DNS response containing the IP address corresponding to the queried domain name.

[0137] In some embodiments, it is understood that the IP address corresponding to the queried domain name is not included in the UPF cache data, or that the mapping relationship between the queried domain name and the IP address is not included in the UPF cache data.

[0138] In some embodiments, it is understood that the IP address corresponding to the queried domain name is not included in the UPF's DNS cache data, or that the mapping relationship between the queried domain name and the IP address is not included in the UPF's DNS cache data.

[0139] In some embodiments, the UPF receives a second DNS response from the data network. The source address of this second DNS response is the address of the DNS server, and the target address is the address of the terminal device.

[0140] Step 8070: Store the IP address corresponding to the queried domain name included in the second DNS response in the UPF cache data.

[0141] In some embodiments, the UPF stores the mapping relationship between the queried domain name and IP address included in the second DNS response in the UPF's cache data.

[0142] Step 8080: Send DNS response.

[0143] This DNS response is either the first DNS response or the second DNS response.

[0144] In some embodiments, the DNS response includes the IP address corresponding to the queried domain name, or the DNS response includes the mapping relationship between the queried domain name and the IP address.

[0145] In some embodiments, the UPF sends a DNS response to an access network device, which then forwards the DNS response to a terminal device.

[0146] As described above, the method according to this application analyzes the uplink data packet sent from the terminal device to the DNS server, obtains a DNS query request from it, and obtains the domain name to be queried included in the DNS query request. If the IP address corresponding to the queried domain name is included in the UPF cache data, the UPF can directly complete the domain name query corresponding to this DNS query request based on the UPF cache data, obtain the IP address corresponding to this queried domain name, and feed it back to the terminal device. Compared to sending the DNS query request to a DNS server in the public network, the required network communication path is shortened, and the domain name query speed can be increased. In addition, since it is not necessary to send the DNS query request to a DNS server in the public network, the number of DNS query requests processed by the DNS server can be reduced, and the processing load on the DNS server in the public network can be reduced. On the other hand, if the IP address corresponding to the queried domain name is not included in the UPF cache data, the computer device implementing UPF can send this DNS query request to the DNS server, receive the data packet fed back from the DNS server, extract the DNS response from this data packet, resolve the IP address corresponding to the queried domain name from this DNS response, and further store the correspondence between this queried domain name and IP address in the UPF cache data. This ensures that domain name queries are executed reliably, while simultaneously enriching the correspondence between domain names and IP addresses stored in the UPF cache data. This makes it easier for computer devices implementing UPF to directly respond to more DNS query requests in the future, increasing the speed and efficiency of domain name queries and reducing the processing load on DNS servers on public networks.

[0147] In some embodiments, step 8060 described above may be implemented as at least part of the following steps 8061, 8063, 8065, and 8067, as shown in Figure 9. In the embodiments of this application, the computer device for implementing the UPF is abbreviated as UPF.

[0148] Step 8061: UPF sends a DNS query request to the DNS server.

[0149] This DNS query request includes the domain name being queried from the terminal device.

[0150] In some embodiments, the DNS server resides on the data network.

[0151] In some embodiments, the data network includes at least one of the Internet, a WAN, a LAN, and a private network.

[0152] Step 8063: UPF receives data packets from the DNS server.

[0153] In some embodiments, the DNS server sends a second DNS response to the UPF.

[0154] In some embodiments, the DNS server sends a second DNS response to the core network, which then communicates with functional entities within the core network before delivering the second DNS response to the UPF.

[0155] In some embodiments, the DNS server includes a second DNS response in a data packet and sends it to the core network.

[0156] In some embodiments, the DNS server sends a data packet to the core network, where it is exchanged with functional entities within the core network, and then delivers the data packet to the UPF. The data packet contains a second DNS response.

[0157] In some embodiments, the DNS server queries either the IP address corresponding to the queried domain name, or the mapping relationship between the queried domain name and the IP address, based on the queried domain name contained in the received DNS query request.

[0158] In some embodiments, the DNS server generates a second DNS response based on the IP address corresponding to the obtained queried domain name, or based on the mapping relationship between the obtained queried domain name and the IP address.

[0159] In some embodiments, the second DNS response is generated by the DNS server.

[0160] In some embodiments, the DNS server is the same as the DNS server within the data network.

[0161] In some embodiments, the DNS server in the data network is a public domain name resolution server, or the DNS server in the data network is a domain name resolution server in a public network, a domain name resolution server in a wide area network, a domain name resolution server in a local area network, or a domain name resolution server in a private network.

[0162] Step 8065: UPF extracts the second DNS response from the data packet.

[0163] UPF detects the data packet and then detects the second DNS response within the data packet.

[0164] Step 8067: UPF resolves the IP address corresponding to the queried domain name from the second DNS response.

[0165] In some embodiments, the UPF analyzes the second DNS response to obtain the mapping relationship between the queried domain name and the IP address.

[0166] In some embodiments, some or all of the steps performed by UPF above are performed by the UPF Basic Module within UPF.

[0167] In some embodiments, the UPF Basic Module within the UPF is used to implement the basic functions of the UPF, or the UPF Basic Module within the UPF is used to implement indirect processing functions for domain name queries, or the UPF Basic Module within the UPF is used to implement processing functions for domain name queries.

[0168] In some embodiments, some or all of the steps performed by UPF above are performed by the DNS module within UPF.

[0169] In some embodiments, the UPF Basic Module within the UPF is used to implement non-basic functions of the UPF, or the UPF Basic Module within the UPF is used to implement functions related to the processing of domain name queries.

[0170] In some embodiments, the DNS module within the UPF includes at least one of the following: a DNS request module, a DNS cache module, and a DNS response module.

[0171] Figure 10 is a flowchart of a domain name query method according to several embodiments of this application. This embodiment will be described using as an example that the method is performed by the communication system 200 shown in Figure 2, and that the computer device for implementing UPF includes at least a UPF basic module, a DNS request module, and a DNS cache module. This method includes at least some of the following steps.

[0172] Step 1001: The terminal device sends an uplink IP packet to the base station.

[0173] Let's take the example of a case where the domain name that a terminal device expects or needs to query is designated as an Internet business domain name.

[0174] The terminal device initiates access to the internet service, embedding a DNS query request in an uplink IP packet and sending it to the network device. The source address of this uplink IP packet is the terminal device's address, and the target address is the DNS server's address, which is located on the data network. The DNS query request requests the IP address corresponding to the internet service domain name. Here, the DNS query request is also called a DNS resolution request. This internet business domain name is the domain name being queried.

[0175] In some embodiments, a DNS query request includes: DNS query requests based on UDP, TCP-based DNS query requests and It includes at least one DNS query request based on HTTP.

[0176] In other words, in some embodiments, a DNS query request is at least one of the following: a UDP-based DNS query request, a TCP-based DNS query request, and an HTTP-based DNS query request.

[0177] In some embodiments, the uplink IP packet includes a DNS query request and the IP address of the terminal device. The DNS query request includes the domain name to be queried.

[0178] Step 1002: The base station forwards the uplink IP packet to the UPF.

[0179] In other words, the base station, acting as an access network device, forwards uplink IP packets from terminal devices to the core network. As a result, the uplink IP packets reach the UPF within the core network.

[0180] Step 1003: The UPF basic module receives the uplink IP packet and forwards it to the DNS request module.

[0181] Step 1004: The DNS request module detects the uplink IP packet and parses the DNS query request.

[0182] In some embodiments, a DNS Request Module (DNS RequestFilter, DNS-ReqFilter) detects and parses DNS query requests, detecting them from uplink IP messages or uplink IP packets, parsing them, and retrieving the domain name field within the query, thereby obtaining the domain name being queried. By detecting and parsing DNS query requests from uplink IP packets, the DNS Request Module allows for processing before the query is sent to the DNS server. This eliminates resource consumption on the communication path from the DNS Request Module to the DNS server, saves processing time for DNS query requests, and improves the efficiency of DNS query request processing.

[0183] In some embodiments, the DNS request module detects whether the uplink IP message or uplink IP packet contains a DNS query request, according to at least one of the target address and destination port of the uplink IP message.

[0184] In some embodiments, if the target address of an uplink IP message is a DNS server in the data network, or if the destination port of an uplink IP message matches a port of a DNS resolution protocol, the DNS request module may detect a DNS query request from the uplink IP message or uplink IP packet. Here, the DNS resolution protocol includes at least one of UDP, TCP, or HTTP.

[0185] For example, if the target address of an uplink IP message is a DNS server on the public network (IP address 8.8.8.8 or 114.114.114.114), and the destination port of the UDP message included by the DNS query request is 53, then it is determined that this uplink IP message or uplink IP packet contains a DNS query request, meaning that a DNS query request has been detected in this uplink IP message or uplink IP packet.

[0186] In some embodiments, the IP addresses of DNS servers within a data network are configured, preconfigured, predefined, or predefined by a communication protocol.

[0187] In some embodiments, the IP address of a DNS server within a data network is not limited to the IP address of a general public network DNS server (such as 8.8.8.8 or 114.114.114.114).

[0188] Step 1005: The DNS request module sends the domain name to be queried to the DNS cache module.

[0189] Step 1006: The DNS cache module queries for the IP address corresponding to the domain name.

[0190] In some embodiments, a DNS cache module (DNS Cache) enables querying and caching of the mapping relationship between domain names and IP addresses. In other words, the DNS cache module enables querying and caching of IP addresses corresponding to domain names.

[0191] In some embodiments, the DNS cache module receives a domain name query request sent from the DNS request module and completes the query for the mapping relationship between domain names and IP addresses, or the query for the IP address corresponding to the domain name.

[0192] In some embodiments, a domain name query request sent from a DNS request module can be considered a local domain name query request for the UPF.

[0193] In some embodiments, a query for a mapping relationship between a domain name and an IP address can also be considered as a search for a mapping relationship between a domain name and an IP address. A query for an IP address corresponding to a domain name can also be considered as a search for an IP address corresponding to a domain name.

[0194] In some embodiments, the DNS cache module queries or retrieves a mapping relationship between a domain name and an IP address from the UPF's DNS cache data, or the DNS cache module queries or retrieves an IP address corresponding to a domain name from the UPF's DNS cache data.

[0195] In some embodiments, the UPF cache data or UPF DNS cache data includes at least one of hot-update cache data, periodic cache data, default cache data, static cache data, and dynamic cache data, thereby effectively synchronizing the UPF cache data with changes in DNS services within the data network and improving the timeliness of the UPF cache data.

[0196] In some embodiments, if the IP address corresponding to the queried domain name or the mapping relationship between the queried domain name and the IP address is included in the UPF cache data or the UPF DNS cache data, step 1007 is performed.

[0197] Step 1007: The DNS cache module sends the IP address corresponding to the queried domain name to the DNS request module.

[0198] In some embodiments, the DNS cache module sends the mapping relationship between the queried or looked-up domain name and its IP address to the DNS request module, or the DNS cache module sends the IP address corresponding to the queried or looked-up domain name to the DNS request module. It may also be understood that the DNS cache module returns the mapping relationship between the queried or looked-up domain name and its IP address to the DNS request module, or the DNS cache module returns the IP address corresponding to the queried or looked-up domain name to the DNS request module.

[0199] Step 1008: The DNS request module generates the first DNS response.

[0200] The DNS request module generates a first DNS response based on the IP address corresponding to the queried domain name from the DNS cache module, or the DNS cache module generates a first DNS response based on the mapping relationship between the queried domain name and its IP address from the DNS cache module. The first DNS response includes the IP address corresponding to the queried domain name. Because the DNS request module generates the DNS response, the DNS query request can be processed before it is sent to the DNS server. This eliminates resource consumption in the communication path from the DNS request module to the DNS server, eliminates resource consumption by the DNS server in processing the DNS query request, saves processing time for the DNS query request, and improves the efficiency of DNS query request processing.

[0201] Step 1009: The DNS request module sends the first DNS response to the UPF base module.

[0202] In some embodiments, the DNS request module sends a data message of the first DNS response to the UPF base module.

[0203] Step 1010: The UPF basic module sends the first DNS response to the base station.

[0204] In some embodiments, the UPF base module performs processing such as packaging on the first DNS response and sends the processed first DNS response to the terminal device.

[0205] In some embodiments, the UPF base module transmits a first DNS response via a tunnel to an access network such as a base station, and the access network delivers the first DNS response to a terminal device.

[0206] Step 1011: The base station sends the first DNS response to the terminal device.

[0207] In some embodiments, a terminal device accesses an Internet service using an IP address corresponding to the queried domain name included in a first DNS response, based on the first DNS response it receives.

[0208] In some embodiments, the UPF base module, DNS request module, and DNS cache module described above have their corresponding functions implemented by software or a program.

[0209] In some embodiments, the UPF base module, DNS request module, and DNS cache module described above are considered to be part or all of the UPF as a whole.

[0210] Based on the above, the method according to this application supports domain name queries by the UPF basic module, DNS request module, and DNS cache module within the UPF. Compared with related technologies that send DNS query requests to public network DNS servers via longer network communication paths, the method according to this application supports the completion of domain name queries corresponding to DNS query requests based on UPF cache data before the DNS query requests are sent to public network DNS servers. This shortens the required network communication path and increases the domain name query speed. Furthermore, since it is not necessary for DNS query requests to reach public network DNS servers, the number of DNS query requests processed by DNS servers is reduced, thereby easing the processing load on public network DNS servers. In addition, the method according to the embodiments of this application does not require the installation of new devices in the core network and can be implemented using existing computer devices for implementing UPF, thus reducing the cost of implementing the method according to this application. Moreover, by performing domain name queries using existing computer devices for implementing UPF, there is no need to separately set complex offload rules, resulting in the advantages of high compatibility and low implementation difficulty.

[0211] Figure 11 is a flowchart of a domain name query method according to several embodiments of the present application. These embodiments describe the method as being executed by a UPF computer device shown in Figure 3, and the UPF includes at least a UPF base module, a DNS request module, a DNS cache module, and a DNS response module. The method includes at least some of the following steps.

[0212] Step 1101: The terminal device sends an uplink IP packet to the base station.

[0213] Let's take the example of a case where the domain name that a terminal device expects or needs to query is designated as an Internet business domain name.

[0214] The terminal device initiates access to the internet service, embedding a DNS query request in an uplink IP packet and sending it to the network device. The source address of this uplink IP packet is the terminal device's address, and the target address is the DNS server's address, which is located on the data network. The DNS query request requests the IP address corresponding to the internet service domain name. Here, the DNS query request is also called a DNS resolution request. This internet business domain name is the domain name being queried.

[0215] In some embodiments, a DNS query request includes: DNS query requests based on UDP, TCP-based DNS query requests and It includes at least one DNS query request based on HTTP.

[0216] In other words, in some embodiments, a DNS query request is at least one of the following: a UDP-based DNS query request, a TCP-based DNS query request, and an HTTP-based DNS query request.

[0217] In some embodiments, the uplink IP packet includes a DNS query request and the IP address of the terminal device. The DNS query request includes the domain name to be queried.

[0218] Step 1102: The base station forwards the uplink IP packet to the UPF.

[0219] In other words, the base station, acting as an access network device, forwards uplink IP packets from terminal devices to the core network. As a result, the uplink IP packets reach the UPF within the core network.

[0220] Step 1103: The UPF basic module receives the uplink IP packet and forwards it to the DNS request module.

[0221] Step 1104: The DNS request module detects the uplink IP packet and parses the DNS query request.

[0222] In some embodiments, the DNS request module is responsible for detecting and resolving DNS query requests, detecting DNS query requests from uplink IP messages or uplink IP packets, parsing these DNS query requests, retrieving the domain name field within the DNS query request, and thereby obtaining the domain name being queried within the DNS query request.

[0223] In some embodiments, the DNS request module detects whether the uplink IP message or uplink IP packet contains a DNS query request based on at least one of the target address and destination port of the uplink IP message.

[0224] In some embodiments, if the target address of an uplink IP message is a DNS server in the data network, or if the destination port of an uplink IP packet matches a port of a DNS resolution protocol, the DNS request module detects a DNS query request from the uplink IP message or uplink IP packet. Here, the DNS resolution protocol includes at least one of UDP, TCP, and HTTP.

[0225] For example, if the target address of an uplink IP message is a DNS server on the public network (IP address 8.8.8.8 or 114.114.114.114), and the destination port of the UDP message included by the DNS query request is 53, then it is determined that this uplink IP message or uplink IP packet contains a DNS query request, meaning that a DNS query request has been detected in this uplink IP message or uplink IP packet.

[0226] In some embodiments, the IP addresses of DNS servers within a data network are configured, preconfigured, predefined, or predefined by a communication protocol.

[0227] In some embodiments, the IP address of a DNS server within a data network is not limited to the IP address of a general public network DNS server (such as 8.8.8.8 or 114.114.114.114).

[0228] Step 1105: The DNS request module sends the domain name to be queried to the DNS cache module.

[0229] Step 1106: The DNS cache module queries for the IP address corresponding to the domain name.

[0230] In some embodiments, the DNS cache module enables querying and caching of the mapping relationship between domain names and IP addresses. In other words, the DNS cache module enables querying and caching of IP addresses corresponding to domain names.

[0231] In some embodiments, the DNS cache module receives a domain name query request sent from the DNS request module and queries the mapping relationship between domain names and IP addresses, or queries the IP address corresponding to the domain name.

[0232] In some embodiments, a domain name query request sent from a DNS request module can be considered a local domain name query request for the UPF.

[0233] In some embodiments, a query for a mapping relationship between a domain name and an IP address can also be considered as a search for a mapping relationship between a domain name and an IP address. A query for an IP address corresponding to a domain name can also be considered as a search for an IP address corresponding to a domain name.

[0234] In some embodiments, the DNS cache module queries or retrieves a mapping relationship between a domain name and an IP address from the UPF's DNS cache data, or the DNS cache module queries or retrieves an IP address corresponding to a domain name from the UPF's DNS cache data.

[0235] In some embodiments, the UPF cache data or UPF DNS cache data includes at least one of hot-update cache data, periodic cache data, default cache data, static cache data, and dynamic cache data, thereby effectively synchronizing the UPF cache data with changes in DNS services within the data network and improving the timeliness of the UPF cache data.

[0236] In some embodiments, if the IP address corresponding to the queried domain name is not included in the UPF cache data or the UPF DNS cache data, that is, if the UPF does not retrieve the IP address corresponding to the domain name or the mapping relationship between the domain name and the IP address from the UPF cache data or the UPF DNS cache data, step 1107 is performed.

[0237] Step 1107: The DNS cache module sends query failure feedback information to the DNS request module.

[0238] In some embodiments, if the DNS cache module fails to obtain a mapping relationship between a queried domain name and an IP address, or fails to obtain an IP address corresponding to a queried domain name, the DNS cache module either does not return a query result for the domain name to the DNS request module, or it returns a query failure result to the DNS request module. The query failure result may include a failed query for a mapping relationship between a queried domain name and an IP address, or a failed query for an IP address corresponding to a queried domain name.

[0239] In some embodiments, if the DNS cache module fails to obtain a mapping relationship between a queried domain name and an IP address through a query or lookup, or if the DNS cache module fails to obtain an IP address corresponding to the queried domain name through a query or lookup, it sends query failure feedback information to the DNS request module. The query failure feedback information indicates a query failure by the DNS cache module and includes the following: the DNS cache module failed to query for a mapping relationship between a queried domain name and an IP address; the DNS cache module failed to query for an IP address corresponding to the queried domain name; the DNS cache module did not obtain a mapping relationship between a queried domain name and an IP address from the UPF cache data; the DNS cache module did not obtain an IP address corresponding to the queried domain name from the UPF cache data; or the DNS cache module did not obtain a mapping relationship between a queried domain name and an IP address from the DNS cache data; or the DNS cache module did not obtain an IP address corresponding to the queried domain name from the DNS cache data.

[0240] Step 1108: The DNS request module sends a DNS query request to the UPF base module.

[0241] In some embodiments, if the DNS request module receives information from the DNS cache module indicating a query failure result or query failure feedback information, the DNS request module sends the DNS query request to the UPF base module.

[0242] In some embodiments, if the DNS request module does not receive a mapping relationship between a queried domain name and an IP address from the DNS cache module within a first period, or if the DNS request module does not receive an IP address corresponding to a queried domain name from the DNS cache module within a first period, the DNS request module sends a DNS query request to the UPF base module.

[0243] In some embodiments, the first period is set, pre-set, or pre-defined.

[0244] Step 1109: The UPF Basic Module sends a DNS query request to the data network.

[0245] In some embodiments, the UPF base module sends DNS query requests to DNS servers in the data network.

[0246] Step 1110: The UPF Basic Module receives the second DNS response.

[0247] The second DNS response contains the IP address corresponding to the queried domain name, provided from the data network. Here, the source address of the second DNS response is the address of the DNS server, and the target address is the address of the terminal device.

[0248] In some embodiments, the second DNS response is generated by a DNS server in the data network.

[0249] In some embodiments, the data network transmits a second DNS response in a downlink IP packet, where the source address of the downlink IP packet is the address of the DNS server and the target address is the address of the terminal device.

[0250] In some embodiments, the data network sends a downlink IP packet containing (or containing) a second DNS response to the core network. As a result, the downlink IP packet containing (or containing) the second DNS response reaches the UPF in the core network.

[0251] In some embodiments, the data network includes at least one of the Internet, a WAN, a LAN, and a private network.

[0252] In some embodiments, the data network queries either the IP address corresponding to the queried domain name or the mapping relationship between the queried domain name and the IP address, based on the queried domain name contained in the received DNS query request.

[0253] In some embodiments, the data network generates a second DNS response based on the IP address corresponding to the obtained queried domain name, or based on the mapping relationship between the obtained queried domain name and the IP address.

[0254] In some embodiments, the DNS server in the data network is a public domain name resolution server, or the DNS server in the data network is a domain name resolution server in a public network, a domain name resolution server in a wide area network, a domain name resolution server in a local area network, or a domain name resolution server in a private network.

[0255] Step 1111: The UPF base module sends the second DNS response to the DNS response module.

[0256] In some embodiments, the UPF base module sends a downlink IP packet containing (or containing) a second DNS response to the DNS response module, or the UPF base module sends a downlink IP message containing (or containing) a second DNS response to the DNS response module.

[0257] Step 1112: The DNS response module detects the second DNS response and parses the second DNS response.

[0258] In some embodiments, a DNS response module (DNS Response Filter, DNS-Resq Filter) enables the detection and resolution of DNS responses.

[0259] In some embodiments, the DNS response module detects whether the downlink IP message or downlink IP packet contains a DNS response based on at least one of the source address and source port of the downlink IP message.

[0260] In some embodiments, if the source address of a downlink IP message is a DNS server in the data network, or if the source port of a downlink IP message matches a port of a DNS resolution protocol, then a DNS response module may detect a DNS response from the downlink IP message or downlink IP packet. Here, the DNS resolution protocol includes at least one of UDP, TCP, or HTTP.

[0261] For example, if the source address of a downlink IP message is a DNS server on the public network (IP address 8.8.8.8 or 114.114.114.114), and the source port of the UDP message included in the DNS response is 53, then it is determined that the downlink IP message or downlink IP packet contains a DNS response, meaning that a DNS response has been detected from the downlink IP message or downlink IP packet.

[0262] In some embodiments, the IP addresses of DNS servers within a data network are configured, preconfigured, predefined, or predefined by a communication protocol.

[0263] In some embodiments, the IP address of a DNS server within a data network is not limited to the IP address of a general public network DNS server (such as 8.8.8.8 or 114.114.114.114).

[0264] In some embodiments, the DNS response module parses the second DNS response to obtain the domain name and the IP address corresponding to the domain name in the DNS response, or to obtain the mapping relationship between the domain name and the IP address in the DNS response. Here, the domain name in the DNS response includes the Internet service domain name in step 1101.

[0265] Step 1113: The DNS response module sends the IP address corresponding to the domain name to the DNS cache module.

[0266] In some embodiments, the DNS response module sends the parsed domain name and the corresponding IP address to the DNS cache module, or the DNS response module sends the parsed domain name and IP address mapping relationship to the DNS cache module.

[0267] Step 1114: The DNS cache module stores the IP address corresponding to the domain name.

[0268] In some embodiments, the DNS cache module stores the received domain name and the IP address corresponding to that domain name, or the DNS cache module stores the mapping relationship between the received domain name and the IP address.

[0269] In some embodiments, the DNS cache module stores the received domain name and the IP address corresponding to that domain name, or the mapping relationship between the domain name and the IP address, in the UPF cache data.

[0270] In some embodiments, the DNS cache module stores the received domain name and the IP address corresponding to that domain name, or the mapping relationship between the domain name and the IP address, in the DNS cache data.

[0271] In some embodiments, the fact that a DNS cache module stores IP addresses corresponding to domain names, or mapping relationships between domain names and IP addresses, may be understood as storing IP addresses corresponding to domain names, or mapping relationships between domain names and IP addresses, locally in the UPF.

[0272] The DNS cache module stores the mapping relationship between domain names and IP addresses within the second DNS server in the UPF cache data. This allows the UPF request module to process DNS query requests in the future, enabling them to be processed before they are sent to the DNS server. This eliminates resource consumption in the communication path from the DNS request module to the DNS server, reduces resource consumption by the DNS server in processing DNS query requests, saves processing time, and improves the efficiency of DNS query request processing.

[0273] Step 1115: The UPF basic module transmits the second DNS response to the base station.

[0274] The second DNS response includes the IP address corresponding to the domain name of the query target.

[0275] In some embodiments, the UPF basic module performs processing such as packaging on the second DNS response and transmits the processed second DNS response to the terminal device.

[0276] In some embodiments, the UPF basic module transmits the second DNS response to an access network such as a base station via a tunnel, and the access network delivers the second DNS response to the terminal device.

[0277] Step 1116: The base station transmits the second DNS response to the terminal device.

[0278] In some embodiments, the terminal device accesses the Internet service using the IP address corresponding to the domain name of the query target included in the received second DNS response based on the received second DNS response.

[0279] In some embodiments, the above-mentioned UPF basic module, DNS request module, and DNS cache module realize the corresponding functions through software or programs.

[0280] In some embodiments, the above-mentioned UPF basic module, DNS request module, DNS cache module, and DNS response module are regarded as part or all of the entire UPF.

[0281] As described above, the method according to this application supports performing domain name queries using the UPF basic module, DNS request module, DNS cache module, and DNS response module within the UPF, and returning the resolved IP address to the terminal device. Compared with related technologies that send DNS query requests to public network DNS servers via longer network communication paths, the method according to this application supports the completion of domain name queries corresponding to DNS query requests based on UPF cache data before the DNS query requests are sent to public network DNS servers, thus shortening the required network communication path and increasing the domain name query speed. Furthermore, since it is not necessary to send DNS query requests to public network DNS servers, the number of DNS query requests processed by DNS servers can be reduced, thereby easing the processing load on public network DNS servers. In addition, the method according to the embodiments of this application does not require the installation of new devices in the core network and can be implemented using existing computer devices for implementing UPF, thus reducing the cost of implementing the method according to this application. In addition, by performing domain name queries using existing computer devices for implementing UPF, there is no need to separately set complex offload rules, resulting in the advantages of high compatibility and low implementation difficulty. Furthermore, the method described in this application supports the computer device for implementing UPF in storing IP addresses corresponding to domain names from the data network in the UPF cache data, thereby contributing to the subsequent processing of DNS query requests by UPF and further improving the efficiency and speed of domain name queries.

[0282] Figure 12 is a flowchart of a domain name query method according to several embodiments of the present application. In these embodiments, the method is described using the terminal device shown in Figure 3 as an example. This method includes at least some of the following steps.

[0283] Step 122: Send a DNS query request.

[0284] In some embodiments, a terminal device sends a DNS query request containing the domain name to be queried to a network device which is an access network device and / or a core network device.

[0285] In some embodiments, a DNS query request includes: DNS query requests based on UDP, TCP-based DNS query requests and It includes at least one DNS query request based on HTTP.

[0286] In other words, in some embodiments, a DNS query request is at least one of the following: a UDP-based DNS query request, a TCP-based DNS query request, and an HTTP-based DNS query request.

[0287] Step 124: Receive the DNS response.

[0288] In some embodiments, a terminal device receives a DNS response from a network device. This DNS response contains the IP address corresponding to the queried domain name.

[0289] In some embodiments, a terminal device receives a DNS response from the access network, and the access network receives a DNS response from the core network. This DNS response contains the IP address corresponding to the queried domain name.

[0290] In some embodiments, this DNS response is provided from the UPF of the core network.

[0291] In some embodiments, this DNS response is generated by the UPF of the core network, or by a DNS server in the data network.

[0292] In some embodiments, the terminal device parses the DNS response from the network device and obtains the IP address corresponding to the queried domain name in the DNS response.

[0293] Step 126: Access the IP address.

[0294] In some embodiments, the terminal device accesses an IP address or an Internet service corresponding to an IP address based on the IP address corresponding to the received queryed domain name.

[0295] As described above, the method according to the embodiments of this application supports terminal devices in obtaining DNS responses from UPF. Compared with related technologies that send DNS query requests to public network DNS servers via longer network communication paths, the method according to this application supports the completion of domain name queries corresponding to DNS query requests based on UPF cache data before the DNS query requests are sent to public network DNS servers. This shortens the required network communication path and increases the domain name query speed. Furthermore, since it is not necessary for DNS query requests to reach public network DNS servers, the number of DNS query requests processed by DNS servers is reduced, thereby easing the processing load on public network DNS servers. In addition, the method according to the embodiments of this application does not require the installation of new devices in the core network and can be implemented using existing computer devices for implementing UPF, thus reducing the cost of implementing the method. Moreover, by performing domain name queries using existing computer devices for implementing UPF, there is no need to separately set complex offload rules, resulting in the advantages of high compatibility and low implementation difficulty.

[0296] FIG. 13 is a schematic configuration diagram of a domain name inquiry device according to some exemplary embodiments of the present application. This device includes at least some of the modules of a receiving module 132, a processing module 134, and a transmitting module 136.

[0297] The receiving module 132 is configured to receive a DNS inquiry request including the domain name of the inquiry target from a terminal device.

[0298] The processing module 134 is configured to inquire about an IP address corresponding to the domain name of the inquiry target based on the cache data of the device.

[0299] The transmitting module 136 is configured to transmit a DNS response including the IP address corresponding to the domain name of the inquiry target to the terminal device.

[0300] In some embodiments, the processing module 134 is further configured to execute a step of generating the DNS response from the IP address corresponding to the domain name of the inquiry target when the cache data of the device includes the IP address corresponding to the domain name of the inquiry target.

[0301] In some embodiments, the device further includes a transmitting module 136 configured to execute a step of transmitting the DNS inquiry request to a DNS server when the cache data of the device does not include the IP address corresponding to the domain name of the inquiry target.

[0302] In some embodiments, the receiving module 132 is further configured to execute a step of receiving a DNS response from the DNS server. Here, the DNS server is on a data network, the UPF is on a core network, and the data network is connected to the core network.

[0303] In some embodiments, the processing module 134 is further configured to perform the step of storing the IP address corresponding to the queried domain name in the DNS response in the device's cache data.

[0304] In some embodiments, the receiving module 132 is further configured to perform the step of receiving a data packet from the DNS server, wherein the target address of the data packet is the address of the terminal device.

[0305] In some embodiments, the processing module 134 is further configured to perform the step of extracting the DNS response from the data packet.

[0306] In some embodiments, the processing module 134 is further configured to perform the step of resolving the IP address corresponding to the queried domain name from the DNS response.

[0307] In some embodiments, the receiving module 132 is further configured to perform the step of receiving an uplink data packet transmitted from the terminal device, wherein the target address of the uplink data packet is the address of a DNS server.

[0308] In some embodiments, the processing module 134 is further configured to perform the step of extracting the DNS query request from the uplink data packet.

[0309] In some embodiments, the processing module 134 is further configured to perform the step of resolving the domain name being queried from the DNS query request. Here, the DNS server is located on the data network, the UPF is located on the core network, and the data network is connected to the core network.

[0310] In some embodiments, the UPF cache data is provided by a DNS server, which is located on a data network.

[0311] In some embodiments, the cache data of the UPF includes: Hot update cache data and, Regularly cached data and, Default cache data and, Static cache data and, It includes at least one of the dynamic cached data.

[0312] In some embodiments, the DNS query request includes: DNS query requests based on the User Datagram Protocol (UDP), DNS query requests based on the Transmission Control Protocol (TCP), It includes at least one DNS query request based on the Hypertext Transfer Protocol (HTTP).

[0313] Based on the above, compared to methods in related technologies that send DNS query requests to public network DNS servers via long network communication paths, the device according to this application supports the completion of domain name queries corresponding to DNS query requests based on UPF cache data before the DNS query requests are sent to public network DNS servers. This shortens the required network communication path and increases the domain name query speed. Furthermore, since it is not necessary for DNS query requests to reach public network DNS servers, the number of DNS query requests processed by DNS servers is reduced, thereby easing the processing load on public network DNS servers. In addition, the method according to the embodiment of this application does not require the installation of new devices in the core network and can be implemented using existing computer devices for implementing UPF, thus reducing the cost of implementing the method according to this application. Moreover, by performing domain name queries using existing computer devices for implementing UPF, there is no need to separately set complex offload rules, resulting in the advantages of high compatibility and low implementation difficulty.

[0314] Although the apparatus according to the above-described embodiment was explained using only the division of each functional module described above as an example within the domain name query, in actual applications, the above-described functions can be assigned to be completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or some of the functions described above. The specific implementation process can be found in the method embodiment, but will not be explained further here.

[0315] Figure 14 shows a schematic configuration diagram of a communication device 1400 according to some exemplary embodiments of the present application. This communication device 1400 includes a processor 1401, a receiver 1402, a transmitter 1403, a memory 1404, and a bus 1405.

[0316] The processor 1401 includes one or more processing cores and performs various functional applications and information processing by executing software programs and modules. In some embodiments, the processor 1401 is used to implement the functions and steps of the processing module 134 described above.

[0317] The receiver 1402 and the transmitter 1403 can be implemented as communication components, which may also be communication chips. In some embodiments, the receiver 1402 can be used to implement the functions and steps of the receiving module 132 described above. In some embodiments, the transmitter 1403 can be used to implement the functions and steps of the transmitting module 136 described above.

[0318] Memory 1404 is connected to processor 1401 via bus 1405. Memory 1404 can be used to store at least one instruction. Processor 1401 is used to implement each step in the method embodiment described above by executing this at least one instruction.

[0319] Furthermore, the memory 1404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof. Volatile or non-volatile storage devices include, but are not limited to, magnetic disks or optical disks, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), static random-access memory (SRAM), read-only memory (ROM), magnetic memory, flash memory, and programmable read-only memory (PROM).

[0320] In some embodiments, the receiver 1402 receives signals / data independently, the processor 1401 controls the receiver 1402 to receive signals / data, the processor 1401 requests the receiver 1402 to receive signals / data, or the processor 1401 cooperates with the receiver 1402 to receive signals / data.

[0321] In some embodiments, the transmitter 1403 transmits signals / data independently, or the processor 1401 controls the transmitter 1403 to transmit signals / data, or the processor 1401 requests the transmitter 1403 to transmit signals / data, or the processor 1401 cooperates with the transmitter 1403 to transmit signals / data.

[0322] In some exemplary embodiments of this application, a computer-readable storage medium storing at least one program is further provided. The computer-readable storage medium implements the domain name query method according to each of the method embodiments described above, by loading and executing the at least one program by a processor.

[0323] In some exemplary embodiments of this application, a chip including programmable logic circuits and / or program instructions is further provided. When the chip is executed on a communication device, a domain name query method according to each of the method embodiments described above is realized.

[0324] In some embodiments of this application, a computer program product is further provided. When this computer program product is executed on the processor of a computer device, the computer device executes the domain name query method described above.

[0325] In some exemplary embodiments of this application, a computer program including computer instructions is further provided. The computer device executes the domain name query method described above by the computer device's processor executing the computer instructions.

[0326] Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of this application can be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored on a computer-readable medium or stored or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable mediums include both computer storage media and communication media, the communication media including any medium that allows computer programs to be transferred from one location to another. Storage media are any available medium accessible by a general-purpose computer or a dedicated computer.

[0327] The foregoing description represents only selectable embodiments of this application and is not intended to limit it. Any amendments, equivalent substitutions, or improvements made without departing from the spirit and principles of this application shall be included within the scope of protection of this application.

Claims

1. A method for querying a domain name performed by a computer device, A step of receiving a DNS (Domain Name System) query request from a terminal device, wherein the DNS query request includes the domain name to be queried, The steps include determining the IP (Internet Protocol) address corresponding to the domain name being queried based on UPF (User Plane Function) cache data, The process includes the step of sending a DNS response to the terminal device, wherein the DNS response includes an IP address corresponding to the domain name being queried, The step of determining the IP address corresponding to the domain name to be queried based on UPF cache data is: If the UPF cache data does not contain the IP address corresponding to the domain name being queried, the DNS query request is sent to the DNS server. The step includes receiving the DNS response from the DNS server, The method further includes the step of storing the IP address corresponding to the queried domain name in the DNS response in the UPF cache data, The DNS server is located on a data network configured to provide business services to users, the UPF is located on a core network that maintains mobile network subscription data and manages the network elements of the mobile network, and the data network is connected to the core network. How to query a domain name.

2. The step of determining the IP address corresponding to the domain name to be queried based on UPF cache data is: The domain name query method according to claim 1, further comprising the step of generating the DNS response from the IP address corresponding to the domain name to be queried if the UPF cache data includes an IP address corresponding to the domain name to be queried.

3. The step of receiving the DNS response from the DNS server is: A step of receiving a data packet from the DNS server, wherein the target address of the data packet is the address of the terminal device, The step includes extracting the DNS response from the data packet, The aforementioned domain name query method further includes: The domain name query method according to claim 1, further comprising the step of analyzing the IP address corresponding to the domain name to be queried from the DNS response.

4. The step of receiving a DNS query request from a terminal device is: The step of receiving an uplink data packet transmitted from the terminal device, wherein the target address of the uplink data packet is the address of a DNS server, The step includes extracting the DNS query request from the uplink data packet, The aforementioned domain name query method further, The step includes analyzing the domain name to be queried from the DNS query request, The domain name query method according to claim 1, wherein the DNS server is on the data network, the UPF is on the core network, and the data network is connected to the core network.

5. The domain name query method according to claim 1, wherein the cached data of the UPF is provided by a DNS server, and the DNS server is located on a data network.

6. The DNS query request includes: DNS query requests based on the User Datagram Protocol UDP, DNS query requests based on the TCP transmission control protocol, A domain name query method according to claim 1, comprising at least one of the following: a DNS query request based on the hypertext transfer protocol HTTP.

7. A domain name query device, A receiving module for receiving DNS (Domain Name System) query requests from a terminal device, wherein the DNS query request includes the domain name to be queried, A processing module for querying the IP (Internet Protocol) address corresponding to the domain name to be queried from the cache data of the domain name query device, A transmission module for sending a DNS response to the terminal device, the transmission module comprising: a transmission module in which the DNS response includes an IP address corresponding to the domain name to be queried; The aforementioned processing module is If the cached data does not contain the IP address corresponding to the domain name being queried, the DNS query request is sent to the DNS server. Upon receiving the DNS response from the DNS server, The step further includes storing the IP address corresponding to the queried domain name in the DNS response in the cache data, The DNS server is located on a data network configured to provide business services to users, the domain name query device is located on a core network that maintains mobile network subscription data and manages network elements of the mobile network, and the data network is connected to the core network. Domain name query device.

8. A computer device including a processor and memory in which computer programs are stored, A computer device that, when the computer program is loaded and executed by the processor, realizes the domain name query method described in any one of claims 1 to 6.

9. It is a computer program, A computer program that, when loaded and executed by a processor, implements the domain name query method described in any one of claims 1 to 6.

10. A chip including programmable logic circuits and / or program instructions, A chip that enables a computer device equipped with the aforementioned chip to implement the domain name query method described in any one of claims 1 to 6.