CN104144231B - Method and device for processing DNS query request - Google Patents

Method and device for processing DNS query request Download PDF

Info

Publication number
CN104144231B
CN104144231B CN201410416273.4A CN201410416273A CN104144231B CN 104144231 B CN104144231 B CN 104144231B CN 201410416273 A CN201410416273 A CN 201410416273A CN 104144231 B CN104144231 B CN 104144231B
Authority
CN
China
Prior art keywords
domain name
dns
target
resolution result
dns resolution
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.)
Active
Application number
CN201410416273.4A
Other languages
Chinese (zh)
Other versions
CN104144231A (en
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.)
Zhuhai Baoqu Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201410416273.4A priority Critical patent/CN104144231B/en
Publication of CN104144231A publication Critical patent/CN104144231A/en
Application granted granted Critical
Publication of CN104144231B publication Critical patent/CN104144231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a method and a device for processing a DNS query request, wherein the method comprises the following steps: acquiring a DNS query request which is forwarded by a forwarding driver associated with a network card driver and carries a target domain name to be resolved; after monitoring a data packet which is processed by a network card driver and sent by a handheld terminal with a target port being a preset port, a forwarding driver performs data stripping processing from a session layer to an application layer to obtain a DNS query request; judging whether the target domain name exists in a historical mapping record of the domain name and the DNS analysis result, if so, feeding back the target DNS analysis result corresponding to the determined target domain name to the handheld terminal; and if not, requesting a target DNS analysis result of the target domain name based on the first class DNS server in the local network configuration information, feeding back to the handheld terminal when a valid DNS analysis result is requested, and storing a mapping record of the target domain name and the target DNS analysis result. By the scheme, the efficiency of processing the DNS query request is improved.

Description

Handle the method and device of DNS query request
Technical field
The present invention relates to data processing field, more particularly to a kind of method and device for handling DNS query request.
Background technology
With the development that science and technology is at full speed, various terminals are constantly enriched and facilitate popular life.Due to using eventually End processing information has the advantages such as convenient and swift, saving resource so that terminal is as indispensable in the life or work of user A part.In practical application, the terminal such as smart mobile phone, notebook computer, tablet personal computer and desktop computer is widely used to In daily life.Also, various client softwares can be installed in terminal, such as:MSN, net purchase are soft Part, application market software, WIFI shareware etc..
Wherein, by be provided with wireless network card terminal (such as:Desktop computer, notebook computer etc.) in installation WIFI Shareware, can be using the terminal as hot terminal, to play a part of wireless router, so that handheld terminal (example Such as:Smart mobile phone, tablet personal computer etc.) it can be surfed the Net using the wireless router.
In the prior art, handheld terminal can access domain name by being provided with the hot terminal acquisition of wifi shareware Dns resolution result, and then conducted interviews operation based on the dns resolution result obtained.Specifically, handheld terminal transmission includes The packet of DNS query request will pass through session layer, expression layer and application layer successively after the network-driven by hot terminal Processing layer by layer, final WIFI shareware can obtain DNS query request, and then DNS query request be carried out follow-up Processing.This mechanism handled layer by layer is undoubtedly more time-consuming, causes to handle the less efficient of DNS query request, final to cause The usage experience of user is relatively low.
Also, when in the prior art, WIFI shareware is handled DNS query request, it is required to every time to local At least one dns server given by network configuration information asks corresponding dns resolution result, due to by network environment Limitation, this undoubtedly can also reduce the efficiency of processing DNS query request.
The content of the invention
Based on above mentioned problem, the embodiment of the invention discloses a kind of method and device for handling DNS query request, to improve Handle the efficiency of DNS query request.Technical scheme is as follows:
In a first aspect, the embodiments of the invention provide a kind of method for handling DNS query request, including:
The DNS query for carrying target domain name to be resolved that the forwarding driving that acquisition is associated with trawl performance is forwarded please Ask;Wherein, the forwarding driving listen to by the trawl performance handle complete and destination interface be default port by After the packet that handheld terminal is sent, the data lift-off processing on session layer to application layer is carried out to the packet, so as to Obtain carrying the DNS query request of target domain name to be resolved;
Judge that the target domain name whether there is to map in the history on domain name and dns resolution result cached in advance to remember In record, if it is, the target dns resolution result according to corresponding to the history map record determines the target domain name, and to institute State the target dns resolution result corresponding to the handheld terminal feedback target domain name;If not,
The mesh of the target domain name is asked at least one first kind dns server given by local network configuration information Mark dns resolution result;
Receive the first request results of at least one first kind dns server feedback;
The first request results of invalid dns resolution result are not belonging to when existing in first request results received When, first request results for being not belonging to invalid dns resolution result are defined as target DNS corresponding to the target domain name Analysis result, and the target dns resolution result is fed back into the handheld terminal, and will be on the target domain name and mesh The map record for marking dns resolution result carries out caching process as history map record.
Optionally, a kind of method for processing DNS query request that the embodiment of the present invention is provided, in addition to:
When the first received request results belong to invalid dns resolution result, to default at least one work For the target dns resolution result of the second public class dns server request target domain name of outer net;
Receive the second request results of at least one second class dns server feedback;
If the second request knot for being not belonging to invalid dns resolution result in the second received request results be present Fruit, then second request results for being not belonging to invalid dns resolution result are defined as target corresponding to the target domain name Dns resolution result, and the target dns resolution result is fed back into the handheld terminal, and will be on the target domain name With the map record of target dns resolution result caching process is carried out as history map record.
Optionally, a kind of method for processing DNS query request that the embodiment of the present invention is provided, in addition to:
Remember when judging that the target domain name is present in the history on domain name and dns resolution result that caches in advance and mapped The target dns resolution according to corresponding to the target domain name that the history map record is determined is fed back in record and to handheld terminal As a result after or simultaneously,
Target dns resolution result corresponding to the target domain name is asked at least one first kind dns server;
Receive the 3rd request results of at least one first kind dns server feedback;
If the 3rd request results for being not belonging to invalid dns resolution result in the 3rd received request results be present And the 3rd request results for being not belonging to invalid dns resolution result are corresponding with the target domain name cached current Target dns resolution result is different, then is updated to the target dns resolution result corresponding to the target domain name described be not belonging to nothing 3rd request results of the dns resolution result of effect, to ensure:The handheld terminal is received again to send on the aiming field After the DNS query request of name, the target dns resolution knot after the renewal corresponding to the target domain name is fed back to the handheld terminal Fruit.
Optionally, a kind of method for processing DNS query request that the embodiment of the present invention is provided, in addition to:
Remember when judging that the target domain name is present in the history on domain name and dns resolution result that caches in advance and mapped The target dns resolution according to corresponding to the target domain name that the history map record is determined is fed back in record and to handheld terminal As a result after or simultaneously,
The target dns resolution result of the target domain name is asked at least one first kind dns server;
Receive the 4th request results of at least one first kind dns server feedback;
If the 4th request results for being not belonging to invalid dns resolution result in the 4th received request results be present And the 4th request results for being not belonging to invalid dns resolution result are corresponding with the target domain name cached current Target dns resolution result is different, then is updated to the target dns resolution result corresponding to the target domain name described be not belonging to nothing 4th request results of the dns resolution result of effect, to ensure:The handheld terminal is received again to send on the aiming field After the DNS query request of name, the target dns resolution knot after the renewal corresponding to the target domain name is fed back to the handheld terminal Fruit;
If the 4th received request results belong to invalid dns resolution result, to described at least one second The target dns resolution result of class dns server request target domain name;
Receive the 5th request results of at least one second class dns server feedback;
If the 5th request results for being not belonging to invalid dns resolution result in the 5th received request results be present And the 5th request results for being not belonging to invalid dns resolution result are corresponding with the target domain name cached current Target dns resolution result is different, then is updated to the target dns resolution result corresponding to the target domain name described be not belonging to nothing 5th request results of the dns resolution result of effect, to ensure:The handheld terminal is received again to send on the aiming field After the DNS query request of name, the target dns resolution knot after the renewal corresponding to the target domain name is fed back to the handheld terminal Fruit.
Optionally, the invalid dns resolution result, including:
Result or the content for showing inquiry failure are empty result.
Optionally, the default port-for-port 53.
Second aspect, the embodiment of the present invention additionally provide a kind of device for handling DNS query request, including:
DNS query request obtains module, and the forwarding that trawl performance is associated with for obtaining drives forwarded carrying to need The DNS query request of the target domain name of parsing;Wherein, the forwarding driving is listening to what is completed by trawl performance processing And after destination interface is the packet sent by handheld terminal of default port, the packet is carried out on session layer to answering With the data lift-off processing of layer, asked so as to obtain carrying the DNS query of target domain name to be resolved;
Judge module, for judging that the target domain name whether there is in caching in advance on domain name and dns resolution knot In the history map record of fruit, if it is, the first analysis result processing module of triggering;If not, trigger local request module;
The first analysis result processing module, for determining that the target domain name is corresponding according to the history map record Target dns resolution result, and feed back the target dns resolution result corresponding to the target domain name to the handheld terminal;
The local request module, at least one first kind DNS service given by local network configuration information Device asks the target dns resolution result of the target domain name;
First request results receiving module, first for receiving at least one first kind dns server feedback please Seek result;
Second analysis result processing module, for when invalid in the presence of being not belonging in first request results received During the first request results of dns resolution result, first request results for being not belonging to invalid dns resolution result are defined as Target dns resolution result corresponding to the target domain name, and the target dns resolution result is fed back into the handheld terminal, And the map record on the target domain name and target dns resolution result is carried out at caching as history map record Reason.
Optionally, a kind of device for processing DNS query request that the embodiment of the present invention is provided, in addition to:
Outer net request module, for when the first received request results belong to invalid dns resolution result, to The target dns resolution result of default at least one second class dns server request target domain name public as outer net;
Second request results receiving module, second for receiving at least one second class dns server feedback please Seek result;
3rd analysis result processing module, if for invalid in the presence of being not belonging in the second received request results Second request results of dns resolution result, then will not belong to invalid dns resolution result the second request results be defined as it is described Target dns resolution result corresponding to target domain name, and the target dns resolution result is fed back into the handheld terminal, and Using on the map record of the target domain name and target dns resolution result caching process is carried out as history map record.
Optionally, a kind of device for processing DNS query request that the embodiment of the present invention is provided, in addition to:
First re-request module, for when judge the target domain name be present in cache in advance on domain name with The target determined in the history map record of dns resolution result and to handheld terminal feedback according to the history map record After target dns resolution result corresponding to domain name or simultaneously, the mesh is asked at least one first kind dns server Mark target dns resolution result corresponding to domain name;
3rd request results receiving module, for receiving at least one first kind dns server feedback the 3rd please Seek result;
4th analysis result processing module, if for invalid in the presence of being not belonging in the 3rd received request results 3rd request results of dns resolution result and the 3rd request results for being not belonging to invalid dns resolution result are with being cached The target domain name corresponding to current target dns resolution result it is different, then by the target domain name corresponding to target DNS Analysis result is updated to the 3rd request results for being not belonging to invalid dns resolution result, to ensure:Receive again described After handheld terminal sends the DNS query request on the target domain name, the target domain name institute is fed back to the handheld terminal Target dns resolution result after corresponding renewal.
Optionally, a kind of device for processing DNS query request that the embodiment of the present invention is provided, in addition to:
Second re-request module, for when judge the target domain name be present in cache in advance on domain name with The target determined in the history map record of dns resolution result and to handheld terminal feedback according to the history map record After target dns resolution result corresponding to domain name or simultaneously, the mesh is asked at least one first kind dns server Mark the target dns resolution result of domain name;
4th request results receiving module, for receiving at least one first kind dns server feedback the 4th please Seek result;
5th analysis result processing module, if for invalid in the presence of being not belonging in the 4th received request results 4th request results of dns resolution result and the 4th request results for being not belonging to invalid dns resolution result are with being cached The target domain name corresponding to current target dns resolution result it is different, then by the target domain name corresponding to target DNS Analysis result is updated to the 4th request results for being not belonging to invalid dns resolution result, to ensure:Receive again described After handheld terminal sends the DNS query request on the target domain name, the target domain name institute is fed back to the handheld terminal Target dns resolution result after corresponding renewal;
3rd request module again, if belonging to invalid dns resolution knot for the 4th received request results Fruit, to the target dns resolution result of at least one second class dns server request target domain name;
5th request results receiving module, for receiving at least one second class dns server feedback the 5th please Seek result;
6th analysis result processing module, if for invalid in the presence of being not belonging in the 5th received request results 5th request results of dns resolution result and the 5th request results for being not belonging to invalid dns resolution result are with being cached The target domain name corresponding to current target dns resolution result it is different, then by the target domain name corresponding to target DNS Analysis result is updated to the 5th request results for being not belonging to invalid dns resolution result, to ensure:Receive again described After handheld terminal sends the DNS query request on the target domain name, the target domain name institute is fed back to the handheld terminal Target dns resolution result after corresponding renewal.
Optionally, the invalid dns resolution result, including:
Result or the content for showing inquiry failure are empty result.
Optionally, the default port-for-port 53.
Compared with prior art, the forwarding driving being associated with trawl performance intercepts handles complete, hand by network-driven The packet for including DNS query request of terminal transmission is held, and the data on session layer to application layer are carried out to the packet Lift-off processing, so as to obtain carrying the DNS query request of target domain name to be resolved, further, forwarding driving takes this DNS query request with target domain name to be resolved is transmitted to wifi shareware;It is also, first when handling DNS query request Dns resolution result is first searched based on the history map record cached in advance, searched not then to corresponding first kind DNS service Device asks dns resolution result.It can be seen that this programme effectively prevent the packet comprising DNS query request by session layer, expression The processing layer by layer of layer and application layer, meanwhile, caching mechanism is effectively utilized, therefore, it is possible to effectively improve processing DNS query request Efficiency.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
The first flow chart for the method that a kind of processing DNS query that Fig. 1 is provided by the embodiment of the present invention is asked;
Second of flow chart of the method that a kind of processing DNS query that Fig. 2 is provided by the embodiment of the present invention is asked;
The third flow chart for the method that a kind of processing DNS query that Fig. 3 is provided by the embodiment of the present invention is asked;
The structural representation for the device that a kind of processing DNS query that Fig. 4 is provided by the embodiment of the present invention is asked.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
For the sake of clarity, DNS related content is introduced first:
DNS (Domain Name System, domain name system) is what is mutually mapped as domain name and IP address on internet One distributed data base, it can make user more easily access internet, remember directly to be read by machine without spending The IP address taken.Wherein, domain name mapping is called to obtain the process of IP address corresponding to the domain name by domain name.The present invention is implemented DNS query request described in example is to be used to ask the IP address corresponding to domain name, also, dns resolution result corresponding to domain name As IP address corresponding to domain name.
In order to improve the efficiency of processing DNS query request, the embodiment of the present invention improves a kind of processing DNS query request Method and device.
A kind of method of the processing DNS query request provided first below the embodiment of the present invention is introduced.
It should be noted that a kind of method for processing DNS query request that the embodiment of the present invention is provided is applied to focus Terminal, wherein, so-called hot terminal is with wireless network card and is provided with the terminal of wifi shareware, and the hot terminal leads to Wireless router can be used as by crossing operation wifi shareware so that various handheld terminals realize networking.
Also, realize that a kind of functional software of the method for processing DNS query request that the embodiment of the present invention provided can be with For specific wifi shareware.
As shown in figure 1, a kind of method for handling DNS query request, can include:
S101, obtain and be associated with the DNS for carrying target domain name to be resolved that the forwarding driving of trawl performance is forwarded Inquiry request;
Wherein, forwarding driving listen to by the trawl performance handle complete and destination interface be default port by After the packet that handheld terminal is sent, the data lift-off processing on session layer to application layer can be carried out to the packet, from And obtain carrying the DNS query request of target domain name to be resolved.Wherein, the default port can be corresponding to DNS service Port 53.
It is understood that due to handheld terminal send DNS query request when can pass through application layer, expression layer, session layer, The encapsulation process layer by layer of transport layer etc.;And wifi shareware can identify the data in application layer, in order that driving must be forwarded The packet comprising DNS query request intercepted can be identified that forwarding driving can be to being intercepted by wifi shareware Packet carry out data lift-off processing on session layer to application layer, obtain carrying the DNS of target domain name to be resolved Inquiry request, and then it is transmitted to the processing of wifi shareware.
It is emphasized that the mode of forwarding driving is associated for trawl performance can use prior art, and to the data Bag carries out prior art can also being used to realize on the data lift-off processing of session layer to application layer, will not be described here.
S102, judge that the target domain name whether there is and reflected in the history on domain name and dns resolution result cached in advance Penetrate in record, if it is, performing S103;If not, perform S104;
Wherein, after the DNS query for carrying target domain name to be resolved request is obtained, it can be determined that the target domain name is It is no to be present in the history map record on domain name and dns resolution result cached in advance, and according to different judged results Perform different operations.Specifically, when judge the target domain name be present in cache in advance on domain name and dns resolution result History map record in when, show that this is not inquired about first on the DNS query of target domain name, at this point it is possible to perform S103;And work as and judge that the target domain name does not exist in the history on domain name and dns resolution result cached in advance and maps note When in record, S104 can be performed, to ask target dns resolution result corresponding to the target domain name to corresponding dns server.
It is it should be noted that whole for focus in the history map record on domain name and dns resolution result cached in advance The map record of dns resolution result corresponding to the domain name inquired before end and the domain name.
S103, the target dns resolution result according to corresponding to the history map record determines the target domain name, and it is hand-held to this Terminal feeds back the target dns resolution result corresponding to the target domain name;
When judging that the target domain name is present in the history map record on domain name and dns resolution result cached in advance When middle, show that this is not inquired about first on the DNS query of target domain name, at this point it is possible to from caching in advance on domain name With in the history map record of dns resolution result, determining target dns resolution result corresponding to the target domain name, and it is hand-held to this Terminal feeds back the target dns resolution result corresponding to the target domain name.
S104, the target domain name is asked at least one first kind dns server given by local network configuration information Target dns resolution result;
S105, receive the first request results of at least one first kind dns server feedback;
When being mapped on the history of domain name and dns resolution result of judging that the target domain name is not present in caching in advance is remembered When in record, the target domain name can be asked at least one first kind dns server given by local network configuration information Target dns resolution result, and receive the first request results of at least one first dns server feedback.It is understood that work as , can be according to default request order successively to the different first kind dns servers when first kind dns server is two or more Request, it is of course also possible to be asked to different first kind dns servers simultaneously, this is all rational.
Wherein, user can configure at least one first kind dns server in local network configuration information, also, this First kind dns server given by ground network configuration information can be the dns server inside LAN, or outer net Public dns server, this is all rational.
S106, when in the first request results received exist be not belonging to invalid dns resolution result first request knot During fruit, the first request results that will not belong to invalid dns resolution result are defined as target dns resolution knot corresponding to target domain name Fruit, and target dns resolution result is fed back into handheld terminal, it will remember on the mapping of target domain name and target dns resolution result Record carries out caching process as history map record.
After the first request results of at least one first kind dns server feedback are obtained, it can be determined that received It whether there is in first request results and be not belonging to invalid dns resolution result, and it is different according to different judged result execution Operation.Specifically, when judging that the first received request results belong to invalid dns resolution result, i.e. parsing is lost Lose, the result that can not be parsed can be fed back to the handheld terminal or does not make feedback processing, this is all rational;And work as and judge institute When the first request results for being not belonging to invalid dns resolution result in the first request results received be present, it will not can belong to It is defined as target dns resolution result corresponding to the target domain name in the first request results of invalid dns resolution result, and should Target dns resolution result feeds back to the handheld terminal, so that obtaining handheld terminal can be based on obtaining target dns resolution fructufy Existing network access;And in order to improve subsequently to the target domain name carry out DNS query efficiency, can will on the target domain name with The map record of target dns resolution result carries out caching process as history map record.
Specifically, the invalid dns resolution result, can include:Show that the result of inquiry failure or content are empty As a result.
It is understood that for a domain name, the dns resolution result corresponding to it is IP address, such as:For For domain name www.baidu.com, its corresponding dns resolution result is 58.217.200.13, and the dns resolution result is Baidu The IP address of server.
Compared with prior art, the forwarding driving being associated with trawl performance intercepts handles complete, hand by network-driven The packet for including DNS query request of terminal transmission is held, and the data on session layer to application layer are carried out to the packet Lift-off processing, so as to obtain carrying the DNS query request of target domain name to be resolved, further, forwarding driving takes this DNS query request with target domain name to be resolved is transmitted to wifi shareware;It is also, first when handling DNS query request Dns resolution result is first searched based on the history map record cached in advance, searched not then to corresponding first kind DNS service Device asks dns resolution result.It can be seen that this programme effectively prevent the packet comprising DNS query request by session layer, expression The processing layer by layer of layer and application layer, meanwhile, caching mechanism is effectively utilized, therefore, it is possible to effectively improve processing DNS query request Efficiency.
In order to further improve the power that is parsed into that handheld terminal accesses domain name, the embodiment of the present invention additionally provides one kind The method for handling DNS query request.
It should be noted that a kind of method for processing DNS query request that the embodiment of the present invention is provided is applied to focus Terminal, wherein, so-called hot terminal is with wireless network card and is provided with the terminal of wifi shareware, and the hot terminal leads to Wireless router can be used as by crossing operation wifi shareware so that various handheld terminals realize networking.
Also, realize that a kind of functional software of the method for processing DNS query request that the embodiment of the present invention provided can be with For specific wifi shareware.
As shown in Fig. 2 a kind of method for handling DNS query request, can include:
S201, obtain and be associated with the DNS for carrying target domain name to be resolved that the forwarding driving of trawl performance is forwarded Inquiry request;
Wherein, forwarding driving listen to by the trawl performance handle complete and destination interface be default port by After the packet that handheld terminal is sent, the data lift-off processing on session layer to application layer can be carried out to the packet, from And obtain carrying the DNS query request of target domain name to be resolved.Wherein, the default port can be corresponding to DNS service Port 53.
S202, judge that the target domain name whether there is and reflected in the history on domain name and dns resolution result cached in advance Penetrate in record, if it is, performing S203;If not, perform S204;
S203, the target dns resolution result according to corresponding to the history map record determines the target domain name, and it is hand-held to this Terminal feeds back the target dns resolution result corresponding to the target domain name;
S204, the target domain name is asked at least one first kind dns server given by local network configuration information Target dns resolution result;
S205, receive the first request results of at least one first kind dns server feedback;
S201-S205 is similar to the S101-S105 of above-described embodiment in the present embodiment, will not be described here.
S206, judges whether the first received request results belong to invalid dns resolution result, if it is, holding Row S207;If not, perform S210;
After the first request results of at least one first kind dns server feedback are obtained, it can be determined that received Whether the first request results belong to invalid dns resolution result, and different operations is performed according to different judged results.Tool Body, when judging that the first received request results belong to invalid dns resolution result, S207 can be performed;And , can when judging to exist in the first received request results the first request results for being not belonging to invalid dns resolution result To perform S210.
Specifically, the invalid dns resolution result, can include:Show that the result of inquiry failure or content are empty As a result.
It is understood that for a domain name, the dns resolution result corresponding to it is IP address, such as:For For domain name www.baidu.com, its corresponding dns resolution result is 58.217.200.13, and the dns resolution result is Baidu The IP address of server.
S207, to the target of default at least one second class dns server request target domain name public as outer net Dns resolution result;
S208, receive the second request results of at least one second class dns server feedback;
Wherein, when judging that the first received request results belong to invalid dns resolution result, i.e. parsing is lost Lose, can be to the target dns resolution of default at least one second class dns server request target domain name public as outer net As a result, the second request results of at least one second class dns server feedback are received and.
It should be noted that the DNS service that outer net of the second class dns server built in wifi shareware is public Device, the second class dns server can be the powerful dns server of domain name mapping, i.e., on domain name and dns resolution result The database of (IP address) map record is larger.It should be noted that can be according to default request order successively to different Second class dns server asks dns resolution result, it is of course also possible to ask DNS to the second different class dns servers simultaneously Analysis result, this is all rational.S209, invalid DNS solutions are not belonging to if existed in the second received request results The second request results of result are analysed, then the second request results that will not belong to invalid dns resolution result are defined as target domain name Corresponding target dns resolution result, and target dns resolution result is fed back into handheld terminal, and will on target domain name with The map record of target dns resolution result carries out caching process as history map record;
Wherein, when judge in the second received request results exist be not belonging to the second of invalid dns resolution result During request results, the second request results that this can be not belonging to invalid dns resolution result are defined as the target domain name correspondingly Target dns resolution result, and the target dns resolution result is fed back into the handheld terminal so that handheld terminal being capable of base In the existing network access of obtained target dns resolution fructufy;Also, DNS query subsequently is carried out to the target domain name in order to improve Efficiency, the map record on the target domain name and target dns resolution result can be delayed as history map record Deposit processing.
It is understood that if the second received request results belong to invalid dns resolution result, now, The result that can not be parsed can be fed back to the handheld terminal or does not make feedback processing, this is all rational.
S210, the first request results that will not belong to invalid dns resolution result are defined as mesh corresponding to the target domain name Dns resolution result is marked, and the target dns resolution result is fed back into the handheld terminal;
S211, carried out on the map record of the target domain name and target dns resolution result as history map record Caching process.
Wherein, the of invalid dns resolution result is not belonging to when judging to exist in the first received request results During one request results, the first request results that this can be not belonging to invalid dns resolution result are defined as the target domain name pair The target dns resolution result answered, and the target dns resolution result is fed back into the handheld terminal, can so as to obtain handheld terminal Based on the existing network access of obtained target dns resolution fructufy;And DNS query subsequently is carried out to the target domain name in order to improve Efficiency, the map record on the target domain name and target dns resolution result can be cached as history map record Processing.
Compared with prior art, the forwarding driving being associated with trawl performance intercepts handles complete, hand by network-driven The packet for including DNS query request of terminal transmission is held, and the data on session layer to application layer are carried out to the packet Lift-off processing, so as to obtain carrying the DNS query request of target domain name to be resolved, further, forwarding driving takes this DNS query request with target domain name to be resolved is transmitted to wifi shareware;It is also, first when handling DNS query request Dns resolution result is first searched based on the history map record cached in advance, searched not then to corresponding first kind DNS service Device asks dns resolution result.It can be seen that this programme effectively prevent the packet comprising DNS query request by session layer, expression The processing layer by layer of layer and application layer, meanwhile, caching mechanism is effectively utilized, therefore, it is possible to effectively improve processing DNS query request Efficiency.Also, can when the first kind dns server given by local network configuration information can not parse target domain name To continue to continue to ask the target dns resolution knot of the target domain name to the second public class dns server of the outer net pre-set Fruit, power is parsed into what this improved domain name.
It will be appreciated by persons skilled in the art that dns resolution result corresponding to the domain name cached in advance generally has life The cycle is ordered, after life cycle terminates, dns resolution result will be changed into invalid, now, be changed into if receiving dns resolution result The DNS query request of invalid corresponding domain name, then will ask dns resolution corresponding to the domain name to corresponding dns server again As a result.But due to the change of network environment, dns resolution result may be in life cycle corresponding to the domain name cached in advance Also can change, therefore, in order to further improve the reliability of analysis result, the embodiment of the present invention additionally provides a kind of processing The method of DNS query request.
It should be noted that a kind of method for processing DNS query request that the embodiment of the present invention is provided is applied to focus Terminal, wherein, so-called hot terminal is with unlimited network interface card and is provided with the terminal of wifi shareware, and the hot terminal leads to Wireless router can be used as by crossing operation wifi shareware so that various handheld terminals realize networking.
Also, realize that a kind of functional software of the method for processing DNS query request that the embodiment of the present invention provided can be with For specific wifi shareware.
As shown in figure 3, a kind of method for handling DNS query request, can include:
S301, obtain and be associated with the DNS for carrying target domain name to be resolved that the forwarding driving of trawl performance is forwarded Inquiry request;
Wherein, forwarding driving listen to by the trawl performance handle complete and destination interface be default port by After the packet that handheld terminal is sent, the data lift-off processing on session layer to application layer can be carried out to the packet, from And obtain carrying the DNS query request of target domain name to be resolved.Wherein, the default port can be corresponding to DNS service Port 53.
In the present embodiment, S301 is similar to S101, will not be described here.
S302, judge that the target domain name whether there is and reflected in the history on domain name and dns resolution result cached in advance Penetrate in record, if it is, performing S303;If not, perform S307;
Wherein, after the DNS query for carrying target domain name to be resolved request is obtained, it can be determined that the target domain name is It is no to be present in the history map record on domain name and dns resolution result cached in advance, and according to different judged results Perform different operations.Specifically, when judge the target domain name be present in cache in advance on domain name and dns resolution result History map record in when, show that this is not inquired about first on the DNS query of target domain name, at this point it is possible to perform S303;And work as and judge that the target domain name does not exist in the history on domain name and dns resolution result cached in advance and maps note When in record, S307 can be performed, to ask target dns resolution result corresponding to the target domain name to corresponding dns server.
It is it should be noted that whole for focus in the history map record on domain name and dns resolution result cached in advance The map record of dns resolution result corresponding to the domain name inquired before end and the domain name.
S303, the target dns resolution result according to corresponding to the history map record determines the target domain name, and it is hand-held to this Terminal feeds back the target dns resolution result corresponding to the target domain name;
When judging that the target domain name is present in the history map record on domain name and dns resolution result cached in advance When middle, show that this is not inquired about first on the DNS query of target domain name, at this point it is possible to from caching in advance on domain name With in the history map record of dns resolution result, determining target dns resolution result corresponding to the target domain name, and it is hand-held to this Terminal feeds back the target dns resolution result corresponding to the target domain name.
S304, to target dns resolution result corresponding at least one first kind dns server request target domain name;
S305, receive the 3rd request results of at least one first kind dns server feedback;
In order to ensure the reliability of domain name mapping result, when judge the target domain name be present in cache in advance on domain Name to handheld terminal in the history map record of dns resolution result with feeding back what is determined according to the history map record After target dns resolution result corresponding to target domain name or at the same time it can also be asked at least one first kind dns server Target dns resolution result corresponding to the target domain name is sought, and receives the 3rd of at least one first kind dns server feedback and asks Seek result.
It is emphasized that in the present embodiment, S304 can be performed after S303, certainly, when judging the aiming field When name is present in the history map record on domain name and dns resolution result cached in advance, S303 and S304 can be simultaneously Perform, this is also rational.
S306, asked if existing in the 3rd received request results and being not belonging to the 3rd of invalid dns resolution result Seek result and be not belonging to the 3rd request results current mesh corresponding with the target domain name cached of invalid dns resolution result Dns resolution result difference is marked, then is updated to the target dns resolution result corresponding to target domain name be not belonging to invalid DNS solutions Analyse the 3rd request results of result;
After the 3rd request results are obtained, invalid DNS is not belonging to if existed in the 3rd received request results 3rd request results of analysis result and it is not belonging to the 3rd request results of invalid dns resolution result and the aiming field that is cached Current target dns resolution result is different corresponding to name, show dns resolution result corresponding to the target domain name that is cached without Effect, at this point it is possible to which the target dns resolution result corresponding to the target domain name is updated to be not belonging to invalid dns resolution result The 3rd request results, with ensure:After handheld terminal transmission is received again on the DNS query request of target domain name, to hand Hold the target dns resolution result after the renewal corresponding to terminal feedback target domain name.
S307, the target domain name is asked at least one first kind dns server given by local network configuration information Target dns resolution result;
S308, receive the first request results of at least one first kind dns server feedback;
S309, when in the first request results received exist be not belonging to invalid dns resolution result first request knot During fruit, the first request results that will not belong to invalid dns resolution result are defined as target dns resolution knot corresponding to target domain name Fruit, and target dns resolution result is fed back into handheld terminal, it will remember on the mapping of target domain name and target dns resolution result Record carries out caching process as history map record.
In the present embodiment, S307-S309 is similar to the S104-S106 of above-described embodiment, does not repeat since then.
Compared with prior art, the forwarding driving being associated with trawl performance intercepts handles complete, hand by network-driven The packet for including DNS query request of terminal transmission is held, and the data on session layer to application layer are carried out to the packet Lift-off processing, so as to obtain carrying the DNS query request of target domain name to be resolved, further, forwarding driving takes this DNS query request with target domain name to be resolved is transmitted to wifi shareware;It is also, first when handling DNS query request Dns resolution result is first searched based on the history map record cached in advance, searched not then to corresponding first kind DNS service Device asks dns resolution result.It can be seen that this programme effectively prevent the packet comprising DNS query request by session layer, expression The processing layer by layer of layer and application layer, meanwhile, caching mechanism is effectively utilized, therefore, it is possible to effectively improve processing DNS query request Efficiency.Also, work as and judge that the target domain name is present in the history on domain name and dns resolution result cached in advance and maps note When in record, the target dns resolution result not only fed back, but also re-request on target domain name dns resolution result with Ensure the reliability of dns resolution result.
Further, on the basis of scheme given by second of embodiment (S201-S211), in order to improve dns resolution As a result reliability, a kind of method for processing DNS query request that the embodiment of the present invention is provided can also include:
When judging that the target domain name is present in the history map record on domain name and dns resolution result cached in advance In and feed back target dns resolution knot according to corresponding to the target domain name that the history map record is determined to handheld terminal After fruit or simultaneously,
To the target dns resolution result of at least one first kind dns server request target domain name;
Receive the 4th request results of at least one first kind dns server feedback;
If the 4th request results for being not belonging to invalid dns resolution result in the 4th received request results be present And the 4th request results current target DNS corresponding with the target domain name cached for being not belonging to invalid dns resolution result Analysis result is different, then is updated to be not belonging to invalid dns resolution result by the target dns resolution result corresponding to target domain name The 4th request results, with ensure:After handheld terminal transmission is received again on the DNS query request of the target domain name, To the target dns resolution result after the renewal corresponding to handheld terminal feedback target domain name;
If the 4th received request results belong to invalid dns resolution result, at least one second class DNS The target dns resolution result of server request target domain name;
Receive the 5th request results of at least one second class dns server feedback;
If the 5th request results for being not belonging to invalid dns resolution result in the 5th received request results be present And the 5th request results current target DNS corresponding with the target domain name cached for being not belonging to invalid dns resolution result Analysis result is different, then is updated to be not belonging to invalid dns resolution result by the target dns resolution result corresponding to target domain name The 5th request results, with ensure:After handheld terminal transmission is received again on the DNS query request of target domain name, to hand Hold terminal and feed back the target dns resolution result after the renewal corresponding to the target domain name.
Further, on the basis of scheme given by the third embodiment (S301-S309), in order to improve successfully resolved Rate, in the method for another processing DNS query request that the embodiment of the present invention is provided, when judging that first request results are equal When belonging to invalid dns resolution result, not feed back the result that can not be parsed to the handheld terminal or do not make feedback processing, but Perform following steps:
Solved to the target DNS of default at least one second class dns server request target domain name public as outer net Analyse result;Receive the 6th request results of at least one second class dns server feedback;If the 6th received request knot Exist in fruit and be not belonging to the 6th request results of invalid dns resolution result, then will not belong to the of invalid dns resolution result Six request results are defined as target dns resolution result corresponding to target domain name, and target dns resolution result is fed back to and held eventually End, and carry out caching process as history map record using on the map record of target domain name and target dns resolution result.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of device for handling DNS query request, such as Shown in Fig. 4, it can include:
DNS query request obtains module 410, and the forwarding that trawl performance is associated with for obtaining drives what is forwarded to carry The DNS query request of target domain name to be resolved;Wherein, the forwarding driving is being listened to by trawl performance processing completion And after destination interface is the packet sent by handheld terminal of default port, the packet arrived on session layer The data lift-off processing of application layer, so as to obtain carrying the DNS query request of target domain name to be resolved;
Judge module 420, for judging that the target domain name whether there is in caching in advance on domain name and dns resolution As a result in history map record, if it is, the first analysis result processing module 430 of triggering;If not, triggering is local to ask modulus Block 440;
The first analysis result processing module 430, for determining the target domain name according to the history map record Corresponding target dns resolution result, and feed back the target dns resolution knot corresponding to the target domain name to the handheld terminal Fruit;
The local request module 440, for being taken at least one first kind DNS given by local network configuration information The target dns resolution result for the device request target domain name of being engaged in;
First request results receiving module 450, for receiving the first of at least one first kind dns server feedback Request results;
Second analysis result processing module 460, nothing is not belonging to for working as to exist in first request results received It is during the first request results of the dns resolution result of effect, first request results for being not belonging to invalid dns resolution result are true It is set to target dns resolution result corresponding to the target domain name, and the target dns resolution result is fed back into the hand-held end End, and the map record on the target domain name and target dns resolution result is cached as history map record Processing.
Compared with prior art, the forwarding driving being associated with trawl performance intercepts handles complete, hand by network-driven The packet for including DNS query request of terminal transmission is held, and the data on session layer to application layer are carried out to the packet Lift-off processing, so as to obtain carrying the DNS query request of target domain name to be resolved, further, forwarding driving takes this DNS query request with target domain name to be resolved is transmitted to wifi shareware;It is also, first when handling DNS query request Dns resolution result is first searched based on the history map record cached in advance, searched not then to corresponding first kind DNS service Device asks dns resolution result.It can be seen that this programme effectively prevent the packet comprising DNS query request by session layer, expression The processing layer by layer of layer and application layer, meanwhile, caching mechanism is effectively utilized, therefore, it is possible to effectively improve processing DNS query request Efficiency.
Further, based on asking to obtain module 410, judge module 420, at the first analysis result including DNS query Module 430, the device of the processing DNS query of the analysis result processing module 460 of local request module 440 and second request are managed, this The device for another processing DNS query request that inventive embodiments are provided can also include:
Outer net request module, for when the first received request results belong to invalid dns resolution result, to The target dns resolution result of default at least one second class dns server request target domain name public as outer net;
Second request results receiving module, second for receiving at least one second class dns server feedback please Seek result;
3rd analysis result processing module, if for invalid in the presence of being not belonging in the second received request results Second request results of dns resolution result, then will not belong to invalid dns resolution result the second request results be defined as it is described Target dns resolution result corresponding to target domain name, and the target dns resolution result is fed back into the handheld terminal, and Using on the map record of the target domain name and target dns resolution result caching process is carried out as history map record.
Further, based on asking to obtain module 410, judge module 420, at the first analysis result including DNS query Module 430, the device of the processing DNS query of the analysis result processing module 460 of local request module 440 and second request are managed, this The device for another processing DNS query request that inventive embodiments are provided can also include:
First re-request module, for when judge the target domain name be present in cache in advance on domain name with The target determined in the history map record of dns resolution result and to handheld terminal feedback according to the history map record After target dns resolution result corresponding to domain name or simultaneously, the mesh is asked at least one first kind dns server Mark target dns resolution result corresponding to domain name;
3rd request results receiving module, for receiving at least one first kind dns server feedback the 3rd please Seek result;
4th analysis result processing module, if for invalid in the presence of being not belonging in the 3rd received request results 3rd request results of dns resolution result and the 3rd request results for being not belonging to invalid dns resolution result are with being cached The target domain name corresponding to current target dns resolution result it is different, then by the target domain name corresponding to target DNS Analysis result is updated to the 3rd request results for being not belonging to invalid dns resolution result, to ensure:Receive again described After handheld terminal sends the DNS query request on the target domain name, the target domain name institute is fed back to the handheld terminal Target dns resolution result after corresponding renewal.
Further, based on asking to obtain module 410, judge module 420, at the first analysis result including DNS query Reason module 430, local request module 440, the second analysis result processing module 460, outer net request module, the second request results connect The device of the processing DNS query request of module and the 3rd analysis result processing module is received, the embodiment of the present invention is provided another The device of kind processing DNS query request can also include:
Second re-request module, for when judge the target domain name be present in cache in advance on domain name with The target determined in the history map record of dns resolution result and to handheld terminal feedback according to the history map record After target dns resolution result corresponding to domain name or simultaneously, the mesh is asked at least one first kind dns server Mark the target dns resolution result of domain name;
4th request results receiving module, for receiving at least one first kind dns server feedback the 4th please Seek result;
5th analysis result processing module, if for invalid in the presence of being not belonging in the 4th received request results 4th request results of dns resolution result and the 4th request results for being not belonging to invalid dns resolution result are with being cached The target domain name corresponding to current target dns resolution result it is different, then by the target domain name corresponding to target DNS Analysis result is updated to the 4th request results for being not belonging to invalid dns resolution result, to ensure:Receive again described After handheld terminal sends the DNS query request on the target domain name, the target domain name institute is fed back to the handheld terminal Target dns resolution result after corresponding renewal;
3rd request module again, if belonging to invalid dns resolution knot for the 4th received request results Fruit, to the target dns resolution result of at least one second class dns server request target domain name;
5th request results receiving module, for receiving at least one second class dns server feedback the 5th please Seek result;
6th analysis result processing module, if for invalid in the presence of being not belonging in the 5th received request results 5th request results of dns resolution result and the 5th request results for being not belonging to invalid dns resolution result are with being cached The target domain name corresponding to current target dns resolution result it is different, then by the target domain name corresponding to target DNS Analysis result is updated to the 5th request results for being not belonging to invalid dns resolution result, to ensure:Receive again described After handheld terminal sends the DNS query request on the target domain name, the target domain name institute is fed back to the handheld terminal Target dns resolution result after corresponding renewal.
Specifically, the invalid dns resolution result, including:
Result or the content for showing inquiry failure are empty result.
Specifically, the default port-for-port 53.
For system or device embodiment, because it is substantially similar to embodiment of the method, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Other identical element also be present in process, method, article or equipment including the key element.
Can one of ordinary skill in the art will appreciate that realizing that all or part of step in above method embodiment is To instruct the hardware of correlation to complete by program, described program can be stored in computer read/write memory medium, The storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention It is interior.

Claims (10)

  1. A kind of 1. method for handling DNS query request, it is characterised in that including:
    Obtain and be associated with the DNS query for the carrying target domain name to be resolved request that the forwarding driving of trawl performance is forwarded; Wherein, to handle complete and destination interface by the trawl performance be default port by holding listening to for the forwarding driving After the packet that terminal is sent, the data lift-off processing on session layer to application layer is carried out to the packet, so as to obtain Carry the DNS query request of target domain name to be resolved;
    Judge that the target domain name whether there is in the history map record on domain name and dns resolution result cached in advance In,
    If it is, the target dns resolution result according to corresponding to the history map record determines the target domain name, and to described Handheld terminal feeds back the target dns resolution result corresponding to the target domain name;
    When judging that the target domain name is present in the history map record on domain name and dns resolution result cached in advance And the target dns resolution result according to corresponding to the target domain name that the history map record is determined is fed back to handheld terminal Afterwards or simultaneously,
    The target dns resolution result of the target domain name is asked at least one first kind dns server;
    Receive the 4th request results of at least one first kind dns server feedback;
    If the 4th request results and the institute for being not belonging to invalid dns resolution result in the 4th received request results be present State the 4th request results current target corresponding with the target domain name cached for being not belonging to invalid dns resolution result Dns resolution result is different, then by the target dns resolution result corresponding to the target domain name be updated to it is described be not belonging to it is invalid 4th request results of dns resolution result, to ensure:The handheld terminal is received again to send on the target domain name After DNS query request, the target dns resolution result after the renewal corresponding to the target domain name is fed back to the handheld terminal;
    If not, ask the target domain name at least one first kind dns server given by local network configuration information Target dns resolution result;
    Receive the first request results of at least one first kind dns server feedback;
    When the first request results for being not belonging to invalid dns resolution result in first request results received be present, First request results for being not belonging to invalid dns resolution result are defined as into target DNS corresponding to the target domain name to solve Result is analysed, and the target dns resolution result is fed back into the handheld terminal, and will be on the target domain name and target The map record of dns resolution result carries out caching process as history map record.
  2. 2. according to the method for claim 1, it is characterised in that also include:
    When the first received request results belong to invalid dns resolution result, to outside default at least one conduct Net the target dns resolution result of the second public class dns server request target domain name;
    Receive the second request results of at least one second class dns server feedback;
    If the second request results for being not belonging to invalid dns resolution result in the second received request results be present, Second request results for being not belonging to invalid dns resolution result are defined as into target DNS corresponding to the target domain name to solve Result is analysed, and the target dns resolution result is fed back into the handheld terminal, and will be on the target domain name and target The map record of dns resolution result carries out caching process as history map record.
  3. 3. according to the method for claim 2, it is characterised in that also include:
    If the 4th received request results belong to invalid dns resolution result, at least one second class DNS The target dns resolution result of server request target domain name;
    Receive the 5th request results of at least one second class dns server feedback;
    If the 5th request results and the institute for being not belonging to invalid dns resolution result in the 5th received request results be present State the 5th request results current target corresponding with the target domain name cached for being not belonging to invalid dns resolution result Dns resolution result is different, then by the target dns resolution result corresponding to the target domain name be updated to it is described be not belonging to it is invalid 5th request results of dns resolution result, to ensure:The handheld terminal is received again to send on the target domain name After DNS query request, the target dns resolution result after the renewal corresponding to the target domain name is fed back to the handheld terminal.
  4. 4. according to the method described in claim 1-3 any one, it is characterised in that the invalid dns resolution result, bag Include:
    Result or the content for showing inquiry failure are empty result.
  5. 5. according to the method described in claim 1-3 any one, it is characterised in that the default port-for-port 53.
  6. A kind of 6. device for handling DNS query request, it is characterised in that including:
    DNS query request obtain module, for obtain be associated with trawl performance forwarding driving forwarded carry it is to be resolved Target domain name DNS query request;Wherein, the forwarding driving is listening to completed by trawl performance processing and mesh Port be the packet sent by handheld terminal of default port after, the packet is carried out on session layer to application layer Data lift-off processing, so as to obtain carrying the request of the DNS query of target domain name to be resolved;
    Judge module, for judging that the target domain name whether there is in caching in advance on domain name and dns resolution result In history map record, if it is, the first analysis result processing module of triggering;If not, trigger local request module;
    The first analysis result processing module, for mesh corresponding to determining the target domain name according to the history map record Dns resolution result is marked, and the target dns resolution result corresponding to the target domain name is fed back to the handheld terminal;
    Second re-request module, for when judging that the target domain name is present in being solved on domain name and DNS of caching in advance Analyse the target domain name determined in the history map record of result to handheld terminal feedback according to the history map record After corresponding target dns resolution result or simultaneously, the target domain name is asked at least one first kind dns server Target dns resolution result;
    4th request results receiving module, for receiving the 4th request knot of at least one first kind dns server feedback Fruit;
    5th analysis result processing module, if being not belonging to invalid DNS for existing in the 4th received request results 4th request results of analysis result and the 4th request results for being not belonging to invalid dns resolution result and the institute cached State that current target dns resolution result corresponding to target domain name is different, then by the target domain name corresponding to target dns resolution As a result the 4th request results for being not belonging to invalid dns resolution result are updated to, to ensure:Receive again described hand-held After terminal sends the DNS query request on the target domain name, fed back to the handheld terminal corresponding to the target domain name Renewal after target dns resolution result;
    The local request module, for being asked at least one first kind dns server given by local network configuration information Seek the target dns resolution result of the target domain name;
    First request results receiving module, for receiving the first request knot of at least one first kind dns server feedback Fruit;
    Second analysis result processing module, invalid DNS is not belonging to for working as to exist in first request results received During the first request results of analysis result, first request results for being not belonging to invalid dns resolution result are defined as institute Target dns resolution result corresponding to target domain name is stated, and the target dns resolution result is fed back into the handheld terminal, with And carry out caching process as history map record using on the map record of the target domain name and target dns resolution result.
  7. 7. device according to claim 6, it is characterised in that also include:
    Outer net request module, for when the first received request results belong to invalid dns resolution result, to default At least one second class dns server request target domain name public as outer net target dns resolution result;
    Second request results receiving module, for receiving the second request knot of at least one second class dns server feedback Fruit;
    3rd analysis result processing module, if being not belonging to invalid DNS for existing in the second received request results Second request results of analysis result, then the second request results that will not belong to invalid dns resolution result are defined as the mesh Target dns resolution result corresponding to domain name is marked, and the target dns resolution result is fed back into the handheld terminal, and will On the map record of the target domain name and target dns resolution result caching process is carried out as history map record.
  8. 8. device according to claim 7, it is characterised in that also include:
    3rd request module again, if belonging to invalid dns resolution result for the 4th received request results, to The target dns resolution result of at least one second class dns server request target domain name;
    5th request results receiving module, for receiving the 5th request knot of at least one second class dns server feedback Fruit;
    6th analysis result processing module, if being not belonging to invalid DNS for existing in the 5th received request results 5th request results of analysis result and the 5th request results for being not belonging to invalid dns resolution result and the institute cached State that current target dns resolution result corresponding to target domain name is different, then by the target domain name corresponding to target dns resolution As a result the 5th request results for being not belonging to invalid dns resolution result are updated to, to ensure:Receive again described hand-held After terminal sends the DNS query request on the target domain name, fed back to the handheld terminal corresponding to the target domain name Renewal after target dns resolution result.
  9. 9. according to the device described in claim 6-8 any one, it is characterised in that the invalid dns resolution result, bag Include:
    Result or the content for showing inquiry failure are empty result.
  10. 10. according to the device described in claim 6-8 any one, it is characterised in that the default port-for-port 53.
CN201410416273.4A 2014-08-21 2014-08-21 Method and device for processing DNS query request Active CN104144231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410416273.4A CN104144231B (en) 2014-08-21 2014-08-21 Method and device for processing DNS query request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410416273.4A CN104144231B (en) 2014-08-21 2014-08-21 Method and device for processing DNS query request

Publications (2)

Publication Number Publication Date
CN104144231A CN104144231A (en) 2014-11-12
CN104144231B true CN104144231B (en) 2018-01-19

Family

ID=51853297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410416273.4A Active CN104144231B (en) 2014-08-21 2014-08-21 Method and device for processing DNS query request

Country Status (1)

Country Link
CN (1) CN104144231B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104935683A (en) * 2015-06-29 2015-09-23 北京经天科技有限公司 Buffer processing method and device for domain name resolution
CN110636150B (en) * 2019-10-24 2023-04-18 北京小米移动软件有限公司 Domain name resolution method, domain name resolution device, and storage medium
CN111556552B (en) * 2020-03-26 2023-01-31 维沃移动通信有限公司 Data transmission method and electronic equipment
CN112822305B (en) * 2021-02-03 2022-09-13 深圳市共进电子股份有限公司 Method, device, router and storage medium for processing DNS query request
CN113472914B (en) * 2021-06-28 2023-09-26 北京天地互连信息技术有限公司 DNS directional prefetching caching method and system
CN114844866A (en) * 2022-03-29 2022-08-02 武汉斗鱼鱼乐网络科技有限公司 Network request connection method and related equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100470493B1 (en) * 2001-06-01 2005-02-07 니트젠테크놀러지스 주식회사 Method for the Service resolving special domain name
CN100419729C (en) * 2003-10-31 2008-09-17 浙江大学 Contents server system and processing procedure
CN102025793A (en) * 2010-01-22 2011-04-20 中国移动通信集团北京有限公司 Domain name resolution method and system and DNS in IP network
CN102301682B (en) * 2011-04-29 2014-02-19 华为技术有限公司 Method and system for network caching, domain name system redirection sub-system thereof

Also Published As

Publication number Publication date
CN104144231A (en) 2014-11-12

Similar Documents

Publication Publication Date Title
CN104144231B (en) Method and device for processing DNS query request
CN103034483B (en) web page script management method and system
CN103825895B (en) A kind of information processing method and electronic equipment
CN104202360B (en) The method of accessed web page, device and router
CN106254436B (en) Remote debugging method, related equipment and system
CN103593419B (en) Data query method, apparatus, server and system
CN102624920B (en) A kind of method of being conducted interviews by proxy server and device
CN106331213B (en) A kind of domain name system DNS processing method and processing device
CN110224996A (en) Network Access Method, device, computer equipment and the storage medium of application program
CN111064713B (en) Node control method and related device in distributed system
CN105939297B (en) A kind of TCP message recombination method and device
CN108270882A (en) The analysis method and device of domain name, storage medium, electronic device
CN102752288A (en) Method and device for identifying network access action
CN112445700B (en) Test method and device
CN102457588A (en) Method and device for implementing rDNS
CN107534690A (en) Gather domain name system flow
CN102045403A (en) Method, device and system for processing data of distributed network
CN104506450A (en) Media resource feedback method and device
CN104852919A (en) Method and apparatus for realizing portal authentication
CN105306609A (en) Network loading processing method and device
CN107888710A (en) A kind of message forwarding method and device
CN103581361A (en) Domain name resolution proxy method, device and system
CN107171889A (en) Network application interface test method and device and electronic equipment
CN107911499A (en) Multi-line domain name analytic method and device
US7653070B2 (en) Method and system for supporting efficient and cache-friendly TCP session lookup operations based on canonicalization tags

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20181220

Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee after: Zhuhai Leopard Technology Co.,Ltd.

Address before: 100085 East District, Second Floor, 33 Xiaoying West Road, Haidian District, Beijing

Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.