Summary of the invention
In view of the above problems, the object of this invention is to provide a kind of mobile Internet domain name analytic method based on Transmission Control Protocol and dns server, the request msg causing the browser of mobile terminal device navigators such as mobile phone to send to solve the bad packet loss of mobile Internet internal cause network quality normally can not arrive the problem that dns server or browser normally can not receive dns server response result, the availability of dns server and stability during to promote web page browsing.
According to an aspect of the present invention, a kind of mobile Internet domain name analytic method based on Transmission Control Protocol is provided, comprises:
The domain name mapping request that dns server mobile terminal receive browser is sent by Transmission Control Protocol, wherein, dns server is based on the dns server in the mobile Internet of TCP;
Determine in the buffer memory of dns server or DNS database without the domain name mapping result matched with domain name, then dns server is to the Bind caching server group initiated domain name analysis request of at least one region, wherein, Bind caching server group passes through the route of the different operators of this region to the request of public network DNS initiated domain name analysis;
Dns server receives the domain name mapping result returned by public network DNS sent by Bind caching server group;
Dns server is chosen domain name mapping result and is returned to browser of mobile terminal;
Wherein, Bind caching server group is made up of multiple Bind caching server, and each Bind caching server obtains domain name mapping result by the circuit of an operator of this region to public network dns server.
Wherein, in dns server buffer memory storehouse that the domain name mapping result received is stored in dns server or DNS database.
Wherein, choosing domain name mapping result at dns server returns in the process of browser of mobile terminal, by the operator that availability and the domain name mapping result of the region of originating according to domain name mapping result, domain name mapping result are originated, choose domain name mapping result and return to browser of mobile terminal.
On the other hand, the present invention also provides a kind of mobile Internet dns server based on Transmission Control Protocol, comprising:
Domain name receiving element, for the domain name mapping request that dns server mobile terminal receive browser is sent by Transmission Control Protocol, wherein, dns server is based on the dns server in the mobile Internet of TCP;
Judging unit, for determining in the buffer memory of dns server or DNS database without the domain name mapping result matched with domain name;
Analysis result acquiring unit, for the Bind caching server group initiated domain name analysis request of dns server at least one region, wherein, Bind caching server group passes through the route of the different operators of this region to the request of public network DNS initiated domain name analysis;
Analysis result receiving element, receives the domain name mapping result returned by public network DNS sent by Bind caching server group for dns server;
Analysis result returns unit, chooses domain name mapping result return to browser of mobile terminal for dns server.
Utilize above-mentioned according to the mobile Internet domain name analytic method based on Transmission Control Protocol of the present invention and dns server, the bad problem causing data packetloss of mobile Internet internal cause network quality can be solved, the request msg avoiding the browser of mobile terminal device navigators such as the mobile phone existed in prior art to send normally can not arrive the defect that dns server or browser normally can not receive the UDP result of dns server response, the domain name mapping result of multiple circuit can be returned simultaneously, thus the availability of dns server and stability when promoting web page browsing.
In order to realize above-mentioned and relevant object, will describe in detail and the feature particularly pointed out in the claims after one or more aspect of the present invention comprises.Explanation below and accompanying drawing describe some illustrative aspects of the present invention in detail.But what these aspects indicated is only some modes that can use in the various modes of principle of the present invention.In addition, the present invention is intended to comprise all these aspects and their equivalent.
Embodiment
Below with reference to accompanying drawing, specific embodiments of the invention are described in detail.
Easily packet loss is there is based on udp protocol when network quality is bad in aforementioned prior art, thus cause user cannot obtain the problem of dns server analysis result, the present invention devises one based on the dns server in the mobile Internet of TCP, dns server is realized by the impact of mobile network environment fluctuation by the link pledge system of Transmission Control Protocol, thus the availability of dns server and stability when promoting web page browsing.
It should be noted that, the mobile terminal related in the present invention mainly refers to that mobile phone etc. utilizes browser of mobile terminal and mobile Internet to carry out the terminal of access to netwoks.
Fig. 1 shows the mobile Internet domain name analytic method schematic flow sheet based on Transmission Control Protocol according to the embodiment of the present invention.
As shown in Figure 1, the mobile Internet domain name analytic method based on Transmission Control Protocol provided by the invention comprises:
The domain name mapping request that S110:DNS server mobile terminal receive browser is sent by Transmission Control Protocol, wherein, dns server is based on the dns server in the mobile Internet of TCP;
S120: determine in the buffer memory storehouse of dns server or DNS database without the domain name mapping result matched with the domain name of request analysis;
Wherein, in the step s 120, first dns server determines whether there is the domain name mapping result matched with the domain name of request analysis in its buffer memory storehouse, if the domain name mapping result do not matched with the domain name of request analysis in the buffer memory storehouse of dns server, dns server initiates inquiry to DNS database again, the analysis result matched with the domain name of request analysis whether is had in DNS database for determining, if the domain name mapping result all do not matched in the buffer memory storehouse of dns server and DNS database, enters step S130, otherwise enters step S150.
S130:DNS server is to the Bind caching server group initiated domain name analysis request of at least one region, and wherein, Bind caching server group passes through the route of the different operators of region to the request of public network DNS initiated domain name analysis;
S140:DNS server receives the domain name mapping result returned by public network DNS sent by Bind caching server group;
S150:DNS server is chosen domain name mapping result and is returned to browser of mobile terminal.
Can be found out by the schematic flow sheet of Fig. 1, mobile Internet domain name analytic method provided by the invention, communicate by using Transmission Control Protocol, utilize the link pledge system of Transmission Control Protocol, make dns server not by the impact of mobile network environment fluctuation, thus promoting user when browsing page, the stability of dns server, improves Consumer's Experience.In a particular embodiment of the present invention, the exchanges data of browser of mobile terminal and dns server is realized by the socket of java.
In step S120, to determine in the buffer memory storehouse of dns server or DNS database without the domain name mapping result matched with the domain name of request analysis, also may exist in the buffer memory storehouse of dns server or DNS database simultaneously and have the domain name mapping result matched with the domain name of request analysis.Dns server is that keyword is to buffer memory storehouse or DNS data base querying domain name mapping result according to the domain name of request analysis.
That is, to have in the buffer memory storehouse determining dns server or DNS database or in process without domain name mapping result, in fact comprise following two steps, first dns server inquires about the domain name mapping result whether having and match with the domain name of request analysis in buffer memory storehouse, if the result do not matched with the domain name of request analysis in the buffer memory storehouse of dns server, then inquire about the domain name mapping result whether having and match from the DNS database of itself.If have the domain name mapping result matched with the domain name of request analysis in the buffer memory storehouse of dns server or DNS database, then directly enter step S150, in domain name mapping result, choose domain name mapping result return to browser of mobile terminal.
Wherein, whether have in the process of the domain name mapping result matched with the domain name of request analysis in the buffer memory storehouse or DNS data stock of inquiry dns server, the data format of domain name mapping result in buffer memory storehouse or DNS database is: domain name _ result+IP_ result+life span ttl_ result+location _ result+place operator.
Such as, the domain name of the browser of mobile terminal request analysis in a Unicom Guangdong Branch net is had to be: www.sina.com.cn, the data format of the domain name mapping result so matched with this domain name in buffer memory storehouse is: www.sina.com.cn_218.30.21.65_600_ Guangdong _ UNICOM.Domain name mapping result is returned to browser of mobile terminal by the data format preset by dns server, and the form preset i.e. the data format of domain name mapping result in buffer memory storehouse, therefore, the domain name www.sina.com.cn of the browser of mobile terminal request analysis in Unicom Guangdong Branch net returns results as www.sina.com.cn_218.30.21.65_600_ Guangdong _ UNICOM.
In a particular embodiment of the present invention, if dns server does not inquire the domain name mapping result matched with the domain name of request analysis in buffer memory storehouse or DNS database, then form Bind caching server group by multiple Bind caching server, and each Bind caching server obtains domain name mapping result by the circuit of an operator of this region to public network dns server.
That is, if do not inquire the domain name mapping result matched in the buffer memory storehouse or DNS database of dns server itself, then by multiple buffer memory DNS example, namely on a dns server, run multiple identical program, initiate inquiry to public network DNS.Wherein, dns server initiates standard DNS queries by the self-built Bind caching server of many groups in the middle of multiple region simultaneously, and the self-built Bind caching server of in the middle of multiple region many groups is to the circuit of the different operators by this region to public network nslookup analysis result.
In embodiments of the invention, browser of mobile terminal may send multiple domain name mapping request simultaneously, browser of mobile terminal also may send the analysis request of some domain names from multiple dimension simultaneously, such as: browser of mobile terminal sends 10 domain name mapping requests by the network of movement simultaneously, send request from 3 dimensions simultaneously, here 3 dimensions refer to that user habit, navigation page are placed, historical record three aspects, and therefore dns server receives 30 domain name mapping requests simultaneously.Simultaneously due to dns server should be self-built by many groups in the middle of multiple region Bind caching server initiation standard DNS queries, inquired about to public network to the circuit of the different operators by this region by the Bind caching server that many groups in the middle of multiple region are self-built again, the domain name mapping result that so dns server likely obtains is made up of multiple analysis results of multiple domain name.
That is dns server can receive the multiple analysis results under a domain name simultaneously, and the domain name mapping result obtained when there is requested twice of same domain name, or the identical analysis result that same domain name obtains on different circuit.Therefore, before domain name mapping result is returned to browser of mobile terminal by dns server, also comprise that to carry out domain name to domain name mapping result be the process of uniquely identified duplicate removal, namely ensure the analysis result not have repetition in the analysis result of a domain name.In a specific embodiment of the present invention, by web interface, the analysis result repeated is removed.Wherein, this web interface is write by nginxscrIPt technology, and interface specification is:
Request:domain1_ evades IP1; Domain1_IP2.Wherein evade IP when referring to that requirement returns IP, do not return identical IP, only return other result.
After duplicate removal, by analysis result merge, namely same domain name from different route or by the analysis result that different approaches obtains carry out mergings classification.Wherein, choosing domain name mapping result at dns server returns in the process of browser of mobile terminal, the operator that the availability (namely whether domain name mapping often makes mistakes) of the region that browser of mobile terminal is originated according to domain name mapping result, domain name mapping result and domain name mapping result are originated, determine domain name mapping result, and this result is returned to browser of mobile terminal.
In order to describe the processing procedure of web interface at server end in detail, for the flow chart of data processing shown in Fig. 2, in the processing procedure of server end, more detailed explanation is done to web interface of the present invention below.
As shown in Figure 2, first, browser of mobile terminal sends domain name mapping request S210 in the post mode of http.
As an example of the present invention, browser of mobile terminal sends multiple domain name mapping request simultaneously.
Such as: www.uc.cn_61.144.131.222; Www.sina.cn_61.145.111.111;
Dns server breaks to request content, makes it to become each domain name and independently ask as step S220 after receiving the domain name mapping request that browser of mobile terminal sends.Such as, above-mentioned request is split as: www.uc.cn_61.144.131.222 and www.sina.cn_61.145.111.111.
Cyclic query process is entered after the request content of dns server to browser of mobile terminal breaks.First enter step S230, the domain name of browser of mobile terminal request analysis as keyword, is inquired about the domain name mapping result whether having and match with the domain name of request analysis by dns server in the buffer memory storehouse of dns server.In an example of the present invention, the domain name of browser of mobile terminal request analysis is www.uc.com, first dns server is whether have the domain name mapping result matched in the buffer memory storehouse of keyword query itself with www.uc.com, if do not had, then enter step S240, call jsp module, in S250, then inquire about in DNS database the domain name mapping result whether existing and match.
After dns server is inquired about in buffer memory storehouse own or DNS database, if have the domain name mapping result matched with the domain name of request in buffer memory storehouse or DNS database, so dns server takes out domain name mapping result temporary, amalgamation result after all circulations terminate; If dns server inquires about the domain name mapping result less than matching with request domain name from buffer memory storehouse itself or DNS database, then enter step S260 and initiate inquiry request by Bind caching server group to public network DNS, and by region matching process, Query Result is saved in buffer memory storehouse; If public network DNS still inquires about the surplus result less than matching with request domain name, then return failure result S270, otherwise return successful result S280.
Wherein, initiating inquiry request and receiving record by calling Bind caching server group to public network DNS, obtaining multiple queries result, under namely obtaining a domain name, the analysis result above different circuit.Wherein, each Bind caching server initiates inquiry by the circuit of an operator of this region to public network DNS.
In a specific embodiment of the present invention, Bind caching server group initiates inquiry request by the Bind caching server group that Guangdong, Shanghai, Beijing and four, Chengdu are local respectively simultaneously, wherein, there are 3 Bind caching servers in each place, and these 3 Bind caching servers are responsible for telecommunications, UNICOM respectively and are moved the inquiry of this three large operator.So in this inquiry, the Query Result of Bind caching server group just has 12, and may have multiple ip in each result, the website of these ip normally target domain name is used for doing DNS poll, realizes load balancing.
The multiple domain name mapping results inquired are sent to dns server by Bind caching server group, in the buffer memory storehouse that the domain name mapping result received is stored in dns server by dns server or DNS database.Wherein, according to inquiry with operator's classification, dns server by region matching process by the domain name mapping result classified and stored that receives in the buffer memory storehouse or DNS database of dns server.
In specific embodiment of the invention, region matching process comprises, the IP of browser of mobile terminal is mated with the region table of comparisons and the IMEI of browser of mobile terminal is mated with the operator table of comparisons, with region and operator belonging to the domain name obtaining browser of mobile terminal request analysis.
Because the website of target domain name is in order to realize load balancing, usually multiple IP can be adopted to do DNS poll, therefore by route inquiry in a region to IP corresponding to the domain name of this request analysis also may have multiple, namely the corresponding multiple domain name mapping result of domain name is after receiving and returning results, first dns server gathers the result that returned by self-built Bind server group and the domain name mapping result by recording in own cache storehouse and DNS storehouse, then duplicate removal process can be carried out to result, namely the result removing the identical IP in analysis result under same domain name is merged into a result, the region that further dns server is originated by domain name mapping result, the operator that the availability (namely whether domain name mapping often makes mistakes) of domain name mapping result and domain name mapping result are originated, determine domain name mapping result, and this result is returned to browser of mobile terminal, i.e. step S280.
By the inquiry of Bind caching server group, just can realize the inquiry of the many records of single domain name, under namely can inquiring about a domain name simultaneously, the analysis result on different circuit, even if like this one of them circuit query less than, also can by All other routes inquiry obtain analysis result.
Corresponding with said method, the invention provides a kind of mobile Internet dns server based on Transmission Control Protocol, Fig. 3 shows the block diagram of the mobile Internet dns server based on Transmission Control Protocol according to the embodiment of the present invention.
As shown in Figure 3, the mobile Internet dns server 300 based on Transmission Control Protocol provided by the invention comprises domain name receiving element 310, judging unit 320, analysis result acquiring unit 330, analysis result receiving element 340 and analysis result and returns unit 350.
Wherein, the domain name mapping request that domain name receiving element 310 is sent by Transmission Control Protocol for dns server mobile terminal receive browser, wherein, this dns server is based on the dns server in the mobile Internet of TCP; Judging unit 320 is for determining in the buffer memory storehouse of dns server or DNS database without the domain name mapping result matched with this domain name; Analysis result acquiring unit 330 is for the Bind caching server group initiated domain name analysis request of dns server at least one region, and wherein, Bind caching server group passes through the route of the different operators of region to the request of public network DNS initiated domain name analysis; Analysis result receiving element 340 receives the domain name mapping result returned by public network DNS sent by Bind caching server group for dns server; Analysis result returns unit 350 and chooses domain name mapping result for dns server and return to browser of mobile terminal.
Wherein, judging unit 320 is also for determining there is the domain name mapping result matched with domain name in the buffer memory of dns server or DNS database, then return unit 350 by analysis result, domain name mapping result will be chosen in this domain name mapping result, and return to browser of mobile terminal.
Wherein, in analysis result acquiring unit 330, Bind caching server group is made up of multiple Bind caching server, and each Bind caching server obtains domain name mapping result by the circuit of an operator of this region to public network dns server.
In addition, this dns server also comprises memory cell (not shown), for dns server by the domain name mapping result received by region matching process by the domain name mapping result classified and stored that receives in the buffer memory storehouse or DNS database of dns server.
Mobile Internet dns server based on TCP provided by the invention and analytic method thereof, by designing one based on the dns server in the mobile Internet of Transmission Control Protocol, change original udp protocol into Transmission Control Protocol, dns server is realized not by the impact of mobile network environment fluctuation by the link pledge system of Transmission Control Protocol, and the Bind caching server self-built by many groups in the middle of multiple region initiates standard DNS queries, realize the many record queries of single domain name, under a domain name can be inquired about simultaneously, analysis result on different circuit, avoid legacy DNS server can only return the defect of a circuit result, thus the availability of dns server and stability when promoting web page browsing.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the specific works process of the unit of foregoing description, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
Those of ordinary skill in the art can recognize, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with the combination of electronic hardware or computer software and electronic hardware.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
Describe in an illustrative manner according to the mobile Internet domain name analytic method based on Transmission Control Protocol of the present invention and dns server above with reference to accompanying drawing.But, it will be appreciated by those skilled in the art that the mobile Internet domain name analytic method based on Transmission Control Protocol and dns server that the invention described above is proposed, various improvement can also be made on the basis not departing from content of the present invention.Therefore, protection scope of the present invention should be determined by the content of appending claims.