WO2024109369A1 - 域名查询方法、装置、设备及存储介质 - Google Patents

域名查询方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2024109369A1
WO2024109369A1 PCT/CN2023/123894 CN2023123894W WO2024109369A1 WO 2024109369 A1 WO2024109369 A1 WO 2024109369A1 CN 2023123894 W CN2023123894 W CN 2023123894W WO 2024109369 A1 WO2024109369 A1 WO 2024109369A1
Authority
WO
WIPO (PCT)
Prior art keywords
dns
domain name
upf
data
queried
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/123894
Other languages
English (en)
French (fr)
Inventor
杨勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to JP2025514187A priority Critical patent/JP2025533410A/ja
Publication of WO2024109369A1 publication Critical patent/WO2024109369A1/zh
Priority to US18/908,676 priority patent/US20250030658A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4552Lookup mechanisms between a plurality of directories; Synchronisation of directories, e.g. metadirectories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/58Caching of addresses or names

Definitions

  • the embodiments of the present application relate to the field of mobile communications, and in particular to domain name query technology.
  • Domain name resolution is an Internet service that supports the conversion between domain names and Internet Protocol (IP) addresses.
  • IP Internet Protocol
  • domain name resolution usually involves sending domain name query requests from terminal devices to public network domain name resolution servers through various network devices.
  • the public network domain name resolution servers query the mapping relationship between domain names and IP addresses and return the query results.
  • the network communication link between the public network domain name resolution server and the terminal device is too long, and the public network domain name resolution server usually needs to process a large number of domain name query requests concurrently, which is too heavy. Therefore, the domain name query speed in the related technology is usually slow, which has a negative impact on the terminal device's subsequent Internet service access.
  • the present application provides a domain name query method, device, equipment and storage medium, which support accelerating the speed of domain name query.
  • the technical solution is as follows:
  • a domain name query method is provided, the method being executed by a computer device, the method comprising:
  • a DNS response is sent to the terminal device, wherein the DNS response includes the IP address corresponding to the domain name to be queried.
  • a domain name query device comprising:
  • a receiving module configured to receive a DNS query request from a terminal device, wherein the DNS query request includes a domain name to be queried;
  • a processing module configured to determine an Internet Protocol IP address corresponding to the domain name to be queried based on cache data of the device;
  • the sending module is used to send a DNS response to the terminal device, wherein the DNS response includes the IP address corresponding to the domain name to be queried.
  • a computer device comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor, The computer device implements the domain name query method as described above.
  • a computer-readable storage medium stores a computer program, wherein the computer program is loaded and executed by a processor, and wherein the computer-readable storage medium implements the domain name query method as described above.
  • a computer program product stores a computer program, the computer program is loaded and executed by a processor, and the computer program product implements the domain name query method as described above.
  • a chip comprising a programmable logic circuit and/or program instructions, and a computer device equipped with the chip is used to implement the domain name query method as described above.
  • the domain name query is performed by a computer device for implementing the user plane function UPF.
  • the method provided by the present application supports the completion of the domain name query corresponding to the DNS query request by the computer device for implementing UPF based on the cache data of UPF before the DNS query request is sent to the DNS server of the public network.
  • the required network communication link is shorter, which can improve the speed of domain name query.
  • the DNS query request since the DNS query request does not need to reach the DNS server of the public network, the DNS query request that the DNS server needs to process can be reduced, thereby reducing the processing load of the DNS server of the public network.
  • the method provided in the embodiment of the present application does not need to add new equipment in the core network, and can be implemented using the existing computer equipment for implementing UPF. Therefore, the implementation cost of the method provided by the present application is low; in addition, the domain name query is performed using the existing computer equipment for implementing UPF, and there is no need to set additional complex diversion rules, which has high compatibility and low implementation difficulty.
  • FIG1 is a schematic diagram showing a domain name query process in the related art
  • FIG2 is a schematic diagram showing a domain name query process in the related art
  • FIG3 shows a structural block diagram of a communication system provided by some exemplary embodiments of the present application.
  • FIG4 is a schematic diagram showing the structure of a communication system provided by some exemplary embodiments of the present application.
  • FIG5 is a schematic diagram showing a flow chart of a domain name query method provided by some exemplary embodiments of the present application.
  • FIG6 is a schematic diagram showing a flow chart of a domain name query method provided by some exemplary embodiments of the present application.
  • FIG. 7 is a schematic diagram showing a flow chart of a domain name query method provided by some exemplary embodiments of the present application.
  • FIG8 is a schematic diagram showing a domain name query method provided by some exemplary embodiments of the present application.
  • FIG9 is a schematic diagram showing a domain name query method provided by some exemplary embodiments of the present application.
  • FIG10 is a schematic diagram showing a domain name query method provided by some exemplary embodiments of the present application.
  • FIG11 is a schematic diagram showing a domain name query method provided by some exemplary embodiments of the present application.
  • FIG12 is a schematic diagram showing a flow chart of a domain name query method provided by some exemplary embodiments of the present application.
  • FIG13 shows a structural block diagram of a domain name query device provided by some exemplary embodiments of the present application.
  • FIG. 14 shows a schematic diagram of the structure of a communication device provided by some exemplary embodiments of the present application.
  • DNS Domain Name System
  • DNS is used to implement the mutual mapping between domain names and Internet Protocol (IP) addresses. Both domain names and IP addresses can be used to mark computing devices on the network, and domain names are equivalent to aliases for IP addresses. Domain names are composed of letters, numbers, and characters of variable length (such as www.xxxx.com), while IP addresses are composed of four segments of numbers with a strict hierarchy (such as 202.96.133.134).
  • IP addresses are more difficult to remember than domain names.
  • entering the domain name in the input field for network communication is a more common, more universal and easier operation method.
  • the computer recognizes the IP address rather than the domain name during network communication. Therefore, when the user enters the domain name in the input bar, a service that supports the conversion between domain names and IP addresses is required so that the computer can communicate over the network.
  • This service is called domain name resolution, and the server that provides this service is called a domain name resolution server or DNS server.
  • DNS domain name resolution is usually performed by a terminal device sending a domain name query request to a domain name resolution server on a public network (or wide area network).
  • the domain name resolution server on the public network queries the mapping relationship between the domain name and the IP address and returns the query result. This process can also be considered as the domain name query process.
  • the domain name resolution server on the public network can also be considered as a public domain name resolution server, and its IP address is usually 8.8.8.8 or 114.114.114.114.114.
  • the common DNS domain name resolution process in the related art is shown in Figure 1.
  • the terminal device 101 sends a DNS request to the base station 102.
  • the DNS request includes the domain name requested by the terminal device 101.
  • the DNS request enters the Internet 104 through the core network user plane device (User Plane Function, UPF) 103, and then passes through various routers and switches on the Internet 104 to reach the public network DNS server 105.
  • the public network DNS server 105 After receiving the DNS request, the public network DNS server 105 searches for the IP address corresponding to the domain name requested by the terminal device 101, and then constructs a corresponding DNS response based on the queried IP address and sends it.
  • the DNS response passes through several routers and switches to reach the core network UPF 103.
  • the core network UPF 103 finally returns the DNS response to the terminal device 101 through the base station 102.
  • the terminal device 101 can perform subsequent Internet service access based on the received DNS response.
  • the physical distance between the public network DNS server 105 and the terminal device 101 is usually far, the network communication link between the two is long, and the public network DNS server usually needs to process a large number of DNS requests concurrently, and the processing load of domain name resolution is heavy. Therefore, the above method will lead to a long processing time for domain name resolution, that is, a long time for domain name query, and even cause domain name resolution failure in severe cases, thereby affecting the time and efficiency of the terminal device to access services, and may even cause the terminal device to be unable to access Internet services.
  • the present application proposes a domain name query method, which accelerates domain name query by implementing a computer device of UPF, and has the advantages of low cost, high efficiency and easy compatibility.
  • the following is an illustrative embodiment to illustrate this domain name query method and its corresponding device, equipment and storage medium.
  • FIG2 shows a schematic diagram of the architecture of a communication system 200 provided in some exemplary embodiments of the present application.
  • the communication system 200 may include at least one of the following: a terminal device 201, an access network 203, a core network (CN) 205, and a data network (DN) 207.
  • the network 205 can be logically divided into two parts: a user plane and a control plane.
  • the control plane is responsible for the management of the mobile network
  • the user plane is responsible for the transmission of service data.
  • the terminal device 201 is the entrance for mobile users to interact with the network, which can provide basic computing power and storage capacity, display service windows to users, and receive user operation input.
  • the terminal device 201 uses a certain air interface technology to establish a signal connection and a data connection with the access network 203, thereby transmitting control signals and service data to the mobile network.
  • the terminal device 201 can be deployed on land, on water, and in the air, etc., including but not limited to: handheld devices, wearable devices, vehicle-mounted devices, and Internet of Things devices, such as mobile phones, tablet computers, e-book readers, laptop computers, desktop computers, televisions, game consoles, mobile Internet devices (Mobile Internet Device, MID), augmented reality (Augmented Reality, AR) terminals, virtual reality (Virtual Reality, VR) terminals and mixed reality (Mixed Reality, MR) terminals, wearable devices, handles, electronic tags, controllers, wireless terminals in industrial control (Industrial Control), wireless terminals in self-driving (Self Driving), wireless terminals in remote medical care (Remote Medical), smart grids (SMB), etc.
  • handheld devices such as mobile phones, tablet computers, e-book readers, laptop computers, desktop computers, televisions, game consoles, mobile Internet devices (Mobile Internet Device, MID), augmented reality (Augmented Reality, AR) terminals, virtual reality (Virtual Reality, VR
  • Wireless terminals in Transportation Safety wireless terminals in Smart City
  • wireless terminals in Smart Home wireless terminals in Remote Medical Surgery
  • cellular phones cordless phones
  • Session Initiation Protocol (SIP) phones Wireless Local Loop (WLL) stations
  • PDA Personal Digital Assistant
  • STB TV Set Top Box
  • CPE Customer Premise Equipment
  • the access network 203 is used to implement access-related functions, and can provide network access functions for authorized users within the coverage area of the cell, and use transmission tunnels of different qualities to transmit user data according to the user level, business requirements, etc.
  • the access network 203 can manage its own resources, use them reasonably, provide access services to the terminal device 201 on demand, and forward control signals and user data between the terminal device 201 and the core network 205.
  • the access network 203 may include access network equipment, which may be equipment that provides access services to the terminal device 201, and may include Radio Access Network (RAN) equipment and AN equipment.
  • RAN equipment is mainly wireless network equipment in the 3GPP network
  • AN equipment may be access network equipment not defined by 3GPP.
  • the names of devices with base station functions may be different.
  • RAN Fifth Generation Mobile Communication Technology
  • gNB Next Generation Node Basestation
  • LTE Long Term Evolution
  • eNB evolved Node B
  • the core network 205 is responsible for maintaining the subscription data of the mobile network, managing the network elements of the mobile network, and 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 attached, 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 detached, it releases network resources for the terminal device 201; when the terminal device 201 has service data, it provides data routing functions for the terminal device 201, such as forwarding uplink data to the data network 207; or, receiving downlink data sent to the terminal device 201 from the data network 207, forwarding it to the access network 203, and thus sending the downlink data to the terminal device 201.
  • the core network 205 is deployed in a private network
  • Data network 207 is used to provide business services to users.
  • Data network 207 can be a private network, such as a local area network; it can also be an external network that is not controlled by the operator, such as the Internet; it can also be a proprietary network jointly deployed by operators, such as the IP Multimedia Core Network Subsystem (IMS).
  • Terminal device 201 can access data network 207 through an established Protocol Data Unit (PDU) session.
  • PDU Protocol Data Unit
  • At least one of the access network 203, the core network 205, and the data network 207 may be considered as a network device.
  • Uplink communication refers to sending signals in the direction of the terminal device 201, the access network 203, the core network 205, and the data network 207;
  • downlink communication refers to sending signals in the direction of the data network 207, the core network 205, the access network 203, and the terminal device 201.
  • the technical solutions described in some embodiments of the present application may be applicable to 5G systems, LTE systems, and the evolved systems of 5G systems and LTE systems, as well as to Beyond Fifth Generation (B5G), 6G systems, and subsequent evolved systems.
  • the 5G system may include at least one of non-standalone (NSA) and standalone (SA).
  • Figure 3 is a detailed architecture determined based on Figure 2, in which the core network user plane includes: UPF; the core network control plane includes authentication server function (Authentication Server Function, AUSF), access and mobility management (Access and Mobility Management Function, AMF), session management (Session Management Function, SMF), network slice selection function (Network Slice Selection Function, NSSF), network exposure function (Network Exposure Function, NEF), network repository function (Network Repository Function, NRF), unified data management (Unified Data Management, UDM), policy control function (Policy Control Function, PCF), application function (Application Function, AF).
  • the functions of these functional entities are as follows:
  • AMF is mainly responsible for mobility management in mobile networks, such as user location update, user registration network, user switching, etc.
  • SMF is mainly responsible for session management in mobile networks, such as session establishment, modification, and release.
  • PCF mainly supports providing a unified policy framework to control network behavior, provides policy rules to the control layer network functions, and is responsible for obtaining user subscription information related to policy decisions.
  • AUSF is used to perform terminal security authentication.
  • NEF is mainly used to support the opening of capabilities and events.
  • NRF is used to provide storage and selection functions of network function entity information for other network elements.
  • UDM is used to store user data, such as subscription data, authentication or authorization data, etc.
  • AF interacts with the core network to provide application layer services, such as providing information about application layer data routing, providing access network capability opening functions, interacting with the policy framework to provide policy control, interacting with IMS, etc.
  • UPF in addition to being responsible for forwarding and receiving user data, also has the related functions of domain name query. That is to say, UPF can not only receive user data from the data network and transmit it to the terminal device through the access network, but also receive user data from the terminal device through the access network and forward it to the data network, and can also realize domain name cache. Domain name storage, domain name query and other functions related to domain name resolution.
  • the N1 interface is the reference point between the UE and the AMF
  • the N2 interface is the reference point between the RAN and the AMF, used for sending non-access stratum (NAS) messages, etc.
  • the N3 interface is the reference point between the RAN and the UPF, used for transmitting user plane data, etc.
  • the N4 interface is the reference point between the SMF and the UPF, used for transmitting information such as tunnel identification information of the N3 connection, data cache indication information, and downlink data notification messages
  • the N6 interface is the reference point between the UPF and the DN, used for transmitting user plane data, etc.
  • the NG interface is the interface between the RAN and the CN.
  • the interface name between the network elements in Figures 2 and 3 is only an example.
  • the name of the interface in the specific implementation may be other names, and the embodiments of the present application do not specifically limit this.
  • the names of the network elements (such as SMF, AF, UPF, etc.) included in Figures 2 and 3 are also only examples, and do not constitute any limitation on the functions of the network elements themselves.
  • the above-mentioned network elements may also have other names, and the embodiments of the present application do not specifically limit this.
  • the information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
  • the information involved in this application is obtained with full authorization, and the terminal device and server only cache the information during the program operation, and will not solidify the storage and reuse the relevant data of the information.
  • FIG4 is a flow chart of a domain name query method provided by some exemplary embodiments of the present application. This embodiment is illustrated by an example in which the method is executed by a computer device for implementing the UPF shown in FIG3. The method includes at least some of the following steps:
  • Step 410 receiving a DNS query request from a terminal device, where the DNS query request includes a domain name to be queried;
  • the DNS query request comes from the terminal device.
  • the terminal device sends a DNS query request carrying the domain name to be queried to a DNS server, which is located in a data network.
  • the DNS query request needs to pass through a network device, which is at least one of an access network device and a core network device.
  • Step 430 Determine the IP address corresponding to the domain name to be queried based on the cache data of the UPF;
  • the cache data of UPF includes all or part of the domain name, and data related to the IP address corresponding to the domain name.
  • the cache data of the UPF includes DNS cache data
  • the DNS cache data includes a mapping relationship between a domain name and an IP address.
  • the UPF searches the DNS cache data for the IP address corresponding to the domain name to be queried.
  • Step 450 Send a DNS response to the terminal device, where the DNS response includes the IP address corresponding to the domain name to be queried.
  • the DNS response is a response to a DNS query request sent to a terminal device.
  • the UPF sends the DNS response carrying the IP address corresponding to the domain name to be queried to the terminal device.
  • the UPF sends the DNS response carrying the IP address corresponding to the domain name to be queried to the access network device, and the DNS response is sent to the terminal device through the access network device.
  • the method provided by the present application is to perform a domain name query by a computer device for implementing UPF.
  • the method provided by the present application supports the completion of a domain name query corresponding to a DNS query request by a computer device for implementing UPF based on the cached data of UPF before the DNS query request is sent to the DNS server of the public network, so that the required network communication link is shorter, and the domain name query speed can be improved.
  • the DNS query request since the DNS query request does not need to reach the DNS server of the public network, the DNS query request that the DNS server needs to process can be reduced, thereby reducing the processing load of the DNS server of the public network.
  • the method provided by the embodiment of the present application does not require the addition of new equipment in the core network, and can be implemented using the existing computer device for implementing UPF. Therefore, the implementation cost of the method provided by the present application is low; in addition, the use of the existing computer device for implementing UPF for domain name query does not require additional complex diversion rules to be set, and has high compatibility and low implementation difficulty.
  • FIG5 is a flow chart of a domain name query method provided by some exemplary embodiments of the present application. This embodiment is illustrated by the method being executed by a computer device for implementing the UPF shown in FIG3. The method includes at least some of the following steps:
  • Step 510 receiving a DNS query request from a terminal device, where the DNS query request includes a domain name to be queried;
  • the DNS query request comes from the terminal device.
  • the terminal device sends a DNS query request carrying a domain name to be queried to a DNS server, and the DNS server is located in a data network.
  • the DNS query request passes through a network device, which is at least one of an access network device and a core network device.
  • the DNS query request includes at least one of the following:
  • TCP Transmission Control Protocol
  • DNS query request based on Hyper Text Transfer Protocol (HTTP).
  • HTTP Hyper Text Transfer Protocol
  • the DNS query request is at least one of a UDP DNS query request, a TCP DNS query request, and an HTTP DNS query request. That is, the method provided in the embodiment of the present application can support processing a variety of DNS query requests, has a richer application scenario, and has higher compatibility in various application scenarios.
  • Step 530 Determine the IP address corresponding to the domain name to be queried based on the cache data of the UPF;
  • the cache data of UPF includes data related to the domain name and the IP address corresponding to the domain name.
  • the cache data of the UPF includes DNS cache data
  • the DNS cache data refers to data related to the mapping relationship between the domain name and the IP address.
  • the UPF queries the IP address corresponding to the domain name to be queried in the DNS cache data.
  • the cache data of the UPF or the DNS cache data of the UPF comes from a DNS server, which is located in a data network.
  • the cache data of the UPF includes at least one of the following:
  • Hot update refers to an update method that updates in real time without restarting or shutting down the device.
  • Hot update cache data refers to data cached to UPF by hot update; timed cache data refers to data cached to UPF at a specified time, or data cached to UPF in a periodic manner, or data cached to UPF in a semi-periodic manner; default cache data refers to data cached to UPF in a pre-configured manner, or the initial cache data in UPF; static cache data refers to data cached to UPF by static caching; dynamic cache data refers to data cached to UPF by dynamic caching.
  • the UPF when the UPF receives a hot update cache request or hot update cache information from a DNS server, or satisfies a hot update cache condition, the UPF performs hot update cache during operation. Based on the hot update cache request or hot update cache information or hot update cache condition, the UPF performs real-time updates on the data related to the domain name and the IP address corresponding to the domain name in the cache data of the UPF, and the data obtained after the real-time update is the hot update cache data, or the data different from the data before the real-time update after the real-time update is the hot update cache data.
  • the cache data of the UPF or the DNS cache data of the UPF is cleared, and based on the DNS query request of the terminal device, the DNS response of the DNS server is received, and the data related to the domain name and the IP address corresponding to the domain name in the DNS response is cached in the cache data of the UPF or the DNS cache data of the UPF to implement hot update cache.
  • the first threshold is predefined, or preconfigured, or determined independently by the UPF, or indicated by the DNS server.
  • This update method can be implemented without shutting down or restarting the UPF.
  • the update process has little impact on the terminal device, and can achieve real-time update of the cache data of the UPF while meeting the domain name query requirements of the terminal device.
  • this update method is beneficial to keep the cache data of the UPF in good synchronization with the changes in the DNS service in the data network, so that the DNS cache data of the UPF has better timeliness.
  • the UPF when the UPF receives a timed cache request from a DNS server, or the UPF receives timed cache information from a DNS server, or the UPF receives timer information, or the UPF satisfies a timed cache condition, the UPF performs timed caching based on the timed cache request, or the timed cache information, or the timer information, or the specified time in the timed cache condition.
  • the UPF updates the 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 timed cache request, the timed cache information, the timer information, or the timed cache condition.
  • the data obtained after the update is the timed cache data, or the data different from the data before the update after the update is the timed cache data.
  • the timer is predefined, or preconfigured, or determined autonomously by the UPF, or indicated by the DNS server.
  • the timed cache condition is predefined, or preconfigured, or determined autonomously by the UPF, or indicated by the DNS server.
  • a data update request is sent to the DNS server, a data update response from the DNS server is received, and the data related to the domain name and the IP address corresponding to the domain name in the data update response is cached in the UPF's cache data or the UPF's DNS cache data to implement timed caching.
  • the second threshold is predefined, or preconfigured, or determined autonomously by the UPF, or indicated by the DNS server.
  • This update method can be triggered by a DNS server, which is more flexible to implement; it can also be autonomously triggered by the UPF based on time, reducing the waste of signaling resources.
  • this update method is beneficial for keeping the UPF's cached data in better synchronization with changes in the DNS service in the data network, so that the UPF's DNS cache data has better Good timeliness.
  • the UPF receives an initial cache request, receives initial cache information, receives a configuration cache request, receives configuration cache information, receives a preconfigured cache request, receives preconfigured cache information, or satisfies a default cache condition during a startup phase, an initialization phase, a configuration phase, or a preconfiguration phase, and performs default caching.
  • the UPF updates the 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 preconfigured cache request, the preconfigured cache information, or the default cache condition, and the data obtained after the update is the default cache data, or the data different from the data before the update after the update is the default cache data.
  • UPF initializes the cache data of UPF, sends a data update request to the DNS server, receives the data update response from the DNS server, and caches the data related to the domain name and the IP address corresponding to the domain name in the data update response to the cache data of UPF or the DNS cache data of UPF to implement default caching.
  • This update method enables UPF to meet the domain name query needs of some terminal devices when it first provides domain name query services, and improves the efficiency of UPF in processing domain name query requests.
  • the UPF when static caching is needed, such as 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. Based on the static caching request, or static caching information, or static caching condition, the UPF updates the data related to the domain name and the IP address corresponding to the domain name in the cache data of the UPF, and the data obtained after the update is the static cache data, or the data different from the data before the update after the update is the static cache data.
  • This update method is beneficial for keeping the cache data of the UPF in good synchronization with the changes in the DNS service in the data network, so that the DNS cache data of the UPF has better timeliness.
  • the UPF when dynamic caching is required, such as when the UPF receives a dynamic caching request, or dynamic caching information, or when dynamic caching conditions are met, the UPF performs dynamic caching. Based on the dynamic caching request, or dynamic caching information, or dynamic caching conditions, the UPF updates the data related to the domain name and the IP address corresponding to the domain name in the cache data of the UPF, and the data obtained after the update is the dynamic cache data, or the data different from the data before the update after the update is the dynamic cache data.
  • This update method is beneficial to keep the cache data of the UPF in good synchronization with the changes of the DNS service in the data network, so that the DNS cache data of the UPF has better timeliness.
  • Step 550 Generate a DNS response, where the DNS response includes the IP address corresponding to the domain name to be queried;
  • the UPF When the IP address corresponding to the domain name to be queried exists in the cache data of the UPF, the UPF generates a DNS response based on the queried IP address corresponding to the domain name to be queried.
  • UPF generates a DNS response based on the mapping relationship between the queried domain name and the IP address.
  • Step 570 Send a DNS response to the terminal device, where the DNS response includes the IP address corresponding to the domain name to be queried.
  • the DNS response is sent to the end device.
  • the UPF sends the DNS response carrying the IP address corresponding to the domain name to be queried to the terminal device.
  • the UPF sends the DNS response carrying the IP address corresponding to the domain name to be queried to the access network device, and the DNS response is sent to the terminal device through the access network device.
  • the computer device used to implement the UPF when there is an IP address corresponding to the domain name to be queried in the cache data of the UPF, the computer device used to implement the UPF completes the domain name query corresponding to the DNS query request based on the cache data of the UPF.
  • the network communication required in this way is much shorter. A shorter link can increase the speed of domain name query.
  • the DNS query request since the DNS query request does not need to reach the public network DNS server, the DNS query request that the DNS server needs to process can be reduced, thereby reducing the processing load of the public network DNS server.
  • FIG6 is a flow chart of a domain name query method provided by some exemplary embodiments of the present application. This embodiment is illustrated by the method being executed by a computer device for implementing the UPF shown in FIG3. The method includes at least some of the following steps:
  • Step 610 receiving a DNS query request from a terminal device, where the DNS query request includes a domain name to be queried;
  • the DNS query request comes from the terminal device.
  • the terminal device sends a DNS query request carrying the domain name to be queried to a DNS server, which is located in a data network.
  • the DNS query request passes through a network device, which 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.
  • the DNS query request includes at least one of the following:
  • the DNS query request is at least one of a UDP DNS query request, a TCP DNS query request, and an HTTP DNS query request.
  • Step 630 Query the IP address corresponding to the domain name to be queried in the cache data of the UPF;
  • the cache data of UPF includes data related to the domain name and the IP address corresponding to the domain name.
  • the cache data of the UPF includes DNS cache data, which refers to data related to the mapping relationship between the domain name and the IP address.
  • DNS cache data refers to data related to the mapping relationship between the domain name and the IP address.
  • the UPF searches the DNS cache data of the UPF for the IP address corresponding to the domain name to be queried.
  • the cache data of the UPF includes at least one of the following:
  • Hot update refers to an update method that updates in real time without restarting or shutting down the device.
  • Hot update cache data refers to data cached to UPF by hot update; timed cache data refers to data cached to UPF at a specified time, or data cached to UPF in a periodic manner, or data cached to UPF in a semi-periodic manner; default cache data refers to data cached to UPF in a pre-configured manner, or the initial cache data in UPF; static cache data refers to data cached to UPF by static caching; dynamic cache data refers to data cached to UPF by dynamic caching.
  • Step 650 Receive a DNS response, where the DNS response includes an IP address corresponding to the domain name to be queried;
  • a DNS query request can be sent to a DNS server, and accordingly, a DNS response is received from the DNS server, where the DNS server is located in a data network and the DNS response includes the IP address corresponding to the domain name to be queried, or the DNS response includes a mapping relationship between the domain name to be queried and the IP address.
  • the UPF receives a DNS response from the data network, where the DNS response includes an IP address corresponding to the domain name to be queried, or the DNS response includes a mapping relationship between the domain name to be queried and the IP address.
  • 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
  • the target address of the DNS response is the address of the terminal device.
  • Step 670 Send a DNS response to the terminal device, where the DNS response includes the IP address corresponding to the domain name to be queried;
  • the DNS response is sent to the end device.
  • the UPF sends the DNS response carrying the IP address corresponding to the domain name to be queried to the terminal device.
  • the UPF sends the DNS response carrying the IP address corresponding to the domain name to be queried to the access network device, and the DNS response is sent to the terminal device through the access network device.
  • Step 690 Save the IP address corresponding to the domain name to be queried.
  • UPF saves the IP address corresponding to the domain name to be queried in the received DNS response to the cache data of UPF or the DNS cache data of UPF.
  • UPF saves the mapping relationship between the domain name to be queried in the received DNS response and the IP address to the cache data of UPF or the DNS cache data of UPF.
  • the method provided by the present application sends the DNS query request to the DNS server when the IP address corresponding to the domain name to be queried does not exist in the cache data of the UPF, so as to execute the domain name query corresponding to the DNS query request through the DNS server, and then saves the IP address corresponding to the domain name to be queried through the DNS server into the cache data of the UPF, that is, saves the correspondence between the domain name to be queried and the IP address into the cache data of the UPF, thereby enriching the correspondence between the domain name and the IP address stored in the UPF cache data, making it convenient for the computer device used to implement the UPF to directly respond to more DNS query requests in the future, thereby improving the speed and efficiency of domain name queries, and reducing the processing load of the DNS server of the public network.
  • Fig. 7 is a schematic diagram of a domain name query method provided by some exemplary embodiments of the present application. Taking the domain name query method implemented in the communication system 200 shown in Fig. 2 as an example, a schematic description is given.
  • the terminal device 701 sends a DNS query request, which includes the domain name to be queried.
  • the target address of the DNS query request is the address of the DNS server 702, and the DNS server 702 is located in the data network. If the DNS query request wants to reach the DNS server 702, it needs to pass through the network equipment, which includes the access network 703 and the core network 704.
  • UPF 7042 (i.e., a computer device implementing UPF) receives the DNS query request and determines the IP address corresponding to the domain name to be queried based on the cache data of UPF 7042.
  • UPF 7042 is located in the core network 704.
  • UPF 7042 sends a DNS response to terminal device 701, which includes the IP address corresponding to the domain name to be queried. If the DNS response is to reach terminal device 701, it needs to pass through access network 703.
  • the DNS response is generated by UPF 7042 or by DNS server 702.
  • UPF 7042 If the DNS response is generated by UPF 7042, before UPF 7042 sends the DNS response to terminal device 701, UPF 7042 generates the DNS response based on the IP address corresponding to the domain name to be queried in the cache data of UPF 7042.
  • the DNS response generated by UPF 7042 is called the first DNS response.
  • the UPF 7042 sends the DNS query request to the DNS server 702 and receives the DNS response returned by the DNS server 702.
  • the UPF 7042 saves the mapping relationship between the domain name to be queried and the IP address in the DNS response into the cache data of the UPF 7042.
  • the DNS response generated by the DNS server 702 is referred to as the second DNS response.
  • the method provided in the present application supports sending the DNS query request to the DNS server when the IP address corresponding to the domain name to be queried does not exist in the cache data of the UPF, so as to execute the domain name query corresponding to the DNS query request through the DNS server, and then save the IP address corresponding to the domain name to be queried through the DNS server into the cache data of the UPF, that is, save the correspondence between the domain name to be queried and the IP address into the cache data of the UPF, thereby enriching the correspondence between the domain name and the IP address stored in the UPF cache data, making it convenient for the computer device used to implement the UPF to directly respond to more DNS query requests in the future, thereby improving the speed and efficiency of domain name queries, and reducing the processing load of the DNS server of the public network.
  • FIG8 is a flowchart of a domain name query method provided by some exemplary embodiments of the present application. This embodiment is illustrated by an example in which the method is executed by a computer device for implementing the UPF shown in FIG3. The method includes at least some of the following steps:
  • Step 8010 receiving an uplink data packet sent by a terminal device
  • UPF receives an uplink data packet from a terminal device, the destination address of which is the address of a DNS server.
  • the DNS server is located in a data network, and UPF is located in a core network, and the data network is connected to the core network.
  • the terminal device expects or needs to obtain the IP address corresponding to the domain name, and carries the DNS query request in the uplink data packet and sends it to the network device.
  • the DNS query request is used to request the IP address corresponding to the domain name.
  • the DNS query request can also be called a DNS resolution request.
  • the domain name for which the terminal device expects or needs to obtain the corresponding IP address is the domain name to be queried, or it can be understood that the domain name for which the terminal device expects or needs to query is the domain name to be queried.
  • the DNS query request includes at least one of the following:
  • the DNS query request is at least one of a UDP DNS query request, a TCP DNS query request and an HTTP DNS query request.
  • the terminal device sends an uplink data packet to the access network device, and the access network device forwards the uplink data packet to the UPF.
  • the access network device sends the uplink data packet to the core network, and after the functional entities within the core network interact, the uplink data packet is delivered to the UPF.
  • Step 8020 extracting the DNS query request from the uplink data packet
  • the DNS request module detects whether the uplink data packet includes a DNS query request according to at least one of a target address and a destination port of a message in the uplink data packet.
  • the destination address of the message in the uplink data packet is a DNS server in the data network, or When the destination port of the message is consistent with the port of the DNS resolution protocol, the UPF detects the DNS query request in the uplink data packet.
  • the DNS resolution protocol includes at least one of UDP, TCP, and HTTP.
  • the data network includes at least one of the Internet, a Wide Area Network (WAN), a Local Area Network (LAN), and a Private Network.
  • WAN Wide Area Network
  • LAN Local Area Network
  • Private Network a Private Network
  • 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 the public network, the DNS server in the data network is a domain name resolution server in the wide area network, the DNS server in the data network is a domain name resolution server in the local area network, and the DNS server in the data network is a domain name resolution server in the private network.
  • the IP address of the DNS server in the data network is configured, or preconfigured, or predefined, or predefined by the communication protocol.
  • Step 8030 Parse the domain name to be queried from the DNS query request
  • the UPF processes DNS query requests through a domain name query model.
  • the UPF inputs at least one of the information such as the domain name to be queried, the IP address of the terminal device, the time when the DNS query request is received, and the identification of the local area network to which the terminal device belongs into the domain name query model for processing, and obtains a recommended processing method for the DNS query request.
  • the UPF processes the DNS query request based on the recommended processing method.
  • the recommended processing method obtained by the domain name query model is that the UPF generates a DNS response, and at least subsequent steps 8040, 8050, and 8080 are executed.
  • the recommended processing method obtained by the domain name query model is that the DNS server generates a DNS response, and at least subsequent steps 8060, 8070, and 8080 are executed.
  • the busy time period refers to the time period when the UPF is in a busy state. This time period is predicted by the domain name query model based on historical DNS query requests. For example, the domain name query model predicts the time period when the UPF is in a busy state based on the processing time of historical DNS query requests. If the processing time of the historical DNS query request is greater than the first time threshold, it means that the UPF is in a busy state. If the processing time of the historical DNS query request is less than the first time threshold, it means that the UPF is in a non-busy state.
  • the idle time period refers to the time period when the UPF is in an idle state. This time period is predicted by the domain name query model based on historical DNS query requests. For example, the domain name query model predicts the time period when the UPF is in an idle state based on the processing time of historical DNS query requests. If the processing time of the historical DNS query request is less than the second time threshold, it means that the UPF is in an idle state. If the processing time of the historical DNS query request is greater than the second time threshold, it means that the UPF is in a non-idle state.
  • the first time threshold and the second time threshold may be the same or different.
  • the first time threshold is predefined, or preconfigured, or determined autonomously by the UPF, or indicated by the DNS server.
  • the second time threshold is predefined, or preconfigured, or determined autonomously by the UPF, or indicated by the DNS server.
  • the recommended processing method obtained by the domain name query model is that the DNS server generates a DNS response, and at least the subsequent steps 8060, 8070, and 8080 are executed.
  • the recommended processing method obtained by the domain name query model is that the UPF generates a DNS response, and at least the subsequent steps 8040, 8050, and 8061 are executed. 8080.
  • the first identifier is predicted by the domain name query model based on historical DNS query requests.
  • the domain name query model predicts the first identifier based on the processing method of historical DNS query requests (whether the DNS response corresponding to the terminal device in a certain local area network is generated by the UPF or the DNS server).
  • the local area network identifier to which the terminal device belongs belongs to the first identifier, which means that the probability of the IP address corresponding to the domain name to be queried from the terminal device in this local area network existing in the cache data of the UPF is lower than the first probability threshold, that is, the cache data of the UPF is highly likely to not include the IP address corresponding to the domain name to be queried of the terminal device in the local area network.
  • the second identifier is predicted by the domain name query model based on historical DNS query requests.
  • the domain name query model predicts the second identifier based on the processing method of historical DNS query requests (whether the DNS response corresponding to the terminal device in a certain local area network is generated by the UPF or the DNS server).
  • the local area network identifier to which the terminal device belongs belongs to the second identifier, which means that the probability that the IP address corresponding to the domain name to be queried from the terminal device in this local area network exists in the cache data of the UPF is higher than the second probability threshold, that is, the cache data of the UPF has a high probability of including the IP address corresponding to the domain name to be queried of the terminal device in the local area network.
  • the first probability threshold and the second probability threshold may be the same or different.
  • the first probability threshold is predefined, or preconfigured, or determined autonomously by the UPF, or indicated by the DNS server.
  • the second probability threshold is predefined, or preconfigured, or determined autonomously by the UPF, or indicated by the DNS server.
  • Step 8040 Query the IP address corresponding to the domain name to be queried in the cache data of the UPF;
  • the cache data of UPF comes from the DNS server, and the DNS server is located in the data network.
  • the cache data of UPF includes data related to the domain name and the IP address corresponding to the domain name.
  • the cache data of UPF includes DNS cache data, which refers to data related to the mapping relationship between domain names and IP addresses.
  • DNS cache data refers to data related to the mapping relationship between domain names and IP addresses.
  • Step 8050 Generate a first DNS response, where the first DNS response includes an IP address corresponding to the domain name to be queried;
  • the IP address corresponding to the domain name to be queried exists in the cache data of the UPF, or it can be understood that the mapping relationship between the domain name to be queried and the IP address exists in the cache data of the UPF.
  • the DNS cache data of UPF contains the IP address corresponding to the domain name to be queried, or it can be understood that the DNS cache data of UPF contains the mapping relationship between the domain name to be queried and the IP address.
  • the UPF generates a first DNS response based on the queried IP address corresponding to the domain name to be queried.
  • the UPF generates a first DNS response based on the queried mapping relationship between the domain name to be queried and the IP address.
  • Step 8060 Receive a second DNS response, where the second DNS response includes an IP address corresponding to the domain name to be queried;
  • the IP address corresponding to the domain name to be queried does not exist in the cache data of the UPF, or it can be understood that there is no mapping relationship between the domain name to be queried and the IP address in the cache data of the UPF.
  • the IP address corresponding to the domain name to be queried does not exist in the DNS cache data of the UPF, or it can be understood that there is no mapping relationship between the domain name to be queried and the IP address in the DNS cache data of the UPF.
  • the UPF receives a second DNS response from the data network, wherein 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.
  • Step 8070 Save the IP address corresponding to the domain name to be queried included in the second DNS response into the cache data of the UPF;
  • the UPF saves the mapping relationship between the domain name to be queried and the IP address included in the second DNS response into the cache data of the UPF.
  • Step 8080 Send DNS response.
  • the DNS response is a first DNS response, or a second DNS response.
  • the DNS response includes the IP address corresponding to the domain name to be queried, or the DNS response includes a mapping relationship between the domain name to be queried and the IP address.
  • the UPF sends a DNS response to the access network device, and the access network device forwards the DNS response to the terminal device.
  • the method provided by the present application parses the uplink data packet sent by the terminal device to the DNS server, obtains the DNS query request therefrom, and obtains the domain name to be queried in the DNS query request.
  • the domain name query corresponding to the DNS query request can be completed directly based on the cache data of the UPF, the IP address corresponding to the domain name to be queried can be obtained, and it can be fed back to the terminal device; compared with transmitting the DNS query request to the DNS server in the public network, the network communication link required in this way is shorter, the domain name query speed can be improved, and since the DNS query request does not need to reach the DNS server of the public network, the DNS query request that needs to be processed by the DNS server can be reduced, thereby reducing the processing load of the DNS server of the public network.
  • the computer device used to implement the UPF can send the DNS query request to the DNS server, receive the data packet fed back by the DNS server, extract the DNS response from the data packet, parse the IP address corresponding to the domain name to be queried from the DNS response, and then store the correspondence between the domain name to be queried and the IP address in the UPF's cache data; in this way, the domain name query is ensured to be implemented reliably, and at the same time, the correspondence between the domain name and the IP address stored in the UPF cache data is enriched, which makes it easier for the computer device used to implement the UPF to directly respond to more DNS query requests in the future, thereby improving the speed and efficiency of domain name queries and reducing the processing load of the DNS server of the public network.
  • the above step 8060 can be implemented as at least part of the following steps 8061, 8063, 8065, and 8067, as shown in Figure 9.
  • the computer device used to implement UPF is referred to as UPF.
  • Step 8061 UPF sends a DNS query request to the DNS server
  • the DNS query request includes the domain name to be queried from the terminal device.
  • the DNS server is located on the data network.
  • the data network includes at least one of the Internet, a WAN, a LAN, and a private network.
  • Step 8063 UPF receives the data packet from the DNS server
  • the DNS server sends a second DNS response to the UPF.
  • the DNS server sends the second DNS response to the core network, and after interaction with functional entities within the core network, the second DNS response is delivered to the UPF.
  • the DNS server carries the second DNS response in a data packet and sends it to the core network.
  • the DNS server sends a data packet to the core network, and after interaction with a functional entity within the core network, the data packet is delivered to the UPF.
  • the data packet includes a second DNS response.
  • the DNS server queries the IP address corresponding to the domain name to be queried, or queries the mapping relationship between the domain name to be queried and the IP address based on the domain name to be queried included in the received DNS query request.
  • the DNS server generates a second DNS response based on the queried IP address corresponding to the domain name to be queried, or based on the mapping relationship between the queried domain name to be queried and the IP address.
  • the second DNS response is generated by the DNS server.
  • the DNS server is a DNS server in a data network.
  • 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, and the DNS server in the data network is a domain name resolution server in a private network.
  • Step 8065 UPF extracts the second DNS response from the data packet.
  • the UPF inspects the data packet and detects the second DNS response in the data packet.
  • Step 8067 UPF resolves the IP address corresponding to the domain name to be queried from the second DNS response.
  • the UPF parses the second DNS response to obtain a mapping relationship between the domain name to be queried and the IP address.
  • part or all of the steps performed by the UPF described above are performed by the UPF basic module in the UPF.
  • the UPF basic module in the UPF is used to implement the basic functions of the UPF, or the UPF basic module in the UPF is used to implement the function of indirect processing of domain name queries, or the UPF basic module in the UPF is used to implement the function of processing domain name queries.
  • some or all of the steps performed by the UPF described above are performed by the DNS module in the UPF.
  • the UPF basic module in the UPF is used to implement non-basic functions of the UPF, or the UPF basic module in the UPF is used to implement functions related to processing domain name queries.
  • the DNS module in the UPF includes at least one of a DNS request module, a DNS cache module, and a DNS response module.
  • FIG10 is a flowchart of a domain name query method provided by some exemplary embodiments of the present application. This embodiment is illustrated by taking the method as being executed by the communication system 200 shown in FIG2 , and the computer device for implementing the UPF at least including a UPF basic module, a DNS request module, and a DNS cache module. The method includes at least some of the following steps:
  • Step 1001 The terminal device sends an uplink IP packet to the base station;
  • the domain name that the terminal device expects or needs to query is an Internet business domain name.
  • the terminal device When the terminal device starts to access Internet services, it carries the DNS query request in the uplink IP packet and sends it to the network device.
  • the source address of the uplink IP packet is the address of the terminal device, and the destination address is the address of the DNS server.
  • the server is located in the data network.
  • the DNS query request is used to request the IP address corresponding to the Internet service domain name.
  • the DNS query request can also be called a DNS resolution request.
  • the Internet service domain name is the domain name to be queried.
  • the DNS query request includes at least one of the following:
  • the DNS query request is at least one of a UDP DNS query request, a TCP DNS query request, and an HTTP DNS query request.
  • the uplink IP packet includes a DNS query request and an IP address of a terminal device, and the DNS query request includes a domain name to be queried.
  • Step 1002 The base station forwards the uplink IP packet to the UPF;
  • the base station as an access network device, forwards the uplink IP packet from the terminal device to the core network, and finally, the uplink IP packet reaches the UPF in the core network.
  • Step 1003 The UPF basic module receives the uplink IP packet and forwards the uplink IP packet to the DNS request module;
  • Step 1004 The DNS request module detects the uplink IP packet and parses the DNS query request;
  • a DNS request module (DNS Request Filter, DNS-Req Filter) is used to detect and resolve DNS query requests, and is responsible for detecting DNS query requests from an uplink IP message or an uplink IP packet, resolving the DNS query request, obtaining the domain name field in the DNS query request, and thereby obtaining the domain name to be queried in the DNS query request.
  • the DNS request module detects and resolves the DNS query request in the uplink IP packet, so that the DNS query request can be processed before reaching the DNS server, eliminating the resource consumption of the communication link from the DNS request module to the DNS server, saving the processing time of the DNS query request, and improving the processing efficiency of the DNS query request.
  • the DNS request module detects whether the uplink IP message or uplink IP packet includes a DNS query request based on at least one of a target address and a destination port of the uplink IP message.
  • the DNS request module detects a DNS query request in the uplink IP message or the uplink IP packet.
  • the DNS resolution protocol includes at least one of UDP, TCP, and HTTP.
  • the target address of the uplink IP message is a DNS server on the public network (IP address is 8.8.8.8 or 114.114.114.114), and the destination port of the UDP message carried by the DNS query request is 53, then it is determined that the uplink IP message or the uplink IP packet includes a DNS query request, that is, a DNS query request is detected in the uplink IP message or the uplink IP packet.
  • the IP address of the DNS server in the data network is configured, or preconfigured, or predefined, or predefined by the communication protocol.
  • the IP address of the DNS server in the data network is not just the IP address of a general public DNS server (such as 8.8.8.8 or 114.114.114.114).
  • Step 1005 The DNS request module sends the domain name to be queried to the DNS cache module;
  • Step 1006 The DNS cache module queries the IP address corresponding to the domain name
  • the DNS cache module (DNS Cache) is used to query and cache the mapping relationship between domain names and IP addresses, that is, the DNS cache module is used to query and cache the IP addresses corresponding to domain names.
  • the DNS cache module receives the domain name query request sent by the DNS request module, completes the query of the mapping relationship between the domain name and the IP address, or completes the query of the IP address corresponding to the domain name.
  • the domain name query request sent by the DNS request module can be considered as a domain name query request local to the UPF.
  • the query of the mapping relationship between the domain name and the IP address can also be considered as the retrieval of the mapping relationship between the domain name and the IP address.
  • the query of the IP address corresponding to the domain name can also be considered as the retrieval of the IP address corresponding to the domain name.
  • the DNS cache module queries or retrieves the mapping relationship between the domain name and the IP address in the DNS cache data of the UPF, or the DNS cache module queries or retrieves the IP address corresponding to the domain name in the DNS cache data of the UPF.
  • the cache data of UPF or the DNS cache data of UPF includes at least one of hot update cache data, timed cache data, default cache data, static cache data, and dynamic cache data, so that the cache data of UPF maintains good synchronization with changes in the DNS service in the data network, and the cache data of UPF has better timeliness.
  • step 1007 if there is an IP address corresponding to the domain name to be queried in the cache data of the UPF or the DNS cache data of the UPF, or there is a mapping relationship between the domain name to be queried and the IP address, step 1007 is executed.
  • Step 1007 The DNS cache module sends the IP address corresponding to the domain name to be queried to the DNS request module;
  • the DNS cache module sends the queried or retrieved mapping relationship between the domain name to be queried and the IP address, or the DNS cache module sends the queried or retrieved IP address corresponding to the domain name to be queried to the DNS request module. It can also be understood that the DNS cache module returns the queried or retrieved mapping relationship between the domain name to be queried and the IP address, or the DNS cache module returns the queried or retrieved IP address corresponding to the domain name to be queried to the DNS request module.
  • Step 1008 The DNS request module generates a first DNS response
  • the DNS request module generates a first DNS response based on the IP address corresponding to the domain name to be queried from the DNS cache module, or the DNS request module generates a first DNS response based on the mapping relationship between the domain name to be queried and the IP address from the DNS cache module.
  • the first DNS response includes the IP address corresponding to the domain name to be queried.
  • the DNS request module generates a DNS response, so that the DNS query request can be processed before reaching the DNS server, eliminating the resource consumption of the communication link from the DNS request module to the DNS server, eliminating the resource consumption of the DNS server processing the DNS query request, saving the processing time of the DNS query request, and improving the processing efficiency of the DNS query request.
  • Step 1009 The DNS request module sends the first DNS response to the UPF basic module
  • the DNS request module sends a data packet of the first DNS response to the UPF basic module.
  • Step 1010 The UPF basic module sends the first DNS response to the base station
  • the UPF basic module processes the first DNS response, such as encapsulating it, and sends the processed first DNS response to the terminal device.
  • the UPF basic module sends the first DNS response to an access network, such as a base station, through a tunnel, and the access network delivers the first DNS response to the terminal device.
  • an access network such as a base station
  • Step 1011 The base station sends a first DNS response to the terminal device.
  • the terminal device accesses Internet services based on the received first DNS response through the IP address corresponding to the domain name to be queried included in the first DNS response.
  • the above-mentioned UPF basic module, DNS request module, and DNS cache module implement corresponding functions through software or programs.
  • the above-mentioned UPF basic module, DNS request module, and DNS cache module are regarded as part or all of a UPF as a whole.
  • the method provided by the present application supports the implementation of domain name query by the UPF basic module, DNS request module and DNS cache module in the UPF.
  • the method provided by the present application supports the completion of the domain name query corresponding to the DNS query request based on the cache data of the UPF before the DNS query request is sent to the DNS server of the public network, so that the required network communication link is shorter, and the domain name query speed can be improved.
  • the DNS query request since the DNS query request does not need to reach the DNS server of the public network, the DNS query request that the DNS server needs to process can be reduced, thereby reducing the processing load of the DNS server of the public network.
  • the method provided by the embodiment of the present application does not need to add new equipment in the core network, and can be implemented using the existing computer equipment that implements UPF. Therefore, the implementation cost of the method provided by the present application is low; in addition, the use of the existing computer equipment that implements UPF for domain name query does not need to set additional complex diversion rules, and has high compatibility and low implementation difficulty.
  • FIG11 is a flowchart of a domain name query method provided by some exemplary embodiments of the present application. This embodiment is illustrated by taking the method as an example that the method is executed by a computer device for implementing the UPF shown in FIG3 , and the UPF at least includes a UPF basic module, a DNS request module, a DNS cache module, and a DNS response module. The method includes at least some of the following steps:
  • Step 1101 The terminal device sends an uplink IP packet to the base station;
  • the domain name that the terminal device expects or needs to query is an Internet business domain name.
  • the terminal device When the terminal device starts to access the Internet service, it carries the DNS query request in the uplink IP packet and sends it to the network device.
  • the source address of the uplink IP packet is the address of the terminal device, and the destination address is the address of the DNS server.
  • the DNS server is located in the data network.
  • the DNS query request is used to request the IP address corresponding to the Internet service domain name. Among them, the DNS query request can also be called a DNS resolution request.
  • the Internet service domain name is the domain name to be queried.
  • the DNS query request includes at least one of the following:
  • the DNS query request is at least one of a UDP DNS query request, a TCP DNS query request, and an HTTP DNS query request.
  • the uplink IP packet includes a DNS query request and the IP address of the terminal device.
  • the request includes the domain name to be queried.
  • Step 1102 The base station forwards the uplink IP packet to the UPF;
  • the base station as an access network device, forwards the uplink IP packet from the terminal device to the core network, and finally, the uplink IP packet reaches the UPF in the core network.
  • Step 1103 The UPF basic module receives the uplink IP packet and forwards the uplink IP packet to the DNS request module;
  • Step 1104 The DNS request module detects the uplink IP packet and parses the DNS query request;
  • the DNS request module is used to implement the detection and resolution of DNS query requests. It is responsible for detecting the DNS query request from the uplink IP message or uplink IP packet, and resolving the DNS query request to obtain the domain name field in the DNS query request, thereby obtaining the domain name to be queried in the DNS query request.
  • the DNS request module detects whether the uplink IP message or uplink IP packet includes a DNS query request based on at least one of a target address and a destination port of the uplink IP message.
  • the DNS request module detects a DNS query request in the uplink IP message or the uplink IP packet.
  • the DNS resolution protocol includes at least one of UDP, TCP, and HTTP.
  • the target address of the uplink IP message is a DNS server on the public network (IP address is 8.8.8.8 or 114.114.114.114), and the destination port of the UDP message carried by the DNS query request is 53, then it is determined that the uplink IP message or the uplink IP packet includes a DNS query request, that is, a DNS query request is detected in the uplink IP message or the uplink IP packet.
  • the IP address of the DNS server in the data network is configured, or preconfigured, or predefined, or predefined by the communication protocol.
  • the IP address of the DNS server in the data network is not just the IP address of a general public DNS server (such as 8.8.8.8 or 114.114.114.114).
  • Step 1105 The DNS request module sends the domain name to be queried to the DNS cache module;
  • Step 1106 The DNS cache module queries the IP address corresponding to the domain name
  • the DNS cache module is used to query and cache the mapping relationship between the domain name and the IP address, that is, the DNS cache module is used to query and cache the IP address corresponding to the domain name.
  • the DNS cache module receives a domain name query request sent by the DNS request module, queries the mapping relationship between the domain name and the IP address, or queries the IP address corresponding to the domain name.
  • the domain name query request sent by the DNS request module can be considered as a domain name query request local to the UPF.
  • the query of the mapping relationship between the domain name and the IP address can also be considered as the retrieval of the mapping relationship between the domain name and the IP address.
  • the query of the IP address corresponding to the domain name can also be considered as the retrieval of the IP address corresponding to the domain name.
  • the DNS cache module queries or retrieves the mapping relationship between the domain name and the IP address in the DNS cache data of the UPF, or the DNS cache module queries or retrieves the IP address corresponding to the domain name in the DNS cache data of the UPF.
  • the cache data of UPF or the DNS cache data of UPF includes at least one of hot update cache data, timed cache data, default cache data, static cache data, and dynamic cache data, so that the cache data of UPF maintains good synchronization with changes in the DNS service in the data network, and the update of the cache data of UPF is more timely.
  • the IP address corresponding to the domain name to be queried does not exist in the cache data of UPF or the DNS cache data of UPF, that is, UPF has not found the IP address corresponding to the domain name or the mapping relationship between the domain name and the IP address in the cache data of UPF or the DNS cache data of UPF, and step 1107 is executed.
  • Step 1107 The DNS cache module sends query failure feedback information to the DNS request module;
  • the DNS cache module if the DNS cache module does not query or retrieve the mapping relationship between the domain name to be queried and the IP address, or if the DNS cache module does not query or retrieve the IP address corresponding to the domain name to be queried, the DNS cache module does not return the domain name query result to the DNS request module, or the DNS cache module returns a query failure result to the DNS request module.
  • the query failure result includes a query failure of the mapping relationship between the domain name to be queried and the IP address, or a query failure of the IP address corresponding to the domain name to be queried.
  • the DNS cache module fails to query or retrieve the mapping relationship between the domain name to be queried and the IP address, or the DNS cache module fails to query or retrieve the IP address corresponding to the domain name to be queried, and sends query failure feedback information to the DNS request module.
  • the query failure feedback information is used to indicate that the DNS cache module query failed, including: the DNS cache module fails to query the mapping relationship between the domain name to be queried and the IP address, the DNS cache module fails to query the IP address corresponding to the domain name to be queried, the DNS cache module does not query the mapping relationship between the domain name to be queried and the IP address in the cache data of the UPF, the DNS cache module does not query the IP address corresponding to the domain name to be queried in the cache data of the UPF, or the DNS cache module does not query the mapping relationship between the domain name to be queried and the IP address in the DNS cache data, or the DNS cache module does not query the IP address corresponding to the domain name to be queried in the DNS cache data.
  • Step 1108 The DNS request module sends a DNS query request to the UPF basic module
  • the DNS request module receives information from the DNS cache module indicating a query failure result or a query failure feedback information, and the DNS request module sends a DNS query request to the UPF basic module.
  • the DNS request module does not receive the mapping relationship between the domain name to be queried and the IP address sent by the DNS cache module within the first time period, or the DNS request module does not receive the IP address corresponding to the domain name to be queried sent by the DNS cache module within the first time period, and the DNS request module sends a DNS query request to the UPF basic module.
  • the first duration is configured, or preconfigured, or predefined.
  • Step 1109 The UPF basic module sends a DNS query request to the data network
  • the UPF base module sends a DNS query request to a DNS server in the data network.
  • Step 1110 The UPF basic module receives the second DNS response
  • the second DNS response includes the IP address corresponding to the domain name to be queried, which comes from the data network.
  • 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.
  • the second DNS response is generated by a DNS server in the data network.
  • the data network carries the second DNS response in a downstream IP packet and sends it.
  • the source address of the downstream IP packet is the address of the DNS server, and the destination address is the address of the terminal device.
  • the data network sends a downlink IP packet including (or carrying) a second DNS response to the core network.
  • the downlink IP packet including (or carrying) the second DNS response reaches the UPF in the core network.
  • the data network includes at least one of the Internet, a WAN, a LAN, and a private network.
  • the data network queries the IP address corresponding to the domain name to be queried, or queries the mapping relationship between the domain name to be queried and the IP address based on the domain name to be queried included in the received DNS query request.
  • the data network generates a second DNS response based on the queried IP address corresponding to the domain name to be queried, or based on a mapping relationship between the queried domain name to be queried and the IP address.
  • 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, and the DNS server in the data network is a domain name resolution server in a private network.
  • Step 1111 The UPF basic module sends the second DNS response to the DNS response module
  • the UPF basic module sends a downstream IP packet including (or carrying) the second DNS response to the DNS response module, or the UPF basic module sends a downstream IP packet including (or carrying) the second DNS response to the DNS response module.
  • Step 1112 The DNS response module detects the second DNS response and parses the second DNS response
  • a DNS response module (DNS Response Filter, DNS-Resq Filter) is used to implement detection and resolution of DNS responses.
  • the DNS response module detects whether the downstream IP message or downstream IP packet includes a DNS response based on at least one of a source address and a source port of the downstream IP message.
  • the DNS response module detects a DNS response in the downstream IP message or the downstream IP packet.
  • the DNS resolution protocol includes at least one of UDP, TCP, and HTTP.
  • the source address of the downstream IP message is a DNS server on the public network (IP address is 8.8.8.8 or 114.114.114.114), and the source port of the UDP message carried by the DNS response is 53, then it is determined that the downstream IP message or downstream IP packet includes a DNS response, that is, the DNS response is detected in the downstream IP message or downstream IP packet.
  • the IP address of the DNS server in the data network is configured, or preconfigured, or predefined, or predefined by the communication protocol.
  • the IP address of the DNS server in the data network is not just the IP address of a general public DNS server (such as 8.8.8.8 or 114.114.114.114).
  • the DNS response module parses the second DNS response to obtain the domain name in the DNS response and the IP address corresponding to the domain name, or obtains the mapping relationship between the domain name in the DNS response and the IP address.
  • the domain name in the DNS response includes the Internet service domain name in step 1101.
  • Step 1113 The DNS response module sends the IP address corresponding to the domain name to the DNS cache module;
  • the DNS response module sends the resolved domain name and the IP address corresponding to the domain name, or the DNS response module sends the mapping relationship between the resolved domain name and the IP address to the DNS cache module.
  • Step 1114 The DNS cache module stores the IP address corresponding to the domain name
  • the DNS cache module stores the received domain name and the IP address corresponding to the domain name, or the DNS The cache module stores the mapping relationship between the received domain name and the IP address.
  • the DNS cache module saves 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, into the cache data of the UPF.
  • the DNS cache module saves 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, into the DNS cache data.
  • the DNS cache module saves the IP address corresponding to the domain name or the mapping relationship between the domain name and the IP address, which can be considered as saving the IP address corresponding to the domain name or the mapping relationship between the domain name and the IP address locally in the UPF.
  • the DNS cache module saves the mapping relationship between the domain name and the IP address in the second DNS response in the cache data of the UPF, and supports processing the DNS query request through the UPF request module when the DNS query request is received in the future, so that the DNS query request can be processed before reaching the DNS server, eliminating the resource consumption of the communication link from the DNS request module to the DNS server, eliminating the resource consumption of the DNS server processing the DNS query request, saving the processing time of the DNS query request, and improving the processing efficiency of the DNS query request.
  • Step 1115 The UPF basic module sends the second DNS response to the base station
  • the second DNS response includes the IP address corresponding to the domain name to be queried.
  • the UPF basic module processes the second DNS response, such as encapsulating it, and sends the processed second DNS response to the terminal device.
  • the UPF basic module sends the second DNS response to the access network, such as a base station, through a tunnel, and the access network delivers the second DNS response to the terminal device.
  • the access network such as a base station
  • Step 1116 The base station sends a second DNS response to the terminal device.
  • the terminal device accesses Internet services based on the received second DNS response through the IP address corresponding to the domain name to be queried included in the second DNS response.
  • the above-mentioned UPF basic module, DNS request module, and DNS cache module implement corresponding functions through software or programs.
  • the above-mentioned UPF basic module, DNS request module, DNS cache module, and DNS response module are regarded as part or all of a UPF as a whole.
  • the method provided by the present application supports the UPF basic module, DNS request module, DNS cache module and DNS response module in the UPF to perform domain name query and return the queried IP address to the terminal device.
  • the method provided by the present application supports the completion of the domain name query corresponding to the DNS query request based on the cache data of the UPF before the DNS query request is sent to the DNS server of the public network, so that the required network communication link is shorter, and the domain name query speed can be improved.
  • the DNS query request since the DNS query request does not need to reach the DNS server of the public network, the DNS query request that the DNS server needs to process can be reduced, thereby reducing the processing load of the DNS server of the public network.
  • the method provided by the embodiment of the present application does not need to add new equipment in the core network, and can be implemented using the existing computer equipment that implements UPF. Therefore, the implementation cost of the method provided by the present application is low; in addition, the use of the existing computer equipment that implements UPF for domain name query does not need to set additional complex diversion rules, and has high compatibility and low implementation difficulty.
  • the method provided in the present application supports the computer device used to implement UPF to save the IP address corresponding to the domain name from the data network to the cache data of UPF, which is beneficial to the subsequent processing of DNS query requests by UPF, and further Improved the efficiency and speed of domain name query.
  • FIG12 is a flow chart of a domain name query method provided by some exemplary embodiments of the present application. This embodiment is illustrated by taking the method executed by the terminal device shown in FIG3 as an example. The method includes at least some of the following steps:
  • Step 122 Send a DNS query request
  • a terminal device sends a DNS query request carrying a domain name to be queried to a network device, which is an access network device and/or a core network device.
  • the DNS query request includes at least one of the following:
  • the DNS query request is at least one of a UDP DNS query request, a TCP DNS query request, and an HTTP DNS query request.
  • Step 124 Receive a DNS response
  • the terminal device receives a DNS response from a network device, where the DNS response carries an IP address corresponding to the domain name to be queried.
  • the terminal device receives a DNS response from the access network, and the access network receives a DNS response from the core network, where the DNS response carries an IP address corresponding to the domain name to be queried.
  • the DNS response comes from the core network UPF.
  • the DNS response is generated by the core network UPF, or the DNS response is generated by a DNS server in the data network.
  • the terminal device parses the DNS response from the network device and obtains the IP address corresponding to the domain name to be queried in the DNS response.
  • Step 126 Access the IP address.
  • the terminal device accesses the IP address or the Internet service corresponding to the IP address based on the received IP address corresponding to the domain name to be queried.
  • the method provided in the embodiment of the present application supports the terminal device to obtain the DNS response from the UPF.
  • the method provided in the present application supports the domain name query corresponding to the DNS query request based on the cache data of the UPF before the DNS query request is sent to the DNS server of the public network.
  • the required network communication link is shorter, which can improve the domain name query speed.
  • the DNS query request since the DNS query request does not need to reach the DNS server of the public network, the DNS query request that the DNS server needs to process can be reduced, thereby reducing the processing load of the DNS server of the public network.
  • the method provided in the embodiment of the present application does not need to add new equipment in the core network, and can be implemented using the existing computer equipment that implements the UPF. Therefore, the implementation cost of the method provided in the present application is low; in addition, the use of the existing computer equipment that implements the UPF for domain name query does not need to set additional complex diversion rules, and has high compatibility and low implementation difficulty.
  • Fig. 13 shows a schematic diagram of the structure of a domain name query device provided by some exemplary embodiments of the present application.
  • the device includes: at least part of a receiving module 132, a processing module 134, and a sending module 136.
  • the receiving module 132 is used to receive a DNS query request from a terminal device, wherein the DNS query request includes a domain name to be queried.
  • the processing module 134 is used to determine the IP address corresponding to the domain name to be queried based on the cache data of the device.
  • the sending module 136 is used to send a DNS response to the terminal device, where the DNS response includes the IP address corresponding to the domain name to be queried.
  • the processing module 134 is further configured to generate the DNS response according to the IP address corresponding to the domain name to be queried when the IP address corresponding to the domain name to be queried exists in the cache data of the device.
  • the device further includes a sending module 136, and the sending module 136 is used to send the DNS query request to the DNS server when the IP address corresponding to the domain name to be queried does not exist in the cache data of the device.
  • the receiving module 132 is further configured to receive a DNS response from the DNS server;
  • the DNS server is located in the data network, the UPF is located in the core network, and the data network is connected to the core network.
  • the processing module 134 is further configured to save the IP address corresponding to the domain name to be queried included in the DNS response into cache data of the device.
  • the receiving module 132 is further used to receive a data packet from the DNS server, wherein the destination address of the data packet is the address of the terminal device.
  • the processing module 134 is further configured to extract the DNS response from the data packet.
  • the processing module 134 is further configured to resolve the IP address corresponding to the domain name to be queried in the DNS response.
  • the receiving module 132 is further used to receive an uplink data packet sent by the terminal device, and the destination address of the uplink data packet is the address of the DNS server.
  • the processing module 134 is further configured to extract the DNS query request from the uplink data packet.
  • the processing module 134 is further used to parse the domain name to be queried from the DNS query request;
  • the DNS server is located in the data network, the UPF is located in the core network, and the data network is connected to the core network.
  • the cache data of the UPF comes from a DNS server, which is located in a data network.
  • the cache data of the UPF includes at least one of the following:
  • the DNS query request includes at least one of the following:
  • the device provided by the present application supports completing the domain name query corresponding to the DNS query request based on the cached data of the UPF before the DNS query request is sent to the DNS server of the public network, so that the required network communication link is shorter, and the domain name query speed can be improved.
  • the DNS query request since the DNS query request does not need to reach the DNS server of the public network, the DNS query request that the DNS server needs to process can be reduced, thereby reducing the processing load of the DNS server of the public network.
  • the device provided by the embodiment of the present application does not need to add new equipment in the core network, and can be implemented using the existing computer equipment that implements the UPF. Therefore, the implementation cost of the method provided by the present application is low; in addition, the use of the existing computer equipment that implements the UPF for domain name query does not need to set additional complex diversion rules, and has high compatibility and low implementation difficulty.
  • the device provided in the above embodiment is only illustrated by the division of the above functional modules in domain name query.
  • the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
  • the specific implementation process is detailed in the method embodiment, which will not be repeated here.
  • FIG14 shows a block diagram of a communication device 1400 provided in 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 .
  • the processor 1401 includes one or more processing cores, and the processor 1401 executes various functional applications and information processing by running software programs and modules. In some embodiments, the processor 1401 can be used to implement the functions and steps of the processing module 134 described above.
  • Receiver 1402 and transmitter 1403 can be implemented as a communication component, which can be a communication chip.
  • receiver 1402 can be used to implement the functions and steps of receiving module 132 as described above.
  • transmitter 1403 can be used to implement the functions and steps of sending module 136 as described above.
  • the memory 1404 is connected to the processor 1401 via a bus 1405.
  • the memory 1404 may be used to store at least one instruction, and the processor 1401 may be used to execute the at least one instruction to implement each step in the above method embodiment.
  • memory 1404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof.
  • Volatile or non-volatile storage devices include but are not limited to: magnetic disks or optical disks, Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Static Random-Access Memory (SRAM), Read-Only Memory (ROM), magnetic storage, flash memory, and Programmable Read-Only Memory (PROM).
  • the receiver 1402 receives signals/data independently, or the processor 1401 controls the receiver 1402 receives signals/data, or the processor 1401 requests the receiver 1402 to receive signals/data, or the processor 1401 cooperates with the receiver 1402 to receive signals/data.
  • the transmitter 1403 independently sends signals/data, or the processor 1401 controls the transmitter 1403 to send signals/data, or the processor 1401 requests the transmitter 1403 to send signals/data, or the processor 1401 cooperates with the transmitter 1403 to send signals/data.
  • a computer-readable storage medium is further provided, wherein at least one program is stored in the computer-readable storage medium, and the at least one program is loaded and executed by a processor, and the computer-readable storage medium implements the domain name query method provided by the above-mentioned various method embodiments.
  • a chip is further provided.
  • the chip includes a programmable logic circuit and/or program instructions. When the chip runs on a communication device, it is used to implement the domain name query method provided by the above-mentioned various method embodiments.
  • a computer program product is further provided.
  • the computer program product is executed on a processor of a computer device, the computer device executes the above-mentioned domain name query method.
  • a computer program is further provided.
  • the computer program includes computer instructions.
  • a processor of a computer device executes the computer instructions, so that the computer device executes the above-mentioned domain name query method.
  • Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another.
  • the storage medium can be any available medium that a general or special-purpose computer can access.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种域名查询方法、装置、设备及存储介质,涉及移动通信领域。该方法包括:接收终端设备的域名系统DNS查询请求,所述DNS查询请求中包括待查询域名;在UPF的缓存数据中查询所述待查询域名对应的互联网协议IP地址;向所述终端设备发送DNS响应,所述DNS响应中包括所述待查询域名对应的IP地址。本申请提出的方法不仅实现了域名查询的加速,还具备简单、高效、成本低、易兼容的特点。

Description

域名查询方法、装置、设备及存储介质
本申请要求于2022年11月23日提交中国专利局、申请号为2022114782954、申请名称为“域名查询方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及移动通信领域,特别涉及域名查询技术。
背景技术
域名解析是一种支持域名与互联网协议(Internet Protocol,IP)地址互相转换的互联网服务。相关技术中的域名解析,通常是将终端设备发出的域名查询请求,通过各个网络设备送达至公网的域名解析服务器,由公网的域名解析服务器查询域名与IP地址之间的映射关系,并返回查询结果。
然而,公网的域名解析服务器与终端设备之间的网络通信链路过长,并且,公网的域名解析服务器通常需要并发处理大量的域名查询请求,处理负荷过重。因此,导致相关技术中的域名查询速度通常较慢,而这对终端设备进行后续的互联网业务访问会产生负面影响。
可见,如何加快域名查询的速度是目前需要解决的问题。
发明内容
本申请提供了一种域名查询方法、装置、设备及存储介质,支持加快域名查询的速度。所述技术方案如下:
根据本申请的一个方面,提供了一种域名查询方法,所述方法由计算机设备执行,所述方法包括:
接收终端设备的DNS查询请求,所述DNS查询请求中包括待查询域名;
基于用户面功能UPF的缓存数据确定所述待查询域名对应的IP地址;
向所述终端设备发送DNS响应,所述DNS响应中包括所述待查询域名对应的IP地址。
根据本申请的一个方面,提供了一种域名查询装置,所述装置包括:
接收模块,用于接收终端设备的DNS查询请求,所述DNS查询请求中包括待查询域名;
处理模块,用于基于所述装置的缓存数据确定所述待查询域名对应的互联网协议IP地址;
发送模块,用于向所述终端设备发送DNS响应,所述DNS响应中包括所述待查询域名对应的IP地址。
根据本申请的另一方面,提供了一种计算机设备,所述计算机设备包括:处理器和存储器,所述存储器存储有计算机程序,所述计算机程序由所述处理器加载并执行,所述计 算机设备实现如上所述的域名查询方法。
根据本申请的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序由处理器加载并执行,所述计算机可读存储介质实现如上所述的域名查询方法。
根据本申请的另一方面,提供了一种计算机程序产品,所述计算机程序产品存储有计算机程序,所述计算机程序由处理器加载并执行,所述计算机程序产品实现如上所述的域名查询方法。
根据本申请的另一方面,提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,安装有所述芯片的计算机设备用于实现如上所述的域名查询方法。
本申请实施例提供的技术方案带来的有益效果至少包括:
由用于实现用户面功能UPF的计算机设备执行域名查询,与相关技术中将DNS查询请求通过较长的网络通信链路送至公网的DNS服务器的方式相比,本申请提供的方法支持在将DNS查询请求送达公网的DNS服务器之前,由用于实现UPF的计算机设备基于UPF的缓存数据完成DNS查询请求对应的域名查询,这样所需的网络通信链路较短,可以提高域名查询速度。并且,由于DNS查询请求无需到达公网的DNS服务器,因此可以减少DNS服务器所需处理的DNS查询请求,从而减轻了公网的DNS服务器的处理负荷。并且,本申请实施例提供的方法无需在核心网中新增设备,利用已有的实现UPF的计算机设备即可实现,因此,本申请提供的方法的实现成本较低;此外,利用已有的实现UPF的计算机设备进行域名查询,可以不必额外设置复杂的分流规则,具有较高的兼容性和较低的实现难度。
附图说明
图1示出了相关技术中域名查询过程的示意图;
图2示出了相关技术中域名查询过程的示意图;
图3示出了本申请一些示例性实施例提供的通信系统的结构框图;
图4示出了本申请一些示例性实施例提供的通信系统的结构示意图;
图5示出了本申请一些示例性实施例提供的域名查询方法的流程示意图;
图6示出了本申请一些示例性实施例提供的域名查询方法的流程示意图;
图7示出了本申请一些示例性实施例提供的域名查询方法的流程示意图;
图8示出了本申请一些示例性实施例提供的域名查询方法的示意图;
图9示出了本申请一些示例性实施例提供的域名查询方法的示意图;
图10示出了本申请一些示例性实施例提供的域名查询方法的示意图;
图11示出了本申请一些示例性实施例提供的域名查询方法的示意图;
图12示出了本申请一些示例性实施例提供的域名查询方法的流程示意图;
图13示出了本申请一些示例性实施例提供的域名查询装置的结构框图;
图14示出了本申请一些示例性实施例提供的通信设备的结构示意图。
具体实施方式
首先,对本申请实施例中涉及的相关技术进行简单介绍:
域名系统(Domain Name System,DNS):
DNS用于实现域名和互联网协议(Internet Protocol,IP)地址之间的相互映射。域名和IP地址都可用于标记网络上的计算设备,域名相当于IP地址的别名。域名由可变长度的字母、数字、字符构成(比如www.xxxx.com),而IP地址由具有严格层次的4段数字构成(比如202.96.133.134)。
域名解析:
对于用户来说,IP地址比域名具有更大的记忆难度,相比于在输入栏直接输入IP地址,在输入栏输入域名来进行网络通讯是更常见、更普遍、更简易的操作方式。
然而,由于网络通讯所使用的网络通讯协议是基于IP地址实现的,进行网络通讯时计算机识别的是IP地址而不是域名,因此当用户在输入栏输入的是域名时,就需要一种支持域名与IP地址互相转换的服务,以便计算机进行网络通讯,这一服务被称为域名解析,提供这一服务的服务器被称为域名解析服务器或DNS服务器。
相关技术中的DNS域名解析,通常是由终端设备将查询域名的请求发送至公网(或称广域网)的域名解析服务器,由公网的域名解析服务器来查询域名与IP地址之间的映射关系,并返回查询结果,这一过程也可以认为是域名查询的过程。公网的域名解析服务器也可以认为是公共域名解析服务器,IP地址通常为8.8.8.8或114.114.114.114。具体来说,相关技术中通用的DNS域名解析过程如图1所示,由终端设备101向基站102发送DNS请求,该DNS请求中包括终端设备101请求查询的域名,该DNS请求经过核心网用户面设备(User Plane Function,UPF)103进入互联网104,再经过互联网104上的各个路由器和交换机送达至公网的DNS服务器105,公网的DNS服务器105接收到DNS请求后,查找终端设备101所请求查询的域名对应的IP地址,再基于查询到的IP地址构造对应的DNS响应并发送,该DNS响应经过若干个路由器和交换机到达核心网UPF103,核心网UPF 103最终通过基站102将该DNS响应返回给终端设备101,终端设备101可以基于接收到的DNS响应进行后续的互联网业务访问。
然而,公网的DNS服务器105与终端设备101之间的物理距离通常较远,两者之间的网络通信链路较长,并且,公网的DNS服务器通常需要并发处理大量的DNS请求,域名解析的处理负荷重。因此,上述方法将导致域名解析的处理时间过长,也即域名查询的时间过长,严重情况下甚至导致域名解析失败,进而影响终端设备进行业务访问的时间、效率,甚至可能导致终端设备无法访问互联网业务。
为了解决上述问题,本申请提出了一种域名查询方法,通过实现UPF的计算机设备来实现域名查询的加速,且具备成本低、效率高和易兼容的优点。下面通过示意性的实施例对这一域名查询方法及其对应的装置、设备与存储介质等进行说明。
图2示出了本申请一些示例性实施例提供的通信系统200的架构示意图。如图2所示,该通信系统200可以包括以下至少之一:终端设备201、接入网203、核心网(Core Network,CN)205和数据网络(Data Network,DN)207。其中,终端设备201、接入网203、核心 网205在逻辑上可以分为用户面和控制面两部分,控制面负责移动网络的管理,用户面负责业务数据的传输。
其中,终端设备201是移动用户与网络交互的入口,能够提供基本的计算能力、存储能力,向用户显示业务窗口,接收用户操作输入。终端设备201采用某种空口技术与接入网203建立信号连接、数据连接,从而传输控制信号和业务数据到移动网络。终端设备201可以部署在陆地上、水面上和空中等,包括但不限于:手持设备、可穿戴设备、车载设备和物联网设备等,例如手机、平板电脑、电子书阅读器、膝上便携计算机、台式计算机、电视机、游戏机、移动互联网设备(Mobile Internet Device,MID)、增强现实(Augmented Reality,AR)终端、虚拟现实(Virtual Reality,VR)终端和混合现实(Mixed Reality,MR)终端、可穿戴设备、手柄、电子标签、控制器、工业控制(Industrial Control)中的无线终端、自动驾驶(Self Driving)中的无线终端、远程医疗(Remote Medical)中的无线终端、智能电网(Smart Grid)中的无线终端、运输安全(Transportation Safety)中的无线终端、智慧城市(Smart City)中的无线终端、智慧家庭(Smart Home)中的无线终端、远程手术(Remote Medical Surgery)中的无线终端、蜂窝电话、无绳电话、会话启动协议(Session Initiation Protocol,SIP)电话、无线本地环路(Wireless Local Loop,WLL)站、个人数字助理(Personal Digital Assistant,PDA)、电视机顶盒(Set Top Box,STB)、用户驻地设备(Customer Premise Equipment,CPE)等。
接入网203用于实现接入有关的功能,可以为小区覆盖范围的授权用户提供入网功能,并根据用户的级别、业务的需求等使用不同质量的传输隧道传输用户数据。接入网203能够管理自身的资源,合理利用,按需为终端设备201提供接入服务,在终端设备201和核心网205之间转发控制信号和用户数据。接入网203可以包括接入网络设备,接入网络设备可以是为终端设备201提供接入服务的设备,可以包括无线接入网(Radio Access Network,RAN)设备和AN设备。RAN设备主要是3GPP网络中的无线网络设备,AN设备可以是非3GPP定义的接入网络设备。在采用不同的无线接入技术的系统中,具备基站功能的设备的名称可能会有所不同,例如,在第五代移动通信(5th Generation Mobile Communication Technology,5G)系统中,称为RAN或者下一代基站(NextGeneration Node Basestation,gNB);在长期演进(Long Term Evolution,LTE)系统中,称为演进的节点B(Evolved NodeB,eNB或eNodeB)。
核心网205负责维护移动网络的签约数据,管理移动网络的网元,为终端设备201提供会话管理、移动性管理、策略管理、安全认证等功能。比如,在终端设备201附着的时候,为终端设备201提供入网认证;在终端设备201有业务请求时,为终端设备201分配网络资源;在终端设备201移动的时候,为终端设备201更新网络资源;在终端设备201空闲的时候,为终端设备201提供快恢复机制;在终端设备201去附着的时候,为终端设备201释放网络资源;在终端设备201有业务数据时,为终端设备201提供数据路由功能,如转发上行数据到数据网络207;或者,从数据网络207接收发送给终端设备201的下行数据,转发到接入网203,从而将该下行数据发送给终端设备201。核心网205部署在专网(PrivateNetwork)中,或者部署在公网(Public Network)中。
数据网络207用于为用户提供业务服务。数据网络207可以是私有网络,如局域网;也可以是不受运营商管控的外部网络,如互联网;还可以是运营商共同部署的专有网络,如IP多媒体网络子系统(IP Multimedia Core Network Subsystem,IMS)。终端设备201可通过建立的协议数据单元(Protocol Data Unit,PDU)会话,来访问数据网络207。
在一些实施例中,接入网203、核心网205和数据网络207中的至少一者可以认为是网络设备。
示例性的,通信系统200中存在两种通信场景:上行通信场景与下行通信场景。其中,上行通信是指在终端设备201、接入网203、核心网205、数据网络207这一方向上发送信号;下行通信是指在数据网络207、核心网205、接入网203、终端设备201这一方向上发送信号。
应当理解,在本申请的一些实施例中,“5G”也可以称为“5G新空口(NewRadio,NR)”或“NR”,终端设备也可以称为用户设备(User Equipment,UE)、或接入终端、或用户单元、或用户站、或移动站、或移动台、或远方站、或远程终端、或移动设备、或用户终端、或终端、或无线通信设备、或用户代理、或用户装置。
本申请的一些实施例中描述的技术方案可以适用于5G系统、LTE系统,也可以适用于5G系统、LTE系统的演进系统,还可以适用于超5代移动通信系统(Beyond Fifth Generation,B5G)、6G系统以及后续的演进系统。其中,5G系统可以包括非独立组网(Non-Standalone,NSA)和独立组网(Standalone,SA)中的至少一种。
图3是在图2基础上确定的详细架构,其中核心网用户面包括:UPF;核心网控制面包括认证服务器功能(Authentication Server Function,AUSF)、接入和移动管理(Access and Mobility Management Function,AMF)、会话管理(Session Management Function,SMF)、网络切片选择功能(Network SliceSelection Function,NSSF)、网络开放功能(Network Exposure Function,NEF)、网络仓储功能(Network Repository Function,NRF)、统一数据管理(Unified Data Management,UDM)、策略控制功能(Policy Control Function,PCF)、应用功能(Application Function,AF)。这些功能实体的功能如下:
AMF,主要负责移动网络中的移动性管理,例如用户位置更新、用户注册网络、用户切换等。SMF,主要负责移动网络中的会话管理,例如会话建立、修改、释放。PCF,主要支持提供统一的策略框架来控制网络行为,提供策略规则给控制层网络功能,同时负责获取与策略决策相关的用户签约信息。AUSF,用于执行终端的安全认证。NEF,主要用于支持能力和事件的开放。NRF,用于为其它网元提供网络功能实体信息的存储功能和选择功能。UDM,用于存储用户数据,例如签约数据、鉴权或授权数据等。AF与核心网交互用于提供应用层服务,例如提供关于应用层数据路由,提供接入网络能力开放功能,与策略框架进行交互以提供策略控制,与IMS交互等。
在本申请实施例中,UPF,除了负责用户数据的转发和接收,还具备域名查询的相关功能。也就是说,UPF不仅可以从数据网络接收用户数据,并通过接入网传输给终端设备,也可以通过接入网从终端设备接收用户数据,并转发至数据网络,而且还可以实现域名缓 存、域名查询等与域名解析相关的功能。
在图3所示架构中,N1接口为UE与AMF之间的参考点;N2接口为RAN和AMF之间的参考点,用于非接入层(Non-Access Stratum,NAS)消息的发送等;N3接口为RAN和UPF之间的参考点,用于传输用户面的数据等;N4接口为SMF和UPF之间的参考点,用于传输例如N3连接的隧道标识信息、数据缓存指示信息、以及下行数据通知消息等信息;N6接口为UPF和DN之间的参考点,用于传输用户面的数据等。NG接口是RAN和CN之间的接口。
需要说明的是,图2和图3中的各个网元之间的接口名称只是一个示例,具体实现中接口的名称可能为其它名称,本申请实施例对此不作具体限定。图2和图3中包括的各个网元(比如SMF、AF、UPF等)的名称也仅是一个示例,对网元本身的功能不构成限定。在相关技术中的网络以及未来的其它网络中,上述各个网元也可以是其它名称,本申请实施例对此不作具体限定。例如,在6G网络中,上述各个网元中的部分或全部可以沿用5G中的术语,也可能采用其他名称,等等,在此进行统一说明,以下不再赘述。此外,应理解,上述各个网元之间的所传输的消息(或信令)的名称也仅仅是一个示例,对消息本身的功能不构成任何限定。
需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请中涉及到的信息都是在充分授权的情况下获取的,终端设备和服务器仅在程序运行期间缓存该信息,并不会固化存储和二次利用该信息的相关数据。
图4示出了本申请一些示例性实施例提供的域名查询方法的流程示意图。本实施例以该方法由用于实现图3所示的UPF的计算机设备执行来举例说明。该方法包括如下步骤中的至少部分步骤:
步骤410:接收终端设备的DNS查询请求,DNS查询请求中包括待查询域名;
DNS查询请求来自终端设备。
由终端设备将携带有待查询域名的DNS查询请求向DNS服务器发送,该DNS服务器位于数据网络。DNS查询请求需要经过网络设备,该网络设备是接入网设备和核心网设备中的至少一个。
步骤430:基于UPF的缓存数据确定待查询域名对应的IP地址;
UPF的缓存数据中包括全部或部分域名,以及与域名对应的IP地址相关的数据。
示例性的,UPF的缓存数据中包括DNS缓存数据,DNS缓存数据包括域名和IP地址之间的映射关系。由UPF在DNS缓存数据中查询待查询域名对应的IP地址。
步骤450:向终端设备发送DNS响应,该DNS响应中包括待查询域名对应的IP地址。
DNS响应是发送给终端设备的,针对DNS查询请求的响应。
由UPF将携带有待查询域名对应的IP地址的DNS响应,向终端设备发送。示例性的, 由UPF将携带有待查询域名对应的IP地址的DNS响应,向接入网设备发送,通过接入网设备将DNS响应发送至终端设备。
综上所述,本申请提供的方法由用于实现UPF的计算机设备执行域名查询,与相关技术中将DNS查询请求通过较长的网络通信链路送至公网的DNS服务器的方式相比,本申请提供的方法支持在将DNS查询请求送达公网的DNS服务器之前,由用于实现UPF的计算机设备基于UPF的缓存数据完成DNS查询请求对应的域名查询,这样所需的网络通信链路较短,可以提高域名查询速度。并且,由于DNS查询请求无需到达公网的DNS服务器,因此可以减少DNS服务器所需处理的DNS查询请求,从而减轻了公网的DNS服务器的处理负荷。并且,本申请实施例提供的方法无需在核心网中新增设备,利用已有的实现UPF的计算机设备即可实现,因此,本申请提供的方法的实现成本较低;此外,利用已有的实现UPF的计算机设备进行域名查询,可以不必额外设置复杂的分流规则,具有较高的兼容性和较低的实现难度。
图5示出了本申请一些示例性实施例提供的域名查询方法的流程示意图。本实施例以该方法由用于实现图3所示的UPF的计算机设备执行来举例说明。该方法包括如下步骤中的至少部分步骤:
步骤510:接收终端设备的DNS查询请求,DNS查询请求中包括待查询域名;
DNS查询请求来自终端设备。
由终端设备将携带有待查询域名的DNS查询请求向DNS服务器发送,DNS服务器位于数据网络。该DNS查询请求经过网络设备,该网络设备是接入网设备和核心网设备中的至少一个。
在一些实施例中,DNS查询请求包括如下至少之一:
·基于用户数据报协议(User Datagram Protocol,UDP)的DNS查询请求;
·基于传输控制协议(Transmission Control Protocol,TCP)的DNS查询请求;
·基于超文本传输协议(Hyper Text Transfer Protocol,HTTP)的DNS查询请求。
也即,DNS查询请求是UDP DNS查询请求,TCP DNS查询请求,和HTTPDNS查询请求中的至少一种。即,本申请实施例提供的方法可以支持处理多种DNS查询请求,具有较丰富的应用场景,在各种应用场景中具有较高的兼容性。
步骤530:基于UPF的缓存数据确定待查询域名对应的IP地址;
UPF的缓存数据中包括与域名及域名对应的IP地址相关的数据。
在一些实施例中,UPF的缓存数据中包括DNS缓存数据,DNS缓存数据是指与域名和IP地址之间的映射关系相关的数据。由UPF在DNS缓存数据中查询待查询域名对应的IP地址。UPF的缓存数据或UPF的DNS缓存数据来自DNS服务器,该DNS服务器位于数据网络。
在一些实施例中,UPF的缓存数据包括如下至少之一:
·热更新缓存数据;
·定时缓存数据;
·默认缓存数据;
·静态缓存数据;
·动态缓存数据。
其中,热更新是指不需重启或关闭设备而实时更新的更新方式,热更新缓存数据是指通过热更新的方式缓存至UPF的数据;定时缓存数据是指在指定时间缓存至UPF的数据,或通过周期性的方式缓存至UPF的数据,或通过半周期性的方式缓存至UPF的数据;默认缓存数据是指通过预配置的方式地缓存至UPF的数据,或UPF中的初始缓存数据;静态缓存数据是指通过静态缓存的方式缓存至UPF的数据;动态缓存数据是指通过动态缓存的方式缓存至UPF的数据。
在一些实施例中,当UPF接收到来自DNS服务器的热更新缓存请求、或热更新缓存信息、或满足热更新缓存条件时,UPF在运行过程中执行热更新缓存。UPF基于热更新缓存请求或热更新缓存信息或热更新缓存条件,对UPF的缓存数据中与域名及域名对应的IP地址相关的数据进行实时更新,实时更新后得到的数据即热更新缓存数据,或者,实时更新后与实时更新前不同的数据即热更新缓存数据。
比如,UPF运行时间达到第一阈值时,清空UPF的缓存数据或UPF的DNS缓存数据,基于终端设备的DNS查询请求,接收DNS服务器的DNS响应,将DNS响应中与域名及域名对应的IP地址相关的数据缓存至UPF的缓存数据或UPF的DNS缓存数据中,实现热更新缓存。其中,第一阈值是预定义的,或预配置的,或UPF自主决定的,或DNS服务器指示的。这一更新方式无需关闭或重启UPF即能实现,更新过程对终端设备的影响较小,能在满足终端设备的域名查询需求的同时实现UPF的缓存数据的实时更新。并且,这一更新方式有益于使得UPF的缓存数据与数据网络中DNS服务的变更保持较好的同步性,使得UPF的DNS缓存数据具有较好的及时性。
在一些实施例中,当UPF接收到来自DNS服务器的定时缓存请求,或UPF接收到来自DNS服务器的定时缓存信息,或UPF接收到计时器信息,或UPF满足定时缓存条件时,UPF基于定时缓存请求、或定时缓存信息、或计时器信息、或定时缓存条件中的指定时间,执行定时缓存。UPF基于定时缓存请求或定时缓存信息或计时器信息或定时缓存条件,对UPF的缓存数据中与域名及域名对应的IP地址相关的数据进行更新,更新后得到的数据即定时缓存数据,或者,更新后与更新前不同的数据即定时缓存数据。其中,计时器是预定义的,或预配置的,或UPF自主决定的,或DNS服务器指示的。定时缓存条件是预定义的,或预配置的,或UPF自主决定的,或DNS服务器指示的。
比如,距离最近一次更新UPF的缓存数据的时间达到第二阈值时,向DNS服务器发送数据更新请求,接收DNS服务器的数据更新响应,将数据更新响应中与域名及域名对应的IP地址相关的数据缓存至UPF的缓存数据或UPF的DNS缓存数据中,实现定时缓存。其中,第二阈值是预定义的,或预配置的,或UPF自主决定的,或DNS服务器指示的。这一更新方式可以是DNS服务器触发的,实现方式更为灵活;也可以是UPF基于时间自主触发的,减少信令资源的浪费。并且,这一更新方式有益于使得UPF的缓存数据与数据网络中的DNS服务的变更保持较好的同步性,使得UPF的DNS缓存数据具有较 好的及时性。
在一些实施例中,UPF在启动阶段或初始化阶段或配置阶段或预配置阶段,接收初始缓存请求,或接收初始缓存信息,或接收配置缓存请求,或接收配置缓存信息,或接收预配置缓存请求,或接收预配置缓存信息,或满足默认缓存条件时,执行默认缓存。UPF基于初始缓存请求、或初始缓存信息、或配置缓存请求、或配置缓存信息、或预配置缓存请求、或预配置缓存信息、或默认缓存条件,对UPF的缓存数据中与域名及域名对应的IP地址相关的数据进行更新,更新后得到的数据即默认缓存数据,或者,更新后与更新前不同的数据即默认缓存数据。
比如,UPF在启动阶段,初始化UPF的缓存数据,向DNS服务器发送数据更新请求,接收DNS服务器的数据更新响应,将数据更新响应中与域名及域名对应的IP地址相关的数据缓存至UPF的缓存数据或UPF的DNS缓存数据中,实现默认缓存。这一更新方式使得UPF在刚开始提供域名查询服务时,便能满足部分终端设备的域名查询需求,提升了UPF处理域名查询请求的效率。
在一些实施例中,当需要静态缓存时,比如UPF接收到静态缓存请求,或静态缓存信息,或满足静态缓存条件时,UPF执行静态缓存。UPF基于静态缓存请求,或静态缓存信息,或静态缓存条件,对UPF的缓存数据中与域名及域名对应的IP地址相关的数据进行更新,更新后得到的数据即静态缓存数据,或者,更新后与更新前不同的数据即静态缓存数据。这一更新方式有益于使得UPF的缓存数据与数据网络中的DNS服务的变更保持较好的同步性,使得UPF的DNS缓存数据具有较好的及时性。
在一些实施例中,当需要动态缓存时,比如UPF接收到动态缓存请求,或动态缓存信息,或满足动态缓存条件时,UPF执行动态缓存。UPF基于动态缓存请求,或动态缓存信息,或动态缓存条件,对UPF的缓存数据中与域名及域名对应的IP地址相关的数据进行更新,更新后得到的数据即动态缓存数据,或者,更新后与更新前不同的数据即动态缓存数据。这一更新方式有益于使得UPF的缓存数据与数据网络中的DNS服务的变更保持较好的同步性,使得UPF的DNS缓存数据具有较好的及时性。
步骤550:生成DNS响应,该DNS响应中包括待查询域名对应的IP地址;
在UPF的缓存数据中存在待查询域名对应的IP地址的情况下,UPF基于查询到的待查询域名对应的IP地址,生成DNS响应。
UPF基于查询到的待查询域名与IP地址的映射关系,生成DNS响应。
步骤570:向终端设备发送DNS响应,该DNS响应中包括待查询域名对应的IP地址。
DNS响应是发送给终端设备的。
由UPF将携带有待查询域名对应的IP地址的DNS响应,向终端设备发送。示例性的,由UPF将携带有待查询域名对应的IP地址的DNS响应,向接入网设备发送,通过接入网设备将DNS响应发送至终端设备。
综上所述,本申请提供的方法在UPF的缓存数据中存在待查询域名对应的IP地址的情况下,由用于实现UPF的计算机设备基于UPF的缓存数据,完成DNS查询请求对应的域名查询,相比将DNS查询请求传输至公网中的DNS服务器而言,这样所需的网络通信 链路较短,可以提高域名查询速度。并且,由于DNS查询请求无需到达公网的DNS服务器,因此可以减少DNS服务器所需处理的DNS查询请求,从而减轻了公网的DNS服务器的处理负荷。
图6示出了本申请一些示例性实施例提供的域名查询方法的流程示意图。本实施例以该方法由用于实现图3所示的UPF的计算机设备执行来举例说明。该方法包括如下步骤中的至少部分步骤:
步骤610:接收终端设备的DNS查询请求,DNS查询请求中包括待查询域名;
DNS查询请求来自终端设备。
由终端设备将携带有待查询域名的DNS查询请求,向DNS服务器发送,DNS服务器位于数据网络。该DNS查询请求经过网络设备,该网络设备是接入网设备和核心网设备中的至少一个。该DNS查询请求的源地址是终端设备的地址,目标地址是DNS服务器的地址。
在一些实施例中,DNS查询请求包括如下至少之一:
·基于UDP的DNS查询请求;
·基于TCP的DNS查询请求;
·基于HTTP的DNS查询请求。
也就是说,在一些实施例中,DNS查询请求是UDP DNS查询请求,TCP DNS查询请求和HTTPDNS查询请求中的至少一种。
步骤630:在UPF的缓存数据中查询待查询域名对应的IP地址;
UPF的缓存数据中包括与域名及域名对应的IP地址相关的数据。
UPF的缓存数据中包括DNS缓存数据,DNS缓存数据是指与域名和IP地址之间的映射关系相关的数据。示例性的,由UPF在UPF的DNS缓存数据中查询待查询域名对应的IP地址。
在一些实施例中,UPF的缓存数据包括如下至少之一:
·热更新缓存数据;
·定时缓存数据;
·默认缓存数据;
·静态缓存数据;
·动态缓存数据。
其中,热更新是指不需重启或关闭设备而实时更新的更新方式,热更新缓存数据是指通过热更新的方式缓存至UPF的数据;定时缓存数据是指在指定时间缓存至UPF的数据,或通过周期性的方式缓存至UPF的数据,或通过半周期性的方式缓存至UPF的数据;默认缓存数据是指通过预配置的方式地缓存至UPF的数据,或UPF中的初始缓存数据;静态缓存数据是指通过静态缓存的方式缓存至UPF的数据;动态缓存数据是指通过动态缓存的方式缓存至UPF的数据。
步骤650:接收DNS响应,该DNS响应中包括待查询域名对应的IP地址;
若在UPF的缓存数据中未查询到待查询域名对应的IP地址,则可以将DNS查询请求发送给DNS服务器,相应地,接收来自DNS服务器的DNS响应,该DNS服务器位于数据网络,该DNS响应中包括待查询域名对应的IP地址,或者,该DNS响应中包括待查询域名与IP地址的映射关系。
UPF接收来自数据网络的DNS响应,该DNS响应中包括待查询域名对应的IP地址,或者,该DNS响应中包括待查询域名与IP地址的映射关系。
示例性的,该DNS响应由数据网络中的DNS服务器生成,该DNS响应的源地址是DNS服务器的地址,该DNS响应的目标地址是终端设备的地址。
步骤670:向终端设备发送DNS响应,该DNS响应中包括待查询域名对应的IP地址;
DNS响应是发送给终端设备的。
由UPF将携带有待查询域名对应的IP地址的DNS响应,向终端设备发送。示例性的,由UPF将携带有待查询域名对应的IP地址的DNS响应,向接入网设备发送,通过接入网设备将DNS响应发送至终端设备。
步骤690:保存待查询域名对应的IP地址。
UPF将接收到的DNS响应中的待查询域名对应的IP地址保存到UPF的缓存数据或UPF的DNS缓存数据中。UPF将接收到的DNS响应中的待查询域名与IP地址之间的映射关系保存到UPF的缓存数据或UPF的DNS缓存数据中。
综上所述,本申请提供的方法在UPF的缓存数据中不存在待查询域名对应的IP地址的情况下,向DNS服务器发送该DNS查询请求,以通过DNS服务器执行DNS查询请求对应的域名查询,进而,将通过DNS服务器查询到的与待查询域名对应的IP地址保存至UPF的缓存数据中,即将待查询域名与IP地址之间的对应关系保存至UPF的缓存数据中,如此丰富UPF缓存数据中保存的域名与IP地址之间的对应关系,便于用于实现UPF的计算机设备后续直接响应更多的DNS查询请求,提高域名查询速度和效率,减轻公网的DNS服务器的处理负荷。
图7示出了本申请一些示例性实施例提供的域名查询方法的示意图。以该域名查询方法在图2所示的通信系统200中实现为例,进行示意性说明。
终端设备701发送DNS查询请求,DNS查询请求中包括待查询域名。该DNS查询请求的目标地址是DNS服务器702的地址,DNS服务器702位于数据网络。DNS查询请求若要到达DNS服务器702,需要经过网络设备,网络设备包括接入网703和核心网704。
UPF 7042(即实现UPF的计算机设备)接收到DNS查询请求,基于UPF 7042的缓存数据确定待查询域名对应的IP地址。UPF 7042位于核心网704。
UPF 7042向终端设备701发送DNS响应,该DNS响应中包括待查询域名对应的IP地址。DNS响应若要到达终端设备701,需要经过接入网703。
该DNS响应是由UPF 7042生成的,或是由DNS服务器702生成的。
若DNS响应是由UPF 7042生成的,则UPF 7042向终端设备701发送DNS响应之前,UPF 7042基于UPF 7042的缓存数据中待查询域名对应的IP地址生成DNS响应。为区分, 将UPF 7042生成的DNS响应称为第一DNS响应。
若DNS响应是由DNS服务器702生成的,则UPF 7042接收到DNS查询请求后,将DNS查询请求向DNS服务器702发送,接收DNS服务器702返回的DNS响应。并且,UPF 7042将DNS响应中的待查询域名与IP地址的映射关系保存到UPF 7042的缓存数据中。为区分,将DNS服务器702生成的DNS响应称为第二DNS响应。
综上所述,本申请提供的方法支持在UPF的缓存数据中不存在待查询域名对应的IP地址的情况下,向DNS服务器发送该DNS查询请求,以通过DNS服务器执行DNS查询请求对应的域名查询,进而,将通过DNS服务器查询到的与待查询域名对应的IP地址保存至UPF的缓存数据中,即将待查询域名与IP地址之间的对应关系保存至UPF的缓存数据中,如此丰富UPF缓存数据中保存的域名与IP地址之间的对应关系,便于用于实现UPF的计算机设备后续直接响应更多的DNS查询请求,提高域名查询速度和效率,减轻公网的DNS服务器的处理负荷。
图8示出了本申请一些示例性实施例提供的域名查询方法的流程示意图。本实施例以该方法由用于实现图3所示的UPF的计算机设备执行来举例说明。该方法包括如下步骤中的至少部分步骤:
步骤8010:接收终端设备发送的上行数据包;
UPF接收来自终端设备的上行数据包,该上行数据包的目标地址是DNS服务器的地址。DNS服务器位于数据网络,UPF位于核心网,数据网络与核心网相连。
终端设备期望或需要获取域名对应的IP地址,将DNS查询请求携带在上行数据包中,向网络设备发送。DNS查询请求用于请求查询域名对应的IP地址。其中,DNS查询请求也可以称为DNS解析请求。
终端设备期望或需要获取对应的IP地址的域名即待查询域名,或者理解为,终端设备期望或需要查询的域名即待查询域名。
在一些实施例中,DNS查询请求包括如下至少之一:
·基于UDP的DNS查询请求;
·基于TCP的DNS查询请求;
·基于HTTP的DNS查询请求。
也即,DNS查询请求是UDP DNS查询请求,TCP DNS查询请求和HTTPDNS查询请求中的至少一个。
在一些实施例中,终端设备向接入网设备发送上行数据包,接入网设备将上行数据包转发给UPF。接入网设备将上行数据包发送给核心网,经核心网内部的功能实体交互后,上行数据包送达UPF。
步骤8020:在上行数据包中提取DNS查询请求;
DNS请求模块根据上行数据包中的报文的目标地址和目的地端口中的至少一种,检测该上行数据包中是否包括DNS查询请求。
在上行数据包中的报文的目标地址是数据网络中的DNS服务器,或,上行数据包中 的报文的目的地端口与DNS解析协议的端口一致的情况下,UPF在上行数据包中检测出DNS查询请求。其中,DNS解析协议包括UDP、TCP、HTTP中的至少之一。
数据网络包括互联网、广域网(Wide Area Network,WAN)、局域网(Local Area Network,LAN)、专网(Private Network)中的至少之一。
数据网络中的DNS服务器是公共域名解析服务器,或,数据网络中的DNS服务器是公网中的域名解析服务器,数据网络中的DNS服务器是广域网中的域名解析服务器,数据网络中的DNS服务器是局域网中的域名解析服务器,数据网络中的DNS服务器是专网中的域名解析服务器。
数据网络中的DNS服务器的IP地址是配置的,或预配置的,或预定义的,或通信协议预定义的。
步骤8030:从DNS查询请求解析出待查询域名;
在一些实施例中,UPF通过域名查询模型处理DNS查询请求。
UPF将待查询域名、终端设备的IP地址、接收到DNS查询请求的时间、终端设备所属的局域网标识等信息中的至少之一输入至域名查询模型进行处理,得到DNS查询请求的推荐处理方式。UPF基于推荐处理方式,处理DNS查询请求。
示例性的,当接收到DNS查询请求的时间属于繁忙时间段内时,通过域名查询模型得到的推荐处理方式是由UPF生成DNS响应,则至少执行后续的步骤8040、步骤8050和步骤8080。当接收到DNS查询请求的时间属于空闲时间段内时,通过域名查询模型得到的推荐处理方式是由DNS服务器生成DNS响应,则至少执行后续的步骤8060、步骤8070和步骤8080。
繁忙时间段是指UPF处于繁忙状态的时间段,这一时间段是域名查询模型基于历史DNS查询请求预测得到的。比如,域名查询模型基于历史DNS查询请求的处理时间,预测得到UPF处于繁忙状态的时间段。若历史DNS查询请求的处理时间大于第一时间阈值,则说明UPF处于繁忙状态,若历史DNS查询请求的处理时间小于第一时间阈值,则说明UPF处于非繁忙状态。
空闲时间段是指UPF处于空闲状态的时间段,这一时间段是域名查询模型基于历史DNS查询请求预测得到的。比如,域名查询模型基于历史DNS查询请求的处理时间,预测得到UPF处于空闲状态的时间段。若历史DNS查询请求的处理时间小于第二时间阈值,则说明UPF处于空闲状态,若历史DNS查询请求的处理时间大于第二时间阈值,则说明UPF处于非空闲状态。
其中,第一时间阈值与第二时间阈值可以相同或不同。第一时间阈值是预定义的,或预配置的,或UPF自主决定的,或DNS服务器指示的。第二时间阈值是预定义的,或预配置的,或UPF自主决定的,或DNS服务器指示的。
示例性的,当终端设备所属的局域网标识属于第一标识时,通过域名查询模型得到的推荐处理方式是由DNS服务器生成DNS响应,则至少执行后续的步骤8060、步骤8070和步骤8080。当终端设备所属的局域网标识属于第二标识时,通过域名查询模型得到的推荐处理方式是由UPF生成DNS响应,则至少执行后续的步骤8040、步骤8050和步骤 8080。
第一标识是域名查询模型基于历史DNS查询请求预测得到的,比如,域名查询模型基于历史DNS查询请求的处理方式(某一局域网内的终端设备对应的DNS响应是由UPF生成的,还是由DNS服务器生成的),预测得到第一标识。终端设备所属的局域网标识属于第一标识,意味着来自这一局域网内的终端设备的待查询域名对应的IP地址,在UPF的缓存数据中存在的概率低于第一概率阈值,即UPF的缓存数据中大概率不包括该局域网内的终端设备的待查询域名对应的IP地址。
第二标识是域名查询模型基于历史DNS查询请求预测得到的,比如,域名查询模型基于历史DNS查询请求的处理方式(某一局域网内的终端设备对应的DNS响应是由UPF生成的,还是由DNS服务器生成的),预测得到第二标识。终端设备所属的局域网标识属于第二标识,意味着来自这一局域网内的终端设备的待查询域名对应的IP地址,在UPF的缓存数据中存在的概率高于第二概率阈值,即UPF的缓存数据中大概率包括该局域网内的终端设备的待查询域名对应的IP地址。
其中,第一概率阈值与第二概率阈值可以相同或不同。第一概率阈值是预定义的,或预配置的,或UPF自主决定的,或DNS服务器指示的。第二概率阈值是预定义的,或预配置的,或UPF自主决定的,或DNS服务器指示的。
步骤8040:在UPF的缓存数据中查询所述待查询域名对应的IP地址;
其中,UPF的缓存数据来自DNS服务器,DNS服务器位于数据网络。
UPF的缓存数据中包括与域名及域名对应的IP地址相关的数据。
UPF的缓存数据中包括DNS缓存数据,DNS缓存数据是指与域名和IP地址之间的映射关系相关的数据。示例性的,由UPF在UPF的DNS缓存数据中查询待查询域名对应的IP地址,也可以理解为,由UPF在UPF的DNS缓存数据中查询待查询域名与IP地址的映射关系。
步骤8050:生成第一DNS响应,第一DNS响应中包括待查询域名对应的IP地址;
UPF的缓存数据中存在待查询域名对应的IP地址,或理解为,UPF的缓存数据中存在待查询域名与IP地址之间的映射关系。
UPF的DNS缓存数据中存在待查询域名对应的IP地址,或理解为,UPF的DNS缓存数据中存在待查询域名与IP地址之间的映射关系。
UPF基于查询到的待查询域名对应的IP地址,生成第一DNS响应。UPF基于查询到的待查询域名与IP地址的映射关系,生成第一DNS响应。
步骤8060:接收第二DNS响应,第二DNS响应中包括待查询域名对应的IP地址;
在一些实施例中,UPF的缓存数据中不存在待查询域名对应的IP地址,或理解为,UPF的缓存数据中不存在待查询域名与IP地址之间的映射关系。
在一些实施例中,UPF的DNS缓存数据中不存在待查询域名对应的IP地址,或理解为,UPF的DNS缓存数据中不存在待查询域名与IP地址的之间映射关系。
在一些实施例中,UPF接收来自数据网络的第二DNS响应。该第二DNS响应的源地址是DNS服务器的地址,目标地址是终端设备的地址。
步骤8070:将第二DNS响应中包括的待查询域名对应的IP地址保存至UPF的缓存数据中;
在一些实施例中,UPF将第二DNS响应中包括的待查询域名与IP地址的映射关系保存至UPF的缓存数据中。
步骤8080:发送DNS响应。
该DNS响应是第一DNS响应,或,第二DNS响应。
在一些实施例中,DNS响应中包括待查询域名对应的IP地址,或者,DNS响应中包括待查询域名与IP地址之间的映射关系。
在一些实施例中,UPF向接入网设备发送DNS响应,接入网设备将DNS响应转发给终端设备。
综上所述,本申请提供的方法解析终端设备向DNS服务器发送的上行数据包,从中获得DNS查询请求,并获得DNS查询请求中的待查询域名。在UPF的缓存数据中存在该待查询域名对应的IP地址的情况下,可以直接基于UPF的缓存数据,完成该DNS查询请求对应的域名查询,获得该待查询域名对应的IP地址,并将其反馈给终端设备;相比将DNS查询请求传输至公网中的DNS服务器而言,这样所需的网络通信链路较短,可以提高域名查询速度,并且,由于DNS查询请求无需到达公网的DNS服务器,因此可以减少DNS服务器所需处理的DNS查询请求,从而减轻了公网的DNS服务器的处理负荷。在UPF的缓存数据中不存在该待查询域名对应的IP地址的情况下,用于实现UPF的计算机设备可以将该DNS查询请求发送给DNS服务器,并接收DNS服务器相应反馈的数据包,并从该数据包中提取DNS响应,从该DNS响应中解析出待查询域名对应的IP地址,进而将该待查询域名与IP地址之间的对应关系存储至UPF的缓存数据中;如此,保证域名查询可靠实现,同时丰富UPF缓存数据中保存的域名与IP地址之间的对应关系,便于用于实现UPF的计算机设备后续直接响应更多的DNS查询请求,提高域名查询速度和效率,减轻公网的DNS服务器的处理负荷。
在一些实施例中,上述步骤8060可以实现为以下步骤8061、步骤8063、步骤8065、步骤8067中的至少部分步骤,如图9所示。本申请实施例中将用于实现UPF的计算机设备简称为UPF。
步骤8061:UPF向DNS服务器发送DNS查询请求;
该DNS查询请求中包括来自终端设备的待查询域名。
在一些实施例中,DNS服务器位于数据网络。
在一些实施例中,数据网络包括互联网、WAN、LAN、专网中的至少之一。
步骤8063:UPF接收来自DNS服务器的数据包;
在一些实施例中,DNS服务器将第二DNS响应发送给UPF。
在一些实施例中,DNS服务器将第二DNS响应发送给核心网,经核心网内部的功能实体交互后,第二DNS响应送达UPF。
在一些实施例中,DNS服务器将第二DNS响应携带在数据包中向核心网发送。
在一些实施例中,DNS服务器将数据包发送给核心网,经核心网内部的功能实体交互后,数据包送达UPF。数据包中包括第二DNS响应。
在一些实施例中,DNS服务器基于接收到的DNS查询请求中包括的待查询域名,查询待查询域名对应的IP地址,或查询待查询域名与IP地址之间的映射关系。
在一些实施例中,DNS服务器基于查询到的待查询域名对应的IP地址,或基于查询到的待查询域名与IP地址之间的映射关系,生成第二DNS响应。
在一些实施例中,由DNS服务器生成第二DNS响应。
在一些实施例中,DNS服务器即数据网络中的DNS服务器。
在一些实施例中,数据网络中的DNS服务器是公共域名解析服务器,或,数据网络中的DNS服务器是公网中的域名解析服务器,数据网络中的DNS服务器是广域网中的域名解析服务器,数据网络中的DNS服务器是局域网中的域名解析服务器,数据网络中的DNS服务器是专网中的域名解析服务器。
步骤8065:UPF在数据包中提取第二DNS响应;
UPF检测数据包,在数据包中检测第二DNS响应。
步骤8067:UPF从第二DNS响应中,解析出待查询域名对应的IP地址。
在一些实施例中,UPF解析第二DNS响应,获取待查询域名与IP地址之间的映射关系。
在一些实施例中,前文所述由UPF执行的步骤中的部分或全部步骤,是由UPF中的UPF基础模块执行的。
在一些实施例,UPF中的UPF基础模块用于实现UPF的基础功能,或者,UPF中的UPF基础模块用于实现非直接处理域名查询的功能,或者,UPF中的UPF基础模块用于实现处理域名查询的功能。
在一些实施例中,前文所述由UPF执行的步骤中的部分或全部步骤,是由UPF中的DNS模块执行的。
在一些实施例,UPF中的UPF基础模块用于实现UPF的非基础功能,或者,UPF中的UPF基础模块用于实现处理域名查询相关的功能。
在一些实施例,UPF中的DNS模块包括DNS请求模块、DNS缓存模块、DNS响应模块中的至少之一。
图10示出了本申请一些示例性实施例提供的域名查询方法的流程示意图。本实施例以该方法由图2所示的通信系统200执行,且用于实现UPF的计算机设备至少包括UPF基础模块、DNS请求模块、DNS缓存模块来举例说明。该方法包括如下步骤中的至少部分步骤:
步骤1001:终端设备向基站发送上行IP包;
以终端设备期望或需要查询的域名是互联网业务域名为例。
终端设备开始访问互联网业务,将DNS查询请求携带在上行IP包中,向网络设备发送,该上行IP包的源地址是终端设备的地址,目标地址是DNS服务器的地址,DNS服务 器位于数据网络。DNS查询请求用于请求查询互联网业务域名对应的IP地址。其中,DNS查询请求也可以称为DNS解析请求。该互联网业务域名即待查询域名。
在一些实施例中,DNS查询请求包括如下至少之一:
·基于UDP的DNS查询请求;
·基于TCP的DNS查询请求;
·基于HTTP的DNS查询请求。
也就是说,在一些实施例中,DNS查询请求是UDP DNS查询请求,TCP DNS查询请求和HTTPDNS查询请求中的至少一种。
在一些实施例中,上行IP包中包括DNS查询请求和终端设备的IP地址,DNS查询请求中包括待查询域名。
步骤1002:基站将上行IP包转发给UPF;
也就是说,基站作为接入网设备,将来自终端设备的上行IP包转发给核心网,最终,上行IP包到达核心网中的UPF。
步骤1003:UPF基础模块接收到上行IP包,将上行IP包转发给DNS请求模块;
步骤1004:DNS请求模块检测上行IP包,并解析DNS查询请求;
在一些实施例中,DNS请求模块(DNS RequestFilter,DNS-Req Filter),用于实现DNS查询请求的检测和解析,负责从上行IP报文或上行IP包中检测出DNS查询请求,并对该DNS查询请求解析,获取DNS查询请求中的域名字段,从而获取DNS查询请求中的待查询域名。由DNS请求模块在上行IP包中检测并解析DNS查询请求,使得DNS查询请求在到达DNS服务器之前就能被处理,省去了从DNS请求模块到DNS服务器这一段通信链路的资源消耗,节省了DNS查询请求的处理时间,提升了DNS查询请求的处理效率。
在一些实施例中,DNS请求模块根据上行IP报文的目标地址和目的地端口中的至少一种,检测该上行IP报文或上行IP包中是否包括DNS查询请求。
在一些实施例中,在上行IP报文的目标地址是数据网络中的DNS服务器,或,上行IP报文的目的地端口与DNS解析协议的端口一致的情况下,DNS请求模块在上行IP报文或上行IP包中检测出DNS查询请求。其中,DNS解析协议包括UDP、TCP、HTTP中的至少之一。
示例性的,上行IP报文的目标地址为公网的DNS服务器(IP地址为8.8.8.8或114.114.114.114),并且DNS查询请求所承载的UDP报文的目的地端口为53,则确定该上行IP报文或上行IP包中包括DNS查询请求,也即在该上行IP报文或上行IP包中检测出DNS查询请求。
在一些实施例中,数据网络中的DNS服务器的IP地址是配置的,或预配置的,或预定义的,或通信协议预定义的。
在一些实施例中,数据网络中的DNS服务器的IP地址不仅仅是通用的公网的DNS服务器的IP地址(比如8.8.8.8或114.114.114.114)。
步骤1005:DNS请求模块将待查询域名发送给DNS缓存模块;
步骤1006:DNS缓存模块查询域名对应的IP地址;
在一些实施例中,DNS缓存模块(DNS Cache)用于实现域名与IP地址之间的映射关系的查询和缓存,也即,DNS缓存模块用于实现查询和缓存域名对应的IP地址。
在一些实施例中,DNS缓存模块接收DNS请求模块发送的域名查询请求,完成域名与IP地址的映射关系的查询,或完成域名对应的IP地址的查询。
在一些实施例中,DNS请求模块发送的域名查询请求可以认为是UPF本地的域名查询请求。
在一些实施例中,对域名与IP地址的映射关系的查询,也可以认为是,对域名与IP地址的映射关系的检索。对域名对应的IP地址的查询,也可以认为是,对域名对应的IP地址的检索。
在一些实施例中,DNS缓存模块在UPF的DNS缓存数据中查询或检索域名与IP地址之间的映射关系,或者,DNS缓存模块在UPF的DNS缓存数据中查询或检索域名对应的IP地址。
在一些实施例中,UPF的缓存数据或UPF的DNS缓存数据包括热更新缓存数据、定时缓存数据、默认缓存数据、静态缓存数据、动态缓存数据中的至少之一,使得UPF的缓存数据与数据网络中的DNS服务的变更保持较好的同步性,使得UPF的缓存数据具有较好的及时性。
在一些实施例中,UPF的缓存数据或UPF的DNS缓存数据中,存在待查询域名对应的IP地址,或存在待查询域名与IP地址之间的映射关系,执行步骤1007。
步骤1007:DNS缓存模块向DNS请求模块发送待查询域名对应的IP地址;
在一些实施例中,DNS缓存模块将查询或检索到的待查询域名与IP地址之间的映射关系,或者,DNS缓存模块将查询或检索到的待查询域名对应的IP地址,发送给DNS请求模块。也可以理解为,DNS缓存模块将查询或检索到的待查询域名与IP地址之间的映射关系,或者,DNS缓存模块将查询或检索到的待查询域名对应的IP地址,返回给DNS请求模块。
步骤1008:DNS请求模块生成第一DNS响应;
DNS请求模块基于来自DNS缓存模块的待查询域名对应的IP地址,或者,DNS请求模块基于来自DNS缓存模块的待查询域名与IP地址之间的映射关系,生成第一DNS响应。第一DNS响应中包括待查询域名对应的IP地址。由DNS请求模块生成DNS响应,使得DNS查询请求在到达DNS服务器之前就能被处理,省去了从DNS请求模块到DNS服务器这一段通信链路的资源消耗,省去了DNS服务器处理DNS查询请求的资源消耗,节省了DNS查询请求的处理时间,提升了DNS查询请求的处理效率。
步骤1009:DNS请求模块将第一DNS响应发送给UPF基础模块;
在一些实施例中,DNS请求模块将第一DNS响应的数据报文发送给UPF基础模块。
步骤1010:UPF基础模块将第一DNS响应发送给基站;
在一些实施例中,UPF基础模块对第一DNS响应进行处理,比如封装,将处理后的第一DNS响应向终端设备发送。
在一些实施例中,UPF基础模块通过隧道将第一DNS响应发送给接入网,比如基站,由接入网将第一DNS响应送达终端设备。
步骤1011:基站将第一DNS响应发送给终端设备。
在一些实施例中,终端设备基于接收到的第一DNS响应,通过第一DNS响应中包括的待查询域名对应的IP地址,访问互联网业务。
在一些实施例中,上述UPF基础模块、DNS请求模块、DNS缓存模块通过软件或程序实现对应的功能。
在一些实施例中,上述UPF基础模块、DNS请求模块、DNS缓存模块视为一个UPF整体中的部分或全部。
综上所述,本申请提供的方法支持由UPF中的UPF基础模块、DNS请求模块和DNS缓存模块来实现域名查询,与相关技术中将DNS查询请求通过较长的网络通信链路送至公网的DNS服务器的方式相比,本申请提供的方法支持在将DNS查询请求送达公网的DNS服务器之前,基于UPF的缓存数据完成DNS查询请求对应的域名查询,这样所需的网络通信链路较短,可以提高域名查询速度。并且,由于DNS查询请求无需到达公网的DNS服务器,因此可以减少DNS服务器所需处理的DNS查询请求,从而减轻了公网的DNS服务器的处理负荷。并且,本申请实施例提供的方法无需在核心网中新增设备,利用已有的实现UPF的计算机设备即可实现,因此,本申请提供的方法的实现成本较低;此外,利用已有的实现UPF的计算机设备进行域名查询,可以不必额外设置复杂的分流规则,具有较高的兼容性和较低的实现难度。
图11示出了本申请一些示例性实施例提供的域名查询方法的流程示意图。本实施例以该方法由用于实现图3所示的UPF的计算机设备执行,且UPF至少包括UPF基础模块、DNS请求模块、DNS缓存模块、DNS响应模块来举例说明。该方法包括如下步骤中的至少部分步骤:
步骤1101:终端设备向基站发送上行IP包;
以终端设备期望或需要查询的域名是互联网业务域名为例。
终端设备开始访问互联网业务,将DNS查询请求携带在上行IP包中,向网络设备发送,该上行IP包的源地址是终端设备的地址,目标地址是DNS服务器的地址,DNS服务器位于数据网络。DNS查询请求用于请求查询互联网业务域名对应的IP地址。其中,DNS查询请求也可以称为DNS解析请求。该互联网业务域名即待查询域名。
在一些实施例中,DNS查询请求包括如下至少之一:
·基于UDP的DNS查询请求;
·基于TCP的DNS查询请求;
·基于HTTP的DNS查询请求。
也就是说,在一些实施例中,DNS查询请求是UDP DNS查询请求,TCP DNS查询请求和HTTPDNS查询请求中的至少一种。
在一些实施例中,上行IP包中包括DNS查询请求和终端设备的IP地址,DNS查询 请求中包括待查询域名。
步骤1102:基站将上行IP包转发给UPF;
也就是说,基站作为接入网设备,将来自终端设备的上行IP包转发给核心网,最终,上行IP包到达核心网中的UPF。
步骤1103:UPF基础模块接收到上行IP包,将上行IP包转发给DNS请求模块;
步骤1104:DNS请求模块检测上行IP包,并解析DNS查询请求;
在一些实施例中,DNS请求模块,用于实现DNS查询请求的检测和解析,负责从上行IP报文或上行IP包中检测出DNS查询请求,并对该DNS查询请求解析,获取DNS查询请求中的域名字段,从而获取DNS查询请求中的待查询域名。
在一些实施例中,DNS请求模块根据上行IP报文的目标地址和目的地端口中的至少一种,检测该上行IP报文或上行IP包中是否包括DNS查询请求。
在一些实施例中,在上行IP报文的目标地址是数据网络中的DNS服务器,或,上行IP报文的目的地端口与DNS解析协议的端口一致的情况下,DNS请求模块在上行IP报文或上行IP包中检测出DNS查询请求。其中,DNS解析协议包括UDP、TCP、HTTP中的至少之一。
示例性的,上行IP报文的目标地址为公网的DNS服务器(IP地址为8.8.8.8或114.114.114.114),并且DNS查询请求所承载的UDP报文的目的地端口为53,则确定该上行IP报文或上行IP包中包括DNS查询请求,也即在该上行IP报文或上行IP包中检测出DNS查询请求。
在一些实施例中,数据网络中的DNS服务器的IP地址是配置的,或预配置的,或预定义的,或通信协议预定义的。
在一些实施例中,数据网络中的DNS服务器的IP地址不仅仅是通用的公网的DNS服务器的IP地址(比如8.8.8.8或114.114.114.114)。
步骤1105:DNS请求模块将待查询域名发送给DNS缓存模块;
步骤1106:DNS缓存模块查询域名对应的IP地址;
在一些实施例中,DNS缓存模块用于实现域名与IP地址之间的映射关系的查询和缓存,也即,DNS缓存模块用于实现查询和缓存域名对应的IP地址。
在一些实施例中,DNS缓存模块接收DNS请求模块发送的域名查询请求,查询域名与IP地址之间的映射关系,或查询域名对应的IP地址。
在一些实施例中,DNS请求模块发送的域名查询请求可以认为是UPF本地的域名查询请求。
在一些实施例中,对域名与IP地址的映射关系的查询,也可以认为是,对域名与IP地址之间的映射关系的检索。对域名对应的IP地址的查询,也可以认为是,对域名对应的IP地址的检索。
在一些实施例中,DNS缓存模块在UPF的DNS缓存数据中查询或检索域名与IP地址之间的映射关系,或者,DNS缓存模块在UPF的DNS缓存数据中查询或检索域名对应的IP地址。
在一些实施例中,UPF的缓存数据或UPF的DNS缓存数据包括热更新缓存数据、定时缓存数据、默认缓存数据、静态缓存数据、动态缓存数据中的至少之一,使得UPF的缓存数据与数据网络中的DNS服务的变更保持较好的同步性,使得UPF的缓存数据的更新具有较好的及时性。
在一些实施例中,UPF的缓存数据或UPF的DNS缓存数据中,不存在待查询域名对应的IP地址,也就是说,UPF在UPF的缓存数据或UPF的DNS缓存数据中未查询到域名对应的IP地址或域名与之间IP地址的映射关系,执行步骤1107。
步骤1107:DNS缓存模块向DNS请求模块发送查询失败反馈信息;
在一些实施例中,DNS缓存模块未查询或检索到待查询域名与IP地址之间的映射关系,或者,DNS缓存模块未查询或检索到待查询域名对应的IP地址,则DNS缓存模块不向DNS请求模块返回域名查询结果,或DNS缓存模块向DNS请求模块返回查询失败结果。查询失败结果包括待查询域名与IP地址的映射关系查询失败,或待查询域名对应的IP地址查询失败。
在一些实施例中,DNS缓存模块未查询或检索到的待查询域名与IP地址的映射关系,或者,DNS缓存模块未查询或检索到的待查询域名对应的IP地址,向DNS请求模块发送查询失败反馈信息。查询失败反馈信息用于指示DNS缓存模块查询失败,包括:DNS缓存模块查询待查询域名与IP地址之间的映射关系失败,DNS缓存模块查询待查询域名对应的IP地址失败,DNS缓存模块未在UPF的缓存数据中查询到待查询域名与IP地址之间的映射关系,DNS缓存模块未在UPF的缓存数据中查询到待查询域名对应的IP地址,或DNS缓存模块未在DNS缓存数据中查询到待查询域名与IP地址之间的映射关系,或DNS缓存模块未在DNS缓存数据中查询到待查询域名对应的IP地址。
步骤1108:DNS请求模块向UPF基础模块发送DNS查询请求;
在一些实施例中,DNS请求模块接收到来自DNS缓存模块用于指示查询失败结果或查询失败反馈信息,DNS请求模块向UPF基础模块发送DNS查询请求。
在一些实施例中,DNS请求模块在第一时长内未接收到DNS缓存模块发送的待查询域名与IP地址的映射关系,或者,DNS请求模块在第一时长内未接收到DNS缓存模块发送的待查询域名对应的IP地址,DNS请求模块向UPF基础模块发送DNS查询请求。
在一些实施例中,第一时长是配置的,或预配置的,或预定义的。
步骤1109:UPF基础模块向数据网络发送DNS查询请求;
在一些实施例中,UPF基础模块向数据网络中的DNS服务器发送DNS查询请求。
步骤1110:UPF基础模块接收第二DNS响应;
第二DNS响应中包括待查询域名对应的IP地址,来自数据网络。第二DNS响应的源地址是DNS服务器的地址,目标地址是终端设备的地址。
在一些实施例中,由数据网络中的DNS服务器生成第二DNS响应。
在一些实施例中,数据网络将第二DNS响应携带在下行IP包中发送。下行IP包的源地址是DNS服务器的地址,目标地址是终端设备的地址。
在一些实施例中,数据网络向核心网发送包括(或携带)第二DNS响应的下行IP包, 包括(或携带)第二DNS响应的下行IP包达到核心网中的UPF。
在一些实施例中,数据网络包括互联网、WAN、LAN、专网中的至少之一。
在一些实施例中,数据网络基于接收到的DNS查询请求中包括的待查询域名,查询待查询域名对应的IP地址,或查询待查询域名与IP地址之间的映射关系。
在一些实施例中,数据网络基于查询到的待查询域名对应的IP地址,或基于查询到的待查询域名与IP地址之间的映射关系,生成第二DNS响应。
在一些实施例中,数据网络中的DNS服务器是公共域名解析服务器,或,数据网络中的DNS服务器是公网中的域名解析服务器,数据网络中的DNS服务器是广域网中的域名解析服务器,数据网络中的DNS服务器是局域网中的域名解析服务器,数据网络中的DNS服务器是专网中的域名解析服务器。
步骤1111:UPF基础模块将第二DNS响应发送给DNS响应模块;
在一些实施例中,UPF基础模块将包括(或携带)第二DNS响应的下行IP包发送给DNS响应模块,或者,UPF基础模块将包括(或携带)第二DNS响应的下行IP报文发送给DNS响应模块。
步骤1112:DNS响应模块检测第二DNS响应,并解析第二DNS响应;
在一些实施例中,DNS响应模块(DNS Response Filter,DNS-Resq Filter),用于实现DNS响应的检测和解析。
在一些实施例中,DNS响应模块根据下行IP报文的源地址和源端口中的至少一种,检测该下行IP报文或下行IP包中是否包括DNS响应。
在一些实施例中,在下行IP报文的源地址是数据网络中的DNS服务器,或,下行IP报文的源端口与DNS解析协议的端口一致的情况下,DNS响应模块在下行IP报文或下行IP包中检测出DNS响应。其中,DNS解析协议包括UDP、TCP、HTTP中的至少之一。
示例性的,下行IP报文的源地址为公网的DNS服务器(IP地址为8.8.8.8或114.114.114.114),并且DNS响应所承载的UDP报文的源端口为53,则确定该下行IP报文或下行IP包中包括DNS响应,也即在该下行IP报文或下行IP包中检测出DNS响应。
在一些实施例中,数据网络中的DNS服务器的IP地址是配置的,或预配置的,或预定义的,或通信协议预定义的。
在一些实施例中,数据网络中的DNS服务器的IP地址不仅仅是通用的公网的DNS服务器的IP地址(比如8.8.8.8或114.114.114.114)。
在一些实施例中,DNS响应模块解析第二DNS响应,获取DNS响应中的域名及域名对应的IP地址,或者,获取DNS响应中的域名与IP地址之间的映射关系。其中,DNS响应中的域名包括步骤1101中的互联网业务域名。
步骤1113:DNS响应模块向DNS缓存模块发送域名对应的IP地址;
在一些实施例中,DNS响应模块将解析得到的域名及域名对应的IP地址,或者,DNS响应模块将解析得到的域名与IP地址之间的映射关系,向DNS缓存模块发送。
步骤1114:DNS缓存模块保存域名对应的IP地址;
在一些实施例中,DNS缓存模块保存接收到的域名及域名对应的IP地址,或者,DNS 缓存模块保存接收到的域名与IP地址之间的映射关系。
在一些实施例中,DNS缓存模块将接收到的域名及域名对应的IP地址,或者,域名与IP地址之间的映射关系,保存到UPF的缓存数据中。
在一些实施例中,DNS缓存模块将接收到的域名及域名对应的IP地址,或者,域名与IP地址之间的映射关系,保存到DNS缓存数据中。
在一些实施例中,DNS缓存模块保存域名对应的IP地址或域名与IP地址之间的映射关系,可以认为是将域名对应的IP地址或域名与IP地址之间的映射关系保存到UPF本地。
由DNS缓存模块将第二DNS响应中的域名与IP地址之间的映射关系保存在UPF的缓存数据中,支持未来接收到DNS查询请求时,通过UPF请求模块来处理DNS查询请求,使得DNS查询请求在到达DNS服务器之前就能被处理,省去了从DNS请求模块到DNS服务器这一段通信链路的资源消耗,省去了DNS服务器处理DNS查询请求的资源消耗,节省了DNS查询请求的处理时间,提升了DNS查询请求的处理效率。
步骤1115:UPF基础模块将第二DNS响应发送给基站;
第二DNS响应中包括待查询域名对应的IP地址。
在一些实施例中,UPF基础模块对第二DNS响应进行处理,比如封装,将处理后的第二DNS响应向终端设备发送。
在一些实施例中,UPF基础模块通过隧道将第二DNS响应发送给接入网,比如基站,由接入网将第二DNS响应送达终端设备。
步骤1116:基站将第二DNS响应发送给终端设备。
在一些实施例中,终端设备基于接收到的第二DNS响应,通过第二DNS响应中包括的待查询域名对应的IP地址,访问互联网业务。
在一些实施例中,上述UPF基础模块、DNS请求模块、DNS缓存模块通过软件或程序实现对应的功能。
在一些实施例中,上述UPF基础模块、DNS请求模块、DNS缓存模块、DNS响应模块视为一个UPF整体中的部分或全部。
综上所述,本申请提供的方法支持由UPF中的UPF基础模块、DNS请求模块、DNS缓存模块和DNS响应模块执行域名查询并将查询到的IP地址返回给终端设备,与相关技术中将DNS查询请求通过较长的网络通信链路送至公网的DNS服务器的方式相比,本申请提供的方法支持在将DNS查询请求送达公网的DNS服务器之前,基于UPF的缓存数据完成DNS查询请求对应的域名查询,这样所需的网络通信链路较短,可以提高域名查询速度。并且,由于DNS查询请求无需到达公网的DNS服务器,因此可以减少DNS服务器所需处理的DNS查询请求,从而减轻了公网的DNS服务器的处理负荷。并且,本申请实施例提供的方法无需在核心网中新增设备,利用已有的实现UPF的计算机设备即可实现,因此,本申请提供的方法的实现成本较低;此外,利用已有的实现UPF的计算机设备进行域名查询,可以不必额外设置复杂的分流规则,具有较高的兼容性和较低的实现难度。另外,本申请提供的方法支持用于实现UPF的计算机设备将来自数据网络的域名对应的IP地址保存至UPF的缓存数据中,有益于UPF后续处理DNS查询请求,进一步 提升了域名查询的效率和速度。
图12示出了本申请一些示例性实施例提供的域名查询方法的流程示意图。本实施例以该方法由图3所示的终端设备执行来举例说明。该方法包括如下步骤中的至少部分步骤:
步骤122:发送DNS查询请求;
在一些实施例,由终端设备将携带有待查询域名的DNS查询请求,向网络设备发送,该网络设备是接入网设备和/或核心网设备。
在一些实施例中,DNS查询请求包括如下至少之一:
·基于UDP的DNS查询请求;
·基于TCP的DNS查询请求;
·基于HTTP的DNS查询请求。
也就是说,在一些实施例中,DNS查询请求是UDP DNS查询请求,TCP DNS查询请求和HTTPDNS查询请求中的至少一种。
步骤124:接收DNS响应;
在一些实施例中,终端设备接收来自网络设备的DNS响应,该DNS响应携带有待查询域名对应的IP地址。
在一些实施例中,终端设备接收来自接入网的DNS响应,接入网接收来自核心网的DNS响应,该DNS响应携带有待查询域名对应的IP地址。
在一些实施例中,该DNS响应来自核心网UPF。
在一些实施例中,该DNS响应由核心网UPF生成,或者,该DNS响应由数据网络中的DNS服务器生成。
在一些实施例中,终端设备解析来自网络设备的DNS响应,获取该DNS响应中的待查询域名对应的IP地址。
步骤126:访问IP地址。
在一些实施例中,终端设备基于接收到的待查询域名对应的IP地址,访问该IP地址,或访问与该IP地址对应的互联网业务。
综上所述,本申请实施例提供的方法支持终端设备获取来自UPF的DNS响应,与相关技术中将DNS查询请求通过较长的网络通信链路送至公网的DNS服务器的方式相比,本申请提供的方法支持在将DNS查询请求送达公网的DNS服务器之前,基于UPF的缓存数据完成DNS查询请求对应的域名查询,这样所需的网络通信链路较短,可以提高域名查询速度。并且,由于DNS查询请求无需到达公网的DNS服务器,因此可以减少DNS服务器所需处理的DNS查询请求,从而减轻了公网的DNS服务器的处理负荷。并且,本申请实施例提供的方法无需在核心网中新增设备,利用已有的实现UPF的计算机设备即可实现,因此,本申请提供的方法的实现成本较低;此外,利用已有的实现UPF的计算机设备进行域名查询,可以不必额外设置复杂的分流规则,具有较高的兼容性和较低的实现难度。
图13示出了本申请一些示例性实施例提供的域名查询装置的结构示意图。该装置包括:接收模块132、处理模块134、发送模块136中的至少部分模块。
接收模块132,用于接收终端设备的DNS查询请求,所述DNS查询请求中包括待查询域名。
处理模块134,用于基于所述装置的缓存数据确定所述待查询域名对应的IP地址。
发送模块136,用于向所述终端设备发送DNS响应,该DNS响应中包括待查询域名对应的IP地址。
在一些实施例中,所述处理模块134还用于在所述装置的缓存数据中存在所述待查询域名对应的IP地址的情况下,根据所述待查询域名对应的IP地址生成所述DNS响应。
在一些实施例中,所述装置还包括发送模块136,所述发送模块136用于在所述装置的缓存数据中不存在所述待查询域名对应的IP地址的情况下,向DNS服务器发送所述DNS查询请求。
在一些实施例中,所述接收模块132还用于接收来自所述DNS服务器的DNS响应;
其中,所述DNS服务器位于数据网络,所述UPF位于核心网,所述数据网络与所述核心网相连。
在一些实施例中,所述处理模块134还用于将所述DNS响应中包括的所述待查询域名对应的IP地址保存至所述装置的缓存数据中。
在一些实施例中,所述接收模块132还用于接收来自所述DNS服务器的数据包,所述数据包的目标地址是所述终端设备的地址。
在一些实施例中,所述处理模块134还用于在所述数据包中提取所述DNS响应。
在一些实施例中,所述处理模块134还用于在所述DNS响应中,解析出所述待查询域名对应的IP地址。
在一些实施例中,所述接收模块132还用于接收所述终端设备发送的上行数据包,所述上行数据包的目标地址是DNS服务器的地址。
在一些实施例中,所述处理模块134还用于在所述上行数据包中提取所述DNS查询请求。
在一些实施例中,所述处理模块134还用于从所述DNS查询请求,解析出所述待查询域名;
其中,所述DNS服务器位于数据网络,所述UPF位于核心网,所述数据网络与所述核心网相连。
在一些实施例中,所述UPF的缓存数据来自DNS服务器,所述DNS服务器位于数据网络。
在一些实施例中,所述UPF的缓存数据包括如下至少之一:
·热更新缓存数据;
·定时缓存数据;
·默认缓存数据;
·静态缓存数据;
·动态缓存数据。
在一些实施例中,所述DNS查询请求包括如下至少之一:
·基于用户数据报协议UDP的DNS查询请求;
·基于传输控制协议TCP的DNS查询请求;
·基于超文本传输协议HTTP的DNS查询请求。
综上所述,本申请提供的装置与相关技术中将DNS查询请求通过较长的网络通信链路送至公网的DNS服务器的方式相比,支持在将DNS查询请求送达公网的DNS服务器之前,基于UPF的缓存数据完成DNS查询请求对应的域名查询,这样所需的网络通信链路较短,可以提高域名查询速度。并且,由于DNS查询请求无需到达公网的DNS服务器,因此可以减少DNS服务器所需处理的DNS查询请求,从而减轻了公网的DNS服务器的处理负荷。并且,本申请实施例提供的装置无需在核心网中新增设备,利用已有的实现UPF的计算机设备即可实现,因此,本申请提供的方法的实现成本较低;此外,利用已有的实现UPF的计算机设备进行域名查询,可以不必额外设置复杂的分流规则,具有较高的兼容性和较低的实现难度。
需要说明的是:上述实施例提供的装置在域名查询中,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。且具体实现过程详见方法实施例,这里不再赘述。
图14示出了本申请一些示例性实施例提供的通信设备1400的结构框图。该通信设备1400包括:处理器1401、接收器1402、发射器1403、存储器1404和总线1405。
处理器1401包括一个或者一个以上处理核心,处理器1401通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。在一些实施例中,处理器1401可用于实现上述的处理模块134的功能和步骤。
接收器1402和发射器1403可以实现为一个通信组件,该通信组件可以是一块通信芯片。在一些实施例中,接收器1402可用于实现如上所述的接收模块132的功能和步骤。在一些实施例中,发射器1403可用于实现如上所述的发送模块136的功能和步骤。
存储器1404通过总线1405与处理器1401相连。存储器1404可用于存储至少一个指令,处理器1401用于执行该至少一个指令,以实现上述方法实施例中的各个步骤。
此外,存储器1404可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:磁盘或光盘,电可擦除可编程只读存储器(Electrically Erasable Programmable Read Only Memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM),静态随时存取存储器(Static Random-Access Memory,SRAM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,可编程只读存储器(Programmable Read-Only Memory,PROM)。
在一些实施例中,接收器1402独立进行信号/数据的接收,或处理器1401控制接收器 1402进行信号/数据的接收,或处理器1401请求接收器1402进行信号/数据的接收,或处理器1401配合接收器1402进行信号/数据的接收。
在一些实施例中,发射器1403独立进行信号/数据的发送,或处理器1401控制发射器1403进行信号/数据的发送,或处理器1401请求发射器1403进行信号/数据的发送,或处理器1401配合发射器1403进行信号/数据的发送。
在本申请的一些示例性实施例中,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一段程序,所述至少一段程序由处理器加载并执行,计算机可读存储介质实现上述各个方法实施例提供的域名查询方法。
在本申请的一些示例性实施例中,还提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在通信设备上运行时,用于实现上述各个方法实施例提供的域名查询方法。
在本申请的一些示例性实施例中,还提供了一种计算机程序产品,该计算机程序产品在计算机设备的处理器上运行时,使得计算机设备执行上述域名查询方法。
在本申请的一些示例性实施例中,还提供了一种计算机程序,该计算机程序包括计算机指令,计算机设备的处理器执行所述计算机指令,使得所述计算机设备执行上述域名查询方法。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (13)

  1. 一种域名查询方法,所述方法由计算机设备执行,所述方法包括:
    接收终端设备的域名系统DNS查询请求,所述DNS查询请求中包括待查询域名;
    基于用户面功能UPF的缓存数据确定所述待查询域名对应的互联网协议IP地址;
    向所述终端设备发送DNS响应,所述DNS响应中包括所述待查询域名对应的IP地址。
  2. 根据权利要求1所述的方法,所述基于UPF的缓存数据确定所述待查询域名对应的互联网协议IP地址,包括:
    在所述UPF的缓存数据中存在所述待查询域名对应的IP地址的情况下,根据所述待查询域名对应的IP地址生成所述DNS响应。
  3. 根据权利要求1或2所述的方法,所述基于UPF的缓存数据确定所述待查询域名对应的互联网协议IP地址,包括:
    在所述UPF的缓存数据中不存在所述待查询域名对应的IP地址的情况下,向DNS服务器发送所述DNS查询请求;
    接收来自所述DNS服务器的所述DNS响应;
    其中,所述DNS服务器位于数据网络,所述UPF位于核心网,所述数据网络与所述核心网相连。
  4. 根据权利要求3所述的方法,所述方法还包括:
    将所述DNS响应中的所述待查询域名对应的IP地址,保存至所述UPF的缓存数据中。
  5. 根据权利要求3或4所述的方法,所述接收来自所述DNS服务器的所述DNS响应,包括:
    接收来自所述DNS服务器的数据包,所述数据包的目标地址是所述终端设备的地址;
    在所述数据包中提取所述DNS响应;
    所述方法还包括:
    从所述DNS响应中,解析出所述待查询域名对应的IP地址。
  6. 根据权利要求1至5任一所述的方法,所述接收终端设备的DNS查询请求,包括:
    接收所述终端设备发送的上行数据包,所述上行数据包的目标地址是DNS服务器的地址;
    在所述上行数据包中提取所述DNS查询请求;
    所述方法还包括:
    从所述DNS查询请求,解析出所述待查询域名;
    其中,所述DNS服务器位于数据网络,所述UPF位于核心网,所述数据网络与所述核心网相连。
  7. 根据权利要求1至6任一所述的方法,所述UPF的缓存数据来自DNS服务器,所述DNS服务器位于数据网络。
  8. 根据权利要求1至7任一所述的方法,所述DNS查询请求包括如下至少之一:
    基于用户数据报协议UDP的DNS查询请求;
    基于传输控制协议TCP的DNS查询请求;
    基于超文本传输协议HTTP的DNS查询请求。
  9. 一种域名查询装置,所述装置包括:
    接收模块,用于接收来自终端设备的域名系统DNS查询请求,所述DNS查询请求中包括待查询域名;
    处理模块,用于在所述装置的缓存数据中查询所述待查询域名对应的互联网协议IP地址;
    发送模块,用于向所述终端设备发送DNS响应,所述DNS响应中包括所述待查询域名对应的IP地址。
  10. 一种计算机设备,所述计算机设备包括:处理器和存储器,所述存储器存储有计算机程序,所述计算机程序由所述处理器加载并执行,所述计算机设备实现如权利要求1至8任一所述的域名查询方法。
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序由处理器加载并执行,所述计算机可读存储介质实现如权利要求1至8任一所述的域名查询方法。
  12. 一种计算机程序产品,所述计算机程序产品存储有计算机程序,所述计算机程序由处理器加载并执行,所述计算机程序产品实现如权利要求1至8任一所述的域名查询方法。
  13. 一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,安装有所述芯片的计算机设备用于实现如权利要求1至8任一所述的域名查询方法。
PCT/CN2023/123894 2022-11-23 2023-10-11 域名查询方法、装置、设备及存储介质 Ceased WO2024109369A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2025514187A JP2025533410A (ja) 2022-11-23 2023-10-11 ドメイン名問合せ方法、装置、デバイス、コンピュータプログラム及びチップ
US18/908,676 US20250030658A1 (en) 2022-11-23 2024-10-07 Domain name query method and apparatus, device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211478295.4A CN118075231A (zh) 2022-11-23 2022-11-23 域名查询方法、装置、设备及存储介质
CN202211478295.4 2022-11-23

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/908,676 Continuation US20250030658A1 (en) 2022-11-23 2024-10-07 Domain name query method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2024109369A1 true WO2024109369A1 (zh) 2024-05-30

Family

ID=91094261

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/123894 Ceased WO2024109369A1 (zh) 2022-11-23 2023-10-11 域名查询方法、装置、设备及存储介质

Country Status (4)

Country Link
US (1) US20250030658A1 (zh)
JP (1) JP2025533410A (zh)
CN (1) CN118075231A (zh)
WO (1) WO2024109369A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110995881A (zh) * 2019-11-29 2020-04-10 南京亚信智网科技有限公司 一种域名存储方法及装置
CN113301077A (zh) * 2020-05-20 2021-08-24 阿里巴巴集团控股有限公司 云计算服务部署与分流方法、系统、设备及存储介质
CN113382031A (zh) * 2020-03-10 2021-09-10 华为技术有限公司 一种域名查询方法及装置
US20210352042A1 (en) * 2019-05-10 2021-11-11 Tencent Technology (Shenzhen) Company Limited Method, apparatus, and system for selecting mec node
EP3979601A2 (en) * 2020-10-01 2022-04-06 Nokia Technologies Oy Apparatus, methods, and computer programs

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11140695B1 (en) * 2017-11-09 2021-10-05 Verana Networks, Inc. Wireless mesh network
US11218438B2 (en) * 2019-04-12 2022-01-04 Huawei Technologies Co., Ltd. System, apparatus and method to support data server selection
CN112422701B (zh) * 2019-08-20 2022-05-24 华为技术有限公司 域名系统查询的方法和通信装置
US11356404B2 (en) * 2020-03-04 2022-06-07 Qualcomm Incorporated Domain name system (DNS) override for edge computing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210352042A1 (en) * 2019-05-10 2021-11-11 Tencent Technology (Shenzhen) Company Limited Method, apparatus, and system for selecting mec node
CN110995881A (zh) * 2019-11-29 2020-04-10 南京亚信智网科技有限公司 一种域名存储方法及装置
CN113382031A (zh) * 2020-03-10 2021-09-10 华为技术有限公司 一种域名查询方法及装置
CN113301077A (zh) * 2020-05-20 2021-08-24 阿里巴巴集团控股有限公司 云计算服务部署与分流方法、系统、设备及存储介质
EP3979601A2 (en) * 2020-10-01 2022-04-06 Nokia Technologies Oy Apparatus, methods, and computer programs

Also Published As

Publication number Publication date
CN118075231A (zh) 2024-05-24
JP2025533410A (ja) 2025-10-07
US20250030658A1 (en) 2025-01-23

Similar Documents

Publication Publication Date Title
EP4213577B1 (en) Address information sending method and apparatus, address information obtaining method and apparatus, device, and medium
US12532195B2 (en) Communication method and apparatus
US10912018B2 (en) PDU type setting method, UE policy setting method, and related entity
EP4280567B1 (en) Communication method and device
US10848569B2 (en) Session processing method and related device
US11317450B2 (en) Wireless communication method and network device
WO2011137792A1 (zh) 一种推送设备间的协作方法及装置
KR102942658B1 (ko) 네트워크 기능 등록 방법, 발견 방법, 장치, 장비 및 매체
US11917718B2 (en) Local area network communication management method and apparatus
US20250365578A1 (en) Communication method and communication apparatus
US12133149B2 (en) Service invocation method and network device
CN115843434B (zh) 网元发现方法、装置、设备及存储介质
US20240267829A1 (en) Communication method and apparatus
WO2024109369A1 (zh) 域名查询方法、装置、设备及存储介质
JP7651722B2 (ja) 通信方法および通信装置
CN115209522B (zh) 网络功能注册方法、发现方法、装置、设备及介质
US12507142B2 (en) Dynamic switching between a home network and a roaming network based on data connectivity in the home network
US20250267612A1 (en) Communication method, communication apparatus, and communication system
US20250150955A1 (en) Methods, apparatuses, and computer program products for enhancing local breakout sessions in roaming scenarios
WO2024022370A1 (zh) 信息获取和发送方法、服务器访问和会话建立方法及设备
CN121284009A (zh) 一种ims注册方法、装置、设备及存储介质
WO2025237114A1 (zh) 一种通信方法、通信装置及通信系统
WO2026067378A1 (zh) 通信方法、装置及设备
CN121173484A (zh) 一种用户认证和激活方法、设备及系统
HK40075074A (zh) 服务调用方法及网络设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23893461

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2025514187

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23893461

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 06.10.2025)

122 Ep: pct application non-entry in european phase

Ref document number: 23893461

Country of ref document: EP

Kind code of ref document: A1