WO2012119538A1 - Method, system, intelligent dns, computer program and storage medium for parsing dns resolution requests - Google Patents

Method, system, intelligent dns, computer program and storage medium for parsing dns resolution requests Download PDF

Info

Publication number
WO2012119538A1
WO2012119538A1 PCT/CN2012/071972 CN2012071972W WO2012119538A1 WO 2012119538 A1 WO2012119538 A1 WO 2012119538A1 CN 2012071972 W CN2012071972 W CN 2012071972W WO 2012119538 A1 WO2012119538 A1 WO 2012119538A1
Authority
WO
WIPO (PCT)
Prior art keywords
dns
address
data packet
smart
intranet
Prior art date
Application number
PCT/CN2012/071972
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 中国移动通信集团公司
Publication of WO2012119538A1 publication Critical patent/WO2012119538A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Definitions

  • the present application relates to the field of Internet data services, and in particular, to a method, a system, an intelligent DNS, a computer program, and a storage medium for parsing a DNS resolution request.
  • the services provided by operators can be divided into the following two categories: One is that operators have been introduced to the intranet, such as the construction of large IDC centers to introduce large websites such as sina and baidu into the intranet; The business has not been introduced, must access the external network or the business obtained through the Cache system of the network. Because the characteristics of these two types of business are very different, the solution is completely different.
  • the Cache system in the carrier network currently uses DNS (Domain Name Server, domain name server, working on port 53 to translate the domain name into a computer-recognizable IP address) to redirect specific content.
  • DNS Domain Name Server, domain name server, working on port 53 to translate the domain name into a computer-recognizable IP address
  • the intranet DNS queries according to the DNS resolution request initiated by the user. If the website accessed by the user is the specific content cached by the Cache system, the IP address of the Cache system is directly returned to the user by hijacking the user's DNS request, and the Cache system is used. Respond to the client request; if the user accesses the non-cached website, the IP address of the source server is returned and the request is sent to the source server.
  • the existing solutions can be classified into the following three types.
  • the first solution is the ICP (Internet Content Provider, the network content service provider, which is a telecom operator that provides Internet information services and value-added services to a large number of customers).
  • the company upgrades to support the smart DNS and feeds back the carrier services to the operators. Address, in which case each ICP provider is required to have a list of all addresses owned by the operator.
  • the ICP's DNS receives the DNS resolution request, it needs to match the source address of the request. If the source address is the carrier's IP address, the feedback has been introduced into the operator's IDC (Internet Data Center, Internet Data Center, which is the Internet).
  • the second solution is a smart DNS configuration website URL (Uniform/Universal Resource Locator, also known as a web address, which is the address of a standard resource on the Internet, and also refers to the domain name accessed by the user) and corresponds to the IP address. Relationships: In this case, it is necessary to deploy the intelligent DNS on the intranet of the operator, and manually configure the URL list of all IDC resources that have been introduced into the intranet and the corresponding relationship with the IP address in the smart DNS device.
  • URL Uniform/Universal Resource Locator
  • the smart DNS When the smart DNS receives the request from the intranet DNS, it first queries the local UR.L record, and if there is a corresponding record, responds to the DNS request; if the URJL record is not saved, the intranet DNS is notified to query the external network.
  • the third solution is to upgrade and support the smart DNS, so that when the smart DNS receives the parsing request, it first queries the local URL record, and if there is a corresponding record, responds to the DNS request; if the URL record is not saved, iteratively queries the external network. The query is performed, and the response is processed according to the received response: When the IP address of the local network operator exists in the DNS response packet, the service address list of the local network is fed back; when the DNS response data packet does not exist, the network operator does not exist. The IP address directly reports the received service address list to the user.
  • the two types of service systems need to be integrated together, that is, the solution for processing the Cache type service described above and the intranet Schemes one, two, and ⁇ are processed separately.
  • the Cache-based service solution When the Cache-based service solution is combined with the solution of the intranet-type service, it is necessary to tell the ICP of the address list held by the operator, and it is not suitable to protect the information of the operator. At the same time, when the operator address list needs to be updated, it is also necessary to notify the ICP in time. Otherwise, the ICP will not be able to identify the user of the carrier using the newly added IP address, and the IP address of the service platform of the network cannot be fed back.
  • the redirecting device of the Cache system obtains the parsing request through the DPI, and firstly provides feedback to the user.
  • the Cache system resources cannot access the IDC data resources that have been imported on the network, resulting in waste of resources.
  • the mapping between the URL and the IP address of the IDC/Cache introduced by the internal network is required to be configured on the intelligent DNS device.
  • the IDC resources that can update the URL list in time are not updated to the intelligent DNS because the newly introduced IDC resource information is not updated in time.
  • the intelligent DNS will notify the intranet DNS to perform an iterative query to the external network. In this case, the redirecting device of the Cache system obtains the parsing request through DPI and first feedbacks.
  • the intranet DNS will first receive the Cache system service address list fed back by the Cache system, and feed back the user, causing the user to access the Cache system resources, but cannot access the IDC data resources imported by the network. , resulting in waste of resources.
  • the service address of the local network is fed back. Therefore, when there is a problem with the service platform of the local network, the user cannot access the external network resources, resulting in a decrease in the user experience.
  • the smart DNS when the smart DNS receives the parsing request, it first queries the local IML record, and if there is a corresponding record, responds to the DNS request; if the URL record is not saved, The query is queried through the iterative query and processed according to the received response.
  • the redirecting device of the Cache system obtains the parsing request through the DPI, and first provides feedback. Since the Cache system feeds back the IP address of the Cache resource in the local network, when the intelligent DNS receives the response packet, because there is an IP address of the Cache system of the local network operator, the Cache system feeds back the information in the local network. The service address list is fed back to the user, causing the user to access the Cache system resources, and cannot access the IDC data resources that have been imported on the network, thereby causing waste of resources.
  • the present application aims to provide a method, system, intelligent DNS, computer program and storage medium for parsing DNS resolution requests to avoid the above problems.
  • This application provides a method for parsing a DNS resolution request.
  • a method for parsing a DNS resolution request includes: providing an intranet DNS and an intelligent DNS, respectively storing a record indicating a correspondence between a URL and an IP address; and the intranet DNS and the smart DNS When the record corresponding to the URL in the DNS resolution request is not found, the smart DNS queries the external network DNS; the intelligent DNS receives the response data packet fed back by the external network DNS, and determines the Responding to the data packet includes the local network service address; according to the determined result, reordering the IP address in the response data packet or directly transmitting the response data packet to the intranet DNS.
  • a method for parsing a DNS resolution request includes: providing an intranet DNS and an intelligent DNS, respectively storing a record indicating a correspondence between a URL and an IP address, The intelligent DNS is deployed on a link connecting the local network and the external network; when the internal network DNS does not find the record corresponding to the URL in the DNS resolution request, the external network DNS is sent through the link.
  • the intelligent DNS acquires the DNS resolution request from the link by capturing packets and locally finds whether there is a record corresponding to the URL in the DNS resolution request; if the DNS resolution request is found The UR.L corresponding record returns the corresponding IP address to the intranet DNS; otherwise, after the packet is retrieved from the link to the response packet returned by the external network DNS, the response data is determined. Whether the IP address of the local network is included in the packet, and further determining, according to the determined result, whether the IP address in the response data packet is rearranged and sent to the intranet DNS.
  • the present application also provides a system for parsing DNS resolution requests.
  • a system for parsing a DNS resolution request includes an intranet DNS and an intelligent DNS configured on the local network, and is configured to store a record indicating a correspondence between a URL and an IP address, where the smart DNS is configured. After receiving the response data packet fed back by the external network DNS, determining whether the local network service address is included in the response data packet, and rearranging the IP address in the response data packet according to the determined result or The response packet is sent directly to the intranet DNS o
  • a system for parsing a DNS resolution request includes an intranet DNS set on the local network and an intelligent DNS disposed on a link connecting the local network and the external network, respectively a record indicating a correspondence between the URL and the IP address; wherein the smart DNS is capable of acquiring, by the packet, the DNS resolution request sent by the intranet DNS to the external network DNS, and the external network DNS Returning the response data packet; if the smart DNS locally finds the record corresponding to the URL in the DNS resolution request, and feeding back the corresponding IP address to the intranet DNS; otherwise, determining the captured response data Whether the IP address of the local network is included in the packet, and further determining, according to the determined result, whether the IP address in the response data packet is rearranged and sent to the intranet DNS.
  • an intelligent DNS including: an obtaining module, acquiring a response data packet returned by an external network DNS for a DNS resolution request; and a determining module, determining whether the response data packet includes a local network IP address And the rewriting module, when the determining module determines that the response data packet includes the local network IP address, rewriting the response data packet to arrange the local network IP address in the response data packet Before the IP address of the network.
  • FIG. 1 illustrates a method of parsing a DNS resolution request in accordance with an embodiment of the present application
  • FIG. 2 illustrates a system for parsing a DNS resolution request in accordance with an embodiment of the present application
  • FIG. 3 illustrates a method of parsing a DNS resolution request according to another embodiment of the present application
  • FIG. 4 illustrates a system for parsing a DNS resolution request in accordance with another embodiment of the present application
  • FIG. 5 illustrates a smart DNS in accordance with one embodiment of the present application
  • FIG. 6 shows a smart DNS in accordance with another embodiment of the present application.
  • 1 and 2 illustrate a method 100 and a corresponding system for parsing a DNS resolution request, respectively, in accordance with one embodiment of the present application.
  • the intranet DNS 11 and the intelligent DNS 12 are set in the operator's local network 10, and the user's access is directed to the IDC resource or the Cache resource in the local network as needed, wherein the IDC resource is stored in the IDC data center. 13.
  • the Cache resource is stored in the Cache system 14.
  • the DNS resolution request is received by the intranet DNS 11 and the local query is made in step S102 whether the request can be resolved.
  • the DNS resolution request includes a URL that the user desires to access, and the intranet DNS stores a record indicating a correspondence between the URL and the IP address.
  • the intranet DNS II queries whether the locally stored record includes an entry corresponding to the URL included in the received request. If so, it is determined that the intranet DNS 11 can parse the received request, and proceeds to step S109 to feed back the parsed corresponding IP address to the user.
  • the intranet DNS 11 If the intranet DNS 11 does not find an entry corresponding to the URL included in the received request in its locally saved record, it is determined that the intranet DNS 11 cannot receive the received Request for resolution. In this case, the DNS resolution request is sent to the intelligent DNS in the local network for analysis.
  • the intelligent DNS 12 performs a local inquiry based on the received request.
  • the smart DNS 12 may also store a record indicating the correspondence between the URL and the IP address.
  • the records stored in the smart DNS 12 may or may not be the same as the records stored in the intranet DNS 11. If the smart DNS 12 locally finds the record corresponding to the URL in the DNS resolution request, the corresponding IP address is fed back to the intranet DNS 1 in step S108; otherwise, the DNS resolution request is sent to the other operator in step S104.
  • the external network DNS 21 or ICP DNS 31 feeds the query results back to the smart DNS 12 through the response packet.
  • the external network DNS below may represent any DNS other than the one deployed on the carrier's network, including the external network DNS 21 and the ICP DNS 31.
  • the intelligent DNS ???2 After receiving the response packet returned by the external network DNS, the intelligent DNS ???2 determines whether the received service data packet includes the local network service address in step S105.
  • the service corresponding to the URL is the service that has been imported by the local network, but the correspondence between the URL of the service and the service address of the local network is not recorded in the intranet DNS and the intelligent DNS.
  • the intelligent DNS 12 rewrites the IP address in the received response data packet, and ranks the service address of the local network before the external network service address, so that the user can preferentially access the data service of the local network, and Step S108 feeds back the overwritten response packet to the intranet DNS 11.
  • the user's access can be correctly directed to the local network service resources, that is, , IDC Data Center 13.
  • the received response data packet is directly fed back to the intranet DNS 11, and at the same time, the Cache system 14 is instructed to access the address in the response data packet in step S107.
  • the corresponding data obtained is cached, and the intelligent DNS 12 adds the correspondence between the URL in the resolution request and the IP address of the Cache system to its locally saved record.
  • the smart DNS 12 will find that the local has a corresponding record, and feed back the Cache system IP address to the intranet DNS 11, thereby enabling the user to access the Cache system 14.
  • Resources By caching resources that have not been introduced on this network in time, This ensures that users on the local network can preferentially access related service resources within the network.
  • the intranet DNS 1 can also count and sort the URLs in the received DNS resolution request.
  • the smart DNS 12 first checks the statistics and sorting result of the URL in the intranet DNS 11, and ranks the top UR for the number of times visited. L, the intelligent DNS 12 instructs the Cache system 14 to perform corresponding access and caching. For example, the URLs are sorted according to how many times UR.L is accessed, and only for UR.L ranked within a predetermined number, the smart DNS 12 instructs the Cache system 14 to access and cache. In this case, only the hotspots with more user access are cached in the Cache system 14, thereby reducing the amount of cache of the Cache system 14.
  • the intranet DNS I I may directly initiate an analysis request to the external network DNS. In this way, when the intelligent DNS 12 or the local network service resources fail, the user can continue to access the external network resources to obtain the analysis result.
  • FIG. 3 and 4 illustrate a method 200 and a corresponding system for parsing a DNS resolution request, respectively, in accordance with one embodiment of the present application.
  • the same or similar components in Fig. 4 and Fig. 2 are denoted by the same or similar reference numerals.
  • the DNS resolution request is received by the intranet DNS 1 deployed in the operator's own network 10, and the request is locally queried in step S102. If the intranet DNS 1 can parse the received request, the process goes to step S210 to feed back the corresponding IP address that is parsed to the user. If the intranet DNS 1 does not find an entry in its locally saved record that corresponds to the URL contained in the received request, then it is determined that the intranet DNS I 1 ' cannot resolve the received request. In this case, the parsing request is initiated to the external network DNS in step S203. The external network DNS will feedback the query results through the response packet. Similarly, the external network DNS may include any DNS other than the one deployed in the carrier network, including the external network DNS 21 in the other carrier networks 20 and the ICP DNS 31 communicatively connected via the Internet 30.
  • the intelligent DNS 12 is disposed on a link that connects the local network to the external network.
  • the intelligent DNS 12' also integrates the DPI packet capture function to actively capture DNS resolution requests and returned response packets on the link.
  • the smart DNS 12' resolves the crawled DNS request Perform local resolution. If the smart DNS 12' locally finds the record corresponding to the URL in the DNS resolution request, the corresponding IP address is fed back to the intranet DNS in step S209; otherwise, it waits to retrieve the return of the external network DNS in step S205. Response packet. Then, the intelligent DNS 12' determines in step S206 whether the received service data packet includes the local network service address.
  • the service corresponding to the URL is the service that has been imported by the local network, but the correspondence between the URL of the service and the service address of the local network is not recorded in the intranet DNS 1 and the intelligent DNS 12'.
  • the intelligent DNS 12' rewrites the IP address in the received response data packet, and ranks the service address of the local network before the external network service address, so that the user can preferentially access the data service of the local network.
  • the rewritten response packet is fed back to the intranet DNS 11 '.
  • the smart DNS 2' may instruct the Cache system 14 to access the address in the response data packet and cache the obtained corresponding data in step S208, the intelligent DNS 12 'Add the correspondence between the URL in the resolution request and the Cache system IP address to its locally saved record.
  • the smart DNS 12' will find that the local has the corresponding record, and feed back the Cache system IP address to the intranet DNS 1 ⁇ .
  • the intranet DNS 1 may first determine whether the response is from the smart DNS 12' or from the external network DNS. If it is from the intelligent DNS 12% intranet DNS 1 ⁇ can send DNS resolution response directly to the user. If it is from the external network DNS, the value of TTL (Time to Live, which indicates that the DNS record is cached on the DNS server) in the response packet is reduced (for example, reduced to half) and is in TTL. Re-URL resolution after failure. In this way, for resources that have not been introduced on the network, the household re-requests the parsing after a short time (decreased TTL value).
  • TTL Time to Live, which indicates that the DNS record is cached on the DNS server
  • the intelligent DNS 12' Since the smart DNS 12' has instructed the Cache system 14 to cache after fetching the response packet, the Cache system 14 has already cached the relevant resources upon re-parsing, and the smart DNS 12' has recorded the corresponding correspondence. In this way, when the intelligent DNS 12' performs local parsing, it will find the corresponding record and return the Cache system IP address, thereby guiding the user access to The Cache system 14 enables the users of the local network to preferentially access related service resources in the network. In one embodiment, the intelligent DNS 12' or the intranet DNS 1 ⁇ counts and ranks the URLs in the received DNS resolution request.
  • the intelligent DNS 2'' determines that the received response packet does not include the local IP address, first check the statistics and sorting results of the URL in the smart DNS 12' or the intranet DNS 1 , The URL with the highest number of accesses, the smart DNS 12', instructs the Cache system 14 to perform corresponding access and caching. For example, the URLs are sorted according to the number of times the UR.L is accessed, and only for URLs ranked within a predetermined number, the smart DNS 12' instructs the Cache system to access and cache. In this case, only the hotspots with more user accesses are cached in the Cache System 4, thereby reducing the amount of buffering of the Cache System 4.
  • the smart DNS 50 includes an acquisition module 51, a determination module 52, and a rewrite module 53.
  • the acquisition module 5 obtains the response packet returned by the external network DNS for the DNS resolution request.
  • the response data packet can be directly received by the acquisition module 51 or acquired by packet capture.
  • the determining module 52 determines whether the local network IP address is included in the response packet obtained by the obtaining module 51.
  • the rewriting module 53 rewrites the response data packet to arrange the local network IP address in the response data packet before the external network IP address, thereby enabling the user Priority access to resources within the network.
  • the smart DNS 50' may further include a Cache indication module 54 and a storage module 55.
  • the Cache indication module 54 instructs the Cache system in the local network to access the external network IP address in the response data packet and cache the acquired data.
  • the storage module 55 stores the correspondence between the URL in the DNS resolution request and the IP address of the Cache system in the smart DNS, so that the subsequent user accesses the URL address and then directs the user to the Cache system.
  • the intelligent DNS 50 may further include a query module (not shown) disposed between the determining module 52 and the Cache indicating module 54.
  • the query module can query the URL access system if result in the network.
  • the URL access system results can be saved, for example, in the intranet DNS and/or smart DNS.
  • the Cache indication module 54 selectively instructs the Cache system to access the external network IP address in the response data packet according to the URL access system result obtained by the query module.
  • the Cache indication module 54 indicates the Cache in the local network according to the URL access statistics result.
  • the system accesses the external network IP address in the response packet corresponding to the top URL in the URL access statistics result and caches the acquired data.
  • the storage module 55 stores a record corresponding to the URL accessed by the Cache system and the IP address of the Cache system.

Landscapes

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

Abstract

A method, a system, an intelligent DNS, a computer program and a storage medium for parsing DNS parsing requests are provided. The method according to an embodiment comprises: an intranet DNS and an intelligent DNS are provided, and each stores the records indicating the relationship of URLs and IP addresses separately; when the record corresponding to the URL in the DNS parsing request is not found in the intranet DNS and intelligent DNS, the intelligent DNS queries an internet DNS; the intelligent DNS receives a feedback response packet from the internet DNS, and determines whether the business address of local network is comprised in the response packet; according to the result of the determination, IP addresses in the response packet are reordered or the response packet is sent to the intranet DNS directly. According to the scheme provided in the invention, when a Cache system and an intelligent system coexist, a user can access to IDC resources firstly, which optimizes the user access.

Description

本申请涉及互联网数据业务领域,具体涉及对 DNS解析请求进行解析的 方法、 系统、 智能 DNS、 计算机程序和存储介质。 目前运营商提供的业务按是否已引入可分为如下两类: 一类为运营商已 引入到内网的,如通过建设大型 IDC中心将 sina、baidu等大型网站引入内网; 一类为运营商尚未引入、 须访问外网或通过本网的 Cache系统获取的业务。 由于这两类业务的特点大相径庭, 因此其解决方案也完全不同。  The present application relates to the field of Internet data services, and in particular, to a method, a system, an intelligent DNS, a computer program, and a storage medium for parsing a DNS resolution request. At present, the services provided by operators can be divided into the following two categories: One is that operators have been introduced to the intranet, such as the construction of large IDC centers to introduce large websites such as sina and baidu into the intranet; The business has not been introduced, must access the external network or the business obtained through the Cache system of the network. Because the characteristics of these two types of business are very different, the solution is completely different.
对于 Cache 类业务, 目前是由运营商网络中的 Cache 系统采用 DNS ( Domain Name Server, 域名服务器, 工作在 53端口, 用于把域名翻译成电 脑能识别的 IP地址) 重定向的方式进行特定内容的引导。 首先, 内网 DNS 根据 ^户发起的 DNS解析请求进行查询,如果用户访问的网站是 Cache系统 缓存的特定内容,则通过劫持用户 DNS请求的方式直接向用户返回 Cache系 统的 IP地址, 由 Cache系统响应客户请求; 如果用户访问非缓存的网站, 则 返回源服务器的 IP地址, 请求将发向源服务器。  For the Cache class service, the Cache system in the carrier network currently uses DNS (Domain Name Server, domain name server, working on port 53 to translate the domain name into a computer-recognizable IP address) to redirect specific content. Guide. First, the intranet DNS queries according to the DNS resolution request initiated by the user. If the website accessed by the user is the specific content cached by the Cache system, the IP address of the Cache system is directly returned to the user by hijacking the user's DNS request, and the Cache system is used. Respond to the client request; if the user accesses the non-cached website, the IP address of the source server is returned and the request is sent to the source server.
对于运营商已引入到内网的, 如通过建设大型 IDC中心将 sina、 baidu等 大型网站引入内网的业务, 现有方案可分为如下三种。  For operators that have been introduced to the intranet, such as the construction of large-scale IDC centers to introduce large-scale websites such as sina and baidu into the intranet, the existing solutions can be classified into the following three types.
方案一是各 ICP (Internet Content Provider, 网络内容服务商, 即向广大 ^户综合提供互联网信息业务和增值业务的电信运营商) Γ家升级为支持智 DNS, 并向运营商用户反馈运营商业务地址, 在这种情况下, 需要各 ICP 提供商能够获取运营商所拥有的全部地址列表。 当 ICP的 DNS收到 DNS解 析请求时, 需匹配该请求的源地址, 如果源地址为本运营商 IP地址, 则反馈 已引入该运营商的 IDC (Internet Data Center, 互联网数据中心, 它为互联网 内容提供商、 企业、 媒体和各类网站提供大规模、 高质量、 安全可靠的专业 化服务器托管、 空间租用、 网络带宽等业务) 资源的 IP地址; 否则反馈其他 运营商的 IP地址。 方案二是智能 DNS配置网站 URL ( Uniform/Universal Resource Locator, 统一资源定位符, 也被称为网页地址, 是因特网上标准的资源的地址, 本申 请中还指用户访问的域名) 与 IP地址对应关系, 在这种情况下, 需要在运营 商内网部署智能 DNS, 并需人为地将全部已引入内网的 IDC资源的 URL列 表及其与 IP地址的对应关系配置在智能 DNS设备中。当智能 DNS收到来自 内网 DNS的请求, 其首先查询本地 UR.L记录, 若存在相应记录, 则响应该 DNS请求; 若未保存该 URJL记录, 则通知内网 DNS向外网进行查询。 The first solution is the ICP (Internet Content Provider, the network content service provider, which is a telecom operator that provides Internet information services and value-added services to a large number of customers). The company upgrades to support the smart DNS and feeds back the carrier services to the operators. Address, in which case each ICP provider is required to have a list of all addresses owned by the operator. When the ICP's DNS receives the DNS resolution request, it needs to match the source address of the request. If the source address is the carrier's IP address, the feedback has been introduced into the operator's IDC (Internet Data Center, Internet Data Center, which is the Internet). Content providers, enterprises, media, and various types of websites provide large-scale, high-quality, secure and reliable services for professional server hosting, space leases, network bandwidth, etc.) IP addresses; otherwise, feedback to other carriers' IP addresses. The second solution is a smart DNS configuration website URL (Uniform/Universal Resource Locator, also known as a web address, which is the address of a standard resource on the Internet, and also refers to the domain name accessed by the user) and corresponds to the IP address. Relationships: In this case, it is necessary to deploy the intelligent DNS on the intranet of the operator, and manually configure the URL list of all IDC resources that have been introduced into the intranet and the corresponding relationship with the IP address in the smart DNS device. When the smart DNS receives the request from the intranet DNS, it first queries the local UR.L record, and if there is a corresponding record, responds to the DNS request; if the URJL record is not saved, the intranet DNS is notified to query the external network.
方案三是升级支持智能 DNS, 以使得当智能 DNS收到解析请求, 其首 先查询本地 URL记录, 若存在相应记录, 则响应该 DNS请求; 若未保存该 URL记录, 则通过迭代查询向外网进行查询, 并根据收到的响应进行相应处 理: 当 DNS响应数据包中存在本网运营商的 IP地址, 则反馈本网的业务地 址列表; 当 DNS响应数据包中不存在本网运营商的 IP地址, 则直接将收到 的业务地址列表反馈用户。  The third solution is to upgrade and support the smart DNS, so that when the smart DNS receives the parsing request, it first queries the local URL record, and if there is a corresponding record, responds to the DNS request; if the URL record is not saved, iteratively queries the external network. The query is performed, and the response is processed according to the received response: When the IP address of the local network operator exists in the DNS response packet, the service address list of the local network is fed back; when the DNS response data packet does not exist, the network operator does not exist. The IP address directly reports the received service address list to the user.
由于 IDC资源与 Cache系统资源分别满足不同业务需求, 为了使两类业 务共存, 需要将两类业务系统整合在一起, 即, 将上文所述的对 Cache类业 务进行处理的方案与对内网类业务进行处理的方案一、 二、 ≡分别结合。  As the IDC resource and the Cache system resources respectively meet different service requirements, in order to coexist the two types of services, the two types of service systems need to be integrated together, that is, the solution for processing the Cache type service described above and the intranet Schemes one, two, and ≡ are processed separately.
当 Cache类业务方案与内网类业务的方案一结合时, 需要将运营商所持 有的地址列表全部告诉 ICP, 不宜于保护运营商的信息。 与此同时, 当运营 商地址列表需要更新时, 也需要及时通知 ICP, 否则 ICP将无法识别使用新 增 IP地址的本运营商的用户, 则无法反馈本网业务平台 IP地址。 此外, 当 两类业务并存时,对于已被引入的业务,当内网 DNS向外网进行迭代查询时, Cache系统的重定向设备会通过 DPI获取该解析请求, 并首先进行反馈, 造 成用户访问 Cache系统资源, 而无法访问本网已引入的 IDC数据资源, 造成 资源的浪费。  When the Cache-based service solution is combined with the solution of the intranet-type service, it is necessary to tell the ICP of the address list held by the operator, and it is not suitable to protect the information of the operator. At the same time, when the operator address list needs to be updated, it is also necessary to notify the ICP in time. Otherwise, the ICP will not be able to identify the user of the carrier using the newly added IP address, and the IP address of the service platform of the network cannot be fed back. In addition, when the two types of services coexist, when the intranet DNS is iteratively queried to the external network, the redirecting device of the Cache system obtains the parsing request through the DPI, and firstly provides feedback to the user. The Cache system resources cannot access the IDC data resources that have been imported on the network, resulting in waste of resources.
当 Cache类业务方案与内网类业务的方案二结合时, 需要人为将内网引 入的 IDC/Cache的 URL与 IP地址对应关系配置于智能 DNS设备上, 则当新 的 IDC资源被引入时, 也需及时更新 URL列表。 若不能及时更新, 新引入 的 IDC资源将难以被访问。此外,当两类业务并存时,对于来能及时更新 URL 列表的 IDC资源, 由于新引入的 IDC资源信息未被及时更新至智能 DNS, 因 此智能 DNS会通知内网 DNS向外网进行迭代查询, 这种情况下, Cache系 统的重定向设备会通过 DPI获取该解析请求, 并首先进行反馈。 由于 Cache 系统能够更快地进行反馈, 内网 DNS将首先收到 Cache系统反馈的 Cache系 统业务地址列表, 并反馈用户, 造成^户访问 Cache系统资源, 而无法访问 本网已引入的 IDC数据资源, 从而造成资源的浪费。 When the Cache-type service scheme is combined with the scheme 2 of the intranet-type service, the mapping between the URL and the IP address of the IDC/Cache introduced by the internal network is required to be configured on the intelligent DNS device. When a new IDC resource is introduced, Also need to update the URL list in time. If it cannot be updated in time, the newly introduced IDC resources will be difficult to access. In addition, when two types of services coexist, the IDC resources that can update the URL list in time are not updated to the intelligent DNS because the newly introduced IDC resource information is not updated in time. The intelligent DNS will notify the intranet DNS to perform an iterative query to the external network. In this case, the redirecting device of the Cache system obtains the parsing request through DPI and first feedbacks. As the Cache system can provide feedback faster, the intranet DNS will first receive the Cache system service address list fed back by the Cache system, and feed back the user, causing the user to access the Cache system resources, but cannot access the IDC data resources imported by the network. , resulting in waste of resources.
当 Cache类业务方案与内网类业务的方案三结合时, 由于只反馈本网业 务地址, 因此, 当本网业务平台出现问题时, 用户也无法访问外网资源, 造 成用户体验下降。 此外, 当两类业务并存时, 对于已被引入的业务, 当智能 DNS收到解析请求, 其首先查询本地 IML记录, 若存在相应记录, 则响应 该 DNS请求; 若未保存该 URL记录, 则通过迭代查询向外网迸行查询, 并 根据收到的响应进行相应处理。 然而当智能 DNS 向外网进行迭代查询时, Cache系统的重定向设备会通过 DPI获取该解析请求, 并首先迸行反馈。 由 于 Cache系统反馈的均为本网内 Cache资源的 IP地址, 则当智能 DNS收到 响应数据包, 由于其中存在本网运营商 Cache系统的 IP地址, 则会将 Cache 系统反馈的本网内的业务地址列表反馈用户,造成用户访问 Cache系统资源, 而无法访问本网已引入的 IDC数据资源, 从而造成资源的浪费。 本申请旨在提供了一种对 DNS 解析请求进行解析的方法、 系统、 智能 DNS、 计算机程序和存储介质, 以避免上述问题。  When the Cache-based service solution is combined with the solution 3 of the intranet service, the service address of the local network is fed back. Therefore, when there is a problem with the service platform of the local network, the user cannot access the external network resources, resulting in a decrease in the user experience. In addition, when the two types of services coexist, for the service that has been introduced, when the smart DNS receives the parsing request, it first queries the local IML record, and if there is a corresponding record, responds to the DNS request; if the URL record is not saved, The query is queried through the iterative query and processed according to the received response. However, when the intelligent DNS performs an iterative query to the external network, the redirecting device of the Cache system obtains the parsing request through the DPI, and first provides feedback. Since the Cache system feeds back the IP address of the Cache resource in the local network, when the intelligent DNS receives the response packet, because there is an IP address of the Cache system of the local network operator, the Cache system feeds back the information in the local network. The service address list is fed back to the user, causing the user to access the Cache system resources, and cannot access the IDC data resources that have been imported on the network, thereby causing waste of resources. The present application aims to provide a method, system, intelligent DNS, computer program and storage medium for parsing DNS resolution requests to avoid the above problems.
本申请提供了对 DNS解析请求进行解析的方法。  This application provides a method for parsing a DNS resolution request.
根据一个实施方式, 一种对 DNS解析请求进行解析的方法包括: 提供内 网 DNS和智能 DNS, 分别存储有指示 URL与 IP地址的对应关系的记录; 当 所述内网 DNS和所述智能 DNS中均未查找到与所述 DNS解析请求中的 URL 对应的记录时, 所述智能 DNS向外网 DNS进行查询; 所述智能 DNS接收所 述外网 DNS反馈的响应数据包,并确定所述响应数据包中是否包括本网业务 地址; 根据确定的结果, 对所述响应数据包中的 IP地址进行重排或将所述响 应数据包直接发送至所述内网 DNS。  According to an embodiment, a method for parsing a DNS resolution request includes: providing an intranet DNS and an intelligent DNS, respectively storing a record indicating a correspondence between a URL and an IP address; and the intranet DNS and the smart DNS When the record corresponding to the URL in the DNS resolution request is not found, the smart DNS queries the external network DNS; the intelligent DNS receives the response data packet fed back by the external network DNS, and determines the Responding to the data packet includes the local network service address; according to the determined result, reordering the IP address in the response data packet or directly transmitting the response data packet to the intranet DNS.
根据另一实施方式, 一种对 DNS解析请求进行解析的方法包括: 提供内 网 DNS和智能 DNS ,分别存储有指示 URL与 IP地址的对应关系的记录,所 述智能 DNS部署于将本网与外网相连通的链路上; 所述内网 DNS在未查找 到与所述 DNS解析请求中的 URL对应的记录时, 经由所述链路向外网 DNS 进行查询; 所述智能 DNS通过抓包从所述链路获取所述 DNS解析请求并本 地查找是否具有与所述 DNS解析请求中的 URL对应的记录; 如果查找到与 所述 DNS解析请求中的 UR.L对应的记录,则向所述内网 DNS反馈相应的 IP 地址; 否则, 在通过抓包从所述链路获取到所述外网 DNS返回的响应数据包 之后, 确定所述响应数据包中是否包括本网 IP地址, 并根据确定的结果进一 步确定是否对所述响应数据包中的 IP地址进行重排后发送至所述内网 DNS。 According to another embodiment, a method for parsing a DNS resolution request includes: providing an intranet DNS and an intelligent DNS, respectively storing a record indicating a correspondence between a URL and an IP address, The intelligent DNS is deployed on a link connecting the local network and the external network; when the internal network DNS does not find the record corresponding to the URL in the DNS resolution request, the external network DNS is sent through the link. Performing an inquiry; the intelligent DNS acquires the DNS resolution request from the link by capturing packets and locally finds whether there is a record corresponding to the URL in the DNS resolution request; if the DNS resolution request is found The UR.L corresponding record returns the corresponding IP address to the intranet DNS; otherwise, after the packet is retrieved from the link to the response packet returned by the external network DNS, the response data is determined. Whether the IP address of the local network is included in the packet, and further determining, according to the determined result, whether the IP address in the response data packet is rearranged and sent to the intranet DNS.
本申请还提供了对 DNS解析请求进行解析的系统。  The present application also provides a system for parsing DNS resolution requests.
根据一个实施方式,一种对 DNS解析请求迸行解析的系统包括设置于本 网的内网 DNS和智能 DNS,分别用于存储指示 URL与 IP地址的对应关系的 记录; 其中, 所述智能 DNS在接收所述外网 DNS反馈的响应数据包之后, 确定所述响应数据包中是否包括本网业务地址, 并根据确定的结果对所述响 应数据包中的 IP 地址进行重排或将所述响应数据包直接发送至所述内网 DNS o  According to an embodiment, a system for parsing a DNS resolution request includes an intranet DNS and an intelligent DNS configured on the local network, and is configured to store a record indicating a correspondence between a URL and an IP address, where the smart DNS is configured. After receiving the response data packet fed back by the external network DNS, determining whether the local network service address is included in the response data packet, and rearranging the IP address in the response data packet according to the determined result or The response packet is sent directly to the intranet DNS o
根据另一实施方式, 一种对 DNS解析请求进行解析的系统, 包括设置于 本网的内网 DNS和设置于将本网与外网相连通的链路上的智能 DNS , 分别 ^于存储有指示 URL与 IP地址的对应关系的记录; 其中, 所述智能 DNS能 够通过抓包从所述链路获取所述内网 DNS向所述外网 DNS发送的 DNS解析 请求、 以及所述外网 DNS返回的响应数据包; 所述智能 DNS在本地查找到 与所述 DNS解析请求中的 URL对应的记录的情况下, 向所述内网 DNS反馈 相应的 IP地址; 否则, 确定抓取的响应数据包中是否包括本网 IP地址, 并 根据确定的结果进一步确定是否对所述响应数据包中的 IP地址进行重排后发 送至所述内网 DNS。  According to another embodiment, a system for parsing a DNS resolution request includes an intranet DNS set on the local network and an intelligent DNS disposed on a link connecting the local network and the external network, respectively a record indicating a correspondence between the URL and the IP address; wherein the smart DNS is capable of acquiring, by the packet, the DNS resolution request sent by the intranet DNS to the external network DNS, and the external network DNS Returning the response data packet; if the smart DNS locally finds the record corresponding to the URL in the DNS resolution request, and feeding back the corresponding IP address to the intranet DNS; otherwise, determining the captured response data Whether the IP address of the local network is included in the packet, and further determining, according to the determined result, whether the IP address in the response data packet is rearranged and sent to the intranet DNS.
根据本申请的又一方面, 提供了一种智能 DNS , 包括: 获取模块, 获取 外网 DNS对 DNS解析请求返回的响应数据包; 确定模块, 确定所述响应数 据包中是否包括本网 IP地址; 以及改写模块, 在所述确定模块确定所述响应 数据包中包括本网 IP地址的情况下, 改写所述响应数据包以将所述本网 IP 地址排在所述响应数据包中的外网 IP地址之前。 通过本申请提供的方法、 系统和相应的智能 DNS, 在 Cache类业务和内 网类业务并存的情况下, 对于已引入内网的业务, 将向用户反馈已引入内网 的 IDC数据资源, 而不会反馈 Caehe系统资源的 IP地址,从而避免了资源浪 费。 According to still another aspect of the present application, an intelligent DNS is provided, including: an obtaining module, acquiring a response data packet returned by an external network DNS for a DNS resolution request; and a determining module, determining whether the response data packet includes a local network IP address And the rewriting module, when the determining module determines that the response data packet includes the local network IP address, rewriting the response data packet to arrange the local network IP address in the response data packet Before the IP address of the network. With the method, the system and the corresponding intelligent DNS provided by the present application, in the case where the Cache-type service and the intranet-type service coexist, the IDC data resource that has been introduced into the intranet is fed back to the user for the service that has been introduced into the intranet. The IP address of the Caehe system resource is not fed back, thus avoiding waste of resources.
附图说明 DRAWINGS
图 〗 示出了根据本申请的一个实施方式对 DNS解析请求进行解析的方 法;  FIG. 1 illustrates a method of parsing a DNS resolution request in accordance with an embodiment of the present application;
图 2示出了根据本申请的一个实施方式对 DNS解析请求进行解析的系 统;  2 illustrates a system for parsing a DNS resolution request in accordance with an embodiment of the present application;
图 3示出了根据本申请的另一实施方式对 DNS解析请求进行解析的方 法;  FIG. 3 illustrates a method of parsing a DNS resolution request according to another embodiment of the present application;
图 4示出了根据本申请的另一实施方式对 DNS解析请求进行解析的系 统;  4 illustrates a system for parsing a DNS resolution request in accordance with another embodiment of the present application;
图 5示出了根据本申请的一个实施方式的智能 DNS; 以及  Figure 5 illustrates a smart DNS in accordance with one embodiment of the present application;
图 6示出了根据本申请的另一实施方式的智能 DNS。 图 1和图 2分别示出了根据本申请的一个实施方式对 DNS解析请求进行 解析的方法 100和相应的系统。 如图所示, 在运营商本网 10 中设置有内网 DNS 11和智能 DNS 12, 根据需要将用户的访问引导至本网中的 IDC资源或 Cache资源,其中, IDC资源存储在 IDC数据中心 13,Cache资源存储在 Cache 系统 14。  FIG. 6 shows a smart DNS in accordance with another embodiment of the present application. 1 and 2 illustrate a method 100 and a corresponding system for parsing a DNS resolution request, respectively, in accordance with one embodiment of the present application. As shown in the figure, the intranet DNS 11 and the intelligent DNS 12 are set in the operator's local network 10, and the user's access is directed to the IDC resource or the Cache resource in the local network as needed, wherein the IDC resource is stored in the IDC data center. 13. The Cache resource is stored in the Cache system 14.
当用户在歩骤 S101发起 DNS解析请求之后,由内网 DNS 11接收该 DNS 解析请求并在步骤 S102本地查询是否能够解析该请求。 具体地, DNS解析 请求中包括用户期望访问的 URL,内网 DNS存储有指示 URL与 IP地址的对 应关系的记录。 基于接收到的 DNS请求, 内网 DNS I I查询其本地保存的记 录中是否包括与接收到的请求中包含的 URL所对应的项。如果有, 则确定内 网 DNS 11能够对接收的请求进行解析, 并转至步骤 S109将解析得到的对应 IP地址反馈给用户。 如果内网 DNS 11没有在其本地保存的记录中查找到与 接收到的请求中包含的 URL所对应的项, 则确定内网 DNS 11不能对接收的 请求进行解析。在这种情况下,将该 DNS解析请求发送至本网中的智能 DNS 】2进行解析。 After the user initiates the DNS resolution request in step S101, the DNS resolution request is received by the intranet DNS 11 and the local query is made in step S102 whether the request can be resolved. Specifically, the DNS resolution request includes a URL that the user desires to access, and the intranet DNS stores a record indicating a correspondence between the URL and the IP address. Based on the received DNS request, the intranet DNS II queries whether the locally stored record includes an entry corresponding to the URL included in the received request. If so, it is determined that the intranet DNS 11 can parse the received request, and proceeds to step S109 to feed back the parsed corresponding IP address to the user. If the intranet DNS 11 does not find an entry corresponding to the URL included in the received request in its locally saved record, it is determined that the intranet DNS 11 cannot receive the received Request for resolution. In this case, the DNS resolution request is sent to the intelligent DNS in the local network for analysis.
然后, 在步骤 S103, 智能 DNS 12基于接收的请求进行本地查询。 类似 地, 智能 DNS 12中也可存储有指示 URL与 IP地址的对应关系的记录。智能 DNS 12中存储的记录与内网 DNS 11中存储的记录可以相同也可以不相同。 如果智能 DNS 12本地查找到与 DNS解析请求中的 URL对应的记录, 则在 歩骤 S108将对应的 IP地址反馈至内网 DNS 1 ;否则,在步骤 S104将该 DNS 解析请求发送至其它运营商网络 20中的外网 DNS 21和 /或通过因特网 30发 送至 ICP DNS 31进行查询。 外网 DNS 21或 ICP DNS 31将查询结果通过响 应数据包反馈至智能 DNS 12。 为了简便起见, 下文中的外网 DNS可表示除 了部署于本运营商网络以外的其它任何 DNS, 包括外网 DNS 21和 ICP DNS 31。  Then, in step S103, the intelligent DNS 12 performs a local inquiry based on the received request. Similarly, the smart DNS 12 may also store a record indicating the correspondence between the URL and the IP address. The records stored in the smart DNS 12 may or may not be the same as the records stored in the intranet DNS 11. If the smart DNS 12 locally finds the record corresponding to the URL in the DNS resolution request, the corresponding IP address is fed back to the intranet DNS 1 in step S108; otherwise, the DNS resolution request is sent to the other operator in step S104. The external network DNS 21 in the network 20 and/or sent to the ICP DNS 31 via the Internet 30 for inquiry. The external network DNS 21 or ICP DNS 31 feeds the query results back to the smart DNS 12 through the response packet. For the sake of brevity, the external network DNS below may represent any DNS other than the one deployed on the carrier's network, including the external network DNS 21 and the ICP DNS 31.
在接收到外网 DNS返回的响应数据包后, 智能 DNS 】2在歩骤 S105确 定接收的响应数据包中是否包括本网业务地址。  After receiving the response packet returned by the external network DNS, the intelligent DNS ???2 determines whether the received service data packet includes the local network service address in step S105.
如果包括本网业务地址, 则该 URL对应的业务是本网己引入的业务, 但 该业务的 URL与本网业务地址的对应关系未记录在内网 DNS和智能 DNS 中。 在这种情况下, 在步骤 S106, 智能 DNS 12对接收的响应数据包中的 IP 地址进行改写, 将本网业务地址排在外网业务地址之前, 使用户能优先访问 本网数据业务, 并在步骤 S108将改写过的响应数据包反馈至内网 DNS 11。 这样, 对于本网已引入的业务, 即使其 URL与本网业务地址的对应关系没有 保存在内网 DNS I I和智能 DNS 12中,也可以正确地将用户的访问引导至本 网业务资源, 即, IDC数据中心 13。  If the service address of the local network is included, the service corresponding to the URL is the service that has been imported by the local network, but the correspondence between the URL of the service and the service address of the local network is not recorded in the intranet DNS and the intelligent DNS. In this case, in step S106, the intelligent DNS 12 rewrites the IP address in the received response data packet, and ranks the service address of the local network before the external network service address, so that the user can preferentially access the data service of the local network, and Step S108 feeds back the overwritten response packet to the intranet DNS 11. In this way, for the services that have been introduced on the local network, even if the correspondence between the URL and the service address of the local network is not saved in the intranet DNS II and the intelligent DNS 12, the user's access can be correctly directed to the local network service resources, that is, , IDC Data Center 13.
如果在接收的响应数据包中不包括本网业务地址, 则将接收的响应数据 包直接反馈至内网 DNS 11, 同时, 在歩骤 S107指示 Cache系统 14对响应数 据包中的地址进行访问并对获取的相应数据进行缓存, 智能 DNS 12将解析 请求中的 URL与 Cache系统 IP地址的对应关系添加至其本地保存的记录中。 这样, 在后续用户需要访问该 URL时, 在歩骤 SI03, 智能 DNS 12将查找到 本地具有相应的记录, 并将 Cache系统 IP地址反馈至内网 DNS 11, 从而使 用户访问 Cache系统 14中的资源。通过对本网尚未引入的资源及时进行缓存, 保证了本网用户能够优先在网内访问到相关业务资源。 If the service data address of the local network is not included in the received response data packet, the received response data packet is directly fed back to the intranet DNS 11, and at the same time, the Cache system 14 is instructed to access the address in the response data packet in step S107. The corresponding data obtained is cached, and the intelligent DNS 12 adds the correspondence between the URL in the resolution request and the IP address of the Cache system to its locally saved record. In this way, when the subsequent user needs to access the URL, at step SI03, the smart DNS 12 will find that the local has a corresponding record, and feed back the Cache system IP address to the intranet DNS 11, thereby enabling the user to access the Cache system 14. Resources. By caching resources that have not been introduced on this network in time, This ensures that users on the local network can preferentially access related service resources within the network.
在一个实施方式中, 内网 DNS〗 1还可对接收的 DNS解析请求中的 URL 进行统计和排序。 在这种情况下, 当确定接收的响应数据包中不包括本网 IP 地址时, 智能 DNS 12首先查看内网 DNS 11中对 URL的统计和排序结果, 对于被访问次数排名靠前的 UR.L,智能 DNS 12才指示 Cache系统 14进行相 应的访问和缓存。 俩如, 根据 UR.L被访问次数从多到少对 URL进行排序, 仅对排名在预定数目以内的 UR.L,智能 DNS 12才指示 Cache系统 14进行访 问和缓存。在这种情况下,仅将用户访问较多的热点缓存在 Cache系统 14中, 从而减小 Cache系统 14的缓存量。  In one embodiment, the intranet DNS 1 can also count and sort the URLs in the received DNS resolution request. In this case, when it is determined that the received response packet does not include the IP address of the local network, the smart DNS 12 first checks the statistics and sorting result of the URL in the intranet DNS 11, and ranks the top UR for the number of times visited. L, the intelligent DNS 12 instructs the Cache system 14 to perform corresponding access and caching. For example, the URLs are sorted according to how many times UR.L is accessed, and only for UR.L ranked within a predetermined number, the smart DNS 12 instructs the Cache system 14 to access and cache. In this case, only the hotspots with more user access are cached in the Cache system 14, thereby reducing the amount of cache of the Cache system 14.
在以上实施方式中, 如果内网 DNS 11在预定时间内未接收到智能 DNS 12发送的数据响应包,内网 DNS I I可直接向外网 DNS发起解析请求。这样, 在智能 DNS 12或本网业务资源出现故障时, 用户扔然能够继续访问外网资 源获得解析结果。  In the above embodiment, if the intranet DNS 11 does not receive the data response packet sent by the smart DNS 12 within a predetermined time, the intranet DNS I I may directly initiate an analysis request to the external network DNS. In this way, when the intelligent DNS 12 or the local network service resources fail, the user can continue to access the external network resources to obtain the analysis result.
图 3和图 4分别示出了根据本申请的一个实施方式对 DNS解析请求进行 解析的方法 200和相应的系统。 图 4和图 2中相同或相似的部件采用了相同 或相似的标号表示。  3 and 4 illustrate a method 200 and a corresponding system for parsing a DNS resolution request, respectively, in accordance with one embodiment of the present application. The same or similar components in Fig. 4 and Fig. 2 are denoted by the same or similar reference numerals.
如图所示, 当用户在歩骤 S201发起 DNS解析请求之后, 由部署于运营 商本网 10中的内网 DNS 1 Γ接收该 DNS解析请求并在歩骤 S102本地查询是 否能够解析该请求。 如果内网 DNS 1 Γ能够对接收的请求进行解析, 并转至 步骤 S210将解析得到的对应 IP地址反馈给用户。 如果内网 DNS 1 Γ没有在 其本地保存的记录中查找到与接收到的请求中包含的 URL所对应的项,则确 定内网 DNS I 1 '不能对接收的请求进行解析。 在这种情况下, 在步骤 S203向 外网 DNS发起该解析请求。 外网 DNS将会通过响应数据包反馈查询结果。 同样, 外网 DNS可包括除了部署于本运营商网络以外的其它任何 DNS, 包 括其它运营商网络 20中的外网 DNS 21和通过因特网 30通信连接的 ICP DNS 31。  As shown in the figure, after the user initiates the DNS resolution request in step S201, the DNS resolution request is received by the intranet DNS 1 deployed in the operator's own network 10, and the request is locally queried in step S102. If the intranet DNS 1 can parse the received request, the process goes to step S210 to feed back the corresponding IP address that is parsed to the user. If the intranet DNS 1 does not find an entry in its locally saved record that corresponds to the URL contained in the received request, then it is determined that the intranet DNS I 1 ' cannot resolve the received request. In this case, the parsing request is initiated to the external network DNS in step S203. The external network DNS will feedback the query results through the response packet. Similarly, the external network DNS may include any DNS other than the one deployed in the carrier network, including the external network DNS 21 in the other carrier networks 20 and the ICP DNS 31 communicatively connected via the Internet 30.
在本实施方式中, 智能 DNS 12,设置于将本网与外网相连通的链路上。 该智能 DNS 12'还集成有 DPI抓包的功能,主动抓取该链路上的 DNS解析请 求和返回的响应数据包。在步骤 S204,智能 DNS 12'对抓取的 DNS解析请求 进行本地解析。 如果智能 DNS 12'本地查找到与 DNS解析请求中的 URL对 应的记录, 则在步骤 S209将对应的 IP地址反馈至内网 DNS 〗Γ ; 否则, 等 待在步骤 S205抓取到外网 DNS返回的响应数据包。 然后, 智能 DNS 12'在 步骤 S206确定接收的响应数据包中是否包括本网业务地址。 In the present embodiment, the intelligent DNS 12 is disposed on a link that connects the local network to the external network. The intelligent DNS 12' also integrates the DPI packet capture function to actively capture DNS resolution requests and returned response packets on the link. In step S204, the smart DNS 12' resolves the crawled DNS request Perform local resolution. If the smart DNS 12' locally finds the record corresponding to the URL in the DNS resolution request, the corresponding IP address is fed back to the intranet DNS in step S209; otherwise, it waits to retrieve the return of the external network DNS in step S205. Response packet. Then, the intelligent DNS 12' determines in step S206 whether the received service data packet includes the local network service address.
如果包括本网业务地址, 则该 URL对应的业务是本网已引入的业务, 但 该业务的 URL与本网业务地址的对应关系未记录在内网 DNS 1 Γ和智能 DNS 12'中。 在这种情况下, 在步骤 S207, 智能 DNS 12'对接收的响应数据包中的 IP地址迸行改写, 将本网业务地址排在外网业务地址之前, 使用户能优先访 问本网数据业务,并在歩骤 S209将改写过的响应数据包反馈至内网 DNS 11 '。 这样, 对于本网已引入的业务, 即使其 URL与本网业务地址的对应关系没有 保存在内网 DNS 1 Γ和智能 DNS 12'中,也可以正确地将用户的访问引导至本 网业务资源, 即, IDC数据中心 13。  If the service address of the local network is included, the service corresponding to the URL is the service that has been imported by the local network, but the correspondence between the URL of the service and the service address of the local network is not recorded in the intranet DNS 1 and the intelligent DNS 12'. In this case, in step S207, the intelligent DNS 12' rewrites the IP address in the received response data packet, and ranks the service address of the local network before the external network service address, so that the user can preferentially access the data service of the local network. And in response to step S209, the rewritten response packet is fed back to the intranet DNS 11 '. In this way, for the services that have been introduced on the local network, even if the correspondence between the URL and the service address of the local network is not saved in the intranet DNS 1 and the intelligent DNS 12', the user's access can be correctly directed to the local network service resources. , ie, IDC Data Center 13.
如果在接收的响应数据包中不包括本网业务地址, 智能 DNS 〗2'则可在 步骤 S208指示 Cache系统 14对响应数据包中的地址进行访问并对获取的相 应数据进行缓存, 智能 DNS 12'将解析请求中的 URL与 Cache系统 IP地址 的对应关系添加至其本地保存的记录中。 这样, 在后续用户需要访问该 URL 时, 在步骤 S204, 智能 DNS 12'将查找到本地具有相应的记录, 并将 Cache 系统 IP地址反馈至内网 DNS 1 Γ。通过对本网尚来引入的资源及时进行缓存, 保证了本网用户能够优先在网内访问到相关业务资源。  If the service address of the local network is not included in the received response data packet, the smart DNS 2' may instruct the Cache system 14 to access the address in the response data packet and cache the obtained corresponding data in step S208, the intelligent DNS 12 'Add the correspondence between the URL in the resolution request and the Cache system IP address to its locally saved record. Thus, when the subsequent user needs to access the URL, in step S204, the smart DNS 12' will find that the local has the corresponding record, and feed back the Cache system IP address to the intranet DNS 1 Γ. By timely buffering the resources introduced by the network, the users of the local network can preferentially access related service resources in the network.
在一个实施方式中, 内网 DNS 1 Γ在接收到响应数据包之后, 可首先判 断该响应是来自智能 DNS 12'还是来自外网 DNS。如果是来自智能 DNS 12% 内网 DNS 1 Γ可直接向用户发送 DNS解析响应。如果是来自外网 DNS, 则可 将该响应数据包中的 TTL (Time to Live, 生存时间, 表示 DNS记录在 DNS 服务器上缓存时间) 值减小 (例如, 减小至一半), 并在 TTL失效后重新进 行 URL解析。 这样, 对于本网尚未引入的资源, ^户在短时间 (减小的 TTL 值) 后重新请求解析。 由于智能 DNS 12'在抓取响应数据包后已指示 Cache 系统 14进行缓存, 在重新解析时, Cache系统 14己经缓存了相关资源, 并 且智能 DNS 12'已记录了相应的对应关系。这样,智能 DNS 12'进行本地解析 时将查找到相应的记录, 并返回 Cache系统 IP地址, 从而将用户访问引导至 Cache系统 14, 使本网用户能够优先在网内访问到相关业务资源。 在一个实施方式中, 智能 DNS 12'或内网 DNS 1 Γ对接收的 DNS解析请 求中的 URL进行统计和排序。 在这种情况下, 当智能 DNS】2'确定接收的响 应数据包中不包括本网 IP地址时, 首先查看智能 DNS 12'或内网 DNS 1 Γ中 对 URL的统计和排序结果, 对于被访问次数排名靠前的 URL, 智能 DNS 12' 才指示 Cache系统 14进行相应的访问和缓存。 俩如, 根据 UR.L被访问次数 从多到少对 URL进行排序, 仅对排名在预定数目以内的 URL, 智能 DNS 12' 才指示 Cache系统】 4进行访问和缓存。在这种情况下, 仅将用户访问较多的 热点缓存在 Cache系统 4中, 从而减小 Cache系统 4的缓存量。 In one embodiment, after receiving the response packet, the intranet DNS 1 may first determine whether the response is from the smart DNS 12' or from the external network DNS. If it is from the intelligent DNS 12% intranet DNS 1 Γ can send DNS resolution response directly to the user. If it is from the external network DNS, the value of TTL (Time to Live, which indicates that the DNS record is cached on the DNS server) in the response packet is reduced (for example, reduced to half) and is in TTL. Re-URL resolution after failure. In this way, for resources that have not been introduced on the network, the household re-requests the parsing after a short time (decreased TTL value). Since the smart DNS 12' has instructed the Cache system 14 to cache after fetching the response packet, the Cache system 14 has already cached the relevant resources upon re-parsing, and the smart DNS 12' has recorded the corresponding correspondence. In this way, when the intelligent DNS 12' performs local parsing, it will find the corresponding record and return the Cache system IP address, thereby guiding the user access to The Cache system 14 enables the users of the local network to preferentially access related service resources in the network. In one embodiment, the intelligent DNS 12' or the intranet DNS 1 统计 counts and ranks the URLs in the received DNS resolution request. In this case, when the intelligent DNS 2'' determines that the received response packet does not include the local IP address, first check the statistics and sorting results of the URL in the smart DNS 12' or the intranet DNS 1 , The URL with the highest number of accesses, the smart DNS 12', instructs the Cache system 14 to perform corresponding access and caching. For example, the URLs are sorted according to the number of times the UR.L is accessed, and only for URLs ranked within a predetermined number, the smart DNS 12' instructs the Cache system to access and cache. In this case, only the hotspots with more user accesses are cached in the Cache System 4, thereby reducing the amount of buffering of the Cache System 4.
本申请还提出了一种智能 DNS。 如图 5所示, 根据一个实施方式的智能 DNS 50包括获取模块 51、 确定模块 52和改写模块 53。 获取模块 5】获取外 网 DNS对 DNS解析请求返回的响应数据包。 如上文结合不同的实施方式所 述, 响应数据包可由获取模块 51 直接接收或通过抓包而获取。 确定模块 52 确定获取模块 51获取的响应数据包中是否包括本网 IP地址。 在确定模块 52 确定该响应数据包中包括本网 IP地址的情况下, 改写模块 53对响应数据包 进行改写, 以将响应数据包中的本网 IP地址排在外网 IP地址之前, 从而使 用户优先访问网内资源。  This application also proposes a smart DNS. As shown in FIG. 5, the smart DNS 50 according to one embodiment includes an acquisition module 51, a determination module 52, and a rewrite module 53. The acquisition module 5] obtains the response packet returned by the external network DNS for the DNS resolution request. As described above in connection with various embodiments, the response data packet can be directly received by the acquisition module 51 or acquired by packet capture. The determining module 52 determines whether the local network IP address is included in the response packet obtained by the obtaining module 51. In the case that the determining module 52 determines that the response data packet includes the local network IP address, the rewriting module 53 rewrites the response data packet to arrange the local network IP address in the response data packet before the external network IP address, thereby enabling the user Priority access to resources within the network.
如图 6所示, 根据一个实施方式的智能 DNS 50'可进一歩包括 Cache指 示模块 54和存储模块 55。 在确定模块 52确定响应数据包中不包括本网 IP 地址的情况下, Cache指示模块 54指示本网中的 Cache系统对响应数据包中 的外网 IP地址进行访问并对获取的数据进行缓存。同 I吋,存储模块 55将 DNS 解析请求中的 URL与 Cache系统的 IP地址的对应关系保存在智能 DNS中, 以便后续用户访问该 URL地址时, 将用户引导至 Cache系统。  As shown in FIG. 6, the smart DNS 50' according to one embodiment may further include a Cache indication module 54 and a storage module 55. In the case that the determining module 52 determines that the response data packet does not include the local network IP address, the Cache indication module 54 instructs the Cache system in the local network to access the external network IP address in the response data packet and cache the acquired data. In the same manner, the storage module 55 stores the correspondence between the URL in the DNS resolution request and the IP address of the Cache system in the smart DNS, so that the subsequent user accesses the URL address and then directs the user to the Cache system.
根据另一实施方式, 智能 DNS 50,还可进一歩包括设置于确定模块 52和 Cache指示模块 54之间的查询模块 (未示出)。 根据本实施方式, 查询模块 可查询本网中的 URL访问统 if结果。 该 URL访问统 结果例如可保存在内 网 DNS和 /或智能 DNS中。 Cache指示模块 54则根据查询模块获取的 URL 访问统 if结果选择性地指示 Cache系统对响应数据包中的外网 IP地址进行访 问。具体地, Cache指示模块 54根据 URL访问统计结果,指示本网中的 Cache 系统对 URL访问统计结果中排名靠前的 URL所对应的响应数据包中的外网 IP地址进行访问并对获取的数据进行缓存。存储模块 55存储 Cache系统访问 的 URL与 Cache系统的 IP地址相对应的记录。 According to another embodiment, the intelligent DNS 50 may further include a query module (not shown) disposed between the determining module 52 and the Cache indicating module 54. According to this embodiment, the query module can query the URL access system if result in the network. The URL access system results can be saved, for example, in the intranet DNS and/or smart DNS. The Cache indication module 54 selectively instructs the Cache system to access the external network IP address in the response data packet according to the URL access system result obtained by the query module. Specifically, the Cache indication module 54 indicates the Cache in the local network according to the URL access statistics result. The system accesses the external network IP address in the response packet corresponding to the top URL in the URL access statistics result and caches the acquired data. The storage module 55 stores a record corresponding to the URL accessed by the Cache system and the IP address of the Cache system.
上文中结合本申请的具体实施方式描述的特征应理解为可应用于其它实 施方式, 除非这些特征与其它实施方式相冲突。 本申请公开的全部特征和 /或 公开的方法的全部歩骤能够以任意适当的方式结合, 除非这种结合中的至少 部分特征和 /或步骤是互斥的。 本发明在细节上不限于上述实施方式, 而是旨 在包含对上述实施方式的适当修改、 变形和 /或组合。  Features described above in connection with the specific embodiments of the present application are to be understood as being applicable to other embodiments, unless such features are inconsistent with other embodiments. All of the features disclosed in the present application and/or all of the disclosed methods can be combined in any suitable manner unless at least some of the features and/or steps of the combination are mutually exclusive. The present invention is not limited to the above-described embodiments in detail, but is intended to include appropriate modifications, variations and/or combinations of the above-described embodiments.

Claims

1. 一种对 DNS解析请求进行解析的方法, 包括: 1. A method for parsing a DNS resolution request, including:
提供内网 DNS和智能 DNS , 分别存储有指示 URL与 IP地址的对应关系的 记录;  Providing an intranet DNS and an intelligent DNS, respectively storing records indicating a correspondence between a URL and an IP address;
当所述内网 DNS和所述智能 DNS中均未查找到与所述 DNS解析请求中的 URL对应的记录时, 所述智能 DNS向外网 DNS进行查询;  When the records corresponding to the URL in the DNS resolution request are not found in the intranet DNS and the smart DNS, the smart DNS queries the external network DNS;
所述智能 DNS接收所述外网 DNS反馈的响应数据包, 并确定所述响应数 据包中是否包括本网业务地址;  Receiving, by the smart DNS, a response data packet fed back by the external network, and determining whether the response data packet includes a service address of the local network;
根据确定的结果, 对所述响应数据包中的 地址进行重排或将所述响应 数据包直接发送至所述内网 DNS。  Based on the determined result, the address in the response packet is rearranged or the response packet is sent directly to the intranet DNS.
2. 如权利要求 1所述的方法, 其中, 如果所述智能 DNS确定接收的响应 数据包中包括本网 IP地址, 则对所述响应数据包进行改写以将本网 IP地址排 在外网 IP地址之前, 并将改写过的响应数据包发送至所述内网 DNS;  2. The method according to claim 1, wherein, if the smart DNS determines that the received response data packet includes the local network IP address, rewriting the response data packet to rank the local network IP address in the external network IP address. Before the address, the rewritten response data packet is sent to the intranet DNS;
否则, 将接收的响应数据包发送至所述内网 DNS。  Otherwise, the received response packet is sent to the intranet DNS.
3. 如权利要求 2所述的方法, 其中, 在所述智能 DNS确定接收的响应数 据包中不包括本网 IP地址的情况下,所述智能 DNS指示 Cache系统访问所述接 收的响应数据包中的外网 IP地址并对获取的数据进行缓存, 同时, 所述智能 DNS增加指示所述 URL与所述 Cache系统的 IP地址相对应的记录。  3. The method according to claim 2, wherein, in case the smart DNS determines that the received response data packet does not include the local network IP address, the smart DNS instructs the Cache system to access the received response data packet. The external network IP address is cached and the acquired data is cached, and the smart DNS adds a record indicating that the URL corresponds to the IP address of the Cache system.
4. 如权利要求 2所述的方法, 进一步包括所述内网 DNS对接收的 DNS解 析请求中的 URL进行统 ^和排序;  4. The method of claim 2, further comprising the intranet DNS assorting and sorting URLs in the received DNS resolution request;
其中, 在所述智能 DNS在确定接收的响应数据包中不包括本网 IP地址的 情况下,  Wherein, in the case that the intelligent DNS does not include the IP address of the local network in determining the received response packet,
所述智能 DNS查看所述内网 DNS中的统计和排序结果, 并且对于被访问 次数排名靠前的 URL,所述智能 DNS指示 Cache系统对相应的响应数据包中的 外网 IP地址进行访问并对获取的数据进行缓存, ί司时, 所述智能 DNS增加指 示所述 UR.L与所述 Cache系统的 IP地址相对应的记录。  The smart DNS checks statistics and sorting results in the intranet DNS, and for a URL ranked first by the number of accesses, the smart DNS instructs the Cache system to access the external network IP address in the corresponding response data packet and The acquired data is cached, and the smart DNS adds a record indicating that the UR.L corresponds to the IP address of the Cache system.
5. 如权利要求 1所述的方法, 进一步包括: 所述内网 DNS在预定时间内未接收到所述智能 DNS发送的数据响应包的 情况下, 直接向所述外网 DNS发起解析请求。 5. The method of claim 1 further comprising: If the intranet DNS does not receive the data response packet sent by the smart DNS within a predetermined time, the intranet DNS directly initiates a parsing request to the external network DNS.
6. —种对 DNS解析请求进行解析的方法, 包括:  6. A method for parsing a DNS resolution request, including:
提供内网 DNS和智能 DNS , 分别存储有指示 URL与 IP地址的对应关系的 记录, 所述智能 DNS部署于将本网与外网相连通的链路上;  Providing an intranet DNS and an intelligent DNS, respectively, storing a record indicating a correspondence between a URL and an IP address, where the smart DNS is deployed on a link connecting the local network and the external network;
所述内网 DNS在未查找到与所述 DNS解祈请求中的 UR.L对应的记录时, 经由所述链路向外网 DNS进行查询;  When the intranet DNS does not find the record corresponding to the UR.L in the DNS resolution request, the intranet DNS queries the external network DNS through the link;
所述智能 DNS通过抓包从所述链路获取所述 DNS解析请求并本地查找是 否具有与所述 DNS解析请求中的 URL对应的记录;  The smart DNS obtains the DNS resolution request from the link by capturing packets and locally finds whether there is a record corresponding to the URL in the DNS resolution request;
如果查找到与所述 DNS解析请求中的 URL对应的记录, 则向所述内网 DNS反馈相应的 IP地址;  If the record corresponding to the URL in the DNS resolution request is found, the corresponding IP address is fed back to the intranet DNS;
否则, 在通过抓包从所述链路获取到所述外网 DNS返回的响应数据包之 后, 确定所述响应数据包中是否包括本网 IP地址, 并根据确定的结果进一步 确定是否对所述响应数据包中的 IP地址进行重排后发送至所述内网 DNS。  Otherwise, after acquiring the response data packet returned by the external network DNS from the link by the packet capture, determining whether the local IP address is included in the response data packet, and further determining, according to the determined result, whether the The IP address in the response packet is rearranged and sent to the intranet DNS.
7. 如权利要求 6所述的方法, 其中, 如果所述智能 DNS确定接收的响应 数据包中包括本网 IP地址, 则对所述响应数据包进行改写以将本网 IP地址排 在外网 IP地址之前, 并将改写过的响应数据包发送至所述内网 DNS。  7. The method according to claim 6, wherein, if the smart DNS determines that the received response data packet includes the local network IP address, the response data packet is rewritten to rank the local network IP address in the external network IP. Before the address, the rewritten response packet is sent to the intranet DNS.
8. 如权利要求 6所述的方法, 其中, 在所述智能 DNS确定接收的响应数 据包中不包括本网 IP地址的情况下,所述智能 DNS指示 Cache系统访问所述接 收的响应数据包中的外网 IP地址并对获取的数据进行缓存, 同时, 所述智能 DNS增加指示所述 URL与所述 Caehe系统的 IP地址相对应的记录。  8. The method according to claim 6, wherein, in a case where the smart DNS determines that the received response data packet does not include the local network IP address, the smart DNS instructs the Cache system to access the received response data packet. The external network IP address in the cache and the obtained data are cached, and at the same time, the smart DNS adds a record indicating that the URL corresponds to the IP address of the Caehe system.
9. 如权利要求 6所述的方法, 进一步包括所述内网 DNS或所述智能 DNS 对接收的 DNS解析请求中的 URL进行统†和排序;  9. The method of claim 6, further comprising the intranet DNS or the smart DNS reconciling and sorting URLs in the received DNS resolution request;
其中, 在所述智能 DNS确定接收的响应数据包中不包括本网 IP地址的情 况下,  Wherein, in the case that the smart DNS determines that the received response data packet does not include the local network IP address,
所述智能 DNS查看所述内网 DNS或所述智能 DNS中的统计和排序结果, 并 ii对于被访问次数排名靠前的 URL,所述智能 DNS指示 Cache系统对相应的 响应数据包中的外网 IP地址进行访问并对获取的数据进行缓存, 同时, 所述 智能 DNS增加指示所述 URL与所述 Cache系统的 IP地址相对应的记录。 The smart DNS checks statistics and sorting results in the intranet DNS or the smart DNS, and ii ranks a top URL for the number of times visited, and the smart DNS indicates that the Cache system is outside the corresponding response data packet. The network IP address accesses and caches the acquired data, and the smart DNS adds a record indicating that the URL corresponds to the IP address of the Cache system.
10. 如权利要求 6所述的方法, 进一步包括: 10. The method of claim 6 further comprising:
所述内网 DNS确定接收到的响应数据包来自所述智能 DNS或所述外网 DNS; 以及  The intranet DNS determines that the received response data packet is from the smart DNS or the external network DNS;
当确定接收到的响应数据包来自所述外网 DNS时, 减小该响应数据包中 的 TTL值, 并待减小后的 TTL值失效后重新进行所述 URL解析。  When it is determined that the received response data packet is from the external network DNS, the TTL value in the response data packet is decreased, and the URL resolution is re-executed after the reduced TTL value is invalid.
1 L 一种对 DNS解析请求进行解析的系统, 包括设置于本网的内网 DNS 和智能 DNS, 分别用于存储指示 URL与 IP地址的对应关系的记录;  1 L A system for parsing a DNS resolution request, including an intranet DNS and an intelligent DNS set on the local network, respectively for storing a record indicating a correspondence between a URL and an IP address;
其中, 所述智能 DNS在接收所述外网 DNS反馈的响应数据包之后, 确定 所述响应数据包中是否包括本网业务地址, 并根据确定的结果对所述响应数 据包中的 IP地址进行重排或将所述响应数据包直接发送至所述内网 DNS。  After receiving the response data packet fed back by the external network DNS, the smart DNS determines whether the service data address of the local network is included in the response data packet, and performs an IP address in the response data packet according to the determined result. Rearranging or sending the response packet directly to the intranet DNS.
12. 如权利要求 1所述的系统, 其中, 如果所述智能 DNS确定接收的响 应数据包中包括本网 IP地址, 则对所述响应数据包进行改写以将本网 CP地址 排在外网 IP地址之前, 并将改写过的响应数据包发送至所述内网 DNS;  12. The system according to claim 1, wherein, if the smart DNS determines that the received response data packet includes the local network IP address, the response data packet is rewritten to rank the local network CP address in the external network IP. Before the address, the rewritten response data packet is sent to the intranet DNS;
否则, 将接收的响应数据包发送至所述内网 DNS。  Otherwise, the received response packet is sent to the intranet DNS.
13. 如权利要求】 2所述的系统, 其中, 所述智能 DNS确定接收的响应数 据包中不包括本网 IP地址的情况下, 指示 Cache系统访问所述接收的响应数据 包中的外网 IP地址并对获取的数据进行缓存, 同时, 所述智能 DNS增加指示 所述 URL与所述 Cache系统的 IP地址相对应的记录。  The system according to claim 2, wherein the intelligent DNS determines that the received response data packet does not include the local network IP address, and instructs the Cache system to access the external network in the received response data packet. The IP address caches the acquired data, and the smart DNS adds a record indicating that the URL corresponds to the IP address of the Cache system.
14. 如权利要求】 2所述的系统, 其中, 所述内网 DNS对接收的 DNS解析 请求中的 URL进行统计和排序; 所述智能 DNS在确定接收的响应数据包中不 包括本网 IP地址的情况下, 查看所述内网 DNS中的统 和排序结果, 并且, 对于被访问次数排名靠前的 URL,所述智能 DNS指示 Cache系统对相应的响应 数据包中的外网 IP地址进行访问并对获取的数据进行缓存, 同时, 所述智能 DNS增加指示所述 URL与所述 Cache系统的 IP地址相对应的记录。  14. The system according to claim 2, wherein the intranet DNS performs statistics and ordering on URLs in the received DNS resolution request; the intelligent DNS does not include the local network IP in determining the received response data packet. In the case of an address, the system performs the sorting result in the intranet DNS, and, for the URL ranked first by the number of accesses, the smart DNS instructs the Cache system to perform the external network IP address in the corresponding response packet. Accessing and caching the acquired data, and the smart DNS adds a record indicating that the URL corresponds to an IP address of the Cache system.
15. 如权利要求 Π所述的系统, 其中, 所述内网 DNS在预定时间内未接 收到所述智能 DNS发送的数据响应包的情况下, 直接向所述外网 DNS发起解 析请求。  The system according to claim ,, wherein, if the intranet DNS does not receive the data response packet sent by the smart DNS within a predetermined time, the DNS request is directly sent to the external network DNS.
16. 一种对 DNS解析请求进行解析的系统, 包括设置于本网的内网 DNS 和设置于将本网与外网相连通的链路上的智能 DNS, 分别用于存储有指示 URL与 IP地址的对应关系的记录; 16. A system for parsing a DNS resolution request, comprising: an intranet DNS set on the local network and an intelligent DNS disposed on a link connecting the local network and the external network, respectively for storing an indication a record of the correspondence between the URL and the IP address;
其中, 所述智能 DNS能够通过抓包从所述链路获取所述内网 DNS向所述 外网 DNS发送的 DNS解析请求、 以及所述外网 DNS返回的响应数据包;  The smart DNS can acquire, by the packet capture, the DNS resolution request sent by the intranet DNS to the external network DNS, and the response data packet returned by the external network DNS.
所述智能 DN S在本地查找到与所述 DNS解析请求中的 URL对应的记录的 情况下, 向所述内网 DNS反馈相应的 IP地址;  If the smart DN S finds the record corresponding to the URL in the DNS resolution request locally, the smart DN S feeds back the corresponding IP address to the intranet DNS;
否则, 确定抓取的响应数据包中是否包括本网 IP地址, 并根据确定的结 果进一步确定是否对所述响应数据包中的 IP地址进行重排后发送至所述内网  Otherwise, determining whether the captured response packet includes the local network IP address, and further determining, according to the determined result, whether the IP address in the response packet is rearranged and sent to the intranet
17. 如权利要求 6所述的系统, 其中, 所述智能 DNS在确定接收的响应 数据包中包括本网 IP地址的情况下, 将所述响应数据包进行改写以将本网 IP 地址排在外网 IP地址之前, 并将改写过的响应数据包发送至所述内网 DNS。 17. The system according to claim 6, wherein the intelligent DNS rewrites the response data packet to exclude the local network IP address when determining that the received response data packet includes the local network IP address. Before the network IP address, the rewritten response data packet is sent to the intranet DNS.
18. 如权利要求 16所述的系统, 其中, 所述智能 DNS在确定接收的响应 数据包中不包括本网 IP地址的情况下, 指示 Caete系统访问所述接收的响应数 据包中的外网 IP地址并对获取的数据进行缓存, 同时, 所述智能 DNS增加指 示所述 URL与所述 Cache系统的 IP地址相对应的记录。  18. The system according to claim 16, wherein the intelligent DNS instructs the Caete system to access the external network in the received response data packet if it is determined that the received response data packet does not include the local network IP address. The IP address caches the acquired data, and the smart DNS adds a record indicating that the URL corresponds to the IP address of the Cache system.
19. 如权利要求 16所述的系统, 其中, 所述内网 DNS或所述智能 DNS对 接收的 DNS解析请求中的 URL进行统计和排序; 所述智能 DNS在确定接收的 响应数据包中不包括本网 IP地址的情况下, 查看所述内网 DNS或所述智能 DNS中的统计和排序结果, 并且, 对于被访问次数排名靠前的 URL, 所述智 能 DNS指示 Cache系统对相应的响应数据包中的外网 IP地址进行访问并对获 取的数据进行缓存, 同时, 所述智能 DNS增加指示所述 URL与所述 Cache系统 的 IP地址相对应的记录。  19. The system according to claim 16, wherein the intranet DNS or the smart DNS performs statistics and ordering on URLs in the received DNS resolution request; the intelligent DNS does not determine in the received response packet. In the case of the IP address of the local network, the statistics and the sorting result in the intranet DNS or the smart DNS are viewed, and the smart DNS instructs the Cache system to respond to the URL ranked first in the number of times visited. The external network IP address in the data packet is accessed and the obtained data is cached, and at the same time, the intelligent DNS adds a record indicating that the URL corresponds to the IP address of the Cache system.
20. 如权利要求】 6所述的系统, 其中, 所述内网 DNS确定接收到的响应 数据包来自所述智能 DNS或所述外网 DNS; 以及当确定接收到的响应数据包 来自所述外网 DNS时,减小该响应数据包中的 TTL值,并待减小后的 TTL值失 效后重新进行所述 URL解析。  20. The system of claim 6, wherein the intranet DNS determines that the received response data packet is from the smart DNS or the external network DNS; and when determining that the received response data packet is from the In the case of the external network DNS, the TTL value in the response packet is reduced, and the URL resolution is re-executed after the reduced TTL value expires.
21 . 一种智能 DNS, 包括:  21. A smart DNS, including:
获取模块, 获取外网 DNS对 DNS解析请求返回的响应数据包;  Obtaining a module, and obtaining a response packet returned by the external network DNS to the DNS resolution request;
确定模块, 确定所述响应数据包中是否包括本网 IP地址; 以及 改写模块, 在所述确定模块确定所述响应数据包中包括本网 地址的情 况下, 改写所述响应数据包以将所述本网 IP地址排在所述响应数据包中的外 网 IP地址之前。 Determining a module, determining whether the local IP address is included in the response packet; Rewriting the module, in the case that the determining module determines that the response data packet includes the local network address, rewriting the response data packet to rank the local network IP address in the external network IP address in the response data packet prior to.
22. 如权利要求 21所述的智能 DNS , 进一步包括:  22. The intelligent DNS of claim 21, further comprising:
Cache指示模块,在所述确定模块确定所述响应数据包中不包括本网] ίΡ地 址的情况下, 指示本网中的 Cache系统对所述响应数据包中的外网 IP地址进行 访问并对获取的数据进行缓存; 以及  The Cache indication module, when the determining module determines that the response data packet does not include the local network address, instructs the Cache system in the local network to access the external network IP address in the response data packet and The acquired data is cached;
存储模块,存储所述 DNS解析请求中的 URL与所述 Cache系统的 1GP地址相 对应的记录。  The storage module stores a record corresponding to a URL in the DNS resolution request and a 1GP address of the Cache system.
23. 如权利要求 21所述的智能 DNS , 进一步包括:  23. The intelligent DNS of claim 21, further comprising:
查询模块, 查询本网中的 URL访问统计结果;  The query module queries the URL access statistics in the local network.
Cache指示模块, 根据所述 URL访问统计结果, 指示本网中的 Cache系统 对所述 URL访问统计结果中排名靠前的 URL所对应的响应数据包中的外网 IP 地址进行访问并对获取的数据进行缓存; 以及  The Cache indication module, according to the URL access statistics result, instructs the Cache system in the local network to access and obtain the external network IP address in the response data packet corresponding to the top URL in the URL access statistics result. Data is cached; and
存储模块, 存储所述 URL与所述 Cache系统的 IP地址相对应的记录。  And a storage module, configured to store the record corresponding to the IP address of the Cache system.
24. 如权利要求 2 所述的智能 DNS , 其中, 所述获取模块直接接收所述 响应数据包或通过抓包获取所述响应数据包。  24. The intelligent DNS of claim 2, wherein the obtaining module directly receives the response data packet or acquires the response data packet by capturing a packet.
25. 一种包括指令的计算机程序, 所述指令在由处理器执行时被设置成 使所述处理器执行如权利要求 -5中任一项所述的方法。  25. A computer program comprising instructions, which when executed by a processor, are arranged to cause the processor to perform the method of any of claims.
26. 一种存储了如权利要求 25所述计算机程序的存储介质。  26. A storage medium storing a computer program as claimed in claim 25.
PCT/CN2012/071972 2011-03-09 2012-03-06 Method, system, intelligent dns, computer program and storage medium for parsing dns resolution requests WO2012119538A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110056096.XA CN102685259B (en) 2011-03-09 2011-03-09 To method, system and intelligent DNS that dns resolution request is resolved
CN201110056096.X 2011-03-09

Publications (1)

Publication Number Publication Date
WO2012119538A1 true WO2012119538A1 (en) 2012-09-13

Family

ID=46797489

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/071972 WO2012119538A1 (en) 2011-03-09 2012-03-06 Method, system, intelligent dns, computer program and storage medium for parsing dns resolution requests

Country Status (2)

Country Link
CN (1) CN102685259B (en)
WO (1) WO2012119538A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315852A (en) * 2021-04-27 2021-08-27 北京奇艺世纪科技有限公司 Domain name resolution method, device and system

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702705B (en) * 2013-12-04 2019-05-24 中国移动通信集团公司 A kind of domain name analytic method, equipment and system
CN103684885B (en) * 2013-12-31 2017-03-29 新浪网技术(中国)有限公司 A kind of Website server access exception determines method and device
CN103929507B (en) * 2014-04-28 2017-10-10 广东睿江云计算股份有限公司 A kind of realize can change the method and device of DNS service offline
CN104539751B (en) * 2014-12-29 2018-02-09 北京奇艺世纪科技有限公司 DNS resolution system, method and device
CN107872544A (en) * 2016-09-28 2018-04-03 中兴通讯股份有限公司 A kind of domain name analytic method, device, gateway and system
CN107749898B (en) * 2017-08-24 2021-08-13 深圳市大讯永新科技有限公司 DNS access data classification and intranet access ratio improvement method and system
CN114614999B (en) * 2020-12-03 2023-09-26 广州视源电子科技股份有限公司 Network access method, device, equipment and storage medium
CN115297088A (en) * 2022-08-03 2022-11-04 中电云数智科技有限公司 Domain name resolution system and method in cloud computing environment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159597A (en) * 2007-09-14 2008-04-09 腾讯科技(深圳)有限公司 Method, system and related equipment of obtaining software configuration information
CN101582925A (en) * 2009-06-15 2009-11-18 中兴通讯股份有限公司 Network address translation method and system
US7844735B2 (en) * 2005-05-03 2010-11-30 International Business Machines Corporation Determining address of edge server by using authoritative domain name server and bypassing assigned domain name server

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610294A (en) * 2009-07-15 2009-12-23 浪潮电子信息产业股份有限公司 A kind of method of utilizing intelligent DNS to improve website visiting speed
CN101616079B (en) * 2009-07-30 2011-07-27 杭州华三通信技术有限公司 NAT outlet link load balancing method and device of DNS request message
CN101873358B (en) * 2010-06-11 2014-09-10 杭州华三通信技术有限公司 Method and device for balancing link load on basis of domain name resolution

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7844735B2 (en) * 2005-05-03 2010-11-30 International Business Machines Corporation Determining address of edge server by using authoritative domain name server and bypassing assigned domain name server
CN101159597A (en) * 2007-09-14 2008-04-09 腾讯科技(深圳)有限公司 Method, system and related equipment of obtaining software configuration information
CN101582925A (en) * 2009-06-15 2009-11-18 中兴通讯股份有限公司 Network address translation method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113315852A (en) * 2021-04-27 2021-08-27 北京奇艺世纪科技有限公司 Domain name resolution method, device and system
CN113315852B (en) * 2021-04-27 2023-11-24 北京奇艺世纪科技有限公司 Domain name resolution method, device and system

Also Published As

Publication number Publication date
CN102685259A (en) 2012-09-19
CN102685259B (en) 2015-08-19

Similar Documents

Publication Publication Date Title
WO2012119538A1 (en) Method, system, intelligent dns, computer program and storage medium for parsing dns resolution requests
US11194719B2 (en) Cache optimization
US9191458B2 (en) Request routing using a popularity identifier at a DNS nameserver
US20180205697A1 (en) Managing content delivery network service providers by a content broker
EP2266064B1 (en) Request routing
US8521885B1 (en) Dynamically translating resource identifiers for request routing using popularity information
US8458250B2 (en) Request routing using network computing components
US8224964B1 (en) System and method of accessing a document efficiently through multi-tier web caching
US8732309B1 (en) Request routing utilizing cost information
EP3022708B1 (en) Content source discovery
US20140115120A1 (en) Content Delivery Network CDN Routing Method, Device, and System
EP2552082B1 (en) Favourite web site acceleration method and system
CN115701067A (en) Method, device and system for switching edge nodes of user side

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12755591

Country of ref document: EP

Kind code of ref document: A1