CN109446445A - A kind of resource acquiring method and device - Google Patents

A kind of resource acquiring method and device Download PDF

Info

Publication number
CN109446445A
CN109446445A CN201811238199.6A CN201811238199A CN109446445A CN 109446445 A CN109446445 A CN 109446445A CN 201811238199 A CN201811238199 A CN 201811238199A CN 109446445 A CN109446445 A CN 109446445A
Authority
CN
China
Prior art keywords
domain name
resource
client
url
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811238199.6A
Other languages
Chinese (zh)
Other versions
CN109446445B (en
Inventor
张志亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing happy I unlimited Technology Co., Ltd.
Original Assignee
Happy Honey Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Happy Honey Co Ltd filed Critical Happy Honey Co Ltd
Priority to CN201811238199.6A priority Critical patent/CN109446445B/en
Publication of CN109446445A publication Critical patent/CN109446445A/en
Application granted granted Critical
Publication of CN109446445B publication Critical patent/CN109446445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the present application provides a kind of resource acquiring method and device, is related to field of computer technology, which comprises when detecting the first currently stored domain name is invalid domain name, is based on preset domain name create-rule, generates the second domain name;Second domain name is sent to each client;When receiving the resource request for carrying target resource identifier of client transmission, the corresponding destination path of the target resource identifier is obtained;The destination path is sent to the client.When receiving the second domain name that preset server-side is sent, second domain name is stored;Receive the destination path that the server-side is sent;Second domain name and the destination path are subjected to splicing, obtain the 2nd URL of the target resource;By the 2nd URL, the target resource is obtained.Using the application, the time for obtaining target resource can be saved, improves user experience.

Description

A kind of resource acquiring method and device
Technical field
This application involves field of computer technology, more particularly to a kind of resource acquiring method and device.
Background technique
User can generate the demand for obtaining a certain resource during using a certain client, at this point, client can be to And the server-side of client communication connection issues resource request corresponding with the resource.Resource in internet include text, The Miscellaneous Documents such as picture, audio, video.
The corresponding URL of vast resources (Uniform Resource Locator, unified resource positioning are stored in server-side Symbol), URL includes domain name and path.After server-side receives resource request, corresponding resource (the as mesh of the resource request can determine whether Mark resource) URL the URL of target resource is directly then sent to client.Client receives the URL of target resource Afterwards, the domain name that can include according to the URL determines the Resource Server for being stored with target resource;The road for including further according to the URL Diameter obtains target resource in the Resource Server.User obtains target resource as a result,.Wherein, in server-side, Duo Gezi The domain name that the URL in source includes can be identical, be also possible to different.
For same domain name, server-side can store multiple URL comprising the domain name, when a certain domain name becomes invalid domain name When (for example blacklist is added in the domain name by operator), server-side needs to generate effective domain name, and what determination was locally stored includes to be somebody's turn to do The URL of invalid domain name, is then revised as the effective domain name for the domain name in these URL.However, due to URL number usually compared with More, modification takes a long time, if server-side receives resource request during modification, may will include unmodified nothing The URL of effect domain name is sent to client, causes client that can not get target resource.
Apply for content
The embodiment of the present application is designed to provide a kind of resource acquiring method and device, can become to avoid a certain domain name When invalid domain name, replacement largely includes the URL of the invalid domain name, can save the time for obtaining target resource, improves user's body It tests.Specific technical solution is as follows:
In a first aspect, providing a kind of resource acquiring method, the method is applied to server-side, which comprises
When detecting the first currently stored domain name is invalid domain name, it is based on preset domain name create-rule, generates the Two domain names;
Second domain name is sent to each client;
When receiving the resource request for carrying target resource identifier of client transmission, the target resource mark is obtained Know corresponding destination path;
The destination path is sent to the client.
Optionally, the method also includes:
The first uniform resource position mark URL to be stored is obtained, and determines corresponding first index of the first URL;
From the first URL, the first domain name and first path that the first URL includes are extracted respectively;
It is corresponding to store first domain name and first index, obtain the corresponding relationship of index with domain name;
It is corresponding to store the first path and first index, obtain the corresponding relationship of index with path.
Optionally, it is described be based on preset domain name create-rule, generate the second domain name after, further includes:
In the index and the corresponding relationship of domain name, first domain name is revised as second domain name.
Optionally, the corresponding destination path of the target resource identifier that obtains includes:
The corresponding relationship of resource identification and index according to the pre-stored data determines the target resource identifier corresponding second Index;
Based on the corresponding relationship of pre-stored index and path, the corresponding destination path of second index is determined.
Optionally, described the destination path is sent to the client to include:
Based on the corresponding relationship of pre-stored index and domain name, corresponding second domain name of second index is determined;
The mark of second domain name and the destination path are sent to the client.
Optionally, the method also includes:
Invalid domain name notice is received, the invalid domain name notice carries invalid domain name identification;
Corresponding first domain name of the invalid domain name identification is determined as invalid domain name.
Optionally, the method also includes:
The inquiry of the domain name request that client is sent is received, the mark of first domain name is carried in domain name inquiry request Know;
If finding the mark of first domain name in pre-stored domain name blacklist, by first domain name It is determined as invalid domain name.
Second aspect, provides a kind of resource acquiring method, and the method is applied to client, which comprises
When receiving the second domain name that preset server-side is sent, second domain name is stored;
When detecting the selection instruction of corresponding target resource, Xiang Suoshu server-side sends resource request, and the resource is asked Seek the target resource identifier for carrying the target resource of request;
Receive the destination path that the server-side is sent;
Second domain name and the destination path are subjected to splicing, obtain the 2nd URL of the target resource;
By the 2nd URL, the target resource is obtained.
Optionally, described that second domain name and the destination path are subjected to splicing, obtain the target resource The 2nd URL before, further includes:
Receive the mark for the second domain name that the server-side is sent;
According to the mark of second domain name, second domain name is obtained from pre-stored each domain name.
Optionally, the method also includes:
When receiving the Notice Of Nonavailability of target resource, the mark for the second domain name that the 2nd URL includes is obtained;
According to the mark of second domain name, invalid domain name notice or inquiry of the domain name request are generated.
The third aspect provides a kind of resource acquisition device, and described device is applied to server-side, and described device includes:
First generation module, for being based on preset domain when detecting the first currently stored domain name is invalid domain name Name create-rule, generates the second domain name;
First sending module, for second domain name to be sent to each client;
First obtain module, for when receive client transmission the resource request for carrying target resource identifier when, Obtain the corresponding destination path of the target resource identifier;
Second sending module, for the destination path to be sent to the client.
Optionally, described device further include:
Second obtains module, for obtaining the first uniform resource position mark URL to be stored, and determines the first URL Corresponding first index;
Extraction module, for extracting the first domain name and first that the first URL includes respectively from the first URL Path;
First memory module stores first domain name and first index for corresponding, obtains index and domain name Corresponding relationship;
Second memory module stores the first path and first index for corresponding, obtains index and path Corresponding relationship.
Optionally, described device further include:
Modified module, for, with the corresponding relationship of domain name, first domain name being revised as described the in the index Two domain names.
Optionally, the first acquisition module includes:
First determines that submodule determines the mesh for the corresponding relationship of resource identification according to the pre-stored data and index Mark corresponding second index of resource identification;
Second determines submodule, for the corresponding relationship based on pre-stored index and path, determines second rope Draw corresponding destination path.
Optionally, first sending module includes:
Third determines submodule, for the corresponding relationship based on pre-stored index and domain name, determines second rope Draw corresponding second domain name;
Sending submodule, for the mark of second domain name and the destination path to be sent to the client.
Optionally, described device further include:
First receiving module, for receiving invalid domain name notice, the invalid domain name notice carries invalid domain name identification;
First determining module, for corresponding first domain name of the invalid domain name identification to be determined as invalid domain name.
Optionally, described device further include:
Second receiving module carries in domain name inquiry request for receiving the inquiry of the domain name request of client transmission There is the mark of first domain name;
Second determining module, for when the mark for finding first domain name in pre-stored domain name blacklist When, first domain name is determined as invalid domain name.
Fourth aspect provides a kind of resource acquisition device, and described device is applied to client, and described device includes:
Third receiving module, for storing second domain when receiving the second domain name that preset server-side is sent Name;
Third sending module, for when detecting the selection instruction of corresponding target resource, Xiang Suoshu server-side to send money Source request, the resource request carry the target resource identifier of the target resource of request;
4th receiving module, the destination path sent for receiving the server-side;
Splicing module obtains the target money for second domain name and the destination path to be carried out splicing 2nd URL in source;
Third obtains module, for obtaining the target resource by the 2nd URL.
Optionally, described device further include:
5th receiving module, for receiving the mark for the second domain name that the server-side is sent;
4th obtains module, for the mark according to second domain name, from pre-stored each domain name described in acquisition Second domain name.
Optionally, described device further include:
5th obtains module, for when receiving the Notice Of Nonavailability of target resource, obtain that the 2nd URL includes the The mark of two domain names;
Second generation module generates invalid domain name notice or inquiry of the domain name is asked for the mark according to second domain name It asks.
5th aspect, provides a kind of server-side, including processor, communication interface, memory and communication bus, wherein Processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes method and step described in first aspect.
6th aspect, provides a kind of computer readable storage medium, is stored in the computer readable storage medium Computer program realizes method and step described in first aspect when the computer program is executed by processor.
7th aspect, provides a kind of client, including processor, communication interface, memory and communication bus, wherein Processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes method and step described in second aspect.
Eighth aspect provides a kind of computer readable storage medium, is stored in the computer readable storage medium Computer program when the computer program is executed by processor, realizes method and step described in second aspect.
A kind of resource acquiring method and device provided by the embodiments of the present application, server-side can detect it is currently stored When first domain name is invalid domain name, the second domain name is generated based on preset domain name create-rule and is then sent to the second domain name Each client;After each client receives the second domain name, the second domain name is stored.Server-side can receive client transmission When carrying the resource request of target resource identifier, the corresponding destination path of target resource identifier is obtained, and destination path is sent out Give client;Client splices the second domain name and destination path, then the 2nd URL for obtaining target resource passes through 2nd URL obtains target resource.Since this programme is when the first currently stored domain name is invalid domain name, the second domain name is generated, And the second domain name is sent to each client, therefore, client can obtain effective second domain name, by the second domain name and reception To destination path spliced to obtain the 2nd URL, then target resource can be obtained based on the 2nd URL, it is a large amount of to avoid replacement URL comprising the invalid domain name can save the time for obtaining target resource, improve user experience.
Certainly, implement the application any product or method it is not absolutely required to and meanwhile reach all the above excellent Point.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of method flow diagram of resource acquiring method provided by the embodiments of the present application;
Fig. 2 is a kind of method flow diagram of resource acquiring method provided by the embodiments of the present application;
Fig. 3 is a kind of method flow diagram of resource acquiring method provided by the embodiments of the present application;
Fig. 4 is a kind of method flow diagram of resource acquiring method provided by the embodiments of the present application;
Fig. 5 is a kind of method flow diagram of resource acquiring method provided by the embodiments of the present application;
Fig. 6 is a kind of exemplary flow chart of resource acquiring method provided by the embodiments of the present application;
Fig. 7 is a kind of structural schematic diagram of resource acquisition device provided by the embodiments of the present application;
Fig. 8 is a kind of structural schematic diagram of resource acquisition device provided by the embodiments of the present application;
Fig. 9 is a kind of structural schematic diagram of server-side provided by the embodiments of the present application;
Figure 10 is a kind of structural schematic diagram of client provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
The embodiment of the present application provides a kind of resource acquiring method, and this method is applied to server-side, and server-side can be certain The background service system of application program, background service system may include the server that resource is provided to client, super service The equipment such as device, cluster system, intermediate range system and mainframe, client can be the electronic equipments such as PC or mobile phone.This Apply in embodiment, user needs the resource obtained to be stored in preset Resource Server, not stored resource in server-side. Server-side can receive client sending resource request when, by resource acquiring method provided by the embodiments of the present application to Client provides resource.
In order to make it easy to understand, the embodiment of the present application is first illustrated the storing process of URL, as shown in Figure 1, the application Embodiment provides a kind of method for storing URL, and concrete processing procedure is as follows:
Step 101, the first URL to be stored is obtained, and determines corresponding first index of the first URL.
In an implementation, a large amount of URL can be previously stored in server-side, server-side can be deposited receiving preset batch After storage instruction, the first URL to be stored is obtained one by one, server-side can also be new by this when receiving some new URL URL is as the first URL to be stored.
Server-side can got after the first URL stored, according to preset index create-rule, generate a rope Draw (the i.e. first index), and regard the first index as the corresponding index of the first URL.In addition, server-side can also obtain the first URL The resource identification of corresponding resource, and the resource identification of the corresponding resource of the first URL and the first index are subjected to corresponding storage, with Establish the corresponding relationship of the first index and resource identification.
Step 102, from the first URL, the first domain name and first path that the first URL includes are extracted respectively.
In an implementation, URL composition rule can be previously provided in server-side, it, can after server-side gets a URL To be parsed according to preset URL composition rule to the first URL, determines the domain name and path that the first URL includes, thus obtain First domain name and first path.
For example, the first URL to be stored ishttp://www.baidu1.com/resource/test.png, server-side The first URL can be parsed according to preset URL composition rule, the domain name for determining that the first URL includes ishttp:// www.baidu1.com, the path that the first URL includes is /resource/test.png.
Step 103, the first domain name of corresponding storage and the first index, obtain the corresponding relationship of index with domain name, so that service End determines the according to corresponding first index of resource identification to resource response request, and index and the corresponding relationship of domain name Corresponding first domain name of one index.
In an implementation, the first domain name and the first index can be carried out corresponding storage by server-side, to establish the first domain name With the corresponding relationship of the first index, the corresponding relationship of index with domain name is obtained as a result,.
For example, server-side generates the first index S1, then the first domain name of corresponding storage according to preset index create-rulehttp://www.baidu1.comWith the first index S1, the corresponding relationship of the first domain name and the first index is established.
Step 104, corresponding storage first path and the first index, obtain the corresponding relationship of index with path, so that service End determines the according to corresponding first index of resource identification to resource response request, and index and the corresponding relationship in path The corresponding first path of one index.
In an implementation, for each first URL, first path and the first index can be carried out corresponding storage by server-side, To establish the corresponding relationship of the first index and first path, the corresponding relationship of index with path is obtained as a result,.
For example, the corresponding index of storage first path/resource/test.png and first S1 of server-side, establishes the first rope Draw the corresponding relationship with first path.
In the embodiment of the present application, for each first URL, server-side is based on index and the corresponding relationship and index of domain name and road The corresponding relationship of diameter, corresponding first index of the first URL of storage, the first domain name and first path, is achieved in storage first URL.Using the URL storage mode, server-side can be easily managed the URL of storage, for example, when a certain domain name becomes When invalid domain name, which only need to be revised as effective domain name, be not necessarily to by server-side in index and the corresponding relationship of domain name The URL that each includes the invalid domain name is modified, modification is saved and includes the plenty of time needed for the URL of invalid domain name, in turn It allows users to obtain target resource in time, improves user experience.
As shown in Fig. 2, the method based on storage URL set forth above, below to a kind of resource acquisition provided by the present application The process flow of method is illustrated, and this method is applied to server-side, and concrete processing procedure is as follows:
Step 201, when detecting the first currently stored domain name is invalid domain name, rule are generated based on preset domain name Then, the second domain name is generated.
In an implementation, domain name create-rule can be previously provided in server-side, server-side can be generated based on the domain name Rule generates new effective domain name.In addition, server-side can be instructed according to the modification received, changes preset domain name and generate Rule.
When server-side detects that the first currently stored domain name is invalid domain name, rule can be generated based on preset domain name Then, effective domain name is generated, and using the effective domain name as the second domain name.
For example, currently stored the first domain name of server-side is http://www.baidu1.com, when server-side detects this When first domain name is invalid domain name, it can be based on preset domain name create-rule, generate effective domain name http: // Www.baidu2.com, then http://www.baidu2.com is the second domain name.
In the embodiment of the present application, server-side detect the first domain name whether be invalid domain name mode be it is diversified, tool Body process is subsequent to will do it detailed description.
In a kind of feasible embodiment, server-side stores URL using method as shown in Figure 1, is based in server-side Preset domain name create-rule, after generating the second domain name, server-side can also execute following steps: corresponding with domain name indexing In relationship, the first domain name is revised as the second domain name.
In an implementation, server-side can determine corresponding first rope of the first domain name in index and the corresponding relationship of domain name Draw, then delete the first domain name, is stored the second domain name as the corresponding domain name of the first index.
In the embodiment of the present application, when the first domain name becomes invalid domain name, server-side only need to be corresponding with domain name in index In relationship, the corresponding domain name of the first index is revised as effective domain name by invalid domain name, includes the nothing without modifying each Imitate the URL of domain name.For example, when the first domain namehttp://www.baidu1.comWhen becoming invalid domain name, server-side only needs to generate Effective domain namehttp://www.baidu2.com, then the corresponding domain name of the first index is revised ashttp:// www.baidu2.com, without modify one by one it is each include the first domain name URL.Therefore, modification can be saved and include invalid domain Plenty of time needed for the URL of name improves user experience so that user can obtain target resource in time.
Step 202, the second domain name is sent to each client.
In an implementation, server-side and multiple client keep communicating to connect, the mode of communication connection include bluetooth connection, WiFi (Wireless Fidelity, Wireless Fidelity) connection and cable connection or wireless network connection.Server-side can incite somebody to action Second domain name is sent to each client with server-side communication connection.
Step 203, when receiving the resource request for carrying target resource identifier of client transmission, target money is obtained Source identifies corresponding destination path.
In an implementation, when server-side receives the resource request of client transmission, the available resource request of server-side Then the target resource identifier of carrying determines the corresponding destination path of target resource identifier again.For example, destination path can for/ resource/test.png。
The mode that server-side obtains the corresponding destination path of target resource identifier is diversified, extended meeting after detailed process It is described in detail.
Step 204, destination path is sent to client, so that client splices the second domain name and destination path Processing, obtains the 2nd URL of target resource.
In the embodiment of the present application, when the first domain name becomes invalid domain name, server-side is multiple it is not necessary to modify what is be locally stored URL comprising the first domain name need to only be based on preset domain name create-rule, generate the second domain name, and the second domain name is sent to Each client.In this way, server-side in the resource request at customer in response end, need to only send the corresponding destination path of resource request To client, so that client splicing destination path and the second domain name, obtain the 2nd URL of target resource, and according to the 2nd URL Obtain target resource.
As a result, without one by one modification include invalid domain name URL, reduce processing the time so that user can and When obtain target resource, improve user experience.
In the embodiment of the present application, the mode that server-side obtains the corresponding destination path of target resource identifier is varied , the embodiment of the present application provides a kind of feasible processing mode:
Step 1: the corresponding relationship of resource identification according to the pre-stored data and index, determines that target resource identifier is corresponding Second index.
In an implementation, server-side can be in the corresponding relationship of pre-stored resource identification and index, lookup and target The identical resource identification of resource identification, and regard the corresponding index of the resource identification as the corresponding index of target resource identifier, i.e., For the second index.
Step 2: the corresponding relationship based on pre-stored index and path, determines the corresponding destination path of the second index.
In an implementation, the corresponding relationship in index and path can also be previously stored in server-side, server-side can be true After fixed second index, in the corresponding relationship in the index and path, the identical index with the second index is searched, and by the index pair The path answered is as the corresponding path of the second index, as destination path.
In the embodiment of the present application, the corresponding relationship of server-side resource identification according to the pre-stored data and index determines target Corresponding second index of resource identification, and the corresponding relationship of index and path according to the pre-stored data, determine that the second index is corresponding Destination path.Using this processing mode, server-side can easily obtain destination path, search efficiency based on resource identification It is higher.
Optionally, after server-side obtains the corresponding destination path of target resource identifier, in server-side and client Processing mode when destination path is sent to client by the difference of the domain name number of storage, server-side is also different, is specifically divided into Following two situation:
Situation one, when the domain name number stored in server-side and client be one when, server-side is directly by destination path It is sent to client.
Situation two, when the domain name number stored in server-side and client be it is multiple when, server-side can execute following steps:
Step 1, the corresponding relationship based on pre-stored index and domain name, determine corresponding second domain name of the second index.
In an implementation, the corresponding relationship of index and domain name can be previously stored in server-side, server-side can be in determination After second index, in the index and the corresponding relationship of domain name, the identical index with the second index is searched, and the index is corresponding Domain name as the second corresponding domain name of index, as the second domain name.
The mark of second domain name and destination path are sent to client by step 2.
In an implementation, server-side obtains the mark of the second domain name, and the mark of the second domain name and destination path are sent to visitor Family end.
In the embodiment of the present application, when the domain name number stored in server-side and client is multiple, server-side is based on pre- The corresponding relationship of the index and domain name that first store determines corresponding second domain name of the second index, then by the mark of the second domain name Client is sent jointly to destination path.Client can determine destination path from the multiple domain names being locally stored as a result, Corresponding second domain name, avoids destination path and other domain names splice to obtain the URL of mistake, causes client that can not obtain mesh Mark resource.
In the embodiment of the present application, server-side detect the first domain name whether be invalid domain name mode be it is diversified, this Application embodiment provides two kinds of feasible processing modes:
As shown in figure 3, the treatment process of mode one is as follows:
Step 301, invalid domain name notice is received.
Wherein, invalid domain name notice carries invalid domain name identification.Invalid domain name notice can be sent by client, one In the feasible embodiment of kind, operator can issue invalid domain name bulletin, and invalid domain name bulletin includes invalid domain name, technical staff Invalid domain name can be announced the invalid domain name for including to be input in management equipment, it is logical that management equipment can then generate invalid domain name Know, and sends invalid domain name and notify to server-side.Server-side can store invalid domain name in the domain name blacklist being locally stored Corresponding invalid domain name identification.
In an implementation, when receiving invalid domain name notice, it is invalid that the available invalid domain name notice of server-side carries Domain name identification.
Step 302, corresponding first domain name of invalid domain name identification is determined as invalid domain name.
In an implementation, server-side has the first domain name of like-identified in local search and invalid domain name identification, and should First domain name is as invalid domain name.
In the embodiment of the present application, server-side obtains the invalid of invalid domain name notice carrying by receiving invalid domain name notice Corresponding first domain name of invalid domain name identification is determined as invalid domain name by domain name identification.Server-side uses the processing mode, can The presence of invalid domain name is effectively detected, so that invalid domain name is timely revised as effective domain name, so that user's energy It is enough to obtain target resource in time, improve user experience.
As shown in figure 4, the treatment process of mode two is as follows:
Step 401, the inquiry of the domain name request that client is sent is received.
Wherein, the mark of the first domain name is carried in inquiry of the domain name request.
In an implementation, server-side can receive the inquiry of the domain name request of client transmission, obtains and takes in inquiry of the domain name request The mark of first domain name of band.
Step 402, if finding the mark of the first domain name in pre-stored domain name blacklist, by the first domain name It is determined as invalid domain name.
In an implementation, server-side can be after the mark for getting the first domain name, in pre-stored domain name blacklist The mark of the first domain name is searched, if finding invalid domain name identification identical with the mark of the first domain name, it is determined that the first domain name For invalid domain name;If not finding invalid domain name identification identical with the mark of the first domain name, it is determined that the first domain name is effective Domain name.
In the embodiment of the present application, server-side obtains inquiry of the domain name and asks by receiving the inquiry of the domain name request that client is sent It, will if found when seeking the mark of the first domain name of middle carrying, and searching in domain name blacklist the mark of the first domain name First domain name is determined as invalid domain name.Server-side uses the processing mode, can effectively detect the presence of invalid domain name, with Just invalid domain name is timely revised as effective domain name, so that user can obtain target resource in time, improves user's body It tests.
As shown in figure 5, this method is applied to client, specific to handle present invention also provides a kind of resource acquiring method Process is as follows:
Step 501, when receiving the second domain name that preset server-side is sent, the second domain name is stored.
In an implementation, domain name file can be previously stored in client, domain name file includes what client was locally stored Domain name, the domain name that client is locally stored can be one, be also possible to multiple.Client can be sent receiving server-side The second domain name when, the second domain name is stored into domain name file.
Step 502, when detecting the selection instruction of corresponding target resource, resource request is sent to server-side.
Wherein, the target resource identifier of the target resource of request can be carried in resource request.It can be pre- in client It is first stored with resource identification file, resource identification file may include the resource identification of multiple resources.
In an implementation, when user needs to obtain a certain resource, user can select the corresponding figure of the resource in client Mark, client then can receive the selection instruction of the corresponding resource, using the corresponding resource of the selection instruction as target resource, Then the resource identification of pre-stored target resource is obtained.
Client can generate resource request, and the resource request is sent based on the target resource identifier of target resource Give the server-side of client communication connection.
Step 503, the destination path that server-side is sent is received.
Step 504, the second domain name and destination path are subjected to splicing, obtain the 2nd URL of target resource.
In an implementation, client can be according to preset URL composition rule, the second domain name of splicing and the target road received Diameter obtains the 2nd URL of a URL namely target resource.
For example, client according to domain name in the posterior URL composition rule in preceding path, by the second domain namehttp:// www.baidu2.comSpliced with destination path/resource/test.png, obtained URL ishttp:// www.baidu2.com/resource/test.png, as the 2nd URL of target resource.
Step 505, by the 2nd URL, target resource is obtained.
In an implementation, the second domain name that client includes by the 2nd URL determines the resource service for being stored with target resource Device, then, the destination path for including by the 2nd URL determine storage location of the target resource in the Resource Server, it Afterwards, client obtains target resource from the Resource Server.
In the embodiment of the present application, when the first domain name becomes invalid domain name, client receives and stores server-side transmission Second domain name.In this way, after client detects the selection instruction of corresponding target resource and sends resource request to server-side, only Second domain name and destination path are carried out splicing, target resource can be obtained by the destination path that need to receive server-side transmission The 2nd URL, to obtain target resource by the 2nd URL.Therefore, when the first domain name becomes invalid domain name, client can To directly acquire target resource based on the 2nd URL comprising the second domain name, avoid in the prior art based on server-side transmission URL comprising invalid domain name, and the case where target resource can not be obtained, the time for obtaining target resource can be saved, improves and uses Family experience.
Optionally, after the destination path that client receives server-side transmission, for being stored in server-side and client Domain name number difference, client determines that the processing mode of the second domain name is also different, is specifically divided into following two situation:
Situation one, when the domain name number stored in server-side and client is one, client is using the domain name as the Two domain names, and the second domain name and destination path are subjected to splicing.
Situation two for the domain name number stored in server-side and client is multiple situations, and client is by second Domain name and destination path, which carry out splicing, can also execute following steps before obtaining the 2nd URL of target resource:
Step 1, the mark for receiving the second domain name that server-side is sent.
In an implementation, client can receive what server-side was sent while receiving the destination path that server-side is sent The mark of second domain name.
Step 2, according to the mark of the second domain name, obtain the second domain name from pre-stored each domain name.
In an implementation, client can determine the second domain name in multiple domain names that pre-stored domain name file includes The corresponding domain name of mark be the second domain name.
In the embodiment of the present application, client receives the mark for the second domain name that server-side is sent, and pre-stored each The second domain name is obtained in domain name, avoids destination path and other domain names splice to obtain the URL of mistake, cause client that can not obtain Take target resource.
Optionally, client can send invalid domain name notice or inquiry of the domain name is requested to server-side, so that server-side is examined Survey whether the first domain name is invalid domain name.The embodiment of the present application also provides a kind of invalid domain name notices of generation or inquiry of the domain name to ask The embodiment asked, specific process flow are as follows:
Step 1 obtains the second domain name that the 2nd URL includes when client receives the Notice Of Nonavailability of target resource Mark.
In an implementation, when client can not obtain target resource from preset Resource Server by the 2nd URL, in advance If Resource Server can send Notice Of Nonavailability to client, after client receives the Notice Of Nonavailability, available second The mark for the second domain name that URL includes.
Step 2 generates invalid domain name notice or inquiry of the domain name request according to the mark of the second domain name.
In an implementation, client can be using the mark of the second domain name as invalid domain name identification, and is based on the invalid domain name Mark generates invalid domain name notice, and invalid domain name notice carries the mark of the second domain name.Client can be in real time by invalid domain Name notice is sent to server-side, and client can also be invalid by generating in the currently transmitted period according to preset sending cycle Domain name notice, is sent to server-side together.
Client can also be using the mark of the second domain name as invalid domain name identification, and is generated based on the invalid domain name identification Inquiry of the domain name request, inquiry of the domain name request to carry the mark of the second domain name.Inquiry of the domain name can be requested to send out by client in real time It send to server-side, inquiry of the domain name request can also be sent to server-side when sending resource request by client.
In the embodiment of the present application, when client receives the Notice Of Nonavailability of target resource, the 2nd URL includes second is obtained The mark of domain name, and invalid domain name notice or inquiry of the domain name request are generated according to the mark of the second domain name.Client can as a result, The case where being obtained in real time according to target resource as a result, determine whether there is invalid domain name, and invalid domain name will be present in time is anti- It is fed to server-side, so that invalid domain name is timely revised as effective domain name by server-side, so that user can obtain in time Target resource improves user experience.
As shown in fig. 6, concrete processing procedure is as follows present invention also provides a kind of example of resource acquiring method:
Step 601, raw based on preset domain name when server-side detects that the first currently stored domain name is invalid domain name At rule, the second domain name is generated.
In an implementation, the concrete processing procedure of this step is identical as step 201.
Step 602, the second domain name is sent to each client by server-side.
In an implementation, the concrete processing procedure of this step is identical as step 202.
Step 603, when client receives the second domain name that preset server-side is sent, the second domain name is stored.
In an implementation, the concrete processing procedure of this step is identical as step 501.
Step 604, when client detects the selection instruction of corresponding target resource, resource request is sent to server-side.
In an implementation, the concrete processing procedure of this step is identical as step 502.
Step 605, it when server-side receives the resource request for carrying target resource identifier of client transmission, obtains The corresponding destination path of target resource identifier.
In an implementation, the concrete processing procedure of this step is identical as step 203.
Step 606, destination path is sent to client by server-side so that client by the second domain name and destination path into Row splicing obtains the 2nd URL of target resource.
In an implementation, the concrete processing procedure of this step is identical as step 204.
Step 607, client receives the destination path that server-side is sent.
In an implementation, the concrete processing procedure of this step is identical as step 503.
Step 608, the second domain name and destination path are carried out splicing by client, obtain the 2nd URL of target resource.
In an implementation, the concrete processing procedure of this step is identical as step 504.
Step 609, client obtains target resource by the 2nd URL.
In an implementation, the concrete processing procedure of this step is identical as step 505.
A kind of resource acquiring method and device provided by the embodiments of the present application, server-side can detect it is currently stored When first domain name is invalid domain name, the second domain name is generated based on preset domain name create-rule and is then sent to the second domain name Each client;After each client receives the second domain name, the second domain name is stored.Server-side can receive client transmission When carrying the resource request of target resource identifier, the corresponding destination path of target resource identifier is obtained, and destination path is sent out Give client;Client splices the second domain name and destination path, then the 2nd URL for obtaining target resource passes through 2nd URL obtains target resource.Since this programme is when the first currently stored domain name is invalid domain name, the second domain name is generated, And the second domain name is sent to each client, therefore, client can obtain effective second domain name, by the second domain name and reception To destination path spliced to obtain the 2nd URL, then target resource can be obtained based on the 2nd URL, it is a large amount of to avoid replacement URL comprising the invalid domain name can save the time for obtaining target resource, improve user experience.
The embodiment of the present application provides a kind of resource acquisition device, and described device is applied to server-side, as shown in fig. 7, institute Stating device includes:
First generation module 710, for being based on preset when detecting the first currently stored domain name is invalid domain name Domain name create-rule generates the second domain name;
First sending module 720, for second domain name to be sent to each client;
First obtains module 730, for when the resource request for carrying target resource identifier for receiving client transmission When, obtain the corresponding destination path of the target resource identifier;
Second sending module 740, for the destination path to be sent to the client.
Optionally, described device further include:
Second obtains module, for obtaining the first uniform resource position mark URL to be stored, and determines the first URL Corresponding first index;
Extraction module, for extracting the first domain name and first that the first URL includes respectively from the first URL Path;
First memory module stores first domain name and first index for corresponding, obtains index and domain name Corresponding relationship;
Second memory module stores the first path and first index for corresponding, obtains index and path Corresponding relationship.
Optionally, described device further include:
Modified module, for, with the corresponding relationship of domain name, first domain name being revised as described the in the index Two domain names.
Optionally, the first acquisition module includes:
First determines that submodule determines the mesh for the corresponding relationship of resource identification according to the pre-stored data and index Mark corresponding second index of resource identification;
Second determines submodule, for the corresponding relationship based on pre-stored index and path, determines second rope Draw corresponding destination path.
Optionally, first sending module includes:
Third determines submodule, for the corresponding relationship based on pre-stored index and domain name, determines second rope Draw corresponding second domain name;
Sending submodule, for the mark of second domain name and the destination path to be sent to the client.
Optionally, described device further include:
First receiving module, for receiving invalid domain name notice, the invalid domain name notice carries invalid domain name identification;
First determining module, for corresponding first domain name of the invalid domain name identification to be determined as invalid domain name.
Optionally, described device further include:
Second receiving module carries in domain name inquiry request for receiving the inquiry of the domain name request of client transmission There is the mark of first domain name;
Second determining module, for when the mark for finding first domain name in pre-stored domain name blacklist When, first domain name is determined as invalid domain name.
The embodiment of the present application also provides a kind of resource acquisition device, described device is applied to client, as shown in figure 8, Described device includes:
Third receiving module 810, for storing described second when receiving the second domain name that preset server-side is sent Domain name;
Third sending module 820, for when detecting the selection instruction of corresponding target resource, Xiang Suoshu server-side to be sent Resource request, the resource request carry the target resource identifier of the target resource of request;
4th receiving module 830, the destination path sent for receiving the server-side;
Splicing module 840 obtains the target for second domain name and the destination path to be carried out splicing 2nd URL of resource;
Third obtains module 850, for obtaining the target resource by the 2nd URL.
Optionally, described device further include:
5th receiving module, for receiving the mark for the second domain name that the server-side is sent;
4th obtains module, for the mark according to second domain name, from pre-stored each domain name described in acquisition Second domain name.
Optionally, described device further include:
5th obtains module, for when receiving the Notice Of Nonavailability of target resource, obtain that the 2nd URL includes the The mark of two domain names;
Second generation module generates invalid domain name notice or inquiry of the domain name is asked for the mark according to second domain name It asks.
A kind of resource acquiring method and device provided by the embodiments of the present application, server-side can detect it is currently stored When first domain name is invalid domain name, the second domain name is generated based on preset domain name create-rule and is then sent to the second domain name Each client;After each client receives the second domain name, the second domain name is stored.Server-side can receive client transmission When carrying the resource request of target resource identifier, the corresponding destination path of target resource identifier is obtained, and destination path is sent out Give client;Client splices the second domain name and destination path, then the 2nd URL for obtaining target resource passes through 2nd URL obtains target resource.Since this programme is when the first currently stored domain name is invalid domain name, the second domain name is generated, And the second domain name is sent to each client, therefore, client can obtain effective second domain name, by the second domain name and reception To destination path spliced to obtain the 2nd URL, then target resource can be obtained based on the 2nd URL, it is a large amount of to avoid replacement URL comprising the invalid domain name can save the time for obtaining target resource, improve user experience.
The embodiment of the present application also provides a kind of server-sides, as shown in figure 9, including processor 901, communication interface 902, depositing Reservoir 903 and communication bus 904, wherein processor 901, communication interface 902, memory 903 are completed by communication bus 904 Mutual communication,
Memory 903, for storing computer program;
Processor 901 when for executing the program stored on memory 903, realizes following steps:
When detecting the first currently stored domain name is invalid domain name, it is based on preset domain name create-rule, generates the Two domain names;
Second domain name is sent to each client;
When receiving the resource request for carrying target resource identifier of client transmission, the target resource mark is obtained Know corresponding destination path;
The destination path is sent to the client.
Optionally, the method also includes:
The first uniform resource position mark URL to be stored is obtained, and determines corresponding first index of the first URL;
From the first URL, the first domain name and first path that the first URL includes are extracted respectively;
It is corresponding to store first domain name and first index, obtain the corresponding relationship of index with domain name;
It is corresponding to store the first path and first index, obtain the corresponding relationship of index with path.
Optionally, it is described be based on preset domain name create-rule, generate the second domain name after, further includes:
In the index and the corresponding relationship of domain name, first domain name is revised as second domain name.
Optionally, the corresponding destination path of the target resource identifier that obtains includes:
The corresponding relationship of resource identification and index according to the pre-stored data determines the target resource identifier corresponding second Index;
Based on the corresponding relationship of pre-stored index and path, the corresponding destination path of second index is determined.
Optionally, described the destination path is sent to the client to include:
Based on the corresponding relationship of pre-stored index and domain name, corresponding second domain name of second index is determined;
The mark of second domain name and the destination path are sent to the client.
Optionally, the method also includes:
Invalid domain name notice is received, the invalid domain name notice carries invalid domain name identification;
Corresponding first domain name of the invalid domain name identification is determined as invalid domain name.
Optionally, the method also includes:
The inquiry of the domain name request that client is sent is received, the mark of first domain name is carried in domain name inquiry request Know;
If finding the mark of first domain name in pre-stored domain name blacklist, by first domain name It is determined as invalid domain name.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
A kind of resource acquiring method and device provided by the embodiments of the present application, server-side can detect it is currently stored When first domain name is invalid domain name, the second domain name is generated based on preset domain name create-rule and is then sent to the second domain name Each client;After each client receives the second domain name, the second domain name is stored.Server-side can receive client transmission When carrying the resource request of target resource identifier, the corresponding destination path of target resource identifier is obtained, and destination path is sent out Give client;Client splices the second domain name and destination path, then the 2nd URL for obtaining target resource passes through 2nd URL obtains target resource.Since this programme is when the first currently stored domain name is invalid domain name, the second domain name is generated, And the second domain name is sent to each client, therefore, client can obtain effective second domain name, by the second domain name and reception To destination path spliced to obtain the 2nd URL, then target resource can be obtained based on the 2nd URL, it is a large amount of to avoid replacement URL comprising the invalid domain name can save the time for obtaining target resource, improve user experience.
The embodiment of the present application also provides a kind of clients, as shown in Figure 10, including processor 1001, communication interface 1002, memory 1003 and communication bus 1004, wherein processor 1001, communication interface 1002, memory 1003 pass through communication Bus 1004 completes mutual communication,
Memory 1003, for storing computer program;
Processor 1001 when for executing the program stored on memory 1003, realizes following steps:
When receiving the second domain name that preset server-side is sent, second domain name is stored;
When detecting the selection instruction of corresponding target resource, Xiang Suoshu server-side sends resource request, and the resource is asked Seek the target resource identifier for carrying the target resource of request;
Receive the destination path that the server-side is sent;
Second domain name and the destination path are subjected to splicing, obtain the 2nd URL of the target resource;
By the 2nd URL, the target resource is obtained.
Optionally, described that second domain name and the destination path are subjected to splicing, obtain the target resource The 2nd URL before, further includes:
Receive the mark for the second domain name that the server-side is sent;
According to the mark of second domain name, second domain name is obtained from pre-stored each domain name.
Optionally, the method also includes:
When receiving the Notice Of Nonavailability of target resource, the mark for the second domain name that the 2nd URL includes is obtained;
According to the mark of second domain name, invalid domain name notice or inquiry of the domain name request are generated.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
A kind of resource acquiring method and device provided by the embodiments of the present application, server-side can detect it is currently stored When first domain name is invalid domain name, the second domain name is generated based on preset domain name create-rule and is then sent to the second domain name Each client;After each client receives the second domain name, the second domain name is stored.Server-side can receive client transmission When carrying the resource request of target resource identifier, the corresponding destination path of target resource identifier is obtained, and destination path is sent out Give client;Client splices the second domain name and destination path, then the 2nd URL for obtaining target resource passes through 2nd URL obtains target resource.Since this programme is when the first currently stored domain name is invalid domain name, the second domain name is generated, And the second domain name is sent to each client, therefore, client can obtain effective second domain name, by the second domain name and reception To destination path spliced to obtain the 2nd URL, then target resource can be obtained based on the 2nd URL, it is a large amount of to avoid replacement URL comprising the invalid domain name can save the time for obtaining target resource, improve user experience.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described money when being executed by processor The step of method that source obtains.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that the method that computer executes any resource acquisition in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc..
A kind of resource acquiring method and device provided by the embodiments of the present application, server-side can detect it is currently stored When first domain name is invalid domain name, the second domain name is generated based on preset domain name create-rule and is then sent to the second domain name Each client;After each client receives the second domain name, the second domain name is stored.Server-side can receive client transmission When carrying the resource request of target resource identifier, the corresponding destination path of target resource identifier is obtained, and destination path is sent out Give client;Client splices the second domain name and destination path, then the 2nd URL for obtaining target resource passes through 2nd URL obtains target resource.Since this programme is when the first currently stored domain name is invalid domain name, the second domain name is generated, And the second domain name is sent to each client, therefore, client can obtain effective second domain name, by the second domain name and reception To destination path spliced to obtain the 2nd URL, then target resource can be obtained based on the 2nd URL, it is a large amount of to avoid replacement URL comprising the invalid domain name can save the time for obtaining target resource, improve user experience.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application It is interior.

Claims (10)

1. a kind of resource acquiring method, which is characterized in that the method is applied to server-side, which comprises
When detecting the first currently stored domain name is invalid domain name, it is based on preset domain name create-rule, generates the second domain Name;
Second domain name is sent to each client;
When receiving the resource request for carrying target resource identifier of client transmission, the target resource identifier pair is obtained The destination path answered;
The destination path is sent to the client, so that the client is by second domain name and the destination path Splicing is carried out, the second uniform resource position mark URL of target resource is obtained.
2. the method according to claim 1, wherein the method also includes:
The first URL to be stored is obtained, and determines corresponding first index of the first URL;
From the first URL, the first domain name and first path that the first URL includes are extracted respectively;
It is corresponding to store first domain name and first index, the corresponding relationship of index with domain name is obtained, so that the service End is according to corresponding first index of resource identification and the corresponding relationship indexed with domain name to resource response request, really Fixed described first indexes corresponding first domain name;
It is corresponding to store the first path and first index, the corresponding relationship of index with path is obtained, so that the service End is according to corresponding first index of resource identification and the corresponding relationship indexed with path to resource response request, really Fixed described first indexes corresponding first path.
3. according to the method described in claim 2, it is characterized in that, described be based on preset domain name create-rule, generation second After domain name, further includes:
In the index and the corresponding relationship of domain name, first domain name is revised as second domain name.
4. the method according to claim 1, wherein described obtain the corresponding target road of the target resource identifier Diameter includes:
The corresponding relationship of resource identification and index according to the pre-stored data determines corresponding second rope of the target resource identifier Draw;
Based on the corresponding relationship of pre-stored index and path, the corresponding destination path of second index is determined.
5. according to the method described in claim 4, it is characterized in that, described be sent to the client packet for the destination path It includes:
Based on the corresponding relationship of pre-stored index and domain name, corresponding second domain name of second index is determined;
The mark of second domain name and the destination path are sent to the client.
6. a kind of resource acquiring method, which is characterized in that the method is applied to client, which comprises
When receiving the second domain name that preset server-side is sent, second domain name is stored;
When detecting the selection instruction of corresponding target resource, Xiang Suoshu server-side sends resource request, and the resource request is taken The target resource identifier of the target resource with request;
Receive the destination path that the server-side is sent;
Second domain name and the destination path are subjected to splicing, obtain the 2nd URL of the target resource;
By the 2nd URL, the target resource is obtained.
7. according to the method described in claim 6, it is characterized in that, described carry out second domain name and the destination path Splicing, before obtaining the 2nd URL of the target resource, further includes:
Receive the mark for the second domain name that the server-side is sent;
According to the mark of second domain name, second domain name is obtained from pre-stored each domain name.
8. according to the method described in claim 6, it is characterized in that, the method also includes:
When receiving the Notice Of Nonavailability of target resource, the mark for the second domain name that the 2nd URL includes is obtained;
According to the mark of second domain name, invalid domain name notice or inquiry of the domain name request are generated.
9. a kind of resource acquisition device, which is characterized in that described device is applied to server-side, and described device includes:
First generation module, for it is raw to be based on preset domain name when detecting the first currently stored domain name is invalid domain name At rule, the second domain name is generated;
First sending module, for second domain name to be sent to each client;
First obtains module, for obtaining when receiving the resource request for carrying target resource identifier of client transmission The corresponding destination path of the target resource identifier;
Second sending module, for the destination path to be sent to the client.
10. a kind of resource acquisition device, which is characterized in that described device is applied to client, and described device includes:
Third receiving module, for storing second domain name when receiving the second domain name that preset server-side is sent;
Third sending module, for when detecting the selection instruction of corresponding target resource, Xiang Suoshu server-side to send resource and asks It asks, the resource request carries the target resource identifier of the target resource of request;
4th receiving module, the destination path sent for receiving the server-side;
Splicing module obtains the target resource for second domain name and the destination path to be carried out splicing 2nd URL;
Third obtains module, for obtaining the target resource by the 2nd URL.
CN201811238199.6A 2018-10-23 2018-10-23 Resource acquisition method and device Active CN109446445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811238199.6A CN109446445B (en) 2018-10-23 2018-10-23 Resource acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811238199.6A CN109446445B (en) 2018-10-23 2018-10-23 Resource acquisition method and device

Publications (2)

Publication Number Publication Date
CN109446445A true CN109446445A (en) 2019-03-08
CN109446445B CN109446445B (en) 2022-03-22

Family

ID=65548066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811238199.6A Active CN109446445B (en) 2018-10-23 2018-10-23 Resource acquisition method and device

Country Status (1)

Country Link
CN (1) CN109446445B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416462A (en) * 2020-11-28 2021-02-26 郑州信大捷安信息技术股份有限公司 Offline H5 application loading method and system
CN113168323A (en) * 2019-05-05 2021-07-23 Oppo广东移动通信有限公司 Resource adding method, management device and computer storage medium
CN113656713A (en) * 2021-08-23 2021-11-16 北京奇艺世纪科技有限公司 Network resource processing method, device and system

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000112691A (en) * 1998-10-07 2000-04-21 Seiko Epson Corp Network printing system, network printer and network printing method
US20030033429A1 (en) * 2001-07-30 2003-02-13 Yutaka Myoki Information acquiring system, information processing device, information processing method, program, and medium
CN1716255A (en) * 2004-07-01 2006-01-04 微软公司 Dispersing search engine results by using page category information
CN101064641A (en) * 2006-04-28 2007-10-31 国际商业机器公司 Method and system for attribute based index and/or query of Web service resource
CN101197843A (en) * 2007-11-13 2008-06-11 华为技术有限公司 Page reorientation method and wireless application protocol gateway
CN101650715A (en) * 2008-08-12 2010-02-17 厦门市美亚柏科信息股份有限公司 Method and device for screening links on web pages
CN102137014A (en) * 2011-03-11 2011-07-27 华为技术有限公司 Resource management method, system and resource manager
US20120265735A1 (en) * 2011-04-12 2012-10-18 Mcmillan Francis Gavin Methods and apparatus to generate a tag for media content
CN102902780A (en) * 2012-09-28 2013-01-30 五八有限公司 Dynamic matching method and dynamic matching device of uniform resource locator (URL)
CN103365865A (en) * 2012-03-29 2013-10-23 腾讯科技(深圳)有限公司 Methods and devices for storing and downloading data
US20150317089A1 (en) * 2014-05-02 2015-11-05 Via Technologies, Inc. System and method for managing expansion read-only memory and management host thereof
CN105338072A (en) * 2015-10-20 2016-02-17 上海斐讯数据通信技术有限公司 HTTP (hyper text transport protocol) redirecting method and routing equipment
CN105721479A (en) * 2016-03-02 2016-06-29 北京网康科技有限公司 URL filtering method and device
CN106022126A (en) * 2016-05-06 2016-10-12 哈尔滨工程大学 A webpage feature extracting method for WEB Trojan horse detection
US20160342981A1 (en) * 2015-05-20 2016-11-24 402 Technologies S.A. Resource Transfer System
US20170331782A1 (en) * 2016-05-10 2017-11-16 Go Daddy Operating Company, LLC Verifying character sets in domain name requests

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000112691A (en) * 1998-10-07 2000-04-21 Seiko Epson Corp Network printing system, network printer and network printing method
US20030033429A1 (en) * 2001-07-30 2003-02-13 Yutaka Myoki Information acquiring system, information processing device, information processing method, program, and medium
CN1716255A (en) * 2004-07-01 2006-01-04 微软公司 Dispersing search engine results by using page category information
CN101064641A (en) * 2006-04-28 2007-10-31 国际商业机器公司 Method and system for attribute based index and/or query of Web service resource
CN101197843A (en) * 2007-11-13 2008-06-11 华为技术有限公司 Page reorientation method and wireless application protocol gateway
CN101650715A (en) * 2008-08-12 2010-02-17 厦门市美亚柏科信息股份有限公司 Method and device for screening links on web pages
CN102137014A (en) * 2011-03-11 2011-07-27 华为技术有限公司 Resource management method, system and resource manager
US20120265735A1 (en) * 2011-04-12 2012-10-18 Mcmillan Francis Gavin Methods and apparatus to generate a tag for media content
CN103365865A (en) * 2012-03-29 2013-10-23 腾讯科技(深圳)有限公司 Methods and devices for storing and downloading data
CN102902780A (en) * 2012-09-28 2013-01-30 五八有限公司 Dynamic matching method and dynamic matching device of uniform resource locator (URL)
US20150317089A1 (en) * 2014-05-02 2015-11-05 Via Technologies, Inc. System and method for managing expansion read-only memory and management host thereof
US20160342981A1 (en) * 2015-05-20 2016-11-24 402 Technologies S.A. Resource Transfer System
CN105338072A (en) * 2015-10-20 2016-02-17 上海斐讯数据通信技术有限公司 HTTP (hyper text transport protocol) redirecting method and routing equipment
CN105721479A (en) * 2016-03-02 2016-06-29 北京网康科技有限公司 URL filtering method and device
CN106022126A (en) * 2016-05-06 2016-10-12 哈尔滨工程大学 A webpage feature extracting method for WEB Trojan horse detection
US20170331782A1 (en) * 2016-05-10 2017-11-16 Go Daddy Operating Company, LLC Verifying character sets in domain name requests

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
柴文磊: ""301重定向在地址转换中的应用"", 《信息安全与技术》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113168323A (en) * 2019-05-05 2021-07-23 Oppo广东移动通信有限公司 Resource adding method, management device and computer storage medium
CN112416462A (en) * 2020-11-28 2021-02-26 郑州信大捷安信息技术股份有限公司 Offline H5 application loading method and system
CN112416462B (en) * 2020-11-28 2022-04-08 郑州信大捷安信息技术股份有限公司 Offline H5 application loading method and system
CN113656713A (en) * 2021-08-23 2021-11-16 北京奇艺世纪科技有限公司 Network resource processing method, device and system
CN113656713B (en) * 2021-08-23 2023-07-21 北京奇艺世纪科技有限公司 Network resource processing method, device and system

Also Published As

Publication number Publication date
CN109446445B (en) 2022-03-22

Similar Documents

Publication Publication Date Title
CN102647482B (en) Method and system for accessing website
CN105446750B (en) The method and apparatus that WebApp starting runs, generates image file
US11012339B2 (en) Web site reachability management for content browsing
US20170168881A1 (en) Process chain discovery across communication channels
WO2014134189A1 (en) Sharing application states
CN111460129B (en) Method, device, electronic equipment and storage medium for generating identification
CN109446445A (en) A kind of resource acquiring method and device
WO2021120763A1 (en) Network card binding method and apparatus for multi-network card server, and electronic device and storage medium
CN104967644A (en) Message push method, apparatus and system
WO2021023149A1 (en) Method and apparatus for dynamically returning message
CN105516390A (en) Method and device for managing domain name
JP6779307B2 (en) Method and device for page display
EP2618297A1 (en) Operation information generation device
CN109471713B (en) Method and device for inquiring information
CN107360036A (en) A kind of network failure locating method, terminal and server
CN112115103B (en) File address display method and device, electronic equipment and readable storage medium
US9680697B2 (en) Dynamic product installation based on user feedback
CN102904935B (en) Downloading method, downloading device and downloading system based on home gateway
US20140040479A1 (en) Method for a self organizing load balance in a cloud file server network
CN112948138A (en) Method and device for processing message
CN105847400A (en) Business changing method and system based on agent server
CN113590985B (en) Page jump configuration method and device, electronic equipment and computer readable medium
CN109495319A (en) The fault message of CDN node determines method, device and equipment
CN114401320A (en) Sub-application access method, system, block chain platform, gateway and storage medium
CN110875831B (en) Method and device for monitoring network quality

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190606

Address after: Room A-3010, 2nd floor, No. 3 Courtyard, 30 Shixing Street, Shijingshan District, Beijing

Applicant after: Beijing happy I unlimited Technology Co., Ltd.

Address before: The Cayman Islands Kumar wan na

Applicant before: Happy honey Company Limited

GR01 Patent grant
GR01 Patent grant