[go: up one dir, main page]

WO2017166873A1 - Method for quick search of dns domain name of domain name server - Google Patents

Method for quick search of dns domain name of domain name server Download PDF

Info

Publication number
WO2017166873A1
WO2017166873A1 PCT/CN2016/111792 CN2016111792W WO2017166873A1 WO 2017166873 A1 WO2017166873 A1 WO 2017166873A1 CN 2016111792 W CN2016111792 W CN 2016111792W WO 2017166873 A1 WO2017166873 A1 WO 2017166873A1
Authority
WO
WIPO (PCT)
Prior art keywords
domain name
reverse
name server
server
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/111792
Other languages
French (fr)
Chinese (zh)
Inventor
李晓东
李洪涛
岳巧丽
叶崛宇
闫夏莉
王楠
张海阔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Internet Network Information Center
Original Assignee
China Internet Network Information Center
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 China Internet Network Information Center filed Critical China Internet Network Information Center
Publication of WO2017166873A1 publication Critical patent/WO2017166873A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/301Name conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/30Types of network names

Definitions

  • the invention belongs to the field of information technology and domain name technology, and particularly relates to a DNS domain name fast retrieval method for a domain name server.
  • the Domain Name System is composed of a domain name resolver and a domain name server.
  • the domain name server refers to a server that stores the domain name and corresponding IP address of all hosts in the network and has the function of converting the domain name into an IP address.
  • the domain name system uses a hierarchical structure similar to the directory tree. The process of mapping a domain name to an IP address is called "domain name resolution.”
  • domain name resolution With the rapid development of the Internet, the amount of information is rapidly increasing, and the amount of domain name data of the corresponding domain name server and the amount of domain name resolution to be processed are increasing. In this context, the domain name server needs faster domain name resolution speed. Meet user needs.
  • the existing domain name server handles the domain name resolution process as follows: for example, requesting to query the A record of the domain name www.example.com.cn, during the query process, regardless of whether the database has this domain name or type matching data, the nearest parent will be queried first.
  • the DS, DNAME, CNAME, and NS records of the domain name may be read and matched in the memory multiple times for example.com.cn, com.cn, cn, etc.
  • the memory in memory is part of the www.example.com.cn domain name.
  • the process of reading from memory and the process of matching matching are not efficient.
  • the domain name matching retrieval in this existing scenario does not conform to the computer architecture, considering that the domain name matching algorithm cannot be optimized. In this case, it is necessary to optimize the computer structure to improve the speed of domain name matching.
  • the present invention provides a DNS domain name fast retrieval method for a domain name server, which improves the DNS domain name retrieval matching speed and improves the domain name resolution speed of the domain name server, thereby enabling the entire domain name system to improve the service more efficiently for the user.
  • the DNS domain name fast retrieval method of the domain name server of the present invention stores the domain name in reverse processing (that is, the domain name is reversed) in the database, and compares and matches the domain name in reverse processing in the query logic, specifically including the following. step:
  • the domain name server When receiving the domain name query request, the domain name server performs the reverse processing and storage in the same manner as step 1).
  • the domain name server uses the reverse-processed domain name to perform memory alignment search matching
  • step 1) checks the legality of the domain name in a traversal process, performs case conversion, calculates the length of each field, and then reverse-processes and stores the domain name; and step 2) the domain name server will request the domain name to be queried. The same is traversed once, and the validity of the domain name is checked, the case conversion is performed, the length of each field is calculated, and then the domain name is processed in reverse order and stored in the same manner as in step 1).
  • each field is still before the corresponding field when the reverse processing is performed on the domain name.
  • the invention also provides a domain name server, comprising a reverse processing module and a retrieval matching module;
  • the reverse processing module is responsible for processing domain name data in reverse order according to fields and storing in the database when loading the area data, and is responsible for receiving the domain name
  • the search matching module is responsible for performing memory-aligned retrieval matching by using the reverse-processed domain name in the query logic process, and returning according to the result of the retrieval matching. Corresponding response data.
  • the data pre-processing module is further configured to: when loading the area data or receiving the domain name query request, check the legality of the domain name in a traversal process, perform case conversion, and calculate the length of each field, and then The domain name is processed in reverse order by the reverse processing module.
  • the reverse processing module performs reverse processing on the domain name, the length of each field is still before the corresponding field.
  • the domain name server needs to traverse the domain name, perform domain name legality check, case conversion, record label length, and so on. In this traversal process, the domain name is processed in reverse order, which does not reduce the loading efficiency and does not increase the storage space.
  • the method uses the method of storing the domain name in reverse order, which increases the reading and matching speed in the memory.
  • the existing domain name retrieval matching method cannot guarantee memory alignment when matching, which will cause the number of readings to double and reduce the retrieval matching efficiency; the domain name retrieval matching method of the present invention is always memory aligned when matching, and the retrieval matching efficiency can be improved.
  • the method is more in line with the existing computer structure, creatively stores the domain name in reverse order, and searches and matches in the query logic with the reversed domain name, thereby greatly improving efficiency and improving the domain name resolution speed of the domain name server.
  • Figure 1 is a schematic diagram of single byte access.
  • Figure 2 is a schematic diagram of double byte access.
  • Figure 3 is a schematic diagram of four-byte access.
  • FIG. 4 is a schematic diagram of domain name reverse storage.
  • FIG. 5 is a schematic diagram of a conventional domain name retrieval matching method.
  • FIG. 6 is a schematic diagram of a domain name retrieval matching method in the present invention.
  • Fig. 7 is a block diagram showing the structure of a domain name server in the present invention.
  • the invention proposes that the domain name is stored in the database in reverse order, and in the query logic, the reversed domain name is used for comparison and matching, and the DNS domain name retrieval matching speed is improved, and the domain name server domain name resolution speed is improved.
  • the method specifically includes the following steps:
  • the domain name data is processed in reverse order according to the label (label), and stored in the database, as shown in FIG. 4 .
  • the definition of the zone data can be referred to rfc1033, and the zone data format standard is defined as ⁇ name>[ttl][class] ⁇ type> ⁇ data>.
  • the zone data format standard is defined as ⁇ name>[ttl][class] ⁇ type> ⁇ data>.
  • the domain name is processed in reverse order, which does not reduce the loading efficiency and does not increase the storage space.
  • the domain name server When the domain name server receives the request for querying the domain name, it also traverses the requested domain name once, performs domain name legality check, case conversion, calculates the length of each label, and stores the domain name in reverse order.
  • the search and match are performed by using the reversed domain name in the matching process, especially in the recent search matching of the parent domain, which is a memory alignment match, so the matching speed can be greatly improved.
  • the above method of the invention is more in line with the existing computer structure, can greatly improve the retrieval matching efficiency of the domain name, and improve the domain name resolution speed of the domain name server.
  • the existing domain name retrieval matching method is as shown in FIG. 5, and the memory alignment cannot be guaranteed when matching, which will cause the number of readings to double and reduce the retrieval matching efficiency.
  • the domain name retrieval matching method of the present invention is as shown in FIG. 6, and the matching is always memory aligned, which can improve the retrieval matching efficiency.
  • the following is an example of requesting the domain name server to query the A record of www.sina.com.cn to further illustrate the method for storing the domain name in the database in the present invention, including the following steps:
  • the domain name server loads the area data
  • the domain name data is processed in reverse order and stored in the database, as shown in Figure 4.
  • check the legality of the domain name and case conversion In the process of traversing, check the legality of the domain name, case conversion, calculate the length of each label, and reverse the domain name. Note that the length of each label is still in front of the label.
  • the present invention further provides a domain name server, as shown in FIG. 7, comprising a reverse processing module and a retrieval matching module;
  • the reverse processing module is responsible for processing domain name data in reverse order according to fields when loading area data and storing In the database, and responsible for receiving the domain name query request, the domain name requested to be queried is processed and stored in reverse in the same manner;
  • the search matching module is responsible for performing memory alignment in the process of query logic using the reverse processed domain name. retrieve the match and return the corresponding response data according to the result of the search match.
  • the data pre-can also be included in FIG.
  • the processing module is configured to check the legality of the domain name in a traversal process, perform case conversion, calculate the length of each field, and then submit the reverse processing module when loading the zone data or receiving the domain name query request. Reverse the domain name.
  • the byte alignment can not be satisfied, and the domain name can be compared and retrieved by byte comparison.
  • the scheme of the present invention can satisfy the byte alignment, the 64-bit byte alignment comparison domain name can be matched and searched.
  • the direct byte-based comparison method is usually about 1.5 times as long as the 64-bit alignment comparison method. It can be explained that the scheme of the present invention can retrieve the matching domain name at a faster speed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a method for quick search of a DNS domain name of a domain name server. The method comprises: 1) when loading zone data, a domain name server reverses domain name data according to labels, and stores the reversed domain name data in a database; 2) when receiving a domain name query request, the domain name server reverses, in the same way as step 1), a domain name requested to be queried, and stores the reversed domain name; 3) during logic query, the domain name server performs search matching in a memory alignment manner by using the reversed domain name; 4) returning corresponding response data according to the search matching result of the domain name server. By increasing a DNS domain name search matching speed, the present invention increases the domain name resolution speed of the domain name server, so that the entire domain name system can provide a more efficient service to users.

Description

一种域名服务器的DNS域名快速检索方法DNS domain name fast retrieval method for domain name server 技术领域Technical field

本发明属于信息技术、域名技术领域,具体涉及一种域名服务器的DNS域名快速检索方法。The invention belongs to the field of information technology and domain name technology, and particularly relates to a DNS domain name fast retrieval method for a domain name server.

背景技术Background technique

域名系统(Domain Name System)是由域名解析器和域名服务器组成的。域名服务器是指保存有该网络中所有主机的域名和对应IP地址,并具有将域名转换为IP地址功能的服务器。域名系统采用类似目录树的等级结构,将域名映射为IP地址的过程就称为“域名解析”。随着互联网络的高速发展,信息量急速增大,相应域名服务器的域名数据量以及需要处理的域名解析量都越来越大,在此背景下,域名服务器需要更快的域名解析速度方能满足用户需求。The Domain Name System is composed of a domain name resolver and a domain name server. The domain name server refers to a server that stores the domain name and corresponding IP address of all hosts in the network and has the function of converting the domain name into an IP address. The domain name system uses a hierarchical structure similar to the directory tree. The process of mapping a domain name to an IP address is called "domain name resolution." With the rapid development of the Internet, the amount of information is rapidly increasing, and the amount of domain name data of the corresponding domain name server and the amount of domain name resolution to be processed are increasing. In this context, the domain name server needs faster domain name resolution speed. Meet user needs.

现有的域名服务器处理域名解析过程如下:例如,请求查询域名www.example.com.cn的A记录,在查询过程中,无论数据库是否有此域名、类型匹配的数据,首先将会查询最近父域域名的DS、DNAME、CNAME、NS等记录,即可能会多次在内存中读取并匹配example.com.cn,com.cn,cn等。以example.com.cn为例,在内存中的存储是www.example.com.cn域名的一部分,从内存读取的过程以及对比匹配的过程效率都不高。The existing domain name server handles the domain name resolution process as follows: for example, requesting to query the A record of the domain name www.example.com.cn, during the query process, regardless of whether the database has this domain name or type matching data, the nearest parent will be queried first. The DS, DNAME, CNAME, and NS records of the domain name may be read and matched in the memory multiple times for example.com.cn, com.cn, cn, etc. For example.com.cn, the memory in memory is part of the www.example.com.cn domain name. The process of reading from memory and the process of matching matching are not efficient.

以下说明内存存取粒度是如何对该任务产生影响的。先从地址0读取4个字节到寄存器,然后从地址1读取4个字节到寄存器。The following describes how memory access granularity affects this task. First read 4 bytes from address 0 to the register, then read 4 bytes from address 1 to the register.

首先考察内存存取粒度为1byte的情况,如图1所示。然后看看存取粒度为双字节的处理器的情况,如图2所示。从地址0读取数据,双字节存取粒度的处理器读内存的次数是单字节存取粒度处理器的一半。因为每次内存存取都会产生一个固定的开销,最小化内存存取次数将提升程序的性能。但从地址1读取数据时由于地址1没有和处理器的内存存取边界对齐,处理器就会做一些额外的工作。地址1这样的地址被称作非对齐地址。由于地址1是非对齐的,双字节存取粒度的处理器必须再读一次内存才能获取想要的4个字节,这减缓了操作的速度。最后我们再看一下存取粒度为4字节的处理器的情况,如图3所示。在对齐的内存地址上,四字节存取粒度处理器可以一次性的将4个字节全部读出;而在非对齐的内存地址上,读取次数将加倍。First, consider the case where the memory access granularity is 1 byte, as shown in Figure 1. Then look at the case of accessing a processor with a double-byte granularity, as shown in Figure 2. Reading data from address 0, the double-byte access granularity processor reads memory half the number of single-byte access granularity processors. Because each memory access has a fixed overhead, minimizing the number of memory accesses will improve the performance of the program. But when reading data from address 1 because address 1 is not aligned with the processor's memory access boundary, the processor does some extra work. An address such as address 1 is called a non-aligned address. Since address 1 is unaligned, a processor with a double-byte access granularity must read the memory again to get the desired 4 bytes, which slows down the operation. Finally, let's look at the case of accessing a processor with a granularity of 4 bytes, as shown in Figure 3. On the aligned memory address, the four-byte access granularity processor can read all four bytes at once; on non-aligned memory addresses, the number of reads will be doubled.

此现有场景下的域名匹配检索并不符合计算机体系结构,考虑到域名匹配算法无法优化 的情况下,在计算机结构方面进行优化提高域名匹配速度非常必要。The domain name matching retrieval in this existing scenario does not conform to the computer architecture, considering that the domain name matching algorithm cannot be optimized. In this case, it is necessary to optimize the computer structure to improve the speed of domain name matching.

发明内容Summary of the invention

本发明针对上述问题,提供一种域名服务器的DNS域名快速检索方法,通过提高DNS域名检索匹配速度,提高域名服务器的域名解析速度,从而使得整个域名系统能够为用户提高更高效的服务。The present invention provides a DNS domain name fast retrieval method for a domain name server, which improves the DNS domain name retrieval matching speed and improves the domain name resolution speed of the domain name server, thereby enabling the entire domain name system to improve the service more efficiently for the user.

为实现上述目的,本发明的域名服务器的DNS域名快速检索方法将域名进行倒序处理(即将域名颠倒)存放在数据库中,并在查询逻辑中,用倒序处理后的域名进行对比匹配,具体包括以下步骤:In order to achieve the above object, the DNS domain name fast retrieval method of the domain name server of the present invention stores the domain name in reverse processing (that is, the domain name is reversed) in the database, and compares and matches the domain name in reverse processing in the query logic, specifically including the following. step:

1)域名服务器在加载区数据时,将域名数据按字段进行倒序处理,并存储在数据库中;1) When the domain name server loads the zone data, the domain name data is processed in reverse order by the field and stored in the database;

2)域名服务器接收到域名查询请求时,将请求查询的域名以与步骤1)同样的方式进行倒序处理并存储;2) When receiving the domain name query request, the domain name server performs the reverse processing and storage in the same manner as step 1).

3)在查询逻辑过程中,域名服务器采用倒序处理后的域名进行内存对齐的检索匹配;3) In the process of query logic, the domain name server uses the reverse-processed domain name to perform memory alignment search matching;

4)按照域名服务器的检索匹配的结果返回相应的应答数据。4) Return the corresponding response data according to the result of the search matching of the domain name server.

进一步地,步骤1)在一次遍历过程中检查域名合法性,进行大小写转化,并计算每个字段的长度,然后再将域名进行倒序处理并存储;步骤2)中域名服务器将请求查询的域名同样遍历一次,并检查域名合法性,进行大小写转化,计算每个字段的长度,然后以与步骤1)同样的方式将域名进行倒序处理并存储。Further, step 1) checks the legality of the domain name in a traversal process, performs case conversion, calculates the length of each field, and then reverse-processes and stores the domain name; and step 2) the domain name server will request the domain name to be queried. The same is traversed once, and the validity of the domain name is checked, the case conversion is performed, the length of each field is calculated, and then the domain name is processed in reverse order and stored in the same manner as in step 1).

进一步地,在对域名进行所述倒序处理时各字段的长度仍在相应的字段之前。Further, the length of each field is still before the corresponding field when the reverse processing is performed on the domain name.

本发明还提供一种域名服务器,包括倒序处理模块和检索匹配模块;所述倒序处理模块负责在加载区数据时,将域名数据按字段进行倒序处理并存储在数据库中,并负责在接收到域名查询请求时,将请求查询的域名以同样的方式进行倒序处理并存储;所述检索匹配模块负责在查询逻辑过程中采用倒序处理后的域名进行内存对齐的检索匹配,并按照检索匹配的结果返回相应的应答数据。The invention also provides a domain name server, comprising a reverse processing module and a retrieval matching module; the reverse processing module is responsible for processing domain name data in reverse order according to fields and storing in the database when loading the area data, and is responsible for receiving the domain name When querying the request, the domain name requested by the query is processed and stored in reverse in the same manner; the search matching module is responsible for performing memory-aligned retrieval matching by using the reverse-processed domain name in the query logic process, and returning according to the result of the retrieval matching. Corresponding response data.

进一步地,还包括数据预处理模块,用于在加载区数据时或接收到域名查询请求时,在一次遍历过程中检查域名合法性,进行大小写转化,并计算每个字段的长度,然后再交由所述倒序处理模块对域名进行倒序处理。Further, the data pre-processing module is further configured to: when loading the area data or receiving the domain name query request, check the legality of the domain name in a traversal process, perform case conversion, and calculate the length of each field, and then The domain name is processed in reverse order by the reverse processing module.

进一步地,所述倒序处理模块在将域名进行倒序处理时,各字段的长度仍在相应的字段之前。Further, when the reverse processing module performs reverse processing on the domain name, the length of each field is still before the corresponding field.

与现有技术相比,本发明的有益效果如下: Compared with the prior art, the beneficial effects of the present invention are as follows:

1)域名服务器在加载区数据时,需要遍历域名,进行域名合法性检查、大小写转化、记录label长度等。在此一次遍历过程中,将域名进行倒序处理,不会降低加载效率,且没有增加存储空间。1) When loading the zone data, the domain name server needs to traverse the domain name, perform domain name legality check, case conversion, record label length, and so on. In this traversal process, the domain name is processed in reverse order, which does not reduce the loading efficiency and does not increase the storage space.

2)该方法采用域名倒序存放的方法,增加了内存中的读取以及匹配速度。现有的域名检索匹配方式在匹配时无法保证内存对齐,将会引起读取次数加倍,降低检索匹配效率;本发明的域名检索匹配方式在匹配时总是内存对齐的,能够提高检索匹配效率。2) The method uses the method of storing the domain name in reverse order, which increases the reading and matching speed in the memory. The existing domain name retrieval matching method cannot guarantee memory alignment when matching, which will cause the number of readings to double and reduce the retrieval matching efficiency; the domain name retrieval matching method of the present invention is always memory aligned when matching, and the retrieval matching efficiency can be improved.

3)该方法更加符合现有计算机结构,创造性地将域名倒序存储,并在查询逻辑中用倒序的域名进行检索匹配,大幅提高效率,提高域名服务器的域名解析速度。3) The method is more in line with the existing computer structure, creatively stores the domain name in reverse order, and searches and matches in the query logic with the reversed domain name, thereby greatly improving efficiency and improving the domain name resolution speed of the domain name server.

附图说明DRAWINGS

图1是单字节存取示意图。Figure 1 is a schematic diagram of single byte access.

图2是双字节存取示意图。Figure 2 is a schematic diagram of double byte access.

图3是四字节存取示意图。Figure 3 is a schematic diagram of four-byte access.

图4是域名倒序存储示意图。4 is a schematic diagram of domain name reverse storage.

图5是现有域名检索匹配方式示意图。FIG. 5 is a schematic diagram of a conventional domain name retrieval matching method.

图6是本发明中的域名检索匹配方式示意图。FIG. 6 is a schematic diagram of a domain name retrieval matching method in the present invention.

图7是本发明中的域名服务器的模块组成示意图。Fig. 7 is a block diagram showing the structure of a domain name server in the present invention.

具体实施方式detailed description

为使本发明的上述目的、特征和优点能够更加明显易懂,下面通过具体实施例和附图,对本发明做进一步说明。The above described objects, features and advantages of the present invention will become more apparent from the aspects of the appended claims.

本发明提出将域名倒序存放在数据库中,并在查询逻辑中,用倒序后的域名进行对比匹配,通过提高DNS域名检索匹配速度,提高域名服务器的域名解析速度。该方法具体包括以下步骤:The invention proposes that the domain name is stored in the database in reverse order, and in the query logic, the reversed domain name is used for comparison and matching, and the DNS domain name retrieval matching speed is improved, and the domain name server domain name resolution speed is improved. The method specifically includes the following steps:

1)域名服务器加载区数据时,将域名数据按照字段(label)进行倒序处理,并存放在数据库中,如图4所示。区数据的定义可参考rfc1033,区数据格式标准定义为<name>[ttl][class]<type><data>。以A记录为例,示例如下:www.sina.com.cnA218.241.10.2。其中name即为需要倒序检索的域名。1) When the domain name server loads the area data, the domain name data is processed in reverse order according to the label (label), and stored in the database, as shown in FIG. 4 . The definition of the zone data can be referred to rfc1033, and the zone data format standard is defined as <name>[ttl][class]<type><data>. Taking the A record as an example, an example is as follows: www.sina.com.cnA218.241.10.2. Name is the domain name that needs to be retrieved in reverse order.

由于加载区数据时,要检查域名合法性、大小写转化,故在一次遍历过程中,检查域名合法性、大小写转化、计算每个label的长度,并将域名进行倒序处理(即将域名颠倒)。注 意,各label的长度仍在label前。比如,原域名数据为“A.B.C.D”,其中A、B、C、D为域名中的各label,则按照label进行倒序处理后为“D.C.B.A”。When loading zone data, check the legality of the domain name and case conversion. In the process of traversal, check the legality of the domain name, case conversion, calculate the length of each label, and reverse the domain name (that is, reverse the domain name). . Note Meaning, the length of each label is still in front of the label. For example, the original domain name data is “A.B.C.D”, and A, B, C, and D are each label in the domain name, and then the reverse processing according to the label is “D.C.B.A”.

在上述一次遍历过程中,将域名进行倒序处理,不会降低加载效率,且没有增加存储空间。In the above traversal process, the domain name is processed in reverse order, which does not reduce the loading efficiency and does not increase the storage space.

2)域名服务器接收到查询域名的请求时,将请求的域名同样遍历一次,进行域名合法性检查、大小写转换、计算每个label的长度,并将域名倒序存储。2) When the domain name server receives the request for querying the domain name, it also traverses the requested domain name once, performs domain name legality check, case conversion, calculates the length of each label, and stores the domain name in reverse order.

3)在查询逻辑过程中,在匹配过程中用倒序后的域名进行检索匹配,尤其在最近父域的检索匹配中,是内存对齐的匹配,故能够大大提高匹配速度。3) In the process of query logic, the search and match are performed by using the reversed domain name in the matching process, especially in the recent search matching of the parent domain, which is a memory alignment match, so the matching speed can be greatly improved.

4)按检索匹配结果返回相应的应答数据。4) Return the corresponding response data according to the search matching result.

本发明的上述方法更加符合现有计算机结构,能够大幅提高域名的检索匹配效率,提高域名服务器的域名解析速度。现有的域名检索匹配方式如附图5所示,匹配时无法保证内存对齐,将会引起读取次数加倍,降低检索匹配效率。本发明的域名检索匹配方式如附图6所示,匹配时总是内存对齐的,能够提高检索匹配效率。The above method of the invention is more in line with the existing computer structure, can greatly improve the retrieval matching efficiency of the domain name, and improve the domain name resolution speed of the domain name server. The existing domain name retrieval matching method is as shown in FIG. 5, and the memory alignment cannot be guaranteed when matching, which will cause the number of readings to double and reduce the retrieval matching efficiency. The domain name retrieval matching method of the present invention is as shown in FIG. 6, and the matching is always memory aligned, which can improve the retrieval matching efficiency.

下面以向域名服务器请求查询www.sina.com.cn的A记录为例,进一步说明本发明提出的将域名颠倒存放在数据库中的方法,包括以下步骤:The following is an example of requesting the domain name server to query the A record of www.sina.com.cn to further illustrate the method for storing the domain name in the database in the present invention, including the following steps:

1)域名服务器加载区数据时,将域名数据进行倒序处理后存放在数据库中,如图4所示。由于加载区数据时,要检查域名合法性、大小写转化,在一次遍历过程中,检查域名合法性、大小写转化、计算每个label的长度,并将域名进行倒序处理。注意各label的长度仍在label前。1) When the domain name server loads the area data, the domain name data is processed in reverse order and stored in the database, as shown in Figure 4. When loading area data, check the legality of the domain name and case conversion. In the process of traversing, check the legality of the domain name, case conversion, calculate the length of each label, and reverse the domain name. Note that the length of each label is still in front of the label.

2)域名服务器接受到查询域名www.sina.com.cn的A记录的请求时,将请求的域名同样遍历一次,进行域名合法性检查、大小写转换、计算每个label的长度,并将域名倒序存储,如图4所示。2) When the domain name server receives the request to query the A record of the domain name www.sina.com.cn, the requested domain name is also traversed once, the domain name legality check, case conversion, calculation of the length of each label, and the domain name Reverse storage, as shown in Figure 4.

3)在查询逻辑过程中,在匹配过程中用颠倒后的域名进行检索匹配,尤其在最近父域的检索匹配中,如图6所示进行匹配,可以看出,在匹配时总是内存对齐的。3) In the process of query logic, the search is matched with the reversed domain name in the matching process, especially in the recent search matching of the parent domain, as shown in Figure 6, it can be seen that the memory is always aligned when matching. of.

4)按检索匹配结果返回相应的应答数据。4) Return the corresponding response data according to the search matching result.

根据上述方法,本发明还提供一种域名服务器,如图7所示,包括倒序处理模块和检索匹配模块;所述倒序处理模块负责在加载区数据时,将域名数据按字段进行倒序处理并存储在数据库中,并负责在接收到域名查询请求时,将请求查询的域名以同样的方式进行倒序处理并存储;所述检索匹配模块负责在查询逻辑过程中采用倒序处理后的域名进行内存对齐的检索匹配,并按照检索匹配的结果返回相应的应答数据。进一步地,图7中还可包括数据预 处理模块,用于在加载区数据时或接收到域名查询请求时,在一次遍历过程中检查域名合法性,进行大小写转化,并计算每个字段的长度,然后再交由所述倒序处理模块对域名进行倒序处理。According to the above method, the present invention further provides a domain name server, as shown in FIG. 7, comprising a reverse processing module and a retrieval matching module; the reverse processing module is responsible for processing domain name data in reverse order according to fields when loading area data and storing In the database, and responsible for receiving the domain name query request, the domain name requested to be queried is processed and stored in reverse in the same manner; the search matching module is responsible for performing memory alignment in the process of query logic using the reverse processed domain name. Retrieve the match and return the corresponding response data according to the result of the search match. Further, the data pre-can also be included in FIG. The processing module is configured to check the legality of the domain name in a traversal process, perform case conversion, calculate the length of each field, and then submit the reverse processing module when loading the zone data or receiving the domain name query request. Reverse the domain name.

传统域名匹配时由于无法满足字节对齐,只能按字节比较域名进行匹配检索,而本发明的方案由于能够满足字节对齐,可以进行64位字节对齐比较域名进行匹配检索。When the traditional domain name is matched, the byte alignment can not be satisfied, and the domain name can be compared and retrieved by byte comparison. However, since the scheme of the present invention can satisfy the byte alignment, the 64-bit byte alignment comparison domain name can be matched and searched.

实验方法:在相同环境下,编写代码,模拟分别使用直接按字节比较方法和64位对齐比较方法,匹配检索域名www.sina.com.cn,直接对www.sina.com.cn和www.sina.com.cn进行1千万次比较。Experimental method: In the same environment, write the code, simulate using the direct byte comparison method and 64-bit alignment comparison method respectively, match the domain name www.sina.com.cn, directly to www.sina.com.cn and www. Sina.com.cn conducted 10 million comparisons.

实验结果:直接按字节比较方法平时耗时为64位对齐比较方法的1.5倍左右,可以说明本发明方案可以以更快的速度检索匹配域名。Experimental results: The direct byte-based comparison method is usually about 1.5 times as long as the 64-bit alignment comparison method. It can be explained that the scheme of the present invention can retrieve the matching domain name at a faster speed.

以上实施例仅用以说明本发明的技术方案而非对其进行限制,本领域的普通技术人员可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明的精神和范围,本发明的保护范围应以权利要求书所述为准。 The above embodiments are only used to illustrate the technical solutions of the present invention, and the present invention is not limited thereto, and those skilled in the art can modify or replace the technical solutions of the present invention without departing from the spirit and scope of the present invention. The scope of protection shall be as stated in the claims.

Claims (6)

一种域名服务器的DNS域名快速检索方法,其特征在于,包括以下步骤:A DNS domain name fast retrieval method for a domain name server, characterized in that the method comprises the following steps: 1)域名服务器在加载区数据时,将域名数据按字段进行倒序处理,并存储在数据库中;1) When the domain name server loads the zone data, the domain name data is processed in reverse order by the field and stored in the database; 2)域名服务器接收到域名查询请求时,将请求查询的域名以与步骤1)同样的方式进行倒序处理并存储;2) When receiving the domain name query request, the domain name server performs the reverse processing and storage in the same manner as step 1). 3)在查询逻辑过程中,域名服务器采用倒序处理后的域名进行内存对齐的检索匹配;3) In the process of query logic, the domain name server uses the reverse-processed domain name to perform memory alignment search matching; 4)按照域名服务器的检索匹配的结果返回相应的应答数据。4) Return the corresponding response data according to the result of the search matching of the domain name server. 如权利要求1所述的方法,其特征在于:步骤1)在一次遍历过程中检查域名合法性,进行大小写转化,并计算每个字段的长度,然后再将域名进行倒序处理并存储;步骤2)中域名服务器将请求查询的域名同样遍历一次,并检查域名合法性,进行大小写转化,计算每个字段的长度,然后以与步骤1)同样的方式将域名进行倒序处理并存储。The method according to claim 1, wherein the step 1) checks the legality of the domain name in a traversal process, performs case conversion, calculates the length of each field, and then reverse-processes and stores the domain name; 2) The domain name server traverses the domain name requested for query, and checks the legality of the domain name, performs case conversion, calculates the length of each field, and then reverse-processes and stores the domain name in the same manner as step 1). 如权利要求2所述的方法,其特征在于:在对域名进行所述倒序处理时各字段的长度仍在相应的字段之前。The method of claim 2 wherein the length of each field is preceded by a corresponding field when said reverse processing is performed on the domain name. 一种域名服务器,其特征在于,包括倒序处理模块和检索匹配模块;所述倒序处理模块负责在加载区数据时,将域名数据按字段进行倒序处理并存储在数据库中,并负责在接收到域名查询请求时,将请求查询的域名以同样的方式进行倒序处理并存储;所述检索匹配模块负责在查询逻辑过程中采用倒序处理后的域名进行内存对齐的检索匹配,并按照检索匹配的结果返回相应的应答数据。A domain name server, comprising: a reverse processing module and a retrieval matching module; wherein the reverse processing module is responsible for processing domain data in a reverse order by field and storing in a database when loading the area data, and is responsible for receiving the domain name When querying the request, the domain name requested by the query is processed and stored in reverse in the same manner; the search matching module is responsible for performing memory-aligned retrieval matching by using the reverse-processed domain name in the query logic process, and returning according to the result of the retrieval matching. Corresponding response data. 如权利要求4所述的域名服务器,其特征在于:还包括数据预处理模块,用于在加载区数据时或接收到域名查询请求时,在一次遍历过程中检查域名合法性,进行大小写转化,并计算每个字段的长度,然后再交由所述倒序处理模块对域名进行倒序处理。The domain name server according to claim 4, further comprising a data pre-processing module, configured to check the legality of the domain name and perform case conversion during the traversal process when loading the area data or receiving the domain name query request. And calculating the length of each field, and then passing the reverse processing module to reverse-process the domain name. 如权利要求5所述的域名服务器,其特征在于:所述倒序处理模块在将域名进行倒序处理时,各字段的长度仍在相应的字段之前。 The domain name server according to claim 5, wherein when the reverse processing module performs reverse processing of the domain name, the length of each field is still before the corresponding field.
PCT/CN2016/111792 2016-03-31 2016-12-23 Method for quick search of dns domain name of domain name server Ceased WO2017166873A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610196450.1 2016-03-31
CN201610196450.1A CN105611000B (en) 2016-03-31 2016-03-31 A fast retrieval method for DNS domain name of a domain name server

Publications (1)

Publication Number Publication Date
WO2017166873A1 true WO2017166873A1 (en) 2017-10-05

Family

ID=55990534

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111792 Ceased WO2017166873A1 (en) 2016-03-31 2016-12-23 Method for quick search of dns domain name of domain name server

Country Status (2)

Country Link
CN (1) CN105611000B (en)
WO (1) WO2017166873A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241292A (en) * 2018-08-13 2019-01-18 恒安嘉新(北京)科技股份公司 A method of name server architectural knowledge map is established based on the passive data of master

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684653B (en) * 2017-10-19 2023-12-22 成都海存艾匹科技有限公司 Programmable gate array package containing programmable computing units
CN105611000B (en) * 2016-03-31 2019-04-26 中国互联网络信息中心 A fast retrieval method for DNS domain name of a domain name server
CN108696599B (en) * 2017-04-07 2021-02-19 北京上元信安技术有限公司 Method, system and firewall equipment for removing redundant domain names from domain name classification feature library
CN108270880B (en) * 2017-12-29 2021-06-01 中国互联网络信息中心 A method and system for realizing mapping between domain name trees
CN109788080B (en) * 2018-12-07 2021-09-21 中国互联网络信息中心 Domain name resolution method and device based on graph view, electronic equipment and medium
CN112380324B (en) * 2020-12-02 2022-02-01 北京微步在线科技有限公司 Method, system and medium for determining domain name and its father domain name

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882987A (en) * 2011-07-12 2013-01-16 阿里巴巴集团控股有限公司 Domain filter list storing and matching method and device
CN102904858A (en) * 2011-07-26 2013-01-30 中兴通讯股份有限公司 A data storage and query method in IMS network
US8676989B2 (en) * 2009-04-23 2014-03-18 Opendns, Inc. Robust domain name resolution
CN105611000A (en) * 2016-03-31 2016-05-25 中国互联网络信息中心 DNS (domain name system) domain name rapid search method of domain name server

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063446B (en) * 2009-11-13 2012-07-11 中国移动通信集团四川有限公司 A method for establishing an inverted index and an inverted index device
CN103412925A (en) * 2013-08-13 2013-11-27 南京烽火星空通信发展有限公司 System and method for integrated searching of structured data and unstructured data
CN104537107A (en) * 2015-01-15 2015-04-22 中国联合网络通信集团有限公司 URL storage matching method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8676989B2 (en) * 2009-04-23 2014-03-18 Opendns, Inc. Robust domain name resolution
CN102882987A (en) * 2011-07-12 2013-01-16 阿里巴巴集团控股有限公司 Domain filter list storing and matching method and device
CN102904858A (en) * 2011-07-26 2013-01-30 中兴通讯股份有限公司 A data storage and query method in IMS network
CN105611000A (en) * 2016-03-31 2016-05-25 中国互联网络信息中心 DNS (domain name system) domain name rapid search method of domain name server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241292A (en) * 2018-08-13 2019-01-18 恒安嘉新(北京)科技股份公司 A method of name server architectural knowledge map is established based on the passive data of master
CN109241292B (en) * 2018-08-13 2022-09-16 恒安嘉新(北京)科技股份公司 Method for establishing domain name server system knowledge graph based on active and passive data

Also Published As

Publication number Publication date
CN105611000B (en) 2019-04-26
CN105611000A (en) 2016-05-25

Similar Documents

Publication Publication Date Title
WO2017166873A1 (en) Method for quick search of dns domain name of domain name server
JP4242905B2 (en) Cache efficient object loader
US8151085B2 (en) Method for address translation in virtual machines
US7093099B2 (en) Native lookup instruction for file-access processor searching a three-level lookup cache for variable-length keys
US9779028B1 (en) Managing translation invalidation
CN112347377B (en) IP address field searching method, service scheduling method, device and electronic equipment
US8185692B2 (en) Unified cache structure that facilitates accessing translation table entries
US9256550B2 (en) Hybrid address translation
US11403222B2 (en) Cache structure using a logical directory
JPH03194632A (en) Cache access on the basis of translation look ahead
CN112930522B (en) Generic pointer for data exchange in computer systems with independent processors
JP7184815B2 (en) Conversion assistance for virtual cache
JP7062696B2 (en) Sharing virtual and real transformations in virtual cache
CN116594925B (en) Address translation system, processor, address translation method and electronic equipment
WO2021184580A1 (en) Intelligent domain name resolution method and apparatus, electronic device and computer-readable storage medium
US10783153B2 (en) Efficient internet protocol prefix match support on No-SQL and/or non-relational databases
WO2021104502A1 (en) Hardware page table walk accelerating method, and device
WO2017124883A1 (en) Novel authoritative domain name resolution service method and device
CN115080464B (en) Data processing method and data processing device
CN111695685A (en) On-chip storage system and method for graph neural network application
US11474953B2 (en) Configuration cache for the ARM SMMUv3
CN105824927A (en) Domain name matching method based on tree automaton
CN110362509B (en) Unified address conversion method and unified address space
CN120825481A (en) IP address retrieval method and device
Zhang et al. An information feature extraction and rapid updating scheme for knowledge centric networking

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16896641

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896641

Country of ref document: EP

Kind code of ref document: A1