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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com