DNS cache processing method

A cache processing and storage node technology, applied in electrical components, transmission systems, etc., can solve problems such as time-consuming expansion of space, hash table conflicts, etc., to achieve the effect of reducing string comparison, small space occupation, and high query efficiency

Pending Publication Date: 2020-12-04
CHENGDU DBAPP SECURITY
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1. Storage space needs to be pre-allocated. With the increase of data, if the allocated space is not enough, the storage space needs to be expanded, which is time-consuming, and all stored data needs to be hashed again after expansion.
[0005] 2. When the stored data increases, the hash table may have conflicts

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • DNS cache processing method
  • DNS cache processing method
  • DNS cache processing method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] A DNS cache processing method adopts a dictionary tree data structure to store the corresponding relationship between the domain name and the IP address of the DNS cache, the path string from the root node to a certain node in the tree represents the domain name, and the IP address corresponding to the domain name is stored at the node position. When inserting data, create a node according to the character path in the domain name string, and store the IP address corresponding to the domain name into the node corresponding to the domain name. When querying the IP address corresponding to the domain name, search the node in the tree according to the character path in the domain name string, and after finding the node, obtain the data stored at the node location, which is the corresponding IP address.

[0031] Such as figure 1 As shown, the circles in the figure represent the nodes of the tree. For the convenience of description, each node is numbered. Node 0 represents th...

Embodiment 2

[0041] This embodiment is optimized on the basis of embodiment 1, such as figure 2 As shown, the process of inserting a domain name and corresponding IP address data is as follows:

[0042] 1. Find the node pointed to by the first character of the domain name from the children of the root node. If not found, create a node node1 according to the node data structure, and add the mapping relationship between the first character and node1 to the children of the root node in; if node node1 is found, look for the second character of the domain name.

[0043] 2. Find the node pointed to by the second character of the domain name from the children of the node node1 found or newly created in the previous step. If not found, create a node node2 according to the node data structure, and add the mapping relationship between the second character and node2 To the children of node1; if the node node2 is found, continue to find the third character.

[0044] 3. Find or create the node point...

Embodiment 3

[0047] This embodiment is optimized on the basis of embodiment 1 or 2, as image 3 As shown, the process of querying the IP address corresponding to the domain name from the cached data is as follows:

[0048] 1. Find the node pointed to by the first character of the domain name from the children of the root node, if not found, return no result directly; if node node1 is found, search for the second character of the domain name.

[0049] 2. Find the node pointed to by the second character of the domain name from the children of the node node1 found in the previous step, if not found, return no result; if the node node2 is found, continue to search for the third character.

[0050] 3. Find the node pointed to by the third character of the domain name and subsequent characters according to the previous method, until the node pointed to by the last character, if no corresponding node is found, no result will be returned; if the node pointed to by the last character is found, The...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a DNS cache processing method, which comprises the following steps of: storing a corresponding relationship between domain names and IP (Internet Protocol) addresses of DNS caches by adopting a dictionary tree structure, representing the domain names by using character strings corresponding to node paths, and storing the IP addresses corresponding to the domain names by using the positions of nodes; when the data is inserted, creating a node according to a character path in the domain name character string, and storing an IP address corresponding to the domain name intothe node corresponding to the domain name; and when the IP address corresponding to the domain name is queried, searching the node in the tree according to the character string path in the domain name character string, and obtaining the corresponding IP address stored in the node position after the node is found. According to the DNS cache processing mode provided by the invention, the storage space occupation can be greatly reduced while the stable and efficient query efficiency is obtained. According to the method, meaningless character string comparison is reduced, and the query efficiencyis high; the storage space does not need to be pre-allocated, and the occupied space is small; hash processing is not carried out on the data, and no conflict is generated.

Description

technical field [0001] The invention belongs to the technical field of DNS cache, and in particular relates to a DNS cache processing method. Background technique [0002] With the development of the Internet and network technology, more and more computers are connected to the network to transmit information and share resources. In order to distinguish different computers connected to the network, a unique address is specified for each computer, which is IP If you want to communicate with a certain computer, you must know the IP address of the other party. Since IP addresses are inconvenient to remember and cannot represent meaningful information such as names, the concept of domain names and the domain name system have emerged. A domain name is the name given to each computer, which can contain host name, address and other information. When accessing, you only need to enter the domain name to connect to the corresponding computer. The domain name is for the convenience of...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/12
CPCH04L61/103H04L61/5007H04L61/4511
Inventor 熊利霞范渊吴永越郑学新刘韬
Owner CHENGDU DBAPP SECURITY
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products