WO2018081963A1 - Method and device for dns resolution and network system - Google Patents

Method and device for dns resolution and network system Download PDF

Info

Publication number
WO2018081963A1
WO2018081963A1 PCT/CN2016/104389 CN2016104389W WO2018081963A1 WO 2018081963 A1 WO2018081963 A1 WO 2018081963A1 CN 2016104389 W CN2016104389 W CN 2016104389W WO 2018081963 A1 WO2018081963 A1 WO 2018081963A1
Authority
WO
WIPO (PCT)
Prior art keywords
domain name
context information
client
local
dns resolution
Prior art date
Application number
PCT/CN2016/104389
Other languages
French (fr)
Chinese (zh)
Inventor
代明
Original Assignee
达闼科技(北京)有限公司
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 达闼科技(北京)有限公司 filed Critical 达闼科技(北京)有限公司
Priority to CN201680006918.4A priority Critical patent/CN107223329B/en
Priority to PCT/CN2016/104389 priority patent/WO2018081963A1/en
Publication of WO2018081963A1 publication Critical patent/WO2018081963A1/en

Links

Images

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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • Embodiments of the present invention relate to the field of communications, and in particular, to a DNS (English name: Domain Name System, Chinese: Domain Name System) parsing method, apparatus, and network system.
  • DNS English name: Domain Name System, Chinese: Domain Name System
  • the local domain name server (English: Local Domain Name Server) needs to first resolve the domain name requested by the client to IP (English full name: Internet Protocol, Chinese: Network Interconnection Protocol) address to request data content based on the IP address.
  • IP International full name: Internet Protocol, Chinese: Network Interconnection Protocol
  • the local domain name server receives the domain name resolution request (DNS request) sent by the client in the local network, recursively queries the upper-level domain name server, and resolves the domain name into an IP address and carries the feedback to the client in the DNS response; sometimes the local domain name is required.
  • DNS request domain name resolution request
  • domain names are resolved to other IP addresses through a custom configuration, such as the IP address of the network proxy server (such as 2.2.2.2 in Figure 1), after which the client requests the local proxy server through the HTTP request according to the IP address.
  • Data content the local proxy server requests data content from the HTTP web server through an HTTP request and feeds back to the client via an HTTP response.
  • domain name servers support domain name servers for such custom configuration, but current web pages generally contain many elements. In order to better support concurrent acquisition of resources, these elements usually come from multiple different domain names.
  • the domain name of the homepage is not under the same top-level domain name; with the revision of the webpage, elements from the new domain name may be added.
  • each domain name resolution request resolves an IP address. If you need to resolve these domain names to the same custom IP address, you first need to find these domain names and add them to the local domain name.
  • the domain names are all corresponding to the same IP address, and then the domain name resolution request corresponding to the domain name is obtained by the domain name resolution request corresponding to the domain name, and the corresponding IP address in the custom configuration is obtained. It is cumbersome and difficult to maintain.
  • Embodiments of the present invention provide a DNS resolution method, apparatus, and network system for simplifying the DNS resolution process in the prior art.
  • the first aspect provides a DNS resolution method, including:
  • the local domain name server receives the DNS domain name system resolution request sent by the client, where the DNS resolution request includes the first domain name and the context information;
  • the local domain name server does not query the first domain name in the custom configuration, and the second domain name is included in the context information, querying, in the customized configuration, the second domain name in the context information IP address;
  • the local domain name server feeds back a DNS resolution response containing the queried IP address to the client.
  • the second aspect provides a DNS resolution method, including:
  • the client sends a DNS resolution request to the local domain name server, where the DNS resolution request includes a first domain name and the context information, the context information is used to deliver a second domain name, and the second domain name is used by the local domain name server
  • the IP address corresponding to the second domain name in the context information is queried in the customized configuration.
  • the client receives a DNS resolution response including the queried IP address fed back by the local domain name server according to the DNS resolution request.
  • a local domain name server including:
  • a receiving unit configured to receive a DNS resolution request sent by the client, where the DNS resolution request includes the first domain name and the context information;
  • a processing unit configured to query, in the customized configuration, the context information in the custom configuration, when the local domain name server does not query the first domain name in a custom configuration, and the context information includes a second domain name The IP address corresponding to the second domain name;
  • a sending unit configured to feed back a DNS resolution response that includes the IP address queried by the processing unit to the client.
  • the fourth aspect provides a client, including:
  • a sending unit configured to send a DNS resolution request to the local domain name server, where the DNS resolution request includes a first domain name and the context information, where the context information is used to deliver a second domain name, where the second domain name is used by the
  • the local domain name server does not query the first domain name in the custom configuration, and the second domain name is included in the context information, query the second domain name in the context information in the customized configuration.
  • IP address
  • a receiving unit configured to receive a DNS resolution response that includes the queried IP address fed back by the local domain name server according to the DNS resolution request;
  • the sending unit is further configured to send a data content request according to the IP address received by the receiving unit.
  • a local domain name server comprising: a memory, a communication interface, and a processor, the memory is configured to store computer execution code, and the processor is configured to execute the computer to perform code control to perform the foregoing first aspect
  • the DNS resolution method is used for data transmission between the local domain name server and an external device.
  • a sixth aspect provides a client, including: a storage interface, a communication interface, and a processing interface, where the storage interface is configured to store computer execution code, and the processing interface is configured to execute the computer to perform code control to execute the foregoing second Aspects provide a DNS resolution method for data transmission between the client and an external device.
  • a seventh aspect provides a network system, including: a network server, a local proxy server, any of the above local domain name servers, and any of the foregoing clients.
  • the client sends a DNS resolution request to the local domain name server
  • the domain name server fails to query the first domain name in the custom configuration and the second domain name is included in the context information
  • the IP address corresponding to the second domain name in the context information is queried in the custom configuration; thus, the client is based on the query.
  • the IP address sends a data content request to request the data content, wherein the context information is used to deliver the second domain name, so the DNS resolution request may carry multiple domain names.
  • the context information may be configured to be empty.
  • the domain name When the domain name is parsed, the domain name may be carried in the DNS resolution request, and the IP address is queried in the custom configuration by referring to the first domain name and the context information when parsing the DNS resolution request, and the second domain name is included in the context information.
  • the first domain name can be resolved to the IP address corresponding to the second domain name without manually adding the domain name in the custom configuration of the local domain name server, which simplifies the DNS resolution process in the prior art.
  • FIG. 1 is an architectural diagram of a network system provided by the prior art
  • FIG. 2 is a structural diagram of a network system according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a DNS resolution method according to an embodiment of the present invention.
  • FIG. 4 is a signaling interaction diagram of a DNS resolution method according to another embodiment of the present invention.
  • FIG. 5 is a flowchart of a DNS resolution method according to still another embodiment of the present invention.
  • FIG. 6 is a flowchart of a DNS resolution method according to still another embodiment of the present invention.
  • FIG. 7 is a structural diagram of a local domain name server according to an embodiment of the present invention.
  • FIG. 8 is a structural diagram of a client according to an embodiment of the present invention.
  • FIG. 9 is a structural diagram of a client according to another embodiment of the present invention.
  • FIG. 10A is a structural diagram of a local domain name server according to another embodiment of the present invention.
  • FIG. 10B is a structural diagram of a local domain name server according to still another embodiment of the present invention.
  • FIG. 11 is a structural diagram of a client according to another embodiment of the present invention.
  • FIG. 11B is a structural diagram of a client according to still another embodiment of the present invention.
  • the words “first”, “second” and the like are used to distinguish the same or similar items whose functions and functions are substantially the same, in the field.
  • the skilled person will understand that the words “first”, “second” and the like do not limit the number and order of execution.
  • "a plurality” means two or more unless otherwise stated.
  • Context also known as written language environment, English: context.
  • HTTP Referer is a standard HTTP header (header) in HTTP.
  • the browser sends a request to the web server, it usually brings a Referer to tell the server which page I linked from. The server can thereby obtain some information for processing.
  • the context information used by the domain name is sent to the local domain name server through the Referer, and the HTTP DNS resolution request is extended to notify the local domain name server of a domain name request.
  • Source domain name is a standard HTTP header (header) in HTTP.
  • the client provided by the embodiment of the present invention may be a personal computer (English name: personal computer, abbreviation: PC), a netbook, a personal digital assistant (PDA: PDA), or the client may be A software client or a software system or a software application PC or the like can be installed, and the specific hardware implementation environment can be a general computer form, an ASIC method, an FPGA, or some
  • the extended platform for programming is, for example, the Xtensa platform of Tensilica, etc.
  • the server provided by the embodiment of the present invention includes a local domain name server, a local proxy server, and a network server, and an embodiment of the present invention provides a server for providing a computing service in response to a service request. It includes a processor, hard disk, memory, system bus, etc., similar to a general-purpose computer architecture.
  • the basic principle of the present invention is that when a client requests data content from a network server, it first needs to send a DNS resolution request to the local domain name server, so that the local domain name server resolves the domain name requested by the client into an IP address, and the DNS resolution in the implementation of the present invention.
  • the request carries the first domain name and the context information, where the context information is used to deliver the second domain name, so the DNS resolution request may carry multiple domain names.
  • the context information may be configured to be empty, when needed.
  • the domain name When the domain name is parsed, the domain name may be carried in the DNS resolution request, and the IP address is obtained by referring to the first domain name and the second domain name passed in the context information when parsing the DNS resolution request, for example, the second domain name can be parsed.
  • the IP address When the IP address is configured, the first domain name is also resolved to the IP address corresponding to the second domain name.
  • the first domain name is stored in the local DNS server. Context information to resolve multiple domain names to the same IP address without Adding a domain name to a custom configuration of a local domain name server simplifies the DNS resolution process in the prior art.
  • the network system architecture provided by the embodiment of the present invention includes: a local domain name server 21, a client terminal 22, and a network server 23, and may also include a local proxy server 24 for a certain scenario.
  • the client when the IP address resolved by the local domain name server is the address of the network server, the client can directly access the network server through the IP address and request data content from the IP address.
  • the IP address resolved by the local domain name server is the address of the local proxy server
  • the client can request data content from the local proxy server through the IP address, and the local proxy server agent requests the data content from the web server and feeds back to the client.
  • the embodiment of the present invention does not involve the improvement of the client requesting the data content according to the IP address, it can be considered that the above-mentioned In one method, the data content is acquired.
  • the IP address is used as the address of the local proxy server as an example.
  • an embodiment of the present invention provides a DNS resolution method, including the following steps:
  • the client sends a DNS resolution request to the local domain name server.
  • the DNS resolution request includes a first domain name and context information, and the context information is used to deliver the second domain name.
  • the DNS resolution request is an HTTP DNS resolution request
  • the context information is a referer reference page field in HTTP.
  • Host 192.168.1.1*
  • the host name of the local domain name server is 192.168.1.1*
  • the local domain name server receives the DNS domain name system parsing request sent by the client.
  • the local domain name server queries the IP address corresponding to the second domain name in the context information in the custom configuration when the first domain name is not found in the custom configuration and the second domain name is included in the context information.
  • the local domain name server feeds back the DNS resolution response including the queried IP address to the client.
  • the client receives a DNS resolution response that includes the queried IP address fed back by the local domain name server according to the DNS resolution request.
  • the client can send a data content request based on the queried IP address.
  • the local domain name server does not query the first domain name in the custom configuration and the second domain name is included in the context information, and the context information is queried in the custom configuration.
  • the IP address corresponding to the second domain name in this way, the client sends a data content request according to the queried IP address to request the data content, wherein the context information is used to deliver the second domain name, so the DNS resolution request may carry multiple domain names, when When only one domain name is parsed, the context information can be configured to be empty.
  • two domain names can be carried in the DNS resolution request, and the first domain name and the context are simultaneously referred to when parsing the DNS resolution request.
  • the information is queried in the custom configuration.
  • the context information includes the second domain name
  • the first domain name can be resolved to the IP address corresponding to the second domain name without manually adding the domain name in the custom configuration of the local domain name server.
  • the context information uses a referer field in HTTP to take a request for a webpage content data including multiple domain names as an example.
  • www.example.com is the primary domain name of the webpage
  • the primary domain name is used for the request of the parent content
  • www.static.com is the domain name of a sub-content of the webpage, where www.example.com is included locally.
  • www.static.com is not included in the custom configuration of the local domain name server.
  • the DNS resolution method provided by the embodiment of the present invention is as follows for a domain name resolution process, where the domain name may be the primary domain name www.example.com included in the webpage (where only the keywords of each step are shown in FIG. 4 and The complete steps are not shown, the specific steps are described in detail in the examples):
  • the client sends a DNS resolution request to the local domain name server locally.
  • the DNS resolution request includes a domain name www.example.com and context information, where the context information is empty.
  • the local domain name server receives the DNS resolution request.
  • the local domain name server queries the IP address 2.2.2.2 corresponding to www.example.com in the custom configuration.
  • the custom configuration can be a system configuration file, such as a configuration list containing mappings between domain names and IP addresses.
  • the local domain name server feeds back the DNS resolution response including the IP address 2.2.2.2 to the client.
  • the client sends an HTTP data content request to a local proxy server whose IP address is 2.2.2.2.
  • the local proxy server sends an HTTP request to the HTTP data content source web server.
  • the source network server sends the requested data content to the local proxy server.
  • the local proxy server sends the data content to the client.
  • the client then performs the next action based on the received data content, such as a request for a sub-content in the data content.
  • the parsing process of the associated domain name www.static.com for www.example.com is mainly provided.
  • the client includes the sub-content in the data content of the last request, the sub-content and the parent content are respectively located at www.
  • the resolution process for multiple domain names is as follows:
  • a client receives data content, where the data content includes sub-content and parent content.
  • the client sets the domain name www.example.com of the parent content in the context information in the DNS resolution request, and sets the domain name www.static.com of the child content to the first domain name.
  • the client sends a DNS resolution request to the local domain name server.
  • the DNS resolution request contains the domain name www.static.com, and the context information includes www.example.com.
  • the local domain name server receives the DNS resolution request sent by the client.
  • the local domain name server queries www.static.com in a custom configuration.
  • the local domain name server If the local domain name server cannot query www.static.com in the custom configuration, the local domain name server queries the context information in the custom configuration.
  • the IP address corresponding to www.example.com is 2.2.2.2.
  • the local domain name server saves www.static.com to a custom configuration and maps www.static.com to the IP address 2.2.2.2 corresponding to www.example.com.
  • the client can obtain the content data according to the IP address 2.2.2.2.
  • the client and the local domain name server may continue to repeat the above steps 301-307 to obtain the data content by sending the DNS resolution request to the local domain name server by the client, and the domain name in the context information of the subsequent DNS resolution request is www. Static.com still resolves to IP address 2.2.2.2.
  • the mapping of www.static.com to the IP address 2.2.2.2 corresponding to www.example.com is automatically updated, and the first domain name is stored in the local domain name server as a subsequent DNS request.
  • the context information ensures that the first domain name or the context information in the subsequent DNS resolution request is still resolved to the IP address 2.2.2.2 when the domain name is www.static.com.
  • the client sends a DNS resolution request to the local domain name server.
  • the DNS resolution request includes the domain name www.test.com, and the context information, and the context information is empty.
  • the local domain name server receives the DNS resolution request sent by the client.
  • the local domain name server queries www.test.com in a custom configuration.
  • the upper domain name server sends a DNS domain name request to recursively resolve the DNS domain name request.
  • the local domain name server receives the IP address fed back by the upper-level domain name server, and carries the IP address in the DNS resolution response and feeds back to the client.
  • the client After the client obtains the IP address after step 405, the client can obtain the content data according to the IP address by referring to the above steps 205-208. You can also map www.test.com to this IP address to update your custom configuration.
  • each network element such as a server, a client, etc.
  • each network element includes hardware structures and/or software modules corresponding to each function.
  • the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the embodiment of the present invention may divide a function module of a local domain name server, a client, and the like according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 7 is a schematic diagram showing a possible structure of a local domain name server involved in the foregoing embodiment, where the local domain name server includes: a receiving unit 71, a processing unit 72, and a sending. Unit 73.
  • the receiving unit 71 is configured to support the local domain name server to perform the process 102 in FIG. 3, the process 202 in FIG. 4, the process 304 in FIG. 5, and the process 402 in FIG. 6.
  • the processing unit 72 is configured to support the local domain name server to execute FIG.
  • the sending unit 73 is configured to support the local domain name server to execute the process 104 in FIG. 3, in FIG. Process 204, process 404 in FIG. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • FIG. 8 is a schematic diagram showing a possible structure of the client involved in the foregoing embodiment, where the client includes: a sending unit 81 and a receiving unit 82.
  • the sending unit 81 is configured to support the client to perform the processes 101 and 106 in FIG. 3, the processes 201 and 205 in FIG. 4, the process 303 in FIG. 5, and the process 401 in FIG. 6.
  • the receiving unit 82 is configured to support the client to execute. Process 105 in FIG. 3, process 208 in FIG. 4, process 301 in FIG. 5, process 405 in FIG. Or as shown in Figure 9, the client When the configuration unit 83 is further included, the configuration unit 83 is configured to support the client to perform step 302 in FIG. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • FIG. 10A shows a possible structural diagram of the local domain name server involved in the above embodiment.
  • the local domain name server includes a communication module 101 and a processing module 102.
  • the processing module 102 is configured to control and manage the actions of the local domain name server.
  • the processing module 102 is configured to support the local domain name server to perform the process 103 in FIG. 3, the process 203 in FIG. 4, and the processes 305, 306 in FIG. 307, process 403 in FIG. 6, and/or other processes for the techniques described herein.
  • the communication module 101 is for supporting data transmission between a local domain name server and other external devices, such as communication with the functional modules or network entities shown in Figures 2, 10A.
  • the local domain name server may further include a storage module 103 for storing program codes and data of the local domain name server.
  • the processing module 102 can be a processor or a controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (Application-Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 101 can be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the storage module 103 can be a memory.
  • the local domain name server involved in the embodiment of the present invention may be the local domain name server shown in FIG. 10B.
  • the local domain name server includes a processor 1011, a communication interface 1012, a memory 1013, and a bus 1014.
  • the communication interface 1012, the processor 1011, and the memory 1013 are connected to each other through a bus 1014.
  • the bus 1014 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Wait.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • Wait The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only Figure 10B It is indicated by a thick line, but does not mean that there is only one bus or one type of bus.
  • FIG. 11A shows a possible structural diagram of the client involved in the above embodiment.
  • the client includes a communication module 111 and a processing module 112.
  • the processing module 111 is configured to perform control management on the actions of the client.
  • the processing module 11 is configured to support the control communication module 111 to execute the processes 101 and 106 in FIG. 3, the processes 201 and 205 in FIG. 4, and the process 303 in FIG. Process 401 in FIG. 6; process 105 in FIG. 3, process 208 in FIG. 4, process 301 in FIG. 5, and process 405 in FIG.
  • the processing module 112 is further configured to support the client to perform step 302 in FIG. And/or other processes for the techniques described herein.
  • the communication module 101 is for supporting data transmission between a local domain name server and other external devices, such as communication with the functional modules or network entities shown in Figures 2, 11A.
  • the client may also include a storage module 113 for storing program code and data of the local domain name server.
  • the processing module 112 may be a processor or a controller, for example, may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application specific integrated circuit (Application-Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 111 can be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the storage module 113 can be a memory.
  • the client involved in the embodiment of the present invention may be the client shown in FIG. 11B.
  • the client includes a processor 1111, a communication interface 1112, a memory 1113, and a bus 1114.
  • the communication interface 1112, the processor 1111, and the memory 1113 are mutually connected by a bus 1114; the bus 1114 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Wait.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • Wait The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 11B, but it does not mean that there is only one bus or one type of bus.
  • the steps of a method or algorithm described in connection with the present disclosure may be implemented in a hardware, or may be implemented by a processor executing software instructions.
  • the software instructions may be composed of corresponding software modules, which may be stored in a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory ( Erasable Programmable ROM (EPROM), electrically erasable programmable read only memory (EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor to enable the processor to read information from, and write information to, the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a core network interface device.
  • the processor and the storage medium may also exist as discrete components in the core network interface device.
  • the functions described herein can be implemented in hardware, software, firmware, or any combination thereof.
  • the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium.
  • Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Embodiments of the present invention relate to the field of communications and can simplify a domain name system (DNS) resolution process of the prior art. Disclosed are a method and device for DNS resolution and a network system. The method comprises: a local domain name server receives a DNS resolution request transmitted by a client, where the DNS resolution request comprises a first domain name and context information; the local domain name server, when the first domain name cannot be found in a customized configuration and the context information comprises a second domain name, searches in the customized configuration for an IP address corresponding to the second domain name in the context information; and the local domain name server feeds back to the client a DNS resolution response comprising the IP address found. The embodiments of the present invention are used for DNS resolution.

Description

一种DNS解析方法、装置及网络系统DNS analysis method, device and network system 技术领域Technical field
本发明的实施例涉及通信领域,尤其涉及一种DNS(英文全称:Domain Name System,中文:域名系统)解析方法、装置及网络系统。Embodiments of the present invention relate to the field of communications, and in particular, to a DNS (English name: Domain Name System, Chinese: Domain Name System) parsing method, apparatus, and network system.
背景技术Background technique
在现有的网络系统架构中,客户端向网络服务器请求数据内容时需要首先通过本地域名服务器(英文:Local Domain Name Server)将客户端请求的域名解析为IP(英文全称:Internet Protocol,中文:网络互联协议)地址,以根据该IP地址请求数据内容。具体的,本地域名服务器接收本地网络中的客户端发送的域名解析请求(DNS请求),递归查询上级域名服务器,把域名解析为IP地址携带在DNS应答中反馈至客户端;有时需要在本地域名服务器上,通过自定义配置把某些域名解析到其它IP地址,比如网络代理服务器的IP地址(如图1中的2.2.2.2),之后客户端依据该IP地址通过HTTP请求向本地代理服务器请求数据内容,本地代理服务器通过HTTP请求向HTTP网络服务器请求数据内容并通过HTTP应答反馈至客户端。当前大部分本地域名服务器系支持进行这种自定义配置的域名服务器,但是当前的网页一般包含很多的元素,为了更好的支持资源的并发获取,这些元素通常来自多个不同的域名,这些域名和主页的域名多不在同一顶级域名下;随着网页的改版,可能有来自新的域名下的元素添加进来。这样基于自定义配置进行域名解析时,每个域名解析请求对应解析一个IP地址,若需要把这些域名都解析到同一个自定义IP地址时,首先需要把这些域名都找出来,添加到本地域名服务器的自定义配置中并使这些域名均对应同一个IP地址,然后域名解析时分别通过这些域名对应的域名解解析请求获取自定义配置中对应的IP地址,这 样比较繁琐,并且难于维护。In the existing network system architecture, when the client requests data content from the network server, the local domain name server (English: Local Domain Name Server) needs to first resolve the domain name requested by the client to IP (English full name: Internet Protocol, Chinese: Network Interconnection Protocol) address to request data content based on the IP address. Specifically, the local domain name server receives the domain name resolution request (DNS request) sent by the client in the local network, recursively queries the upper-level domain name server, and resolves the domain name into an IP address and carries the feedback to the client in the DNS response; sometimes the local domain name is required. On the server, some domain names are resolved to other IP addresses through a custom configuration, such as the IP address of the network proxy server (such as 2.2.2.2 in Figure 1), after which the client requests the local proxy server through the HTTP request according to the IP address. Data content, the local proxy server requests data content from the HTTP web server through an HTTP request and feeds back to the client via an HTTP response. Currently, most local domain name servers support domain name servers for such custom configuration, but current web pages generally contain many elements. In order to better support concurrent acquisition of resources, these elements usually come from multiple different domain names. The domain name of the homepage is not under the same top-level domain name; with the revision of the webpage, elements from the new domain name may be added. When performing domain name resolution based on a custom configuration, each domain name resolution request resolves an IP address. If you need to resolve these domain names to the same custom IP address, you first need to find these domain names and add them to the local domain name. In the custom configuration of the server, the domain names are all corresponding to the same IP address, and then the domain name resolution request corresponding to the domain name is obtained by the domain name resolution request corresponding to the domain name, and the corresponding IP address in the custom configuration is obtained. It is cumbersome and difficult to maintain.
发明内容Summary of the invention
本发明的实施例提供一种DNS解析方法、装置及网络系统,用以简化现有技术中的DNS解析过程。Embodiments of the present invention provide a DNS resolution method, apparatus, and network system for simplifying the DNS resolution process in the prior art.
第一方面、提供一种DNS解析方法,包括:The first aspect provides a DNS resolution method, including:
本地域名服务器接收客户端发送的DNS域名系统解析请求,其中所述DNS解析请求包含第一域名以及所述上下文信息;The local domain name server receives the DNS domain name system resolution request sent by the client, where the DNS resolution request includes the first domain name and the context information;
在所述本地域名服务器在自定义配置中查询不到所述第一域名且所述上下文信息中包含第二域名时,在所述自定义配置中查询所述上下文信息中的第二域名对应的IP地址;When the local domain name server does not query the first domain name in the custom configuration, and the second domain name is included in the context information, querying, in the customized configuration, the second domain name in the context information IP address;
所述本地域名服务器将包含查询到的IP地址的DNS解析应答反馈至所述客户端。The local domain name server feeds back a DNS resolution response containing the queried IP address to the client.
第二方面、提供一种DNS解析方法,包括:The second aspect provides a DNS resolution method, including:
客户端向本地域名服务器发送DNS解析请求,其中所述DNS解析请求包含第一域名以及所述上下文信息,所述上下文信息用于传递第二域名,所述第二域名用于所述本地域名服务器在自定义配置中查询不到所述第一域名且所述上下文信息中包含所述第二域名时,在所述自定义配置中查询所述上下文信息中的第二域名对应的IP地址;The client sends a DNS resolution request to the local domain name server, where the DNS resolution request includes a first domain name and the context information, the context information is used to deliver a second domain name, and the second domain name is used by the local domain name server When the first domain name is not found in the custom configuration, and the second domain name is included in the context information, the IP address corresponding to the second domain name in the context information is queried in the customized configuration.
客户端接收所述本地域名服务器根据所述DNS解析请求反馈的包含查询到的IP地址的DNS解析应答。The client receives a DNS resolution response including the queried IP address fed back by the local domain name server according to the DNS resolution request.
第三方面,提供一种本地域名服务器,包括:In a third aspect, a local domain name server is provided, including:
接收单元,用于接收客户端发送的DNS解析请求,其中所述DNS解析请求包含第一域名以及所述上下文信息; a receiving unit, configured to receive a DNS resolution request sent by the client, where the DNS resolution request includes the first domain name and the context information;
处理单元,用于在所述本地域名服务器在自定义配置中查询不到所述第一域名且所述上下文信息中包含第二域名时,在所述自定义配置中查询所述上下文信息中的第二域名对应的IP地址;a processing unit, configured to query, in the customized configuration, the context information in the custom configuration, when the local domain name server does not query the first domain name in a custom configuration, and the context information includes a second domain name The IP address corresponding to the second domain name;
发送单元,用于将包含所述处理单元查询到的IP地址的DNS解析应答反馈至所述客户端。And a sending unit, configured to feed back a DNS resolution response that includes the IP address queried by the processing unit to the client.
第四方面、提供一种客户端,包括:The fourth aspect provides a client, including:
发送单元,用于向本地域名服务器发送DNS解析请求,其中所述DNS解析请求包含第一域名以及所述上下文信息,所述上下文信息用于传递第二域名,其中所述第二域名用于所述本地域名服务器在自定义配置中查询不到所述第一域名且所述上下文信息中包含所述第二域名时,在所述自定义配置中查询所述上下文信息中的第二域名对应的IP地址;a sending unit, configured to send a DNS resolution request to the local domain name server, where the DNS resolution request includes a first domain name and the context information, where the context information is used to deliver a second domain name, where the second domain name is used by the When the local domain name server does not query the first domain name in the custom configuration, and the second domain name is included in the context information, query the second domain name in the context information in the customized configuration. IP address;
接收单元,用于接收所述本地域名服务器根据所述DNS解析请求反馈的包含查询到的IP地址的DNS解析应答;a receiving unit, configured to receive a DNS resolution response that includes the queried IP address fed back by the local domain name server according to the DNS resolution request;
所述发送单元还用于依据所述接收单元接收的IP地址发送数据内容请求。The sending unit is further configured to send a data content request according to the IP address received by the receiving unit.
第五方面,提供一种本地域名服务器,包括:存储器、通信接口和处理器,所述存储器用于存储计算机执行代码,所述处理器用于执行所述计算机执行代码控制执行上述第一方面提供的DNS解析方法,所述通信接口用于所述本地域名服务器与外部设备的数据传输。In a fifth aspect, a local domain name server is provided, comprising: a memory, a communication interface, and a processor, the memory is configured to store computer execution code, and the processor is configured to execute the computer to perform code control to perform the foregoing first aspect The DNS resolution method is used for data transmission between the local domain name server and an external device.
第六方面,提供一种客户端,包括:存储接口、通信接口和处理接口,所述存储接口用于存储计算机执行代码,所述处理接口用于执行所述计算机执行代码控制执行上述上述第二方面提供DNS解析方法,所述通信接口用于所述客户端与外部设备的数据传输。A sixth aspect provides a client, including: a storage interface, a communication interface, and a processing interface, where the storage interface is configured to store computer execution code, and the processing interface is configured to execute the computer to perform code control to execute the foregoing second Aspects provide a DNS resolution method for data transmission between the client and an external device.
第七方面、提供一种网络系统,包括:网络服务器、本地代理服务器、上述任一本地域名服务器、以及上述任一客户端。A seventh aspect provides a network system, including: a network server, a local proxy server, any of the above local domain name servers, and any of the foregoing clients.
在上述方案中,客户端向本地域名服务器发送DNS解析请求后,本 地域名服务器在自定义配置中查询不到第一域名且上下文信息中包含第二域名时,在自定义配置中查询上下文信息中的第二域名对应的IP地址;这样,客户端依据查询到的IP地址发送数据内容请求以请求数据内容,其中上下文信息用于传递第二域名,因此该DNS解析请求可以携带多个域名,当仅涉及对一个域名解析时,可以将上下文信息配置为空,当需要对多个域名进行解析时可以在DNS解析请求中携带两个域名,并且在解析DNS解析请求时同时参考第一域名以及上下文信息在自定义配置中查询IP地址,在上下文信息包含第二域名时可以将第一域名解析至第二域名对应IP地址,而无需在本地域名服务器的自定义配置中手工添加域名,简化了现有技术中的DNS解析过程。In the above solution, after the client sends a DNS resolution request to the local domain name server, When the domain name server fails to query the first domain name in the custom configuration and the second domain name is included in the context information, the IP address corresponding to the second domain name in the context information is queried in the custom configuration; thus, the client is based on the query. The IP address sends a data content request to request the data content, wherein the context information is used to deliver the second domain name, so the DNS resolution request may carry multiple domain names. When only one domain name resolution is involved, the context information may be configured to be empty. When the domain name is parsed, the domain name may be carried in the DNS resolution request, and the IP address is queried in the custom configuration by referring to the first domain name and the context information when parsing the DNS resolution request, and the second domain name is included in the context information. The first domain name can be resolved to the IP address corresponding to the second domain name without manually adding the domain name in the custom configuration of the local domain name server, which simplifies the DNS resolution process in the prior art.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图1为现有技术提供的一种网络系统的架构图;1 is an architectural diagram of a network system provided by the prior art;
图2为本发明的实施例提供的一种网络系统的架构图;2 is a structural diagram of a network system according to an embodiment of the present invention;
图3为本发明实施例提供的一种DNS解析方法的流程图;FIG. 3 is a flowchart of a DNS resolution method according to an embodiment of the present invention;
图4为本发明的另一实施例提供的一种DNS解析方法的信令交互图;FIG. 4 is a signaling interaction diagram of a DNS resolution method according to another embodiment of the present invention; FIG.
图5为本发明的又一实施例提供的一种DNS解析方法的流程图;FIG. 5 is a flowchart of a DNS resolution method according to still another embodiment of the present invention;
图6为本发明的再一实施例提供的一种DNS解析方法的流程图;FIG. 6 is a flowchart of a DNS resolution method according to still another embodiment of the present invention;
图7为本发明的实施例提供的一种本地域名服务器的结构图;FIG. 7 is a structural diagram of a local domain name server according to an embodiment of the present invention;
图8为本发明实施例提供的一种客户端的结构图;FIG. 8 is a structural diagram of a client according to an embodiment of the present invention;
图9为本发明的另一实施例提供的一种客户端的结构图;FIG. 9 is a structural diagram of a client according to another embodiment of the present invention; FIG.
图10A为本发明的另一实施例提供的一种本地域名服务器的结构图;FIG. 10A is a structural diagram of a local domain name server according to another embodiment of the present invention; FIG.
图10B为本发明的又一实施例提供的一种本地域名服务器的结构图;FIG. 10B is a structural diagram of a local domain name server according to still another embodiment of the present invention; FIG.
图11A本发明的又一实施例提供的一种客户端的结构图; FIG. 11 is a structural diagram of a client according to another embodiment of the present invention; FIG.
图11B本发明的再一实施例提供的一种客户端的结构图。FIG. 11B is a structural diagram of a client according to still another embodiment of the present invention.
具体实施方式detailed description
本发明实施例描述的系统架构以及业务场景是为了更加清楚的说明本发明实施例的技术方案,并不构成对于本发明实施例提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本发明实施例提供的技术方案对于类似的技术问题,同样适用。The system architecture and the service scenario described in the embodiments of the present invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute a limitation of the technical solutions provided by the embodiments of the present invention. The technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.
需要说明的是,本发明实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本发明实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in the embodiments of the present invention, the words "exemplary" or "such as" are used to mean an example, an illustration, or a description. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the invention should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words "exemplary" or "such as" is intended to present the concepts in a particular manner.
为了便于清楚描述本发明实施例的技术方案,在本发明的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分,本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定。在本发明的描述中,除非另有说明,“多个”的含义是两个或两个以上。In order to facilitate the clear description of the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second" and the like are used to distinguish the same or similar items whose functions and functions are substantially the same, in the field. The skilled person will understand that the words "first", "second" and the like do not limit the number and order of execution. In the description of the present invention, "a plurality" means two or more unless otherwise stated.
需要说明的是,本发明实施例中,“的(英文:of)”,“相应的(英文:corresponding,relevant)”和“对应的(英文:corresponding)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。It should be noted that, in the embodiment of the present invention, "(English: of)", "corresponding (relevant)" and "corresponding" may sometimes be mixed. It should be noted that When the difference is not emphasized, the meaning to be expressed is the same.
本发明的实施例所涉及的技术术语包括以下:Technical terms to which the embodiments of the present invention relate include the following:
HTTP,中文:超文本传输协议,英文:HyperText Transfer Protocol。HTTP, Chinese: Hypertext Transfer Protocol, English: HyperText Transfer Protocol.
上下文,也叫书面语言环境,英文:context。Context, also known as written language environment, English: context.
Referer字段,中文:参考页字段,HTTP Referer是HTTP中的一个标准HTTP header(头),当浏览器向web服务器发送请求的时候,一般会带上Referer,告诉服务器我是从哪个页面链接过来的,服务器藉此可以获得一些信息用于处理,在本发明的实施例中通过Referer将域名使用的上下文信息发送给本地域名服务器,扩展了HTTP DNS解析请求,用于告知本地域名服务器某个域名求的来源域名。 Referer field, Chinese: reference page field, HTTP Referer is a standard HTTP header (header) in HTTP. When the browser sends a request to the web server, it usually brings a Referer to tell the server which page I linked from. The server can thereby obtain some information for processing. In the embodiment of the present invention, the context information used by the domain name is sent to the local domain name server through the Referer, and the HTTP DNS resolution request is extended to notify the local domain name server of a domain name request. Source domain name.
本发明的实施例提供的客户端可以为个人计算机((英文全称:personal computer,缩写:PC)、上网本、个人数字助理(英文:Personal Digital Assistant,简称:PDA)等,或者上述客户端可以为安装有可执行本发明实施例提供的方法的软件客户端或软件系统或软件应用的PC等,具体的硬件实现环境可以通用计算机形式,或者是ASIC的方式,也可以是FPGA,或者是一些可编程的扩展平台例如Tensilica的Xtensa平台等等。本发明的实施例提供的服务器包括本地域名服务器、本地代理服务器,网络服务器,本发明的实施例提供服务器用于响应服务请求提供计算服务。基本构成包括处理器、硬盘、内存、系统总线等,和通用的计算机架构类似。The client provided by the embodiment of the present invention may be a personal computer (English name: personal computer, abbreviation: PC), a netbook, a personal digital assistant (PDA: PDA), or the client may be A software client or a software system or a software application PC or the like can be installed, and the specific hardware implementation environment can be a general computer form, an ASIC method, an FPGA, or some The extended platform for programming is, for example, the Xtensa platform of Tensilica, etc. The server provided by the embodiment of the present invention includes a local domain name server, a local proxy server, and a network server, and an embodiment of the present invention provides a server for providing a computing service in response to a service request. It includes a processor, hard disk, memory, system bus, etc., similar to a general-purpose computer architecture.
本发明的基本原理为客户端向网络服务器请求数据内容时需要首先通过向本地域名服务器发送DNS解析请求,以便本地域名服务器将客户端请求的域名解析为IP地址,本发明的实施中的DNS解析请求中携带第一域名以及上下文信息,其中上下文信息用于传递第二域名,因此该DNS解析请求可以携带多个域名,当仅涉及对一个域名解析时,可以将上下文信息配置为空,当需要对多个域名进行解析时可以在DNS解析请求中携带两个域名,并且在解析DNS解析请求时同时参考第一域名以及上下文信息中传递的第二域名获取IP地址,例如在第二域名可以解析到自定义配置的IP地址时,将第一域名也解析至第二域名对应的IP地址,同时第一域名为非自定义配置时,第一域名将会存储到本地DNS服务器,作为后续解析域名的上下文信息,实现将多个域名解析至同一IP地址而无需在本地域名服务器的自定义配置中添加域名,简化了现有技术中的DNS解析过程。The basic principle of the present invention is that when a client requests data content from a network server, it first needs to send a DNS resolution request to the local domain name server, so that the local domain name server resolves the domain name requested by the client into an IP address, and the DNS resolution in the implementation of the present invention. The request carries the first domain name and the context information, where the context information is used to deliver the second domain name, so the DNS resolution request may carry multiple domain names. When only one domain name resolution is involved, the context information may be configured to be empty, when needed. When the domain name is parsed, the domain name may be carried in the DNS resolution request, and the IP address is obtained by referring to the first domain name and the second domain name passed in the context information when parsing the DNS resolution request, for example, the second domain name can be parsed. When the IP address is configured, the first domain name is also resolved to the IP address corresponding to the second domain name. When the first domain name is not customized, the first domain name is stored in the local DNS server. Context information to resolve multiple domain names to the same IP address without Adding a domain name to a custom configuration of a local domain name server simplifies the DNS resolution process in the prior art.
参照图2所示,本发明的实施例提供的网络系统架构包括:本地域名服务器21、客户端22、网络服务器23,对于某种场景还可以包括本地代理服务器24。其区别为,本地域名服务器解析的IP地址为网络服务器的地址时,客户端可以通过IP地址直接访问网络服务器并向其请求数据内容,本地域名服务器解析的IP地址为本地代理服务器的地址时,客户端可以通过IP地址向本地代理服务器请求数据内容,本地代理服务器代理向网络服务器请求数据内容并反馈至客户端。由于本发明的实施例不涉及客户端依据IP地址请求数据内容的改进,因此可以认为采用上述任 一方式进行数据内容的获取,在下述方案中仅以IP地址为本地代理服务器的地址为例进行说明。Referring to FIG. 2, the network system architecture provided by the embodiment of the present invention includes: a local domain name server 21, a client terminal 22, and a network server 23, and may also include a local proxy server 24 for a certain scenario. The difference is that when the IP address resolved by the local domain name server is the address of the network server, the client can directly access the network server through the IP address and request data content from the IP address. When the IP address resolved by the local domain name server is the address of the local proxy server, The client can request data content from the local proxy server through the IP address, and the local proxy server agent requests the data content from the web server and feeds back to the client. Since the embodiment of the present invention does not involve the improvement of the client requesting the data content according to the IP address, it can be considered that the above-mentioned In one method, the data content is acquired. In the following scheme, only the IP address is used as the address of the local proxy server as an example.
基于上述的网络系统,参照图3所示,本发明的实施例提供一种DNS解析方法,包括如下步骤:Based on the foregoing network system, as shown in FIG. 3, an embodiment of the present invention provides a DNS resolution method, including the following steps:
101、客户端向本地域名服务器发送DNS解析请求。101. The client sends a DNS resolution request to the local domain name server.
其中DNS解析请求包含第一域名以及上下文信息,上下文信息用于传递第二域名。其中,一种示例为:DNS解析请求为HTTP DNS解析请求,上下文信息为HTTP中的referer参照页字段。The DNS resolution request includes a first domain name and context information, and the context information is used to deliver the second domain name. An example of this is that the DNS resolution request is an HTTP DNS resolution request, and the context information is a referer reference page field in HTTP.
示例性的:Exemplary:
提供一种DNS解析请求的形式如下:The form of providing a DNS resolution request is as follows:
GET/dns?domain=www.example.com HTTP/1.1*在HTTP协议1.1版本下获取DNS域名www.example.com*GET/dns? Domain=www.example.com HTTP/1.1* Obtain DNS domain name www.example.com* under HTTP protocol version 1.1
Host:192.168.1.1*本地域名服务器的主机地址为192.168.1.1*Host: 192.168.1.1* The host name of the local domain name server is 192.168.1.1*
Referer:www.referer.com*上下文信息携带域名www.referer.com*Referer: www.referer.com* Contextual information carries the domain name www.referer.com*
提供一种DNS解析应答的形式如下:Provide a form of DNS resolution response as follows:
HTTP/1.1 200 OK*协议版本信息*HTTP/1.1 200 OK* protocol version information*
Server:192.168.1.1*本地域名服务器的主机地址为192.168.1.1*Server: 192.168.1.1* The host address of the local domain name server is 192.168.1.1*
Date:Fri,26 Aug 2016 09:25:50 GMT*时间信息*Date:Fri,26 Aug 2016 09:25:50 GMT*Time Information*
Content-Type:text/json*上下文信息类型*Content-Type: text/json* context information type*
Content-Length:25*上下文长度*Content-Length: 25* Context Length*
{{
"www.example.com":"2.2.2.2""www.example.com":"2.2.2.2"
}*域名www.example.com对应的代理服务器的IP地址2.2.2.2*}* The IP address of the proxy server corresponding to the domain name www.example.com 2.2.2.2*
102、本地域名服务器接收客户端发送的DNS域名系统解析请求。102. The local domain name server receives the DNS domain name system parsing request sent by the client.
103、本地域名服务器在自定义配置中查询不到第一域名且上下文信息中包含第二域名时,在自定义配置中查询上下文信息中的第二域名对应的IP地址。 103. The local domain name server queries the IP address corresponding to the second domain name in the context information in the custom configuration when the first domain name is not found in the custom configuration and the second domain name is included in the context information.
104、本地域名服务器将包含查询到的IP地址的DNS解析应答反馈至客户端。104. The local domain name server feeds back the DNS resolution response including the queried IP address to the client.
105、客户端接收本地域名服务器根据DNS解析请求反馈的包含查询到的IP地址的DNS解析应答。105. The client receives a DNS resolution response that includes the queried IP address fed back by the local domain name server according to the DNS resolution request.
最后,客户端可以依据查询到的IP地址发送数据内容请求。Finally, the client can send a data content request based on the queried IP address.
在上述方案中,客户端向本地域名服务器发送DNS解析请求后,本地域名服务器在自定义配置中查询不到第一域名且上下文信息中包含第二域名时,在自定义配置中查询上下文信息中的第二域名对应的IP地址;这样,客户端依据查询到的IP地址发送数据内容请求以请求数据内容,其中上下文信息用于传递第二域名,因此该DNS解析请求可以携带多个域名,当仅涉及对一个域名解析时,可以将上下文信息配置为空,当需要对多个域名进行解析时可以在DNS解析请求中携带两个域名,并且在解析DNS解析请求时同时参考第一域名以及上下文信息在自定义配置中查询IP地址,在上下文信息包含第二域名时可以将第一域名解析至第二域名对应IP地址,而无需在本地域名服务器的自定义配置中手工添加域名,简化了现有技术中的DNS解析过程。In the above solution, after the client sends a DNS resolution request to the local domain name server, the local domain name server does not query the first domain name in the custom configuration and the second domain name is included in the context information, and the context information is queried in the custom configuration. The IP address corresponding to the second domain name; in this way, the client sends a data content request according to the queried IP address to request the data content, wherein the context information is used to deliver the second domain name, so the DNS resolution request may carry multiple domain names, when When only one domain name is parsed, the context information can be configured to be empty. When multiple domain names need to be parsed, two domain names can be carried in the DNS resolution request, and the first domain name and the context are simultaneously referred to when parsing the DNS resolution request. The information is queried in the custom configuration. When the context information includes the second domain name, the first domain name can be resolved to the IP address corresponding to the second domain name without manually adding the domain name in the custom configuration of the local domain name server. There is a DNS resolution process in the technology.
具体,参照图4所示的信令交互图,将本发明的实施例应用于HTTP协议下时,上下文信息采用HTTP中的referer字段,以针对一个包含多个域名的网页内容数据的请求为例,示例性的以www.example.com为网页的主域名,该主域名用于父内容的请求,以www.static.com为网页的一个子内容的域名,其中www.example.com包含在本地域名服务器的自定义配置中,www.static.com不包含在本地域名服务器的自定义配置中。则本发明的实施例提供的DNS解析方法,针对一个域名的解析过程如下,其中该域名可以为网页包含的主域名www.example.com(其中图4中仅仅示出了各个步骤的关键字并未示出完整的步骤,具体步骤参见实施例的详细说明):Specifically, referring to the signaling interaction diagram shown in FIG. 4, when the embodiment of the present invention is applied to the HTTP protocol, the context information uses a referer field in HTTP to take a request for a webpage content data including multiple domain names as an example. For example, www.example.com is the primary domain name of the webpage, the primary domain name is used for the request of the parent content, and www.static.com is the domain name of a sub-content of the webpage, where www.example.com is included locally. In the custom configuration of the domain name server, www.static.com is not included in the custom configuration of the local domain name server. The DNS resolution method provided by the embodiment of the present invention is as follows for a domain name resolution process, where the domain name may be the primary domain name www.example.com included in the webpage (where only the keywords of each step are shown in FIG. 4 and The complete steps are not shown, the specific steps are described in detail in the examples):
201、客户端向本地向本地域名服务器发送DNS解析请求。201. The client sends a DNS resolution request to the local domain name server locally.
其中,DNS解析请求包含域名www.example.com以及上下文信息,其中上下文信息为空。The DNS resolution request includes a domain name www.example.com and context information, where the context information is empty.
202、本地域名服务器接收DNS解析请求。 202. The local domain name server receives the DNS resolution request.
203、本地域名服务器在自定义配置中查询www.example.com对应的IP地址2.2.2.2。203. The local domain name server queries the IP address 2.2.2.2 corresponding to www.example.com in the custom configuration.
该自定义配置可以为系统配置文件,如包含域名与IP地址的映射关系的配置列表。The custom configuration can be a system configuration file, such as a configuration list containing mappings between domain names and IP addresses.
204、本地域名服务器将包含IP地址2.2.2.2的DNS解析应答反馈至客户端。204. The local domain name server feeds back the DNS resolution response including the IP address 2.2.2.2 to the client.
205、客户端向IP地址为2.2.2.2的本地代理服务器发送HTTP数据内容请求。205. The client sends an HTTP data content request to a local proxy server whose IP address is 2.2.2.2.
206、本地代理服务器向HTTP数据内容源网络服务器发送HTTP请求。206. The local proxy server sends an HTTP request to the HTTP data content source web server.
207、源网络服务器把请求的数据内容发送至本地代理服务器。207. The source network server sends the requested data content to the local proxy server.
208、本地代理服务器把数据内容发送至客户端。208. The local proxy server sends the data content to the client.
之后客户端依据收到的数据内容执行下一步动作,例如针对数据内容中的子内容发起请求。The client then performs the next action based on the received data content, such as a request for a sub-content in the data content.
在下述个步骤中主要提供了针对www.example.com的关联域名www.static.com的解析过程,当客户端在上次请求的数据内容中包含子内容时,子内容和父内容分别位于www.static.com和www.example.com两个不同的域名下,则针对多个域名的解析过程参照图5所示如下:In the following steps, the parsing process of the associated domain name www.static.com for www.example.com is mainly provided. When the client includes the sub-content in the data content of the last request, the sub-content and the parent content are respectively located at www. Under the two different domain names of .static.com and www.example.com, the resolution process for multiple domain names is as follows:
301、客户端接收数据内容,数据内容包括子内容和父内容。301. A client receives data content, where the data content includes sub-content and parent content.
302、客户端在DNS解析请求中将父内容的域名www.example.com设置于上下文信息中,将子内容的域名www.static.com设置为第一域名。302. The client sets the domain name www.example.com of the parent content in the context information in the DNS resolution request, and sets the domain name www.static.com of the child content to the first domain name.
303、客户端向本地域名服务器发送DNS解析请求。303. The client sends a DNS resolution request to the local domain name server.
DNS解析请求中包含域名www.static.com,上下文信息中包含www.example.com。The DNS resolution request contains the domain name www.static.com, and the context information includes www.example.com.
304、本地域名服务器接收客户端发送的DNS解析请求。304. The local domain name server receives the DNS resolution request sent by the client.
305、本地域名服务器在自定义配置中查询www.static.com。305. The local domain name server queries www.static.com in a custom configuration.
306、若本地域名服务器在自定义配置中查询不到www.static.com,则本地域名服务器在自定义配置中查询上下文信息中的 www.example.com对应的IP地址2.2.2.2。306. If the local domain name server cannot query www.static.com in the custom configuration, the local domain name server queries the context information in the custom configuration. The IP address corresponding to www.example.com is 2.2.2.2.
307、本地域名服务器将www.static.com保存至自定义配置,并将www.static.com映射至www.example.com对应的IP地址2.2.2.2。307. The local domain name server saves www.static.com to a custom configuration and maps www.static.com to the IP address 2.2.2.2 corresponding to www.example.com.
在步骤307之后客户端获取IP地址2.2.2.2后参照上述步骤205-208客户端可以按照IP地址2.2.2.2获取内容数据。此外在步骤307之后客户端以及本地域名服务器可以继续重复上述步骤301-307通过客户端向本地域名服务器发送DNS解析请求的方式获取数据内容,并且在后续DNS解析请求中上下文信息中域名为www.static.com时依然解析为IP地址2.2.2.2.。此外通过步骤306强制将www.static.com映射至www.example.com对应的IP地址2.2.2.2,自动更新了自定义配置,即第一域名会在本地域名服务器进行存储,作为后续DNS请求的上下文信息,保证了后续DNS解析请求中第一域名或上下文信息中域名为www.static.com时依然解析为IP地址2.2.2.2。After the client obtains the IP address 2.2.2.2 after step 307, referring to the above steps 205-208, the client can obtain the content data according to the IP address 2.2.2.2. In addition, after step 307, the client and the local domain name server may continue to repeat the above steps 301-307 to obtain the data content by sending the DNS resolution request to the local domain name server by the client, and the domain name in the context information of the subsequent DNS resolution request is www. Static.com still resolves to IP address 2.2.2.2. In addition, by step 306, the mapping of www.static.com to the IP address 2.2.2.2 corresponding to www.example.com is automatically updated, and the first domain name is stored in the local domain name server as a subsequent DNS request. The context information ensures that the first domain name or the context information in the subsequent DNS resolution request is still resolved to the IP address 2.2.2.2 when the domain name is www.static.com.
以上方案为针对自定义配置中包含DNS解析请求中的第一域名或者第二域名的情况,当自定义配置中不包含上述两者域名或其中任一时,参照图6所示采用如下步骤:The above solution is for the case where the first domain name or the second domain name in the DNS resolution request is included in the custom configuration. When the custom configuration does not include the above two domain names or any of them, the following steps are taken as shown in FIG. 6:
401、客户端向本地域名服务器发送DNS解析请求。401. The client sends a DNS resolution request to the local domain name server.
其中DNS解析请求包含域名www.test.com,以及上下文信息,上下文信息为空。The DNS resolution request includes the domain name www.test.com, and the context information, and the context information is empty.
402、本地域名服务器接收客户端发送的DNS解析请求。402. The local domain name server receives the DNS resolution request sent by the client.
403、本地域名服务器在自定义配置中查询www.test.com。403. The local domain name server queries www.test.com in a custom configuration.
404、若本地域名服务器在自定义配置中查询不到www.test.com,并且本地域名服务器确定所述上下文信息为空时,向上级域名服务器发送DNS域名请求,以递归解析DNS域名请求。404. If the local domain name server does not query www.test.com in the custom configuration, and the local domain name server determines that the context information is empty, the upper domain name server sends a DNS domain name request to recursively resolve the DNS domain name request.
405、本地域名服务器接收上级域名服务器反馈的IP地址,并将该IP地址携带在DNS解析应答中反馈至客户端。405. The local domain name server receives the IP address fed back by the upper-level domain name server, and carries the IP address in the DNS resolution response and feeds back to the client.
在步骤405之后客户端获取IP地址后参照上述步骤205-208客户端可以按照该IP地址获取内容数据。此外还可以将www.test.com映射至该IP地址,以更新自定义配置。 After the client obtains the IP address after step 405, the client can obtain the content data according to the IP address by referring to the above steps 205-208. You can also map www.test.com to this IP address to update your custom configuration.
上述主要从各个网元之间交互的角度对本发明实施例提供的方案进行了介绍。可以理解的是,各个网元,例如服务器、客户端等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。The solution provided by the embodiment of the present invention is mainly introduced from the perspective of interaction between the network elements. It can be understood that each network element, such as a server, a client, etc., in order to implement the above functions, includes hardware structures and/or software modules corresponding to each function. Those skilled in the art will readily appreciate that the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
本发明实施例可以根据上述方法示例对本地域名服务器、客户端等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present invention may divide a function module of a local domain name server, a client, and the like according to the foregoing method example. For example, each function module may be divided according to each function, or two or more functions may be integrated into one processing module. in. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
在采用对应各个功能划分各个功能模块的情况下,图7示出了上述实施例中所涉及的本地域名服务器的一种可能的结构示意图,本地域名服务器包括:接收单元71、处理单元72和发送单元73。接收单元71用于支持本地域名服务器执行图3中的过程102,图4中的过程202,图5中的过程304,图6中的过程402;处理单元72用于支持本地域名服务器执行图3中的过程103,图4中的过程203,图5中的过程305、306、307,图6中的过程403;发送单元73用于支持本地域名服务器执行图3中的过程104,图4中的过程204,图6中的过程404。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。FIG. 7 is a schematic diagram showing a possible structure of a local domain name server involved in the foregoing embodiment, where the local domain name server includes: a receiving unit 71, a processing unit 72, and a sending. Unit 73. The receiving unit 71 is configured to support the local domain name server to perform the process 102 in FIG. 3, the process 202 in FIG. 4, the process 304 in FIG. 5, and the process 402 in FIG. 6. The processing unit 72 is configured to support the local domain name server to execute FIG. The process 103 in the process, the process 203 in FIG. 4, the process 305, 306, 307 in FIG. 5, the process 403 in FIG. 6; the sending unit 73 is configured to support the local domain name server to execute the process 104 in FIG. 3, in FIG. Process 204, process 404 in FIG. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
在采用对应各个功能划分各个功能模块的情况下,图8示出了上述实施例中所涉及的客户端的一种可能的结构示意图,客户端包括:发送单元81、接收单元82。发送单元81用于支持客户端执行图3中的过程101、106,图4中的过程201、205,图5中的过程303,图6中的过程401;接收单元82用于支持客户端执行图3中的过程105,图4中的过程208,图5中的过程301,图6中的过程405。或者如图9所示,客户端 还包括配置单元83时,配置单元83用于支持客户端执行图3中的步骤302。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。FIG. 8 is a schematic diagram showing a possible structure of the client involved in the foregoing embodiment, where the client includes: a sending unit 81 and a receiving unit 82. The sending unit 81 is configured to support the client to perform the processes 101 and 106 in FIG. 3, the processes 201 and 205 in FIG. 4, the process 303 in FIG. 5, and the process 401 in FIG. 6. The receiving unit 82 is configured to support the client to execute. Process 105 in FIG. 3, process 208 in FIG. 4, process 301 in FIG. 5, process 405 in FIG. Or as shown in Figure 9, the client When the configuration unit 83 is further included, the configuration unit 83 is configured to support the client to perform step 302 in FIG. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
在采用集成的单元的情况下,图10A示出了上述实施例中所涉及的本地域名服务器的一种可能的结构示意图。本地域名服务器包括:通信模块101和处理模块102。处理模块102用于对本地域名服务器的动作进行控制管理,例如,处理模块102用于支持本地域名服务器执行图3中的过程103,图4中的过程203,图5中的过程305、306、307,图6中的过程403,和/或用于本文所描述的技术的其它过程。通信模块101用于支持本地域名服务器与其他外部设备的数据传输,例如与图2、10A中示出的功能模块或网络实体之间的通信。本地域名服务器还可以包括存储模块103,用于存储本地域名服务器的程序代码和数据。In the case of employing an integrated unit, FIG. 10A shows a possible structural diagram of the local domain name server involved in the above embodiment. The local domain name server includes a communication module 101 and a processing module 102. The processing module 102 is configured to control and manage the actions of the local domain name server. For example, the processing module 102 is configured to support the local domain name server to perform the process 103 in FIG. 3, the process 203 in FIG. 4, and the processes 305, 306 in FIG. 307, process 403 in FIG. 6, and/or other processes for the techniques described herein. The communication module 101 is for supporting data transmission between a local domain name server and other external devices, such as communication with the functional modules or network entities shown in Figures 2, 10A. The local domain name server may further include a storage module 103 for storing program codes and data of the local domain name server.
其中,处理模块102可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块101可以是收发器、收发电路或通信接口等。存储模块103可以是存储器。The processing module 102 can be a processor or a controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (Application-Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like. The communication module 101 can be a transceiver, a transceiver circuit, a communication interface, or the like. The storage module 103 can be a memory.
当处理模块102为处理器,通信模块101为通信接口,存储模块103为存储器时,本发明实施例所涉及的本地域名服务器可以为图10B所示的本地域名服务器。When the processing module 102 is a processor, the communication module 101 is a communication interface, and the storage module 103 is a memory, the local domain name server involved in the embodiment of the present invention may be the local domain name server shown in FIG. 10B.
参阅图10B所示,该本地域名服务器包括:处理器1011、通信接口1012、存储器1013以及总线1014。其中,通信接口1012、处理器1011以及存储器1013通过总线1014相互连接;总线1014可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图10B中仅 用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。Referring to FIG. 10B, the local domain name server includes a processor 1011, a communication interface 1012, a memory 1013, and a bus 1014. The communication interface 1012, the processor 1011, and the memory 1013 are connected to each other through a bus 1014. The bus 1014 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Wait. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only Figure 10B It is indicated by a thick line, but does not mean that there is only one bus or one type of bus.
在采用集成的单元的情况下,图11A示出了上述实施例中所涉及的客户端的一种可能的结构示意图。客户端包括:通信模块111和处理模块112。处理模块111用于对客户端的动作进行控制管理,例如,处理模块11用于支持控制通信模块111执行图3中的过程101、106,图4中的过程201、205,图5中的过程303,图6中的过程401;图3中的过程105,图4中的过程208,图5中的过程301,图6中的过程405。或者处理模块112还用于支持客户端执行图3中的步骤302。和/或用于本文所描述的技术的其它过程。通信模块101用于支持本地域名服务器与其他外部设备的数据传输,例如与图2、11A中示出的功能模块或网络实体之间的通信。客户端还可以包括存储模块113,用于存储本地域名服务器的程序代码和数据。In the case of employing an integrated unit, FIG. 11A shows a possible structural diagram of the client involved in the above embodiment. The client includes a communication module 111 and a processing module 112. The processing module 111 is configured to perform control management on the actions of the client. For example, the processing module 11 is configured to support the control communication module 111 to execute the processes 101 and 106 in FIG. 3, the processes 201 and 205 in FIG. 4, and the process 303 in FIG. Process 401 in FIG. 6; process 105 in FIG. 3, process 208 in FIG. 4, process 301 in FIG. 5, and process 405 in FIG. Or the processing module 112 is further configured to support the client to perform step 302 in FIG. And/or other processes for the techniques described herein. The communication module 101 is for supporting data transmission between a local domain name server and other external devices, such as communication with the functional modules or network entities shown in Figures 2, 11A. The client may also include a storage module 113 for storing program code and data of the local domain name server.
其中,处理模块112可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块111可以是收发器、收发电路或通信接口等。存储模块113可以是存储器。The processing module 112 may be a processor or a controller, for example, may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application specific integrated circuit (Application-Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like. The communication module 111 can be a transceiver, a transceiver circuit, a communication interface, or the like. The storage module 113 can be a memory.
当处理模块112为处理器,通信模块111为通信接口,存储模块113为存储器时,本发明实施例所涉及的客户端可以为图11B所示的客户端。When the processing module 112 is a processor, the communication module 111 is a communication interface, and the storage module 113 is a memory, the client involved in the embodiment of the present invention may be the client shown in FIG. 11B.
参阅图11B所示,该客户端包括:处理器1111、通信接口1112、存储器1113以及总线1114。其中,通信接口1112、处理器1111以及存储器1113通过总线1114相互连接;总线1114可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图11B中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。 Referring to FIG. 11B, the client includes a processor 1111, a communication interface 1112, a memory 1113, and a bus 1114. The communication interface 1112, the processor 1111, and the memory 1113 are mutually connected by a bus 1114; the bus 1114 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Wait. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 11B, but it does not mean that there is only one bus or one type of bus.
结合本发明公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于核心网接口设备中。当然,处理器和存储介质也可以作为分立组件存在于核心网接口设备中。The steps of a method or algorithm described in connection with the present disclosure may be implemented in a hardware, or may be implemented by a processor executing software instructions. The software instructions may be composed of corresponding software modules, which may be stored in a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory ( Erasable Programmable ROM (EPROM), electrically erasable programmable read only memory (EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor to enable the processor to read information from, and write information to, the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a core network interface device. Of course, the processor and the storage medium may also exist as discrete components in the core network interface device.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art will appreciate that in one or more examples described above, the functions described herein can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium. Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage medium may be any available media that can be accessed by a general purpose or special purpose computer.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。 The specific embodiments of the present invention have been described in detail with reference to the preferred embodiments of the present invention. The scope of the protection, any modifications, equivalent substitutions, improvements, etc., which are made on the basis of the technical solutions of the present invention, are included in the scope of the present invention.

Claims (17)

  1. 一种DNS解析方法,其特征在于,包括:A DNS parsing method, comprising:
    本地域名服务器接收客户端发送的DNS域名系统解析请求,其中所述DNS解析请求包含第一域名以及上下文信息;The local domain name server receives the DNS domain name system resolution request sent by the client, where the DNS resolution request includes the first domain name and context information;
    在所述本地域名服务器在自定义配置中查询不到所述第一域名且所述上下文信息中包含第二域名时,在所述自定义配置中查询所述上下文信息中的第二域名对应的IP地址;When the local domain name server does not query the first domain name in the custom configuration, and the second domain name is included in the context information, querying, in the customized configuration, the second domain name in the context information IP address;
    所述本地域名服务器将包含查询到的IP地址的DNS解析应答反馈至所述客户端。The local domain name server feeds back a DNS resolution response containing the queried IP address to the client.
  2. 根据权利要求1所述的方法,其特征在于,还包括,将所述第一域名保存至所述自定义配置,并将所述第一域名映射至所述第二域名对应的IP地址。The method according to claim 1, further comprising: saving the first domain name to the custom configuration, and mapping the first domain name to an IP address corresponding to the second domain name.
  3. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:
    若所述本地域名服务器在自定义配置中查询不到所述第一域名,并且所述本地域名服务器确定所述上下文信息为空时,向上级域名服务器发送所述DNS域名请求,以递归解析所述DNS域名请求;If the local domain name server does not query the first domain name in the custom configuration, and the local domain name server determines that the context information is empty, the upper domain name server sends the DNS domain name request to recursively analyze the Said DNS domain name request;
    所述本地域名服务器接收所述上级域名服务器反馈的IP地址。The local domain name server receives the IP address fed back by the upper-level domain name server.
  4. 根据权利要求1所述的方法,其特征在于,还包括:所述上下文信息为空,所述本地域名服务器在自定义配置中查询所述第一域名对应的IP地址。The method according to claim 1, further comprising: the context information is empty, and the local domain name server queries the IP address corresponding to the first domain name in a custom configuration.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述DNS解析请求为HTTP DNS解析请求,所述上下文信息为HTTP中的referer参照页字段。The method according to any one of claims 1 to 4, wherein the DNS resolution request is an HTTP DNS resolution request, and the context information is a referer reference page field in HTTP.
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述IP地址 为本地代理服务器的地址。Method according to any of claims 1-4, characterized in that said IP address The address of the local proxy server.
  7. 一种DNS解析方法,其特征在于,包括:A DNS parsing method, comprising:
    客户端向本地域名服务器发送DNS解析请求,其中所述DNS解析请求包含第一域名以及所述上下文信息,所述上下文信息用于传递第二域名,所述第二域名用于所述本地域名服务器在自定义配置中查询不到所述第一域名且所述上下文信息中包含所述第二域名时,在所述自定义配置中查询所述上下文信息中的第二域名对应的IP地址;The client sends a DNS resolution request to the local domain name server, where the DNS resolution request includes a first domain name and the context information, the context information is used to deliver a second domain name, and the second domain name is used by the local domain name server When the first domain name is not found in the custom configuration, and the second domain name is included in the context information, the IP address corresponding to the second domain name in the context information is queried in the customized configuration.
    客户端接收所述本地域名服务器根据所述DNS解析请求反馈的包含查询到的IP地址的DNS解析应答。The client receives a DNS resolution response including the queried IP address fed back by the local domain name server according to the DNS resolution request.
  8. 根据权利要求7所述的方法,其特征在于,所述客户端向本地域名服务器发送DNS解析请求前,包括:The method according to claim 7, wherein before the client sends a DNS resolution request to the local domain name server, the method includes:
    所述客户端接收数据内容,所述数据内容包括子内容和父内容;The client receives data content, the data content including sub-content and parent content;
    所述客户端在所述DNS解析请求中将所述父内容的域名作为第二域名设置于所述上下文信息中,将所述子内容的域名设置为所述第一域名。The client sets the domain name of the parent content as the second domain name in the context information in the DNS resolution request, and sets the domain name of the child content to the first domain name.
  9. 一种本地域名服务器,其特征在于,包括:A local domain name server, comprising:
    接收单元,用于接收客户端发送的DNS解析请求,其中所述DNS解析请求包含第一域名以及所述上下文信息;a receiving unit, configured to receive a DNS resolution request sent by the client, where the DNS resolution request includes the first domain name and the context information;
    处理单元,用于在所述本地域名服务器在自定义配置中查询不到所述第一域名且所述上下文信息中包含第二域名时,在所述自定义配置中查询所述上下文信息中的第二域名对应的IP地址;a processing unit, configured to query, in the customized configuration, the context information in the custom configuration, when the local domain name server does not query the first domain name in a custom configuration, and the context information includes a second domain name The IP address corresponding to the second domain name;
    发送单元,用于将包含所述处理单元查询到的IP地址的DNS解析应答反馈至所述客户端。And a sending unit, configured to feed back a DNS resolution response that includes the IP address queried by the processing unit to the client.
  10. 根据权利要求9所述的本地域名服务器,其特征在于,所述处理单元还用于将所述第一域名保存至所述自定义配置,并将所述第一域名映射至所述第二域名对应的IP地址。 The local domain name server according to claim 9, wherein the processing unit is further configured to save the first domain name to the custom configuration, and map the first domain name to the second domain name. The corresponding IP address.
  11. 根据权利要求9所述的本地域名服务器,其特征在于,所述处理器具体用于在自定义配置中查询所述第一域名;若在自定义配置中查询不到所述第一域名,并且确定所述上下文信息为空时通过所述发送单元向上级域名服务器发送所述DNS域名请求,以递归解析所述DNS域名请求;通过所述接收单元接收所述上级域名服务器反馈的IP地址。The local domain name server according to claim 9, wherein the processor is specifically configured to query the first domain name in a custom configuration; if the first domain name is not queried in a custom configuration, and When the context information is determined to be empty, the sending unit sends the DNS domain name request to the upper-level domain name server to recursively resolve the DNS domain name request; and the receiving unit receives the IP address fed back by the upper-level domain name server.
  12. 根据权利要求9所述的本地域名服务器,其特征在于,所述上下文信息为空,所述处理单元具体用于在自定义配置中查询所述第一域名对应的IP地址。The local domain name server according to claim 9, wherein the context information is empty, and the processing unit is configured to query an IP address corresponding to the first domain name in a custom configuration.
  13. 一种客户端,其特征在于,包括:A client, comprising:
    发送单元,用于向本地域名服务器发送DNS解析请求,其中所述DNS解析请求包含第一域名以及所述上下文信息,所述上下文信息用于传递第二域名,其中所述第二域名用于所述本地域名服务器在自定义配置中查询不到所述第一域名且所述上下文信息中包含所述第二域名时,在所述自定义配置中查询所述上下文信息中的第二域名对应的IP地址;a sending unit, configured to send a DNS resolution request to the local domain name server, where the DNS resolution request includes a first domain name and the context information, where the context information is used to deliver a second domain name, where the second domain name is used by the When the local domain name server does not query the first domain name in the custom configuration, and the second domain name is included in the context information, query the second domain name in the context information in the customized configuration. IP address;
    接收单元,用于接收所述本地域名服务器根据所述DNS解析请求反馈的包含查询到的IP地址的DNS解析应答。The receiving unit is configured to receive a DNS resolution response that includes the queried IP address that is fed back by the local domain name server according to the DNS resolution request.
  14. 根据权利要求13所述的客户端,其特征在于,A client according to claim 13 wherein:
    所述接收单元还用于接收数据内容,所述数据内容包括子内容和父内容;The receiving unit is further configured to receive data content, where the data content includes sub-content and parent content;
    所述客户端还包括配置单元,用于在所述DNS解析请求中将所述父内容的域名作为第二域名设置于所述上下文信息中,将所述子内容的域名设置为所述第一域名。The client further includes a configuration unit, configured to set, in the DNS resolution request, a domain name of the parent content as the second domain name in the context information, and set a domain name of the child content to the first domain domain name.
  15. 一种本地域名服务器,其特征在于,包括:存储器、通信接口和处理器,所述存储器用于存储计算机执行代码,所述处理器用于执行所述计算机执行代码控制执行权利要求1-6任一项所述DNS解析方法,所述通信接口用于所述本地域名服务器与外部设备的数据传输。 A local domain name server, comprising: a memory, a communication interface, and a processor, wherein the memory is used to store computer execution code, and the processor is configured to execute the computer to execute code control to perform any of claims 1-6 The DNS resolution method, wherein the communication interface is used for data transmission between the local domain name server and an external device.
  16. 一种客户端,其特征在于,包括:存储器、通信接口和处理器,所述存储器用于存储计算机执行代码,所述处理器用于执行所述计算机执行代码控制执行权利要求7或9任一项所述DNS解析方法,所述通信接口用于所述客户端与外部设备的数据传输。A client, comprising: a memory for communicating computer execution code, and a processor for executing the computer to perform code control to perform any one of claims 7 or 9. The DNS resolution method is used for data transmission between the client and an external device.
  17. 一种网络系统,其特征在于,所述网络系统包括:如权利要求9-12任一项所述的本地域名服务器、以及权利要求13或14所述的客户端;或者,所述网络系统包括:如权利要求15所述的本地域名服务器、以及权利要求16所述的客户端。 A network system, comprising: the local domain name server according to any one of claims 9-12, and the client according to claim 13 or 14; or the network system comprises The local domain name server of claim 15 and the client of claim 16.
PCT/CN2016/104389 2016-11-02 2016-11-02 Method and device for dns resolution and network system WO2018081963A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680006918.4A CN107223329B (en) 2016-11-02 2016-11-02 A kind of dns resolution method, apparatus and network system
PCT/CN2016/104389 WO2018081963A1 (en) 2016-11-02 2016-11-02 Method and device for dns resolution and network system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/104389 WO2018081963A1 (en) 2016-11-02 2016-11-02 Method and device for dns resolution and network system

Publications (1)

Publication Number Publication Date
WO2018081963A1 true WO2018081963A1 (en) 2018-05-11

Family

ID=59927629

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/104389 WO2018081963A1 (en) 2016-11-02 2016-11-02 Method and device for dns resolution and network system

Country Status (2)

Country Link
CN (1) CN107223329B (en)
WO (1) WO2018081963A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750290A (en) * 2019-10-28 2020-02-04 杭州安恒信息技术股份有限公司 Software version upgrading method and device based on DNS query
CN111935511A (en) * 2020-09-22 2020-11-13 上海七牛信息技术有限公司 Dynamic video stream access system and method based on http-dns
CN113225408A (en) * 2021-05-08 2021-08-06 中国工商银行股份有限公司 Domain name processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431539A (en) * 2008-12-11 2009-05-13 华为技术有限公司 Domain name resolution method, system and apparatus
WO2012010084A1 (en) * 2010-07-22 2012-01-26 中国移动通信集团公司 Domain name resolution method and device
CN102611763A (en) * 2011-01-25 2012-07-25 中国移动通信集团公司 DNS (Domain Name Server) inquiring method and equipment
WO2015039475A1 (en) * 2013-09-18 2015-03-26 中兴通讯股份有限公司 Method, server, and system for domain name resolution
CN104683501A (en) * 2015-03-30 2015-06-03 乐视致新电子科技(天津)有限公司 Method and device for domain name resolution

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876978B (en) * 2009-04-30 2012-12-26 刘长龙 Website navigation system and method
CN102739603B (en) * 2011-03-31 2015-10-21 国际商业机器公司 The method and apparatus of single-sign-on
CN102801697B (en) * 2011-12-20 2015-01-07 北京安天电子设备有限公司 Malicious code detection method and system based on plurality of URLs (Uniform Resource Locator)
CN104243627A (en) * 2014-08-29 2014-12-24 华为技术有限公司 Domain name resolution method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431539A (en) * 2008-12-11 2009-05-13 华为技术有限公司 Domain name resolution method, system and apparatus
WO2012010084A1 (en) * 2010-07-22 2012-01-26 中国移动通信集团公司 Domain name resolution method and device
CN102611763A (en) * 2011-01-25 2012-07-25 中国移动通信集团公司 DNS (Domain Name Server) inquiring method and equipment
WO2015039475A1 (en) * 2013-09-18 2015-03-26 中兴通讯股份有限公司 Method, server, and system for domain name resolution
CN104683501A (en) * 2015-03-30 2015-06-03 乐视致新电子科技(天津)有限公司 Method and device for domain name resolution

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750290A (en) * 2019-10-28 2020-02-04 杭州安恒信息技术股份有限公司 Software version upgrading method and device based on DNS query
CN110750290B (en) * 2019-10-28 2023-08-15 杭州安恒信息技术股份有限公司 Software version upgrading method and device based on DNS query
CN111935511A (en) * 2020-09-22 2020-11-13 上海七牛信息技术有限公司 Dynamic video stream access system and method based on http-dns
CN111935511B (en) * 2020-09-22 2021-02-26 上海七牛信息技术有限公司 Dynamic video stream access system and method based on http-dns
CN113225408A (en) * 2021-05-08 2021-08-06 中国工商银行股份有限公司 Domain name processing method and device
CN113225408B (en) * 2021-05-08 2023-04-07 中国工商银行股份有限公司 Domain name processing method and device

Also Published As

Publication number Publication date
CN107223329A (en) 2017-09-29
CN107223329B (en) 2018-10-12

Similar Documents

Publication Publication Date Title
JP6410280B2 (en) Website access method, apparatus, and website system
CN109683998B (en) Internationalization realization method, device and system
US9344513B2 (en) In-server redirection of HTTP requests
WO2017114206A1 (en) Method and device for processing short link, and short link server
WO2013143403A1 (en) Method and system for accessing website
WO2016184349A1 (en) Domain name parsing method, device and system
US20050198206A1 (en) Method and apparatus for dynamically selecting functionally equivalent Web services through a single autonomic proxy
US20130073745A1 (en) Context-Specific Unicode Characters In Shortened URLs
US8332467B2 (en) Lightweight RRD extension framework
US8484373B2 (en) System and method for redirecting a request for a non-canonical web page
US9473592B2 (en) Methods for optimizing a web content proxy server and devices thereof
JP2019530089A (en) Method and apparatus for realizing communication between web page and native application, and electronic apparatus
US20160117283A1 (en) Remote direct memory access (rdma) optimized high availability for in-memory data storage
WO2018081963A1 (en) Method and device for dns resolution and network system
CN103716319A (en) Device and method for Web access optimization
US20090234858A1 (en) Use Of A Single Service Application Instance For Multiple Data Center Subscribers
AU2018390863B2 (en) Computer system and method for extracting dynamic content from websites
EP1754145B1 (en) Method and apparatus for supporting multiple versions of a web services protocol
JP2016517078A (en) Systems and methods that allow a domain name server to process natural language queries and determine context
US20070162704A1 (en) System and method for searching data
US12001458B2 (en) Multi-cloud object store access
US12028434B2 (en) Generating early hints informational responses at an intermediary server
CN113032820B (en) File storage method, access method, device, equipment and storage medium
CN107341263B (en) Static page data processing method and device
US10659424B2 (en) Determining status of domain name registration

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: 16920466

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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 03/09/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16920466

Country of ref document: EP

Kind code of ref document: A1