CN108566411A - Static resource acquisition methods, electronic equipment and storage medium - Google Patents
Static resource acquisition methods, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN108566411A CN108566411A CN201810124421.3A CN201810124421A CN108566411A CN 108566411 A CN108566411 A CN 108566411A CN 201810124421 A CN201810124421 A CN 201810124421A CN 108566411 A CN108566411 A CN 108566411A
- Authority
- CN
- China
- Prior art keywords
- static
- static resource
- static data
- data
- client
- 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.)
- Withdrawn
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Abstract
A kind of static resource acquisition methods of present invention offer, electronic equipment and storage medium, static resource acquisition methods include:It receives the first static resource that client is sent and obtains request, wherein first static resource obtains the storage mark and storage time that request includes the corresponding static data being stored in the client;And storage mark and storage time according to the static data, judge whether the static data changes in memory cache;If it is not, then sending the non-modification information of static resource to the client so that the client transfers the static data being stored in the client according to the non-modification information of the static resource.The present invention can ensure that client accurately and quickly obtains static resource, and can effectively improve interface access speed.
Description
Technical field
The present invention relates to technical field of data transmission, and in particular to a kind of static resource acquisition methods, electronic equipment and deposits
Storage media.
Background technology
Server is the service that provides of client mostly by http interfaces at present, and promotes the best of interface response speed
Selection is that application memory caches to obtain static resource, and common memory cache is data buffer storage and page cache, and is hit slow
Backend resources access times can be effectively reduced after depositing, to achieve the purpose that improving performance.
Currently, obtain static resource mode be server receive static resource request after, application cache service and
Strategy goes back static resource data (the i.e. http body) response of client request, although this mode can ensure client
End can get static resource, but the interface for seldom changing, and but there is waste bandwidth resource and obtain static resource
The problem of inefficiency, and interface access speed can not be effectively improved.
Therefore, how providing one kind can ensure that client accurately obtains static resource and can effectively improve interface
The static resource acquisition methods of access speed, are a problem to be solved.
Invention content
For the problems of the prior art, a kind of static resource acquisition methods of present invention offer, electronic equipment and storage are situated between
Matter can ensure that client accurately and quickly obtains static resource, and can effectively improve interface access speed.
In order to solve the above technical problems, the present invention provides following technical scheme:
In a first aspect, the present invention provides a kind of static resource acquisition methods, the static resource acquisition methods include:
It receives the first static resource that client is sent and obtains request, wherein first static resource obtains in request
Storage mark and storage time including being stored in the corresponding static data in the client;
And storage mark and storage time according to the static data, the static data is judged in memory cache
Whether change;
If it is not, then sending the non-modification information of static resource to the client so that the client is provided according to the static state
The non-modification information in source transfers the static data being stored in the client.
Further, the static resource acquisition methods further include:
If judgement knows that the static data changes, sends static resource to the corresponding client and changed
Information, wherein modification information includes that static data after change, static data after the change are deposited to the static resource
Storage mark and change time.
Further, the static resource acquisition methods further include:
It receives the second static resource that the client is sent and obtains request, wherein the second static resource acquisition is asked
Ask include corresponding static data signature identification, then corresponding static number is searched according to the signature identification of the static data
According to the storage mark and storage time of, the static data;
And the static data, the storage mark of the static data and storage time are sent to the corresponding visitor
Family end.
Second aspect, the present invention provide a kind of static resource acquisition methods, and the static resource acquisition methods include:
Obtain static resource acquisition instruction, wherein the static resource acquisition instruction includes corresponding static data
Signature identification;
Search whether itself is stored with the static data according to the signature identification of the static data;
If so, sending the first static resource to server obtains request, wherein first static resource obtains request
Include the storage mark and storage time of the corresponding static data for being stored in itself;
It is unchanged according to the static resource and if receiving the non-modification information of static resource that the server is sent
More acquisition of information is stored in the static data of itself.
Further, the static resource acquisition methods further include:
If receiving static resource that the server is sent modification information, wherein the static resource has changed letter
Breath includes the static data after change, and, the storage mark of the static data after the change and change time, then store institute
State the static data after change, the storage mark of the static data after the change and change time.
Further, the static resource acquisition methods further include:
If lookup knows that itself does not store the static data, sends the acquisition of the second static resource to the server and ask
It asks, wherein second static resource obtains the signature identification that request includes corresponding static data so that the server
Corresponding static data, the storage mark of the static data and change are searched and sent according to the signature identification of the static data
Time;
And receive and store corresponding static data, the static data that the server sends storage mark and
Change the time.
The third aspect, the present invention provides a kind of electronic equipment, including memory, processor and storage are on a memory and can
The computer program run on a processor, the processor realize the static resource acquisition methods when executing described program
Step.
Fourth aspect, the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, the calculating
Machine program realizes the step of static resource acquisition methods when being executed by processor.
5th aspect, the present invention provides a kind of electronic equipment, including memory, processor and storage are on a memory and can
The computer program run on a processor, the processor realize the static resource acquisition methods when executing described program
Step.
6th aspect, the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, the calculating
Machine program realizes the step of static resource acquisition methods when being executed by processor.
As shown from the above technical solution, a kind of static resource acquisition methods provided by the invention, by receiving client hair
The first static resource sent obtains request, wherein it includes being stored in the client that first static resource, which obtains request,
Corresponding static data storage mark and storage time;And when being identified and being stored according to the storage of the static data
Between, judge whether the static data changes in memory cache;If it is not, it is unchanged then to send static resource to the client
More information so that the client transfers the static data being stored in the client according to the non-modification information of the static resource,
It can ensure that client accurately and quickly obtains static resource, and interface access speed can be effectively improved, and effectively save
Bandwidth resources, and reliably improve the acquisition efficiency of static resource.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow signal of specific implementation mode of the static resource acquisition methods in the embodiment of the present invention one
Figure;
Fig. 2 is a kind of specific embodiment party that static resource acquisition methods in the embodiment of the present invention one include step 400
The flow diagram of formula;
Fig. 3 is the flow signal of another specific implementation mode of the static resource acquisition methods in the embodiment of the present invention two
Figure;
Fig. 4 is a kind of specific reality that static resource acquisition methods in the embodiment of the present invention two include step E01 and E02
Apply the flow diagram of mode;
Fig. 5 is a kind of structural representation of specific implementation mode of the static resource acquisition system in the embodiment of the present invention three
Figure;
Fig. 6 is the structural representation of another specific implementation mode of the static resource acquisition system in the embodiment of the present invention four
Figure;
Fig. 7 is the structural schematic diagram of the embodiment of the present invention five and the electronic equipment in embodiment six.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical solution in the embodiment of the present invention carries out clear, complete description, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
The every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
The embodiment of the present invention one provides a kind of a kind of specific implementation mode of static resource acquisition methods, referring to Fig. 1, institute
It states static resource acquisition methods and specifically includes following content:
Step 100:It receives the first static resource that client is sent and obtains request, wherein first static resource obtains
It includes the storage mark and storage time for the corresponding static data being stored in the client to take request.
In step 100, server receives the first static resource that client is sent and obtains request, the described first static money
Source obtains the storage mark and storage time that request includes the corresponding static data being stored in the client.It is appreciated that
, first static resource obtains request and is sent out by client, and the client is sending out first static state
The static resource acquisition instruction that user issues first is got before resource acquisition request, wherein the static resource acquisition instruction
It include the signature identification of corresponding static data;Then the client is searched certainly according to the signature identification of the static data
Whether body is stored with the static data;If so, sending the first static resource to server obtains request, wherein described first
Static resource obtains the storage mark and storage time that request includes the corresponding static data for being stored in itself.
In a kind of citing, the client includes local data base, and the client is quiet by what is received every time
The state data and corresponding signature identification of the static data, storage mark and storage time are stored in the local data base, described
The citing of local data base is referring to table 1.
Table 1
It follows that the client first gets the static resource acquisition instruction that user issues, wherein the static resource
Acquisition instruction includes the signature identification A2 of corresponding static data;Then the client according to the A2 as shown in table 1
Local data library lookup itself be stored with static data C2;Then the user end to server sends the first static resource
Obtain request, wherein first static resource obtains the storage that request includes the corresponding static data for being stored in itself
Identify B2 and storage time 2018.01.17,14:01.
Step 200:According to the storage mark and storage time of the static data, the static number is judged in memory cache
According to whether changing, if it is not, thening follow the steps 300.
In step 200, it after the server receives the acquisition request of the first static resource, reads and obtains static number therein
According to storage mark and storage time, depositing for the static data is then searched in the memory cache in being stored in the server
Storage mark, and whether changed according to the static data content and storage time that judge the static data, if not becoming
Change, then illustrates that the static resource of the client request is consistent with the static resource content being stored in the client itself.
Step 300:The non-modification information of static resource is sent to the client so that the client is provided according to the static state
The non-modification information in source transfers the static data being stored in the client.
In step 300, the server sends the non-modification information of static resource, client's termination to the client
Receive and read it is described send static resource non-modification information, then the client is directly adjusted according to the non-modification information of the static resource
The static data in the local data base for being stored in the client is taken, the acquisition process of static resource is completed.
In a specific embodiment, referring to Fig. 2, if according to the storage mark and storage time of the static data,
Judge that obtaining the static data changes, and thens follow the steps 400, the step 400 specifically includes as follows in memory cache
Content:
Step 400:Static resource modification information is sent to the corresponding client, wherein the static resource is
Modification information includes the static data after change, the storage mark of the static data after the change and change time.
In a kind of concrete example, the server includes memory cache database, and the server-side will connect every time
The static data received the and corresponding signature identification of the static data, storage mark and storage time are stored in the memory cache
Database, and the data in the memory cache database are updated, the citing of the memory cache database is referring to table 2.
Table 2
If it follows that the user end to server, which sends the first static resource, obtains request, wherein described first is quiet
State resource acquisition request includes the storage mark B2 and storage time for the corresponding static data for being stored in itself
2018.01.17 14:01, then the server according to the storage identify B2 find C4 in the memory cache database, but
The storage time (change time) of the C4 is 2018.01.17,14:23, it follows that the corresponding static datas of storage mark B2
It has been changed that, different from the content stored in the local data base of client, therefore, the server is sent out to the client
Send static resource modification information, wherein the static resource modification information include change after static data C4, the change
The storage mark B2 and change time 2018.01.17 of static data after more, 14:23 so that the client is received and read
The static resource modification information include the static data C4 after change, static data after the change storage mark B2 and
Change time 2018.01.17,14:23, and the above is corresponded in update to local data base.
As can be seen from the above description, the static resource acquisition methods that the embodiment of the present invention provides can ensure client standard
Static resource is obtained really and rapidly, and interface access speed can be effectively improved, and effectively save bandwidth resources, and is reliable
Ground improves the acquisition efficiency of static resource.
In a kind of concrete example, the static resource acquisition methods further include step 501 and 502, the step 501 and
502 specifically include following content:
Step 501:It receives the second static resource that the client is sent and obtains request, wherein the described second static money
Source obtains the signature identification that request includes corresponding static data, then is searched and corresponded to according to the signature identification of the static data
Static data, the static data storage mark and storage time.
Step 502:The static data, the storage mark of the static data and storage time are sent to corresponding described
Client.
If being asked it is understood that the server receives the second static resource acquisition that the client is sent,
Then illustrate that the client is to ask the static resource for the first time, therefore, the server can be directly quiet according to described second
The signature identification of state resource or the static data in request searches the memory cache database, and therefrom by corresponding static number
It is transmitted to the client according to, the storage mark of the static data and storage time so that the client is by the static state
Data, the storage mark of the static data and storage time are stored in the local data base of the client.
As can be seen from the above description, the static resource acquisition methods that the embodiment of the present invention provides can ensure client standard
Static resource is obtained really and rapidly, and reliably improves the acquisition efficiency of static resource.
The embodiment of the present invention two provides a kind of another specific implementation mode of static resource acquisition methods, referring to Fig. 3,
The static resource acquisition methods specifically include following content:
Step A00:Obtain static resource acquisition instruction, wherein the static resource acquisition instruction includes corresponding quiet
The signature identification of state data;
Step B00:Search whether itself is stored with the static data according to the signature identification of the static data, if so,
Then follow the steps C00.
Step C00:The first static resource is sent to server and obtains request, wherein the first static resource acquisition is asked
Ask include the corresponding static data for being stored in itself storage mark and storage time.
In step C00, client first gets the static resource acquisition instruction that user issues, wherein the static money
Source acquisition instruction includes the signature identification of corresponding static data;Then the client is according to the feature of the static data
Whether identifier lookup itself is stored with the static data;If so, sending the first static resource to server obtains request,
In, it includes storing in the storage mark of the corresponding static data of itself and storage that first static resource, which obtains request,
Between so that the server receives the first static resource that client is sent and obtains request, and the server is according to the static state
The storage mark and storage time of data, judge whether the static data changes in memory cache, if it is not, the then clothes
Business device sends the non-modification information of static resource to the client.
Step D00:If receiving the non-modification information of static resource that the server is sent, not according to the static resource
Modification information acquisition is stored in the static data of itself.
In a kind of specific implementation mode, referring to Fig. 4, know that itself does not store the static data, executes step if searching
Rapid E01 and E02, the step E01 and E02 specifically include following content:
Step E01:The second static resource is sent to the server and obtains request, wherein second static resource obtains
It includes the signature identification of corresponding static data to take request so that the server is according to the signature identification of the static data
Search and send corresponding static data, the storage mark of the static data and change time.
In step E01, client sends the second static resource to the server and obtains request, and the server receives
The second static resource sent to the client obtains request, then illustrates that the client is that the static state is asked to provide for the first time
Source, therefore, the server can directly be looked into according to the signature identification of the static data in second static resource or request
The memory cache database is looked for, and therefrom beats corresponding static data, the storage mark of the static data and storage time
Packet is sent to the client.
Step E02:The storage for receiving and storing corresponding static data, the static data that the server is sent identifies
With the change time.
In step E02, the client receives corresponding static data that the server sends, the static data
Storage mark and change time, and by the client by the storage mark and storage time of the static data, the static data
It is stored in the local data base of the client.
As can be seen from the above description, the static resource acquisition methods that the embodiment of the present invention provides can ensure client standard
Static resource is obtained really and rapidly, and interface access speed can be effectively improved, and effectively save bandwidth resources, and is reliable
Ground improves the acquisition efficiency of static resource.
In a kind of specific implementation mode, the static resource acquisition methods further include after step C00, if the client
Termination receives static resource that the server is sent modification information, wherein modification information includes the static resource
Static data after change, and, the storage mark of the static data after the change and change time, F00 is thened follow the steps, institute
It states step F00 and specifically includes following content:
Step F00:When storing the static data after the change, the storage mark of the static data after the change and change
Between.
In step F00, the client stores the static data after the change, static data after the change is deposited
Storage mark and change time.
As can be seen from the above description, the static resource acquisition methods that the embodiment of the present invention provides can ensure client standard
Static resource is obtained really and rapidly, and interface access speed can be effectively improved, and effectively save bandwidth resources, and is reliable
Ground improves the acquisition efficiency of static resource.
It is described the present invention also provides a kind of application example of static resource acquisition methods for further instruction this programme
Static resource acquisition methods specifically include:
S1:Client obtains static resource acquisition instruction, wherein the static resource acquisition instruction includes corresponding quiet
The signature identification of state data.
S2:Client searches whether itself is stored with the static data according to the signature identification of the static data, if so,
S3 is then executed, S10 is thened follow the steps.
S3:User end to server sends the first static resource and obtains request, wherein the first static resource acquisition is asked
Ask include the corresponding static data for being stored in itself storage mark and storage time.
S4:Server receives the first static resource that client is sent and obtains request, wherein first static resource obtains
It includes the storage mark and storage time for the corresponding static data being stored in the client to take request.
S5:Server judges the static state according to the storage mark and storage time of the static data in memory cache
Whether data change, if it is not, S6 is then executed, if so, executing S8.
S6:Server sends the non-modification information of static resource to the client so that the client is according to the static state
The non-modification information of resource transfers the static data being stored in the client, executes S7 later.
S7:If client receives the non-modification information of static resource that the server is sent, according to the static resource
Acquisition of information is not changed is stored in the static data of itself.
S8:Server sends static resource modification information to the corresponding client, wherein the static resource is
Modification information includes the static data after change, the storage mark of the static data after the change and change time.
S9:If the client receives static resource that the server is sent modification information, wherein the static state
Modification information includes static data after change to resource, and, the storage of the static data after change mark and change
Time then stores the static data after the change, the storage mark of the static data after the change and change time.
S10:Client sends the second static resource to the server and obtains request, wherein second static resource
Obtain the signature identification that request includes corresponding static data so that the server is according to the feature mark of the static data
Know and searches and send corresponding static data, the storage mark of the static data and change time.
S11:Server receives the second static resource that the client is sent and obtains request, wherein described second is static
Resource acquisition request includes the signature identification of corresponding static data, then according to the lookup pair of the signature identification of the static data
The storage mark and storage time of the static data, the static data answered.
S12:The static data, the storage mark of the static data and storage time are sent to corresponding institute by server
State client.
S13:Client receives and stores the storage mark of the corresponding static data of the server transmission, the static data
Know and changes the time.
In a kind of concrete example, for interface, will " data " in response body (httpbody) response go back, this
Sample does good enough.But the shape of body bodies is not responding to for the interface seldom become from the angle for saving bandwidth resources
Formula (i.e. 304 modes of Http) informs that customer end contents do not change, and undoubtedly better choice is (on condition that client is
Obtained primary complete data).304 use is most of in static resource access under normal conditions, i.e. html, js,
Css, png etc., the access for dynamic resource is relatively fewer, using the program it is not necessary that server-side is excessively transformed, originally
Caching still maintain original access mode, only need to increase a logical layer on the basis of caching, when client acquisition data
The time of entity token (being referred to as below with ETag) and upper secondary response when taking server-side last time response data
(lastModifyTime), server-side is verified, if change did not occurred for service end data, client uses last
Server-side response data, otherwise server-side issue new ETag and lastModifyTime and message body.Client will be secondary
Information storage local it is corresponding so as to next server-side 304 when use.Use http 304not modify dynamic sockets/service
It is cached, improving performance while reduces bandwidth pressure.
As can be seen from the above description, the static resource acquisition methods that application example of the invention provides, can ensure client
Static resource is accurately and quickly obtained, and interface access speed can be effectively improved, and effectively saves bandwidth resources, and can
The acquisition efficiency of static resource is improved by ground.
The embodiment of the present invention three provides a kind of a kind of specific implementation mode of static resource acquisition system, referring to Fig. 5, institute
It states static resource acquisition system and specifically includes following content:
First static resource obtains request receiving module 10, and the first static resource acquisition for receiving client transmission is asked
It asks, wherein first static resource obtains the storage that request includes the corresponding static data being stored in the client
Mark and storage time.
Static data correction verification module 20, it is slow in memory for the storage mark and storage time according to the static data
It deposits and middle judges whether the static data changes.
Static resource does not change information sending module 30, if not changed for static data, to the client
Send the non-modification information of static resource so that the client is transferred according to the non-modification information of the static resource and is stored in the client
Static data in end.
The embodiment that static resource provided by the invention obtains system specifically can be used for executing in above-described embodiment one
The process flow of the embodiment of static resource acquisition methods, details are not described herein for function, is referred to above method embodiment
Detailed description.
As can be seen from the above description, the static resource that the embodiment of the present invention provides obtains system, can ensure client standard
Static resource is obtained really and rapidly, and interface access speed can be effectively improved, and effectively save bandwidth resources, and is reliable
Ground improves the acquisition efficiency of static resource.
The embodiment of the present invention four provides another specific implementation mode that a kind of static resource obtains system, referring to Fig. 6,
The static resource obtains system and specifically includes following content:
Static resource acquisition instruction receiving module A0, for obtaining static resource acquisition instruction, wherein the static resource
Acquisition instruction includes the signature identification of corresponding static data.
Static data is from storage inspection module B0, for searching whether itself deposits according to the signature identification of the static data
Contain the static data.
First static resource obtain request sending module C0, if for according to the signature identification of the static data search or
Person itself is stored with the static data, then sending the first static resource to server obtains request, wherein the described first static money
Source obtains the storage mark and storage time that request includes the corresponding static data for being stored in itself.
Static resource does not change information receiving module D0, if unchanged for receiving the static resource that the server is sent
More information does not then change acquisition of information according to the static resource and is stored in the static data of itself.
The embodiment that static resource provided by the invention obtains system specifically can be used for executing in above-described embodiment two
The process flow of the embodiment of static resource acquisition methods, details are not described herein for function, is referred to above method embodiment
Detailed description.
As can be seen from the above description, the static resource that the embodiment of the present invention provides obtains system, can ensure client standard
Static resource is obtained really and rapidly, and interface access speed can be effectively improved, and effectively save bandwidth resources, and is reliable
Ground improves the acquisition efficiency of static resource.
The embodiment of the present invention five provides all to be walked in the static resource acquisition methods that can be realized in above-described embodiment one
The specific implementation mode of rapid a kind of electronic equipment, referring to Fig. 7, the electronic equipment specifically includes following content:
Processor (processor) 601, memory (memory) 602, communication interface (Communications
Interface) 603 and bus 604;
Wherein, the processor 601, memory 602, communication interface 603 complete mutual lead to by the bus 604
Letter;The communication interface 603 is transmitted for realizing the information between server and client;
The processor 601 is used to call the computer program in the memory 602, the processor to execute the meter
The Overall Steps in above-described embodiment one are realized when calculation machine program, for example, reality when the processor executes the computer program
Existing following step:
Step 100:It receives the first static resource that client is sent and obtains request, wherein first static resource obtains
It includes the storage mark and storage time for the corresponding static data being stored in the client to take request.
Step 200:According to the storage mark and storage time of the static data, the static number is judged in memory cache
According to whether changing, if it is not, thening follow the steps 300.
Step 300:The non-modification information of static resource is sent to the client so that the client is provided according to the static state
The non-modification information in source transfers the static data being stored in the client.
As can be seen from the above description, the electronic equipment that the embodiment of the present invention provides can ensure that client is accurate and quick
Ground obtains static resource, and can effectively improve interface access speed, and effectively saves bandwidth resources, and reliably improves
The acquisition efficiency of static resource.
The embodiment of the present invention six provides all to be walked in the static resource acquisition methods that can be realized in above-described embodiment two
The specific implementation mode of rapid another electronic equipment, referring to the electronic equipment specifically includes following content:
Processor (processor) 601, memory (memory) 602, communication interface (Communications
Interface) 603 and bus 604;
Wherein, the processor 601, memory 602, communication interface 603 complete mutual lead to by the bus 604
Letter;The communication interface 603 is transmitted for realizing the information between server and client;
The processor 601 is used to call the computer program in the memory 602, the processor to execute the meter
The Overall Steps in above-described embodiment one are realized when calculation machine program, for example, reality when the processor executes the computer program
Existing following step:
Step A00:Obtain static resource acquisition instruction, wherein the static resource acquisition instruction includes corresponding quiet
The signature identification of state data;
Step B00:Search whether itself is stored with the static data according to the signature identification of the static data, if so,
Then follow the steps C00.
Step C00:The first static resource is sent to server and obtains request, wherein the first static resource acquisition is asked
Ask include the corresponding static data for being stored in itself storage mark and storage time.
Step D00:If receiving the non-modification information of static resource that the server is sent, not according to the static resource
Modification information acquisition is stored in the static data of itself.
As can be seen from the above description, the electronic equipment that the embodiment of the present invention provides can ensure that client is accurate and quick
Ground obtains static resource, and can effectively improve interface access speed, and effectively saves bandwidth resources, and reliably improves
The acquisition efficiency of static resource.
The embodiment of the present invention seven provides Overall Steps in the static resource acquisition methods that can realize above-described embodiment one
A kind of computer readable storage medium, be stored with computer program on the computer readable storage medium, the computer journey
The Overall Steps of above-described embodiment one are realized when sequence is executed by processor, for example, the processor executes the computer program
Shi Shixian following step:
Step 100:It receives the first static resource that client is sent and obtains request, wherein first static resource obtains
It includes the storage mark and storage time for the corresponding static data being stored in the client to take request.
Step 200:According to the storage mark and storage time of the static data, the static number is judged in memory cache
According to whether changing, if it is not, thening follow the steps 300.
Step 300:The non-modification information of static resource is sent to the client so that the client is provided according to the static state
The non-modification information in source transfers the static data being stored in the client.
As can be seen from the above description, the computer readable storage medium that the embodiment of the present invention provides, can ensure client
Static resource is accurately and quickly obtained, and interface access speed can be effectively improved, and effectively saves bandwidth resources, and can
The acquisition efficiency of static resource is improved by ground.
The embodiment of the present invention eight provides Overall Steps in the static resource acquisition methods that can realize above-described embodiment two
A kind of computer readable storage medium, be stored with computer program on the computer readable storage medium, the computer journey
The Overall Steps of above-described embodiment one are realized when sequence is executed by processor, for example, the processor executes the computer program
Shi Shixian following step:
Step A00:Obtain static resource acquisition instruction, wherein the static resource acquisition instruction includes corresponding quiet
The signature identification of state data;
Step B00:Search whether itself is stored with the static data according to the signature identification of the static data, if so,
Then follow the steps C00.
Step C00:The first static resource is sent to server and obtains request, wherein the first static resource acquisition is asked
Ask include the corresponding static data for being stored in itself storage mark and storage time.
Step D00:If receiving the non-modification information of static resource that the server is sent, not according to the static resource
Modification information acquisition is stored in the static data of itself.
As can be seen from the above description, the computer readable storage medium that the embodiment of the present invention provides, can ensure client
Static resource is accurately and quickly obtained, and interface access speed can be effectively improved, and effectively saves bandwidth resources, and can
The acquisition efficiency of static resource is improved by ground.
In the description of the present invention, it should be noted that the orientation or positional relationship of the instructions such as term "upper", "lower" is base
It in orientation or positional relationship shown in the drawings, is merely for convenience of description of the present invention and simplification of the description, rather than indicates or imply
Signified device or element must have a particular orientation, with specific azimuth configuration and operation, therefore should not be understood as to this
The limitation of invention.Unless otherwise clearly defined and limited, term " installation ", " connected ", " connection " shall be understood in a broad sense, example
Such as, it may be fixed connection or may be dismantle connection, or integral connection;It can be mechanical connection, can also be to be electrically connected
It connects;It can be directly connected, can also can be indirectly connected through an intermediary the connection inside two elements.For this
For the those of ordinary skill in field, the specific meanings of the above terms in the present invention can be understood according to specific conditions.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one
Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation
There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain
Lid 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 include 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.
Above example is only used to illustrate the technical scheme of the present invention, rather than its limitations;Although with reference to the foregoing embodiments
Invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each implementation
Technical solution recorded in example is modified or equivalent replacement of some of the technical features;And these are changed or replace
It changes, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.
Claims (10)
1. a kind of static resource acquisition methods, which is characterized in that the static resource acquisition methods include:
It receives the first static resource that client is sent and obtains request, wherein first static resource obtains request and includes
It is stored in the storage mark and storage time of the corresponding static data in the client;
And storage mark and storage time according to the static data, the static data is judged in memory cache whether
It changes;
If it is not, then to the client send the non-modification information of static resource so that the client according to the static resource not
Modification information transfers the static data being stored in the client.
2. static resource acquisition methods according to claim 1, which is characterized in that the static resource acquisition methods also wrap
It includes:
If judgement knows that the static data changes, sends static resource to the corresponding client and changed letter
Breath, wherein the static resource modification information include the static data after changing, static data after the change storage
Mark and change time.
3. static resource acquisition methods according to claim 1, which is characterized in that the static resource acquisition methods also wrap
It includes:
It receives the second static resource that the client is sent and obtains request, wherein second static resource obtains in request
Include the signature identification of corresponding static data, then according to the signature identification of the static data search corresponding static data,
The storage mark and storage time of the static data;
And the static data, the storage mark of the static data and storage time are sent to the corresponding client.
4. a kind of static resource acquisition methods, which is characterized in that the static resource acquisition methods include:
Obtain static resource acquisition instruction, wherein the static resource acquisition instruction includes the feature of corresponding static data
Mark;
Search whether itself is stored with the static data according to the signature identification of the static data;
If so, sending the first static resource to server obtains request, wherein first static resource obtains to be wrapped in request
Include the storage mark and storage time of the corresponding static data for being stored in itself;
And if receiving the non-modification information of static resource that the server is sent, letter is not changed according to the static resource
Breath obtains and is stored in the static data of itself.
5. static resource acquisition methods according to claim 4, which is characterized in that the static resource acquisition methods also wrap
It includes:
If receiving static resource that the server is sent modification information, wherein the static resource is in modification information
Including the static data after change, and, the storage mark of the static data after the change and change time, then store the change
The storage of the static data after static data, the change after more identifies and the change time.
6. static resource acquisition methods according to claim 4, which is characterized in that the static resource acquisition methods also wrap
It includes:
If lookup knows that itself does not store the static data, sends the second static resource to the server and obtains request,
Wherein, second static resource obtains the signature identification that request includes corresponding static data so that the server root
When corresponding static data, the storage mark of the static data and change are searched and sent according to the signature identification of the static data
Between;
And receive and store the corresponding static data of the server transmission, the storage mark of the static data and change
Time.
7. a kind of electronic equipment, including memory, processor and storage are on a memory and the calculating that can run on a processor
Machine program, which is characterized in that the processor realizes the static money as described in any one of claims 1 to 3 when executing described program
The step of source acquisition methods.
8. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program is located
It manages and is realized when device executes as described in any one of claims 1 to 3 the step of static resource acquisition methods.
9. a kind of electronic equipment, including memory, processor and storage are on a memory and the calculating that can run on a processor
Machine program, which is characterized in that the processor realizes the static money as described in any one of claim 4 to 6 when executing described program
The step of source acquisition methods.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
It is realized when processor executes as described in any one of claim 4 to 6 the step of static resource acquisition methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810124421.3A CN108566411A (en) | 2018-02-07 | 2018-02-07 | Static resource acquisition methods, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810124421.3A CN108566411A (en) | 2018-02-07 | 2018-02-07 | Static resource acquisition methods, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108566411A true CN108566411A (en) | 2018-09-21 |
Family
ID=63531256
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810124421.3A Withdrawn CN108566411A (en) | 2018-02-07 | 2018-02-07 | Static resource acquisition methods, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108566411A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110944037A (en) * | 2019-10-25 | 2020-03-31 | 浙江大华技术股份有限公司 | Method, computer device and storage medium for client cache change configuration |
CN111367673A (en) * | 2020-03-05 | 2020-07-03 | 山东中创软件商用中间件股份有限公司 | Static resource acquisition method, device and related equipment |
CN111737615A (en) * | 2020-05-14 | 2020-10-02 | 北京百度网讯科技有限公司 | Method and device for acquiring page resources, electronic equipment and readable storage medium |
CN112579877A (en) * | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Information source system control method, device, storage medium and equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6266678B1 (en) * | 1998-12-31 | 2001-07-24 | Computer Associates Think, Inc. | System and method for dynamically viewing contents of a data file |
CN101127783A (en) * | 2007-09-28 | 2008-02-20 | 北京金山软件有限公司 | A website buffering method and device |
CN103701929A (en) * | 2014-01-02 | 2014-04-02 | 中安消技术有限公司 | Method and device for realizing business data caching |
CN106933965A (en) * | 2017-02-08 | 2017-07-07 | 福建省华渔教育科技有限公司 | The method of static resource request |
CN107071007A (en) * | 2017-03-27 | 2017-08-18 | 武汉斗鱼网络科技有限公司 | A kind of method, device and client for obtaining configuration resource |
-
2018
- 2018-02-07 CN CN201810124421.3A patent/CN108566411A/en not_active Withdrawn
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6266678B1 (en) * | 1998-12-31 | 2001-07-24 | Computer Associates Think, Inc. | System and method for dynamically viewing contents of a data file |
CN101127783A (en) * | 2007-09-28 | 2008-02-20 | 北京金山软件有限公司 | A website buffering method and device |
CN103701929A (en) * | 2014-01-02 | 2014-04-02 | 中安消技术有限公司 | Method and device for realizing business data caching |
CN106933965A (en) * | 2017-02-08 | 2017-07-07 | 福建省华渔教育科技有限公司 | The method of static resource request |
CN107071007A (en) * | 2017-03-27 | 2017-08-18 | 武汉斗鱼网络科技有限公司 | A kind of method, device and client for obtaining configuration resource |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112579877A (en) * | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Information source system control method, device, storage medium and equipment |
CN110944037A (en) * | 2019-10-25 | 2020-03-31 | 浙江大华技术股份有限公司 | Method, computer device and storage medium for client cache change configuration |
CN111367673A (en) * | 2020-03-05 | 2020-07-03 | 山东中创软件商用中间件股份有限公司 | Static resource acquisition method, device and related equipment |
CN111737615A (en) * | 2020-05-14 | 2020-10-02 | 北京百度网讯科技有限公司 | Method and device for acquiring page resources, electronic equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108566411A (en) | Static resource acquisition methods, electronic equipment and storage medium | |
CN105095226B (en) | Web page resources loading method and device | |
CN110519401A (en) | Improve method, apparatus, equipment and the storage medium of network Access Success Rate | |
CN104980478B (en) | Sharing method, equipment and system are cached in content distributing network | |
CN107395659A (en) | A kind of method and device of service handling and common recognition | |
CN109117275A (en) | Account checking method, device, computer equipment and storage medium based on data fragmentation | |
CN109067930A (en) | Domain name cut-in method, domain name analytic method, server, terminal and storage medium | |
CN109521962A (en) | A kind of metadata query method, apparatus, equipment and computer readable storage medium | |
CN110471900A (en) | Data processing method and terminal device | |
CN104408073B (en) | Data manipulation method and device | |
CN106060004A (en) | Database access method and database agent node | |
CN106911782A (en) | A kind of method for reading data and device | |
CN105721538A (en) | Data access method and apparatus | |
CN109657174A (en) | Method and apparatus for more new data | |
CN109933585A (en) | Data query method and data query system | |
CN108090000A (en) | A kind of method and system for obtaining CPU register informations | |
CN102404242B (en) | A kind of user profile updating device, electronic equipment and updating method of user information | |
CN108536617A (en) | Buffer memory management method, medium, system and electronic equipment | |
CN112491979A (en) | Network card data packet cache management method, device, terminal and storage medium | |
CN109783518A (en) | A kind of information query method, inquiry unit, storage medium and terminal device | |
CN109561165A (en) | Domain name system configuration method and relevant apparatus | |
CN109446225A (en) | Data cache method, device, computer equipment and storage medium | |
CN112114983B (en) | Communication method, device and equipment based on shared memory | |
CN113643062A (en) | Advertisement display method of novel aggregation advertisement system | |
CN108650306A (en) | A kind of game video caching method, device and computer storage media |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20180921 |