CN102624914B - Method for detecting local DNS (Domain Name Server) used by client side in Web form - Google Patents
Method for detecting local DNS (Domain Name Server) used by client side in Web form Download PDFInfo
- Publication number
- CN102624914B CN102624914B CN201210077375.9A CN201210077375A CN102624914B CN 102624914 B CN102624914 B CN 102624914B CN 201210077375 A CN201210077375 A CN 201210077375A CN 102624914 B CN102624914 B CN 102624914B
- Authority
- CN
- China
- Prior art keywords
- server
- http
- client
- dns server
- domain name
- 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
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a method for detecting a local DNS used by a client side in a Web form. The method comprises the following step of: authorizing a DNS and an HTTP (Hyper Text Transfer Protocol) server to share one rear-end database, wherein the HTTP server dynamically generates webpage element for triggering a DNS to be recursed to the authenticated DNS server, the authenticated DNS server stores information, such as the local DNS and client side IP used by the client side into the rear-end database, and the HTTP server can acquire the IP address of the local DNS server used by the client side by searching the rear-end database, judge whether the IP address of the local DNS server is matched with the IP address of the client side, and remind a client side user to reconfigure a new local DNS server or automatically skip to an optimal appointed HTTP server in time when the IP address of the local DNS server is not matched with the IP address of the client side. Therefore, according to the method disclosed by the invention, the response speed of a client side HTTP request and the user experiments of the client side user are improved.
Description
Technical field
The invention belongs to communication technical field, be specifically related to a kind of method of the local dns server using by Web mode detecting customer terminal.
Background technology
In prior art, client-access specifies the process of Web server to be: URL (the Uniform Resource Locator that (1) user comprises given host domain name the browser input of client, URL(uniform resource locator)), for example: http://www.abc.com/index.html; (2) client is extracted host domain name from URL, sends domain name mapping request to local dns server; Wherein, in this domain name mapping request, carry given host domain name; (3) local dns server judges in server local cache whether have the address record corresponding with this given host domain name, if existed, directly obtains corresponding address record, and returns to client; If there is no, DNS name resolution request recurrence is arrived to authorized DNS server, obtain assigned address record by authorized DNS server, then return to local dns server, local dns server returns to client by this address record again; (4) client is accessed the appointment Web server corresponding with assigned ip address after obtaining corresponding address record.
But realizing in process of the present invention, inventor finds, at least has following problem in prior art:
The appointment Web server corresponding due to given host domain name usually has multiple, and each specifies Web server to be distributed in different geographic areas, for example: the domain name that is www.abc.com for given host domain name, can there are 3 Web servers, lay respectively at Beijing, Shanghai and Guangzhou, that is: Beijing Web server, Shanghai Web server and Guangzhou Web server; And user can have a mind to or by mistake local dns server is configured to Beijing dns server or Shanghai D NS server or Guangzhou dns server; And, when the dns server of different regions is resolved given host domain name, can be as far as possible by for domain name mapping to the server ip address of dns server areal, for example: in the time that local dns server is configured to Beijing dns server, Beijing dns server is the IP address of Beijing server by www.abc.com domain name mapping.Because when domain name mapping request recurrence is arrived authorized DNS server by local dns server, authorized DNS server is the server ip apart from local dns server optimum by given host domain name mapping.
In actual use, whether the local dns server that user does not usually know client configuration mates with client, that is: be positioned at the same area, and in the time that the local dns server of client configuration does not mate with client, can significantly reduce the response speed of client for Web server.For example: client is Beijing client, and local dns server is while being Shanghai D NS server,: the result of designated domain name being resolved by the local dns server in Shanghai is more prone to the IP address that IP address is Shanghai Web server, therefore, even if also there is suitable WEB server in Beijing area, but Beijing client visit Shanghai Web server, because Shanghai Web server is far away apart from Beijing client, can cause Beijing client slower to the HTTP request response of Shanghai Web server, reduce the experience of Beijing client.
Summary of the invention
The defect existing for prior art, the method of the local dns server using by Web mode detecting customer terminal provided by the invention, can get the IP address of local dns server, and judge whether the IP address of local dns server and the IP address of client mate, in the time not mating, can remind in time client to reconfigure new local dns server or automatically do HTTP mode and jump to optimum appointment http server, thereby improve the response speed that client is carried out HTTP request, improve the experience of client.
Technical scheme provided by the invention is as follows:
A kind of method that the invention provides local dns server using by Web mode detecting customer terminal, comprises the following steps:
S1, described client configuration is used former local dns server, the specific URL of described client-requested;
S2, described client is carried out domain name mapping by the described former local dns server pair domain name corresponding with described specific URL, obtains the IP of the http server corresponding with domain name 1;
S3, described client is set up HTTP by the IP of described http server 1 with described http server 1 and is connected, and sends HTTP request for the first time to described http server 1; Wherein, described http server 1 connects by described HTTP the described client ip information that gets;
S4, described http server 1 is that the described request of HTTP for the first time generates http response message, wherein, described http response message comprises the page elements that can automatically load; The domain name of the URL of the described page elements that can automatically load is specific objective domain name, and described specific objective domain name is made up of by ad hoc rules unique request access mark and client ip information;
S5, the http response message of the described page elements containing can automatically loading is returned to described client by described http server 1;
S6, http response message described in described client, the URL of the page elements that can automatically load described in obtaining, send the analysis request of the described specific objective domain name of the URL to the described page elements that can automatically load to described former local dns server, then, client browser loads this page elements automatically;
S7, described specific objective domain name mapping request recurrence is arrived authorized DNS server by described former local dns server;
S8, described authorized DNS server carries out domain name mapping to described specific objective domain name, from described specific objective domain name mapping request, goes out described request access identities and described client ip information by Rule Extraction; And described authorized DNS server obtains the former local dns server IP of described former local dns server;
S9, the mapping relations that described authorized DNS server is stored described request access identities, described client ip information and described former local dns server IP in database to the back-end;
S10, described authorized DNS server generates dns resolution response, and described dns resolution response is returned to described former local dns server, and described dns resolution response is returned to described client by described former local dns server; Wherein, in described dns resolution response, carry and the IP of the described corresponding domain name of page elements URL that can automatically load;
S11, the IP of the corresponding domain name of described page elements URL that described client obtains according to S10, sets up HTTP with the http server 2 at the IP place of the corresponding domain name of described page elements URL and connects, and then sends HTTP for the second time to described http server 2 and asks; Wherein, in the head of the described request of HTTP for the second time, carry the domain name of specific objective described in S4;
S12, described http server 2 is searched described back-end data base according to described request access identities, obtains the described client ip information corresponding with described request access identities and the mapping relations of described former local dns server IP;
S13, with the S12 while, described http server 2 is searched the IP address base information of storing in described back-end data base, judges whether described client ip information mates with described former local dns server IP; If do not mated, carry out S14;
S14, described http server 2 returns to http response message to described client, wherein, contains described client ip information and the unmatched reminder message of described former local dns server IP in described http response information; And/or
Described http server 2 is searched described back-end data base, obtains and the new local dns server IP of described client ip information matches, then, sends described new local dns server IP to described client.
Preferably, in S4, described request access identities is the random number that described http server 1 generates, for identifying the resolving of described specific objective domain name on described authorized DNS server.
Preferably, in S4, described client ip information is the numeral after by ad hoc rules computing by client real IP and described request access identities.
Preferably, described http server 1 and http server 2 are identical or not identical http server.
Beneficial effect of the present invention is as follows:
The method of the local dns server using by Web mode detecting customer terminal provided by the invention, authorized DNS server and http server 2 share same back-end data base, http server 2 can get the IP address of local dns server by searching back-end data base, and judge whether the IP address of local dns server and the IP address of client mate, in the time not mating, can remind in time client to reconfigure new local dns server or be HTTP and jump to optimum appointment http server, thereby improve the response speed that client is carried out HTTP request, improve the experience of client.
Accompanying drawing explanation
The schematic flow sheet of the method for the local dns server that the Web mode of the passing through detecting customer terminal that Fig. 1 provides for the embodiment of the present invention uses.
Embodiment
As shown in Figure 1, the schematic flow sheet of method of a kind of local dns server using by Web mode detecting customer terminal providing for the embodiment of the present invention, comprises the following steps:
S1, described client configuration is used former local dns server, the specific URL of described client-requested;
S2, described client is carried out domain name mapping by the described former local dns server pair domain name corresponding with described specific URL, obtains the IP of the http server corresponding with domain name 1;
In this step, it is same as the prior art that client is obtained the process of IP of http server 1, specifically comprises the following steps:
S21, client sends the analysis request of corresponding domain name to former local dns server;
For example: if client need to be accessed the page that URL is http://www.sina.com.cn, in client browser, input http://www.sina.com.cn,, need the domain name of resolving to be: www.sina.com.cn.
S22, former local dns server judges in server local cache whether have the address record corresponding with domain name, if existed, directly from described local cache, obtains described address record; If there is no, carry out S23-S25;
S23, the domain name mapping request recurrence of S21 is arrived authorized DNS server by described former local dns server;
S24, described authorized DNS server carries out domain name mapping to domain name, obtains the described address record corresponding with domain name, and described address record is returned to described former local dns server;
S25, described former local dns server receives the address record of domain name, and returns to client.
By above-mentioned flow process, client can be obtained the IP address corresponding with designated domain name.
For example: the IP address corresponding with designated domain name Sina is: 123.114.55.210.
S3, described client is set up HTTP by the IP of described http server 1 with described http server 1 and is connected, and sends HTTP request for the first time to described http server 1; Wherein, described http server 1 connects by described HTTP the described client ip information that gets;
S4, described http server 1 is that the described request of HTTP for the first time generates http response message, wherein, described http response message comprises the page elements that can automatically load; The domain name of the URL of the described page elements that can automatically load is specific objective domain name, and described specific objective domain name is made up of by ad hoc rules unique request access mark and client ip information; Wherein, unique request access identifies the random number that can generate for http server 1.Client ip information is the numeral after by ad hoc rules computing by client real IP and described request access identities.
Concrete, http server 1 all can produce a random number for each HTTP request, and this random number arrives the DNS request of authorizing DNS for identifying recurrence next time.This random number is combined into specific objective domain name together with encrypting client ip.
For example: the URL that http server 1 generates the page elements that can automatically load can be: http: // 1673028471.337227877.abc.com/xyz.php.Wherein 1673028471 is random number, and 337227877 for by random number being the client ip obtaining after the factor is encrypted.
It should be noted that, in the present invention, the page elements that http server 1 generates must load automatically.Because, only have the page elements that can automatically load, when subsequent client browser loads automatically to this page elements, could trigger client and carry out the domain name mapping of specific objective domain name by local dns server.
S5, the http response message of the described page elements containing can automatically loading is returned to described client by described http server 1;
S6, http response message described in described client, the URL of the page elements that can automatically load described in obtaining, send the analysis request of the described specific objective domain name of the URL to the described page elements that can automatically load to described former local dns server, then, client browser loads this page elements automatically;
For example, client is to comprising http: after the page elements that can automatically load of // 1673028471.337227877.abc.com/xyz.php, owing to being the page elements that can automatically load, therefore, client browser need to load this page elements automatically, and because 1673028471.337227877.abc.com is an interim domain name generating, therefore, in the buffer memory of the local dns server of client configuration, can store scarcely address record corresponding to this domain name, so, local dns server is bound to the analysis request recurrence to this domain name to authorized DNS server.
S7, domain name analysis request recurrence is arrived authorized DNS server by described former local dns server;
S8, described authorized DNS server carries out domain name mapping to described specific objective domain name, from described specific objective domain name mapping request, goes out described request access identities and described client ip information by Rule Extraction; And described authorized DNS server obtains the former local dns server IP of described former local dns server;
Because former local dns server arrives this request recurrence to authorize DNS, therefore authorized DNS server can obtain former local dns server IP.
S9, the mapping relations that described authorized DNS server is stored described request access identities, described client ip information and described former local dns server IP in database to the back-end;
S10, described authorized DNS server generates dns resolution response, and described dns resolution response is returned to described former local dns server, and described dns resolution response is returned to described client by described former local dns server; Wherein, in described dns resolution response, carry and the IP of the described corresponding domain name of page elements URL that can automatically load;
S11, the IP of the corresponding domain name of described page elements URL that described client obtains according to S10, sets up HTTP with the http server 2 at the IP place of the corresponding domain name of described page elements URL and connects, and then sends HTTP for the second time to described http server 2 and asks; Wherein, in the head of the described request of HTTP for the second time, carry the domain name of specific objective described in S4;
S12, described http server 2 is searched described back-end data base according to described request access identities, obtains the described client ip information corresponding with described request access identities and the mapping relations of described former local dns server IP;
S13, with the S12 while, described http server 2 is searched the IP address base information of storing in described back-end data base, judges whether described client ip information mates with described former local dns server IP; If do not mated, carry out S14; In the present invention, one of determination methods whether client ip information mates with former local dns server IP can be: judge that client ip and former local dns server IP are whether in same area and same operator.
S14, described http server 2 returns to http response message to described client, wherein, contains described client ip information and the unmatched reminder message of described former local dns server IP in described http response information; And/or
Described http server 2 is searched described back-end data base, obtains and the new local dns server IP of described client ip information matches, then, sends described new local dns server IP to described client.
In the present invention, http server 1 and http server 2 can be identical or not identical http server.The related pages of http server 2 can serve as page elements for being embedded in some pages of http server 1.
Therefore, the method of what the application of the invention provided the pass through local dns server that Web mode detecting customer terminal uses, authorized DNS server and http server 2 shares same back-end data base, the mapping relations of first storing unique request access mark, client ip and former local dns server IP in database to the back-end by authorized DNS server; In subsequent process, when in the time that client need to be known a certain moment, whether client ip mates with the local dns server of its configuration, can send the request that carries unique request access mark to http server 2, http server 2 is searched same back-end data base, the client ip using while getting this dns resolution and former local dns server IP, thus judge whether the two mates.
Therefore, the method of the local dns server using by Web mode detecting customer terminal provided by the invention, http server 2 can get the IP address of local dns server, and judge whether the IP address of local dns server and the IP address of client mate, in the time not mating, can remind in time client to reconfigure new local dns server or automatically jump to optimum associated server, thereby raising client is carried out the response speed of association requests, improve the experience of client.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.
Claims (3)
1. a method for the local dns server using by Web mode detecting customer terminal, is characterized in that, comprises the following steps:
S1, described client configuration is used former local dns server, the specific URL of described client-requested;
S2, described client is carried out domain name mapping by the described former local dns server pair domain name corresponding with described specific URL, obtains the IP of the http server corresponding with domain name 1;
S3, described client is set up HTTP by the IP of described http server 1 with described http server 1 and is connected, and sends HTTP request for the first time to described http server 1; Wherein, described http server 1 connects by described HTTP the client ip information that gets;
S4, described http server 1 is that the described request of HTTP for the first time generates http response message, wherein, described http response message comprises the page elements that can automatically load; The domain name of the URL of the described page elements that can automatically load is specific objective domain name, and described specific objective domain name is made up of by ad hoc rules unique request access mark and client ip information; Wherein, described client ip information is the numeral after by ad hoc rules computing by client real IP and described request access identities; Described request access identities is the random number that described http server 1 generates, and http server 1 all can produce a random number for each HTTP request, and this random number is asked to the DNS that authorizes DNS for identifying recurrence next time;
S5, the http response message of the described page elements containing can automatically loading is returned to described client by described http server 1;
S6, http response message described in described client, the URL of the page elements that can automatically load described in obtaining, send the analysis request of the described specific objective domain name of the URL to the described page elements that can automatically load to described former local dns server, then, client browser loads this page elements automatically;
S7, described specific objective domain name mapping request recurrence is arrived authorized DNS server by described former local dns server;
S8, described authorized DNS server carries out domain name mapping to described specific objective domain name, from described specific objective domain name mapping request, goes out described request access identities and described client ip information by Rule Extraction; And described authorized DNS server obtains the former local dns server IP of described former local dns server;
S9, the mapping relations that described authorized DNS server is stored described request access identities, described client ip information and described former local dns server IP in database to the back-end;
S10, described authorized DNS server generates dns resolution response, and described dns resolution response is returned to described former local dns server, and described dns resolution response is returned to described client by described former local dns server; Wherein, in described dns resolution response, carry and the IP of the described corresponding domain name of page elements URL that can automatically load;
S11, the IP of the corresponding domain name of described page elements URL that described client obtains according to S10, sets up HTTP with the http server 2 at the IP place of the corresponding domain name of described page elements URL and connects, and then sends HTTP for the second time to described http server 2 and asks; Wherein, in the head of the described request of HTTP for the second time, carry the domain name of specific objective described in S4;
S12, described http server 2 is searched described back-end data base according to described request access identities, obtains the described client ip information corresponding with described request access identities and the mapping relations of described former local dns server IP;
S13, with the S12 while, described http server 2 is searched the IP address base information of storing in described back-end data base, judges whether described client ip information mates with described former local dns server IP; If do not mated, carry out S14;
S14, described http server 2 returns to http response information to described client, wherein, contains described client ip information and the unmatched reminder message of described former local dns server IP in described http response information; And/or
Described http server 2 is searched described back-end data base, obtains and the new local dns server IP of described client ip information matches, then, sends described new local dns server IP to described client.
2. the method for the local dns server using by Web mode detecting customer terminal according to claim 1, it is characterized in that, in S4, described request access identities is the random number that described http server 1 generates, for identifying the resolving of described specific objective domain name on described authorized DNS server.
3. the method for the local dns server using by Web mode detecting customer terminal according to claim 1, is characterized in that, described http server 1 and http server 2 are identical or not identical http server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210077375.9A CN102624914B (en) | 2012-03-22 | 2012-03-22 | Method for detecting local DNS (Domain Name Server) used by client side in Web form |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210077375.9A CN102624914B (en) | 2012-03-22 | 2012-03-22 | Method for detecting local DNS (Domain Name Server) used by client side in Web form |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102624914A CN102624914A (en) | 2012-08-01 |
CN102624914B true CN102624914B (en) | 2014-05-14 |
Family
ID=46564596
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210077375.9A Expired - Fee Related CN102624914B (en) | 2012-03-22 | 2012-03-22 | Method for detecting local DNS (Domain Name Server) used by client side in Web form |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102624914B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103051742A (en) * | 2012-12-20 | 2013-04-17 | 新浪网技术(中国)有限公司 | IP (Internet Protocol) address attribute determining method, page processing method, relevant equipment and system |
CN104993948B (en) * | 2015-06-11 | 2018-05-18 | 福建天晴数码有限公司 | Method, system and the mobile terminal of DNS name resolution troubleshooting |
CN107770222B (en) * | 2016-08-19 | 2021-03-23 | 阿里巴巴集团控股有限公司 | Network information processing method, equipment and system |
CN106713311B (en) * | 2016-12-21 | 2021-01-15 | 北京奇虎科技有限公司 | Method and device for reducing DNS hijacking risk |
CN109218457B (en) * | 2017-07-06 | 2021-04-13 | 腾讯科技(深圳)有限公司 | Network data processing method, device and system |
WO2019010694A1 (en) * | 2017-07-14 | 2019-01-17 | 深圳前海达闼云端智能科技有限公司 | Method and device for acquiring address of local domain name server and authoritative name server |
CN109361716B (en) * | 2018-12-19 | 2021-01-15 | 北京锐安科技有限公司 | Method and device for acquiring IP address, terminal equipment and storage medium |
CN111787129A (en) * | 2019-04-03 | 2020-10-16 | 北京奇虎科技有限公司 | Method and system for configuring local DNS server for client |
CN110474912A (en) * | 2019-08-19 | 2019-11-19 | 赛尔网络有限公司 | Monitoring method, electronic equipment and storage medium |
CN112738271B (en) * | 2021-01-08 | 2023-06-23 | 网宿科技股份有限公司 | CDN quality detection method, system and domain name server |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101202684A (en) * | 2006-12-15 | 2008-06-18 | 中国电信股份有限公司 | Method for close judgment of user in content distributing network |
EP2241976A2 (en) * | 2009-04-15 | 2010-10-20 | Accenture Global Services GmbH | A method and system for client-side scaling of web server farm architecture in a cloud data center |
WO2011049770A3 (en) * | 2009-10-21 | 2011-08-18 | A10 Networks Inc. | Method and system to determine an application delivery server based on geo-location information |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7747780B2 (en) * | 2007-08-27 | 2010-06-29 | DNSStuff, INC. | Method, system and apparatus for discovering user agent DNS settings |
-
2012
- 2012-03-22 CN CN201210077375.9A patent/CN102624914B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101202684A (en) * | 2006-12-15 | 2008-06-18 | 中国电信股份有限公司 | Method for close judgment of user in content distributing network |
EP2241976A2 (en) * | 2009-04-15 | 2010-10-20 | Accenture Global Services GmbH | A method and system for client-side scaling of web server farm architecture in a cloud data center |
WO2011049770A3 (en) * | 2009-10-21 | 2011-08-18 | A10 Networks Inc. | Method and system to determine an application delivery server based on geo-location information |
Also Published As
Publication number | Publication date |
---|---|
CN102624914A (en) | 2012-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102624914B (en) | Method for detecting local DNS (Domain Name Server) used by client side in Web form | |
CN105959433B (en) | A kind of domain name analytic method and its domain name analysis system | |
AU2008200613B2 (en) | Tracking web server | |
RU2658873C2 (en) | Method, system and storage medium for user to maintain login state | |
CN106933871B (en) | Short link processing method and device and short link server | |
CN103685590B (en) | Obtain the method and system of IP address | |
CN104184832B (en) | Data submission method and device in network application | |
EP3018884B1 (en) | Mobile terminal cross-browser login method and device | |
CN104410546B (en) | The method of testing and device of real time processing system | |
CN102196060A (en) | Method and system for selecting source station by Cache server | |
CN104580540B (en) | The implementation method and device of website visiting | |
CN104519146A (en) | Method and system for domain name service based on user position | |
CN103281409A (en) | Domain name resolution method of mobile internet and DNS server based on TCP protocol | |
CN110430188A (en) | A kind of quick url filtering method and device | |
CN109787951A (en) | A kind of network data access method, device and electronic equipment | |
CN106060004A (en) | Database access method and database agent node | |
Patil et al. | What can you learn from an IP? | |
CN102752300A (en) | Dynamic antitheft link system and dynamic antitheft link method | |
CN105956143A (en) | Database access method and database proxy node | |
CN103369015A (en) | Convenient method for accessing web camera through web | |
CN101551813A (en) | Network connection apparatus, search equipment and method for collecting search engine data source | |
CN102065573A (en) | WAP gateway agent service data processing method and server | |
CN104980311B (en) | Predict the method, apparatus and system of network access | |
CN103107976A (en) | Content provider/service provider (CP/SP) user identification authentication method and system and authentication support device | |
CN107070885A (en) | Information processing method, apparatus 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 | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140514 Termination date: 20200322 |
|
CF01 | Termination of patent right due to non-payment of annual fee |