Domain name query method, apparatus, device, computer program and chip

By using UPF cache data for domain name queries, the method addresses slow query speeds and server load, improving domain name resolution efficiency and compatibility.

JP2025533410AActive Publication Date: 2025-10-07TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2025514187
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-11-23
Filing Date
2023-10-11
Publication Date
2025-10-07
Estimated Expiration
2043-10-11

AI Technical Summary

Technical Problem

The long network communication path and heavy processing load on public network DNS servers result in slow domain name query speeds, affecting terminal device access to Internet services.

Method used

A domain name query method utilizing a computer device that implements User Plane Function (UPF) to perform queries based on cache data, reducing the need for communication with public network DNS servers and processing load.

Benefits of technology

This method shortens domain name query times, reduces server processing load, and maintains high compatibility with existing infrastructure without additional device installation, enhancing query speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025533410000001_ABST
    Figure 2025533410000001_ABST
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 State Intellectual Property Office of the People's Republic of China on November 23, 2022, for the invention entitled "Domain name query method, apparatus, device and storage medium," the entire contents of which are incorporated herein by reference.

[0002] [Technical field] The present application relates to the field of mobile communications, and in particular to domain name query technology. [Background technology]

[0003] Domain name resolution is an Internet service that supports the mutual conversion of domain names and Internet Protocol IP addresses. In the related art, domain name resolution usually refers to the process in which a domain name query request sent from a terminal device is sent via each network device to a domain name resolution server in a public network, where the domain name and IP address mapping relationship is queried and the query result is returned.

[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, which places a heavy processing load on the server, resulting in a slow domain name query speed in the related art, which adversely affects the terminal device's subsequent access to Internet services.

[0005] Thus, accelerating domain name queries has become a current problem that must be solved. Summary of the Invention [Means for solving the problem]

[0006] The present application provides a domain name query method, apparatus, device and storage medium for supporting domain name query acceleration. The technical methods are as follows:

[0007] According to one aspect of the present application, there is provided a domain name query method executed by a computer device, the method comprising: receiving a DNS query request from a terminal device, the DNS query request including a domain name to be queried; determining an IP address corresponding to the queried domain name based on cache data of a user plane function (UPF); sending a DNS response to the terminal device, the DNS response including an IP address corresponding to the queried domain name.

[0008] According to one aspect of the present application, there is provided a domain name query device, the device comprising: a receiving module for receiving a DNS query request from a terminal device, the DNS query request including a domain name to be queried; a processing module for querying cached data of said device for an Internet Protocol IP address corresponding to said queried domain name; a sending module for sending a DNS response to the terminal device, the DNS response including an IP address corresponding to the queried domain name;

[0009] According to another aspect of the present application, there is provided a computer device including a processor and a memory having stored therein a computer program that, when loaded and executed by the processor, causes the computer device to implement the domain name query method as described above.

[0010] According to another aspect of the present application, there is provided a computer-readable storage medium having stored thereon a computer program that, when loaded and executed by a processor, causes the computer-readable storage medium to implement the domain name query method as described above.

[0011] According to another aspect of the present application, there is provided a computer program product having stored thereon a computer program that, when loaded and executed by a processor, causes the computer program product to implement the domain name query method as described above.

[0012] According to another aspect of the present application, there is provided a chip including programmable logic circuitry and / or program instructions that cause a computing device equipped with the chip to implement the domain name query method as described above. [Effects of the Invention]

[0013] The beneficial effects of the technical approaches according to the embodiments of the present application include at least the following: The present invention allows a computer device for implementing a user plane function (UPF) to perform domain name queries. Compared with related art methods that transmit DNS query requests to a DNS server in a public network via a long network communication path, the method of the present application supports the completion of a domain name query corresponding to a DNS query request based on UPF cache data by a computer device for implementing UPF before the DNS query request is sent to the DNS server in the public network. This shortens the required network communication path and increases the domain name query speed. Furthermore, since it is not necessary for a 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. Furthermore, the method of the present application does not require the installation of a new device in the core network and can be implemented by using an existing computer device for implementing UPF, thereby reducing the cost of implementing the method of the present application. In addition, using an existing computer device for implementing UPF to perform domain name queries eliminates the need for separately configuring complex offload rules, resulting in high compatibility and low implementation difficulty. [Brief explanation of the drawings]

[0014] [Figure 1] FIG. 1 is a schematic diagram of a domain name query procedure in the related art. [Figure 2] FIG. 1 is a schematic diagram of a domain name query procedure in the related art. [Figure 3] 1 is a structural block diagram of a communication system according to some embodiments of the present application; [Figure 4] 1 is a schematic block diagram of a communication system according to some embodiments of the present application; [Figure 5] 1 is a flowchart of a domain name query method according to some embodiments of the present application. [Figure 6]1 is a flowchart of a domain name query method according to some embodiments of the present application. [Figure 7] 1 is a flowchart of a domain name query method according to some embodiments of the present application. [Figure 8] 1 is a schematic diagram of a domain name query method according to some embodiments of the present application; [Figure 9] 1 is a schematic diagram of a domain name query method according to some embodiments of the present application; [Figure 10] 1 is a schematic diagram of a domain name query method according to some embodiments of the present application; [Figure 11] 1 is a schematic diagram of a domain name query method according to some embodiments of the present application; [Figure 12] 1 is a flowchart of a domain name query method according to some embodiments of the present application. [Figure 13] FIG. 2 is a structural block diagram of a domain name query device according to some embodiments of the present application; [Figure 14] 1 is a schematic block diagram of a communication device according to some embodiments of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0015] First, a brief description will be given of the related art in the embodiments of the present application.

[0016] Domain Name System (DNS): DNS provides a mapping between domain names and Internet Protocol (IP) addresses. Both domain names and IP addresses are used to label computing devices on a network, with domain names being equivalent to IP addresses. Domain names consist of a variable length of letters, numbers, and symbols (e.g., www.xxxx.com), while IP addresses are represented as strictly ordered quadruple numbers (e.g., 202.96.133.134).

[0017] Domain Name Resolution: For users, IP addresses are harder to remember than domain names, and compared with directly entering IP addresses into an input field, entering domain names into an input field for network communication is a more common, universal and easier operation method.

[0018] However, since the network communication protocols used in network communication are realized based on IP addresses, and it is the IP address, not the domain name, that identifies a computer during network communication, when a user enters a domain name into an input field, a service that supports the mutual translation of domain names to IP addresses for network communication by computers is required. 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 the related art, DNS domain name resolution typically involves a terminal device sending a domain name query request to a domain name resolution server in a public network (also called a wide area network), which then queries the domain name and IP address mapping relationship and returns the query result. This process can also be considered a domain name query flow. The domain name resolution server in the public network can also be considered a public domain name resolution server. The IP address is typically 8.8.8.8 or 114.114.114.114. Specifically, the DNS domain name resolution flow commonly used in the related art is as shown in FIG. 1. That is, a terminal device 101 sends a DNS request to a base station 102, and the DNS request includes the domain name that the terminal device 101 requests to query. The DNS request travels from a user plane device (User Plane Function, UPF) 103 in the core network to the Internet 104, then passes through each router and switch in the Internet 104, and is then sent to a DNS server 105 in the public network. After the DNS request is received, the DNS server 105 of the public network checks the IP address corresponding to the domain name requested by the terminal device 101, and then constructs and sends a corresponding DNS response based on the obtained IP address. This DNS response passes through multiple routers and switches to the UPF 103 of the core network. The UPF 103 of the core network finally returns this DNS response to the terminal device 101 via the base station 102. The terminal device 101 can access subsequent Internet services based on the received DNS response.

[0020] However, the physical distance between the DNS server 105 of the public network and the terminal device 101 is usually long, the network communication path between them is long, and the DNS server of the public network usually needs to process a large number of DNS requests in parallel, which imposes a heavy processing load on the domain name resolution. Therefore, the above-mentioned method may take too long a processing time for domain name resolution, i.e., the time required for domain name query may be too long, and in serious cases, domain name resolution may fail, affecting the time and efficiency required for service access by the terminal device and even causing the terminal device to be unable to access Internet services.

[0021] To solve the above-mentioned problems, the present application proposes a domain name query method that accelerates domain name queries by a computer device that implements UPF, and has the advantages of low cost, high efficiency, and high compatibility. The following describes this domain name query method, corresponding apparatus, devices, storage media, etc., with reference to exemplary embodiments.

[0022] 2 is an architecture diagram of a communication system 200 according to some embodiments of the present application. As shown in FIG. 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 a mobile network, and a control plane responsible for transmitting service data.

[0023] Among them, the terminal device 201 is the gateway for interaction between the mobile user and the network, providing basic computing and storage functions, displaying service windows for the user, and receiving operation inputs from the user. The terminal device 201 transmits control signals and service data to the mobile network by establishing signaling and data connections with the access network 203 using a specific air interface technology.The terminal device 201 may be deployed on land, on water, in the air, etc., and includes, but is not limited to, a handheld device, a wearable device, an in-vehicle device, an Internet of Things device, etc., such as a mobile phone, a tablet computer, an e-book reader, a laptop portable computer, a desktop computer, a television, a game console, a Mobile Internet Device (MID), an Augmented Reality (AR) terminal, a Virtual Reality (VR) terminal, and a Mixed Reality (MR) terminal, a wearable device, a steering wheel, an electronic tag, a controller, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a wireless terminal in remote medical surgery, a cellular phone, a cordless phone, a session initiation protocol (Session Initiation Protocol (SIP)), a wireless terminal in remote medical surgery, a wireless terminal in smart home, ... Examples include SIP (Smart Initiation Protocol) 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 realize access-related functions, provide network access functions for authorized users within the cell coverage area, and can transmit user data using transmission tunnels with different qualities depending on the user's level, service requirements, etc. The access network 203 manages and rationally utilizes its own resources, provides access services for the terminal device 201 as needed, and can transfer control signals and user data between the terminal device 201 and the core network 205. The access network 203 can include access network devices. The access network devices are devices that provide access services for the terminal device 201 and can include radio access network (RAN) devices and AN devices. The RAN devices are mainly radio network devices in a 3GPP network, and the AN devices can 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 devices are called RAN or Next Generation Node Basestation (gNB), and in Long Term Evolution (LTE) systems, the devices are called Evolved NodeB (eNB or eNodeB).

[0025] The core network 205 maintains subscription data of the mobile network and manages network elements of the mobile network, thereby providing functions such as session management, mobility management, policy management, and security authentication for the terminal device 201. For example, when the terminal device 201 is connected, it provides network access authentication for the terminal device 201. When the terminal device 201 has a service request, it allocates network resources for the terminal device 201. When the terminal device 201 moves, it updates network resources for the terminal device 201. When the terminal device 201 is idle, it provides a fast recovery mechanism for the terminal device 201. When the terminal device 201 is disconnected, it releases network resources for the terminal device 201. When the terminal device 201 has service data, it provides a data routing function for the terminal device 201, for example, forwarding uplink data to the data network 207, or receiving downlink data sent to the terminal device 201 from the data network 207 and forwarding the downlink data to the terminal device 201 by forwarding the downlink data to the access network 203. The core network 205 is located on a private network or a public network.

[0026] The data network 207 is configured to provide business services for users. The data network 207 can be a private network such as a local area network, an external network not managed or controlled by an operator such as the Internet, or a dedicated network co-located by an operator such as an IP Multimedia Core Network Subsystem (IMS). The terminal device 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, the core network 205, and the data network 207 are considered network devices.

[0028] As an example, the communication system 200 has two communication scenarios: an uplink communication scenario and a downlink communication scenario, where uplink communication means that signals are sent in the direction of the terminal device 201, the access network 203, the core network 205, and the data network 207. Meanwhile, downlink communication means that signals are sent in the direction of the data network 207, the core network 205, the access network 203, and the terminal device 201.

[0029] It should be understood that in some embodiments of the present application, "5G" may also be referred to as "5G New Radio (NR)" or "NR," and a terminal device may also be referred to as User Equipment (UE), access terminal, subscriber unit, subscriber station, mobile station, mobile console, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user equipment.

[0030] The technical techniques described in some embodiments of the present application may be applied to a 5G system, an LTE system, an evolution of the 5G system or the LTE system, a next-generation mobile communication system beyond 5G (Beyond Fifth Generation (B5G)) or a 6G system or an evolution of the 6G system or later, where the 5G system may include at least one of a non-standalone (NSA) network and a standalone (SA) network.

[0031] Figure 3 shows a detailed architecture based on Figure 2. The core network user plane includes the UPF. The core network 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 is primarily responsible for mobility management in mobile networks (e.g., user location update, user network registration, user switching, etc.). The SMF is primarily responsible for session management in mobile networks (e.g., session establishment, modification, and release). The PCF primarily provides a unified policy framework for controlling network operations, providing policy rules to control layer network functions while also obtaining user subscription information relevant to policy decisions. The AUSF is used to perform terminal security authentication. The NEF is primarily used to support the release of functions and events. The NRF is used to provide storage and selection functions for network function entity information for other network elements. The UDM is used to store user data, such as subscription data and authentication / authorization data. The AF interacts with the core network to provide application layer services, for example, providing application layer data routing, providing release functions for access network functions, interacting with the policy framework to provide policy control, and interacting with the IMS.

[0033] In the embodiment of the present application, in addition to being responsible for transmitting and receiving user data, the UPF also has functions related to domain name query. That is, the UPF not only receives user data from a data network and transmits it to a terminal device via an access network, but also receives user data from a terminal device via an access network and forwards it to a data network. In addition, the UPF can also realize functions related to domain name resolution, such as domain name caching and domain name query.

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

[0035] It should be noted that the interface names between the various network elements in Figures 2 and 3 are merely examples and may be other names in specific implementations, but are not specifically limited in the embodiments of the present 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 functions of the network elements. In networks in the related art and other future networks, the various network elements described above may have other names, but are not specifically limited in the embodiments of the present application. For example, in a 6G network, some or all of the various network elements described above may use 5G terminology or other names, and are therefore described collectively here but will not be further described. It should also be understood that the names of the messages (or signaling) transmitted between the various network elements described above are merely examples and do not impose any limitations on the functions of the messages themselves.

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

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

[0038] Step 410: Receive a DNS query request including a domain name to be queried (also called a "queried domain name" or a "query-awaiting domain name") from a terminal device.

[0039] The DNS query request comes from the terminal device.

[0040] A terminal device sends a DNS query request with a domain name to be queried to a DNS server on a data network, and the DNS query request must pass through a network device that is at least one of an access network device and a core network device.

[0041] Step 430: Determine the IP address corresponding to the queried domain name based on the cache data of the UPF.

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

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

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

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

[0046] The UPF sends a DNS response with an IP address corresponding to the queried domain name to the terminal device. In one example, the UPF sends a DNS response with an IP address corresponding to the queried domain name to the access network device and then to the terminal device via the access network device.

[0047] As described above, the method of the present application causes a computer device for implementing UPF to perform a domain name query. Compared with related art methods that transmit DNS query requests to a DNS server on a public network via a longer network communication path, the method of the present 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 DNS server on the public network. Furthermore, since the DNS query request does not need to reach the DNS server on 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 on the public network. Furthermore, the method of the present application does not require the installation of a new device in the core network and can be implemented by using an existing computer device for implementing UPF, thereby reducing the cost of implementing the method of the present application. In addition, using an existing computer device for implementing UPF to perform domain name queries eliminates the need for separately configuring complex offloading rules, resulting in high compatibility and low implementation difficulty.

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

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

[0050] The DNS query request comes from the terminal device.

[0051] A terminal device sends a DNS query request with a domain name to be queried to a DNS server on a data network, and the DNS query request must pass through a network device that is at least one of an access network device and a core network device.

[0052] In some embodiments, the DNS query request includes: A DNS query request based on the User Datagram Protocol (UDP); a DNS query request based on the Transmission Control Protocol (TCP); At least one of a DNS query request based on the Hypertext Transfer Protocol (HTTP) is included.

[0053] That is, the DNS query request is at least one of 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 embodiment of the present application supports processing of various DNS query requests, can be applied to more scenarios, and has high compatibility in various application scenarios.

[0054] Step 530: Determine the IP address corresponding to the queried domain name based on the cache data of the UPF.

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

[0056] In some embodiments, the UPF cache data includes DNS cache data. The DNS cache data is data related to a mapping relationship between a domain name and an IP address. The UPF queries the DNS cache data for an IP address corresponding to the queried domain name. The UPF cache data or the UPF DNS cache data is from a DNS server on a data network.

[0057] In some embodiments, the cached data of the UPF includes: Hot update cache data, Periodically cache data; Default cache data, Static cache data; At least one of the dynamic cache data is included.

[0058] Hot update refers to a real-time update method without rebooting or shutting down the device. Hot update cache data refers to data cached in the UPF by 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 in a pre-set manner, or initial cache data in the UPF. Static cache data refers to data cached in the UPF using the static cache method. Dynamic cache data refers to data cached in the UPF using the dynamic cache method.

[0059] In some embodiments, the UPF performs hot update caching during operation when it receives a hot update cache request or hot update cache information from a DNS server or meets a hot update cache condition. The UPF updates data related to domain names and IP addresses corresponding to domain names in the cache data of the UPF in real time based on the hot update cache request, hot update cache information, or hot update cache condition. Data obtained after the real-time update is hot update cache data, or 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 operation time reaches a first threshold, the UPF cache data or the UPF DNS cache data is cleared, and a DNS response is received from a DNS server based on a DNS query request from the terminal device. Data related to the domain name in the DNS response and the IP address corresponding to the domain name is temporarily stored in the UPF cache data or the UPF DNS cache data, thereby achieving a hot update cache. Here, the first threshold is predefined, pre-set, autonomously determined by the UPF, or instructed by the DNS server. This update method can be achieved without shutting down or restarting the UPF, so the update process has little impact on the terminal device. This enables real-time updates of the UPF cache data while meeting the domain name query requirements of the terminal device. This update method also contributes to properly synchronizing the UPF cache data with changes in DNS services in the data network, thereby improving the timeliness of the UPF DNS cache data.

[0061] In some embodiments, when the UPF receives a periodic cache request from a DNS server, receives periodic cache information from a DNS server, receives timer information, or meets a periodic cache condition, the UPF performs periodic caching based on a predetermined time in the periodic cache request, the periodic cache information, the timer information, or the periodic cache condition. The UPF updates data related to the domain name and the IP address corresponding to the domain name in the cache data of the UPF based on the periodic cache request, the periodic cache information, the timer information, or the periodic cache condition. The data obtained after the update is the periodic cache data, or the updated data is different from the data before the update. Here, the timer is predefined, preconfigured, autonomously determined by the UPF, or instructed by the DNS server. The periodic cache condition is predefined, preconfigured, autonomously determined by the UPF, or instructed by the DNS server.

[0062] For example, when the time until the last update of the UPF cache data reaches a second threshold, the UPF sends a data update request to a DNS server, receives a data update response from the DNS server, and temporarily stores data related to the domain name and the IP address corresponding to the domain name in the data update response in the UPF cache data or the UPF DNS cache data, thereby achieving periodic caching. Here, the second threshold may be predefined, preconfigured, autonomously determined by the 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 the UPF based on time, reducing waste of signaling resources. Furthermore, this update method contributes to properly synchronizing the UPF cache data with changes in DNS services in the data network, thereby improving the timeliness of the UPF DNS cache data.

[0063] In some embodiments, the UPF performs default caching when it receives an initial cache request, receives initial cache information, receives a configuration cache request, receives configuration cache information, receives a preset cache request, receives preset cache information, or meets default cache conditions during the startup phase, initialization phase, configuration phase, or pre-configuration phase. The UPF updates data related to the domain name and the IP address corresponding to the domain name in the cache data of the UPF based on the initial cache request, the initial cache information, the configuration cache request, the configuration cache information, the preset cache request, the preset cache information, or the default cache conditions. The data obtained after the update is default cache data, and the updated data that is different from the data before the update is the default cache data.

[0064] For example, in 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 in the data update response and the IP address associated with the domain name in its cache data or DNS cache data, thereby implementing 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, thereby improving the efficiency of UPF's processing of domain name query requests.

[0065] In some embodiments, when static caching is required, for example, when the UPF receives a static caching request or static caching information, or when a static caching condition is met, the UPF performs static caching. The UPF updates data related to domain names and IP addresses corresponding to the domain names in the cache data of the UPF based on the static caching request, static caching information, or static caching condition. The data obtained after the update is static cache data, or the data after the update is different from the data before the update. This update method helps properly synchronize the UPF cache data with changes in DNS services in the data network and can improve the timeliness of the DNS cache data of the UPF.

[0066] In some embodiments, when dynamic caching is required, for example, when the UPF receives a dynamic caching request or dynamic caching information, or when a dynamic caching condition is met, the UPF performs dynamic caching. The UPF updates data related to domain names and IP addresses corresponding to the domain names in the cache data of the UPF based on the dynamic caching request, dynamic caching information, or dynamic caching condition. The data obtained after the update is dynamic cache data, or the data after the update is different from the data before the update. This update method helps properly synchronize the UPF cache data with changes in DNS services in the data network, and can improve the timeliness of the DNS cache data of the UPF.

[0067] Step 550: Generate a DNS response that includes an 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 cache 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 obtained mapping relationship between the queried domain name and the IP address.

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

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

[0072] The UPF sends a DNS response with an IP address corresponding to the queried domain name to the terminal device. In one example, the UPF sends a DNS response with an IP address corresponding to the queried domain name to the access network device and transmits it to the terminal device via the access network device.

[0073] As described above, in the method of the present application, if the IP address corresponding to the queried domain name is included in the UPF cache data, a computer device that implements the UPF completes a 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 a public network, the required network communication path is shorter, thereby increasing the domain name query speed. Furthermore, because the DNS query request does not need 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] 6 is a flowchart of a domain name query method according to some exemplary embodiments of the present application. This embodiment is described by taking as an example that the method is performed by a computer device for realizing UPF shown in FIG. 3. The method includes at least a part of the following steps:

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

[0076] The DNS query request comes from the terminal device.

[0077] A terminal device sends a DNS query request with a domain name to be queried to a DNS server on a data network. The DNS query request must pass through a network device that is at least one of an access network device and a core network device. The source address of the DNS query request is the address of the terminal device, and the target address is the address of the DNS server.

[0078] In some embodiments, the DNS query request includes: a UDP-based DNS query request; a TCP-based DNS query request; At least one of an HTTP-based DNS query request is included.

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

[0080] Step 630: The IP address corresponding to the domain name to be queried is queried in the cache data of the UPF.

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

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

[0083] In some embodiments, the cached data of the UPF includes: Hot update cache data, Periodically cache data; Default cache data, Static cache data; At least one of the dynamic cache data is included.

[0084] Hot update refers to a real-time update method without restarting or shutting down the device. Hot update cache data refers to data cached in the UPF by hot update. Periodic cache data refers to data cached in the UPF at a set time, periodically, or semi-periodically. Default cache data refers to data cached in the UPF in a pre-set manner or the initial cache data in the UPF. Static cache data refers to data cached in the UPF using the static cache method. Dynamic cache data refers to data cached in the UPF using the dynamic cache method.

[0085] Step 650: A DNS response is received that includes an IP address corresponding to the queried domain name.

[0086] If the IP address corresponding to the queried domain name cannot be found in the cache data of the UPF, a DNS query request can be sent to a DNS server, and a DNS response can be received from the DNS server in response. The DNS server is on the data network. The DNS response contains the IP address corresponding to the queried domain name, or the DNS response contains a mapping relationship between the queried domain name and the IP address.

[0087] The UPF receives a DNS response from the data network, where the DNS response includes an IP address corresponding to the queried domain name, or the DNS response includes a mapping relationship between the queried domain name and the IP address.

[0088] As an example, the DNS response is generated by a DNS server in the data network, the source address of the DNS response is the address of the DNS server, and the target address of the DNS response is the address of the terminal device.

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

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

[0091] By UPF, the DNS response with the IP address corresponding to the queried domain name is sent to the terminal device. In one example, by UPF, the DNS response with the IP address corresponding to the queried domain name is sent to the access network device and then sent to the terminal device via the access network device.

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

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

[0094] According to the above, in the method of the present 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 a DNS server, and a query for the domain name corresponding to the DNS query request is executed through the DNS server. The IP address corresponding to the queried domain name obtained by the DNS server is then stored in the UPF cache data. In other words, by storing the correspondence between the queried domain name and the IP address in the UPF cache data, the correspondence between the domain name and the IP address stored in the UPF cache data can be enriched, which makes it easier for computer devices that realize UPF to directly respond to more DNS query requests in the future, improves the speed and efficiency of domain name queries, and reduces the processing load on DNS servers in public networks.

[0095] 7 is a schematic diagram of a domain name query method according to some exemplary embodiments of the present application, which is generally described by taking the domain name query method as being implemented by the communication system 200 shown in FIG.

[0096] A terminal device 701 transmits a DNS query request including a domain name to be queried. The target address of this DNS query request is the address of a DNS server 702 on a data network. To reach the DNS server 702, the DNS query request must pass through network devices including an access network 703 and a core network 704.

[0097] When the UPF 7042 (i.e., a computer device that implements the UPF) receives a DNS query request, it determines the IP address corresponding to the domain name that is the query target based on cache data of the UPF 7042. The UPF 7042 is on the core network 704.

[0098] The UPF 7042 sends a DNS response including an IP address corresponding to the queried domain name to the terminal device 701. The DNS response must pass through the access network 703 to reach the terminal device 701.

[0099] This DNS response is generated by the UPF 7042 or the DNS server 702 .

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

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

[0102] According to the above, in the method of the present 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 a DNS server, and a query for the domain name corresponding to the DNS query request is executed through the DNS server. The IP address corresponding to the queried domain name obtained by the DNS server is then stored in the UPF cache data. In other words, by storing the correspondence between the queried domain name and the IP address in the UPF cache data, the correspondence between the domain name and the IP address stored in the UPF cache data can be enriched, which makes it easier for computer devices that realize UPF to directly respond to more DNS query requests in the future, improves the speed and efficiency of domain name queries, and reduces the processing load on DNS servers in public networks.

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

[0104] Step 8010: Receive an uplink data packet from a terminal device.

[0105] The UPF receives an uplink data packet from a terminal device, and the target address of the uplink data packet is the address of a 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 transmits a DNS query request in an uplink data packet to a network device. The DNS query request is a request for a query for an IP address corresponding to a domain name. Here, the 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 queried domain name, and the domain name that the terminal device expected or needed to query may be understood to be the queried domain name.

[0108] In some embodiments, the DNS query request includes: a UDP-based DNS query request; a TCP-based DNS query request; At least one of an HTTP-based DNS query request is included.

[0109] That is, the DNS query request is at least one of a UDP-based DNS query request, a TCP-based DNS query request, and an HTTP-based DNS query request.

[0110] In some embodiments, the terminal device transmits the uplink data packet to the access network device, which forwards the uplink data packet to the UPF. The access network device transmits the uplink data packet to the core network, and delivers the uplink data packet to the UPF after exchange between functional entities in the core network.

[0111] Step 8020: Extract the DNS query request from the uplink data packet.

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

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

[0114] The data network includes at least one of the Internet, a wide area network (WAN), a local area network (LAN), and a private network.

[0115] 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, the DNS server in the data network is a domain name resolution server in a wide area network, the DNS server in the data network is a domain name resolution server in a local area network, or the DNS server in the data network is a domain name resolution server in a private network.

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

[0117] Step 8030: The domain name to be queried is resolved from the DNS query request.

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

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

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

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

[0122] The idle period refers to the period during which the UPF is idle. 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 the second time threshold, it indicates that the UPF is in an idle state. 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 in a non-idle state.

[0123] Note that the first and second time thresholds may be the same or different, the first time threshold may be predefined, preconfigured, autonomously determined by the UPF, or directed by the DNS server, and the second time threshold may be predefined, preconfigured, autonomously determined by the UPF, or directed 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 by the domain name query model is to generate a DNS response from a DNS server, and then at least the following steps 8060, 8070, and 8080 are performed. 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 a UPF, and then at least the following steps 8040, 8050, and 8080 are performed.

[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 in a local area network was generated by the UPF or by a DNS server). If the identifier of the local area network 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 the terminal device in this local area network exists in the cache data of the UPF is lower than a first probability threshold, that is, there is a high probability that the cache data of the UPF does not include the IP address corresponding to the domain name queried by the terminal device in 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 in a local area network was generated by the UPF or by a DNS server). If the identifier of the local area network 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 in this local area network exists in the cache data of the UPF is higher than a second probability threshold, that is, there is a high probability that the cache data of the UPF contains an IP address corresponding to the domain name queried by the terminal device in the local area network.

[0127] The first probability threshold and the second probability threshold may be the same or different, the first probability threshold may be predefined, preconfigured, autonomously determined by the UPF, or directed by the DNS server, and the second probability threshold may be predefined, preconfigured, autonomously determined by the UPF, or directed by the DNS server.

[0128] Step 8040: The IP address corresponding to the domain name to be queried is queried from the cache data of the UPF.

[0129] Here, the UPF cache data is provided by a DNS server on the data network.

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

[0131] The cache data of the UPF includes DNS cache data. The DNS cache data refers to data related to the mapping relationship between domain names and IP addresses. For example, the UPF querying the DNS cache data of the UPF for an IP address corresponding to a queried domain name may be understood as the UPF querying the DNS cache data of the UPF for the mapping relationship between the queried domain name and the IP address.

[0132] Step 8050: Generate a first DNS response that includes an 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 the mapping relationship between the queried domain name and the IP address is included in the UPF cache data.

[0134] It is understood that 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 the IP address is included in the UPF's DNS cache data.

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

[0136] Step 8060: A second DNS response is received that includes an 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 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 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 which is the address of the DNS server and the target address of which is the address of the terminal device.

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

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

[0142] Step 8080: Send the DNS response.

[0143] This DNS response may be a primary DNS response or a secondary DNS response.

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

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

[0146] According to the above, the method of the present application analyzes an uplink data packet sent from a terminal device to a DNS server, obtains a DNS query request therefrom, and obtains a queried domain name included in the DNS query request. If the IP address corresponding to the queried domain name is included in the UPF cache data, the method directly completes a domain name query corresponding to the DNS query request based on the UPF cache data, obtains the IP address corresponding to the queried domain name, and feeds it back to the terminal device. Compared to sending a DNS query request to a DNS server in a public network, the required network communication path is shortened, thereby increasing the domain name query speed. Furthermore, since the DNS query request does not need to reach a DNS server in the public network, the number of DNS query requests processed by the DNS server is reduced, thereby reducing the processing load on the DNS server in the public network. 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 the UPF can send the DNS query request to a DNS server, receive a data packet fed back from the DNS server, extract a DNS response from the data packet, resolve the IP address corresponding to the queried domain name from the DNS response, and store the correspondence between the queried domain name and the IP address in the UPF cache data. This ensures that domain name queries are executed reliably, while enriching the correspondence between domain names and IP addresses stored in the UPF cache data, making it easier for computing devices that implement UPF to directly respond to more DNS query requests in the future, improving the speed and efficiency of domain name queries, and reducing the processing load on DNS servers in public networks.

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

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

[0149] This DNS query request includes the domain name that is the subject of the query from the terminal device.

[0150] In some embodiments, the DNS server is 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: The UPF receives a data packet from the DNS server.

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

[0154] In some embodiments, the DNS server sends the second DNS response to the core network, which, after exchange between functional entities within the core network, delivers the second DNS response to the UPF.

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

[0156] In some embodiments, the DNS server sends a data packet to the core network, and after interaction with a functional entity in the core network, delivers the data packet to the UPF, where the data packet includes the second DNS response.

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

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

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

[0160] In some embodiments, the DNS server is a 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, the DNS server in the data network is a domain name resolution server in a wide area network, the DNS server in the data network is a domain name resolution server in a local area network, or the DNS server in the data network is a domain name resolution server in a private network.

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

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

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

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

[0166] In some embodiments, some or all of the steps performed by the UPF above are performed by a UPF base module within the UPF.

[0167] In some embodiments, a UPF basic module in the UPF is used to realize the basic functions of the UPF, or a UPF basic module in the UPF is used to realize the indirect processing function of domain name queries, or a UPF basic module in the UPF is used to realize the processing function of domain name queries.

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

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

[0170] In some embodiments, the DNS modules in the UPF include at least one of a DNS request module, a DNS cache module, and a DNS response module.

[0171] 10 is a flowchart of a domain name query method according to some embodiments of the present application. This embodiment is described by taking as an example that the method is performed by the communication system 200 shown in FIG. 2, and the computer device for realizing UPF includes at least a UPF basic module, a DNS request module, and a DNS cache module. The 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] Take the example where the domain name that the terminal device expects or needs to query is an Internet business domain name.

[0174] When an end device initiates access to an Internet service, it sends a DNS query request in an uplink IP packet to a network device. The source address of this uplink IP packet is the address of the end device, and the target address is the address of a DNS server on the data network. The DNS query request is a request for a query of the IP address corresponding to an 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, the DNS query request includes: a UDP-based DNS query request; a TCP-based DNS query request; At least one of an HTTP-based DNS query request is included.

[0176] That is, in some embodiments, the DNS query request is at least one of 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, where the DNS query request includes the domain name being queried.

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

[0179] That is, the base station, as an access network device, forwards uplink IP packets from the terminal device to the core network, so that the uplink IP packets reach the UPF in the core network.

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

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

[0182] In some embodiments, the DNS request module (DNS RequestFilter, DNS-Req Filter) detects and analyzes a DNS query request, detects a DNS query request from an uplink IP message or an uplink IP packet, analyzes the DNS query request, obtains a domain name field in the DNS query request, and thereby obtains a queried domain name in the DNS query request. By detecting and analyzing the DNS query request from the uplink IP packet by the DNS request module, the DNS query request can be processed before being sent to the DNS server, thereby eliminating resource consumption on the communication path from the DNS request module to the DNS server, saving processing time for the DNS query request, and improving processing efficiency of the DNS query request.

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

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

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

[0186] In some embodiments, the IP address of the DNS server in the data network is configured, pre-configured, pre-defined, or pre-defined by the communication protocol.

[0187] In some embodiments, the IP addresses of DNS servers within the data network are not limited to generic public network DNS server IP addresses (such as 8.8.8.8 or 114.114.114.114).

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

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

[0190] In some embodiments, the DNS cache module (DNS Cache) implements querying and caching of the mapping relationship between domain names and IP addresses, i.e., the DNS cache module implements querying and caching of the 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 a query for a mapping relationship between a domain name and an IP address, or completes a query for an IP address corresponding to a domain name.

[0192] In some embodiments, the domain name query request sent from the DNS request module can be considered a local domain name query request of 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, and 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 searches for a mapping relationship between a domain name and an IP address in the DNS cache data of the UPF, or the DNS cache module queries or searches for an IP address corresponding to a domain name in the DNS cache data of the UPF.

[0195] In some embodiments, the UPF cache data or the 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, so that the UPF cache data can be effectively synchronized with changes in DNS services in the data network and the timeliness of the UPF cache data can be improved.

[0196] In some embodiments, step 1007 is performed 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.

[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 the 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. The DNS cache module may be understood to return the mapping relationship between the queried or looked-up domain name and the IP address to the DNS request module, or the DNS cache module may return 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 a first DNS response.

[0200] The DNS request module generates a first DNS response based on the IP address corresponding to the queried domain name received from the DNS cache module, or based on the mapping relationship between the queried domain name and the IP address received from the DNS cache module. The first DNS response includes the IP address corresponding to the queried domain name. Because the DNS response is generated by the DNS request module, the DNS query request can be processed before being sent to the DNS server, eliminating resource consumption on the communication path from the DNS request module to the DNS server and eliminating resource consumption by the DNS server for processing the DNS query request, saving processing time for the DNS query request and improving processing efficiency for the DNS query request.

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

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

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

[0204] In some embodiments, the UPF base module processes, such as packages, the first DNS response and sends the processed first DNS response to the terminal device.

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

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

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

[0208] In some embodiments, the functions of the above-mentioned UPF basic module, DNS request module, and DNS cache module are realized by software or a program.

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

[0210] As described above, the method of the present application supports domain name queries using the UPF basic module, DNS request module, and DNS cache module within the UPF. Compared with related art methods that send DNS query requests to DNS servers on public networks via longer network communication paths, the method of the present application supports completing domain name queries corresponding to DNS query requests based on cache data in the UPF before the DNS query request is sent to the DNS server on the public network. This shortens the required network communication path and increases the domain name query speed. Furthermore, since DNS query requests do not need to reach DNS servers on public networks, the number of DNS query requests processed by DNS servers can be reduced, thereby reducing the processing load on the DNS servers on public networks. Furthermore, the method of the present application does not require the installation of new devices in the core network and can be implemented using existing computer devices for implementing UPF, thereby reducing the cost of implementing the method of the present application. In addition, using existing computer devices for implementing UPF to perform domain name queries eliminates the need for separately configuring complex offloading rules, resulting in high compatibility and low implementation difficulty.

[0211] 11 is a flowchart of a domain name query method according to some embodiments of the present application. This embodiment is described by taking as an example that the method is executed by the computer device of the UPF shown in FIG. 3, and the UPF includes at least a UPF basic module, a DNS request module, a DNS cache module and a DNS response module. The method includes at least part of the following steps:

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

[0213] Take the example where the domain name that the terminal device expects or needs to query is an Internet business domain name.

[0214] When an end device initiates access to an Internet service, it sends a DNS query request in an uplink IP packet to a network device. The source address of this uplink IP packet is the address of the end device, and the target address is the address of a DNS server on the data network. The DNS query request is a request for a query of the IP address corresponding to an 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, the DNS query request includes: a UDP-based DNS query request; a TCP-based DNS query request; At least one of an HTTP-based DNS query request is included.

[0216] That is, in some embodiments, the DNS query request is at least one of 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, where the DNS query request includes the domain name being queried.

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

[0219] That is, the base station, as an access network device, forwards uplink IP packets from the terminal device to the core network, so that the uplink IP packets reach the UPF in the core network.

[0220] Step 1103: The UPF basic module receives the uplink IP packet and forwards the uplink IP packet 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 provides detection and resolution of DNS query requests and is operable to detect a DNS query request from an uplink IP message or an uplink IP packet, parse the DNS query request, obtain a domain name field in the DNS query request, and thereby obtain a queried domain name in the DNS query request.

[0223] In some embodiments, the DNS request module detects whether the uplink IP message or 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, a DNS query request is detected by the DNS request module from the uplink IP message or uplink IP packet if the target address of the uplink IP message is a DNS server in the data network or if the destination port of the uplink IP packet matches a port of a DNS resolution protocol, where the DNS resolution protocol includes at least one of UDP, TCP, and HTTP.

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

[0226] In some embodiments, the IP address of the DNS server in the data network is configured, pre-configured, pre-defined, or pre-defined by the communication protocol.

[0227] In some embodiments, the IP addresses of DNS servers within the data network are not limited to generic public network DNS server IP addresses (such as 8.8.8.8 or 114.114.114.114).

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

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

[0230] In some embodiments, the DNS cache module facilitates querying and caching of domain name to IP address mapping relationships, i.e., the DNS cache module facilitates 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 a mapping relationship between a domain name and an IP address, or queries an IP address corresponding to a domain name.

[0232] In some embodiments, the domain name query request sent from the DNS request module can be considered a local domain name query request of 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, and 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 searches for a mapping relationship between a domain name and an IP address in the DNS cache data of the UPF, or the DNS cache module queries or searches for an IP address corresponding to a domain name in the DNS cache data of the UPF.

[0235] In some embodiments, the UPF cache data or the 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, so that the UPF cache data can be effectively synchronized with changes in DNS services in the data network and the timeliness of the UPF cache data can be improved.

[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 find an IP address corresponding to the domain name or a mapping relationship between the domain name and the IP address from the UPF cache data or the UPF DNS cache data, step 1107 is executed.

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

[0238] In some embodiments, if the DNS cache module is unable to query or search for a mapping relationship between the queried domain name and an IP address, or is unable to query or search for an IP address corresponding to the queried domain name, the DNS cache module does not return a domain name query result to the DNS request module, or the DNS cache module returns a query failure result to the DNS request module, including a query failure for the mapping relationship between the queried domain name and an IP address, or a query failure for the IP address corresponding to the queried domain name.

[0239] In some embodiments, when the DNS cache module fails to query or search for a mapping relationship between the queried domain name and an IP address, or fails to query or search for an IP address corresponding to the queried domain name, 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 DNS cache module failed to query for the mapping relationship between the queried domain name and an IP address; the DNS cache module failed to query for the IP address corresponding to the queried domain name; the DNS cache module did not obtain the mapping relationship between the queried domain name and the IP address from the UPF cache data; the DNS cache module did not obtain the IP address corresponding to the queried domain name from the UPF cache data; or the DNS cache module did not obtain the mapping relationship between the queried domain name and the IP address from the DNS cache data; or the DNS cache module did not obtain the 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 basic 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 a DNS query request to the UPF base module.

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

[0243] In some embodiments, the first period of time 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 a DNS query request to a DNS server in the data network.

[0246] Step 1110: The UPF base module receives the second DNS response.

[0247] The second DNS response includes an IP address provided by the data network corresponding to the queried domain name, where 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 the 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 transmits a downlink IP packet containing (or carrying) the second DNS response to the core network, such that the downlink IP packet containing (or carrying) 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 for an IP address corresponding to the queried domain name or queries for a mapping relationship between the queried domain name and the IP address based on the queried domain name included in the received DNS query request.

[0253] In some embodiments, the data network generates the 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, the DNS server in the data network is a domain name resolution server in a wide area network, the DNS server in the data network is a domain name resolution server in a local area network, or the DNS server in the data network is a domain name resolution server in a private network.

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

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

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

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

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

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

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

[0262] In some embodiments, the IP address of the DNS server in the data network is configured, pre-configured, pre-defined, or pre-defined by the communication protocol.

[0263] In some embodiments, the IP addresses of DNS servers within the data network are not limited to generic public network DNS server IP addresses (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 a domain name and an IP address corresponding to the domain name in the DNS response, or obtains a mapping relationship between the domain name and the IP address in the DNS response, where 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 domain name obtained by the analysis and the IP address corresponding to the domain name to the DNS cache module, or the DNS response module sends the mapping relationship between the domain name obtained by the analysis and the IP address 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 the 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 the domain name, or the mapping relationship between the domain name and the IP address, in cache data of the UPF.

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

[0271] In some embodiments, the DNS cache module stores IP addresses corresponding to domain names, or mapping relationships between domain names and IP addresses, which may be understood to mean 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 the domain name and the IP address in the second DNS server in the cache data of the UPF, and when a DNS query request is received in the future, the DNS query request can be processed by the UPF request module. This allows the DNS query request to be processed before being sent to the DNS server, eliminating resource consumption on the communication path from the DNS request module to the DNS server and eliminating resource consumption by the DNS server for processing the DNS query request, thereby saving the processing time of the DNS query request and improving the processing efficiency of the DNS query request.

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

[0274] The second DNS response contains the IP address corresponding to the queried domain name.

[0275] In some embodiments, the UPF base module processes, such as packages, the second DNS response and sends the processed second DNS response to the terminal device.

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

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

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

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

[0280] In some embodiments, the UPF base module, DNS request module, DNS cache module, and DNS response module described above are considered part or all of the overall UPF.

[0281] As described above, the method of the present application supports performing domain name queries using the UPF basic module, DNS request module, DNS cache module, and DNS response module in the UPF and returning the resolved IP address to the terminal device. Compared to related art methods that send DNS query requests to a DNS server on a public network via a longer network communication path, the method of the present application supports completing a domain name query corresponding to a DNS query request based on cache data in the UPF before the DNS query request is sent to the DNS server on the public network. This shortens the required network communication path and increases the domain name query speed. Furthermore, since the DNS query request does not need to reach the DNS server on 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 on the public network. Furthermore, the method of the present application does not require the installation of new devices in the core network and can be implemented by using existing computer devices for implementing UPF, thereby reducing the cost of implementing the method of the present application. In addition, using existing computer devices for implementing UPF to perform domain name queries eliminates the need for separately configuring complex offloading rules, resulting in high compatibility and low implementation difficulty. Furthermore, the method of the present application supports a computer device for implementing UPF to store IP addresses corresponding to domain names from a data network in the cache data of UPF, thereby contributing to subsequent processing of DNS query requests by UPF and further improving the efficiency and speed of domain name queries.

[0282] 12 is a flowchart of a domain name query method according to some embodiments of the present application. In this embodiment, the method is described by taking as an example that the method is performed by the terminal device shown in FIG. 3. The method includes at least a part of the following steps:

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

[0284] In some embodiments, a DNS query request with a domain name to be queried is sent by a terminal device to a network device that is an access network device and / or a core network device.

[0285] In some embodiments, the DNS query request includes: a UDP-based DNS query request; a TCP-based DNS query request; At least one of an HTTP-based DNS query request is included.

[0286] That is, in some embodiments, the DNS query request is at least one of 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, the terminal device receives a DNS response from the network device, the DNS response containing an IP address corresponding to the queried domain name.

[0289] In some embodiments, the terminal device receives a DNS response from the access network, which receives a DNS response from the core network, the DNS response containing an 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, the DNS response is generated by the UPF of the core network, or alternatively, the DNS response is generated 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 the IP address or the Internet service corresponding to the IP address based on the IP address corresponding to the received queried domain name.

[0295] As described above, the method according to the embodiment of the present application supports a terminal device to obtain a DNS response from a UPF. Compared with the related art's method of sending a DNS query request to a DNS server on a public network via a longer network communication path, the method according to the present application supports completing a domain name query corresponding to a DNS query request based on cache data in the UPF before the DNS query request is sent to the DNS server on the public network. This shortens the required network communication path and increases the domain name query speed. Furthermore, since the DNS query request does not need to reach the DNS server on 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 on the public network. Furthermore, the method according to the embodiment of the present application does not require the installation of a new device in the core network and can be implemented by using an existing computer device for implementing a UPF, thereby reducing the cost of implementing the method according to the present application. In addition, using an existing computer device for implementing a UPF to perform domain name queries eliminates the need to separately configure complex offloading rules, resulting in high compatibility and low implementation difficulty.

[0296] 13 is a schematic block diagram of a domain name query device according to some exemplary embodiments of the present application, which includes at least some of a receiving module 132, a processing module 134, and a sending module 136.

[0297] The receiving module 132 is configured to receive a DNS query request from a terminal device, the DNS query request including a domain name to be queried.

[0298] The processing module 134 is configured to query an IP address corresponding to the queried domain name based on cached data of the device.

[0299] The sending module 136 is configured to send a DNS response to the terminal device that includes an IP address corresponding to the queried domain name.

[0300] In some embodiments, the processing module 134 is further configured to, if the device's cached data includes an IP address corresponding to the queried domain name, generate the DNS response from an IP address corresponding to the queried domain name.

[0301] In some embodiments, the device further comprises a sending module 136 configured to perform the step of sending the DNS query request to a DNS server if the cached data of the device does not include an IP address corresponding to the queried domain name.

[0302] In some embodiments, the receiving module 132 is further configured to receive 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 an IP address corresponding to the queried domain name in the DNS response in cache data of the device.

[0304] In some embodiments, the receiving module 132 is further configured to perform the step of receiving a data packet from the DNS server, the target address of the data packet being an 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 an 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 sent from the terminal device, the target address of the uplink data packet being 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 queried domain name from the DNS query request. 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.

[0310] In some embodiments, the cached data for the UPF is provided by a DNS server, the DNS server being on a data network.

[0311] In some embodiments, the cached data of the UPF includes: Hot update cache data, Periodically cache data; Default cache data, Static cache data; At least one of the dynamic cache data is included.

[0312] In some embodiments, the DNS query request includes: A DNS query request based on the User Datagram Protocol (UDP); a DNS query request based on Transmission Control Protocol (TCP); At least one of a DNS query request based on the Hypertext Transfer Protocol (HTTP) is included.

[0313] As described above, compared to related art methods of sending DNS query requests to DNS servers on public networks via long network communication paths, the device of the present application supports the completion of domain name queries corresponding to DNS query requests based on UPF cache data before the DNS query request is sent to the DNS server on the public network, thereby shortening the required network communication path and increasing the domain name query speed. Furthermore, since DNS query requests do not need to reach DNS servers on public networks, the number of DNS query requests processed by the DNS server can be reduced, thereby reducing the processing load on the DNS servers on public networks. Furthermore, the method of the present application does not require the installation of new devices in the core network and can be implemented using existing computer devices for implementing UPF, thereby reducing the cost of implementing the method of the present application. In addition, using existing computer devices for implementing UPF to perform domain name queries eliminates the need for separately configuring complex offloading rules, resulting in high compatibility and low implementation difficulty.

[0314] It should be noted that the device according to the above embodiment is described by taking only the division of each functional module mentioned above as an example in the domain name query, but in actual application, the above functions may be assigned to be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above-mentioned functions. For specific implementation processes, please refer to the method embodiments, and no further description will be given here.

[0315] 14 shows a schematic block diagram of a communication device 1400 according to some exemplary embodiments of the present application. The 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 executes software programs and modules to perform various functional applications and information processing. 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 a communication component, which may be a communication chip. 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] The memory 1404 is connected to the processor 1401 via a bus 1405. The memory 1404 can be used to store at least one instruction, which the processor 1401 can use to execute to implement each step in the above-described method embodiments.

[0319] Additionally, memory 1404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, including, but not limited to, a magnetic or optical disk, an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Static Random-Access Memory (SRAM), a Read-Only Memory (ROM), a magnetic memory, a flash memory, and a 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] Some exemplary embodiments of the present application further provide a computer-readable storage medium having at least one program stored thereon, which, when loaded and executed by a processor, causes the computer-readable storage medium to implement the domain name query method according to each of the method embodiments described above.

[0323] Some exemplary embodiments of the present application further provide a chip including a programmable logic circuit and / or program instructions, which, when executed on a communication device, implements the domain name query method according to each of the method embodiments described above.

[0324] In some embodiments of the present application, there is further provided a computer program product, which, when executed on a processor of a computer device, causes the computer device to perform the domain name query method described above.

[0325] In some exemplary embodiments of the present application, there is further provided a computer program comprising computer instructions, the computer instructions being executed by a processor of a computer device, causing the computer device to perform the domain name query method described above.

[0326] Those skilled in the art will recognize that, in one or more examples described above, the functions described in the embodiments of the present application can be implemented by hardware, software, firmware, or any combination thereof. If implemented by software, these functions can be stored on a computer-readable medium or stored or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media, with communication media including any medium that enables a computer program to be transferred from one place to another. Storage media are any available media that can be accessed by a general-purpose or special-purpose computer.

[0327] The above description is merely a selection of embodiments of the present application and is not intended to limit the present application. Any amendments, equivalent replacements, improvements, etc. made without departing from the spirit and scope of the principles of the present application shall fall within the protection scope of the present application.

Claims

1. 1. A domain name query method executed by a computing device, comprising: receiving a DNS (Domain Name System) query request from a terminal device, the DNS query request including a domain name to be queried; determining an IP (Internet Protocol) address corresponding to the queried domain name based on cache data in a UPF (User Plane Function); sending a DNS response to the terminal device, the DNS response including an IP address corresponding to the queried domain name.

2. The step of determining an IP address corresponding to the queried domain name based on cache data of a UPF includes:

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

3. The step of determining an IP address corresponding to the queried domain name based on cache data of a UPF includes: If the cache data of the UPF does not include an IP address corresponding to the domain name to be queried, sending the DNS query request to a DNS server; receiving the DNS response from the DNS server; 3. The domain name query method according to claim 1, wherein 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.

4. The domain name query method further comprises: The domain name query method according to claim 3 , further comprising the step of storing an IP address corresponding to the queried domain name in the DNS response in cache data of the UPF.

5. The step of receiving the DNS response from the DNS server comprises: receiving a data packet from the DNS server, the target address of the data packet being an address of the terminal device; extracting the DNS response from the data packet; The domain name query method further comprises:

5. The domain name query method according to claim 3, further comprising the step of analyzing an IP address corresponding to the queried domain name from the DNS response.

6. The step of receiving a DNS query request from a terminal device includes: receiving an uplink data packet sent from the terminal device, the target address of the uplink data packet being the address of a DNS server; extracting the DNS query request from the uplink data packet; The method further comprises: analyzing the domain name of the query target from the DNS query request; The domain name query method according to any one of claims 1 to 5, wherein 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.

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

8. The DNS query request includes: A DNS query request based on the User Datagram Protocol (UDP); A DNS query request based on the Transmission Control Protocol (TCP); 8. The domain name query method according to claim 1, further comprising at least one of: a DNS query request based on the HyperText Transfer Protocol (HTTP).

9. A domain name query device, a receiving module for receiving a DNS (Domain Name System) query request from a terminal device, the DNS query request including a domain name to be queried; a processing module for querying an IP (Internet Protocol) address corresponding to the domain name to be queried from cache data of the domain name querying device; a sending module for sending a DNS response to the terminal device, the DNS response including an IP address corresponding to the queried domain name;

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

11. A computer-readable storage medium on which a computer program is stored, A computer-readable storage medium that, when the computer program is loaded and executed by a processor, causes the domain name query method according to any one of claims 1 to 8 to be realized.

12. A computer program product having a computer program stored therein, A computer program product, which, when loaded and executed by a processor, causes the domain name query method according to any one of claims 1 to 8 to be realized.

13. A chip containing programmable logic circuits and / or program instructions, A chip that causes a computer device equipped with the chip to implement the domain name query method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Cloud computing service deployment and distribution method, system and device and storage medium

    CN113301077A

  • Cache information exchange method, cache information exchange system, and proxy apparatus

    JP2013187827A

  • Application discovery method, apparatus, and system

    JP2023515959A