IP Library › Granted Patent US 9,930,005
Granted Patent B2
US 9,930,005 · App. 15/301,712 · Granted Mar 27, 2018

Method, device and system for processing DNS cache information

Inventors: Xiangdong Qi (Beijing, CN); Can Pu (Beijing, CN); Xiaosheng Tan (Beijing, CN)
Assignee: Beijing Qihoo Technology Limited
H04L61/1511G06F17/30362G06F17/30477H04L61/6009H04L67/2842H04L67/42
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,930,005
App. No.
15/301,712
Granted
Mar 27, 2018
Kind
B2
Abstract

Provided are a DNS cache information processing method, device and system. The method comprises: upon reception of a client request, resolving and obtaining domain name information requested by the client; querying in a database a data structure corresponding to the domain name information; when finding the data structure, acquiring read lock information corresponding to the data structure, the read lock information being permission information allowing performing a read operation of the cache information stored in the data structure; reading the cache information in the data structure by using the permission of the read lock information, and transmitting the read cache information to a sender requested by the client. The embodiment of the present invention can improve caching speed and cache information throughput, improving the flexibility of cache information, and enhancing the quality of stored information.

Claims (72)

1. A method for processing Domain Name System (DNS) cache information, comprising:

obtaining domain name information from a first client request;

querying a server according to the domain name information and acquiring a query result;

generating a corresponding data structure in a database and converting the query result to cache information stored in the corresponding data structure, wherein the generating the corresponding data structure further comprises:

classifying the domain name information based on one or more predetermined rules, and

determining and setting lock information of the corresponding data structure based on a classification result, wherein the lock information is associated with at least one permission for performing a corresponding operation on the cache information, and the lock information comprises at least one of read lock information and write lock information;

querying the corresponding data structure in the database in response to receiving a second client request, the second client request including the domain name information;

acquiring the cache information from the corresponding data structure; and

transmitting the cache information to a sender of the second client request.

2. The method according to claim 1 , wherein the querying the corresponding data structure further comprises:

performing a hash value operation on the domain name information to obtain a hash value of the domain name information; and

querying, in a hash table, the corresponding data structure according to the hash value of the domain name information.

3. The method according to claim 1 , further comprising:

transmitting the query result to a sender of the first client request.

4. The method according to claim 1 , further comprising:

determining a default rule for updating the cache information according to the classification result, wherein the default rule comprises updating the cache information according to at least one of a level of the domain name information and statistics of visits to the domain name information.

5. The method according to claim 4 , wherein after the transmitting the cache information to a sender of the second client request, the method further comprises:

determining whether to update the cache information according to the default rule for updating the cache information;

if yes, acquiring updated information from the server and writing the updated information into the corresponding data structure in the database;

if no, remaining the cache information unchanged.

6. The method according to claim 5 , wherein the writing the updated information into the corresponding data structure in the database comprises:

triggering an operation for acquiring the write lock information of the corresponding data structure storing the cache information; and

writing the updated information into the corresponding data structure in the database when acquiring the write lock information of the corresponding data structure.

7. The method of claim 1 , wherein the database comprises a plurality of data structures, each of the plurality of data structures storing corresponding cache information and having corresponding lock information.

8. The method of claim 1 , wherein the acquiring the cache information from the corresponding data structure further comprises:

obtaining the read lock information of the corresponding data structure; and

reading the cache information in the corresponding data structure by using a permission associated with the read lock information, the permission allowing to perform a read operation on the cache information stored in the corresponding data structure.

9. A computing device, comprising:

a memory having instructions stored thereon;

a processor configured to execute the instructions to perform operations for processing Domain Name System (DNS) cache information, the operations comprising:

receiving a first client request;

obtaining domain name information from the first client request;

querying a server according to the domain name information and acquiring a query result;

generating a corresponding data structure in a database and converting the query result to cache information stored in the corresponding data structure, wherein the generating the corresponding data structure further comprises:

classifying the domain name information based on one or more predetermined rules, and

determining and setting lock information of the corresponding data structure based on a classification result, wherein the lock information is associated with at least one permission for performing a corresponding operation on the cache information, and the lock information comprises at least one of read lock information and write lock information;

querying the corresponding data structure in the database in response to receiving a second client request, the second client request including the domain name information;

acquiring the cache information from the corresponding data structure; and

transmitting the cache information to a sender of the second client request.

10. The computing device according to claim 9 , wherein the querying the corresponding data structure further comprises:

performing a hash value operation on the domain name information to obtain a hash value of the domain name information; and

querying, in a hash table, the corresponding data structure according to the hash value of the domain name information.

11. The computing device according to claim 9 , wherein the operations further comprising:

transmitting the query result to a sender of the first client request.

12. The computing device according to claim 9 , wherein the operations further comprises:

determining a default rule for updating the cache information according to the classification result, wherein the default rule comprises updating the cache information according to at least one of a level of the domain name information and statistics of visits to the domain name information.

13. The computing device according to claim 12 , wherein the processor is further configured to perform:

determining whether to update the cache information according to the default rule for updating the cache information after the transmitter transmits the cache information to the sender of the client request;

if yes, acquiring updated information from the server and writing the updated information into the corresponding data structure in the database;

if no, remaining the cache information unchanged.

14. The computing device according to claim 13 , wherein the writing the updated information into the corresponding data structure in the database comprises:

triggering an operation for acquiring the write lock information of the data structure storing the cache information; and

writing the updated information into the corresponding data structure in the database when acquiring the write lock information of the corresponding data structure.

15. The computing device of claim 9 , wherein the database comprises a plurality of data structures, each of the plurality of data structures storing corresponding cache information and having corresponding lock information.

16. The computing device of claim 9 , wherein the acquiring the cache information from the corresponding data structure further comprises:

obtaining the read lock information of the corresponding data structure; and

reading the cache information in the corresponding data structure by using a permission associated with the read lock information, the permission allowing to perform a read operation on the cache information stored in the corresponding data structure.

17. A non-transitory computer-readable medium, having computer programs stored thereon that, when executed by one or more processors of a computing device, cause the computing device to perform:

obtaining domain name information from a first client request;

querying a server according to the domain name information and acquiring a query result;

generating a corresponding data structure in a database and converting the query result to cache information stored in the corresponding data structure, wherein the generating the corresponding data structure further comprises:

classifying the domain name information based on one or more predetermined rules, and

determining and setting lock information of the corresponding data structure based on a classification result, wherein the lock information is associated with at least one permission for performing a corresponding operation on the cache information, and the lock information comprises at least one of read lock information and write lock information;

querying the corresponding data structure in the database in response to receiving a second client request, the second client request including the domain name information;

acquiring the cache information from the corresponding data structure; and

transmitting the cache information to a sender of the second client request.

18. The non-transitory computer-readable medium according to claim 17 , wherein the querying the corresponding data structure further comprises:

performing a hash value operation on the domain name information to obtain a hash value of the domain name information; and

querying, in a hash table, the corresponding data structure according to the hash value of the domain name information.

19. The non-transitory computer-readable medium according to claim 17 , wherein after the querying in a database a data structure corresponding to the domain name information, the computing device is further caused to perform:

transmitting the query result to a sender of the first client request.

20. The non-transitory computer-readable medium of claim 17 , wherein the database comprises a plurality of data structures, each of the plurality of data structures storing corresponding cache information and having corresponding lock information.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 6, 2016
From: QI, XIANGDONG; PU, CAN; TAN, XIAOSHENG
To: BEIJING QIHOO TECHNOLOGY COMPANY LIMITED
Reel/Frame 039957/0892 →
Priority Claims (1)
CN 2014 1 0135732 · Apr 4, 2014 · national
Continuity (1)
Related Publication 20170126617A1 · May 4, 2017