CN102855334B - A kind of browser and the method obtaining dns resolution data thereof - Google Patents

A kind of browser and the method obtaining dns resolution data thereof Download PDF

Info

Publication number
CN102855334B
CN102855334B CN201210380524.9A CN201210380524A CN102855334B CN 102855334 B CN102855334 B CN 102855334B CN 201210380524 A CN201210380524 A CN 201210380524A CN 102855334 B CN102855334 B CN 102855334B
Authority
CN
China
Prior art keywords
domain
dns
browser
name
data message
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.)
Expired - Fee Related
Application number
CN201210380524.9A
Other languages
Chinese (zh)
Other versions
CN102855334A (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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210380524.9A priority Critical patent/CN102855334B/en
Publication of CN102855334A publication Critical patent/CN102855334A/en
Application granted granted Critical
Publication of CN102855334B publication Critical patent/CN102855334B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of browser and the method obtaining dns resolution data thereof, described method includes: start browser, initiates the access request to uniform resource position mark URL;Intercept the acquisition address information function of browser side computer system, obtain Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name;IP address information corresponding for each domain name of described acquisition is saved in the dns resolution data message of browser side;Described DNS accelerates to store in the way of map table in data message each domain name of acquisition;And when each domain name obtained includes the Main Domain subdomain name corresponding with each Main Domain, described map table also sets up the mapping relations of each Main Domain and corresponding subdomain name.The present invention, by adding up for some Main Domains in advance, after this DNS acceleration data message is called by user side browser, it is possible to achieve web page browsing is accelerated, improves the DNS efficiency accelerated.

Description

A kind of browser and the method obtaining dns resolution data thereof
Technical field
The present invention relates to Internet technical field, be specifically related to a kind of browser and obtain DNS(DomainNameSystem, domain name system) method of resolution data.
Background technology
At present, the URL(UniformResourceLocator that browser is specified in access, URL) time, it is thus achieved that the root content of this URL, resolve this root content, set up corresponding network request.Visible, existing scheme is to wait user to input network address just to resolve, and after download root URL, analyzes HTML(HTML, HypertextMarkupLanguage) data content, the object then just rendered as required is downloaded.Wherein, before downloading the object needing to render, need to carry out resolving DNS, but, the time of dns resolution is likely to from several milliseconds to 100 seconds, so, when adopting existing scheme to access a URL, the time of consumption is long.But, the reason causing elapsed time long mainly too much depends on the analytical capabilities of dns server so that address resolution efficiency in browser side is low.So, how to depart from the dependence to dns server analytical capabilities at present, and then improve browser side address resolution efficiency, become technical problem urgently to be resolved hurrily at present.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide a kind of and overcome the problems referred to above or solve the browser of the problems referred to above and the method for acquisition dns resolution data thereof at least in part.
According to one aspect of the present invention, it is provided that a kind of browser obtains the method for dns resolution data, including:
Start browser, initiate the access request to uniform resource position mark URL;
Intercept the acquisition address information function of browser side computer system, obtain Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name;
IP address information corresponding for each domain name of described acquisition is saved in the dns resolution data message of browser side.
Alternatively, in the method for the invention, described DNS accelerates to store in the way of map table in data message each domain name of acquisition and the IP address information that each domain name is corresponding;And when each domain name obtained includes the Main Domain subdomain name corresponding with each Main Domain, described map table also sets up the mapping relations of each Main Domain and corresponding subdomain name.
Alternatively, in the method for the invention, during the acquisition address information function of described interception browser side computer system, farther include:
Extract domain name corresponding to described URL, the DNS of detection browser side accelerates whether comprise domain name in data message, and when not comprising, obtain Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name.
Alternatively, the method for the invention farther includes:
When DNS browser side being detected accelerates to comprise domain name in data message, accelerate data message obtains, at described DNS, the IP address information that domain name is corresponding, and utilize this IP address information to carry out URL access process.
Alternatively, in the method for the invention, the described mode obtaining IP address information corresponding to domain name in DNS acceleration data message includes:
Domain name corresponding for described URL is inserted into and waits to accelerate in list, and notification queue daemon thread;
Described queue daemon thread creates semaphore, and transfers the IP address information of URL correspondence domain name described in described DNS acceleration data message, it is achieved the parsing to domain name.
Alternatively, in the method for the invention, the described mode obtaining Main Domain corresponding to URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name, farther include:
Intercept the acquisition address information function of browser side computer system, obtain described Main Domain and/or each subdomain name corresponding to described Main Domain and described Main Domain and/or socket address structure corresponding to each subdomain name corresponding to described Main Domain;
According to described socket address structure, obtain described Main Domain and/or IP address information corresponding to each subdomain name corresponding to described Main Domain.
Alternatively, in the method for the invention, when described browser exits, IP address information corresponding for each domain name obtained is saved in the dns resolution data message of browser side.
Alternatively, the method of the invention also includes: send the request message of the DNS acceleration data message that download server side generates to server side, or, receive the DNS acceleration data message that the server side of server side active push generates, and when getting the DNS acceleration data message that described server side generates, utilize this DNS to accelerate data message and the DNS acceleration data message that browser is local is updated.
According to a further aspect in the invention, it is provided that a kind of browser, including:
Access initiation module, be used for starting browser, initiate the access request to URL;
Data obtaining module, for intercepting the acquisition address information function of browser side computer system, obtains Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name;
Information storage module, for being saved in IP address information corresponding for each domain name of described acquisition in the dns resolution data message of browser side.
Alternatively, in browser of the present invention, in described information storage module, DNS accelerates to store in the way of map table in data message each domain name of acquisition and the IP address information that each domain name is corresponding;And when each domain name obtained includes the Main Domain subdomain name corresponding with each Main Domain, described map table also sets up the mapping relations of each Main Domain and corresponding subdomain name.
Alternatively, in browser of the present invention, described data obtaining module, it is further used for when intercepting the acquisition address information function of browser side computer system, extract domain name corresponding to described URL, the DNS of detection browser side accelerates whether to comprise domain name in data message, and when not comprising, and obtains Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name.
Alternatively, in browser of the present invention, also include:
Accelerate to perform module, for when described data obtaining module detects that described DNS accelerates to comprise domain name in data message, accelerate data message obtains, at described DNS, the IP address information that domain name is corresponding, and utilize this IP address information to carry out URL access process.
Alternatively, in browser of the present invention, described acceleration performs module, is further used for being inserted into domain name corresponding for described URL and waits to accelerate in list, and notification queue daemon thread;Create semaphore by described queue daemon thread, and transfer the IP address information of URL correspondence domain name described in described DNS acceleration data message, it is achieved the parsing to domain name.
Alternatively, in browser of the present invention, described data obtaining module, it is further used for intercepting the acquisition address information function of browser side computer system, obtains described Main Domain and/or each subdomain name corresponding to described Main Domain and described Main Domain and/or socket address structure corresponding to each subdomain name corresponding to described Main Domain;According to described socket address structure, obtain described Main Domain and/or IP address information corresponding to each subdomain name corresponding to described Main Domain.
Alternatively, in browser of the present invention, described information storage module, it is further used for when described browser exits, IP address information corresponding for each domain name obtained is saved in the dns resolution data message of browser side.
Alternatively, in browser of the present invention, also include:
More new module, the DNS generated for sending download server to server side accelerates the request message of data message, or, receive the DNS acceleration data message that the server side of server side active push generates, and when getting the DNS acceleration data message that described server side generates, utilize this DNS to accelerate data message and the DNS acceleration data message that browser is local is updated.
Compared with prior art, the present invention has the beneficial effect that:
Technical scheme of the present invention, obtain by carrying out statistics for some domain name mappings in advance, form DNS and accelerate data message, this DNS accelerates data message and calls for browser side, the acceleration of web page browsing can be realized, this acceleration processing procedure is consuming time short, improves dns resolution efficiency, thus also realizing the raising of web page browsing speed.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, and can be practiced according to the content of description, and in order to above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit those of ordinary skill in the art be will be clear from understanding.Accompanying drawing is only for illustrating the purpose of preferred implementation, and is not considered as limitation of the present invention.And in whole accompanying drawing, it is denoted by the same reference numerals identical parts.In the accompanying drawings:
Fig. 1 obtains the flow chart of the method for system dns resolution data for a kind of browser that the embodiment of the present invention one provides;
Fig. 2 is the mapping relations figure of the map table set up in the embodiment of the present invention;
Fig. 3 is mouse-over schematic diagram in the embodiment of the present invention;
The structural representation of a kind of browser that Fig. 4 provides for the embodiment of the present invention three;
Fig. 5 obtains the structured flowchart of the system of system dns resolution data for a kind of browser that the embodiment of the present invention four provides.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing showing the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should do not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
In order to solve the technical problem existed in prior art, the embodiment of the present invention provides a kind of browser and the method obtaining dns resolution data thereof.The present invention, by carrying out DNS query request statistics for number of site in advance, forms DNS and accelerates data message, when user inputs station address, accelerates data message by calling DNS, it is achieved web page browsing is accelerated, and improves the analyzing efficiency of DNS.
Below by several specific embodiments, the process that realizes of the present invention is described in detail, specific as follows:
Embodiment one
As it is shown in figure 1, the embodiment of the present invention provides a kind of method that browser obtains dns resolution data, specifically include following steps:
Step S101, starts browser, initiates the access request to URL;
Step S102, intercepts the acquisition address information function of browser side computer system, obtains Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name;
Preferably, in this step, obtain Main Domain corresponding to described URL and each subdomain name that this Main Domain is corresponding;Wherein, subdomain name is preferably two grades of subdomain names.
Preferably, in this step, when intercepting the acquisition address information function of browser side computer system, farther include: extract domain name corresponding to described URL, the DNS of detection browser side accelerates whether comprise domain name in data message, and when not comprising, obtain Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name.
Preferably, in this step, obtain Main Domain corresponding to URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or the mode of IP address information corresponding to each subdomain name, farther include:
Intercept the acquisition address information function (such as system function getaddrinfo ()) of browser side computer system, obtain described Main Domain and/or each subdomain name corresponding to described Main Domain and described Main Domain and/or socket address structure corresponding to each subdomain name corresponding to described Main Domain;
According to described socket address structure, obtain described Main Domain and/or IP address information corresponding to each subdomain name corresponding to described Main Domain.
Step S103, is saved in IP address information corresponding for each domain name of described acquisition in the dns resolution data message of browser side.
Preferably, in this step, DNS accelerates to store in the way of map table in data message each domain name of acquisition and the IP address information that each domain name is corresponding;And when each domain name obtained includes the Main Domain subdomain name corresponding with each Main Domain, described map table also sets up the mapping relations of each Main Domain and corresponding subdomain name.
Preferably, in this step, when described browser exits, IP address information corresponding for each domain name obtained is saved in the dns resolution data message of browser side.
Preferably, in method described in the embodiment of the present invention, also include: send the request message of the DNS acceleration data message that download server side generates to server side, or, receive the DNS acceleration data message that the server side of server side active push generates, and when getting the DNS acceleration data message that described server side generates, utilize this DNS to accelerate data message and the DNS acceleration data message that browser is local is updated.
Wherein, the mode of server side generation DNS acceleration data message includes:
(1) in the Main Domain pond being pre-configured with, choose Main Domain one by one, obtain subdomain name corresponding to the Main Domain chosen and the Main Domain IP address information corresponding with each subdomain name;
(2) preserve the subdomain name of each described Main Domain and correspondence thereof and the IP address information of each domain name, generate DNS and accelerate data message.
Preferably, in step (1), the mode obtaining subdomain name corresponding to Main Domain and the Main Domain IP address information corresponding with each subdomain name includes:
(11) in Main Domain pond, Main Domain is chosen one by one;
(12) intercepting system function getaddrinfo (), obtains subdomain name corresponding to each described Main Domain and the described Main Domain socket address structure corresponding with each subdomain name;
(13) according to socket address structure, the IP address information that Main Domain is corresponding with each subdomain name is obtained.
Preferably, in step (2), the mode of the subdomain name preserving each described Main Domain and correspondence thereof includes: set up the map table of mapping relations between described Main Domain with corresponding each subdomain name.
Further, in the embodiment of the present invention, after statistics obtains DNS acceleration data message, this DNS accelerates data message can access certain URL offer acceleration support for subsequent user.It is in particular in:
Step 1, after browser starts, calls DNS and accelerates data message;
Step 2, browser receives the Client-initiated access request to certain URL, resolves this access request, and extracts domain name corresponding to described URL;
Preferably, in this step, before extracting domain name corresponding to described URL, also include:
Judge described URL whether first delay by this locality, if uncached, then extract domain name corresponding to described URL, perform step 3;If buffer memory, do not carry out DNS acceleration process.
Step 3, detection DNS accelerates whether to comprise domain name corresponding to URL in data message, if comprising, then obtains the IP address information that this domain name is corresponding, and utilizes this IP address information to conduct interviews process;If not comprising, then perform step S102 and S103 described in embodiment one;
In this step, detection DNS accelerates whether comprise domain name corresponding to described URL in data message, specifically includes: judge that domain name corresponding for described URL is Main Domain or subdomain name, if Main Domain, then directly searches this domain name in map table;If subdomain name, then this subdomain name is split, obtain the Main Domain that this subdomain name is corresponding, and with this Main Domain for search index, map table is searched corresponding domain name.
In this step, when detecting that DNS accelerates to comprise domain name corresponding for URL in data message, extract the mode of IP address information corresponding to domain name, including:
Domain name corresponding for described URL is inserted into and waits to accelerate in list, and notification queue daemon thread;
Described queue daemon thread creates semaphore, and transfers the IP address information of URL correspondence domain name described in described DNS acceleration data message, it is achieved the parsing to domain name.
Further, in method described in the embodiment of the present invention, when concurrently obtaining IP address information corresponding to multiple domain name, utilize the thread pool that described queue daemon thread notice is pre-created for obtaining each request task distribution thread of IP address information, and utilize each thread of distribution to transfer the IP address information in described DNS acceleration data message, it is achieved the parsing to each domain name.
Further, in the embodiment of the present invention, when user accesses webpage corresponding for certain URL, also carry out following mouse-over scheme.Continue step 3, specific as follows:
Step 4, when user browses corresponding for the URL webpage of access, whether detection user's mouse hovers on webpage, if so, obtains the webpage subregion DIV element that mouse-over position is corresponding;
Step 5, splits each URL in described DIV element, obtains domain name corresponding to each URL, and the domain name obtained is carried out duplicate removal process;
Step 6, detection DNS accelerates whether comprise each domain name corresponding for described URL in data message, if comprising, then extracts the IP address information that each domain name is corresponding;
Step 7, when user accesses the URL in described DIV element, directly utilizes the IP address information of extraction and conducts interviews process.
In sum, technical scheme of the present invention, by adding up for some domain names in advance, form DNS and accelerate data message, after this DNS acceleration data message is called by user side browser, it is possible to achieve web page browsing is accelerated, this acceleration processing procedure is consuming time short, improves the DNS efficiency accelerated;
It addition, technical scheme of the present invention, it is also possible to it is accelerated processing to the URL at mouse-over place, applied widely.
Embodiment two
The embodiment of the present invention provides a kind of method that browser obtains dns resolution data, and the method is being further elaborated on method described in embodiment one, specifically includes:
1) after browser starts, when user initiates the access request to certain URL, intercept the acquisition address information function of browser side computer system, obtain Main Domain corresponding to described URL;
2) intercepting system function getaddrinfo (), obtains two grades of subdomain names that described Main Domain is corresponding and the IP address information of Main Domain and each two grades of subdomain names.
In this step, the system function of interception is getaddrinfo (constchar*nodename, constchar*service, conststructaddrinfo*hints, structaddrinfo**result) function.
Wherein, nodename: domain name (ASCII fromat) to be resolved;Service: comprise the ANSI character string of service name or port;Hints: network socket points out data structure, indicates family of network protocols, socket type, agreement etc.;Result: resolve and return data structure, is used for preserving the data of system analysis.
If getaddrinfo function returns successfully, then the variable pointed to by result parameter has been received in a pointer, what it pointed to is the addrinfo structure chained list being together in series by ai_next member therein.Can cause that the situation returning multiple addrinfo structure has following two:
1, have multiple with the address of nodename parameter association, then each address suitable in requested address bunch returns a corresponding structure.
The multiple socket type of service support that 2, service parameters are specified, then each socket type is likely to return a corresponding structure, is specifically dependent upon the ai_socktype member of hints structure.
The embodiment of the present invention, before intercepting getaddrinfo function, first one hints structure of distribution, the field of needs is filled in after it is reset, intercept getaddrinfo(again) function, obtain two grades of subdomain names corresponding to corresponding Main Domain and the described Main Domain socket address structure corresponding with each two grades of subdomain names, further according to socket address structure, obtain the IP address information that Main Domain is corresponding with each two grades of subdomain names.
The embodiment of the present invention utilizes getaddrinfo() host name and Service name can convert to the technical characteristic of socket address structure by function, obtains two grades of subdomain names that each Main Domain in Main Domain pond is corresponding and the IP address information that each domain name is corresponding.
3) by two grades of subdomain names of the Main Domain obtained and correspondence thereof, and the IP address information of Main Domain and each two grades of subdomain names is saved in DNS and accelerates in data message.
In this step, when preserving two grades of subdomain names of Main Domain and correspondence thereof, setting up the map table of mapping relations between Main Domain with corresponding each two grades of subdomain names, concrete mapping relations are as shown in Figure 2.
Described below realize process based on what DNS accelerated that data message carries out DNS acceleration:
1, start browser, call DNS and accelerate data message;
2, when browser address bar changes, namely user has initiated the access request to certain URL, resolves this access request, obtains URL to be visited;
Wherein, address field changes and refers to the URL that user inputs at address field or automatically recommended by address field.
3, it is judged that whether URL to be visited is the URL that system has been cached, if so, illustrate that object corresponding for URL is not out of date, it is possible to the directly information of use local system buffer memory, now just need not carry out DNS acceleration process;If it is not, then perform step 4;
4, split URL, obtain domain name corresponding to this URL, and accelerate data message searches for this domain name at DNS, when searching, perform step 5;If not searching, process by normal browsing process.
Such as, when user is when browsing webpage, the connection of second level domain under Main Domain can be clicked, at this moment can get this second level domain and carry out the segmentation of URL, the map table in data message, the Main Domain after splitting, the lookup of the mapping relations of second level domain is accelerated according to above-mentioned DNS.
5, call DnsAccelerate () function, will wait that accelerating domain name is inserted in acceleration list.
This step particularly as follows:
DnsAccelerate () function call Windows system function QueueUserWorkItem (), notification queue daemon thread has domain name to wait to accelerate.
Queue daemon thread calls ParallelGetAddrInfoProc () function, performs following operation:
Call CreateSemaphore function, create semaphore;
Call:: QueueUserWorkItem (GetAddrInfoSysProc , &pParseDataArray [index], 0), resolve domain name;The invoked procedure of this function is and accelerates to search for the process waiting to accelerate IP address corresponding to domain name in data message at DNS;
Waiting in all queues of task completes.
6, after domain name has been accelerated, get IP address information corresponding for URL to be visited, utilize this IP address information to conduct interviews process;
7, when user browses webpage corresponding for described URL, whether detection user's mouse hovers on the webpage currently browsed, and if so, obtains the webpage subregion DIV element that mouse-over position is corresponding;Wherein, mouse-over schematic diagram is as shown in Figure 3;
8, each URL in described DIV element is split, obtains domain name corresponding to each URL, and the domain name obtained is carried out duplicate removal process;
9, detection DNS accelerates whether comprise each domain name corresponding for described URL in data message, if comprising, then extracts the IP address information that each domain name is corresponding, and when user accesses the URL in described DIV element, directly utilize the IP address information of described extraction and conduct interviews process.
Mouse-over scheme is illustrated below:
The current location of detection mouse, and the URL link of the daughter element in the covered web page element of mouse.Such as mouse is currently located in<divclass=" nav2 ">
When the mouse-over<ahref=" http://mobile.sina.com.cn/ ">in above-mentioned DIV element goes up, the acceleration that the URL at this DIV can carry out DNS processes.
Hover over the URL which point is corresponding, this refers to<div...>...</div>in URL duplicate removal set, such as news.sina.com.cn;mil.news.sina.com.cn;finance.sina.com.cn;tech.sina.com.cn;mobile.sina.com.cn;digi.sina.com.cn.
Embodiment three
As shown in Figure 4, the embodiment of the present invention provides a kind of browser, including: access initiation module 410, data obtaining module 420, information storage module 430;Wherein:
Access initiation module 410, be used for starting browser, initiate the access request to URL;
Data obtaining module 420, for intercepting the acquisition address information function of browser side computer system, obtains Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name;
Preferably, data obtaining module 420, it is further used for when intercepting the acquisition address information function of browser side computer system, extract domain name corresponding to described URL, the DNS of detection browser side accelerates whether comprise domain name in data message, and when not comprising, obtain Main Domain corresponding for described URL and/or each subdomain name corresponding to this Main Domain and described Main Domain and/or IP address information corresponding to each subdomain name.
Preferably, data obtaining module 420, it is further used for intercepting the acquisition address information function of browser side computer system, obtains described Main Domain and/or each subdomain name corresponding to described Main Domain and described Main Domain and/or socket address structure corresponding to each subdomain name corresponding to described Main Domain;According to described socket address structure, obtain described Main Domain and/or IP address information corresponding to each subdomain name corresponding to described Main Domain.
Information storage module 430, for being saved in IP address information corresponding for each domain name of described acquisition in the dns resolution data message of browser side.
Preferably, information storage module 430, it is further used for when described browser exits, IP address information corresponding for each domain name obtained is saved in the dns resolution data message of browser side.
Wherein, described DNS accelerates to store in the way of map table in data message each domain name of acquisition and the IP address information that each domain name is corresponding;And when each domain name obtained includes the Main Domain subdomain name corresponding with each Main Domain, described map table also sets up the mapping relations of each Main Domain and corresponding subdomain name.
Further, browser described in the embodiment of the present invention also includes:
Accelerate to perform module 440, for when data obtaining module 420 detects that described DNS accelerates to comprise domain name in data message, accelerate data message obtains, at described DNS, the IP address information that domain name is corresponding, and utilize this IP address information to carry out URL access process.
Preferably, accelerate to perform module 440, be further used for being inserted into domain name corresponding for described URL and wait to accelerate in list, and notification queue daemon thread;Create semaphore by described queue daemon thread, and transfer the IP address information of URL correspondence domain name described in described DNS acceleration data message, it is achieved the parsing to domain name.
Further, browser described in the embodiment of the present invention also includes:
More new module 450, the DNS generated for sending download server to server side accelerates the request message of data message, or, receive the DNS acceleration data message that the server side of server side active push generates, and when getting the DNS acceleration data message that described server side generates, utilize this DNS to accelerate data message and the DNS acceleration data message that browser is local is updated.
In sum, browser described in the embodiment of the present invention, by adding up for some Main Domains in advance, form DNS and accelerate data message, after this DNS acceleration data message is called by user side browser, can realizing web page browsing to accelerate, this acceleration processing procedure is consuming time short, improves the analyzing efficiency of DNS.
Embodiment four
As it is shown in figure 5, the embodiment of the present invention also provides for a kind of browser obtains the system of domain name system DNS resolution data, including: the browser described in embodiment three, and server.
Described browser sends the request message of the DNS acceleration data message that download server generates to server side, or, receive the DNS acceleration data message that the server side of server side active push generates, and when getting the DNS acceleration data message that described server side generates, utilize this DNS to accelerate data message and the DNS acceleration data message that browser is local is updated.
In sum, system described in the embodiment of the present invention, by adding up for some Main Domains in advance, form DNS and accelerate data message, after this DNS acceleration data message is called by user side browser, can realizing web page browsing to accelerate, this acceleration processing procedure is consuming time short, improves the analyzing efficiency of DNS.
Not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant in algorithm and the display of this offer.Various general-purpose systems can also with use based on together with this teaching.As described above, the structure constructed required by this kind of system is apparent from.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to utilize various programming language to realize the content of invention described herein, and the description above language-specific done is the preferred forms in order to disclose the present invention.
In description mentioned herein, describe a large amount of detail.It is to be appreciated, however, that embodiments of the invention can be put into practice when not having these details.In some instances, known method, structure and technology it are not shown specifically, in order to do not obscure the understanding of this description.
Similarly, it is to be understood that, one or more in order to what simplify that the disclosure helping understands in each inventive aspect, herein above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or descriptions thereof sometimes.But, the method for the disclosure should be construed to and reflect an intention that namely the present invention for required protection requires feature more more than the feature being expressly recited in each claim.More precisely, as the following claims reflect, inventive aspect is in that all features less than single embodiment disclosed above.Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention, wherein each claim itself as the independent embodiment of the present invention.
Those skilled in the art are appreciated that, it is possible to carry out the module in the equipment in embodiment adaptively changing and they being arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit excludes each other, it is possible to adopt any combination that all processes or the unit of all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment are combined.Unless expressly stated otherwise, each feature disclosed in this specification (including adjoint claim, summary and accompanying drawing) can be replaced by the alternative features providing purpose identical, equivalent or similar.
In addition, those skilled in the art it will be appreciated that, although embodiments more described herein include some feature included in other embodiments rather than further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can mode use in any combination.
The all parts embodiment of the present invention can realize with hardware, or realizes with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize the some or all parts in the equipment such as browser according to embodiments of the present invention, server.The present invention is also implemented as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program).The program of such present invention of realization can store on a computer-readable medium, or can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment without departing from the scope of the appended claims.In the claims, any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not exclude the presence of the element or step not arranged in the claims.Word "a" or "an" before being positioned at element does not exclude the presence of multiple such element.The present invention by means of including the hardware of some different elements and can realize by means of properly programmed computer.In the unit claim listing some devices, several in these devices can be through same hardware branch and specifically embody.Word first, second and third use do not indicate that any order.Can be title by these word explanations.

Claims (8)

1. the method that browser obtains domain name system DNS resolution data, including:
After browser starts, call DNS and accelerate data message;
Browser receives the Client-initiated access request to uniform resource position mark URL;
Browser judges that domain name corresponding for described URL is Main Domain or subdomain name, if Main Domain, then directly accelerates to search this domain name in data message at described DNS;If subdomain name, then this subdomain name is split, after obtaining the Main Domain that this subdomain name is corresponding, with this Main Domain for search index, accelerate data message is searched the domain name of correspondence at described DNS;
Browser judges whether to find domain name corresponding to described URL, if, then domain name corresponding for described URL is inserted into and waits to accelerate in list, and notification queue daemon thread, semaphore is created by described queue daemon thread, and transfer the IP address information of URL correspondence domain name described in described DNS acceleration data message, it is achieved the parsing to domain name;If it is not, then browser intercepts the acquisition address information function of browser side computer system, obtain Main Domain corresponding for described URL and each subdomain name corresponding to this Main Domain and described Main Domain and IP address information corresponding to each subdomain name;
IP address information corresponding for each domain name of described acquisition is saved in the DNS of browser side by browser to be accelerated in data message;
Wherein, described DNS accelerates to store in the way of map table in data message each domain name of acquisition and the IP address information that each domain name is corresponding;And when each domain name obtained includes the Main Domain subdomain name corresponding with each Main Domain, described map table also sets up the mapping relations of each Main Domain and corresponding subdomain name.
2. the method for claim 1, it is characterised in that the mode of described Main Domain corresponding for acquisition URL and each subdomain name corresponding to this Main Domain and described Main Domain and IP address information corresponding to each subdomain name, farther includes:
Intercept the acquisition address information function of browser side computer system, obtain described Main Domain and each subdomain name corresponding to described Main Domain and described Main Domain and socket address structure corresponding to each subdomain name corresponding to described Main Domain;
According to described socket address structure, obtain described Main Domain and IP address information corresponding to each subdomain name corresponding to described Main Domain.
3. the method for claim 1, it is characterised in that in described method, when described browser exits, the DNS that IP address information corresponding for each domain name obtained is saved in browser side accelerates in data message.
4. the method for claim 1, it is characterised in that described method also includes:
The request message of the DNS acceleration data message that download server side generates is sent to server side, or, receive the DNS acceleration data message that the server side of server side active push generates, and when getting the DNS acceleration data message that described server side generates, utilize this DNS to accelerate data message and the DNS acceleration data message that browser is local is updated.
5. a browser, including:
Access initiation module, for, after browser starts, calling DNS and accelerate data message, and receive the Client-initiated access request to URL;
Data obtaining module, for judging that domain name corresponding for described URL is Main Domain or subdomain name, if Main Domain, then directly accelerates to search this domain name in data message at described DNS;If subdomain name, then this subdomain name is split, after obtaining the Main Domain that this subdomain name is corresponding, with this Main Domain for search index, accelerate data message is searched the domain name of correspondence at described DNS;And judge whether to find domain name corresponding to described URL, if, then domain name corresponding for described URL is inserted into and waits to accelerate in list by triggering acceleration execution module, and notification queue daemon thread, semaphore is created by described queue daemon thread, and transfer the IP address information of URL correspondence domain name described in described DNS acceleration data message, it is achieved the parsing to domain name;If it is not, then intercept the acquisition address information function of browser side computer system, obtain Main Domain corresponding for described URL and each subdomain name corresponding to this Main Domain and described Main Domain and IP address information corresponding to each subdomain name;
Information storage module, the DNS for IP address information corresponding for each domain name of described acquisition is saved in browser side accelerates in data message;
Wherein, in described information storage module, DNS accelerates to store in the way of map table in data message each domain name of acquisition and the IP address information that each domain name is corresponding;And when each domain name obtained includes the Main Domain subdomain name corresponding with each Main Domain, described map table also sets up the mapping relations of each Main Domain and corresponding subdomain name.
6. browser as claimed in claim 5, it is characterized in that, described data obtaining module, it is further used for intercepting the acquisition address information function of browser side computer system, obtains described Main Domain and each subdomain name corresponding to described Main Domain and described Main Domain and socket address structure corresponding to each subdomain name corresponding to described Main Domain;According to described socket address structure, obtain described Main Domain and IP address information corresponding to each subdomain name corresponding to described Main Domain.
7. browser as claimed in claim 5, it is characterised in that described information storage module, is further used for when described browser exits, and the DNS that IP address information corresponding for each domain name obtained is saved in browser side accelerates in data message.
8. browser as claimed in claim 5, it is characterised in that also include:
More new module, the DNS generated for sending download server to server side accelerates the request message of data message, or, receive the DNS acceleration data message that the server side of server side active push generates, and when getting the DNS acceleration data message that described server side generates, utilize this DNS to accelerate data message and the DNS acceleration data message that browser is local is updated.
CN201210380524.9A 2012-09-29 2012-09-29 A kind of browser and the method obtaining dns resolution data thereof Expired - Fee Related CN102855334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210380524.9A CN102855334B (en) 2012-09-29 2012-09-29 A kind of browser and the method obtaining dns resolution data thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210380524.9A CN102855334B (en) 2012-09-29 2012-09-29 A kind of browser and the method obtaining dns resolution data thereof

Publications (2)

Publication Number Publication Date
CN102855334A CN102855334A (en) 2013-01-02
CN102855334B true CN102855334B (en) 2016-07-06

Family

ID=47401922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210380524.9A Expired - Fee Related CN102855334B (en) 2012-09-29 2012-09-29 A kind of browser and the method obtaining dns resolution data thereof

Country Status (1)

Country Link
CN (1) CN102855334B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902787B (en) * 2012-09-29 2015-11-25 北京奇虎科技有限公司 A kind of method of browser and acquisition dns resolution data thereof
CN103973635B (en) * 2013-01-24 2015-10-28 腾讯科技(深圳)有限公司 Page access control method and relevant apparatus and system
CN104184841B (en) * 2013-05-23 2018-01-12 上海携程商务有限公司 Website dns resolution accelerated method and client
CN103365695B (en) * 2013-07-31 2017-04-26 广州市动景计算机科技有限公司 Method and device for increasing sub-resource loading speed
CN104683330A (en) * 2015-02-06 2015-06-03 广州酷狗计算机科技有限公司 Domain name hijacking resisting method and device
CN106302842B (en) * 2015-05-21 2020-02-18 阿里巴巴集团控股有限公司 Domain name resolution method, device and system
CN108282455A (en) * 2017-09-28 2018-07-13 广州市动景计算机科技有限公司 Web-page requests method, apparatus and domain-name information analysis result processing method, device
CN110225144B (en) * 2018-03-02 2021-03-23 华为技术有限公司 Method for obtaining and providing service, user equipment and management server
CN109981817B (en) * 2019-03-21 2020-11-20 网宿科技股份有限公司 Access request processing method and device and server
CN111556077A (en) * 2020-05-15 2020-08-18 杭州安恒信息技术股份有限公司 Network data acquisition method, equipment and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1735052A (en) * 2004-08-09 2006-02-15 岳东晓 System and method for realizing mapping from telephone number to IP network address based on existing DNS (domain name service)
CN101682621A (en) * 2007-03-12 2010-03-24 思杰系统有限公司 Systems and methods for cache operations
CN102647482A (en) * 2012-03-31 2012-08-22 奇智软件(北京)有限公司 Method and system for accessing website

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100496054C (en) * 2005-07-01 2009-06-03 英华达(上海)电子有限公司 Method for searching internetwork address on computer
US7689671B2 (en) * 2007-03-09 2010-03-30 International Business Machines Corporation System and method for multiple IP addresses during domain name resolution
CN101242336B (en) * 2008-03-13 2010-12-01 杭州华三通信技术有限公司 Method for remote access to intranet Web server and Web proxy server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1735052A (en) * 2004-08-09 2006-02-15 岳东晓 System and method for realizing mapping from telephone number to IP network address based on existing DNS (domain name service)
CN101682621A (en) * 2007-03-12 2010-03-24 思杰系统有限公司 Systems and methods for cache operations
CN102647482A (en) * 2012-03-31 2012-08-22 奇智软件(北京)有限公司 Method and system for accessing website

Also Published As

Publication number Publication date
CN102855334A (en) 2013-01-02

Similar Documents

Publication Publication Date Title
CN102855334B (en) A kind of browser and the method obtaining dns resolution data thereof
CN102882991B (en) A kind of browser and carry out the method for domain name mapping
CN102843445B (en) A kind of browser and carry out the method for domain name mapping
US10412176B2 (en) Website access method, apparatus, and website system
US8862777B2 (en) Systems, apparatus, and methods for mobile device detection
CN105930528B (en) Webpage caching method and server
CA2839006C (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
CN104754073A (en) Resource access method and device
US7917523B2 (en) Method and system for providing improved URL mangling performance using fast re-write
CN104572777B (en) Webpage loading method and device based on UIWebView component
CN1351729A (en) Handling a request for information provided by a networks site
CN101159762B (en) Method and device of accelerating download of web page contents
CN108256014B (en) Page display method and device
CN103078945A (en) Method and system for processing browser crash data
CN103825919A (en) Method, device and system for data resource caching
CN115668894A (en) Service worker configured to service a plurality of single-page applications
JP5869010B2 (en) System and method for providing mobile URL in mobile search environment
CN103440281A (en) Method, device and equipment for acquiring download file
EP2998885A1 (en) Method and device for information search
CN102333123B (en) File storage method and device, searching method and device and network device
CN102902787B (en) A kind of method of browser and acquisition dns resolution data thereof
CN106484741A (en) The method and device that a kind of single page application accesses data collection and sends
CN112948011B (en) Method and device for loading secondary page
US11716405B1 (en) System and method for identifying cache miss in backend application
CN101158974A (en) Method and device for quoting resource

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160706

Termination date: 20210929