Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
All other embodiments obtained without creative efforts, belong to the scope of protection of the invention.
In order to enable those skilled in the art to be easier to understand technical solution provided in an embodiment of the present invention, below to relating to
And to correlation technique simply introduced.
Fig. 1 provides a kind of configuration diagram of network system, as shown in Figure 1, including networking client 11 and network visitor
The first order local domain name server 12 of 11 direct communication of family end, the second level with 14 direct communication of authoritative name server
Name server 13 and the CDN/ADN servers 15 that network service is provided for networking client 11.
What deserves to be explained is above-mentioned first order local domain name server 12 is typically referred to residing for networking client 11 in cell
Cell dns server, second level local domain name server 13 can be the region DNS service that operator arranges in one's respective area
Device, authoritative name server refer to finally translate domain names into the dns server for IP address.
In addition, in the prior art, the IP address for the local domain name server that networking client can view is and network
First order local domain name server 12 in the IP address of the local domain name server of client direct communication, i.e. Fig. 1, and first
The IP address of level local domain name server 12 is usually Intranet IP.For the public network IP address of second level local domain name server,
Under the prior art, client can not directly obtain.
Fig. 2 is merely illustrative, and in the specific implementation, domain name system can include local Domain Name Service more than two-stage
Device.It can also include level-one local domain name server, that is to say, that the local domain name server being connected directly with client is direct
Authoritative name server is connected to, in this case, above-mentioned first order local domain name server and second level home domain name clothes
Business device is same name server.
To solve the above-mentioned problems, the embodiment of the present invention provides a kind of method for obtaining local domain name server address, uses
In the IP address for the local domain name server for obtaining networking client, what deserves to be explained is, described in the embodiment of the present invention
The IP address for obtaining the local domain name server of networking client specifically refers to obtain and authoritative name server direct communication
The IP address of local domain name server.Specifically, this method is applied to the authoritative name server in domain name system, such as Fig. 2 institutes
Show, the described method includes:
S201, receive domain name mapping request.
Wherein, domain name analysis request is that client is initially sent, and via client and authoritative name server it
Between local domain name server be transmitted to the authoritative name server.
It is illustrated with the network system shown in Fig. 1, domain name analysis request is sent by networking client 11
To first order local domain name server 12, second level local domain name server is forwarded to by first order local domain name server 12
13, authoritative name server 14 (corresponding above-mentioned steps S201) is forwarded to by second level local domain name server 13.Wherein, Fig. 1
It is merely illustrative, in the specific implementation, there may be the local domain name server more than two-stage, the present invention are right in domain name system
This is not limited.
S202, judge domain name analysis request type whether be address detection type.
Wherein, described address detection type refers to the IP address for being exclusively used in the local domain name server of detection network client
Domain name mapping request type.
Alternatively, in the specific implementation, can by judge domain name analysis request institute request analysis domain name whether
To set domain name, to determine whether the type of domain name analysis request is address detection type, wherein, if domain name parses
The domain name of request institute request analysis is the setting domain name, then the type that can determine that domain name analysis request is that described address is visited
Survey type.
Illustratively, which can be pre-configured in authoritative name server, for example, the setting domain name can be with
It is:www.example.com.Also, the setting domain name can set and change according to the actual requirements.In this way, authoritative domain name
The domain name for including domain name www.example.com that server is sent in the local domain name server for receiving directly communicate with it
During analysis request, determine that the type of domain name mapping request detects type for address.
S203, when the type of domain name analysis request be described address detection type when, from domain name analysis request
The IP address of the first local domain name server of middle extraction, first local domain name server are to the authoritative name server
Send the name server of domain name analysis request.
That is, first local domain name server is the local domain with the authoritative name server direct communication
Name server.It is illustrated with the network system shown in Fig. 1, shown in first local domain name server, that is, Fig. 1
Second level local domain name server 13.
S204, send the response message for being used for responding domain name analysis request, and the response message includes described first
The IP address of local domain name server.
Specifically, after the first local domain name server receives the response message of authoritative name server transmission, this is rung
Answer message to send to the local domain name server of next stage, the response message is returned to by client with this.
Using the above method, the domain name mapping for address detection type is asked, and authoritative name server can will be with it
The IP address of the local domain name server of direct communication returns to client, and middle authoritative name server is connecing compared with prior art
After receiving domain name mapping request, the IP address of the CDN server distributed for client or ADN servers is returned into client
End, the technical solution that the embodiment of the present disclosure provides can enable a client to know the IP address of local domain name server, have
Network problem diagnosis is carried out beneficial to further.
What deserves to be explained is authoritative name server is the IP by sending the local domain name server of domain name analysis request
Address judges the network site residing for client, and returns to CDN or ADN servers nearest from client in CDN or ADN networks
IP address, as domain name mapping request response.But since the network environment in the whole world is always in change, authoritative domain name
Local domain name server IP address storehouse in server, which still can always be run into, to be not present, or even the local domain name server of mistake
IP address, in this case, client may be directed into one and non-optimal CDN or ADN servers, imitate service
Fruit is deteriorated.Therefore, local domain name server is got in client-side by technical solution provided in an embodiment of the present invention, user
IP address after, the IP address storehouse of authoritative name server can be updated.
That is, the method provided in an embodiment of the present invention for obtaining local domain name server address can also be wrapped further
Include:The instruction in the IP address storehouse for being used to update the authoritative name server is received, described instruction includes first local domain
The name IP address of server and the corresponding network location information of IP address of first local domain name server;According to described
Instruct and the IP address storehouse of the authoritative name server is updated.
In this way, further, authoritative name server is receiving the first of the first local domain name server transmission
After domain name mapping request, it can be determined that whether the type of the first domain name mapping request is described address detection type, and
When the type of first domain name mapping request is not described address detection type, updated according to the authoritative name server
IP address storehouse afterwards determines the corresponding network location information of IP address of first local domain name server, and according to the net
Network positional information distributes CDN server or ADN servers, and sends and be used to respond the first of the first domain name mapping request
Response message, first response message include the CDN server or the IP address of the ADN servers.It is in this way, described
First local domain name server can be serviced the CDN server or the ADN by secondary local domain name server
The IP address of device is sent to the client.So as to direct the client to optimal CDN or ADN servers.
In addition, user can also access client after client-side gets the IP address of local domain name server
Local domain name server be modified, the present invention contrast do not limit.
Alternatively, it is unaffected in order to ensure the existing capability of authoritative name server, in step S202, if the domain
The type of name analysis request is not described address detection type, can be determined according to the IP address storehouse of the authoritative name server
Corresponding network location information, and be distribution content distribution network CDN service device or application according to the network location information
Delivery network ADN servers, and the response message for being used for responding domain name analysis request is sent, the response message includes institute
State CDN server or the IP address of the ADN servers.In this way, first local domain name server passes through secondary sheet
The IP address of the CDN server or the ADN servers is sent to the client by region name server.So as to fulfill
On the premise of authoritative name server existing capability is not influenced so that client can get the IP of local domain name server
Address.
The embodiment of the present invention also provides another method for obtaining local domain name server address, and the method is applied to visitor
Family end, as shown in figure 3, the described method includes:
S301, send domain name analysis request.
S302, the response message for receiving the response domain name analysis request that the second local domain name server is sent, it is described
Response message includes the IP address of the first local domain name server.
Wherein, second local domain name server is to receive the domain name analysis request that the client is sent
Name server, first local domain name server are the domain name that domain name analysis request is sent to authoritative name server
Server.
The second local domain name server is sent to that is, domain name analysis request is client and by locals at different levels
Name server forwards, and is finally sent to the authoritative name server by the first local domain name server.Such as Fig. 1 institutes
Show, second local domain name server refers to the first order local domain name server 12 shown in Fig. 1, first home domain name
Server refers to the second level local domain name server 13 shown in Fig. 1.
The IP address of S303, displaying first local domain name server.
What deserves to be explained is the IP address of first local domain name server is showed user by the present invention to client
Mode do not limit, can be by way of pop-up by described first for example, client is after the response message is received
The IP address of local domain name server is displayed on the screen, and the IP address of the first local domain name server can also be sent to use
The handheld device at family.
Using the above method, user can pass through institute when being unaware of local domain name server that client is currently accessed
State client and access setting domain name, authoritative name server is receiving the domain name mapping request of setting domain name described in request analysis
When, the IP address of local domain name server can be back to client so that client can know local domain name server
IP address, be conducive to further carry out network problem diagnosis.
In order to make those skilled in the art that technical solution provided in an embodiment of the present invention be more clearly understood, below to scheme
Network system shown in 1 illustrates the method for acquisition local domain name server address provided in an embodiment of the present invention, such as Fig. 4
Shown, this method includes:
S401, networking client 11 send domain name analysis request to first order local domain name server 12.
Wherein, domain name mapping request includes domain-name information.
S402, first order local domain name server 12 ask the domain name mapping after domain name mapping request is received
It is transmitted to second level name server 13.
S403, second level name server 13 ask to forward after domain name mapping request is received, by the domain name mapping
To authoritative name server 14.
S404, authoritative name server 14 judge whether the type of domain name mapping request is address detection type.
Specifically, the local domain name server for being exclusively used in detecting customer terminal is reserved with the authoritative name server 14
The domain-name information of IP address, after domain name mapping request is received, authoritative name server can compare the domain name mapping please
Whether the domain-name information in asking is consistent with reserved domain-name information, if unanimously, it is determined that the type of domain name mapping request is ground
Location detects type, if inconsistent, it is determined that domain name mapping request non-address detection type.
Further, if the type of domain name mapping request is not address detection type, step S405 to S407 is performed,
If the type of domain name mapping request is address detection type, step S408 to S411 is performed.
S405, authoritative name server 14 are true according to the IP address of second level local domain name server 13 in IP address storehouse
Determine the network site of client 11.
S406, authoritative name server 14 according to the network site of client 11 for client 11 distribute CDN server or
Person's ADN servers.
S407, authoritative name server 14 pass through second level local domain name server 12 and second level local Domain Name Service
The IP address of the CDN server distributed for client 11 or ADN servers is returned to client 11 by device 11.
S408, authoritative name server 14 extract second level local domain name server 14 from domain name analysis request
IP address.
Specifically, the extraction source IP from domain name mapping request data package of authoritative name server 14, this source IP are client
The IP address of the local domain name server at end.
The response message that S409, the transmission of authoritative name server 14 include the IP address gives second level local Domain Name Service
Device 13.
The response message is transmitted to first order local domain name server 12 by S410, second level name server 13.
The response message is transmitted to client 11 by S411, first order name server 12.
By above method step, the domain name mapping for address detection type is asked, and authoritative name server can incite somebody to action
The IP address of the local domain name server of directly communicate with it returns to client, compared with prior art middle authoritative name server
After domain name mapping request is received, the IP address of the CDN server distributed for client or ADN servers is returned into visitor
Family end, the technical solution that the embodiment of the present disclosure provides can enable a client to know the IP address of local domain name server,
Be conducive to further carry out network problem diagnosis.
What deserves to be explained is for above method embodiment, in order to be briefly described, therefore it is all expressed as a series of dynamic
Combine, but those skilled in the art should know, the present invention and from the limitation of described sequence of movement.Secondly, originally
Field technology personnel should also know that embodiment described in this description belongs to preferred embodiment, and involved action is simultaneously
It is not necessarily necessary to the present invention.
A kind of Fig. 5 devices 50 for obtaining local domain name server address provided in an embodiment of the present invention, it is above-mentioned for implementing
The method and step that corresponding method embodiment provides, the device 50 can be real by way of software, hardware or both are combined
Now the authoritative name server in domain name system is part or all of, as shown in figure 5, the device 50 includes:
First receiving module 501, for receiving domain name mapping request;
Judgment module 502, whether the type for judging domain name analysis request is address detection type;
Extraction module 503, for the type of domain name analysis request be described address detection type when, from the domain
The IP address of first local domain name server is extracted in name analysis request, first local domain name server is to described
Authoritative name server sends the name server of domain name analysis request;
Sending module 504, for sending the response message for being used for responding domain name analysis request, the response message bag
Include the IP address of first local domain name server.
Using above device, the domain name mapping for address detection type is asked, and authoritative name server can will be with it
The IP address of the local domain name server of direct communication returns to client, and middle authoritative name server is connecing compared with prior art
After receiving domain name mapping request, the IP address of the CDN server distributed for client or ADN servers is returned into client
End, the technical solution that the embodiment of the present disclosure provides can enable a client to know the IP address of local domain name server, have
Network problem diagnosis is carried out beneficial to further.
Alternatively, the judgment module 502 is used for:
When the domain name of domain name analysis request institute request analysis is sets domain name, domain name analysis request is determined
Type is described address detection type.
Alternatively, as shown in fig. 6, described device 50 further includes:
Determining module 505, for the type of domain name analysis request be not described address detection type when, according to institute
The IP address storehouse for stating authoritative name server determines the corresponding network site letter of the IP address of first local domain name server
Breath;
Distribution module 506, for distributing content distribution network CDN service device or application according to the network location information
Delivery network ADN servers;
The sending module 504 is additionally operable to, and sends the response message for being used for responding domain name analysis request, the response
Message includes the CDN server or the IP address of the ADN servers.
Alternatively, as shown in fig. 7, the device 50 further includes:
Second receiving module 507, for receiving the instruction in the IP address storehouse for being used to update the authoritative name server, institute
Stating instruction includes the IP address of first local domain name server and the IP address pair of first local domain name server
The network location information answered;Update module 508, for according to described instruction to the IP address storehouse of the authoritative name server into
Row renewal.
Alternatively, first receiving module 501 is used for, and receives the first domain name mapping request;The judgment module 502 is used
In whether the type for judging the first domain name mapping request is address detection type;The determining module 505, in institute
When the type for stating the first domain name mapping request is not described address detection type, after being updated according to the authoritative name server
IP address storehouse determines corresponding network location information;Distribution module 506, for distributing CDN clothes according to the network location information
Business device or ADN servers;The transmitting element 404 is used for, and sends and is used to respond the first of the first domain name mapping request
Response message, first response message include the CDN server or the IP address of the ADN servers.
It should be noted that affiliated those skilled in the art can be understood that, for convenience and simplicity of description,
The specific work process of the device of foregoing description and description, may be referred to the corresponding process in preceding method embodiment, herein not
Repeat again.
A kind of Fig. 8 devices 80 for obtaining local domain name server address provided in an embodiment of the present invention, it is above-mentioned for implementing
The method and step that corresponding method embodiment provides, the device 80 can be objective by way of software, hardware or both are combined
Family end it is part or all of, as shown in figure 8, the device 80 includes:
Sending module 801, for sending domain name analysis request;
Receiving module 802, the sound of the response domain name analysis request sent for receiving the second local domain name server
Message is answered, the response message includes the IP address of the first local domain name server, and second local domain name server is to connect
The name server for the domain name analysis request that the client is sent is received, first local domain name server is to power
Prestige name server sends the name server of domain name analysis request;
Display module 803, for showing the IP address of first local domain name server.
It should be noted that affiliated those skilled in the art can be understood that, for convenience and simplicity of description,
The specific work process of the device of foregoing description and description, may be referred to the corresponding process in preceding method embodiment, herein not
Repeat again.
Using above device, user can pass through institute when being unaware of local domain name server that client is currently accessed
State client and access setting domain name, authoritative name server is receiving the domain name mapping request of setting domain name described in request analysis
When, the IP address of local domain name server can be back to client so that client can know local domain name server
IP address, be conducive to further carry out network problem diagnosis.
Fig. 9 is the structural representation of another device 90 for obtaining local domain name server address provided in an embodiment of the present invention
Figure, the device 90 may be provided as a server.With reference to Fig. 9, device 90 includes processor 901, its quantity can be one
Or it is multiple, and memory 902, for storing the computer program that can be performed by processor 901.Stored in memory 902
Computer program can include it is one or more each correspond to the module of one group of instruction.In addition, processor 902 can
To be configured as performing the computer program, to perform the acquisition local domain name server address of above-mentioned authoritative name server side
Method.
In addition, device 90 can also include power supply module 903 and communication component 904, which can be configured
For the power management of executive device 90, which can be configured as the communication of realization device 90, for example, it is wired or
Wireless communication.In addition, the device 90 can also include input/output (I/O) interface 905.Device 90 can be operated based on storage
In the operating system of memory 902, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM etc..
Figure 10 is a kind of structural representation of device 100 for obtaining local domain name server address provided in an embodiment of the present invention
Figure, the device 100 may be provided as a client.As shown in Figure 10, which can include:Processor 101, storage
Device 102, multimedia component 103, input/output (I/O) interface 104, and communication component 105.
Wherein, processor 101 is used for the integrated operation for controlling the device 100, to complete above-mentioned acquisition local Domain Name Service
The all or part of step of the method for device address.Memory 102 is used to store various types of data to support in the device 100
Operation, these data can for example include being used for the instruction of any application program or method operated on the device 100.
The memory 102 can be by any kind of volatibility or non-volatile memories terminal device or combinations thereof
Realize, such as static RAM (Static Random Access Memory, abbreviation SRAM), electric erasable can
Program read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as
EEPROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read-Only Memory, abbreviation
EPROM), programmable read only memory (Programmable Read-Only Memory, abbreviation PROM), read-only storage
(Read-Only Memory, abbreviation ROM), magnetic memory, flash memory, disk or CD.
Multimedia component 103 can include screen and audio component.Wherein screen for example can be touch-screen, audio component
For output and/or input audio signal.
Communication component 105 is used to carry out wired or wireless communication between the device 100 and other equipment.Wireless communication, example
Such as Wi-Fi, bluetooth, near-field communication (Near Field Communication, abbreviation NFC), 2G, 3G or 4G, or in them
One or more of combinations, therefore the corresponding communication component 105 can include:Wi-Fi module, bluetooth module, NFC module.
In a kind of possible implementation, device 100 can be by one or more application application-specific integrated circuit
(Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor (Digital
Signal Processor, abbreviation DSP), Digital Signal Processing terminal device (Digital Signal Processing
Device, abbreviation DSPD), programmable logic device (Programmable Logic Device, abbreviation PLD), field-programmable
Gate array (Field Programmable Gate Array, abbreviation FPGA), controller, microcontroller, microprocessor or other
Electronic component realization, the method for obtaining local domain name server address for performing above-mentioned client-side.
The embodiment of the present invention also provides a kind of non-transitorycomputer readable storage medium 1, which can
Reading storage medium 1 includes one or more programs, which is used to perform a kind of acquisition local Domain Name Service
The method of device address, the method are applied to authoritative name server, the described method includes:
Receive domain name mapping request;
Whether the type for judging domain name analysis request is address detection type;
When the type of domain name analysis request is described address detection type, extracted from domain name analysis request
The IP address of first local domain name server, first local domain name server for the authoritative name server send institute
State the name server of domain name mapping request;
The response message for being used for responding domain name analysis request is sent, the response message includes first local domain
The IP address of name server.
Alternatively, whether the type for judging domain name analysis request is address detection type, including:
When the domain name of domain name analysis request institute request analysis is sets domain name, domain name analysis request is determined
Type is described address detection type.
Alternatively, the method further includes:
When the type of domain name analysis request is not described address detection type, according to the authoritative name server
IP address storehouse determine the corresponding network location information of IP address of first local domain name server;
Content distribution network CDN service device or application delivery network A DN services are distributed according to the network location information
Device;
The response message for being used for responding domain name analysis request is sent, the response message includes the CDN server
Or the IP address of the ADN servers.
Alternatively, the method further includes:
The instruction in the IP address storehouse for being used to update the authoritative name server is received, described instruction includes the first
The corresponding network location information of IP address of the IP address of region name server and first local domain name server;
The IP address storehouse of the authoritative name server is updated according to described instruction.
Alternatively, the method further includes:
Receive the first domain name mapping request;
Whether the type for judging the first domain name mapping request is address detection type;
When first domain name mapping request is not described address detection type, according to the authoritative name server more
IP address storehouse after new determines corresponding network location information;
CDN server or ADN servers are distributed according to the network location information;
The first response message for being used for responding the first domain name mapping request is sent, first response message includes institute
State CDN server or the IP address of the ADN servers.
The embodiment of the present invention also provides a kind of authoritative name server 2, which includes:
Above-mentioned non-transitorycomputer readable storage medium 1;And
One or more processor, for performing the program in above-mentioned non-transitorycomputer readable storage medium 1.
The embodiment of the present invention also provides a kind of non-transitorycomputer readable storage medium 3, which can
Reading storage medium 3 includes one or more programs, which is used to perform a kind of acquisition local Domain Name Service
The method of device address, the method are applied to client, the described method includes:
Send domain name analysis request;
The response message of the response domain name analysis request of the second local domain name server transmission is received, the response disappears
Breath includes the IP address of the first local domain name server, and second local domain name server sends to receive the client
Domain name analysis request name server, first local domain name server for authoritative name server send institute
State the name server of domain name mapping request;
Show the IP address of first local domain name server.
The embodiment of the present invention also provides a kind of client 4, which includes:
Above-mentioned non-transitorycomputer readable storage medium 3;And
One or more processor, for performing the program in above-mentioned non-transitorycomputer readable storage medium 3.
The embodiment of the present invention also provides a kind of domain name system, including:Such as authoritative name server 2, client 4, Yi Jizhi
A few local domain name server;Wherein, the domain name mapping request that the client is sent passes through at least one local domain
Name server is sent to the authoritative name server, and what the authoritative name server was sent is used to respond domain name parsing
The response message of request is back to client by least one local domain name server.The course of work of the domain name system
Illustrating for above method embodiment can be specifically can refer to, details are not described herein again.
The preferred embodiment of the disclosure is described in detail above in association with attached drawing, still, the disclosure is not limited to above-mentioned reality
The detail in mode is applied, in the range of the technology design of the disclosure, a variety of letters can be carried out to the technical solution of the disclosure
Monotropic type, these simple variants belong to the protection domain of the disclosure.
It is further to note that each particular technique feature described in above-mentioned embodiment, in not lance
In the case of shield, can be combined by any suitable means, in order to avoid unnecessary repetition, the disclosure to it is various can
The combination of energy no longer separately illustrates.
In addition, it can also be combined between a variety of embodiments of the disclosure, as long as it is without prejudice to originally
Disclosed thought, it should equally be considered as disclosure disclosure of that.