CN103973835A - Domain name system server selection method and device - Google Patents

Domain name system server selection method and device Download PDF

Info

Publication number
CN103973835A
CN103973835A CN201410209808.0A CN201410209808A CN103973835A CN 103973835 A CN103973835 A CN 103973835A CN 201410209808 A CN201410209808 A CN 201410209808A CN 103973835 A CN103973835 A CN 103973835A
Authority
CN
China
Prior art keywords
domain name
designated domain
dns server
dns
server
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.)
Pending
Application number
CN201410209808.0A
Other languages
Chinese (zh)
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 Kingsoft Internet Science and Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Science and Technology 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 Science and Technology Co Ltd filed Critical Beijing Kingsoft Internet Science and Technology Co Ltd
Priority to CN201410209808.0A priority Critical patent/CN103973835A/en
Publication of CN103973835A publication Critical patent/CN103973835A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a domain name system server selection method and device. The DNS server selection method includes the steps that a domain name input by a user is received; a DNS list preserved in advance is searched for, wherein the DNS represents the domain name system, the DNS list comprises at least one DNS server and the average access time corresponding to each DNS server, and according to the average access time of each DNS server contained in the DNS list, the DNS server with the shortest average access time is selected for analyzing the domain name input by the user. The DNS server selection device comprises a receiving module, a searching module and a selecting module. The user can select the DNS server with the shortest average access time with the method so as to do network activities better.

Description

A kind of domain name system DNS server selection method and device
Technical field
The present invention relates to network technology, particularly a kind of domain name system DNS server selection method and device.
Background technology
Along with scientific and technical development, more and more important role is being played the part of in the Internet in people's life.The expansion of the Internet coverage, allows people can carry out network activity whenever and wherever possible.User need to pass through ISP (Internet Service Provider, Internet service supplier) could accessing Internet.
Whenever user accesses a website, user terminal (such as computer) all can be initiated DNS (Domain NameSystem, domain name system) request and be resolved domain name, and dns server can return to the IP address corresponding with domain name after resolving domain name.
For same website, different dns servers may return to different IP (Internet Protocol, Internet protocol) address to user terminal, for different IP addresses, user terminal is by different IP address access websites, and access speed exists very large difference.Especially among user terminal and Website server are present in different ISP networks time, for example, user terminal is in communication network, but Website server is in UNICOM's network, compared all situations in communication network of user terminal and Website server, the speed of user's access websites can be slower.Therefore, can, by selecting suitable dns server, make user's access websites more swimmingly.
But also there is no at present a kind of scheme, can help user to select more suitable dns server concerning own.
Summary of the invention
In order to address the above problem, the invention provides a kind of domain name system DNS server selection method and device, so that can selecting suitable dns server, user carries out network activity.
A kind of domain name system DNS server selection method, comprising:
Receive the domain name of user's input;
Search the DNS list of preserving in advance, wherein, described DNS list comprises at least one dns server, and mean access time corresponding to each dns server;
According to the mean access time of the each dns server comprising in described DNS list, select the shortest dns server of mean access time to resolve the domain name of described user's input.
The mean access time that described each dns server is corresponding adopts following methods to calculate:
By the dns server in described DNS list, at least one designated domain name is resolved, obtain IP address corresponding to described at least one designated domain name, and calculate described dns server described at least one designated domain name is resolved to spent average time;
The IP address corresponding according to described at least one designated domain name, the Website server corresponding with described at least one designated domain name connects, and calculates the average time that described Website server corresponding at least one designated domain name of user terminal connection spends;
According to described dns server, described at least one designated domain name is resolved to spent average time, and described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, calculate the mean access time of described dns server.
Described dns server is resolved and is adopted spent average time following formula to calculate described at least one designated domain name:
td ‾ = Σ n ( w _ i / w _ sum ) * td _ i
Wherein, td_i resolves the spent time to i designated domain name, the weighted value that w_i is described i designated domain name for described dns server, w_sum is the weighted value sum of all designated domain name, i=1,2,, n, the quantity that n is all designated domain name.
Adopt following formula to calculate the average time that described in described user terminal connects, Website server corresponding at least one designated domain name spends:
th ‾ = Σ n ( w _ i / w _ sum ) * th _ i
Wherein, th_i connects the time that i Website server corresponding to designated domain name spends for user terminal, w_i is the weighted value of Website server corresponding to described i designated domain name, w_sum is the weighted value sum of Website server corresponding to all designated domain name, i=1,2 ... n, n is the quantity of Website server corresponding to all designated domain name.
The mean access time of described dns server adopts following formula to calculate:
result = ( td ‾ * kDnsWeight ) + th ‾ * ( 1 - kDnsWeight )
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, kDnsWeight is weighted value.
Preferably, described dns server is resolved and is adopted spent average time following formula to calculate described at least one designated domain name;
td ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * td _ j
Wherein, td_j resolves the spent time to j designated domain name for described dns server, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
Described dns server is resolved and is adopted spent average time following formula to calculate described at least one designated domain name::
th ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * th _ j
Wherein, th_j connects the time that j Website server corresponding to designated domain name spends for user terminal, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of Website server corresponding to j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of described user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
The mean access time of described dns server adopts following formula to calculate:
result ′ = ( td ′ ‾ * kDnsWeight ) + th ′ ‾ * ( 1 - kDnsWeight ) + dns _ penalty _ t
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, dns_pelnalty_t is the line delay time, and kDnsWeight is weighted value.
The described line delay time adopts following formula to calculate:
dns_penalty_t=kPenaltyFactor*(pow(kPenaltyBase,penalty_exponent)-1)
Wherein, kPenaltyFactor is delay factor, kPenaltyBase is delay base, penalty_exponent is the mortality of dns server and 100 product, pow (kPenaltyBase, penalty_exponent) is the penalty_exponent power of kPenaltyBase.
The mortality of described dns server, is that user terminal passes through this dns server, to the ratio of the number of times of Website server connection failure corresponding to described at least one designated domain name Website server number corresponding with all designated domain name.
The present invention also provides a kind of domain name system DNS server choice device, comprising: receiver module, search module and select module, wherein,
Described receiver module, for receiving the domain name of user's input;
The described module of searching, for searching the DNS list of preserving in advance, wherein, described DNS list comprises at least one dns server, and mean access time corresponding to each dns server;
Described selection module, for the mean access time of each dns server of comprising according to described DNS list, selects the shortest dns server of mean access time to resolve the domain name of described user's input.
This device also comprises: the first computing module, the second computing module and the 3rd computing module, wherein,
Described the first computing module, for at least one designated domain name being resolved by the dns server of dns server list, obtain IP address corresponding to described at least one designated domain name, and calculate described dns server described at least one designated domain name is resolved to spent average time;
Described the second computing module, for the IP address corresponding according to described at least one designated domain name, the Website server corresponding with described at least one designated domain name connects, and calculates the average time that described Website server corresponding at least one designated domain name of user terminal connection spends;
Described the 3rd computing module, for described at least one designated domain name being resolved to spent average time according to described dns server, and described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, calculate the mean access time of described dns server.
Described the first computing module adopts following formula to calculate described dns server described at least one designated domain name is resolved to spent average time:
td ‾ = Σ n ( w _ i / w _ sum ) * td _ i
Wherein, td_i resolves the spent time to i designated domain name, the weighted value that w_i is described i designated domain name for described dns server, w_sum is the weighted value sum of all designated domain name, i=1,2,, n, the quantity that n is all designated domain name.
Described the second computing module adopts following formula to calculate the average time that described Website server corresponding at least one designated domain name of described user terminal connection spends:
th ‾ = Σ n ( w _ i / w _ sum ) * th _ i
Wherein, th_i connects the time that i Website server corresponding to designated domain name spends for user terminal, w_i is the weighted value of Website server corresponding to described i designated domain name, w_sum is the weighted value sum of Website server corresponding to all designated domain name, i=1,2 ... n, n is the quantity of Website server corresponding to all designated domain name.
Described the 3rd computing module adopts following formula to calculate the mean access time of described dns server:
result = ( td ‾ * kDnsWeight ) + th ‾ * ( 1 - kDnsWeight )
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, kDnsWeight is weighted value.
Preferably, described the first computing module adopts following formula to calculate described dns server described at least one designated domain name is resolved to spent average time;
td ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * td _ j
Wherein, td_j resolves the spent time to j designated domain name for described dns server, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
Described the second computing module adopts following formula to calculate described dns server described at least one designated domain name is resolved to spent average time:
th ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * th _ j
Wherein, th_j connects the time that j Website server corresponding to designated domain name spends for user terminal, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of Website server corresponding to j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of described user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
Described the 3rd computing module adopts following formula to calculate described dns server described at least one designated domain name is resolved to spent average time:
result ′ = ( td ′ ‾ * kDnsWeight ) + th ′ ‾ * ( 1 - kDnsWeight ) + dns _ penalty _ t
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, dns_pelnalty_t is the line delay time, and kDnsWeight is weighted value.
Described the 3rd computing module adopts following formula to calculate the described line delay time:
dns_penalty_t=kPenaltyFactor*(pow(kPenaltyBase,penalty_exponent)-1)
Wherein, kPenaltyFactor is delay factor, kPenaltyBase is delay base, penalty_exponent is the mortality of dns server and 100 product, pow (kPenaltyBase, penalty_exponent) is the penalty_exponent power of kPenaltyBase.
It is characterized in that, the mortality of the dns server using in described the 3rd module, that user terminal passes through this dns server, to the ratio of the number of times of Website server connection failure corresponding to described at least one designated domain name Website server number corresponding with all designated domain name.
In the embodiment of the present invention, the DNS list of preserving in advance according to the domain name lookup of user's input, according to the mean access time of the each dns server comprising in described DNS list, select the shortest dns server of mean access time to resolve the domain name of described user's input.
For user, can utilize said method to select the most suitable dns server concerning own, for can better carrying out network activity, user provides convenience.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The flow chart of a kind of domain name system DNS server selection method that Fig. 1 provides for the embodiment of the present invention;
The flow chart of a kind of mean access time computational methods that Fig. 2 provides for the embodiment of the present invention;
Fig. 3 is the website visiting process schematic diagram of the embodiment of the present invention;
The first structural representation of a kind of domain name system DNS server choice device that Fig. 4 provides for the embodiment of the present invention;
The second structural representation of a kind of domain name system DNS server choice device that Fig. 5 provides for the embodiment of the present invention.
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 clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 1, a kind of domain name system server system of selection that the embodiment of the present invention provides, can comprise:
S100, receives the domain name that user inputs;
S101, searches the DNS list of preserving in advance;
Described DNS list comprises at least one dns server, and mean access time corresponding to each dns server;
S102, according to the mean access time of the each dns server comprising in described DNS list, selects the shortest dns server of mean access time to resolve the domain name of described user's input.
Described mean access time refers to that user terminal accesses by described dns server the average time that the page corresponding at least one designated domain name spends.
The technical scheme that adopts the embodiment of the present invention to provide, selects the shortest dns server of mean access time to carry out domain name mapping, and therefore, access needed time of the page corresponding to domain name just greatly reduces.Thereby, promoted user's experience.
Optionally, as shown in Figure 2, in a specific implementation of the present invention, the mean access time that above-mentioned each dns server is corresponding can adopt following methods to calculate:
S200, by the dns server in dns server list, at least one designated domain name is resolved, obtain IP address corresponding to described at least one designated domain name, and calculate described dns server described at least one designated domain name is resolved to spent average time;
In default DNS list, can comprise one or more dns servers, the quantity of dns server and type the present invention do not do concrete restriction.
Preferably, can utilize following formula one to calculate described dns server described at least one designated domain name is resolved to spent average time:
td ‾ = Σ n ( w _ i / w _ sum ) * td _ i Formula one
Wherein, td_i resolves the spent time to i designated domain name, the weighted value that w_i is described i designated domain name for described dns server, w_sum is the weighted value sum of all designated domain name, i=1,2,, n, the quantity that n is all designated domain name.
S201, the IP address corresponding according to described at least one designated domain name, the Website server corresponding with described at least one designated domain name connects, and calculates the average time that described Website server corresponding at least one designated domain name of user terminal connection spends;
Preferably, can utilize following formula two to calculate user terminal and connect the average time that described Website server corresponding at least one designated domain name spends:
th ‾ = Σ n ( w _ i / w _ sum ) * th _ i Formula two
Wherein, th_i connects the time that i Website server corresponding to designated domain name spends for user terminal, w_i is the weighted value of Website server corresponding to described i designated domain name, w_sum is the weighted value sum of Website server corresponding to all designated domain name, i=1,2 ... n, n is the quantity of Website server corresponding to all designated domain name.
Optionally, the weighted value of Website server corresponding to the weighted value of above-mentioned n domain name and/or above-mentioned n domain name can be set according to specific circumstances.For example, user can be according to personal like or access frequency etc., arranges higherly to the weighted value of some domain name and/or Website server corresponding to some domain name.If the network speed of user terminal when browsing these websites requires height, can the weighted value of these websites be arranged higherly.
For instance, high if user requires the network speed of website A, so, can the weighted value of website A be adjusted highlyer, for example exceed 0.5.Like this, for DNS service X, its parsing time to website A, or the connect hours of user terminal and website A is fewer, and the mean access time finally drawing is just less.When dns server access websites A that utilization is selected, speed is just faster.
Especially, if the weighted value of website A is set to 1, the dns server of selecting is so the fastest dns server of access websites A.
Especially, in an optional realization of the present invention, can all domain names and/or Website server corresponding to all domain names be set to identical weighted value, in this case, above-mentioned formula one and formula two can be reduced to respectively:
td ‾ = Σtd _ i / n Formula three
th ‾ = Σth _ i / n Formula four
Wherein, i=1,2 ..., n.
For the ease of understanding, do a specific description here, as shown in Figure 3:
User for example, inputs domain name in the browser of user terminal (PC), and for example " www.x1.com ", user terminal is initiated the request of domain name mapping to dns server, with the IP address of determining that domain name " www.x1.com " is corresponding.
Dns server is searched domain name " www.x1.com " in this earth's surface (or local cache), if found, its corresponding IP address is returned to user terminal; If do not found, dns server sends an inquiry to root server, with the IP address of confirming that domain name " www.x1.com " is corresponding.
Root server sends a reply to dns server after receiving the inquiry of dns server transmission, tells dns server to arrive the TLD server of domain name " www.x1.com " (Top-level Domainnames, TLD) and goes inquiry; Dns server is received after reply, contacts this TLD server, and this TLD server sends a reply to dns server, tells dns server to go inquiry to a name server for domain name " www.x1.com ".Dns server contacts this name server, with the IP address of determining that this domain name " www.x1.com " is corresponding.
Browser obtains, behind IP address corresponding to domain name " www.x1.com ", can sending connection request to the Website server of domain name " www.x1.com " by this IP address.
Website server receives after connection request, return to the relevant information of the page corresponding to domain name " www.x1.com " to browser, for example, Word message (.html (HyperText Markup language supertext markup language) .css (Cascading Style Sheets, CSS) or .asp (Active ServerPage, Active Server Pages) file etc.), picture, and/or flash etc.
Above-mentioned relevant information (html, css and/or java script code etc.) is organized into the page that user can check by last browser.
In sum, the page that certain domain name of user terminal access is corresponding, can be divided into two parts, and a part is the parsing of dns server to domain name, and another part is user terminal and being connected of Website server.
Due to the complexity of network condition, it may be different that same dns server is resolved the spent time to different domain names, and it may be also different that same user terminal connects the time that Website server corresponding to different domain names spend.Therefore, in the embodiment of the present invention, in S100 and S101, calculating be that dns server is resolved spent average time to one or more designated domain name, and user terminal connects the average time that Website server corresponding to one or more designated domain name spends.
S202, according to described dns server, described at least one designated domain name is resolved to spent average time, and described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, calculate the mean access time of described dns server;
Preferably, can utilize following formula five to calculate the mean access time of described dns server:
result = ( td ‾ * kDnsWeight ) + th ‾ * ( 1 - kDnsWeight ) Formula five
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, kDnsWeight is weighted value.
It should be noted that, here with can be to use any one group in formula one and formula two, formula three and formula four to calculate, can be also to use other algorithms to calculate, and embodiments of the invention are not done concrete restriction to this.
Procedure declaration by the page corresponding to certain domain name of user terminal access shown in above-mentioned Fig. 3 can be known, if dns server is preserved the IP address corresponding to domain name of user's input, when DNS resolves domain name so, only need to from this earth's surface (or local cache), read IP address corresponding to this domain name, can accelerate like this speed of user's access websites.
Therefore, in the optional realization of one of the present invention, can the weighted value of td in above-mentioned formula five be arranged smallerly a little, for example, can be set to 0.16, can make like this result obtaining react more accurately the performance of DNS.Occurrence can be according to actual conditions adjustment, and the embodiment of the present invention is not done concrete restriction to this.
In actual conditions, dns server may go wrong to the parsing of designated domain name, occur resolving failed situation, and user terminal also may occur problems with being connected of Website server.Under the circumstances, above-mentioned formula one can be optimized for following formula six:
td ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * td _ j Formula six
Wherein, td_j resolves the spent time to j designated domain name for described dns server, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
Above-mentioned formula two can be optimized for following formula seven:
th ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * th _ j Formula seven
Wherein, th_j connects the time that j Website server corresponding to designated domain name spends for user terminal, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of Website server corresponding to j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of described user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
In the process of user to access pages, be not only subject to the impact of dns server, be also subject to the impact of line conditions.If service interruption is smooth, can make being connected between user terminal and Website server go wrong.In an optional embodiment of the present invention, in the time calculating mean access time, it is also conceivable that the line delay time.Therefore, above-mentioned formula five can be optimized for following formula eight:
result ′ = ( td ′ ‾ * kDnsWeight ) + th ′ ‾ * ( 1 - kDnsWeight ) + dns _ penalty _ t Formula eight
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, dns_pelnalty_t is the line delay time, and kDnsWeight is weighted value.
Preferably, can utilize following formula nine to calculate the above-mentioned line delay time:
Dns_penalty_t=kPenaltyFactor* (pow (kPenaltyBase, penalty_exponent)-1) ... formula nine
Wherein, kPenaltyFactor is delay factor, kPenaltyBase is delay base, the two all can be set according to the circuit at user terminal and dns server place, penalty_exponent is the mortality of dns server and 100 product, pow (kPenaltyBase, penalty_exponent) is the penalty_exponent power of kPenaltyBase.
In the present embodiment, the mortality of described dns server, refers to user terminal by this dns server, to the ratio of the number of times of Website server connection failure corresponding to described at least one designated domain name Website server number corresponding with all designated domain name.Wherein, connection failure, can refer to the failure of dns server parsing domain name, or, also can refer to user terminal and Website server connection failure.
In above-mentioned formula nine, kPenaltyFactor is preferably 0.8, kPenaltyBase and is preferably 1.5.It should be noted that, these numerical value can be adjusted as the case may be, and embodiments of the invention are not done concrete restriction to this.
By said method, can, by searching the mean access time of each dns server in default DNS list, select the shortest dns server of mean access time, for can better carrying out network activity, user provides convenience.
The present invention also provides a kind of domain name system server choice device, as shown in Figure 4, comprise, receiver module 001, search module 002 and select module 003, wherein,
Receiver module 001, for receiving the domain name of user's input;
Search module 002, for searching the DNS list of preserving in advance;
Described DNS list comprises at least one dns server, and mean access time corresponding to each dns server, and the quantity of dns server and type the present invention do not do concrete restriction.
Select module 003, for the mean access time of each dns server of comprising according to described DNS list, select the shortest dns server of mean access time to resolve the domain name of described user's input.
Described mean access time refers to that user terminal accesses by described dns server the average time that the page corresponding at least one designated domain name spends.
Optionally, as shown in Figure 5, said apparatus can also comprise:
The first computing module 004, for at least one designated domain name being resolved by the dns server of dns server list, obtain IP address corresponding to described at least one designated domain name, and calculate described dns server described at least one designated domain name is resolved to spent average time;
For example, the first computing module 004 can be according to formula one, formula three or formula six, calculates described dns server described at least one designated domain name is resolved to spent average time.
The second computing module 005, for the IP address corresponding according to described at least one designated domain name, the Website server corresponding with described at least one designated domain name connects, and calculates the average time that described Website server corresponding at least one designated domain name of user terminal connection spends;
For example, the second computing module 005 can be according to formula two, formula four or formula seven, calculates user terminal and connects the average time that described Website server corresponding at least one designated domain name spends.
The 3rd computing module 006, for described at least one designated domain name being resolved to spent average time according to described dns server, and described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, calculate the mean access time of described dns server.
For example, the 3rd computing module 006 can, according to formula five or formula eight, calculate the mean access time of described dns server.
In the process of user to access pages, be not only subject to the impact of dns server, be also subject to the impact of line conditions.If service interruption is smooth, can make being connected between user terminal and Website server go wrong.In an optional embodiment of the present invention, in the time calculating mean access time, it is also conceivable that the line delay time.And according to described dns server, described at least one designated domain name is resolved to spent average time, described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, and the mean access time of dns server described in line delay Time Calculation
For system embodiment, because it is substantially similar in appearance to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
It should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
One of ordinary skill in the art will appreciate that all or part of step realizing in said method execution mode is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in computer read/write memory medium, here the alleged storage medium obtaining, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.

Claims (20)

1. a domain name system DNS server selection method, is characterized in that, comprising:
Receive the domain name of user's input;
Search the DNS list of preserving in advance, wherein, described DNS list comprises at least one dns server, and mean access time corresponding to each dns server;
According to the mean access time of the each dns server comprising in described DNS list, select the shortest dns server of mean access time to resolve the domain name of described user's input.
2. the method for claim 1, is characterized in that, the mean access time that described each dns server is corresponding adopts following methods to calculate:
By the dns server in described DNS list, at least one designated domain name is resolved, obtain IP address corresponding to described at least one designated domain name, and calculate described dns server described at least one designated domain name is resolved to spent average time;
The IP address corresponding according to described at least one designated domain name, the Website server corresponding with described at least one designated domain name connects, and calculates the average time that described Website server corresponding at least one designated domain name of user terminal connection spends;
According to described dns server, described at least one designated domain name is resolved to spent average time, and described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, calculate the mean access time of described dns server.
3. method as claimed in claim 2, is characterized in that, described dns server is resolved and adopted spent average time following formula to calculate described at least one designated domain name:
td ‾ = Σ n ( w _ i / w _ sum ) * td _ i
Wherein, td_i resolves the spent time to i designated domain name, the weighted value that w_i is described i designated domain name for described dns server, w_sum is the weighted value sum of all designated domain name, i=1,2,, n, the quantity that n is all designated domain name.
4. method as claimed in claim 2 or claim 3, is characterized in that, described user terminal connects and adopts following formula to calculate the average time that described Website server corresponding at least one designated domain name spend:
th ‾ = Σ n ( w _ i / w _ sum ) * th _ i
Wherein, th_i connects the time that i Website server corresponding to designated domain name spends for user terminal, w_i is the weighted value of Website server corresponding to described i designated domain name, w_sum is the weighted value sum of Website server corresponding to all designated domain name, i=1,2 ... n, n is the quantity of Website server corresponding to all designated domain name.
5. the method as described in any one in claim 2-4, is characterized in that, the mean access time of described dns server adopts following formula to calculate:
result = ( td ‾ * kDnsWeight ) + th ‾ * ( 1 - kDnsWeight )
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, kDnsWeight is weighted value.
6. method as claimed in claim 2, is characterized in that, described dns server is resolved and adopted spent average time following formula to calculate described at least one designated domain name;
td ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * td _ j
Wherein, td_j resolves the spent time to j designated domain name for described dns server, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
7. the method as described in claim 2 or 6, is characterized in that, described dns server is resolved and adopted spent average time following formula to calculate described at least one designated domain name:
th ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * th _ j
Wherein, th_j connects the time that j Website server corresponding to designated domain name spends for user terminal, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of Website server corresponding to j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of described user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
8. the method as described in claim 2 or 6 or 7, is characterized in that, the mean access time of described dns server adopts following formula to calculate:
result ′ = ( td ′ ‾ * kDnsWeight ) + th ′ ‾ * ( 1 - kDnsWeight ) + dns _ penalty _ t
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, dns_pelnalty_t is the line delay time, and kDnsWeight is weighted value.
9. method as claimed in claim 8, is characterized in that, the described line delay time adopts following formula to calculate:
dns_penalty_t=kPenaltyFactor*(pow(kPenaltyBase,penalty_exponent)-1)
Wherein, kPenaltyFactor is delay factor, kPenaltyBase is delay base, penalty_exponent is the mortality of dns server and 100 product, pow (kPenaltyBase, penalty_exponent) is the penalty_exponent power of kPenaltyBase.
10. method as claimed in claim 9, it is characterized in that, the mortality of described dns server, that user terminal passes through this dns server, to the ratio of the number of times of Website server connection failure corresponding to described at least one designated domain name Website server number corresponding with all designated domain name.
11. 1 kinds of domain name system DNS server choice devices, is characterized in that, comprising: receiver module, search module and select module, wherein,
Described receiver module, for receiving the domain name of user's input;
The described module of searching, for searching the DNS list of preserving in advance, wherein, described DNS list comprises at least one dns server, and mean access time corresponding to each dns server;
Described selection module, for the mean access time of each dns server of comprising according to described DNS list, selects the shortest dns server of mean access time to resolve the domain name of described user's input.
12. devices as claimed in claim 11, is characterized in that, this device also comprises: the first computing module, the second computing module and the 3rd computing module, wherein,
Described the first computing module, for at least one designated domain name being resolved by the dns server of dns server list, obtain IP address corresponding to described at least one designated domain name, and calculate described dns server described at least one designated domain name is resolved to spent average time;
Described the second computing module, for the IP address corresponding according to described at least one designated domain name, the Website server corresponding with described at least one designated domain name connects, and calculates the average time that described Website server corresponding at least one designated domain name of user terminal connection spends;
Described the 3rd computing module, for described at least one designated domain name being resolved to spent average time according to described dns server, and described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, calculate the mean access time of described dns server.
13. devices as claimed in claim 12, is characterized in that, described the first computing module adopts following formula to calculate described dns server described at least one designated domain name is resolved to spent average time:
td ‾ = Σ n ( w _ i / w _ sum ) * td _ i
Wherein, td_i resolves the spent time to i designated domain name, the weighted value that w_i is described i designated domain name for described dns server, w_sum is the weighted value sum of all designated domain name, i=1,2,, n, the quantity that n is all designated domain name.
14. devices as described in claim 12 or 13, is characterized in that, described the second computing module adopt following formula calculate described user terminal connect described in Website server corresponding at least one designated domain name average time of spending:
th ‾ = Σ n ( w _ i / w _ sum ) * th _ i
Wherein, th_i connects the time that i Website server corresponding to designated domain name spends for user terminal, w_i is the weighted value of Website server corresponding to described i designated domain name, w_sum is the weighted value sum of Website server corresponding to all designated domain name, i=1,2 ... n, n is the quantity of Website server corresponding to all designated domain name.
15. devices as described in any one in claim 12-14, is characterized in that, described the 3rd computing module adopts following formula to calculate the mean access time of described dns server:
result = ( td ‾ * kDnsWeight ) + th ‾ * ( 1 - kDnsWeight )
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, kDnsWeight is weighted value.
16. devices as claimed in claim 12, is characterized in that, described the first computing module adopts following formula to calculate described dns server described at least one designated domain name is resolved to spent average time;
td ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * td _ j
Wherein, td_j resolves the spent time to j designated domain name for described dns server,
Wherein, user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
17. devices as described in claim 12 or 16, is characterized in that, described the second computing module adopts following formula to calculate described dns server described at least one designated domain name is resolved to spent average time:
th ′ ‾ = Σ m ( w _ j / w _ sum ′ ) * th _ j
Wherein, th_j connects the time that j Website server corresponding to designated domain name spends for user terminal, wherein, and user terminal and j the Website server successful connection that designated domain name is corresponding; W_j is the weighted value of Website server corresponding to j designated domain name, and w_sum ' is the weighted value sum of the Website server that successfully connects of described user terminal, j=1, and 2 ..., m, m is the quantity of the Website server that successfully connects of user terminal.
18. devices as described in claim 12 or 16 or 17, is characterized in that, described the 3rd computing module adopts following formula to calculate described dns server described at least one designated domain name is resolved to spent average time:
result ′ = ( td ′ ‾ * kDnsWeight ) + th ′ ‾ * ( 1 - kDnsWeight ) + dns _ penalty _ t
Wherein, for described dns server is resolved spent average time to described at least one designated domain name, for described user terminal connects the average time that described Website server corresponding at least one designated domain name spends, dns_pelnalty_t is the line delay time, and kDnsWeight is weighted value.
19. devices as claimed in claim 18, is characterized in that, described the 3rd computing module adopts following formula to calculate the described line delay time:
dns_penalty_t=kPenaltyFactor*(pow(kPenaltyBase,penalty_exponent)-1)
Wherein, kPenaltyFactor is delay factor, kPenaltyBase is delay base, penalty_exponent is the mortality of dns server and 100 product, pow (kPenaltyBase, penalty_exponent) is the penalty_exponent power of kPenaltyBase.
20. devices as claimed in claim 19, it is characterized in that, it is characterized in that, the mortality of the dns server using in described the 3rd module, that user terminal passes through this dns server, to the ratio of the number of times of Website server connection failure corresponding to described at least one designated domain name Website server number corresponding with all designated domain name.
CN201410209808.0A 2014-05-16 2014-05-16 Domain name system server selection method and device Pending CN103973835A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410209808.0A CN103973835A (en) 2014-05-16 2014-05-16 Domain name system server selection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410209808.0A CN103973835A (en) 2014-05-16 2014-05-16 Domain name system server selection method and device

Publications (1)

Publication Number Publication Date
CN103973835A true CN103973835A (en) 2014-08-06

Family

ID=51242865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410209808.0A Pending CN103973835A (en) 2014-05-16 2014-05-16 Domain name system server selection method and device

Country Status (1)

Country Link
CN (1) CN103973835A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301171A (en) * 2014-09-11 2015-01-21 赛尔网络有限公司 Network performance measuring method and system based on DNS authoritative server
CN104869182A (en) * 2015-05-28 2015-08-26 广州华多网络科技有限公司 Domain name resolution method and device
CN105245631A (en) * 2015-09-25 2016-01-13 中国互联网络信息中心 Method and system for optimizing DNS (Domain Name Server) root service access
CN105610995A (en) * 2015-09-11 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Selection method of DNS server, selection device of the DNS server and terminal
CN105991347A (en) * 2015-04-30 2016-10-05 杭州迪普科技有限公司 Redirection method of DNS request message and device
CN106210155A (en) * 2015-04-29 2016-12-07 腾讯科技(深圳)有限公司 The method and apparatus connecting application server
CN106790766A (en) * 2017-02-17 2017-05-31 郑州云海信息技术有限公司 A kind of dns server intelligent configuration method for client
CN108965059A (en) * 2018-07-26 2018-12-07 深圳市吉祥腾达科技有限公司 Router DNS forwarding performance test method
CN109474718A (en) * 2018-12-29 2019-03-15 杭州迪普科技股份有限公司 Domain name analytic method and device
CN109889499A (en) * 2019-01-17 2019-06-14 Oppo广东移动通信有限公司 File transmitting method and relevant apparatus
CN110913007A (en) * 2019-11-29 2020-03-24 杭州安恒信息技术股份有限公司 Domain name resolution method, device and equipment
CN111262938A (en) * 2020-01-17 2020-06-09 厦门网宿有限公司 DNS server selection method and proxy server
CN113891497A (en) * 2021-10-09 2022-01-04 维沃移动通信有限公司 Network repairing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1956400A (en) * 2005-10-27 2007-05-02 国际商业机器公司 Method and system for selecting domain name server
CN102148752A (en) * 2010-12-22 2011-08-10 华为技术有限公司 Routing implementing method based on content distribution network and related equipment and system
CN102340554A (en) * 2011-09-29 2012-02-01 奇智软件(北京)有限公司 Optimal application server selection method and device for domain name system (DNS)
CN103546590A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Method and device for choosing DNS (domain name server)
CN103780715A (en) * 2014-01-29 2014-05-07 百度在线网络技术(北京)有限公司 Domain name resolution implementing method, client side and cloud server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1956400A (en) * 2005-10-27 2007-05-02 国际商业机器公司 Method and system for selecting domain name server
US20070100958A1 (en) * 2005-10-27 2007-05-03 Nikhil Hegde Method for selecting a functional domain name server
CN102148752A (en) * 2010-12-22 2011-08-10 华为技术有限公司 Routing implementing method based on content distribution network and related equipment and system
CN102340554A (en) * 2011-09-29 2012-02-01 奇智软件(北京)有限公司 Optimal application server selection method and device for domain name system (DNS)
CN103546590A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Method and device for choosing DNS (domain name server)
CN103780715A (en) * 2014-01-29 2014-05-07 百度在线网络技术(北京)有限公司 Domain name resolution implementing method, client side and cloud server

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301171B (en) * 2014-09-11 2018-06-26 赛尔网络有限公司 A kind of network for formance measuring method and system based on DNS authority server
CN104301171A (en) * 2014-09-11 2015-01-21 赛尔网络有限公司 Network performance measuring method and system based on DNS authoritative server
CN106210155A (en) * 2015-04-29 2016-12-07 腾讯科技(深圳)有限公司 The method and apparatus connecting application server
CN105991347A (en) * 2015-04-30 2016-10-05 杭州迪普科技有限公司 Redirection method of DNS request message and device
CN104869182A (en) * 2015-05-28 2015-08-26 广州华多网络科技有限公司 Domain name resolution method and device
CN105610995A (en) * 2015-09-11 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Selection method of DNS server, selection device of the DNS server and terminal
CN105245631B (en) * 2015-09-25 2018-10-26 中国互联网络信息中心 A kind of method and system of optimization DNS root service access
CN105245631A (en) * 2015-09-25 2016-01-13 中国互联网络信息中心 Method and system for optimizing DNS (Domain Name Server) root service access
CN106790766A (en) * 2017-02-17 2017-05-31 郑州云海信息技术有限公司 A kind of dns server intelligent configuration method for client
CN108965059A (en) * 2018-07-26 2018-12-07 深圳市吉祥腾达科技有限公司 Router DNS forwarding performance test method
CN109474718A (en) * 2018-12-29 2019-03-15 杭州迪普科技股份有限公司 Domain name analytic method and device
CN109474718B (en) * 2018-12-29 2022-01-28 杭州迪普科技股份有限公司 Domain name resolution method and device
CN109889499A (en) * 2019-01-17 2019-06-14 Oppo广东移动通信有限公司 File transmitting method and relevant apparatus
CN110913007A (en) * 2019-11-29 2020-03-24 杭州安恒信息技术股份有限公司 Domain name resolution method, device and equipment
CN110913007B (en) * 2019-11-29 2022-03-29 杭州安恒信息技术股份有限公司 Domain name resolution method, device and equipment
CN111262938A (en) * 2020-01-17 2020-06-09 厦门网宿有限公司 DNS server selection method and proxy server
CN111262938B (en) * 2020-01-17 2021-06-22 厦门网宿有限公司 DNS server selection method and proxy server
CN113891497A (en) * 2021-10-09 2022-01-04 维沃移动通信有限公司 Network repairing method and device
CN113891497B (en) * 2021-10-09 2024-05-24 维沃移动通信有限公司 Network repair method and device

Similar Documents

Publication Publication Date Title
CN103973835A (en) Domain name system server selection method and device
CN102647482B (en) Method and system for accessing website
CN102331985B (en) Method and device for fragment nested caching of webpage
CN104424199A (en) Search method and device
US9940399B2 (en) Methods and systems for pathing analysis
US6993583B2 (en) Dynamically sharing a pool of IP addresses
CN102143243B (en) Dynamic routing processing method and dynamic routing processing device and home gateway thereof
US20180285470A1 (en) A Mobile Web Cache Optimization Method Based on HTML5 Application Caching
CN105391811A (en) DNS (domain name resolution) method, access method for application server, and terminal
CN103221951A (en) Predictive query suggestion caching
CN103152354B (en) To method, system and client device that dangerous website is pointed out
CN102882991A (en) Browser and domain name resolution method thereof
CN103152355A (en) Method and system for promoting dangerous website and client device
CN103699669A (en) Method for message pushing in browser and browser terminal
CN101799821B (en) Method and system for realizing webpage application by widget
US20190179748A1 (en) Method and device for storing data
EP3435253B1 (en) Method and device for page display
CN101645090A (en) Page display method, server and network system
CN102801814A (en) Internet access method, device and system
CN104065736A (en) URL redirection method, device, and system
CN104980464A (en) Network request processing method, network server and network system
CN105357253A (en) Network data request processing device and method
CN104166649A (en) Caching method and device for search engine
CN105357175A (en) Query method and device for domain name security of source address
CN102647463B (en) The generation method of Web side navigation, wireless router terminal and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140806

RJ01 Rejection of invention patent application after publication