CN109922120A - Improve the method and terminal of DNS availability - Google Patents

Improve the method and terminal of DNS availability Download PDF

Info

Publication number
CN109922120A
CN109922120A CN201811501909.XA CN201811501909A CN109922120A CN 109922120 A CN109922120 A CN 109922120A CN 201811501909 A CN201811501909 A CN 201811501909A CN 109922120 A CN109922120 A CN 109922120A
Authority
CN
China
Prior art keywords
dns
dns server
response results
alternative
received
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.)
Granted
Application number
CN201811501909.XA
Other languages
Chinese (zh)
Other versions
CN109922120B (en
Inventor
陈东毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201811501909.XA priority Critical patent/CN109922120B/en
Publication of CN109922120A publication Critical patent/CN109922120A/en
Application granted granted Critical
Publication of CN109922120B publication Critical patent/CN109922120B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Hardware Redundancy (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present embodiments relate to technical field of domain name resolution, disclose a kind of method and terminal for improving DNS availability.In the embodiment of the present invention, the method for improving DNS availability includes: to initiate DNS request respectively to preset primary dns server and alternative DNS server;If judging the response results for receiving primary dns server in time threshold, then, when the response results of primary dns server are available, using the response results of primary dns server as the corresponding domain name mapping result of DNS request, when the response results of primary dns server are unavailable, using the response results of the alternative DNS server received as the corresponding domain name mapping result of DNS request.The embodiment of the invention also provides a kind of terminals.Technical solution provided in an embodiment of the present invention, while guaranteeing resolution speed, it is ensured that the preferential parsing result for using primary dns server guarantees the dns resolution scheduling inside operator.

Description

Improve the method and terminal of DNS availability
Technical field
The present embodiments relate to technical field of domain name resolution, in particular to a kind of method for improving DNS availability and end End.
Background technique
DNS (Domain Name System, domain name system), one mutually mapped as domain name and IP address on WWW A distributed data base is able to use family and more easily accesses internet, remembers can be directly read by machine without spending IP number string.By domain name, the process for finally obtaining the corresponding IP address of the domain name is called domain name mapping (or hostname resolution).
When dns server exception or configuration error etc., when domain name mapping being caused to fail, terminal can not be obtained correctly IP is corresponded to domain name, will result in access failure, user can not correctly obtain resource.It is current to improve dns resolution success rate master There is following two method: scheme 1, when the original dns resolution failure of user, is parsed using spare DNS;Scheme 2, when When the original dns resolution of user fails, the DNS that modification user uses uses spare DNS as main DNS.
Inventor discovery at least there are the following problems in the prior art: at present improve dns resolution success rate method or In domain name mapping failure, user needs to wait spare parsing time or with may changing the original dns server of user Location, cause DNS scheduling result poor and some operators inside domain name can not parse.
Summary of the invention
Embodiment of the present invention is designed to provide a kind of method and terminal for improving DNS availability, so that guaranteeing While resolution speed, it is ensured that the preferential parsing result for using primary dns server guarantees the dns resolution tune inside operator Degree.
In order to solve the above technical problems, embodiments of the present invention provide a kind of method for improving DNS availability, packet It includes: initiating DNS request respectively to preset primary dns server and alternative DNS server;Judge be in preset time threshold The no response results for receiving the primary dns server;If receiving the sound of the primary dns server in the time threshold It answers as a result, then, when the response results of the primary dns server are available, using the response results of the primary dns server as institute The corresponding domain name mapping of DNS request is stated as a result, when the response results of the primary dns server are unavailable, the institute that will be received The response results of alternative DNS server are stated as the corresponding domain name mapping result of the DNS request.
Embodiments of the present invention additionally provide a kind of terminal, comprising: at least one processor;And with it is described at least The memory of one processor communication connection;Wherein, the memory be stored with can by least one described processor execute Instruction, described instruction is executed by least one described processor, so that at least one described processor is able to carry out above-mentioned raising The method of DNS availability.
Embodiments of the present invention additionally provide a kind of computer readable storage medium, are stored with computer program, described The method of above-mentioned raising DNS availability is realized when computer program is executed by processor.
Embodiment of the present invention in terms of existing technologies, is initiated respectively to primary dns server and alternative DNS server DNS request, and a time threshold has been preset, if receiving the response results of primary dns server in time threshold, The response results that primary dns server is used in the available situation of the response results, only in the not available situation of the response results The lower response results for just using alternative DNS server guarantee the parsing result for preferentially using primary dns server, guarantee operation Dns resolution scheduling inside quotient;Simultaneously as DNS request is initiated respectively to primary dns server and alternative DNS server, because This, alternative DNS server can as quickly as possible feedback response as a result, when receiving primary dns server in time threshold When response results are unavailable, the response results of alternative DNS server can be received and used as quickly as possible, to guarantee to understand Analyse speed.
In addition, if not receiving the response results of the primary dns server in the time threshold, when described The response results that the response results of the alternative DNS server and the alternative DNS server are had received in time threshold are When available, using the response results of the alternative DNS server as the corresponding domain name mapping of the DNS request as a result, when in institute When stating the response results for not receiving the alternative DNS server in time threshold, judge first to connect after the time threshold Whether the response results of the dns server received can be used;If the response results of the dns server first received are available, Using the response results of the dns server first received as the corresponding domain name mapping result of the DNS request;If first receiving The response results of the dns server arrived are unavailable, then the response results of the server received after are as described in The corresponding domain name mapping result of DNS request;Wherein, the dns server is the primary dns server or the spare DNS clothes Business device;When the response results and the spare DNS server for receiving the alternative DNS server in the time threshold Response results be it is unavailable, using the response results of the primary dns server received after the time threshold as described in The corresponding domain name mapping result of DNS request.Present embodiments provide for the sound for not receiving primary dns server in time threshold Answer a kind of specific implementation when result.
In addition, if receive the response results of the primary dns server in the time threshold, and work as the main DNS When the response results of server are unavailable, further includes: judge that the response results of the alternative DNS server received whether may be used With;If the response results of the alternative DNS server received are available, enter the spare DNS that will be received The response results of server are as the corresponding domain name mapping result of the DNS request;If the alternative DNS server received Response results it is unavailable, then using the response results of the primary dns server as the corresponding domain name mapping knot of the DNS request Fruit.In the present embodiment, in the response results of primary dns server and all not available situation of the response results of alternative DNS server Under, or select using the response results of primary dns server as the corresponding domain name mapping of DNS request as a result, can equally make In the case where at access failure, or preferably access path, the time that such user is unsuccessfully fed back can be shorter for selection (if access fails, and can show error in terminal, and at this moment user may know that this access failure).
In addition, the quantity of the preset alternative DNS server is multiple;It is described to preset primary dns server and standby DNS request is initiated respectively with dns server, specifically: Xiang Suoshu primary dns server and multiple alternative DNS servers point It Fa Qi not DNS request;Whether the response results for judging the alternative DNS server received can be used, specifically, judgement Whether at least one is available in the response results of the multiple alternative DNS servers received;If the multiple institutes received It is available to state at least one in the response results of alternative DNS server, then the spare DNS server that will be received Response results as the corresponding domain name mapping of the DNS request as a result, specifically, one of them is available described spare The response results of dns server are as the corresponding domain name mapping result of the DNS request;If what is received is multiple described spare The response results of dns server are all unavailable, then enter and request the response results of the primary dns server as the DNS The step of corresponding domain name mapping result.In present embodiment, multiple alternative DNS servers are preset, DNS can be improved Request is parsed into power.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the flow chart of the method for the raising DNS availability of first embodiment according to the present invention;
Fig. 2 is the flow chart of the method for the raising DNS availability of second embodiment according to the present invention;
Fig. 3 is the flow chart of the method for the raising DNS availability of third embodiment according to the present invention;
Fig. 4 is the flow chart of the method for the raising DNS availability of the 4th embodiment according to the present invention;
Fig. 5 is the block diagram of the terminal of the 5th embodiment according to the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.
The first embodiment of the present invention is related to a kind of methods for improving DNS availability, including, it is taken to preset main DNS Business device and alternative DNS server initiate DNS request;Judge the main DNS service whether is received in preset time threshold The response results of device;If receiving the response results of primary dns server in preset time threshold, work as primary dns server Response results it is available when, using the response results of primary dns server as the corresponding domain name mapping of the DNS request as a result, working as When the response results of primary dns server are unavailable, asked the response results of the alternative DNS server received as the DNS Seek corresponding domain name mapping result.
Present embodiment initiates DNS in terms of existing technologies, to primary dns server and alternative DNS server respectively Request, and a time threshold has been preset, if receiving the response results of primary dns server in time threshold, in the sound The response results that primary dns server is used in the available situation of result are answered, only in the not available situation of the response results Using the response results of alternative DNS server, that is, guarantees the parsing result for preferentially using primary dns server, guarantee in operator The dns resolution in portion is dispatched;Simultaneously as DNS request is initiated respectively to primary dns server and alternative DNS server, it is therefore, standby With dns server can as quickly as possible feedback response as a result, when the response knot that receive in time threshold primary dns server When fruit is unavailable, the response results of alternative DNS server can be received and used as quickly as possible, to ensure that parsing speed Degree.
The realization details of the method for the raising DNS availability of present embodiment is specifically described below, it is interior below Hold only for convenience of the realization details provided is understood, not implements the necessary of this programme.
Fig. 1 is the flow chart of the method for the raising DNS availability of present embodiment, specifically includes following steps.
Step 101, DNS request is initiated respectively to preset primary dns server and alternative DNS server.
The method of the raising DNS availability of the present embodiment is applied to terminal, such as mobile phone.When the need for receiving user's input When the domain name to be accessed, terminal inner generates domain name mapping and requests DNS request.Specifically, terminal includes guiding module and DNS generation Module is managed, DNS request is drained into DNS for filtering out DNS request from the various requests that terminal generates by guiding module Proxy module.Terminal inner prestores the address of primary dns server and the address of alternative DNS server, and DNS proxy module can be with DNS request is sent to primary dns server and alternative DNS server simultaneously.
Wherein, guiding module described here and DNS proxy module, are all functional modules, and each functional module is ok It is interpreted as one section of program instruction, the corresponding function of each functional module can be realized in each section of program instruction after processor executes.
Step 102, judge the response results that primary dns server whether is received in preset time threshold;If so, Enter step 103;If it is not, then entering step 104.
Step 103, judge whether the response results of primary dns server can be used;If it is not, then entering step 110;If so, Enter step 106;
Step 104, judge the response results that alternative DNS server whether is had received in time threshold;If so, into Enter step 105, if it is not, then entering step 107;
Step 105, judge whether the response results of the alternative DNS server received can be used;If so, entering step 111;If it is not, then entering step 112;
Step 106, using the response results of primary dns server as the corresponding domain name mapping result of DNS request.
Step 107, judge whether the response results of the dns server first received after time threshold can be used;If available, Then enter step 108;If unavailable, 109 are entered step.
Wherein, dns server is primary dns server or alternative DNS server;
Step 108, using the response results of the dns server first received as the corresponding domain name mapping result of DNS request;
Step 109, the response results of the server received after are as the corresponding domain name mapping result of DNS request;
Step 110, using the response results of the alternative DNS server received as the corresponding domain name mapping knot of DNS request Fruit;
Step 111, using the response results of alternative DNS server as the corresponding domain name mapping result of DNS request.
Step 112, corresponding using the response results of the primary dns server received after time threshold as DNS request Domain name mapping result.
A time threshold is preset in terminal, that is, terminal is sent out respectively to primary dns server and alternative DNS server Start timing after playing DNS request, in timing arrival time threshold value, if receiving the response results of primary dns server, says The response of bright primary dns server, which may be considered, compares timely, at this point, paying the utmost attention to the response results of primary dns server.Tool Body, if (judging result of step 103 is yes) can be used in the response results of primary dns server, just main DNS is serviced The response results of device are as the corresponding domain name mapping result (step 106) of DNS request;If the response results of primary dns server Unavailable (judging result of step 103 is no), then just using the response results of the alternative DNS server received as DNS Request corresponding domain name mapping result (step 110), it should be noted that in the present embodiment, in step 110, no matter it receives The response results of alternative DNS server whether can be with as the corresponding domain name mapping result of DNS request.
If not receiving the response results of primary dns server in time threshold, illustrate that the response of primary dns server goes out Existing bigger delay, it may be possible to which primary dns server goes wrong or network transmission goes wrong, at this point, in order to obtain as early as possible To the corresponding domain name mapping result of DNS request, it can be determined that whether have received alternative DNS server in time threshold Response results (step 104).
If receiving the response results (judging result of step 104 is yes) of alternative DNS server, what judgement received Whether available (the step 105) of the response results of alternative DNS server.If the response results of the alternative DNS server received are (judging result of step 105 is yes) can be used, then the response results of the alternative DNS server are corresponding as DNS request Domain name mapping result (step 111).The response results of the alternative DNS server received are unavailable (the judgement knot of step 105 Fruit is no), then using the response results of the primary dns server received after time threshold as the corresponding domain of DNS request Name parsing result (step 112).
If receiving the response results (judging result of step 104 is no) of alternative DNS server, time threshold is judged Whether available (the step 107) of the response results of the dns server first received later.If the sound of the dns server first received Should result can be used (judging result of step 107 is yes), then using the response results of the dns server first received as DNS Request corresponding domain name mapping result (i.e. step 108);If unavailable (the step of the response results of the dns server first received Rapid 107 judging result is no), then the response results of the dns server received after are as the corresponding domain name of DNS request Parsing result (step 109).
Dns server described here can be primary dns server or alternative DNS server.Assuming that is first received is The response results of primary dns server, then what is received afterwards is the response results of alternative DNS server;If first receiving main DNS The response results of server are available, then the response results of primary dns server will first be received as the corresponding domain name of DNS request Parsing result;If the response results for first receiving primary dns server are unavailable, then the alternative DNS server received by after Response results as the corresponding domain name mapping result of DNS request.Assuming that is first received is the response knot of alternative DNS server Fruit, then what is received afterwards is the response results of primary dns server;If the response results of the alternative DNS server first received can With then using the response results of the alternative DNS server first received as the corresponding domain name mapping result of DNS request;If first The response results of the alternative DNS server received are unavailable, then the response results of the dns server received after as The corresponding domain name mapping result of DNS request.
In the present embodiment, comprising return code and parsing in the response results of primary dns server or alternative DNS server IP;Judge whether the response results of primary dns server or alternative DNS server can be used, specifically can be such as under type: sentencing Return code in disconnected response results directly determines the response results not if the numerical representation method of return code is that parsing is abnormal It can use;If the numerical representation method of return code is that parsing is normal, it can be determined that the response results are available;Alternatively, working as return code Numerical representation method be parsing it is normal when, further judge whether the IP parsed in response results normal, if it is judged that solve If the IP of precipitation is normal, so that it may determine that the response results are available.
Wherein, when the judging result of step 104 is no, there are two types of possible situations;Situation (1), in time threshold not Receive the response results of alternative DNS server;Situation (2) receives the response knot of alternative DNS server in time threshold The response results of fruit and the alternative DNS server are disabled.For situation (2), due to having been received that this is standby It with the response results of dns server, therefore is only possible to receive the response results of primary dns server after time threshold, i.e., What is first received after time threshold must be the response results of primary dns server.
In addition, in the timing course of time threshold (non-arrival time threshold value), even if first having received spare DNS service The response results of device remain on the response results that wait primary dns server to be received, until the timing of time threshold terminates (to arrive Up to time threshold);The judging result of step 102 can just be made;I.e. if there is following situations, the response of alternative DNS server As a result it is received in time threshold with the response results of primary dns server, and the response results of alternative DNS server connect Prior to the receiving time of the response results of primary dns server between time receiving, then, the judging result of step 102, which remains as, is.
In present embodiment, time threshold be may be set according to actual conditions, for example, time threshold can be set as just The maximum duration of the response results of primary dns server is received under reason condition (network is normal, primary dns server is normal etc.).
After terminal has determined the corresponding domain name mapping result of DNS request, it can be carried out according to the domain name mapping result subsequent Business processing;It include the corresponding IP of the domain name in domain name mapping result, terminal can be according to IP that is, including domain name in DNS request Access Resource Server.
Wherein, primary dns server is usually the dns server that operator distributes automatically after consumer wideband dialing, this DNS The network of server cooperation operator can generally guarantee that preferably access experience, such as operator's Intranet deploy some domain The domain name mapping to this CDN node is improved access body by the CDN node etc. of name corresponding server, the dns server of operator It tests, so ordinary circumstance wishes the dns server (i.e. primary dns server) preferentially distributed automatically using operator.Spare DNS The dns server of in addition public network that server is usually chosen, scheduling is so accurate unlike the dns server of operator, and having can The domain name mapping can be serviced to the server outside this operator, access experience may be poor.The scheme of the present embodiment It ensure that the preferential parsing result for using primary dns server, it can guarantee preferentially dispatches the dns resolution of operator, no It only ensure that resolution speed, can also guarantee preferably access experience as far as possible.
Preferably, when judging not receive the response results of primary dns server in time threshold, i.e., in step When 102 judging result is no, it can also include step, generate the prompt information in characterization response.Specifically, in time threshold When not receiving the response results of primary dns server inside, there are following situations, and situation one has received standby in time threshold With the response results of dns server, and using the response results of alternative DNS server as domain name mapping as a result, to access (judging result of step 104 is yes, and is entered step 105);Situation two does not receive spare DNS service in time threshold The response results of device, then using the available response results of first received dns server as domain name mapping after time threshold As a result, to access, (judging result of step 104 is no, and is entered step 107).In situation one, taken with spare DNS The response results of business device access, and access path access path corresponding compared to the response results of primary dns server must Surely can be long, therefore access time can be longer;And in situation two, the sound of dns server is just received after time threshold It answers as a result, receive the waiting time of the response results of dns server long (can not receive compared in time threshold The response results of dns server), therefore either situation one or situation two, compared to receiving main DNS in time threshold The response results of server, and accessed using the response results of primary dns server, it can all consume a longer time, Yong Huke Can because wait it is too long, with to go wrong and the turn-off request page.Wherein, the prompt information in characterization response for example can be with It is the printed words for showing " making great efforts to load, patience is asked to wait until ".
It should be noted that in other embodiments, if not receiving the sound of primary dns server in time threshold It answers as a result, the response results of the alternative DNS server received can be directly used when the judging result of i.e. step 102 is no; That is, the response results regardless of alternative DNS server are received in the time threshold or are received outside the time threshold It arrives, and the response results regardless of whether receiving primary dns server after the time threshold, can all be taken using spare DNS The response results of business device are as the corresponding domain name mapping result of DNS request.
Second embodiment of the present invention is related to a kind of method for improving DNS availability.Second embodiment is real with first It is roughly the same to apply mode, is in place of the main distinction: in second embodiment of the invention, if received in time threshold The response results of main DNS server, and the response results of primary dns server are unavailable, and the response knot of alternative DNS server Fruit is also unavailable, then or using the response results of primary dns server as the corresponding domain name mapping result of DNS request.
It is illustrated in figure 2 the flow chart of the method for the raising DNS availability of second embodiment, wherein step 201~ 209,211,213~214 is roughly the same with step 101~112 in Fig. 1, and details are not described herein again;The difference is that this reality Applying example further includes step 210;
Step 210, judge whether the response results of the alternative DNS server received can be used;If so, entering step 211;If it is not, then entering step 212.
Step 212, using the response results of primary dns server as the corresponding domain name mapping result of DNS request.
That is, judging to receive standby when the response results of the primary dns server received in time threshold are unavailable Whether can be used with the response results of dns server;If the response results of alternative DNS server are also unavailable, or will The response results of primary dns server are as the corresponding domain name mapping result of DNS request.
It is all not available in the response results of primary dns server and the response results of alternative DNS server in the present embodiment In the case of, or select using the response results of primary dns server as the corresponding domain name mapping of DNS request as a result, can be to avoid The dns resolution of terminal is arrived in excessive intervention;When cannot provide better parsing result, holding user is original as far as possible Parsing result prevents from bringing other possible problems (such as the failure cause that returns not parity problem).
Third embodiment of the present invention is related to a kind of method for improving DNS availability.Third embodiment is real with second It is roughly the same to apply mode, be in place of the main distinction: in third embodiment of the invention, alternative DNS server includes multiple.
It is illustrated in figure 3 the flow chart of the method for the raising DNS availability of third embodiment, wherein step 302~ 303,306~309,312,314 in Fig. 2 step 202~203,206~209,212, it is 214 roughly the same, herein no longer It repeats;The difference is that
Step 301 specifically, initiate DNS request to primary dns server and multiple alternative DNS servers respectively;
Step 304 is specifically, judge the response for whether having received at least one alternative DNS server in time threshold As a result;
Step 305 specifically, in the response results of multiple alternative DNS servers that judgement receives whether at least one It can use;
Step 313 is specifically, corresponding using the response results of one of them available alternative DNS server as DNS request Domain name mapping result;
Step 310 specifically, in the response results of multiple alternative DNS servers that judgement receives whether at least one It can use;
Step 311 is specifically, corresponding using the response results of one of them available alternative DNS server as DNS request Domain name mapping result.
Due to there is multiple alternative DNS servers, in step 305, as long as judging that there are a spare DNS clothes The response results of business device are available, then can be using the response results of alternative DNS server as the corresponding domain name of DNS request That is, within step 306 parsing result selects the response results of one of them available alternative DNS server to request as DNS Corresponding domain name mapping result.In present embodiment, multiple alternative DNS servers have been preset, DNS request can be improved Be parsed into power.
Preferably, priority can be set to multiple standby servers, if there is the response knot of multiple alternative DNS servers Fruit is available, can choose the response results of the higher standby server of priority.Wherein it is possible to according to each standby server for The corresponding access path length of the IP that the DNS request of the terminal parses to set priority for each standby server, parses The corresponding access path of IP it is shorter, then the priority of the standby server is higher.
It should be noted that present embodiment is also possible to improvement on the basis of first embodiment.
Of the invention the 4th applies mode and is related to a kind of method for improving DNS availability.4th embodiment is implemented with first Mode is roughly the same, is in place of the main distinction: in four embodiment of the invention, having preset a delay time, if Again without the response results for receiving the dns server in delay time after the time threshold, then indicating delay too Long, the prompt information of characterization access error is generated.
It is illustrated in figure 4 the flow chart of the method for the raising DNS availability of the 4th embodiment, wherein step 401~ 406,409~414 is roughly the same with step 101~112 in Fig. 1, and details are not described herein again;The difference is that in step When 404 judging result is no, 407 are entered step;
Step 407: judging the response knot of the dns server whether received in the delay time after time threshold Fruit.If it is not, then step 408;If so, step 409;
Step 408: generating the prompt information of characterization access error.
Wherein, which can set according to practical experience, for example, during multiple actual access can be counted, The waiting time that user when access error situation occurs can select maximum value from the multiple waiting time or calculate multiple etc. To the average value of time, as the summation of time threshold and delay time, to calculate delay time;It is only for example herein It is bright, it is not limited thereto.
In present embodiment, user can be notified to access failure in time, and after avoiding user from waiting the long period always still So obtain the result of access failure.
It should be noted that present embodiment can also be that is carried out on the basis of second or third real-time mode changes Into.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection scope of this patent It is interior;To adding inessential modification in algorithm or in process or introducing inessential design, but its algorithm is not changed Core design with process is all in the protection scope of the patent.
Fifth embodiment of the invention is related to a kind of terminal, as shown in Figure 5, comprising:
At least one processor 51;And
With the memory 52 of at least one described processor 51 communication connection;Wherein,
The memory 52 is stored with the instruction that can be executed by least one described processor 51, described instruction by it is described extremely A few processor 51 executes, so that at least one described processor 51 is able to carry out above method embodiment.
The terminal can also include: input unit 53 and output device 54.
Wherein, processor 51, memory 52, input unit 53 and output device 54 can pass through bus or other modes It connects, in Fig. 5 for being connected by bus.Bus may include the bus and bridge of any number of interconnection, and bus is by one Or the various circuit connections of multiple processors 51, memory 52, input unit 53, output device 54 are together.Bus can be with By such as peripheral equipment, voltage-stablizer together with various other circuit connections of management circuit or the like, these are all these Well known to field, therefore, it will not be further described herein.Bus interface is provided between bus and transceiver and is connect Mouthful.Transceiver can be an element, is also possible to multiple element, such as multiple receivers and transmitter, provides for passing The unit communicated on defeated medium with various other devices.The data handled through processor 51 are carried out on the radio medium by antenna Transmission, further, antenna also receives data and transfers data to processor 51.
Processor 51 is responsible for management bus and common processing, can also provide various functions, including timing, periphery connects Mouthful, voltage adjusting, power management and other control functions.
Memory 52 is used as a kind of non-transient computer readable storage medium, can be used for storing non-transient software program, non- Transient computer executable program and module, the non-transient software journey that processor 51 is stored in memory 52 by operation Sequence, instruction and module, thereby executing the various function application and data processing of server.
Memory 52 may include storing program area and storage data area, wherein storing program area can storage program area, Application program required at least one function;Storage data area can store the use institute according to the processing unit of list items operation The data etc. of creation.In addition, memory 52 may include high-speed random access memory 52, it can also include non-transient memory 52, a for example, at least magnetic disk storage 52, flush memory device or other non-transient solid-state memories 52.In some implementations In example, optional memory 52 includes the memory 52 remotely located relative to processor 51, these remote memories 52 can lead to Network connection is crossed to processor 51.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, movement Communication network and combinations thereof.
Input unit 53 can receive the number or character information of input, and generation has with user setting and function control The key signals of pass input.Output device 54 may include that display screen etc. shows equipment.
In the present embodiment, when the one or more modules stored in memory 52 are by one or more of processors 51 When execution, processor 51 executes above-mentioned any means embodiment
Method provided by the embodiment of the present application can be performed in the said goods, has the corresponding functional module of execution method and has Beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present application.
Sixth embodiment of the invention is related to a kind of computer readable storage medium, is stored with computer program.Computer Above method embodiment is realized when program is executed by processor.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are to make It obtains an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) executes side described in each embodiment of the application The all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read- Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can be with Store the medium of program code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (10)

1. a kind of method for improving DNS availability characterized by comprising
DNS request is initiated respectively to preset primary dns server and alternative DNS server;
Judge the response results that the primary dns server whether is received in preset time threshold;
If receiving the response results of the primary dns server in the time threshold, when the primary dns server When response results can be used, using the response results of the primary dns server as the corresponding domain name mapping of the DNS request as a result, When the response results of the primary dns server are unavailable, using the response results of the alternative DNS server received as The corresponding domain name mapping result of the DNS request.
2. the method according to claim 1 for improving DNS availability, which is characterized in that the method also includes:
If not receiving the response results of the primary dns server in the time threshold,
When the response results and the alternative DNS server for having received the alternative DNS server in the time threshold Response results when being available, using the response results of the alternative DNS server as the corresponding domain name mapping of the DNS request As a result;
When not receiving the response results of the alternative DNS server in the time threshold, judge in the time threshold Whether the response results of the dns server first received after value can be used;If the response knot of the dns server first received Fruit is available, then using the response results of the dns server first received as the corresponding domain name mapping knot of the DNS request Fruit;If the response results of the dns server first received are unavailable, the response knot of the server received by after Fruit is as the corresponding domain name mapping result of the DNS request;Wherein, the dns server is the primary dns server or described Alternative DNS server;
When the response results and the alternative DNS server for receiving the alternative DNS server in the time threshold When response results are unavailable, using the response results of the primary dns server received after the time threshold as described in The corresponding domain name mapping result of DNS request.
3. the method according to claim 1 for improving DNS availability, which is characterized in that if inscribed in the time threshold The response results for receiving the primary dns server, when the response results of the primary dns server are unavailable, further includes:
Judge whether the response results of the alternative DNS server received can be used;
If the response results of the alternative DNS server received are available, enter the spare DNS that will be received The response results of server are as the corresponding domain name mapping result of the DNS request;
If the response results of the alternative DNS server received are unavailable, by the response results of the primary dns server As the corresponding domain name mapping result of the DNS request.
4. the method according to claim 3 for improving DNS availability, which is characterized in that the preset spare DNS service The quantity of device is multiple;
It is described to initiate DNS request respectively to preset primary dns server and alternative DNS server, specifically: to the main DNS Server and multiple alternative DNS servers initiate DNS request respectively;
Whether the response results for judging the alternative DNS server received can be used, specifically, judging to receive more Whether at least one is available in the response results of a alternative DNS server;
If at least one in the response results of the multiple alternative DNS servers received is available, described to receive The alternative DNS server response results as the corresponding domain name mapping of the DNS request as a result, specifically, will wherein The response results of one available alternative DNS server are as the corresponding domain name mapping result of the DNS request;
If the response results of the multiple alternative DNS servers received are all unavailable, enter the primary dns server Response results corresponding as the DNS request domain name mapping result the step of.
5. the method according to claim 4 for improving DNS availability, which is characterized in that multiple alternative DNS servers It has been set priority;
It is described using the response results of one of them available alternative DNS server as the corresponding domain name of the DNS request Parsing result, specifically, being to select the higher spare DNS of priority in the available alternative DNS server from response results The response results of server are as the corresponding domain name mapping result of the DNS request.
6. the method according to claim 2 for improving DNS availability, which is characterized in that do not connect in the time threshold When receiving the response results of the primary dns server, further includes:
Generate the prompt information in characterization response.
7. it is according to claim 2 improve DNS availability method, which is characterized in that when in the time threshold not When receiving the response results of the alternative DNS server, and first received after the time threshold in the judgement Before whether the response results of dns server are available, further includes:
Judge the response knot of the dns server whether received in the preset delay time after the time threshold Fruit;If so, whether may be used into the response results for judging the dns server first received after the time threshold With;If it is not, then generating the prompt information of characterization access error.
8. the method according to claim 1 for improving DNS availability, which is characterized in that described described standby by what is received Use the response results of dns server as the corresponding domain name mapping of the DNS request as a result, specifically:
The response results that the alternative DNS server whether has been received in the time threshold are judged, if so, will connect The response results of the alternative DNS server received are as the corresponding domain name mapping result of the DNS request;If it is not, then after It is continuous to wait until the response results for receiving the alternative DNS server, and by the alternative DNS server received Response results are as the corresponding domain name mapping result of the DNS request.
9. a kind of terminal characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one It manages device to execute, so that at least one described processor is able to carry out the raising DNS as described in any in claim 1 to 8 and can be used The method of property.
10. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the computer program is located Reason device realizes the method described in any item of the claim 1 to 8 for improving DNS availability when executing.
CN201811501909.XA 2018-12-10 2018-12-10 Method and terminal for improving DNS availability Active CN109922120B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811501909.XA CN109922120B (en) 2018-12-10 2018-12-10 Method and terminal for improving DNS availability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811501909.XA CN109922120B (en) 2018-12-10 2018-12-10 Method and terminal for improving DNS availability

Publications (2)

Publication Number Publication Date
CN109922120A true CN109922120A (en) 2019-06-21
CN109922120B CN109922120B (en) 2022-04-05

Family

ID=66959813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811501909.XA Active CN109922120B (en) 2018-12-10 2018-12-10 Method and terminal for improving DNS availability

Country Status (1)

Country Link
CN (1) CN109922120B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111049943A (en) * 2019-12-05 2020-04-21 北京小米移动软件有限公司 Method, device, equipment and medium for analyzing domain name
CN112153166A (en) * 2019-06-27 2020-12-29 北京声智科技有限公司 DNS rapid analysis method, device, terminal and medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640679A (en) * 2009-04-13 2010-02-03 山石网科通信技术(北京)有限公司 Domain name resolution agent method and device therefor
CN104052832A (en) * 2014-06-30 2014-09-17 北京金山安全软件有限公司 Method and device for setting IP address of domain name resolution server and server
CN104468244A (en) * 2014-12-31 2015-03-25 北京奇虎科技有限公司 Domain name resolution system disaster recovery construction method and device
CN104539751A (en) * 2014-12-29 2015-04-22 北京奇艺世纪科技有限公司 DNS analyzing system, method and device
CN105306606A (en) * 2014-05-28 2016-02-03 无锡韩光电器有限公司 Domain name analysis method and system
CN105357279A (en) * 2015-10-19 2016-02-24 浪潮电子信息产业股份有限公司 Domain name service (DNS) request message processing method and system
WO2016177276A1 (en) * 2015-05-04 2016-11-10 阿里巴巴集团控股有限公司 Domain name resolution synchronizing method and apparatus
CN106331216A (en) * 2016-09-13 2017-01-11 腾讯科技(深圳)有限公司 Domain name parsing method and domain name parsing device
CN108494891A (en) * 2018-02-28 2018-09-04 网宿科技股份有限公司 A kind of domain name analytic method, server and system
US20180287992A1 (en) * 2015-01-27 2018-10-04 Anchorfree Inc. System And Method For Suppressing DNS Requests
CN108737588A (en) * 2018-03-29 2018-11-02 北京小米移动软件有限公司 Domain name analytic method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640679A (en) * 2009-04-13 2010-02-03 山石网科通信技术(北京)有限公司 Domain name resolution agent method and device therefor
CN105306606A (en) * 2014-05-28 2016-02-03 无锡韩光电器有限公司 Domain name analysis method and system
CN104052832A (en) * 2014-06-30 2014-09-17 北京金山安全软件有限公司 Method and device for setting IP address of domain name resolution server and server
CN104539751A (en) * 2014-12-29 2015-04-22 北京奇艺世纪科技有限公司 DNS analyzing system, method and device
CN104468244A (en) * 2014-12-31 2015-03-25 北京奇虎科技有限公司 Domain name resolution system disaster recovery construction method and device
US20180287992A1 (en) * 2015-01-27 2018-10-04 Anchorfree Inc. System And Method For Suppressing DNS Requests
WO2016177276A1 (en) * 2015-05-04 2016-11-10 阿里巴巴集团控股有限公司 Domain name resolution synchronizing method and apparatus
CN105357279A (en) * 2015-10-19 2016-02-24 浪潮电子信息产业股份有限公司 Domain name service (DNS) request message processing method and system
CN106331216A (en) * 2016-09-13 2017-01-11 腾讯科技(深圳)有限公司 Domain name parsing method and domain name parsing device
CN108494891A (en) * 2018-02-28 2018-09-04 网宿科技股份有限公司 A kind of domain name analytic method, server and system
CN108737588A (en) * 2018-03-29 2018-11-02 北京小米移动软件有限公司 Domain name analytic method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
C86GULI: "DNS服务原理详解", 《简书》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112153166A (en) * 2019-06-27 2020-12-29 北京声智科技有限公司 DNS rapid analysis method, device, terminal and medium
CN111049943A (en) * 2019-12-05 2020-04-21 北京小米移动软件有限公司 Method, device, equipment and medium for analyzing domain name

Also Published As

Publication number Publication date
CN109922120B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
EP3585095A1 (en) Method for controlling quality of service, and device, smf, upf, ue, pcf and an therefor
CN104836800B (en) A kind of method, equipment and the system of service quality control
CN107690149B (en) Method for triggering network policy update, management function entity and core network equipment
CN112953774B (en) Network topology generation method, system, equipment and computer storage medium
CN111901157B (en) Service deployment method, device, equipment and medium based on k8s
CN109922120A (en) Improve the method and terminal of DNS availability
CN106713454A (en) Network connection method and device
CN110399178A (en) A kind of call method of third party's service, device, electronic equipment and storage medium
CN114205342A (en) Routing method, electronic device, medium, and program product for service debugging
CN110381603B (en) Random access method and terminal
CN108337301A (en) Network request processing method, device, server and the storage medium of application program
CN110677475A (en) Micro-service processing method, device, equipment and storage medium
CN110417876A (en) Node server and main control device in session method, distributed system
EP3672203A1 (en) Distribution method for distributed data computing, device, server and storage medium
CN109039694B (en) Global network resource allocation method and device for service
US20240045657A1 (en) System architecture for implementing dds communication based on autosar, communication method, and device
CN116781564B (en) Network detection method, system, medium and electronic equipment of container cloud platform
CN112217845B (en) Data transmission method based on Netconf protocol and related equipment
CN111901245A (en) Iscsi multi-path management system, method, equipment and storage medium
CN111338758A (en) Resource management method and device and electronic equipment
WO2019201111A1 (en) Information processing method, apparatus and device, and computer-readable storage medium
US7962799B2 (en) System and method for synchronizing test runs on separate systems
CN109981725A (en) A kind of communication means across security domain, server and readable storage medium storing program for executing
CN112988405A (en) Micro-service automatic degradation method and device and computing equipment
CN114553965B (en) Scheduling method of intranet equipment, network equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant