WO2020220801A1 - 域名解析方法及系统及存储介质 - Google Patents

域名解析方法及系统及存储介质 Download PDF

Info

Publication number
WO2020220801A1
WO2020220801A1 PCT/CN2020/076110 CN2020076110W WO2020220801A1 WO 2020220801 A1 WO2020220801 A1 WO 2020220801A1 CN 2020076110 W CN2020076110 W CN 2020076110W WO 2020220801 A1 WO2020220801 A1 WO 2020220801A1
Authority
WO
WIPO (PCT)
Prior art keywords
domain name
query
suffix
template
resolution
Prior art date
Application number
PCT/CN2020/076110
Other languages
English (en)
French (fr)
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 WO2020220801A1 publication Critical patent/WO2020220801A1/zh

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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Definitions

  • the embodiment of the present invention relates to but not limited to DNS (Domain Name System, Domain Name System) technology, and particularly relates to a domain name resolution method, system and storage medium.
  • DNS Domain Name System, Domain Name System
  • DNS Domain Name System, Domain Name System
  • DNS Domain Name System
  • DNS is also the basis of intelligent scheduling in the CDN (Content Delivery Network) business, providing users with domain name access services.
  • CDN vendors only provide a domain name access suffix (such as xxx.com).
  • domain name access suffix such as xxx.com
  • multiple access domain names will be prepared for users, so as to realize the mutual backup of multiple resolution groups and ensure the stable operation of services.
  • the configuration of these alternate resolution groups are generally identical, and only the provided access domain names are different.
  • the usual processing method is to completely copy the original configuration data and use it in different resolution groups.
  • DNS software such as bind
  • multiple domain name configurations will be loaded , And the configuration content is exactly the same. This will take up a lot of memory in the DNS software, and the configuration will be redundant. At the same time, it affects the loading time of the entire configuration and has a certain impact on the efficiency of the service.
  • the embodiment of the present invention provides a domain name resolution method and system, which can solve the problem that existing DNS software cannot achieve mutual backup of multiple resolution groups.
  • the embodiment of the present invention discloses a domain name resolution system, which includes a receiving module, a sending module and a core processing module, and also includes:
  • the configuration management module stores the correspondence between different template domain name configuration data and domain name groupings
  • the suffix processing module when the receiving module receives the domain name query request, matches the requested query domain name with the domain name group in the corresponding relationship, and for the query domain name that successfully matches the domain name group in the corresponding relationship, Before the core processing module performs domain name resolution, replace the domain name suffix of the query domain name with the template domain name suffix in the template domain name configuration data corresponding to the matching domain name group in the correspondence, and obtain the domain name in the core processing module After the parsing result, the template domain name suffix in the parsing result is replaced with the domain name suffix of the query domain name, and the response to the domain name query request is fed back through the sending module.
  • the suffix processing module matches the query domain name with the domain name grouping in the corresponding relationship, and if the matching fails, the query domain name is directly sent to the core processing module for domain name resolution, and the After the core processing module obtains the domain name resolution result, it uses the resolution result as a response to the domain name query request for feedback through the sending module.
  • the configuration management module stores the correspondence between different template domain name configuration data and domain name groupings, including:
  • the configuration management module stores multiple domain name groups. All domain names in the same domain name group correspond to the same set of template domain name configuration data, and different domain name groups correspond to store different sets of template domain name configuration data.
  • the process of the suffix processing module matching the query domain name with the domain name grouping in the corresponding relationship includes:
  • the query domain name is searched from a plurality of domain name groups stored by the configuration management module, and if the query domain name is found, the query domain name matches the domain name group containing the query domain name in the corresponding relationship successfully.
  • the suffix processing module saves the domain name suffix of the query domain name for the query domain name that successfully matches the domain name grouping in the corresponding relationship, and obtains the domain name of the query domain name in the core processing module After the parsing result, it is determined that the matching result of the query domain name and the domain name grouping in the corresponding relationship is successful, then the template domain name suffix in the resolution result is replaced with the domain name suffix of the saved query domain name as the The response to the domain name query request is fed back through the sending module.
  • the embodiment of the invention also discloses a domain name resolution method, including:
  • the requested query domain name is matched with the domain name group in the correspondence relationship between the different template domain name configuration data and the domain name group stored in advance;
  • the template domain name suffix in the resolution result is replaced with the domain name suffix of the query domain name, and the resolution result after the replacement processing is sent as a response to the domain name query request.
  • the method further includes:
  • the query domain name fails to match the domain name grouping in the corresponding relationship, the query domain name is directly subjected to domain name resolution, and the obtained domain name resolution result is sent as a response to the domain name query request.
  • the above method also includes:
  • Pre-store multiple domain name groups all domain names in the same domain name group correspond to the same set of template domain name configuration data, and different domain name groups correspond to store different template domain name configuration data.
  • the process of matching the query domain name with the pre-stored different template domain name configuration data and the domain name group in the corresponding relationship between the domain name group includes:
  • the query domain name is searched from the plurality of pre-stored domain name groups, and if the query domain name is found, the query domain name is successfully matched with the domain name group containing the query domain name in the correspondence relationship.
  • the method further includes:
  • the process of replacing the template domain name suffix in the resolution result with the domain name suffix of the query domain name includes:
  • the template domain name suffix in the resolution result should be replaced with the saved query domain name Domain name suffix.
  • the embodiment of the invention also discloses a domain name resolution system, including:
  • the processor is configured to:
  • the embodiment of the present invention also provides a computer-readable storage medium, the storage medium stores a computer program, and the program implements the steps of the above method when the program is executed by a processor.
  • the technical solution of the present application provides a DNS resolution solution, which can optimize logical processing for different domain names with the same configuration, and achieve the purpose of mutual backup of multiple resolution groups.
  • Figure 1 is a schematic structural diagram of a DNS resolution system in an embodiment of the present invention
  • FIG. 2 is a diagram of the correspondence between domain name grouping and template domain name configuration in an embodiment of the present invention
  • FIG. 3 is a flowchart of DNS resolution in an embodiment of the present invention.
  • the internal logic of the DNS software is modified to realize the purpose of mutual backup of multiple resolution groups of the DNS software.
  • This solution includes a configuration management module, a DNS receiving module (also referred to as a receiving module), a suffix processing module, a core processing module, and a DNS sending module (also referred to as a sending module), etc.
  • the architecture is shown in Figure 1.
  • This module is set to manage the correspondence between different template domain name configuration data and domain name groupings.
  • This configuration can indicate that domain names in the same domain name group use exactly the same template domain name configuration data, that is, use exactly the same template
  • the multiple domain names in the domain name group of the domain name configuration data are mutually backup resolution groups, so as to realize the mutual backup of multiple resolution groups, so that users can quickly switch between multiple domain names in the same domain name group according to actual needs (for example, After the user uses the testa.com domain name as the accelerated domain name, if there is a problem with the domain name, the user can switch to a different domain name under the same domain name group (such as testb.com).
  • template associated domain names are all domain names in the same domain name group.
  • the template domain name can be considered as a non-real domain name, which is mainly set to define a piece of configuration data, and multiple real domain names can use the same configuration at the same time.
  • FIG. 2 of the embodiment of the present invention is only an example of the foregoing correspondence relationship, that is, a domain name group and its corresponding template domain name configuration data.
  • the correspondence between template domain name configuration data and domain name grouping can also include multiple domain name groupings. Each domain name grouping corresponds to a set of template domain name configuration data.
  • the template domain name configuration data corresponding to different domain name groups is different. .
  • DNS receiving module responsible for receiving DNS query requests.
  • DNS sending module responsible for sending responses to DNS query requests.
  • Suffix processing module This module is divided into two processes:
  • Process 1 After receiving the DNS query request, query the domain name according to the query request, and perform matching from the domain name list (that is, the domain name grouping). If the matching result is a successful match, replace the domain name suffix with the template domain name suffix , And save the real domain name (also known as the original domain name, that is, the query domain name). If the matching result is not matched, it will not be processed. Then transfer the processing flow to the core processing module;
  • Core processing module responsible for processing DNS query requests, and find the corresponding response results from the template domain name configuration data (ie, perform query domain name resolution).
  • the process of DNS resolution by the above-mentioned DNS resolution system can refer to the process shown in Figure 3, which mainly includes the following operation steps:
  • step S2 Extract the query domain name (such as www.testa.com) from the DNS query request, and determine whether it matches the domain name grouping in the configuration (that is, find the queried domain name from the template associated domain name shown in Figure 2), If the matching is successful (that is, the queried domain name exists in the template associated domain name), step S3 is executed, and if the matching is unsuccessful, step S4 is executed;
  • the query domain name such as www.testa.com
  • the way to determine whether the query domain name matches the domain name group may be to compare the query domain name with each domain name in the domain name group. If the comparison finds that the domain name group contains a domain name that is completely consistent with the query domain name, Confirm that the query domain name matches the domain name grouping.
  • S3 replace the template domain name suffix corresponding to the query domain name and the domain name group to which it belongs (for example, after replacing the suffix of www.testa.com, change it to www.template1.com), and then save the original domain name suffix (testa .com) is used for restoration after processing (that is, used for the operation of S6 below);
  • step S5 After the core processing is completed, perform processing according to the previously checked matching situation (that is, the matching result of step S2 above), that is, the queried domain name matches the domain name grouping in the configuration, then step S6 is executed, if the queried domain name matches If the domain name grouping in the configuration does not match, go to step S7;
  • the DNS sending module sends the DNS resolution result.
  • This embodiment provides a DNS resolution method, which mainly includes the following operations:
  • Step 1 Receive a domain name query request, and match the query domain name in the domain name query request with the domain name group from the correspondence between different template domain name configuration data and domain name groups stored in advance;
  • Step 2 When the query domain name is successfully matched with the domain name group in the pre-stored correspondence relationship, the domain name suffix of the query domain name is replaced with the domain name suffix of the template domain name corresponding to the matched domain name group in the correspondence relationship, and then domain name resolution is performed;
  • Step 3 After obtaining the domain name resolution result, restore the domain name suffix of the template domain name in the resolution result to the domain name suffix of the query domain name, and finally send the resolution result after the replacement process as a response to the domain name query request.
  • the way of pre-stored correspondence between different template domain name configuration data and domain name groups may be to store multiple domain name groups in advance, and then store different template domain name configuration data corresponding to different domain name groups.
  • This can indicate that the domain names in the same domain name group use exactly the same template domain name configuration data, so that multiple domain names in the same domain name group are mutually backup resolution groups, thereby achieving mutual backup of multiple resolution groups.
  • the query domain name there are many ways to match the query domain name with different pre-stored template domain name configuration data and the domain name group in the corresponding relationship between the domain name group.
  • One of the ways can be grouping from multiple pre-stored domain names.
  • the query domain name if the query domain name is found, it is considered that the query domain name matches the domain name group containing the query domain name in the corresponding relationship successfully.
  • the matching failure may also occur, that is, all domain names If all domain names in the group are different from the query domain name, it is considered that the matching fails.
  • the operation can be performed according to the existing technology, that is, no suffix replacement operation is required, but the query domain name is directly resolved and the obtained domain name
  • the analysis result can be sent as a response to the domain name query request. It can be seen that while optimizing the configuration operation, this application also achieves compatibility with the existing technology.
  • This embodiment provides a DNS resolution system, which may be a DNS resolution software system, or a DNS resolution device. It mainly includes: a processor; and a memory storing executable instructions of the processor.
  • the processor is configured as:
  • the domain name suffix of the template domain name in the resolution result is restored to the domain name suffix of the query domain name, and the resolution result after the replacement process is finally sent as a response to the domain name query request.
  • the DNS resolution system provided in this embodiment can implement the DNS resolution method shown in the foregoing embodiment 2. Therefore, other operations performed on the processor of the system can refer to the corresponding content of the foregoing embodiment 2, which will not be repeated here.
  • the embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method shown in Embodiment 2 are implemented;
  • the computer-readable storage medium provided in this embodiment can implement the DNS resolution method shown in Embodiment 2 above. Therefore, other operations performed on the processor of this system can refer to the corresponding content of Embodiment 2 above, which will not be repeated here.
  • the embodiment of the present invention provides a DNS resolution solution, which can optimize the logical processing of different domain names with the same configuration, achieve the purpose of mutual backup of multiple resolution groups, and also has the following advantages:
  • the configuration is more flexible and not bloated
  • Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium).
  • the term computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Sexual, removable and non-removable media.
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media .
  • These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
  • the terms "including”, “including” or any other variations thereof are intended to cover non-exclusive inclusion, so that an article or device including a series of elements not only includes those elements, but also includes those elements that are not explicitly listed. Other elements listed, or also include elements inherent to this kind of article or equipment. If there are no more restrictions, the element defined by the sentence "including" does not exclude the existence of another same element in the article or equipment that includes the element.
  • the embodiment of the present invention provides a domain name resolution method, system and storage medium, which can solve the problem of large memory occupation of DNS software and configuration redundancy in the prior art. And because of the modification of the DNS resolution core processing logic, even with the increase of the resolution group backup, it will not bring additional memory usage and increase in reload time; the configuration is more flexible and not bloated.
  • multiple resolution groups are provided, and each resolution group corresponds to the same configuration data. There is no need to configure each domain name in the same resolution group separately, minus the operation of repeatedly setting the same configuration data, it is an existing configuration
  • the optimized operation of data has very little impact on the DNS software itself. While optimizing the configuration operation, the embodiment of the present invention also realizes compatibility with the prior art.

Abstract

本发明实施例公开了一种域名解析方法及设备,涉及DNS技术。本申请公开的一种域名解析系统,包括:配置管理模块,存储不同的模板域名配置数据与域名分组之间的对应关系;后缀处理模块,在接收模块收到域名查询请求时,将请求的查询域名与所述对应关系中的域名分组进行匹配,针对匹配成功的查询域名,在进行域名解析之前,将查询域名的域名后缀替换为对应关系中匹配的域名分组对应的模板域名配置数据中的模板域名后缀,并在得到域名解析结果之后,将解析结果中的模板域名后缀替换成查询域名的域名后缀,作为域名查询请求的应答进行反馈。

Description

域名解析方法及系统及存储介质
本申请要求在2019年4月29日提交中国专利局、申请号为201910354452.2、发明名称为“一种域名解析方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及但不限于DNS(Domain Name System,域名系统)技术,特别涉及一种域名解析方法及系统及存储介质。
背景技术
DNS(Domain Name System,域名系统)是一项因特网基础服务,作为域名与IP地址相互映射的分布式数据库,使用户能够方便地访问互联网;当用户通过域名访问某一站点时,会先发起一条DNS查询请求到DNS服务器,查询域名对应的IP地址,然后用户利用该IP地址去访问服务器的资源。
DNS也是CDN(Content Delivery Network,内容分发网络)业务中智能调度的基础,为用户提供域名接入服务,通常情况CDN厂商只会提供一个域名接入后缀(如xxx.com),个别情况下(为防止单一域名存在问题,如被劫持)会为用户准备多个接入域名,从而实现多解析组互备,保证服务的稳定运行。
这种情况下,这些互备的解析组一般配置都是完全相同,仅提供的接入域名不同。通常的处理方法都是将原有的配置数据完全复制一份出来,用在不同的解析组上,这时候,针对DNS软件(如bind)来说,此种情况下,会加载多个域名配置,而且配置内容完全一样,这样对DNS软件的内存占用较大,并且配置冗余,同时又影响整个配置的加载时间,对服务的高效性有一定的影响。
发明内容
以下是对本发明实施例详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种域名解析方法及系统,可以解决现有DNS软件无法达到多解析组互备的问题。
本发明实施例公开了一种域名解析系统,包括接收模块、发送模块以及核心处理模块,还包括:
配置管理模块,存储不同的模板域名配置数据与域名分组之间的对应关系;
后缀处理模块,在所述接收模块收到域名查询请求时,将请求的查询域名与所述对应关系中的域名分组进行匹配,针对与所述对应关系中的域名分组匹配成功的查询域名,在所述核心处理模块进行域名解析之前,将所述查询域名的域名后缀替换为所述对应关系中匹配的域名分组对应的模板域名配置数据中的模板域名后缀,并在所述核心处理模块得到域名解析结果之后,将所述解析结果中的模板域名后缀替换成所述查询域名的域名后缀,作为所述域名查询请求的应答通过所述发送模块进行反馈。
其中,上述系统中,所述后缀处理模块,将查询域名与所述对应关系中的域名分组进行匹配后,若匹配失败,则将查询域名直接发送给所述核心处理模块进行域名解析,并在所述核心处理模块得到域名解析结果之后,将所述解析结果作为所述域名查询请求的应答通过所述发送模块进行反馈。
其中,上述系统中,所述配置管理模块,存储不同的模板域名配置数据与域名分组之间的对应关系,包括:
所述配置管理模块,存储有多个域名分组,同一个域名分组中的所有域名对应存储同一套模板域名配置数据,不同的域名分组对应存储不同套的模板域名配置数据。
其中,上述系统中,所述后缀处理模块,将查询域名与所述对应关系中的域名分组进行匹配的过程,包括:
从所述配置管理模块存储的多个域名分组中,查找所述查询域名,若查找到所述查询域名,则所述查询域名与所述对应关系中包含有查询域名的域名分组匹配成功。
其中,上述系统中,所述后缀处理模块,针对与所述对应关系中的域名分组匹配成功的查询域名,还保存所述查询域名的域名后缀,并在所述核心处理模块得到查询域名的域名解析结果之后,确定所述查询域名与所述对应关系中 的域名分组的匹配结果为成功,则该将所述解析结果中的模板域名后缀替换成所保存的查询域名的域名后缀,作为所述域名查询请求的应答通过所述发送模块进行反馈。
本发明实施例还公开了一种域名解析方法,包括:
当接收到域名查询请求时,将请求的查询域名与预先存储的不同的模板域名配置数据与域名分组的对应关系中的域名分组进行匹配;
若所述查询域名与所述对应关系中的域名分组匹配成功,则将所述查询域名的域名后缀替换为所述对应关系中匹配的域名分组对应的模板域名配置数据中的模板域名后缀,进行域名解析;
得到域名解析结果后,将所述解析结果中的模板域名后缀替换成所述查询域名的域名后缀,将替换处理后的解析结果作为所述域名查询请求的应答进行发送。
其中,上述方法中,所述将查询域名与预先存储的不同的模板域名配置数据与域名分组的对应关系中的域名分组进行匹配之后,该方法还包括:
若所述查询域名与所述对应关系中的域名分组匹配失败,则将所述查询域名直接进行域名解析,并将得到的域名解析结果,作为所述域名查询请求的应答进行发送。
其中,上述方法还包括:
预先存储多个域名分组,同一个域名分组中的所有域名对应存储同一套模板域名配置数据,不同的域名分组对应存储不同的模板域名配置数据。
其中,上述方法中,所述将查询域名与预先存储的不同的模板域名配置数据与域名分组的对应关系中的域名分组进行匹配的过程,包括:
从所述预先存储的多个域名分组中,查找所述查询域名,若查找到所述查询域名,则所述查询域名与所述对应关系中包含有查询域名的域名分组匹配成功。
其中,上述方法中,将所述查询域名的域名后缀替换为所述对应关系中匹配的域名分组对应的模板域名的域名后缀之后,该方法还包括:
保存所述查询域名的域名后缀;
所述得到域名解析结果后,将所述解析结果中的模板域名后缀替换成所述查询域名的域名后缀的过程,包括:
在得到查询域名的域名解析结果之后,如果确定所述查询域名与所述对应关系中的域名分组的匹配结果为成功,则该将所述解析结果中的模板域名后缀替换成所保存的查询域名的域名后缀。
本发明实施例还公开了一种域名解析系统,包括:
处理器;
以及存储处理器可执行指令的存储器;
其中,所述处理器被配置为:
执行实现上述任一项所述的域名解析方法的指令。
本发明实施例还提供了一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
本申请技术方案提供了一种DNS解析方案,可以针对具有相同配置的不同域名进行逻辑处理优化,达到多解析组互备的目的。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图说明
并入到说明书中并且构成说明书的一部分的附图示出了本发明的实施例,并且与描述一起用于解释本发明实施例的原理。在这些附图中,类似的附图标记用于表示类似的要素。下面描述中的附图是本发明的一些实施例,而不是全部实施例。对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,可以根据这些附图获得其他的附图。
图1是本发明实施例中DNS解析系统的结构示意图;
图2是本发明实施例中域名分组与模板域名配置对应关系图;
图3是本发明实施例中DNS解析流程图。
具体实施方式
下文将结合附图对本发明实施例技术方案作进一步详细说明。需要说明的是,在不冲突的情况下,本申请的实施例和实施例中的特征可以任意相互组合。
实施例1
本发明实施例通过修改DNS软件内部逻辑,实现DNS软件的多解析组互备的目的。
下面以一种实际实施方式为例,详细说明本实施例的DNS解析系统原理。本方案包括配置管理模块、DNS接收模块(也可简称为接收模块)、后缀处理模块、核心处理模块以及DNS发送模块(也可简称为发送模块)等,其架构如图1所示。
配置管理模块:该模块设置为管理不同的模板域名配置数据和域名分组之间的对应关系,该配置可以说明同一个域名分组内的域名使用完全相同的模板域名配置数据,即使用完全相同的模板域名配置数据的域名分组中的多个域名之间为互备的解析组,从而实现多解析组互备,使得用户可以根据实际需要在同一个域名分组中多个域名之间进行快速切换(例如,用户使用testa.com域名作为加速域名后,若该域名出现问题,则用户可以切换到同一个域名分组下的不同域名如testb.com)。
本实施例中不同的模板域名配置数据和域名分组之间的对应关系如图2所示,图中模板关联域名即为同一个域名分组中的所有域名。本发明实施例中,模板域名可认为是一个非真实存在的域名,主要设置成定义一份配置数据,多个真实存在的域名可以同时使用相同的配置。本发明实施例的图2仅是上述对应关系的一种示例,即一个域名分组及其对应的模板域名配置数据。而在其他场景中,模板域名配置数据和域名分组之间的对应关系还可以包括多个域名分组,每一个域名分组对应一套模板域名配置数据,不同的域名分组对应的模板域名配置数据不相同。
DNS接收模块:负责接收DNS查询请求。
DNS发送模块:负责发送DNS查询请求的应答。
后缀处理模块:该模块分两个过程:
过程1,当接收到DNS查询请求后,根据查询请求中查询域名,从域名列 表(即相当于从域名分组)中进行匹配,若匹配结果是匹配成功,则进行域名后缀与模板域名后缀的替换,并保存真正的域名(也可称为原始域名,即查询域名),若匹配结果是没匹配上,则不进行处理。接着将处理流程转到核心处理模块;
过程2,当核心处理模块处理完成后,在DNS发送模块准备发送应答结果前,若之前匹配到了域名分组,则将域名解析结果中对应的模板域名再还原回真正请求域名的后缀(即查询域名的域名后缀),作为DNS查询请求的应答结果。核心处理模块:负责处理DNS查询请求,从模板域名配置数据中找到对应的应答结果(即进行查询域名解析)。
其中,上述DNS解析系统进行DNS解析的过程可以参考图3所示的流程,主要包括如下操作步骤:
S1,首先DNS接收模块收DNS查询请求;
S2,从DNS查询请求中提取出查询域名(如:www.testa.com),判断是否和配置中的域名分组相匹配(即从图2所示的模板关联域名中查找所查询的域名),如果匹配成功(即模板关联域名中存在所查询的域名),则执行步骤S3,如果匹配不成功,执行步骤S4;
本实施例中,判断查询域名与域名分组是否匹配的方式可以是,将查询域名与域名分组中的各域名分别进行比对,如果比对发现域名分组中包含有与查询域名完全一致的域名,则确认查询域名与该域名分组相匹配。
S3,进行查询域名与其所属的域名分组对应的模板域名后缀的替换(如:将www.testa.com的后缀替换后,变更为www.template1.com),此时可以保存原始的域名后缀(testa.com)用于处理后的还原(即用于下文中S6的操作);
S4,进行DNS核心逻辑处理,查找对应域名的解析结果(www.template1.com 600 IN A 1.1.1.1)。
S5,核心处理完成后,根据之前检查的匹配情况(即上述步骤S2的匹配结果)进行处理,即所查询的域名与配置中的域名分组相匹配,则执行步骤S6,如果所查询的域名与配置中的域名分组不匹配,则执行步骤S7;
S6,将解析结果中的模板域名的后续替换为所保存的真实域名的后缀的,即替换后的解析结果变更为www.testa.com 600 IN A 1.1.1.1;
S7,由DNS发送模块,将DNS解析结果发送出去。
实施例2
本实施例提供一种DNS解析方法,主要包括如下操作:
步骤一,接收域名查询请求,从预先存储的不同的模板域名配置数据与域名分组的对应关系中,对域名查询请求中的查询域名与域名分组进行匹配;
步骤二,当查询域名与预先存储的对应关系中的域名分组匹配成功,则将查询域名的域名后缀替换为对应关系中匹配的域名分组对应的模板域名的域名后缀,再进行域名解析;
步骤三,得到域名解析结果后,将解析结果中的模板域名的域名后缀还原成查询域名的域名后缀,最后将替换处理后的解析结果作为域名查询请求的应答进行发送。
本实施例中预先存储的不同的模板域名配置数据与域名分组的对应关系的方式可以是,预先存储多个域名分组,再针对不同的域名分组对应存储不同的模板域名配置数据。这样可以说明同一个域名分组内的域名使用完全相同的模板域名配置数据,使得同一个域名分组中的多个域名之间为互备的解析组,从而实现多解析组互备。尤其在多个域名使用完全相同的模板域名配置数据,无需重复配置和存储,简化配置操作和减小存储空间的占用。
本实施例中将查询域名与预先存储的不同的模板域名配置数据与域名分组的对应关系中的域名分组进行匹配的方式有多种,其中之一的方式可以是从预先存储的多个域名分组中,查找查询域名,若查找到查询域名,则认为查询域名与对应关系中的包含有查询域名的那一个域名分组匹配成功。
还要说明的是,按照上述方法的操作,将查询域名与预先存储的不同的模板域名配置数据与域名分组的对应关系中的域名分组进行匹配之后,还可能出现匹配失败的情况,即所有域名分组中的所有域名均与查询域名不相同则认为匹配失败,此时,可以按照现有技术进行操作,即无需再进行后缀替换操作,而是直接对查询域名进行域名解析,并将得到的域名解析结果,作为域名查询请求的应答进行发送即可。可见,本申请在优化配置操作的同时,还实现了与现有技术的兼容。
实施例3
本实施例提供一种DNS解析系统,可以是DNS解析软件系统,或DNS解析设备等。其主要包括:处理器;以及存储处理器可执行指令的存储器。
其中,处理器被配置为:
接收域名查询请求,从预先存储的不同的模板域名配置数据与域名分组的对应关系中,对域名查询请求中的查询域名与域名分组进行匹配;
当查询域名与预先存储的对应关系中的域名分组匹配成功,则将查询域名的域名后缀替换为对应关系中匹配的域名分组对应的模板域名的域名后缀,再进行域名解析;
得到域名解析结果后,将解析结果中的模板域名的域名后缀还原成查询域名的域名后缀,最后将替换处理后的解析结果作为域名查询请求的应答进行发送。
本实施例提供的DNS解析系统可以实施上述实施例2所示的DNS解析方法,因此对本系统的处理器执行的其他操作可以参考上述实施例2的相应内容,在此不再赘述。
实施例4
本发明实施例提供了一种计算机可读存储介质,此存储介质上存储有计算机程序,所述程序被处理器执行时实现实施例2所示方法的步骤;
其中,所述程序被处理器执行时实现:
接收域名查询请求,从预先存储的不同的模板域名配置数据与域名分组的对应关系中,对域名查询请求中的查询域名与域名分组进行匹配;
当查询域名与预先存储的对应关系中的域名分组匹配成功,则将查询域名的域名后缀替换为对应关系中匹配的域名分组对应的模板域名的域名后缀,再进行域名解析;
得到域名解析结果后,将解析结果中的模板域名的域名后缀还原成查询域名的域名后缀,最后将替换处理后的解析结果作为域名查询请求的应答进行发 送。本实施例提供的计算机可读存储介质可以实施上述实施例2所示的DNS解析方法,因此对本系统的处理器执行的其他操作可以参考上述实施例2的相应内容,在此不再赘述。
从上述实施例可以看出,本发明实施例提供了一种DNS解析方案,它可以针对具有相同配置的不同域名进行逻辑处理优化,达到多解析组互备的目的,并同时具备如下优势:
1、由于修改DNS解析核心处理逻辑,因此即使随着解析组备份的增加也不会带来额外的内存占用和重载时间的增加;
2、配置比较灵活、且不臃肿;
3、提供多个解析组,且每个解析组对应相同的配置数据,无需对同一解析组内的每个域名分别进行配置,减去了重复设置相同的配置数据的操作,是对现有配置数据的优化操作,因此对DNS软件自身影响非常小。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数 据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
本发明实施例是参照根据本发明实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在本发明实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的物品或者设备中还存在另外的相同要素。
尽管已描述了本发明的示例性实施例中,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括示例性实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明的意图也包含这些改动和变型在内。
工业实用性
本发明实施例提供了域名解析方法及系统及存储介质,其能解决现有技术中DNS软件的内存占用较大,并且配置冗余的问题。并且由于修改DNS解析核心处理逻辑,因此即使随着解析组备份的增加也不会带来额外的内存占用和重载时间的增加;配置比较灵活、且不臃肿。此外,提供多个解析组,且每个解析组对应相同的配置数据,无需对同一解析组内的每个域名分别进行配置,减去了重复设置相同的配置数据的操作,是对现有配置数据的优化操作,因此对DNS软件自身影响非常小。本发明实施例在优化配置操作的同时,还实现了与现有技术的兼容。

Claims (12)

  1. 一种域名解析系统,包括接收模块、发送模块以及核心处理模块,还包括:
    配置管理模块,存储不同的模板域名配置数据与域名分组之间的对应关系;
    后缀处理模块,在所述接收模块收到域名查询请求时,将请求的查询域名与所述对应关系中的域名分组进行匹配,针对与所述对应关系中的域名分组匹配成功的查询域名,在所述核心处理模块进行域名解析之前,将所述查询域名的域名后缀替换为所述对应关系中匹配的域名分组对应的模板域名配置数据中的模板域名后缀,并在所述核心处理模块得到域名解析结果之后,将所述解析结果中的模板域名后缀替换成所述查询域名的域名后缀,作为所述域名查询请求的应答通过所述发送模块进行反馈。
  2. 如权利要求1所述的系统,其中,
    所述后缀处理模块,将查询域名与所述对应关系中的域名分组进行匹配后,若匹配失败,则将查询域名直接发送给所述核心处理模块进行域名解析,并在所述核心处理模块得到域名解析结果之后,将所述解析结果作为所述域名查询请求的应答通过所述发送模块进行反馈。
  3. 如权利要求1或2所述的系统,其中,所述配置管理模块,存储不同的模板域名配置数据与域名分组之间的对应关系,包括:
    所述配置管理模块,存储有多个域名分组,同一个域名分组中的所有域名对应存储同一套模板域名配置数据,不同的域名分组对应存储不同套的模板域名配置数据。
  4. 如权利要求3所述的系统,其中,所述后缀处理模块,将查询域名与所述对应关系中的域名分组进行匹配的过程,包括:
    从所述配置管理模块存储的多个域名分组中,查找所述查询域名,若查找到所述查询域名,则所述查询域名与所述对应关系中包含有查询域名的域名分组匹配成功。
  5. 如权利要求3所述的系统,其中,
    所述后缀处理模块,针对与所述对应关系中的域名分组匹配成功的查询域 名,还保存所述查询域名的域名后缀,并在所述核心处理模块得到查询域名的域名解析结果之后,确定所述查询域名与所述对应关系中的域名分组的匹配结果为成功,则该将所述解析结果中的模板域名后缀替换成所保存的查询域名的域名后缀,作为所述域名查询请求的应答通过所述发送模块进行反馈。
  6. 一种域名解析方法,包括:
    当接收到域名查询请求时,将请求的查询域名与预先存储的不同的模板域名配置数据与域名分组的对应关系中的域名分组进行匹配;
    若所述查询域名与所述对应关系中的域名分组匹配成功,则将所述查询域名的域名后缀替换为所述对应关系中匹配的域名分组对应的模板域名配置数据中的模板域名后缀,进行域名解析;
    得到域名解析结果后,将所述解析结果中的模板域名后缀替换成所述查询域名的域名后缀,将替换处理后的解析结果作为所述域名查询请求的应答进行发送。
  7. 如权利要求6所述的方法,其中,所述将查询域名与预先存储的不同的模板域名配置数据与域名分组的对应关系中的域名分组进行匹配之后,该方法还包括:
    若所述查询域名与所述对应关系中的域名分组匹配失败,则将所述查询域名直接进行域名解析,并将得到的域名解析结果,作为所述域名查询请求的应答进行发送。
  8. 如权利要求6或7所述的方法,其中,该方法还包括:
    预先存储多个域名分组,同一个域名分组中的所有域名对应存储同一套模板域名配置数据,不同的域名分组对应存储不同的模板域名配置数据。
  9. 如权利要求8所述的方法,其中,所述将查询域名与预先存储的不同的模板域名配置数据与域名分组的对应关系中的域名分组进行匹配的过程,包括:
    从所述预先存储的多个域名分组中,查找所述查询域名,若查找到所述查询域名,则所述查询域名与所述对应关系中包含有查询域名的域名分组匹配成功。
  10. 如权利要求8所述的方法,其中,将所述查询域名的域名后缀替换为 所述对应关系中匹配的域名分组对应的模板域名的域名后缀之后,该方法还包括:
    保存所述查询域名的域名后缀;
    所述得到域名解析结果后,将所述解析结果中的模板域名后缀替换成所述查询域名的域名后缀的过程,包括:
    在得到查询域名的域名解析结果之后,如果确定所述查询域名与所述对应关系中的域名分组的匹配结果为成功,则该将所述解析结果中的模板域名后缀替换成所保存的查询域名的域名后缀。
  11. 一种域名解析系统,,包括:
    处理器;
    以及存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    执行实现所述权利要求6至10中任一项所述的域名解析方法的指令。
  12. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现权利要求6至10中任意一项所述方法的步骤。
PCT/CN2020/076110 2019-04-29 2020-02-21 域名解析方法及系统及存储介质 WO2020220801A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910354452.2A CN111866197B (zh) 2019-04-29 2019-04-29 一种域名解析方法及系统
CN201910354452.2 2019-04-29

Publications (1)

Publication Number Publication Date
WO2020220801A1 true WO2020220801A1 (zh) 2020-11-05

Family

ID=72966038

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/076110 WO2020220801A1 (zh) 2019-04-29 2020-02-21 域名解析方法及系统及存储介质

Country Status (2)

Country Link
CN (2) CN111866203B (zh)
WO (1) WO2020220801A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465791A (zh) * 2022-01-25 2022-05-10 杭州盈高科技有限公司 网管设备中白名单的建立方法、装置、存储介质及处理器
CN116405462A (zh) * 2023-06-07 2023-07-07 阿里巴巴(中国)有限公司 域名解析方法、容器服务系统、计算设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160182441A1 (en) * 2014-12-19 2016-06-23 Go Daddy Operating Company, LLC System and method for modifying a domain name system template
CN105763668A (zh) * 2016-02-26 2016-07-13 杭州华三通信技术有限公司 一种域名解析方法和装置
CN106161665A (zh) * 2015-04-15 2016-11-23 阿里巴巴集团控股有限公司 一种接入域名后缀的方法及系统
CN107707682A (zh) * 2017-04-19 2018-02-16 贵州白山云科技有限公司 一种bind配置加载优化方法及装置
CN108667946A (zh) * 2017-03-31 2018-10-16 贵州白山云科技有限公司 一种多域名互备解析管理方法、装置及系统

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8385230B2 (en) * 2009-02-25 2013-02-26 Microsoft Corporation Automatic network address assignment in a wireless mesh
CN103037030B (zh) * 2012-12-10 2016-01-27 中国科学院计算机网络信息中心 支持域名组dns解析的方法和系统
CN105897942A (zh) * 2015-09-17 2016-08-24 乐视云计算有限公司 一种域名解析系统及域名解析方法
CN106412000B (zh) * 2016-07-27 2019-05-31 厦门易名科技股份有限公司 一种域名查询的处理方法
CN106657432B (zh) * 2016-11-17 2019-10-15 中国移动通信集团江苏有限公司 域名解析方法及装置
KR101937388B1 (ko) * 2017-02-16 2019-01-11 주식회사 에프엔에스벨류 Dns 명칭 설정 방법 및 이를 위한 장치
CN109067768B (zh) * 2018-08-31 2021-11-26 赛尔网络有限公司 一种域名查询安全性的检测方法、系统、设备和介质
CN109495598B (zh) * 2018-10-23 2022-02-11 新华三技术有限公司合肥分公司 域名系统参数选择方法及相关装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160182441A1 (en) * 2014-12-19 2016-06-23 Go Daddy Operating Company, LLC System and method for modifying a domain name system template
CN106161665A (zh) * 2015-04-15 2016-11-23 阿里巴巴集团控股有限公司 一种接入域名后缀的方法及系统
CN105763668A (zh) * 2016-02-26 2016-07-13 杭州华三通信技术有限公司 一种域名解析方法和装置
CN108667946A (zh) * 2017-03-31 2018-10-16 贵州白山云科技有限公司 一种多域名互备解析管理方法、装置及系统
CN107707682A (zh) * 2017-04-19 2018-02-16 贵州白山云科技有限公司 一种bind配置加载优化方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114465791A (zh) * 2022-01-25 2022-05-10 杭州盈高科技有限公司 网管设备中白名单的建立方法、装置、存储介质及处理器
CN116405462A (zh) * 2023-06-07 2023-07-07 阿里巴巴(中国)有限公司 域名解析方法、容器服务系统、计算设备及存储介质
CN116405462B (zh) * 2023-06-07 2023-10-20 阿里巴巴(中国)有限公司 域名解析方法、容器服务系统、计算设备及存储介质

Also Published As

Publication number Publication date
CN111866203B (zh) 2022-04-19
CN111866197A (zh) 2020-10-30
CN111866197B (zh) 2021-09-21
CN111866203A (zh) 2020-10-30

Similar Documents

Publication Publication Date Title
WO2021051880A1 (zh) 资源数据获取的方法、装置、计算机设备和存储介质
US9992144B2 (en) Re-routing incoming email for a multi-tenant database system
US10187445B2 (en) System, method and browser client for enabling browser data synchronization
WO2019075978A1 (zh) 数据传输方法、装置、计算机设备和存储介质
WO2018153209A1 (zh) 资源数值转移的方法、服务器、系统和存储介质
US20150248466A1 (en) Data transfer between storage systems using data fingerprints
WO2020063763A1 (zh) 数据存储方法、装置、系统、服务器、控制节点及介质
WO2020220801A1 (zh) 域名解析方法及系统及存储介质
US10067719B1 (en) Methods and systems for storing and accessing data in a distributed data storage system
EP3376403A1 (en) Method of accessing distributed database and device providing distributed data service
CN110795343B (zh) 测试系统、测试方法和计算设备
US11042528B2 (en) Data uniqueness control and information storage
CN105592083A (zh) 终端利用令牌访问服务器的方法和装置
US11019139B2 (en) Ranked session affinity to improve load balancing efficiency for stateful requests
WO2020124619A1 (zh) 数据处理方法、装置、计算机设备及存储介质
CN114900497B (zh) 一种标识序号生成方法、装置、电子设备及存储介质
EP3291168A1 (en) Systems, devices, and methods for locality-based domain name registry operation verification
CN113821495A (zh) 数据库集群实现系统及方法
CN113225408A (zh) 一种域名处理方法及装置
US10691369B2 (en) Pool partner based replication
CN113329057B (zh) 一种设备的访问方法和网络设备
CN108156195B (zh) 一种业务数据检查方法和系统
WO2021212677A1 (zh) 基于区块链开发实现的服务管理方法、装置及设备
EP3241333A1 (en) Analytics with privacy
CN116049504A (zh) 信息查询方法、系统、装置、计算机设备和存储介质

Legal Events

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

Ref document number: 20798423

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

Country of ref document: EP

Kind code of ref document: A1