CN104778206A - Method and device for acquiring URL (uniform resource locator) of service resource - Google Patents

Method and device for acquiring URL (uniform resource locator) of service resource Download PDF

Info

Publication number
CN104778206A
CN104778206A CN201510103389.7A CN201510103389A CN104778206A CN 104778206 A CN104778206 A CN 104778206A CN 201510103389 A CN201510103389 A CN 201510103389A CN 104778206 A CN104778206 A CN 104778206A
Authority
CN
China
Prior art keywords
described
resource record
service
resource
dns
Prior art date
Application number
CN201510103389.7A
Other languages
Chinese (zh)
Inventor
谭国斌
马哲
沈建荣
Original Assignee
小米科技有限责任公司
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 小米科技有限责任公司 filed Critical 小米科技有限责任公司
Priority to CN201510103389.7A priority Critical patent/CN104778206A/en
Publication of CN104778206A publication Critical patent/CN104778206A/en

Links

Abstract

The embodiment of the disclosure discloses a method and a device for acquiring a URL (uniform resource locator) of a service resource. The method comprises the following steps of discovering an entrance path of the service resource by utilizing a PTR (pointer) resource record and a TXT (textfile) resource record in a DNS (domain name system), and further constructing the URL of the service resource according to the entrance path of the service resource, wherein acquiring the service resource, contained in a target domain name, according to the PTR resource record, and then, acquiring the entrance path corresponding to the service resource according to the TXT resource record; finally, constructing the URL of the service resource according to the target domain name and the entrance path of the service resource. By adopting the method, a service developer does not need to perform hard coding on a client and only needs to directly change the entrance path of the provided service resource; meanwhile, a user can directly acquire the URL of the service resource but does not need to re-download and install on the client, and therefore the flexibility of the URL of the service resource is greatly enhanced.

Description

The URL acquisition methods of Service Source and device

Technical field

The disclosure relates to field of computer technology, particularly relates to a kind of URL acquisition methods and device of Service Source.

Background technology

The APP (Application, application program) that terminal (such as, computer, smart mobile phone, panel computer etc.) is installed or webpage etc. can be called service.When the service that user uses developer to provide, client is needed to obtain corresponding resource to realize corresponding function from server side.Such as, the music APP client that smart mobile phone is installed needs from server, obtain corresponding music sources.APP client when mutual with server end, the corresponding service needing to utilize URL (UniversalResource Locator, URL(uniform resource locator)) to enter this APP and provide.

In correlation technique, developer carries out hard coded in client to URL, and by the code write client of URL, the code of URL can not change after finishing writing.User use serve accordingly time, client obtains URL from the coding of self, then, utilizes the URL obtained to provide corresponding service for user.Adopt the URL acquisition methods of this kind of Service Source, ISP is when changing the service that described APP provides, need the coding again writing client, and the service after the change that user needs the new procedures bag (namely upgrading to client) again downloading, install client that client could be used to provide, very flexible.

Summary of the invention

For overcoming Problems existing in correlation technique, the disclosure provides a kind of URL acquisition methods and device of Service Source.

In order to solve the problems of the technologies described above, disclosure embodiment discloses following technical scheme:

According to the first aspect of disclosure embodiment, provide a kind of URL acquisition methods of Service Source, be applied in client, described method comprises:

According to the PTR resource record in domain name analysis system DNS, obtain the Service Source that target domain name comprises;

According to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding;

According to the ingress path of described target domain name and described Service Source, build the uniform resource position mark URL of described Service Source.

In conjunction with first aspect, in the first possible implementation of first aspect, described according to the PTR resource record in described DNS, obtain the Service Source that target domain name comprises, comprising:

Obtain the Main Domain that service is corresponding;

Inquire about the srv resource record in described DNS, obtain whole subdomain names that Main Domain is corresponding, and determine target domain name from described whole subdomain name;

Inquire about the PTR resource record in described DNS, obtain whole Service Sources that described target domain name comprises.

In conjunction with the first possible implementation of first aspect, in the implementation that the second of first aspect is possible, the srv resource record in the described DNS of described inquiry, obtains whole subdomain names that described Main Domain is corresponding, comprising:

Send srv resource record querying command to described DNS, described srv resource record querying command at least carries described Main Domain;

Receive whole subdomain names that described Main Domain that described DNS returns is corresponding, described subdomain name is inquired about srv resource record by described DNS according to described srv resource record querying command and is obtained.

In conjunction with the first possible implementation of first aspect, in the third possible implementation of first aspect, the PTR resource record in the described DNS of described inquiry, obtains the Service Source that described target domain name comprises, comprising:

Send PTR resource record querying command to described DNS, described PTR resource record querying command at least carries the destination service resource type that described target domain name comprises;

Receive whole Service Sources that described destination service type that described DNS returns comprises, described Service Source is inquired about PTR resource record by described DNS according to described PTR resource record querying command and is obtained.

In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, described destination service resource type is the Service Source type that client is specified, or, whole Service Source types that described target domain name is corresponding.

In conjunction with first aspect, in the 5th kind of possible implementation of first aspect, described according to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding, comprising:

Obtain destination service resource;

The TXT resource record querying command carrying described destination service resource is sent to described DNS;

Receive the ingress path that described destination service resource that described DNS returns is corresponding, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and is obtained.

In conjunction with first aspect, in the 6th kind of possible implementation of first aspect, described according to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding, comprising:

Obtain whole Service Sources that target domain name comprises;

Send TXT resource record querying command to described DNS, described TXT resource record querying command at least carries destination service resource, and described destination service resource is determined according to the Service Source obtained by client;

Receive the ingress path that described destination service resource that described DNS returns is corresponding, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and is obtained.

According to the second aspect of disclosure embodiment, a kind of URL acquisition device of Service Source is provided, is applied in client, comprises:

First acquisition module, for according to the PTR resource record in domain name analysis system DNS, obtains the Service Source that target domain name comprises;

Second acquisition module, for according to the TXT resource record in described DNS, obtains the ingress path that described Service Source is corresponding;

Build module, for the ingress path according to described target domain name and described Service Source, build the uniform resource position mark URL of described Service Source.

In conjunction with second aspect, in the first possible implementation of second aspect, described first acquisition module, comprising:

First obtains submodule, for obtaining Main Domain corresponding to service;

First inquiry submodule, for inquiring about the srv resource record in described DNS, obtains whole subdomain names that described Main Domain is corresponding, and determine target domain name from described whole subdomain name;

Second inquiry submodule, for inquiring about the PTR resource record in described DNS, obtains whole Service Sources that described target domain name comprises.

In conjunction with the first possible implementation of second aspect, in the implementation that the second of second aspect is possible, described first inquiry submodule, comprising:

First sends submodule, and for sending srv resource record querying command to described DNS, described srv resource record querying command at least carries described Main Domain;

First receives submodule, and for receiving whole subdomain names corresponding to described Main Domain that described DNS returns, described subdomain name is inquired about srv resource record by described DNS according to described srv resource record querying command and obtained.

In conjunction with the first possible implementation of second aspect, in the third possible implementation of second aspect, described second inquiry submodule, comprising:

Second sends submodule, and for sending PTR resource record querying command to described DNS, described PTR resource record querying command at least carries the destination service resource type that described target domain name comprises;

Second receives submodule, whole Service Sources that the described destination service type returned for receiving described DNS comprises, and described Service Source is inquired about PTR resource record by described DNS according to described PTR resource record querying command and obtained.

In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, described destination service resource type is the Service Source type that client is specified, or, whole Service Source types that described target domain name is corresponding.

In conjunction with second aspect, in the 5th kind of possible implementation of second aspect, described second acquisition module, comprising:

Second obtains submodule, for obtaining destination service resource;

3rd sends submodule, for sending the TXT resource record querying command carrying described destination service resource to described DNS;

3rd receives submodule, and for receiving ingress path corresponding to described destination service resource that described DNS returns, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and obtained.

In conjunction with second aspect, in the 6th kind of possible implementation of second aspect, described second acquisition module, comprising:

3rd obtains submodule, for obtaining whole Service Sources that target domain name comprises;

4th sends submodule, and for sending TXT resource record querying command to described DNS, described TXT resource record querying command at least carries destination service resource, and described destination service resource is determined according to the Service Source obtained by client;

4th receives submodule, and for receiving ingress path corresponding to described destination service resource that described DNS returns, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and obtained.

According to the third aspect of disclosure embodiment, a kind of terminal device is provided, comprises:

Processor;

For the storer of storage of processor executable instruction;

Wherein, described processor is configured to:

According to the PTR resource record in domain name analysis system DNS, obtain the Service Source that target domain name comprises;

According to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding;

According to the ingress path of described target domain name and described Service Source, build the uniform resource position mark URL of described Service Source.

The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect: the URL acquisition methods of described Service Source, utilize DNS (Domain Name System, domain name analysis system) PTR resource record in system and TXT resource record, find the ingress path of Service Source, and then build the URL of Service Source according to the ingress path of Service Source.Wherein, according to the Service Source that PTR resource record acquisition target domain name comprises; Then, ingress path corresponding to described Service Source is obtained according to TXT resource record.Finally, the URL of described Service Source is built according to the ingress path of target domain name and Service Source.Adopt this kind of method, developer of services does not need to carry out hard coded to client, the ingress path of the Service Source that direct change provides, simultaneously, the URL that user directly can obtain Service Source does not need again download and install client, therefore, the dirigibility of the URL of change Service Source is substantially increased.

Should be understood that, it is only exemplary that above general description and details hereinafter describe, and can not limit the disclosure.

Accompanying drawing explanation

Accompanying drawing to be herein merged in instructions and to form the part of this instructions, shows embodiment according to the invention, and is used from instructions one and explains principle of the present invention.

Fig. 1 is the process flow diagram of the URL acquisition methods of a kind of Service Source according to an exemplary embodiment;

Fig. 2 is the method flow diagram of a kind of step S110 according to an exemplary embodiment;

Fig. 3 is the method flow diagram of a kind of step S112 according to an exemplary embodiment;

Fig. 4 is the method flow diagram of a kind of step S113 according to an exemplary embodiment;

Fig. 5 is the method flow diagram of a kind of step S120 according to an exemplary embodiment;

Fig. 6 is the method flow diagram of the another kind of S120 according to an exemplary embodiment;

Fig. 7 is the block diagram of the URL acquisition device of a kind of Service Source according to an exemplary embodiment;

Fig. 8 is the block diagram of a kind of first acquisition module according to an exemplary embodiment;

Fig. 9 is the block diagram of a kind of first inquiry submodule 112 according to an exemplary embodiment;

Figure 10 is the block diagram of a kind of second inquiry submodule 113 according to an exemplary embodiment;

Figure 11 is the block diagram of a kind of second acquisition module 120 according to an exemplary embodiment;

Figure 12 is the block diagram of another kind second acquisition module 120 according to an exemplary embodiment;

Figure 13 is the block diagram of the device 800 of a kind of URL acquisition methods for realizing Service Source according to an exemplary embodiment.

By above-mentioned accompanying drawing, illustrate the embodiment that the disclosure is clear and definite more detailed description will be had hereinafter.These accompanying drawings be not in order to limited by any mode the disclosure design scope, but by reference to specific embodiment for those skilled in the art illustrate concept of the present disclosure.

Embodiment

Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the disclosure.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present disclosure are consistent.

Fig. 1 is the process flow diagram of the URL acquisition methods of a kind of Service Source according to an exemplary embodiment, and the method is applied in client, and as shown in Figure 1, the method can comprise the following steps.

In step s 110, according to the PTR resource record in DNS, obtain the Service Source that target domain name comprises.

Store corresponding target domain name in client, if the domain name of application program or webpage only comprises Main Domain, then aiming field is called this Main Domain.If the Main Domain of application program or webpage also comprises a series of subdomain name (such as, subdomain name " music.baidu.com, zhidao.baidu.com, baike.baidu.com " is comprised under Main Domain " baidu.com "), then target domain name can be one or more subdomain names that user specifies from a series of subdomain name.

Whole subdomain names that client comprises under obtaining Main Domain by the srv resource record in inquiry dns server, and from subdomain name, determine that one or more subdomain name is as target domain name.

Then, whole Service Sources that PTR resource record acquisition target domain name comprises are inquired about.

Wherein, the Service Source that PTR resource record comprises for recording Service Source type, concrete PTR resource record example is as follows:

_search_http._tcp PTR BlogSearch._search._tcp

_search_http._tcp PTR NewsSearch_search_tcp

_atom_http._tcp PTR Blog._atom_http._tcp

_atom_http._tcp PTR News._atom_http._tcp

Wherein, the left-hand line of PTR resource record is Service Source type, and the right-hand column of PTR resource record is the specific service resource corresponding to Service Source type.

Client inquires about according to the PTR resource record in dns server the Service Source that each Service Source type comprises, such as, obtain according to the inquiry of above-mentioned PTR resource record the Service Source that " _ search_http._tcp " comprise to comprise: " BlogSearch._search._tcp " and " NewsSearch_search_tcp ".

In the step s 120, according to the TXT resource record in described DNS, the ingress path that described Service Source is corresponding is obtained.

TXT resource record is for recording the extra metadata of Service Source, and be used for modifying or this Service Source being described, client can obtain the ingress path of this Service Source according to the TXT resource record in dns server.

Such as, a concrete TXT resource record is as follows:

Blog_atom_http._tcp SRV 0080blog.example.com.

TXT path=/all/blog

This resource record represents that Service Source corresponding to Service Source type " Blog_atom_http._tcp " be the TXT resource record that " blog.example.com. " this Service Source " blog.example.com. " is corresponding is " path=/all/blog ", and namely the ingress path of this Service Source " blog.example.com. " is "/all/blog ".

In step s 130, which, according to the ingress path of described target domain name and Service Source, the URL of described Service Source is built.

Utilize above-mentioned target domain name, the ingress path of Service Source, build the URL of Service Source.Such as, target domain name is " blog.example.com ", and the ingress path of the Service Source that this target domain name is corresponding is "/all/blog ", and it is " http://blog.example.com/all/blog " that final structure obtains URL corresponding to this Service Source.

In another exemplary embodiment of the disclosure, in the TXT resource record that dns server returns to client, can also comprise the port numbers of server corresponding to this Service Source, such as, dns server returns following resource record:

Blog._atom_http._tcp.example.com service=0 0 80blog.example.com.

Blog._atom_http._tcp.example.com text=“path=/all/blog”

This resource record represents, the port numbers of the server that " blog.example.com. " is corresponding is " 80 ", and ingress path is "/all/blog ".

The URL of this Service Source obtained is built for " http://blog.example.com:80/all/blog " according to this resource record.

The URL acquisition methods of the Service Source that the present embodiment provides, utilizes the PTR resource record in DNS system and TXT resource record, finds the ingress path of Service Source, and then builds the URL of Service Source according to the ingress path of Service Source.Wherein, according to the Service Source that PTR resource record acquisition target domain name comprises; Then, ingress path corresponding to described Service Source is obtained according to TXT resource record.Finally, the URL of described Service Source is built according to the ingress path of target domain name and Service Source.Adopt this kind of method, developer of services does not need to carry out hard coded to client, the ingress path of the Service Source that direct change provides, simultaneously, the URL that user directly can obtain Service Source does not need again download and install client, therefore, the dirigibility of the URL of change Service Source is substantially increased.

In the disclosure one exemplary embodiment, if when the Main Domain of application program or webpage also comprises a series of subdomain name, can adopt the Service Source that the acquisition of the method shown in Fig. 2 target domain name comprises, as shown in Figure 2, described step S110 can comprise the following steps:

In step S111, client obtains Main Domain corresponding to service.Corresponding Main Domain is stored in client.

In step S112, the srv resource record in DNS described in client query, obtains whole subdomain names that Main Domain is corresponding, and determine target domain name from described whole subdomain name.

Srv resource record is the type of a kind of resource record supported in DNS database, which can provide serve for recording a server, concrete, and srv resource record is used for recording domain available service under one's name.

Client can initiate srv resource record querying command to dns server, thus inquiry obtains whole subdomain names corresponding to target domain name.Such as, here is a srv resource record example:

_ldap._tcp.example.com.IN SRV 0080help.example.com.

It is " help.example.com " that this srv resource record states ldap service available on 80 ports of example.com main frame, and wherein, _ tcp is the specification that srv resource record uses, and uses Transmission Control Protocol for identifying this service.Namely this srv resource record shows the subdomain " help.example.com " by name that example.com is corresponding.

Utilize whole subdomain names that srv resource record acquisition Main Domain comprises, then, from the whole subdomain names obtained, specify a subdomain name as target domain name, continue to perform step S113.

Wherein, the operation that the functionality controls can clicking the display interface of application program according to user produces, determines the subdomain name that user will use, and namely finally determines that this subdomain is called aiming field name.

In step S113, the PTR resource record in DNS described in client query, obtains whole Service Sources that described target domain name comprises.

In the disclosure one exemplary embodiment, define two kinds of service regulations (namely, Service Source type): Atom specification and Opensearch specification, Atom specification defines a series of hyper text type and the linking relationship that can be used for realizing publication interface.OpenSearch specification is used for description one can the search engine that uses of searched client.According to the operation of user, client can determine that Service Source type that user will use is as destination service resource type, then, inquiry PTR resource record, obtains whole Service Sources that destination service resource type comprises.

In the disclosure one exemplary embodiment, the step S112 shown in Fig. 2 can comprise step as shown in Figure 3:

In step S1121, client sends srv resource record querying command to DNS, and described srv resource record querying command at least carries Main Domain.

In step S1122, client receives whole subdomain names corresponding to described Main Domain that described DNS returns, and described Service Source type is inquired about srv resource record by described DNS according to described srv resource record querying command and obtained.

Client sends srv resource record querying command to dns server, and wherein, this srv resource record querying command carries Main Domain corresponding to client.Dns server is according to the srv resource record querying command received, srv resource record in Query Database, obtain the whole subdomain names corresponding to Main Domain, and the subdomain name of acquisition is returned to client, therefrom determine that to make client at least one subdomain name is as target domain name.

In the disclosure one exemplary embodiment, the step S113 in Fig. 2 can comprise step as shown in Figure 4:

In step S1131, client sends PTR resource record querying command to DNS, and described PTR resource record querying command at least carries the destination service resource type that target domain name comprises.

The destination service resource type that PTR resource record querying command carries can be the Service Source type that user specifies, such as, the operation that the functionality controls clicking the display interface of application program according to user produces, determines the Service Source type that user will use.

Or the destination service resource type entrained by PTR resource record querying command can also be whole Service Source types that target domain name comprises.

In step S1132, the Service Source that the described destination service resource type that client reception DNS returns is corresponding, described Service Source is inquired about PTR resource record by described DNS according to described PTR resource record querying command and is obtained.

Dns server is resolved the PTR resource query order that receives and is obtained the destination service type that target domain name comprises, inquiry PTR resource record, obtain whole Service Sources that described destination service resource type comprises, and the Service Source of acquisition is returned to client.

DNS order is specified and is used following Service Source naming convention: <Instance>.<Serv iceType>.<ProtocolGreatT.Grea T.GT.<Domain>, like this, the complete name of Blog search service is: BlogSearch._search_http._tcp.example.com.

Such as, inquire about Service Source type on example.com be _ inquiry of whole Service Sources of search_http._tcp can be expressed as:

$nslookup-q=ptr_search_http._tcp.example.com

……

_search_http._tcp.example.com name=BlogSearch._search_http._tcp.example.com.

_search_http._tcp.example.com name=NewsSearch_search_http._tcp.example.com

" nslookup " is domain name mapping dbase, and "-q=ptr " represents the PTR resource record in inquiry DNS database, and " _ search_http._tcp.example.com " represents the Service Source type that will inquire about.

" name=BlogSearch._search_http._tcp.example.com. " and " name=NewsSearch_search_http._tcp.example.com " represents the result of inquiring about and returning.

From above-mentioned Query Result, the upper all Service Source types of example.com are _ Service Source of search_http._tcp comprises BlogSearch and NewsSearch two kinds.

Fig. 5 is the method flow diagram of a kind of step S120 according to an exemplary embodiment, and the method is applied in client, and as shown in Figure 5, described method can comprise the following steps:

In step S121, client obtains destination service resource.

Client can determine destination service resource according to the operation of user, and such as, user clicks the operation that the functionality controls on the display interface of application program produces.

In step S122, client sends the TXT resource record querying command carrying described destination service resource to DNS.

In step S123, the ingress path that the described destination service resource that client reception DNS returns is corresponding, described ingress path is inquired about TXT resource record by described dns server according to described TXT resource record querying command and is obtained.

Dns server receives the TXT resource record querying command that client sends, first the destination service resource that TXT resource record querying command obtains inquiring about is resolved, then inquire about TXT resource record corresponding with described destination service resource in TXT resource record then.

The method of the ingress path that the acquisition Service Source that the present embodiment provides is corresponding, first client determines destination service resource, then generate the TXT resource record querying command carrying described destination service resource and send to dns server, ingress path information corresponding to described destination service resource is obtained according to the inquiry of TXT resource record querying command by dns server, this kind of mode, client can be avoided to receive TXT resource record corresponding to the unconcerned Service Source of multi-user, save the bandwidth resources between client and server.

Fig. 6 is the method flow diagram of the another kind of S120 according to an exemplary embodiment, and the method is applied in client, and as shown in Figure 6, described method can comprise the following steps:

In step S124, client obtains the Service Source that whole Service Source type comprises.

Whole Service Sources corresponding for the target domain name received are returned to client by dns server.

In step s 125, client sends TXT resource record querying command to DNS, and described TXT resource record querying command at least carries destination service resource.

Client specifies at least one Service Source as destination service resource according to the Service Source that dns server returns, and sends the TXT resource record querying command carrying destination service resource to dns server.

In step S126, client receives ingress path corresponding to described destination service resource that described DNS returns, and described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and obtained.

After dns server receives TXT resource record querying command, the TXT resource record that the destination service resource entrained by inquiry TXT resource record querying command is corresponding, obtains the ingress path of destination service resource.

The method of the ingress path that the acquisition Service Source that the present embodiment provides is corresponding, client receives whole Service Source that dns server returns, and from Service Source intended target Service Source, then generate the TXT resource record querying command carrying destination service resource and send to dns server.TXT resource record corresponding to the destination service resource that client returns according to dns server obtains the ingress path of described destination service resource.This kind of mode, when client terminal start-up, Service Source corresponding to the target domain name that client just sends by dns server all feeds back to client, decreases the client follow-up acquisition destination service resource required time waited for, improves the response speed of client.

Fig. 7 is the block diagram of the URL acquisition device of a kind of Service Source according to an exemplary embodiment, and this application of installation is in client, and as shown in Figure 7, this device comprises the first acquisition module 110, second acquisition module 120 and builds module 130.

First acquisition module 110 is configured to, and according to the PTR resource record in DNS, obtains the Service Source that target domain name comprises.

Second acquisition module 120 is configured to, and according to the TXT resource record in described DNS, obtains the ingress path that described Service Source is corresponding.

Build module 130 to be configured to, according to the ingress path of described target domain name and described Service Source, build the URL of described Service Source.

The URL acquisition device of the Service Source that the present embodiment provides, utilizes the PTR resource record in DNS system and TXT resource record, finds the ingress path of Service Source, and then builds the URL of Service Source according to the ingress path of Service Source.Wherein, according to the Service Source that PTR resource record acquisition target domain name comprises; Then, ingress path corresponding to described Service Source is obtained according to TXT resource record.Finally, the URL of described Service Source is built according to the ingress path of target domain name and Service Source.Adopt this kind of method, developer of services does not need to carry out hard coded to client, the ingress path of the Service Source that direct change provides, simultaneously, the URL that user directly can obtain Service Source does not need again download and install client, therefore, the dirigibility of the URL of change Service Source is substantially increased.

Fig. 8 is the block diagram of a kind of first acquisition module according to an exemplary embodiment, and as shown in Figure 8, described first acquisition module comprises: first obtains submodule 111, first inquires about submodule 112 and the second inquiry submodule 113.

First obtains submodule 111 is configured to, and obtains the Main Domain that service is corresponding.

First inquiry submodule 112 is configured to, and inquires about the srv resource record in described DNS, obtains whole subdomain names that Main Domain is corresponding, and determine target domain name from described whole subdomain name.

Second inquiry submodule 113 is configured to, and inquires about the PTR resource record in described DNS, obtains whole Service Sources that described target domain name comprises.

Fig. 9 is the block diagram of a kind of first inquiry submodule 112 according to an exemplary embodiment, and as shown in Figure 9, described first inquiry submodule 112 comprises: first sends submodule 1121 and first receives submodule 1122.

First sends submodule 1121 is configured to, and send srv resource record querying command to described DNS, described srv resource record querying command at least carries described Main Domain.

First receives submodule 1122 is configured to, and receive whole subdomain names that described Main Domain that described DNS returns is corresponding, described subdomain name is inquired about srv resource record by described DNS according to described srv resource record querying command and obtained.

Figure 10 is the block diagram of a kind of second inquiry submodule 113 according to an exemplary embodiment, and as shown in Figure 10, described second inquiry submodule 113 comprises: second sends submodule 1131 and second receives submodule 1132.

Second sends submodule 1131 is configured to, and send PTR resource record querying command to described DNS, described PTR resource record querying command at least carries the destination service resource type that described target domain name comprises.

Described destination service resource type is the Service Source type that client is specified, or, whole Service Source types that described target domain name is corresponding.

Second receives submodule 1132 is configured to, and receive whole Service Sources that described destination service type that described DNS returns comprises, described Service Source is inquired about PTR resource record by described DNS according to described PTR resource record querying command and obtained.

Figure 11 is the block diagram of a kind of second acquisition module 120 according to an exemplary embodiment, and as shown in figure 11, described second acquisition module, comprising: second obtains submodule 121, the 3rd sends submodule 122 and the 3rd reception submodule 123.

Second obtains submodule 121 is configured to, and obtains destination service resource.

3rd sends submodule 122 is configured to, and sends the TXT resource record querying command carrying described destination service resource to described DNS.

3rd receives submodule 123 is configured to, and receive the ingress path that described destination service resource that described DNS returns is corresponding, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and obtained.

The second acquisition module that the present embodiment provides, first submodule determination destination service resource is obtained by second, then generate the TXT resource record querying command carrying described destination service resource and send to dns server, ingress path information corresponding to described destination service resource is obtained according to the inquiry of TXT resource record querying command by dns server, this kind of mode, client can be avoided to receive TXT resource record corresponding to the unconcerned Service Source of multi-user, save the bandwidth resources between client and server.

Figure 12 is the block diagram of another kind second acquisition module 120 according to an exemplary embodiment, and as shown in figure 12, described second acquisition module, comprising: the 3rd obtains submodule 124, the 4th sends submodule 125 and the 4th reception submodule 126.

4th obtains submodule 124 is configured to, and obtains the Service Source that whole Service Source type comprises.

4th sends submodule 125 is configured to, and send TXT resource record querying command to described DNS, described TXT resource record querying command at least carries destination service resource, and described destination service resource is determined according to the Service Source obtained by client.

3rd receives submodule 126 is configured to, and receive the ingress path that described destination service resource that described DNS returns is corresponding, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and obtained.

The method of the ingress path that the acquisition Service Source that the present embodiment provides is corresponding, client receives whole Service Source that dns server returns, and from Service Source intended target Service Source, then generate the TXT resource record querying command carrying destination service resource and send to dns server.TXT resource record corresponding to the destination service resource that client returns according to dns server obtains the ingress path of described destination service resource.This kind of mode, when client terminal start-up, Service Source corresponding to the target domain name that client just sends by dns server all feeds back to client, decreases the client follow-up acquisition destination service resource required time waited for, improves the response speed of client.

Figure 13 is the block diagram of the device 800 of a kind of URL acquisition methods for realizing Service Source according to an exemplary embodiment.Such as, device 800 can be mobile phone, computing machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc.

As shown in figure 13, device 800 can comprise following one or more assembly: processing components 802, storer 804, power supply module 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of I/O (I/O), sensor module 814, and communications component 816.

The integrated operation of the usual control device 800 of processing components 802, such as with display, call, data communication, camera operation and record operate the operation be associated.Processing components 802 can comprise one or more processor 820 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 802 can comprise one or more module, and what be convenient between processing components 802 and other assemblies is mutual.Such as, processing components 802 can comprise multi-media module, mutual with what facilitate between multimedia groupware 808 and processing components 802.

Storer 804 is configured to store various types of data to be supported in the operation of device 800.The example of these data comprises for any application program of operation on device 800 or the instruction of method, contact data, telephone book data, message, picture, video etc.Storer 804 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), ROM (read-only memory) (ROM), magnetic store, flash memory, disk or CD.

The various assemblies that power supply module 806 is device 800 provide electric power.Power supply module 806 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 800 and be associated.

Multimedia groupware 808 is included in the screen providing an output interface between described device 800 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Described touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant to described touch or slide and pressure.In certain embodiments, multimedia groupware 808 comprises a front-facing camera and/or post-positioned pick-up head.When device 800 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.

Audio-frequency assembly 810 is configured to export and/or input audio signal.Such as, audio-frequency assembly 810 comprises a microphone (MIC), and when device 800 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal received can be stored in storer 804 further or be sent via communications component 816.In certain embodiments, audio-frequency assembly 810 also comprises a loudspeaker, for output audio signal.

I/O interface 812 is for providing interface between processing components 802 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.

Sensor module 814 comprises one or more sensor, for providing the state estimation of various aspects for device 800.Such as, sensor module 814 can detect the opening/closing state of device 800, the relative positioning of assembly, such as described assembly is display and the keypad of device 800, the position of all right pick-up unit 800 of sensor module 814 or device 800 1 assemblies changes, the presence or absence that user contacts with device 800, the temperature variation of device 800 orientation or acceleration/deceleration and device 800.Sensor module 814 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 814 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor module 814 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.

Communications component 816 is configured to the communication being convenient to wired or wireless mode between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communications component 816 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, described communications component 816 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.

In the exemplary embodiment, device 800 can be realized, for performing said method by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD) (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.

In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 804 of instruction, above-mentioned instruction can perform said method by the processor 820 of device 800.Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.

A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of mobile terminal, make terminal device can perform the acquisition methods of a kind of URL of Service Source, described method comprises:

According to the PTR resource record in DNS, obtain the Service Source that target domain name comprises;

According to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding;

According to the ingress path of described target domain name and described Service Source, build the URL of described Service Source.

In the disclosure one exemplary embodiment, described according to the PTR resource record in described DNS, obtain the Service Source that target domain name comprises, comprising:

Obtain the Main Domain that service is corresponding;

Inquire about the srv resource record in described DNS, obtain whole subdomain names that Main Domain is corresponding, and determine target domain name from described whole subdomain name;

Inquire about the PTR resource record in described DNS, obtain whole Service Sources that described target domain name comprises.

In the disclosure one exemplary embodiment, the srv resource record in the described DNS of described inquiry, obtains whole subdomain names that Main Domain is corresponding, comprising:

Send srv resource record querying command to described DNS, described srv resource record querying command at least carries described Main Domain;

Receive whole subdomain names that described Main Domain that described DNS returns is corresponding, described subdomain name is inquired about srv resource record by described DNS according to described srv resource record querying command and is obtained.

In the disclosure one exemplary embodiment, the PTR resource record in the described DNS of described inquiry, the Service Source that the described target domain name obtaining acquisition comprises, comprising:

Send PTR resource record querying command to described DNS, described PTR resource record querying command at least carries the destination service resource type that described target domain name comprises;

Receive whole Service Sources that described destination service type that described DNS returns comprises, described Service Source is inquired about PTR resource record by described DNS according to described PTR resource record querying command and is obtained.

In the disclosure one exemplary embodiment, described destination service resource type is the Service Source type that client is specified, or, whole Service Source types that described target domain name is corresponding.

In the disclosure one exemplary embodiment, described according to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding, comprising:

Obtain destination service resource;

The TXT resource record querying command carrying described destination service resource is sent to described DNS;

Receive the ingress path that described destination service resource that described DNS returns is corresponding, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and is obtained.

In the disclosure one exemplary embodiment, described according to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding, comprising:

Obtain the Service Source that whole Service Source type comprises;

Send TXT resource record querying command to described DNS, described TXT resource record querying command at least carries destination service resource, and described destination service resource is determined according to the Service Source obtained by client;

Receive the ingress path that described destination service resource that described DNS returns is corresponding, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and is obtained.

Those skilled in the art, at consideration instructions and after putting into practice invention disclosed herein, will easily expect other embodiment of the present invention.The application is intended to contain any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present invention and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Instructions and embodiment are only regarded as exemplary, and true scope of the present invention and spirit are pointed out by claim below.

Should be understood that, the present invention is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.Scope of the present invention is only limited by appended claim.

Claims (15)

1. a URL acquisition methods for Service Source, is applied in client, it is characterized in that, described method comprises:
According to the PTR resource record in domain name analysis system DNS, obtain the Service Source that target domain name comprises;
According to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding;
According to the ingress path of described target domain name and described Service Source, build the uniform resource position mark URL of described Service Source.
2. method according to claim 1, is characterized in that, described according to the PTR resource record in described DNS, obtains the Service Source that target domain name comprises, comprising:
Obtain the Main Domain that service is corresponding;
Inquire about the srv resource record in described DNS, obtain whole subdomain names that described Main Domain is corresponding, and determine target domain name from described whole subdomain name;
Inquire about the PTR resource record in described DNS, obtain whole Service Sources that described target domain name comprises.
3. method according to claim 2, is characterized in that, the srv resource record in the described DNS of described inquiry, obtains whole subdomain names that described Main Domain is corresponding, comprising:
Send srv resource record querying command to described DNS, described srv resource record querying command at least carries described Main Domain;
Receive whole subdomain names that described Main Domain that described DNS returns is corresponding, described subdomain name is inquired about srv resource record by described DNS according to described srv resource record querying command and is obtained.
4. method according to claim 2, is characterized in that, the PTR resource record in the described DNS of described inquiry, obtains the Service Source that described target domain name comprises, comprising:
Send PTR resource record querying command to described DNS, described PTR resource record querying command at least carries the destination service resource type that described target domain name comprises;
Receive whole Service Sources that described destination service type that described DNS returns comprises, described Service Source is inquired about PTR resource record by described DNS according to described PTR resource record querying command and is obtained.
5. method according to claim 4, is characterized in that, described destination service resource type is the Service Source type that client is specified, or, whole Service Source types that described target domain name is corresponding.
6. method according to claim 1, is characterized in that, described according to the TXT resource record in described DNS, obtains the ingress path that described Service Source is corresponding, comprising:
Obtain destination service resource;
The TXT resource record querying command carrying described destination service resource is sent to described DNS;
Receive the ingress path that described destination service resource that described DNS returns is corresponding, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and is obtained.
7. method according to claim 1, is characterized in that, described according to the TXT resource record in described DNS, obtains the ingress path that described Service Source is corresponding, comprising:
Obtain whole Service Sources that target domain name comprises;
Send TXT resource record querying command to described DNS, described TXT resource record querying command at least carries destination service resource, and described destination service resource is determined according to the Service Source obtained by client;
Receive the ingress path that described destination service resource that described DNS returns is corresponding, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and is obtained.
8. a URL acquisition device for Service Source, is applied in client, it is characterized in that, comprising:
First acquisition module, for according to the PTR resource record in domain name analysis system DNS, obtains the Service Source that target domain name comprises;
Second acquisition module, for according to the TXT resource record in described DNS, obtains the ingress path that described Service Source is corresponding;
Build module, for the ingress path according to described target domain name and described Service Source, build the uniform resource position mark URL of described Service Source.
9. device according to claim 8, is characterized in that, described first acquisition module, comprising:
First obtains submodule, for obtaining Main Domain corresponding to service;
First inquiry submodule, for inquiring about the srv resource record in described DNS, obtains whole subdomain names that described Main Domain is corresponding, and determine target domain name from described whole subdomain name;
Second inquiry submodule, for inquiring about the PTR resource record in described DNS, obtains whole Service Sources that described target domain name comprises.
10. device according to claim 9, is characterized in that, described first inquiry submodule, comprising:
First sends submodule, and for sending srv resource record querying command to described DNS, described srv resource record querying command at least carries described Main Domain;
First receives submodule, and for receiving whole subdomain names corresponding to described Main Domain that described DNS returns, described subdomain name is inquired about srv resource record by described DNS according to described srv resource record querying command and obtained.
11. devices according to claim 9, is characterized in that, described second inquiry submodule, comprising:
Second sends submodule, and for sending PTR resource record querying command to described DNS, described PTR resource record querying command at least carries the destination service resource type that described target domain name comprises;
Second receives submodule, whole Service Sources that the described destination service type returned for receiving described DNS comprises, and described Service Source is inquired about PTR resource record by described DNS according to described PTR resource record querying command and obtained.
12. devices according to claim 11, is characterized in that, described destination service resource type is the Service Source type that client is specified, or, whole Service Source types that described target domain name is corresponding.
13. devices according to claim 8, is characterized in that, described second acquisition module, comprising:
Second obtains submodule, for obtaining destination service resource;
3rd sends submodule, for sending the TXT resource record querying command carrying described destination service resource to described DNS;
3rd receives submodule, and for receiving ingress path corresponding to described destination service resource that described DNS returns, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and obtained.
14. devices according to claim 8, is characterized in that, described second acquisition module, comprising:
3rd obtains submodule, for obtaining whole Service Sources that target domain name comprises;
4th sends submodule, and for sending TXT resource record querying command to described DNS, described TXT resource record querying command at least carries destination service resource, and described destination service resource is determined according to the Service Source obtained by client;
4th receives submodule, and for receiving ingress path corresponding to described destination service resource that described DNS returns, described ingress path is inquired about TXT resource record by described DNS according to described TXT resource record querying command and obtained.
15. 1 kinds of terminal devices, is characterized in that, comprising:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
According to the PTR resource record in domain name analysis system DNS, obtain the Service Source that target domain name comprises;
According to the TXT resource record in described DNS, obtain the ingress path that described Service Source is corresponding;
According to the ingress path of described target domain name and described Service Source, build the uniform resource position mark URL of described Service Source.
CN201510103389.7A 2015-03-10 2015-03-10 Method and device for acquiring URL (uniform resource locator) of service resource CN104778206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510103389.7A CN104778206A (en) 2015-03-10 2015-03-10 Method and device for acquiring URL (uniform resource locator) of service resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510103389.7A CN104778206A (en) 2015-03-10 2015-03-10 Method and device for acquiring URL (uniform resource locator) of service resource

Publications (1)

Publication Number Publication Date
CN104778206A true CN104778206A (en) 2015-07-15

Family

ID=53619670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510103389.7A CN104778206A (en) 2015-03-10 2015-03-10 Method and device for acquiring URL (uniform resource locator) of service resource

Country Status (1)

Country Link
CN (1) CN104778206A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516295A (en) * 2015-12-03 2016-04-20 腾讯科技(深圳)有限公司 Network request processing method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1663222A (en) * 2002-06-14 2005-08-31 法国电信有限公司 System for consulting and/or updating DNS servers and/or ldap directories
CN101651720A (en) * 2008-08-11 2010-02-17 上海可鲁系统软件有限公司 Method for resolving domain names
WO2010027794A1 (en) * 2008-08-25 2010-03-11 Google Inc. Parallel, side-effect based dns pre-caching
CN103891247A (en) * 2011-09-20 2014-06-25 西门子公司 Method and system for domain name system based discovery of devices and objects
US20140258346A1 (en) * 2013-03-08 2014-09-11 Go Daddy Operating Company, LLC Associating an Online File Folder with a Uniform Resource Locator
US20140258349A1 (en) * 2013-03-08 2014-09-11 Go Daddy Operating Company, LLC Systems for Associating an Online File Folder with a Uniform Resource Locator
CN104202360A (en) * 2014-08-13 2014-12-10 小米科技有限责任公司 Webpage access method, device and router
US20150006687A1 (en) * 2013-06-28 2015-01-01 Avaya Inc. Application configuration using dns-based service discovery
CN104281703A (en) * 2014-10-22 2015-01-14 小米科技有限责任公司 Method and device for calculating similarity among uniform resource locators (URL)

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1663222A (en) * 2002-06-14 2005-08-31 法国电信有限公司 System for consulting and/or updating DNS servers and/or ldap directories
CN101651720A (en) * 2008-08-11 2010-02-17 上海可鲁系统软件有限公司 Method for resolving domain names
WO2010027794A1 (en) * 2008-08-25 2010-03-11 Google Inc. Parallel, side-effect based dns pre-caching
CN103891247A (en) * 2011-09-20 2014-06-25 西门子公司 Method and system for domain name system based discovery of devices and objects
US20140258346A1 (en) * 2013-03-08 2014-09-11 Go Daddy Operating Company, LLC Associating an Online File Folder with a Uniform Resource Locator
US20140258349A1 (en) * 2013-03-08 2014-09-11 Go Daddy Operating Company, LLC Systems for Associating an Online File Folder with a Uniform Resource Locator
US20150006687A1 (en) * 2013-06-28 2015-01-01 Avaya Inc. Application configuration using dns-based service discovery
CN104202360A (en) * 2014-08-13 2014-12-10 小米科技有限责任公司 Webpage access method, device and router
CN104281703A (en) * 2014-10-22 2015-01-14 小米科技有限责任公司 Method and device for calculating similarity among uniform resource locators (URL)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516295A (en) * 2015-12-03 2016-04-20 腾讯科技(深圳)有限公司 Network request processing method and device

Similar Documents

Publication Publication Date Title
RU2644057C2 (en) Remote control method and apparatus
CN104780155B (en) Apparatus bound method and device
WO2017071070A1 (en) Speech control method and apparatus for smart device, control device and smart device
CN104683938A (en) Configuration method and device for intelligent equipment
CN104735057A (en) Sharing device control right method and device
US20150350406A1 (en) Method and device for calendar reminding
CN104660685A (en) Method and device for obtaining equipment information
CN104219092B (en) The compatibility method of a kind of router administration application and router firmware and device
CN104793739A (en) Play control method and device
CN105224195A (en) Terminal operation method and device
CN104407592A (en) Method and device for regulating running state of smart home device
CN104333846A (en) Position reminding method and device
CN104363631A (en) Connection method, device and system of wireless router
CN105099840A (en) Setting method and device of intelligent household scene
CN103888344A (en) Group creation method, group exiting method and device
CN104159275B (en) Method for connecting network and device
CN105160854A (en) Equipment control method, device and terminal equipment
CN104978868A (en) Stop arrival reminding method and stop arrival reminding device
CN105162937A (en) Incoming call information processing method and device
CN104684048A (en) WIFI list display method and device
CN104038536B (en) Plug-in unit communication means and device
CN105302727A (en) Testing method, device and system
CN104156401A (en) Webpage loading method, device and equipment
CN104951336A (en) Application program installation method and device
CN104318741A (en) Bluetooth device control method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150715