CN110233882A - Page resource access control method, device, system, storage medium and equipment - Google Patents
Page resource access control method, device, system, storage medium and equipment Download PDFInfo
- Publication number
- CN110233882A CN110233882A CN201910433743.0A CN201910433743A CN110233882A CN 110233882 A CN110233882 A CN 110233882A CN 201910433743 A CN201910433743 A CN 201910433743A CN 110233882 A CN110233882 A CN 110233882A
- Authority
- CN
- China
- Prior art keywords
- page resource
- url link
- request
- privately owned
- timestamp
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000004590 computer program Methods 0.000 claims description 14
- 208000033748 Device issues Diseases 0.000 claims 1
- 230000003252 repetitive effect Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000000977 initiatory effect Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 235000011869 dried fruits Nutrition 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- 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/14—Session management
- H04L67/141—Setup of application sessions
-
- 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/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure provides a method, a device, a system, a storage medium and a device for controlling access to page resources, wherein the method comprises the following steps: receiving a URL link request of private page resources, and acquiring request time of the URL link request; acquiring a preset time interval corresponding to the request time; each private page resource corresponds to at least two continuous preset time intervals; generating a timestamp of the URL link request according to a preset time interval; the timestamps corresponding to the same preset time interval are the same, and the timestamps corresponding to the non-same preset time intervals are different; a URL link is generated that includes a timestamp. According to the method and the device, the obtained URL links are the same when the same private page resource is repeatedly requested to be accessed within the preset time interval, and then the private page resource can be quickly loaded from the local cache of the client according to the same URL link when the private page resource is repeatedly accessed within the preset time interval, so that the loading flow of the private page resource is effectively reduced.
Description
Technical field
This disclosure relates to the access field of page resource, access control method, dress more particularly to a kind of page resource
It sets, system, storage medium and equipment.
Background technique
CDN (Content Delivery Network) i.e. content distributing network, by the edge service for being deployed in various regions
Device, by functional modules such as the load balancing, content distribution, scheduling of central platform, content needed for obtaining user nearby is reduced
Network congestion improves user's access response speed and hit rate.
For the resource disposed by CDN, in order to realize that the confidentiality of the resource, resource owner would generally be by uploads
Resource is set as privately owned page resource, and privately owned page resource visitor requests access to the privately owned page in the different time of client
When resource, server can all issue different URL (Uniform Resource Locator, i.e. uniform resource locator) chain
It connects, then client is further according to the different URL link download access privately owned page resource.That is, requesting access to privately owned page
The time of face resource is different, and the URL link issued every time is also different, and needs to obtain private according to the different URL link
There is page resource.
Inventor in the implementation of the present invention, has found: when repetitive requests access the same privately owned page in a short time
When the resource of face, it is easy to appear the problem of privately owned page resource load is slow, and page resource load traffic increases.
Summary of the invention
To overcome the problems in correlation technique, present disclose provides a kind of access control methods of page resource, dress
It sets, system, storage medium and equipment.
According to the first aspect of the embodiments of the present disclosure, a kind of access control method of page resource is provided, including is walked as follows
It is rapid:
The URL link request for receiving privately owned page resource obtains the request time of the URL link request;
Obtain the corresponding preset time section of the request time;Wherein, each privately owned page resource corresponding at least two
Continuous preset time section;
According to the preset time section, the timestamp of the URL link request is generated;Wherein, same preset time area
Between corresponding timestamp it is identical, the corresponding timestamp in non-same preset time section is different;
Generate the URL link comprising the timestamp.
According to the second aspect of an embodiment of the present disclosure, a kind of access control apparatus of page resource is provided, comprising:
Request receiving module, the URL link for receiving privately owned page resource are requested, and the URL link request is obtained
Request time;
Time interval obtains module, for obtaining the corresponding preset time section of the request time;Wherein, each privately owned
Page resource corresponds at least two continuous preset time sections;
Timestamp obtains module, for generating the timestamp of the URL link request according to the preset time section,
Wherein, the corresponding timestamp in same preset time section is identical, and the corresponding timestamp in non-same preset time section is different;
Link obtains module, for generating the URL link comprising the timestamp.
According to the third aspect of an embodiment of the present disclosure, a kind of access control system of page resource, including client are provided
And server;
The server is configured as receiving the URL link request of privately owned page resource, obtains the URL link request
Request time;Obtain the corresponding preset time section of the request time, wherein each privately owned page resource corresponding at least two
Continuous preset time section;According to the preset time section, the timestamp of the URL link request is generated, wherein same
The corresponding timestamp in preset time section is identical, and the corresponding timestamp in non-same preset time section is different;It generates comprising described
The URL link of timestamp;
The client is configured as issuing the URL link request of the privately owned page resource to server;Described in reception
The URL link that server issues;If the URL link has been stored in caching system, from caching system obtain with it is described
The corresponding privately owned page resource of URL link.
According to the third aspect of an embodiment of the present disclosure, a kind of computer readable storage medium is provided, stores calculating thereon
The step of machine program, which realizes the access control method of aforementioned page resource when being executed by processor.
According to a fourth aspect of embodiments of the present disclosure, a kind of access control apparatus of page resource, including memory are provided,
Processor and it is stored in the computer program that can be executed in the reservoir and by the processor, the processor executes institute
The step of access control method of the page resource as described in aforementioned is realized when stating computer program.
The technical scheme provided by this disclosed embodiment can include the following benefits as a result:
The embodiment of the present disclosure, which passes through, obtains the corresponding preset time section of the request time, and according to preset time section
The timestamp of URL link request is generated, so that the same privately owned page money of repetitive requests access in preset time section
When source, the URL link of acquisition is all the same, and then in addition to the first time in preset time section requests access to the privately owned page money
Source needs to request to obtain privately owned page resource to server, when other times request access to the privately owned page resource, according to same
URL link privately owned page resource can be quickly loaded from client local cache, effectively reduce privately owned page resource plus
Current-carrying capacity.Further, the embodiment of the present disclosure calculates URL link according to the corresponding preset time section of request time, without
URL link is cached using middleware, is reduced costs, caching loss is reduced.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
In order to better understand and implement, the invention will now be described in detail with reference to the accompanying drawings.
Detailed description of the invention
Fig. 1 is showing for the application environment of the access control method of the page resource shown in one exemplary embodiment of the disclosure
Meaning block diagram;
Fig. 2 is a kind of flow chart of the access control method of page resource shown in one exemplary embodiment of the disclosure;
Fig. 3 is a kind of schematic diagram of the access control method of page resource shown in one exemplary embodiment of the disclosure;
Fig. 4 is the schematic diagram of the URL link expired time shown in one exemplary embodiment of the disclosure;
Fig. 5 is a kind of structural frames of the access control apparatus of page resource shown in one exemplary embodiment of the disclosure
Figure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
It is only to be not intended to be limiting the disclosure merely for for the purpose of describing particular embodiments in the term that the disclosure uses.
The "an" of the singular used in disclosure and the accompanying claims book, " described " and "the" are also intended to including majority
Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps
It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the disclosure
A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from
In the case where disclosure range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on context, word as used in this " if "/" if " can be construed to " ... when " or
" when ... " or " in response to determination ".
Referring to Fig. 1, it is the application environment of the access control method of the page resource shown in an exemplary embodiment
Schematic block diagram.
As shown in Figure 1, the application environment of the access control method of the page resource of the embodiment includes client 1 and service
Device (not shown).
The client 1 include but is not limited to be various personal computers, laptop, smart phone and tablet computer
Etc. terminals.Operation has the application programs such as browser in the client, and user can open webpage by browser, and trigger to net
The access of privately owned page resource in page, to send the URL link request of privately owned page resource to server.
In this embodiment, the client 1 includes the processor connected by system bus, memory, display interface, shows
Display screen and input unit.Wherein, the processor of the client is for providing calculating and control ability, including triggering in webpage
Private privileges access, control to server send privately owned page resource URL link request, wherein the privately owned page
Resource URL link request in may include privately owned page resource download address and the URL link request request when
Between.Wherein, the mark (objectkey) of privately owned page resource is usually carried in the download address of the privately owned page resource, with
Privately owned page resource described in unique identification.The memory of the client includes non-volatile memory medium and built-in storage.Institute
State the computer program and information that non-volatile memory medium is stored with operating system and processor executes its operation.It is described
Built-in storage provides environment for the operation of operating system and client-side program in non-volatile memory medium.The client
Display interface is used for the communication of processor and display screen.The display screen of the client can be liquid crystal display or electronic ink
Water display screen, the input unit of the client can be the touch layer covered on display screen, be also possible on client's end housing
Key, trace ball or the Trackpad of setting can also be external keyboard, Trackpad or mouse etc..
In the present embodiment, the server includes that URL issues server 21 and CDN server 22.
It includes processor, memory, input interface and output interface that the URL, which issues server 21,.The URL issues clothes
The processor of business device passes through input interface and receives for providing calculating and control ability, the processor that the URL issues server
The URL link request for the privately owned page resource that client is sent obtains the request time of the URL link request;Described in acquisition
The corresponding preset time section of request time;Wherein, the corresponding at least two continuous preset time areas of each privately owned page resource
Between;According to the preset time section, the timestamp of the URL link request is generated;Wherein, same preset time section is corresponding
Timestamp it is identical, the corresponding timestamp in non-same preset time section is different;Generate the URL link comprising the timestamp.
The memory that the URL issues server includes non-volatile memory medium and built-in storage.The non-volatile memory medium
It is stored with operating system and processor executes the computer program and information of its operation.The built-in storage is non-volatile
The operation of operating system and client-side program in storage medium provides environment.The input interface that the URL issues server is used
In the information for receiving client transmission, for example, receiving the URL link request for the privately owned page resource that client is sent.The URL
The output interface for issuing server is used to send information to client, for example, by processor generate comprising the timestamp
URL link is sent to client.
The CDN server 22 includes processor, memory, input interface and output interface.The place of the CDN server
It manages device and is received by the input interface by described for providing calculating and control ability, the processor of the CDN server
The access request for the privately owned page resource that URL link is sent obtains the access request time;By the access request time with it is described
The timestamp comparation of URL link request issues if the access request time is more than the timestamp of URL link request
Overtime prompting message;If the access request time is less than the timestamp of the URL link request, URL link pair is issued
The privately owned page resource answered.The memory of the CDN server includes non-volatile memory medium and built-in storage.It is described non-easy
The property lost storage medium is stored with operating system and processor executes the computer program and information of its operation.The interior storage
Device provides environment for the operation of operating system and client-side program in non-volatile memory medium.The CDN server it is defeated
Incoming interface is used to receive the information of client transmission, for example, receiving the visit of the privately owned page resource sent by the URL link
Ask request.The output interface of the CDN server is used to send information to client, reminds for example, issuing time-out to client
Information, or the corresponding page resource of URL link is sent to client.
Client described above, URL issues server and the embodiment of CDN server is only exemplary,
In include the exemplary embodiment that is not limited to the described above of component, and the unit as illustrated by the separation member can be
Or may not be and be physically separated, component shown as a unit may or may not be physical unit, i.e.,
It can be located in one place, or may be distributed over multiple network units, can select according to the actual needs therein
Some or all of component realizes the purpose of disclosure scheme.
Embodiment 1
Referring to Fig. 2, its access control method for a kind of page resource shown in one exemplary embodiment of the disclosure,
Include the following steps:
Step S1: receiving the URL link request of privately owned page resource, obtains the request time of the URL link request.
The privately owned page resource is using in restriction permission and/or limiting time of be arranged via resource owner
Page resource, page resource therein may include but be not limited to: picture, text, file, application program etc..Specifically, asking every time
Ask the URL link obtained when obtaining the privately owned page resource that generally there is timeliness, if privately owned page money described in request
The time in source has been more than the timeliness of URL link, then can not obtain the privately owned page resource by the URL link, need weight
Newly obtain new URL link;If the time of privately owned page resource described in request is less than the timeliness of URL link, can lead to
It crosses the URL link and obtains the privately owned page resource.
It may include the download address of privately owned page resource in the URL link request of the privately owned page resource and described
The request time of URL link request.Wherein, privately owned page resource is usually carried in the download address of the privately owned page resource
It identifies (objectkey), with privately owned page resource described in unique identification.
In the embodiments of the present disclosure, it when user opens webpage by the browser of client, will trigger to the private in webpage
There is the access of page resource, at this point, client will issue the URL link request that server sends privately owned page resource to URL, with
Corresponding privately owned page resource is locally obtained in CDN server or client, and shows the privately owned page in the client
Resource.And after URL issues the URL link request that server receives the privately owned page resource that client is sent, from the privately owned page
The download address of the privately owned page resource of URL link request of face resource and the request time of URL link request,
And then it calculates and obtains the URL link.
Step S2: the corresponding preset time section of the request time is obtained;Wherein, each privately owned page resource is corresponding extremely
Few two continuous preset time sections.
Wherein, the time interval for multiple equal lengths that the time that the preset time section is one day is split to form, institute
The length for stating time interval, which can according to need, to be configured, such as is set as 1 hour or 2 hours time spans.For realization side
Just privately owned page resource, each corresponding at least two continuous preset time sections of privately owned page resource are obtained.In disclosure reality
It applies in example, it is 1 hour preset time section, this 24 preset time sections that one day time, which was divided into 24 time spans,
Be followed successively by Period1=(0,1];Period2=(1,2];Period3=(2,3];... Period24=(23,24].If described
Request time 15 divides when being 2, then corresponding preset time section Period3=(2,3].
Step S3: according to the preset time section, the timestamp of the URL link request is generated;Wherein, same default
The corresponding timestamp of time interval is identical, and the corresponding timestamp in non-same preset time section is different.
It is described according to the preset time section, the step of generating the timestamp of the URL link request includes:
The expired time length for obtaining the privately owned page resource, by the maximum time value in the preset time section and
The expired time length of the privately owned page resource is added, and generates the timestamp of URL link request.In the embodiments of the present disclosure,
Identical according to the corresponding timestamp in same preset time section, the corresponding timestamp in non-same preset time section is different, both may be used
So that user in a short time repeated accesses same privately owned page resource when, the privately owned page is quickly obtained from local cache
Resource, and can make privately owned page resource that there is certain level security.For example, Fig. 3 and Fig. 4 are please referred to, privately owned page money
The request time of the URL link request in source is respectively T1, T2, T3, T4, T5, T6 and T7, then T1, T2, T3, T4 and T5 are corresponding
Preset time section is Period1, and the corresponding preset time section T5, T6 and T7 is Period2, if the privately owned page resource
Expired time length be ExpiredIn, then when the T1 time initiates request when, URL issue server calculate acquisition time
Stamp is the maximum time value+ExpriedIn of timestamp1=Period1;Then when initiating request in the T2 time, URL is issued
Server calculates the maximum time value+ExpriedIn that the timestamp obtained is timestamp2=Period1;Then when in T3
Between initiate request when, URL issue server calculate obtain timestamp be timestamp3=Period1 maximum time value+
ExpriedIn;Then when initiating request in the T4 time, it is timestamp4=that URL, which issues server and calculates the timestamp obtained,
Maximum time value+the ExpriedIn of Period1;Then when initiating request in the T5 time, URL issues server and calculates acquisition
Timestamp is the maximum time value+ExpriedIn of timestamp5=Period2;Then when initiating request in the T6 time, URL
It issues server and calculates the maximum time value+ExpriedIn that the timestamp obtained is timestamp6=Period2;Then when
When the T7 time initiates request, URL issues server and calculates the maximum time that the timestamp obtained is timestamp7=Period2
Value+ExpriedIn.The value of the timestamp of T1 to T4 is equal, then the URL that they use is identical, and client is existed using the same URL
It initiates to call in the different time, can not have to locally initiate HTTP request again using the file of caching, to realize fast
Speed obtains the privately owned page resource.Specific example is set forth below to be illustrated, if the preset time section be (2,3],
The expired time length of the privately owned page resource is 2 hours, then when the timestamp of the URL link request is 3+2=5, i.e.,
The timestamp of URL link request be URL link request time on the day of 5 when.If the preset time section be (23,
24], the expired time length of the privately owned page resource is 2 hours, then the timestamp of the URL link request is 24+2=26
When, i.e., when the timestamp of the described URL link request is the 2 of second day of URL link request time.
In the embodiments of the present disclosure, server is issued by the URL and obtains the corresponding preset time of the request time
Section, and according to the preset time section, generate the timestamp of the URL link request.
Step S4: the URL link comprising the timestamp is generated.
Wherein, the URL link may include download address and and the time that may include privately owned page resource
Stamp.Wherein, the mark (objectkey) of privately owned page resource is usually carried in the download address of the privately owned page resource, with
Privately owned page resource described in unique identification.Specifically, the URL link be privately owned page resource download address behind add
The link being spliced to form after the timestamp, for example, the URL link is URL=https: //objectKey? t=
Timestamp, wherein " objectKey " is to be the mark for having page resource, " https: //objectKey? " it is privately owned to carry
The download address of the mark of page resource, t are key, and timestamp is key assignments, i.e., the described timestamp.
In the embodiments of the present disclosure, server is issued according to the timestamp by the URL, generating includes the time
The URL link of stamp.
The embodiment of the present disclosure, which passes through, obtains the corresponding preset time section of the request time, and according to preset time section
The timestamp of URL link request is generated, so that the same privately owned page money of repetitive requests access in preset time section
When source, the URL link of acquisition is all the same, and then in addition to the first time in preset time section requests access to the privately owned page money
Source needs to request to obtain privately owned page resource to server, when other times request access to the privately owned page resource, according to same
URL link privately owned page resource can be quickly loaded from client local cache, effectively reduce privately owned page resource plus
Current-carrying capacity.Further, the embodiment of the present disclosure calculates URL link according to the corresponding preset time section of request time, is not necessarily to
URL link is cached using middlewares such as Mysql or Redis, is reduced costs, caching loss is reduced.
It further include following step after the generation is comprising the URL link of the timestamp in one more preferably embodiment
It is rapid:
Step S5: receiving the access request of the privately owned page resource sent by the URL link, obtains the privately owned page
The access request time of face resource;The access request time is compared with the timestamp in the URL link, if described
The access request time is more than the timestamp in the URL link, then issues overtime prompting message.
Further, it if the access request time is less than the timestamp in the URL link, sends described privately owned
Page resource.
Referring to Fig. 4, in the embodiments of the present disclosure, the URL link of generation has timeliness, when effective time is one
Between section, the specially maximum time value in the immediate upper preset time section in the corresponding preset time section of URL link to URL
The timestamp of link.
By the way that the timeliness of URL link is arranged, thus prevent the privately owned page resource from infinitely being used for a long time, Jin Ershi
The safety and effectiveness of privately owned page resource is showed.
In the embodiments of the present disclosure, user inputs URL link in client, to send privately owned page money to CDN server
The access request in source;CDN server receives the access request of the privately owned page resource sent by the URL link, obtains institute
State the access request time of privately owned page resource;The access request time is compared with the timestamp in the URL link
Compared with if the access request time is more than the timestamp in the URL link, to the overtime prompting message of client sending;If
The access request time is less than the timestamp in the URL link, then sends the privately owned page resource to client, from
And the privately owned page resource is shown in client.
Embodiment 2
Referring to Fig. 5, corresponding with the access control method of the page resource of previous embodiment 1, the disclosure also provides one kind
The access control apparatus of page resource, comprising:
Request receiving module 21, the URL link for receiving privately owned page resource are requested, and the URL link request is obtained
Request time.
Time interval obtains module 22, for obtaining the corresponding preset time section of the request time;Wherein, each private
There are the corresponding at least two continuous preset time sections of page resource.
Timestamp obtains module 23, for generating the time of the URL link request according to the preset time section
Stamp;Wherein, the corresponding timestamp in same preset time section is identical, and the corresponding timestamp in non-same preset time section is different.
Link obtains module 24, for generating the URL link comprising the timestamp.
The privately owned page resource is using in restriction permission and/or limiting time of be arranged via resource owner
Page resource, page resource therein may include but be not limited to: picture, text, file, application program etc..Specifically, asking every time
Ask the URL link obtained when obtaining the privately owned page resource that generally there is timeliness, if privately owned page money described in request
The time in source has been more than the timeliness of URL link, then can not obtain the privately owned page resource by the URL link, need weight
Newly obtain new URL link;If the time of privately owned page resource described in request is less than the timeliness of URL link, can lead to
It crosses the URL link and obtains the privately owned page resource.
It may include the download address of privately owned page resource in the URL link request of the privately owned page resource and described
The request time of URL link request.Wherein, privately owned page resource is usually carried in the download address of the privately owned page resource
It identifies (objectkey), with privately owned page resource described in unique identification.
Wherein, the time interval for multiple equal lengths that the time that the preset time section is one day is split to form, institute
The length for stating time interval, which can according to need, to be configured, such as is set as 1 hour or 2 hours time spans.For realization side
Just privately owned page resource, each corresponding at least two continuous preset time sections of privately owned page resource are obtained.In disclosure reality
It applies in example, it is 1 hour preset time section, this 24 preset time sections that one day time, which was divided into 24 time spans,
Be followed successively by Period1=(0,1];Period2=(1,2];Period3=(2,3];... Period24=(23,24].If described
Request time 15 divides when being 2, then corresponding preset time section Period3=(2,3].
Wherein, the URL link may include download address and and the time that may include privately owned page resource
Stamp.Wherein, the mark (objectkey) of privately owned page resource is usually carried in the download address of the privately owned page resource, with
Privately owned page resource described in unique identification.Specifically, the URL link be privately owned page resource download address behind add
The link being spliced to form after the timestamp, for example, the URL link is URL=https: //objectKey? t=
Timestamp, wherein " objectKey " is to be the mark for having page resource, " https: //objectKey? " it is privately owned to carry
The download address of the mark of page resource, t are key, and timestamp is key assignments, i.e., the described timestamp.
When the timestamp obtains module 23 for generating the timestamp for generating URL link request, it is specifically used for obtaining institute
The expired time length for stating privately owned page resource provides the maximum time value in the preset time section and the privately owned page
The expired time length in source is added, and generates the timestamp of URL link request.
The preset time section is the time interval for the multiple equal lengths being split to form one day time.
The embodiment of the present disclosure, which passes through, obtains the corresponding preset time section of the request time, and according to preset time section
The timestamp of URL link request is generated, so that the same privately owned page money of repetitive requests access in preset time section
When source, the URL link of acquisition is all the same, and then in addition to the first time in preset time section requests access to the privately owned page money
Source needs to request to obtain privately owned page resource to server, when other times request access to the privately owned page resource, according to same
URL link privately owned page resource can be quickly loaded from client local cache, effectively reduce privately owned page resource plus
Current-carrying capacity.Further, the embodiment of the present disclosure calculates URL link according to the corresponding preset time section of request time, is not necessarily to
URL link is cached using middlewares such as Mysql or Redis, is reduced costs, caching loss is reduced.
In one more preferably embodiment, the access control apparatus of the page resource further includes overtime judging module (figure
In do not show), for receiving the access request of the privately owned page resource sent by the URL link, obtain the privately owned page
The access request time of resource;The access request time is compared with the timestamp in the URL link, if the visit
It asks that request time is more than the timestamp in the URL link, then issues overtime prompting message.If the access request time does not surpass
The timestamp in the URL link is crossed, then sends the privately owned page resource.By the way that the timeliness of URL link is arranged, thus anti-
Only the privately owned page resource is infinitely used for a long time, and then realizes the safety and effectiveness of privately owned page resource.
Embodiment 3
Referring to Fig. 1, corresponding with the access control method of the page resource of previous embodiment 1, the disclosure also provides one kind
The access control system of page resource, including client and server;
The server is configured as receiving the URL link request of privately owned page resource, obtains the URL link request
Request time;Obtain the corresponding preset time section of the request time, wherein each privately owned page resource corresponding at least two
Continuous preset time section;According to the preset time section, the timestamp of the URL link request is generated, wherein same
The corresponding timestamp in preset time section is identical, and the corresponding timestamp in non-same preset time section is different;It generates comprising described
The URL link of timestamp;
The client is configured as issuing the URL link request of the privately owned page resource to server;Described in reception
The URL link that server issues;If the URL link has been stored in caching system, from caching system obtain with it is described
The corresponding privately owned page resource of URL link.
The privately owned page resource is using in restriction permission and/or limiting time of be arranged via resource owner
Page resource, page resource therein may include but be not limited to: picture, text, file, application program etc..Specifically, asking every time
Ask the URL link obtained when obtaining the privately owned page resource that generally there is timeliness, if privately owned page money described in request
The time in source has been more than the timeliness of URL link, then can not obtain the privately owned page resource by the URL link, need weight
Newly obtain new URL link;If the time of privately owned page resource described in request is less than the timeliness of URL link, can lead to
It crosses the URL link and obtains the privately owned page resource.
It may include the download address of privately owned page resource in the URL link request of the privately owned page resource and described
The request time of URL link request.Wherein, privately owned page resource is usually carried in the download address of the privately owned page resource
It identifies (objectkey), with privately owned page resource described in unique identification.
Wherein, the time interval for multiple equal lengths that the time that the preset time section is one day is split to form, institute
The length for stating time interval, which can according to need, to be configured, such as is set as 1 hour or 2 hours time spans.For realization side
Just privately owned page resource, each corresponding at least two continuous preset time sections of privately owned page resource are obtained.In disclosure reality
It applies in example, it is 1 hour preset time section, this 24 preset time sections that one day time, which was divided into 24 time spans,
Be followed successively by Period1=(0,1];Period2=(1,2];Period3=(2,3];... Period24=(23,24].If described
Request time 15 divides when being 2, then corresponding preset time section Period3=(2,3].
Wherein, the URL link may include download address and and the time that may include privately owned page resource
Stamp.Wherein, the mark (objectkey) of privately owned page resource is usually carried in the download address of the privately owned page resource, with
Privately owned page resource described in unique identification.Specifically, the URL link be privately owned page resource download address behind add
The link being spliced to form after the timestamp, for example, the URL link is URL=https: //objectKey? t=
Timestamp, wherein " objectKey " is to be the mark for having page resource, " https: //objectKey? " it is privately owned to carry
The download address of the mark of page resource, t are key, and timestamp is key assignments, i.e., the described timestamp.
It is not held in caching system if the client is also configured to the URL link, according to the URL chain
It connects to server and obtains the corresponding privately owned page resource of the URL link.
The server is also configured to obtain the expired time length of the privately owned page resource, when will be described default
Between section maximum time value and the privately owned page resource expired time length be added, generate URL link request when
Between stab.
The preset time section is the time interval for the multiple equal lengths being split to form one day time.
The embodiment of the present disclosure, which passes through, obtains the corresponding preset time section of the request time, and according to preset time section
The timestamp of URL link request is generated, so that the same privately owned page money of repetitive requests access in preset time section
When source, the URL link of acquisition is all the same, and then in addition to the first time in preset time section requests access to the privately owned page money
Source needs to request to obtain privately owned page resource to server, when other times request access to the privately owned page resource, according to same
URL link privately owned page resource can be quickly loaded from client local cache, effectively reduce privately owned page resource plus
Current-carrying capacity.Further, the embodiment of the present disclosure calculates URL link according to the corresponding preset time section of request time, is not necessarily to
URL link is cached using middlewares such as Mysql or Redis, is reduced costs, caching loss is reduced.
The server is also configured to receive the access request of the privately owned page resource sent by the URL link,
Obtain the access request time of the privately owned page resource;By the timestamp in the access request time and the URL link
It is compared, if the access request time is more than the timestamp in the URL link, issues overtime prompting message.If institute
The timestamp that the access request time is less than in the URL link is stated, then sends the privately owned page resource.By the way that URL is arranged
The timeliness of link to prevent the privately owned page resource from infinitely being used for a long time, and then realizes privately owned page resource
Safety and effectiveness.
The disclosure also provides a kind of computer readable storage medium, stores computer program thereon, the computer program
The step of access control method of page resource in such as embodiment 1 is realized when being executed by processor, comprising:
The URL link request for receiving privately owned page resource obtains the request time of the URL link request;
Obtain the corresponding preset time section of the request time;Wherein, each privately owned page resource corresponding at least two
Continuous preset time section;
According to the preset time section, the timestamp of the URL link request is generated;Wherein, same preset time area
Between corresponding timestamp it is identical, the corresponding timestamp in non-same preset time section is different;
Generate the URL link comprising the timestamp.
The embodiment of the present disclosure, which passes through, obtains the corresponding preset time section of the request time, and according to preset time section
The timestamp of URL link request is generated, so that the same privately owned page money of repetitive requests access in preset time section
When source, the URL link of acquisition is all the same, and then in addition to the first time in preset time section requests access to the privately owned page money
Source needs to request to obtain privately owned page resource to server, when other times request access to the privately owned page resource, according to same
URL link privately owned page resource can be quickly loaded from client local cache, effectively reduce privately owned page resource plus
Current-carrying capacity.Further, the embodiment of the present disclosure calculates URL link according to the corresponding preset time section of request time, is not necessarily to
URL link is cached using middlewares such as Mysql or Redis, is reduced costs, caching loss is reduced.
It wherein includes storage medium (the including but not limited to disk of program code that the disclosure, which can be used in one or more,
Memory, CD-ROM, optical memory etc.) on the form of computer program product implemented.Computer-readable storage media packet
Permanent and non-permanent, removable and non-removable media is included, can be accomplished by any method or technique information storage.Letter
Breath can be computer readable instructions, data structure, the module of program or other data.The example packet of the storage medium of computer
Include but be not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM),
Other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory
(EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), digital versatile disc
(DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices or any other non-biography
Defeated medium, can be used for storage can be accessed by a computing device information.
The disclosure also provides a kind of access control apparatus of page resource, including reservoir, processor and is stored in institute
The computer program that can be executed in reservoir and by the processor is stated, the processor is realized when executing the computer program
As in embodiment 1 the step of the access control method of page resource, comprising:
The URL link request for receiving privately owned page resource obtains the request time of the URL link request;
Obtain the corresponding preset time section of the request time;Wherein, each privately owned page resource corresponding at least two
Continuous preset time section;
According to the preset time section, the timestamp of the URL link request is generated;Wherein, same preset time area
Between corresponding timestamp it is identical, the corresponding timestamp in non-same preset time section is different;
Generate the URL link comprising the timestamp.
The embodiment of the present disclosure, which passes through, obtains the corresponding preset time section of the request time, and according to preset time section
The timestamp of URL link request is generated, so that the same privately owned page money of repetitive requests access in preset time section
When source, the URL link of acquisition is all the same, and then in addition to the first time in preset time section requests access to the privately owned page money
Source needs to request to obtain privately owned page resource to server, when other times request access to the privately owned page resource, according to same
URL link privately owned page resource can be quickly loaded from client local cache, effectively reduce privately owned page resource plus
Current-carrying capacity.Further, the embodiment of the present disclosure calculates URL link according to the corresponding preset time section of request time, is not necessarily to
URL link is cached using middlewares such as Mysql or Redis, is reduced costs, caching loss is reduced.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the inventive concept of the premise, can also make such as dried fruit modification and improvement, these belong to guarantor of the invention
Protect range.
Claims (15)
1. a kind of access control method of page resource, which comprises the steps of:
The URL link request for receiving privately owned page resource obtains the request time of the URL link request;
Obtain the corresponding preset time section of the request time;Wherein, each privately owned page resource corresponding at least two is continuous
Preset time section;
According to the preset time section, the timestamp of the URL link request is generated;Wherein, same preset time section pair
The timestamp answered is identical, and the corresponding timestamp in non-same preset time section is different;
Generate the URL link comprising the timestamp.
2. the access control method of page resource according to claim 1, which is characterized in that
It is described according to the preset time section, the step of generating the timestamp of the URL link request includes:
The expired time length for obtaining the privately owned page resource, by the maximum time value in the preset time section and described
The expired time length of privately owned page resource is added, and generates the timestamp of URL link request.
3. the access control method of page resource according to claim 1, which is characterized in that the preset time section is
The time interval for multiple equal lengths that one day time was split to form.
4. the access control method of page resource according to claim 1, which is characterized in that
It is further comprising the steps of after the generation is comprising the URL link of the timestamp:
The access request of the privately owned page resource sent by the URL link is received, the visit of the privately owned page resource is obtained
Ask request time;The access request time is compared with the timestamp in the URL link, if when the access request
Between be more than the URL link in timestamp, then issue overtime prompting message.
5. a kind of access control apparatus of page resource characterized by comprising
Request receiving module, the URL link for receiving privately owned page resource are requested, and the request of the URL link request is obtained
Time;
Time interval obtains module, for obtaining the corresponding preset time section of the request time;Wherein, each privately owned page
Resource corresponds at least two continuous preset time sections;
Timestamp obtains module, for generating the timestamp of the URL link request according to the preset time section, wherein
The corresponding timestamp in same preset time section is identical, and the corresponding timestamp in non-same preset time section is different;
Link obtains module, for generating the URL link comprising the timestamp.
6. the access control apparatus of page resource according to claim 5, which is characterized in that the timestamp obtains mould
Block, for obtaining the expired time length of the privately owned page resource, by the maximum time value in the preset time section and
The expired time length of the privately owned page resource is added, and generates the timestamp of URL link request.
7. the access control apparatus of page resource according to claim 5, which is characterized in that the preset time section is
The time interval for multiple equal lengths that one day time was split to form.
8. the access control apparatus of page resource according to claim 5, which is characterized in that further include time-out judgement mould
Block obtains the privately owned page resource for receiving the access request of the privately owned page resource sent by the URL link
The access request time;The access request time is compared with the timestamp in the URL link, if the access request
Time is more than the timestamp in the URL link, then issues overtime prompting message.
9. a kind of access control system of page resource, which is characterized in that including client and server;
The server is configured as receiving the URL link request of privately owned page resource, obtains the request of the URL link request
Time;Obtain the corresponding preset time section of the request time, wherein each privately owned page resource corresponding at least two is continuous
Preset time section;According to the preset time section, the timestamp of the URL link request is generated, wherein same default
The corresponding timestamp of time interval is identical, and the corresponding timestamp in non-same preset time section is different;Generating includes the time
The URL link of stamp;
The client is configured as issuing the URL link request of the privately owned page resource to server;Receive the service
The URL link that device issues;If the URL link has been stored in caching system, obtained and the URL chain from caching system
Connect corresponding privately owned page resource.
10. the access control system of page resource according to claim 9, which is characterized in that the client is also matched
It is set to: if the URL link is not held in caching system, the URL link being obtained to server according to the URL link
Corresponding privately owned page resource.
11. the access control system of page resource according to claim 9, which is characterized in that
The server is also configured to obtain the expired time length of the privately owned page resource, by the preset time area
Between maximum time value and the privately owned page resource expired time length be added, generate URL link request timestamp.
12. the access control system of page resource according to claim 9, which is characterized in that
The preset time section is the time interval for the multiple equal lengths being split to form one day time.
13. the access control system of page resource according to claim 9, which is characterized in that
The server is also configured to receive the access request of the privately owned page resource sent by the URL link, obtains
The access request time of the privately owned page resource;Timestamp in the access request time and the URL link is carried out
Compare, if the access request time is more than the timestamp in the URL link, issues overtime prompting message.
14. a kind of computer readable storage medium, stores computer program thereon, which is characterized in that the computer program quilt
The step of access control method of the page resource as described in any one of Claims 1-4 is realized when processor executes.
15. a kind of access control apparatus of page resource, which is characterized in that including memory, processor and be stored in described
In reservoir and the computer program that can be executed by the processor, the processor are realized such as when executing the computer program
The step of access control method of page resource described in any one of Claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433743.0A CN110233882B (en) | 2019-05-23 | 2019-05-23 | Page resource access control method, device, system, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433743.0A CN110233882B (en) | 2019-05-23 | 2019-05-23 | Page resource access control method, device, system, storage medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110233882A true CN110233882A (en) | 2019-09-13 |
CN110233882B CN110233882B (en) | 2022-01-11 |
Family
ID=67861568
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910433743.0A Active CN110233882B (en) | 2019-05-23 | 2019-05-23 | Page resource access control method, device, system, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110233882B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114979004A (en) * | 2022-06-20 | 2022-08-30 | 中国工商银行股份有限公司 | Information processing method, device, equipment and medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1006463A2 (en) * | 1998-12-01 | 2000-06-07 | Lucent Technologies Inc. | A method and apparatus for persistent access to web resources |
EP1006466A2 (en) * | 1998-12-01 | 2000-06-07 | Lucent Technologies Inc. | A method and apparatus for persistent access to web resources using relative time-stamps |
CN101075236A (en) * | 2006-06-12 | 2007-11-21 | 腾讯科技(深圳)有限公司 | Apparatus and method for accelerating browser webpage display |
CN103561040A (en) * | 2013-11-15 | 2014-02-05 | 中国科学院声学研究所 | File downloading method and system |
CN103763340A (en) * | 2013-12-24 | 2014-04-30 | 杭州华三通信技术有限公司 | Web access optimizing device and method |
CN104202360A (en) * | 2014-08-13 | 2014-12-10 | 小米科技有限责任公司 | Webpage access method, device and router |
EP3076313A1 (en) * | 2015-03-31 | 2016-10-05 | Comcast Cable Communications, LLC | Digital content access control |
-
2019
- 2019-05-23 CN CN201910433743.0A patent/CN110233882B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1006463A2 (en) * | 1998-12-01 | 2000-06-07 | Lucent Technologies Inc. | A method and apparatus for persistent access to web resources |
EP1006466A2 (en) * | 1998-12-01 | 2000-06-07 | Lucent Technologies Inc. | A method and apparatus for persistent access to web resources using relative time-stamps |
CN101075236A (en) * | 2006-06-12 | 2007-11-21 | 腾讯科技(深圳)有限公司 | Apparatus and method for accelerating browser webpage display |
CN103561040A (en) * | 2013-11-15 | 2014-02-05 | 中国科学院声学研究所 | File downloading method and system |
CN103763340A (en) * | 2013-12-24 | 2014-04-30 | 杭州华三通信技术有限公司 | Web access optimizing device and method |
CN104202360A (en) * | 2014-08-13 | 2014-12-10 | 小米科技有限责任公司 | Webpage access method, device and router |
EP3076313A1 (en) * | 2015-03-31 | 2016-10-05 | Comcast Cable Communications, LLC | Digital content access control |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114979004A (en) * | 2022-06-20 | 2022-08-30 | 中国工商银行股份有限公司 | Information processing method, device, equipment and medium |
CN114979004B (en) * | 2022-06-20 | 2024-02-27 | 中国工商银行股份有限公司 | Information processing method, device, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN110233882B (en) | 2022-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104216695B (en) | Page information to be showed is provided and shows the method and system of page info | |
CN109992406B (en) | Picture request method, picture request response method and client | |
US8464332B2 (en) | Access gateway and method for providing cloud storage service | |
CN109521956B (en) | Cloud storage method, device, equipment and storage medium based on block chain | |
CN106874471B (en) | Information pushing method and device | |
CN108345632A (en) | Call method, device, equipment and the computer readable storage medium of the H5 pages | |
CN104620222A (en) | Scaling a virtual machine instance | |
CN106131165B (en) | Anti-stealing link method and device for content distributing network | |
CN110096660A (en) | Method, apparatus and electronic equipment for loading page picture | |
CN102263828A (en) | Load balanced sharing method and equipment | |
US10116729B2 (en) | Dynamic media transformation service in a CDN | |
CN107465722A (en) | The implementation method and device of web access | |
JP2013196063A (en) | Cookie sharing program, web server with cookie sharing function, cookie sharing system and cookie sharing method | |
CN114282233A (en) | WEB performance optimization method and device, computer equipment and storage medium | |
CN107634854B (en) | Service data processing method and device | |
US8713091B2 (en) | Network based JIT on a priori knowledge of a set of disparate clients | |
CN108880923A (en) | The method and apparatus that policer operation applied to application server is requested | |
CN111475761B (en) | Client, server and content sharing control method | |
CN110233882A (en) | Page resource access control method, device, system, storage medium and equipment | |
CN107395663B (en) | Data acquisition method and device | |
CN107979577B (en) | Terminal authentication method and device | |
CN111832862B (en) | Flow management method and system based on block chain | |
CN112818270A (en) | Data cross-domain transfer method and device and computer equipment | |
CN110232287A (en) | Pass through the shared economic data cochain method and its equipment of block chain | |
CN111901403B (en) | Session management method and device, electronic equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |