DNS hierarchical cache resolution acceleration method and system based on prefetch mechanism

By constructing a hierarchical caching model and prefetching mechanism, combined with real-time network topology awareness and encryption protection, the problems of DNS resolution latency and security are solved, achieving efficient and secure DNS resolution acceleration.

CN120896926BActive Publication Date: 2026-01-27贵州中融信通科技有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511411658.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-01-27
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

There are latency issues in the DNS resolution process, especially in high-concurrency environments. The caching mechanism has a low hit rate and is not updated in a timely manner, which leads to a decline in network performance and user experience. In addition, the cached data lacks encryption protection, which poses security risks.

Method used

A layered caching model is constructed, including a client layer, a local DNS server layer, and an upstream DNS server layer. Combining a prefetching mechanism and cross-layer collaborative caching updates, the model predicts domain name requests through real-time network topology awareness, caches resolution results in advance, and uses AES-256 encryption algorithm and TLS protocol to protect data.

Benefits of technology

Significantly shortens DNS resolution response time, improves cache hit rate, reduces server load, enhances data security, and optimizes user experience and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120896926B_ABST
    Figure CN120896926B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network communication, in particular to a DNS hierarchical cache resolution acceleration method and system based on a prefetch mechanism, which comprises the following steps: constructing a hierarchical cache model, including a client layer, a local DNS server layer and an upstream DNS server layer, and caching the resolved domain names and corresponding resolution results into the cache of each layer; receiving a DNS request of a terminal user, judging whether the request hits the cache, and taking corresponding operation; collecting historical query logs, combining a real-time network topology-aware prefetch mechanism to predict the next DNS request and cache the resolution result of the domain name in the local DNS server layer in advance; adopting a cross-layer collaborative cache updating mechanism to ensure that the cache data of different layers is synchronously updated; and introducing a symmetric encryption algorithm and a TLS protocol to guarantee the security of data in the storage and transmission process. The application accelerates the response of DNS resolution through the prefetch mechanism and the hierarchical cache.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication technology, specifically to a method and system for accelerating DNS hierarchical caching resolution based on a prefetching mechanism. Background Technology

[0002] The Domain Name System (DNS) has become an indispensable core component of network communication. Its main function is to convert user-input domain names (such as www.example.com) into machine-readable IP addresses (such as 192.0.2.1), enabling clients to access target servers and providing fundamental services for the normal operation of the internet. With the rapid development of the internet, the load on the DNS system continues to increase, and DNS resolution latency has gradually become a significant factor restricting network performance and user experience. Traditional DNS resolution processes typically involve multiple queries from the local DNS server to upstream DNS servers, and each query requires waiting for a response. This not only increases network latency but also results in significant bandwidth consumption and wasted computing resources.

[0003] In high-concurrency environments, especially for high-traffic websites or domains frequently accessed by users, frequent DNS resolution requests reach upstream DNS servers, overloading the DNS resolution service and prolonging the response time. Although caching mechanisms are used in both local and upstream DNS servers, issues such as low cache hit rates and untimely cache updates prevent caching from fully realizing its speed-up benefits. Furthermore, the geographical distribution of DNS requests and network congestion further exacerbate latency problems.

[0004] To address this, a DNS hierarchical caching resolution acceleration method and system based on a prefetching mechanism are proposed. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for accelerating DNS resolution by prefetching and hierarchical caching, thereby accelerating the response of DNS resolution through prefetching and hierarchical caching.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] DNS hierarchical caching acceleration methods based on prefetching mechanisms include:

[0008] A hierarchical caching model is constructed, including a client layer, a local DNS server layer, and an upstream DNS server layer. The caching mechanism stores the resolved domain names and their corresponding resolution results. The system receives DNS requests for a given domain name initiated by an end user, determines whether the requested domain name hits the cache in the hierarchical caching model, and performs the corresponding operation.

[0009] Collect and analyze historical DNS query logs from the client and local DNS server layers, predict the next requested domain name through a prefetching mechanism based on real-time network topology awareness, and cache the resolution result of the next requested domain name in advance to the local DNS server layer;

[0010] A cross-layer collaborative caching update mechanism is adopted to ensure that the resolution results of the same domain name in the cross-layer cache remain consistent; a symmetric encryption algorithm and TLS protocol are introduced in the process of cache data storage and data transmission to encrypt the resolution results stored in the layered caching model.

[0011] The hierarchical caching model includes a client layer, a local DNS server layer, and an upstream DNS server layer;

[0012] The client layer is used to store the domain names that have been resolved by the client and their corresponding resolution results;

[0013] The local DNS server layer is used to store the domain names resolved by the local DNS server and their corresponding resolution results;

[0014] The upstream DNS server layer is used to store the domain names resolved by the upstream DNS server and their corresponding resolution results.

[0015] The specific process for determining whether the requested domain name has hit the cache in the hierarchical caching model is as follows:

[0016] Receive DNS requests for a given domain name initiated by end users, identify the domain name in the request, and perform cache hit checks;

[0017] The cache hit check involves checking the client-level cache. If a hit occurs and the TTL is valid, a result is returned. If a miss occurs, the local DNS server-level cache is checked. If a hit occurs and the TTL is valid, a result is returned. If the local cache misses, the upstream DNS server-level cache is checked. If a hit occurs and the TTL is valid, a result is returned. If all three layers miss, a resolution request is sent to the upstream DNS server, and the result is stored in both the local DNS server cache and the client-level cache.

[0018] The prefetching mechanism based on real-time network topology awareness is specifically as follows:

[0019] By collecting and analyzing historical query logs from the client and local DNS server layers, and combining them with the current real-time network topology information, the domain name that the end user may request next is predicted. Based on the predicted domain name, the domain name is resolved in advance at the local DNS server layer, and the resolution result of the predicted domain name is cached.

[0020] The real-time network topology information includes network latency, bandwidth load, and node distance;

[0021] The network latency refers to the latency between different network nodes;

[0022] The bandwidth load refers to the bandwidth usage of each node in the network;

[0023] The node distance refers to the physical distance between the client and the DNS server.

[0024] The specific process of predicting the domain name that the end user might request in the next request is as follows:

[0025] Extract request features related to user behavior based on historical query logs, including request interval features, request frequency, and request periodicity;

[0026] A time-series analysis model is used to train the request features, analyze the time patterns and periodic changes of user request domains, and predict the user's request domains.

[0027] The cross-layer collaborative cache update mechanism is as follows:

[0028] A consistency monitoring unit is established between each layer of the hierarchical caching model to periodically check the validity of the same domain name resolution results in each layer of the cache; when the resolution result in a certain layer of the cache expires, other layers are notified to update the corresponding cache data through a cross-layer communication mechanism to maintain the consistency of each layer of the cache.

[0029] When cached data is found to be expired, a resolution request is first sent to the upstream DNS server, and the new resolution result is updated to all cache layers. For cache updates at the local DNS server layer and the client layer, automatic updates are performed based on the TTL value, so that the data in each cache layer is always in the latest and valid state.

[0030] The specific encryption process is as follows:

[0031] The DNS resolution results are encrypted using the AES-256 symmetric encryption algorithm, and each cached item is encrypted using a unique key; the encryption key is updated regularly and managed through a secure storage mechanism;

[0032] Data is encrypted using the TLS protocol during transmission; only authorized DNS servers can access the cached data upon decryption.

[0033] A DNS hierarchical caching resolution acceleration system based on a prefetching mechanism includes:

[0034] Caching model building module: Builds and manages a layered caching model, including a client layer, a local DNS server layer, and an upstream DNS server layer, which respectively cache the resolved domain names and their results;

[0035] DNS request and response module: Receives DNS requests for a given domain name initiated by the end user, determines whether the requested domain name is cached in the hierarchical caching model, and performs the corresponding operation;

[0036] Prefetching mechanism module: Collects and analyzes historical DNS query logs from the client and local DNS server layers, combines them with real-time network topology information, predicts the domain name that the end user may request next, and caches the resolution result of the domain name in advance to the local DNS server layer;

[0037] Cache update module: A cross-layer collaborative cache update mechanism is adopted to ensure that the resolution results of the same domain name in the cross-layer cache remain consistent; a symmetric encryption algorithm and TLS protocol are introduced in the process of cache data storage and data transmission to encrypt the resolution results stored in the layered cache model.

[0038] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0039] 1. This invention constructs a hierarchical caching model and combines it with a prefetching mechanism based on real-time network topology awareness, enabling it to predict and cache domain name resolution results that users may request in advance. Traditional methods typically rely on a single caching layer and a static resolution request-response process, failing to anticipate the requested domain name, resulting in slow resolution speeds and susceptibility to network latency and traffic peaks. In contrast, this invention, through a multi-layered caching mechanism and intelligent prefetching mechanism, can significantly shorten DNS resolution response time when the cache is hit, thereby improving the overall system response speed and user experience.

[0040] 2. This invention introduces a cross-layer collaborative cache update mechanism to achieve data consistency among the client layer, local DNS server layer, and upstream DNS server layer, ensuring that caches at different levels can be updated synchronously and remain consistent. This mechanism not only improves the cache hit rate and reduces redundant resolution requests, but also reduces the frequency of requests to the upstream DNS server, effectively alleviating the burden on the upstream server compared to traditional methods, thereby improving overall resolution performance.

[0041] 3. This invention encrypts the DNS resolution results stored in the cache using the AES-256 symmetric encryption algorithm and uses the TLS protocol for encryption during data transmission, effectively preventing the leakage and tampering of DNS resolution results. Compared to traditional DNS methods where cached and transmitted data often lack sufficient encryption protection, this encryption mechanism provides higher data security, ensuring the confidentiality and integrity of user requests and resolution results during storage and transmission, significantly enhancing protection capabilities and resisting potential network attacks and data leakage risks. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of the DNS hierarchical caching resolution acceleration method based on prefetching mechanism of the present invention;

[0043] Figure 2 This is a schematic diagram of the encryption method of the present invention;

[0044] Figure 3 A schematic diagram of the structure of the DNS hierarchical caching resolution acceleration system based on the prefetching mechanism of the present invention. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Example

[0046] Please see Figure 1 This invention provides a DNS hierarchical caching resolution acceleration method based on a prefetching mechanism, comprising:

[0047] A hierarchical caching model is constructed, including a client layer, a local DNS server layer, and an upstream DNS server layer. The caching mechanism stores the resolved domain names and their corresponding resolution results. The system receives DNS requests for a given domain name initiated by an end user, determines whether the requested domain name hits the cache in the hierarchical caching model, and performs the corresponding operation.

[0048] Collect and analyze historical DNS query logs from the client and local DNS server layers, predict the next requested domain name through a prefetching mechanism based on real-time network topology awareness, and cache the resolution result of the next requested domain name in advance to the local DNS server layer;

[0049] A cross-layer collaborative caching update mechanism is adopted to ensure that the resolution results of the same domain name in the cross-layer cache remain consistent; a symmetric encryption algorithm and TLS protocol are introduced in the process of cache data storage and data transmission to encrypt the resolution results stored in the layered caching model.

[0050] The hierarchical caching model described in this embodiment includes a client layer, a local DNS server layer, and an upstream DNS server layer;

[0051] The client layer is used to store the domain names that have been resolved by the client and their corresponding resolution results. The storage condition is that if a domain name has been requested more than 5 times in the past 24 hours and the TTL has not expired, the resolution result of the domain name is stored in the client layer cache.

[0052] The local DNS server layer is used to store the domain names resolved by the local DNS server and their corresponding resolution results. The storage condition is that if a domain name has been requested more than 20 times in the local DNS server in the past 7 days and the TTL has not expired, the resolution result of the domain name is stored in the local DNS server cache.

[0053] The upstream DNS server layer is used to store the domain names resolved by the upstream DNS server and their corresponding resolution results. The storage condition is that if the number of resolution requests for a certain domain name reaches 1,000 times across the entire network and the TTL has not expired, then the resolution result of the domain name is stored in the cache of the upstream DNS server layer.

[0054] By constructing a layered caching model with caches at the client, local DNS server, and upstream DNS server levels, a highly efficient and intelligent domain name resolution system is built. The local cache at the client level significantly reduces network latency for each query, directly improving the user's immediate experience. The local DNS server layer can not only respond to a large number of user requests but also perform intelligent prefetching based on domain name access patterns and query frequency, further improving cache hit rate and reducing reliance on remote servers. The upstream DNS server layer caching effectively alleviates the load on higher-level DNS servers, ensuring the stability and efficiency of DNS resolution across the entire internet. This multi-layered, collaborative caching mechanism collectively guarantees high-speed, stable, and resource-efficient domain name resolution.

[0055] The specific process for determining whether the requested domain name has hit the cache in the hierarchical caching model is as follows:

[0056] Receive DNS requests for a given domain name initiated by end users, identify the domain name in the request by calling network libraries provided by programming languages ​​(such as the dnspython library for Python or the net library for Go), and perform cache hit checks;

[0057] The cache hit check is as follows:

[0058] First, check if the DNS resolution result for that domain name is already stored in the client-side cache, and whether the TTL (Time To Live) of that resolution result is still valid. If a match is found and the TTL is valid, return the resolution result directly.

[0059] If the client cache misses, the local DNS server cache is queried. The cache duration is calculated by comparing the current time with the timestamp when the record was cached, ensuring this duration is less than the original TTL value obtained from the authoritative server. The local DNS server cache is then queried to verify whether the domain name resolution result is cached and whether the TTL is valid. If the local cache hits and the TTL is valid, the resolution result is returned.

[0060] If the local DNS cache also fails to find the domain name, the system further queries the upstream DNS server cache to confirm whether the domain name resolution exists and whether the TTL (Time To Live) is valid. If the upstream cache is found and the TTL is valid, the resolution result is returned.

[0061] If none of the three caches are hit, a resolution request is initiated to the upstream DNS server. After obtaining the resolution result from the upstream DNS server, the result is stored in both the local DNS server cache and the client cache so that the cached data can be used for the next query, reducing the resolution time of future requests.

[0062] If the cache is hit, but the TTL has expired, a new parsing request will be initiated and the cache will be updated.

[0063] This process effectively improves DNS resolution efficiency through cache hit checks. By first checking the client-level cache, then the local DNS server-level cache, and finally the upstream DNS server cache, query response latency is minimized. Simultaneously, TTL validity management of cached results ensures the accuracy and timeliness of the returned results. For misses, the resolution result is retrieved from the upstream DNS server and updated in both the local and client caches, further reducing resolution time and network burden for future requests and optimizing overall DNS resolution performance. Furthermore, timely cache updates when TTL expires help ensure that cached data remains up-to-date, improving system stability and reliability.

[0064] Historical DNS query logs are collected from both the client and local DNS server layers, recording past domain name resolution requests from end users. By analyzing this data, common request patterns can be identified, such as domains that users access regularly or domains with high access frequency.

[0065] Obtain current network topology information, including network latency, bandwidth load, and node distance, to optimize prefetching decisions;

[0066] The network latency refers to the latency between different network nodes;

[0067] The bandwidth load refers to the bandwidth usage of each node in the network;

[0068] The node distance refers to the physical distance between the client and the DNS server.

[0069] First, select a DNS server with a latency of less than 30 milliseconds, a bandwidth load of less than 60 Mbps, and a proximity to the client for domain name resolution. For example, when selecting two DNS servers, assume DNS server A has a latency of 30 milliseconds, a bandwidth load of 50 Mbps, and is 10 kilometers away from the client, while DNS server B has a latency of 50 milliseconds, a bandwidth load of 80 Mbps, and is 20 kilometers away from the client. Prioritize DNS server A, which has lower latency, lower bandwidth load, and is closer to the client, to resolve the domain name in advance, reducing the resolution time of future requests, improving the efficiency of domain name resolution, and ensuring a smoother user experience.

[0070] Based on the predicted domain name (e.g., example.com), the local DNS server resolves it in advance. For example, assuming that the IP address resolved to example.com is 192.168.1.1 and the TTL is 3600 seconds (i.e., 1 hour), the result will be stored in the local DNS cache in the format: the IP address corresponding to the domain name example.com is 192.168.1.1, and the TTL is 3600 seconds.

[0071] By combining historical DNS query logs and real-time network topology information for prefetching optimization, the system can significantly improve the efficiency of domain name resolution. By analyzing the historical request patterns of end users, it can identify frequently accessed domain names and domain names with high access frequency in advance, thereby effectively predicting future requests. By selecting DNS servers with lower latency, lower bandwidth load, and closer proximity to the client, network latency and bandwidth burden are reduced, and the speed of domain name resolution is improved. Pre-resolving domain names on the local DNS server and caching the results not only reduces the resolution time of future requests but also improves the overall user experience. Especially in high-concurrency request environments, it can ensure rapid response and optimize system performance and stability.

[0072] Collect historical DNS query logs from end users and the local DNS server layer. These logs include the timestamps of user domain name requests, the requested domain name, and its resolution results;

[0073] Features related to user behavior were extracted from these logs, mainly including:

[0074] Request interval characteristic: The time difference between adjacent DNS requests initiated by a user. For example, if a user visits a website every 30 minutes, this characteristic can help predict when the user will request the domain name again;

[0075] Request frequency: The number of times a user requests a particular domain within a certain period. For example, if a user visits a site three times a week, this characteristic helps determine whether the domain will be requested again in the near future.

[0076] Request periodicity: Does a user's access to a particular domain exhibit a periodic pattern? For example, a user might frequently visit a website on weekdays and less frequently on weekends. Based on this periodicity, time-series analysis models can determine which domains are likely to be accessed during specific time periods.

[0077] By training the above features using a time series analysis model, the time patterns and periodic changes of user-requested domain names can be identified.

[0078] The time series analysis model is an LSTM model, with multiple LSTM layers configured as needed. The number of hidden units in each layer can be specified. To avoid overfitting, a Dropout layer can be added after the LSTM layers to control the dropout rate of neurons. A fully connected layer is typically added after the LSTM layers. During model training, the cross-entropy loss function is used, with a learning rate of 0.001, a batch size of 32, and 100 iterations.

[0079] The model automatically predicts the domains a user might visit in the future based on the user's historical request intervals, frequency, and periodicity.

[0080] After the time-series model is trained, it predicts future requests. For example, if a user habitually visits a domain at a certain time each week, the model will predict that the user is likely to visit that domain again.

[0081] Based on the predicted results, domain name resolution is performed in advance at the local DNS server layer, and the resolution results are cached. This way, when a user actually makes a request, the result can be directly returned from the cache, avoiding repeated domain name resolution processes, thus saving time and improving resolution efficiency.

[0082] For the predicted domain name resolution results, store them in the cache of the local DNS server, set an appropriate TTL, and ensure the validity and timeliness of the cache;

[0083] If the user's actual request matches the prediction result, the cached resolution result is returned directly; if the prediction fails, the system re-initiates the domain name resolution and updates the cache.

[0084] By using time-series analysis models to predict users' future DNS requests, the resolution efficiency of local DNS servers can be significantly improved. By predicting the domain names that users may access in advance and storing the resolution results in a cache, repeated resolution processes can be reduced, the load on the DNS server can be lowered, and response speed can be improved. This pre-resolution mechanism not only optimizes the user experience and reduces access latency, but also effectively alleviates DNS pressure during high-concurrency periods, ensuring the efficient operation of the system. By setting an appropriate TTL (Time To Live), the validity of cached results can be ensured, preventing expired data from affecting the accuracy of resolution, thereby improving the overall performance and reliability of the system.

[0085] Each caching layer requires a consistency monitoring unit. Its main task is to periodically check the validity of the same domain name resolution results in that layer's cache, ensuring that the content of each cache is up-to-date and valid. The monitoring content includes the domain name resolution results and their Time-To-Live (TTL) stored in each cache layer. The monitoring unit checks whether the cached domain name resolution results have expired or have been updated. If the TTL has expired, or the resolution result is inconsistent with the actual DNS query result, the monitoring unit triggers an update mechanism, enabling different caching layers to effectively collaborate and guarantee the accuracy and timeliness of the resolution results.

[0086] When a DNS resolution result expires in the cache, the cross-layer communication mechanism notifies other layers' caches to synchronize and update. This process ensures data consistency across cache layers, preventing different layers from storing different DNS resolution results; cross-layer communication is achieved through a distributed message passing mechanism. When a layer detects a cache update requirement, it sends a notification message to other layers, instructing them to synchronize and update the DNS resolution result for that domain name.

[0087] When the cross-layer communication mechanism triggers a cache update, the specific process is as follows:

[0088] Each level of cache periodically checks whether the domain name resolution results in the cache have expired; if a domain name resolution result expires (TTL expires), the monitoring unit will detect the situation;

[0089] The monitoring unit sends notifications to other layers through a cross-layer communication mechanism, indicating that the corresponding domain name resolution results need to be updated; the notification should include information such as the domain name to be updated, the updated resolution result, and TTL;

[0090] The layer that receives the notification will update its cache based on the new parsing result; if it needs to obtain the parsing result from other layers, the cache layer will request the latest data from the corresponding upstream or downstream layer. The updated cache will continue to store the new parsing result and set the corresponding TTL value.

[0091] Each caching layer collaborates across layers to ensure that the domain name resolution results in each layer's cache remain consistent.

[0092] To ensure cache effectiveness, the TTL (Time-To-Live) in each cache layer needs to be managed and adjusted:

[0093] The cross-layer collaborative update mechanism ensures that the TTL value is set based on the latest DNS resolution results when the cache is updated. If the TTL of a certain layer's cache has expired, the updated TTL will be adjusted according to the TTL value in the DNS response.

[0094] When cross-layer communication triggers a cache update, the TTL of all relevant layers will be updated synchronously to ensure the consistency of the domain name resolution results in the cache across all layers.

[0095] Cross-layer collaborative caching update mechanisms can significantly improve the efficiency and stability of DNS resolution systems. By ensuring that domain name resolution results in each layer of the cache are always consistent, it avoids resolution errors and performance issues caused by cache inconsistencies. In a multi-layer caching environment, each layer checks and synchronizes periodically in real time, reducing duplicate resolution requests caused by expired or changed resolution results, alleviating the load on DNS servers, and optimizing response time. The cross-layer communication mechanism ensures the timeliness and accuracy of cache updates, especially during high-traffic periods, ensuring faster and more accurate resolution results when accessing the system.

[0096] The specific encryption process is as follows:

[0097] The DNS resolution result for each cached item is encrypted using the AES-256 symmetric encryption algorithm to ensure that the data is not interpreted by unauthorized visitors during storage. Encryption is performed by setting an independent key for each cached item. The key is generated through a key management system to ensure that the resolution result of each DNS request has a unique key and that the keys are not shared, thus preventing key leakage from causing widespread security risks.

[0098] To enhance security, the encryption keys for cached items should be updated regularly. New keys should be regenerated at certain time intervals (such as monthly or weekly) and the data in the cache should be re-encrypted. The encryption keys should be managed through a secure storage mechanism. The keys should not be stored in plaintext, but should be stored encrypted through a Hardware Security Module (HSM) or Key Management Service (KMS) to ensure that the keys cannot be accessed by unauthorized persons at any time, thereby increasing security.

[0099] During data transmission, TLS is used to encrypt communication. TLS ensures that data is not eavesdropped on or tampered with during transmission over the network, guaranteeing data integrity and confidentiality. Whether it's a DNS request or DNS resolution result, all transmitted data is encrypted with TLS to prevent interception by third parties during transmission.

[0100] Only authorized DNS servers can decrypt data stored in the cache. Each authorized server holds a key used to decrypt the corresponding cached entry. The decryption process requires authentication to ensure that only legitimate DNS servers can access the cached content.

[0101] To ensure that only authorized DNS servers can decrypt encrypted data, a strong authentication mechanism is employed. During this process, each DNS server must authenticate itself using a digital certificate, pre-shared key (PSK), or other authentication methods. First, the DNS server provides its own identity information, such as a digital certificate or key hash, for authentication. This information is checked to ensure it originates from a trusted Certificate Authority (CA) or matches the pre-shared key. Only after successful authentication is the DNS server authorized to access the encrypted cached data and provided with the corresponding decryption key. To ensure data security, all decryption operations are strictly controlled in terms of access permissions, and each key usage is recorded and audited. This authentication mechanism prevents unauthorized servers from obtaining the decryption key, ensuring the security of DNS resolution data.

[0102] All encrypted DNS resolution results are stored in a local cache. Because the data is encrypted, even if the cache is stolen or leaked, unauthorized users cannot decipher the data content. Whenever the cached content needs to be updated (e.g., when the TTL expires), the new DNS resolution results are encrypted again and stored. The update process also uses a separate encryption key and follows the same key management and update rules, such as... Figure 2 As shown.

[0103] By employing the AES-256 encryption algorithm and TLS encrypted transmission mechanism, DNS resolution results are strongly protected during storage and transmission; a strong authentication mechanism ensures that only authorized DNS servers can decrypt and access cached data, preventing unauthorized servers from tampering with or stealing cached data; and the protection of keys is further strengthened by storing keys through a key management system and a hardware security module (HSM), effectively preventing potential security threats and ensuring the robustness and reliability of the DNS system.

[0104] By implementing a DNS hierarchical caching acceleration method based on a prefetching mechanism, the performance and security of the DNS resolution system can be significantly improved. The constructed hierarchical caching model shares cached data among the client layer, local DNS server layer, and upstream DNS server layer, increasing the probability of DNS resolution hits and reducing unnecessary domain name resolution requests, thereby speeding up the resolution process and reducing server load. By analyzing historical query logs of the client and local DNS server layers, combined with a real-time network topology-aware prefetching mechanism, the next DNS request can be predicted and the resolution results can be cached in advance, further accelerating response time. The cross-layer collaborative caching update mechanism ensures that the resolution results of the same domain name in different cache layers are consistent, avoiding resolution errors and delays caused by cache inconsistency. During data storage and transmission, symmetric encryption algorithms and the TLS protocol are introduced to protect DNS resolution results, preventing data leakage and tampering, and enhancing system security. Example

[0105] User A uses a DNS hierarchical caching acceleration system based on a prefetching mechanism to request DNS resolution for the domain name of the e-commerce website www.example.com. Figure 3 As shown, the specific process is as follows:

[0106] When a user enters www.example.com in their browser and presses Enter, the browser will send a DNS request to the local DNS server, requesting that the domain name's IP address be resolved.

[0107] After receiving a user request, the DNS request and response module first checks if the cache already contains a resolution result for www.example.com. The specific process is as follows:

[0108] The local DNS server checks its local cache. If the domain's cache is still within its TTL (Time To Live) (assuming a TTL of 45 minutes), it directly returns the cached IP address to the user. This entire process takes approximately 0.5 seconds.

[0109] If the cache has expired or the cache is not hit, the local DNS server will forward the request to the upstream DNS server to obtain the latest resolution result. In this case, the DNS request response time increases to approximately 2 seconds.

[0110] To accelerate subsequent DNS resolution requests, the caching model module utilizes a tiered caching mechanism to manage cached data on the local DNS server. If a request is eventually forwarded to the upstream DNS server, and that server returns the IP address of www.example.com, the local DNS server stores the resolution result in its local cache with a TTL of 1 hour. Simultaneously, the upstream DNS server also caches the resolution result for that domain name with a TTL of 24 hours. This process ensures the effectiveness of multi-layered caching, reduces duplicate DNS requests, and optimizes performance.

[0111] The prefetching mechanism module analyzes historical DNS query logs and user behavior to predict the domains a user might request in advance. For example, if the system analyzes that a user visits www.example.com every Wednesday evening, the prefetching mechanism module will automatically cache the DNS resolution results for www.example.com on the local DNS server before Wednesday. This way, the user's next request will directly hit the cache, avoiding duplicate queries and improving response speed. For example, pre-cached resolution results can reduce DNS request latency from 2 seconds to 0.3 seconds.

[0112] When the TTL of www.example.com expires, or when the resolution result changes, the cache update module will initiate a cross-layer collaborative cache update mechanism to ensure cache consistency between the local DNS server and the upstream DNS server. At this time, the local DNS server will detect that the domain name resolution result in the cache has expired, notify the upstream DNS server to synchronize the update, and update the local cache in a timely manner. Simultaneously, all cache update operations are encrypted using the AES-256 symmetric encryption algorithm to ensure data security. During transmission, all DNS requests and resolution results are encrypted using the TLS protocol to prevent data interception or tampering during transmission.

[0113] If DNS resolution is successful and the result is in the cache, the user will receive the IP address of www.example.com. The browser will then send an HTTP request to that IP address to load the website content. The DNS resolution time for the entire process is significantly reduced due to cache hits; with a local cache hit, the DNS response time is only 0.3 seconds, improving the user experience.

[0114] This system, through a hierarchical caching model and intelligent prefetching mechanism, not only reduces DNS request latency but also optimizes network bandwidth usage. When users request frequently accessed domains, the local cache is quickly hit, significantly shortening response time and improving user experience. The cross-layer collaborative caching update mechanism ensures the consistency and timeliness of cached data, avoiding resolution errors caused by data inconsistency. Simultaneously, the system introduces symmetric encryption algorithms and the TLS protocol during cache storage and data transmission, effectively protecting data security during DNS resolution and preventing data leakage and tampering. Overall, this system improves DNS resolution efficiency, reduces DNS server load, and enhances system stability and security.

[0115] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A DNS hierarchical caching resolution acceleration method based on a prefetching mechanism, characterized in that, include: A layered caching model is constructed, including a client layer, a local DNS server layer, and an upstream DNS server layer, and the resolved domain names and their corresponding resolution results are stored through a caching mechanism; Receive DNS requests for a given domain name initiated by an end user, determine whether the requested domain name is cached in the hierarchical caching model, and perform the corresponding operation. Historical DNS query logs from the client and local DNS server layers are collected and analyzed. A prefetching mechanism based on real-time network topology awareness is used to predict the next requested domain name, and the resolution result of this next requested domain name is cached in advance at the local DNS server layer. The prefetching mechanism based on real-time network topology awareness specifically involves: By collecting and analyzing historical query logs from the client and local DNS server layers, and combining them with the current real-time network topology information, the domain name that the end user may request next is predicted. Based on the predicted domain name, the domain name is resolved in advance at the local DNS server layer, and the resolution result of the predicted domain name is cached. The real-time network topology information includes network latency, bandwidth load, and node distance; The network latency refers to the latency between different network nodes; The bandwidth load refers to the bandwidth usage of each node in the network; The node distance is the physical distance between the client and the DNS server; The specific process of predicting the domain name that an end user might request in the next request based on the current real-time network topology information is as follows: Extract request features related to user behavior based on historical query logs, including request interval features, request frequency, and request periodicity; A time series analysis model is used to train the request features, analyze the time patterns and periodic changes of user request domains, and predict the user's request domains. A cross-layer collaborative caching update mechanism is adopted to ensure that the resolution results of the same domain name are consistent in cross-layer caches; Symmetric encryption algorithms and the TLS protocol are introduced during the storage and transmission of cached data to encrypt the parsing results stored in the hierarchical caching model.

2. The DNS hierarchical caching resolution acceleration method based on prefetching mechanism according to claim 1, characterized in that, The hierarchical caching model includes a client layer, a local DNS server layer, and an upstream DNS server layer; The client layer is used to store the domain names that have been resolved by the client and their corresponding resolution results; The local DNS server layer is used to store the domain names resolved by the local DNS server and their corresponding resolution results; The upstream DNS server layer is used to store the domain names resolved by the upstream DNS server and their corresponding resolution results.

3. The DNS hierarchical caching resolution acceleration method based on prefetching mechanism according to claim 1, characterized in that, The specific process of receiving a DNS request for a given domain name initiated by a terminal user, determining whether the requested domain name resolution hits the cache in the hierarchical caching model, and performing the corresponding operation is as follows: Receive DNS requests for a given domain name initiated by end users, identify the domain name in the request, and perform cache hit checks; The cache hit check checks the client-level cache; if a hit is found and the TTL is valid, the result is returned. If the match is not found, check the local DNS server cache. If the match is found and the TTL is valid, return the result. If the local cache is not hit, check the upstream DNS server cache. If it is hit and the TTL is valid, return the result. If all three layers fail to find a match, a resolution request is sent to the upstream DNS server, and the resolution result is stored in the local DNS server cache and the client-side cache.

4. The DNS hierarchical caching resolution acceleration method based on prefetching mechanism according to claim 1, characterized in that, The cross-layer collaborative cache update mechanism is as follows: Establish a consistency monitoring unit between each layer of the hierarchical caching model to periodically check the validity of the same domain name resolution results in each layer of the cache; When the parsing result in a certain layer of cache expires, other layers are notified to update the corresponding cache data through a cross-layer communication mechanism to maintain the consistency of caches across layers. When cached data is found to be expired, a resolution request is first sent to the upstream DNS server, and the new resolution result is updated to all cache layers. For cache updates at the local DNS server layer and the client layer, automatic updates are performed based on the TTL value, so that the data in each cache layer is always in the latest and valid state.

5. The DNS hierarchical caching resolution acceleration method based on prefetching mechanism according to claim 1, characterized in that, The specific process of encrypting the parsing results stored in the hierarchical caching model is as follows: The DNS resolution results are encrypted using the AES-256 symmetric encryption algorithm, and each cached item is encrypted using a unique key; the encryption key is updated regularly and managed through a secure storage mechanism; Data is encrypted using the TLS protocol during transmission; only authorized DNS servers can access the cached data upon decryption.

6. A DNS hierarchical caching resolution acceleration system based on a prefetching mechanism, characterized in that, include: Caching model building module: Builds and manages a layered caching model, including a client layer, a local DNS server layer, and an upstream DNS server layer, and stores resolved domain names and their corresponding resolution results through a caching mechanism; DNS request and response module: Receives DNS requests for a given domain name initiated by the end user, determines whether the requested domain name is cached in the hierarchical caching model, and performs the corresponding operation; Prefetching mechanism module: Collects and analyzes historical DNS query logs from the client and local DNS server layers, predicts the next requested domain name through a real-time network topology-aware prefetching mechanism, and caches the resolution result of that domain name in advance at the local DNS server layer; the real-time network topology-aware prefetching mechanism specifically works as follows: By collecting and analyzing historical query logs from the client and local DNS server layers, and combining them with the current real-time network topology information, the domain name that the end user may request next is predicted. Based on the predicted domain name, the domain name is resolved in advance at the local DNS server layer, and the resolution result of the predicted domain name is cached. The real-time network topology information includes network latency, bandwidth load, and node distance; The network latency refers to the latency between different network nodes; The bandwidth load refers to the bandwidth usage of each node in the network; The node distance is the physical distance between the client and the DNS server; The specific process of predicting the domain name that an end user might request in the next request based on the current real-time network topology information is as follows: Extract request features related to user behavior based on historical query logs, including request interval features, request frequency, and request periodicity; A time series analysis model is used to train the request features, analyze the time patterns and periodic changes of user request domains, and predict the user's request domains. Cache update module: Employs a cross-layer collaborative cache update mechanism to ensure that the resolution results of the same domain name remain consistent across different cache layers; Symmetric encryption algorithms and the TLS protocol are introduced during the storage and transmission of cached data to encrypt the parsing results stored in the hierarchical caching model.

Citation Information

Patent Citations

  • Domain name resolution (DNS) acceleration method and device based on home gateway

    CN103973834A

  • Adaptive resilient network communication

    US20220329522A1