CN107025226A - Targeted sites access method, device and transfer server - Google Patents
Targeted sites access method, device and transfer server Download PDFInfo
- Publication number
- CN107025226A CN107025226A CN201610065121.3A CN201610065121A CN107025226A CN 107025226 A CN107025226 A CN 107025226A CN 201610065121 A CN201610065121 A CN 201610065121A CN 107025226 A CN107025226 A CN 107025226A
- Authority
- CN
- China
- Prior art keywords
- time
- targeted sites
- caching
- client
- access
- 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.)
- Pending
Links
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/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- 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/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Abstract
The invention discloses the method accessed for targeted sites, device and transfer server.A kind of targeted sites access method includes failing to the access of the targeted sites in response to client, and the page info of the targeted sites in preceding caching is sent into the client in the case where judging the targeted sites inaccessible.Buffer update frequency when methods described can also may have access to according to targeted sites carrys out the ageing of reasonable corresponding page when determining that targeted sites are unreachable.The networking experience brought when thus, by making up website inaccessible itself with rationally ageing proxy caching declines.
Description
Technical field
The application is related to network technology, more particularly to targeted sites access method, device and transfer service
Device.
Background technology
Webpage, which can not access or access error, can substantially reduce the networking experience of user.Cause user can not
One of the reason for access is that the server of website in itself can occur unstable or collapse due to a variety of causes
Burst.Because website is numerous and visit capacity is huge, server failure happens occasionally.When client pass through it is clear
Device or other application are look at when carrying out network access, in correspondence browser or the client of other application
Network in daily record monitoring, almost all there is certain site daily and error, triggering are concentrated within a period of time
User largely uploads the situation of networking error log.
For accessing website failure, two kinds of main processing schemes are had at present.One kind is client hair
Rise and repeatedly reconnect, after reconnecting unsuccessfully, display accesses the error page.Another is that client transfers to lead to
Cross transfer server to conduct interviews, after transfer, which is accessed, still to fail, display accesses the error page.But
It is that both schemes can not all solve user's networking body caused by can not being accessed in itself due to server in station
The problem of testing decline.
Thus, it is desirable to a kind of targeted sites access scheme, it be able to can not be visited in itself in server in station
In the case of asking, the availability of site access is kept as much as possible.
The content of the invention
In order to solve at least one above-mentioned problem, the present invention proposes a kind of accessed by monitoring and unsuccessfully believed
Breath, dynamic updates the scheme that transfer caches timeliness, to reduce Website server instability strip to user's
Influence, lifts the networking experience of user.
According to an aspect of the invention, there is provided a kind of targeted sites access method, including:Response
The access of the targeted sites is failed in client, the feelings of the targeted sites inaccessible are being judged
The page info of the targeted sites in preceding caching is sent to the client under condition.
Thus, it becomes possible in the case of targeted sites/page is inaccessible, by the page letter in preceding caching
Breath is sent to client, the unstable influence to user of targeted sites server is thus reduced, so as to carry
Rise the networking experience of user.
Preferably, in the case where judging targeted sites inaccessible by the targeted sites of preceding caching
Page info, which is sent to client, to be included:Expire it in the caching expired time of the page info
Before, the page info of the targeted sites is sent to the client.In this way, it is possible to by setting
Put caching expired time come ensure client to be sent to caching the page it is ageing so that reduce
While the influence that targeted sites server is unstable to be brought to user, ensure to browse information as much as possible
Accuracy.
Preferably, caching expired time joins with preceding buffer update time correlation.Therefore ensure that caching
Timeliness dynamic can be changed according to preceding cache condition, thus lift the flexibility of transfer caching.
Preferably, in the case of targeted sites are addressable, in response to client transfer access target station
That puts asks and judges that having met or exceeded predetermined cache away from the time in preceding caching updates interval,
The page info in the targeted sites of preceding caching is updated, wherein the interval time between updating twice
It is the buffer update time.
So, due to update need to meet simultaneously user's request and predetermined space it is full both, therefore energy
Enough avoid the non-popular website (full but no user is asked at scheduled update interval) of frequent updating or in page
Caching (user ask but scheduled update interval less than) is unnecessarily updated during the no change of face, so as to carry
Rise system effectiveness.
Preferably, caching expired time can be calculated by following formula:
Expired time=current time+history buffer renewal time * a are cached,
Wherein, a is greater than 1 positive integer, takes predetermined cache to update interval equal as history buffer renewal time
The initial value of value, and history buffer renewal time calculated by following formula:
History buffer renewal time=(a preceding history buffer renewal time+(current time-preceding is once delayed
Deposit renewal time))/2.
So, determine to delay by the frequency accessed according to webpage renewal frequency in itself and user
That deposits is ageing, can more reasonably determine to cache the ageing of page info, thus further carry
Rise experience and the accuracy of user's networking.
Preferably, targeted sites access method also includes:In the situation of the targeted sites inaccessible
Under, periodically access the targeted sites, until successful access and update preceding caching the mesh
The page info of labeling station point.
In this way, it is possible to obtain the message of targeted sites service recovery in time to obtain the caching page as early as possible
Renewal, thus lifted user networking experience.
According to another aspect of the present invention there is provided a kind of targeted sites access mechanism, including:It is slow
Information transmitting unit is deposited, for failing in response to client to the access of the targeted sites, is being judged
By the page info hair in the targeted sites of preceding caching in the case of the targeted sites inaccessible
Give the client.
Preferably, cache information transmitting element can expire in the caching expired time of the page info
Before, the page info of the targeted sites is sent to the client by the communicator.
Preferably, targeted sites access mechanism can also include:Buffer update unit, for described
In the case of targeted sites are addressable, the request of the targeted sites is accessed simultaneously in response to client transfer
And judge that having met or exceeded predetermined cache away from the time in preceding caching updates interval, updates preceding slow
The page info for the targeted sites deposited, wherein the interval time between updating twice is buffer update
Time.
Preferably, targeted sites access mechanism can also include caching expired time calculating unit, the latter
The caching expired time is calculated using following formula:
Expired time=current time+history buffer renewal time * a are cached,
Wherein, a is greater than 1 positive integer, takes predetermined cache to update interval equal as history buffer renewal time
The initial value of value, and history buffer renewal time calculated by following formula:
History buffer renewal time=(a preceding history buffer renewal time+(current time-preceding is once delayed
Deposit renewal time))/2.
Preferably, targeted sites access mechanism can also include:Communication unit, in the target
In the case of website inaccessible, the targeted sites are periodically accessed, until successful access and more
The page info of the new targeted sites in preceding caching.
According to a further aspect of the invention there is provided a kind of transfer server, including:Communicator,
For sending and receiving information;Storage device, for storage and cache information;Processor, is connected to
The communicator and the storage device, the processor are used for:Connect in response to the communicator
Information of the client to the access failure of the targeted sites is received, is judging that the targeted sites can not
The page info by the storage device in the targeted sites of preceding caching is passed through in the case of access
The communicator is sent to the client.
Preferably, the processor can also be used to expire it in the caching expired time of the page info
Before, the page info of the targeted sites is sent to the client.
Preferably, the processor can be additionally used in the case of the targeted sites are addressable, response
In the communicator receive client transfer access the request of the targeted sites and judge away from by
The storage device has met or exceeded predetermined cache in the time of preceding caching and has updated interval, updates
The page info of the targeted sites of preceding caching, wherein the interval time between updating twice is caching
Renewal time.
Preferably, the processor is additionally operable to calculate the caching expired time according to following formula:
Expired time=current time+history buffer renewal time * a are cached,
Wherein, a is greater than 1 positive integer, takes predetermined cache to update interval equal as history buffer renewal time
The initial value of value, and history buffer renewal time calculated by following formula:
History buffer renewal time=(a preceding history buffer renewal time+(current time-preceding is once delayed
Deposit renewal time))/2.
Using the targeted sites access method of the present invention, the unreachable connection brought of targeted sites can be mitigated
Dictyosome tests decline.In addition it is possible to by introducing dynamic caching expired time, it is ensured that be sent to visitor
Family end caching the page it is ageing.
Brief description of the drawings
By the way that disclosure illustrative embodiments are described in more detail with reference to accompanying drawing, the disclosure
Above-mentioned and other purposes, feature and advantage will be apparent, wherein, it is exemplary in the disclosure
In embodiment, identical reference number typically represents same parts.
Fig. 1 is the schematic diagram for realizing the network environment of the embodiment of the present invention.
Fig. 2 is the flow chart of targeted sites access method according to an embodiment of the invention.
Fig. 3 is the block diagram of targeted sites access mechanism according to an embodiment of the invention.
Embodiment
The preferred embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing in accompanying drawing
The preferred embodiment of the disclosure is shown, however, it is to be appreciated that may be realized in various forms the disclosure
Without that should be limited by embodiments set forth herein.On the contrary, thesing embodiments are provided so that
The disclosure is more thorough and complete, and the scope of the present disclosure can intactly be conveyed into this area
Technical staff.
The feelings that server is unstable or collapses can occur due to a variety of causes often in Website server
Condition, causes user to access webpage error.User generally carries out network via browser or other application
Access.After direct-connected access web failure, it can transfer to conduct interviews via transfer/proxy server.
Some transfer/proxy servers can be user's actively connection, such as VPN proxy servers.And
Other transfer/proxy servers can be transparent to user.For example, installing on the client clear
Device of looking at applies after direct-connected access web failure (or after repeatedly reconnecting unsuccessfully) can be into its acquiescence
Turn server and initiate the request that transfer is accessed, to be conducted interviews by transfer server to targeted sites.
In some cases, for example, operator close IP or network condition it is not good cause client without
Method parses DNS, and the success of transfer server access target webpage then can just return to access result
To the client for sending request.And in the case where server in station can not be accessed in itself, prior art
Transfer server can not also solve the inaccessible problem of above-mentioned site pages.It is therefore desirable to a kind of
Targeted sites access method, device and transfer server, it can be in the case of website faults itself
Ensure the access of user, thus lift the networking experience of user.
Fig. 1 is the schematic diagram for realizing the network environment 100 of the embodiment of the present invention.In environment 100
Client 20 via network 40 access website 30.In some cases, client 20 can lead to
Cross transfer server and access website 40.Show transfer server 10 as this kind of transfer/agency in figure
One example of server.Although in order to illustrate conveniently, transfer server 10 is show separately in figure,
It will be appreciated by those skilled in the art that transfer server 10 can be regarded as network 40
A part, it is particularly true in the case where transfer server is transparent to user.In addition, though for side
Just illustrate and shown in figure from transfer server 10 respectively to the two-way of client 20 and website 30
Arrow, but it will be appreciated by those skilled in the art that it is upper, the transmitting-receivings of above-mentioned data and information be need it is logical
Cross the realization of network 40.
Client 20 is any suitable electronic equipment that can be utilized for network access, including but is not limited
In desktop computer, smart phone, tablet personal computer or other movements or non-moving client.Website
30 be can be by any website of network access.Network 40 is computer network, and it can be
The internet of broad sense or the computer network of any other interconnection, such as wide area network, metropolitan area
Net or private domain net, as long as it can realize site access and including agency/transfer server.In figure
Though it is shown that multiple client 20-1 ... N and multiple website 30-1 ... M, and retouched in subsequent
One of those or part client and website can be selected to be been described by (for example, client 20-1 in stating
With targeted sites 30-1), but those skilled in the art should immediately, above-mentioned 1 ... N visitor
Family end and 1 ... M website is intended to indicate that multiple client present in live network and multiple websites,
And the client and website to particular number are described in detail least for explanation conveniently, rather than hint pair
Type or position of client and website etc. have limitation.
As shown in figure 1, transfer server 10 can include processor 110, storage device 120 and lead to
T unit 130.Storage device 120 for example can include hard disk and internal memory, for information storage and
Caching.Communicator 130 sends and receives information.Processor 110 then with storage device 120 and logical
T unit 130 is connected.In one embodiment, in server processor, storage device and logical
T unit can be connected with each other by system bus.Processor 110 can be carried for performing the present invention
The targeted sites access method gone out.Preferably, the internal memory of storage device 120 contains instruction, these instructions
When being performed by processor 110, it is possible to achieve targeted sites access method proposed by the present invention.
Fig. 2 is the flow chart of targeted sites access method 200 according to an embodiment of the invention.In step
Rapid 210, the access of targeted sites is failed in response to client, targeted sites inaccessible is being judged
In the case of will be sent to the client in the page info of the targeted sites of preceding caching.The step can
The processor 110 of transfer server 10 is realized as shown in Figure 1.For example, client 20-1 is being accessed
When targeted sites 30-1 fails, networking failure information can be uploaded to transfer server 10 and in
Turn server 10 to conduct interviews.Transfer server 10 is judging the feelings of targeted sites 30-1 inaccessibles
Under condition, the page info by storage device 120 in the targeted sites 30-1 of preceding caching can be sent to
Client 20-1.In this way, it is possible to avoid targeted sites not in preceding caching by transfer server
Webpage inaccessible state when may have access to, thus lifts the viewing experience of user.
Preferably, in the case where judging the targeted sites inaccessible by the mesh of preceding caching
The page info of labeling station point, which is sent to the client, to be included:In the targeted sites in the page
Before the caching expired time of face information is expired, by the page info of the targeted sites of preceding caching
It is sent to the client.Above-mentioned steps can equally realize by transfer server 10, such as processor
Page info can be passed through communicator by 110 before the caching expired time of page info is expired
130 are sent to client 20-1.Caching expired time expire after, if targeted sites still without
Method is accessed, then no longer to the page of client return cache, but for example can directly return to error letter
Breath.Thus, it is possible to avoid that the expired page is sent into user for a long time, so as to ensure the page
Accessibility and ensure content of pages it is ageing two aspect all considered.
Preferably, caching expired time can join with preceding buffer update time correlation.By by net
The buffer update frequency dependence cached when ageing and webpage can be accessed normally when page is unreachable joins, just
The ageing of caching can reasonably be estimated.For example, the webpage of frequent updating is easily expired, thus
Avoid ageing too low webpage being presented to user.It is following also to provide in a preferred embodiment to slow
Deposit the specific calculating of expired time.
In one embodiment, targeted sites access method of the invention is additionally may included in targeted sites
In the case of inaccessible, periodically access the targeted sites, until successful access and update preceding
The page info of the targeted sites of caching.The step for equally transfer server 10 can be used to realize.
For example, in the case of targeted sites 30-1 inaccessibles, communicator 130 can be visited periodically
Targeted sites 30-1 is asked, untill successful access.If successful access, targeted sites 30-1 just can be obtained
Newest page info and correspondingly update above-mentioned page info in preceding caching.
Elaborated above in association with accompanying drawing when targeted sites are unreachable, can by transfer server preceding
The page info of the targeted sites of caching is sent to the targeted sites access scheme of the invention of client.
And also further illustrate when target pages continue unreachable, transfer server is only expired in caching
Forward direction client send caching the page, and periodic access targeted sites so as to access recover when
The preferred scheme updated is obtained in time.
It will illustrate how transfer server can visit in targeted sites further combined with preferred embodiment as follows
The acquisition page cache under normal circumstances asked, and under normal circumstances the acquisition of page cache be how shadow
Ring the ageing preferred scheme of (target pages are unreachable) page cache under abnormal conditions.
In one embodiment, targeted sites access method of the invention is additionally may included in targeted sites
In the case of addressable, request in response to client transfer access target website and judge away from preceding
The time of caching has met or exceeded predetermined cache and has updated interval, updates the target in preceding caching
The page info of website, wherein the interval time between updating twice is the buffer update time.In other words
Say, the buffer update time will not be less than predetermined cache and update interval.For popular website, due to frequent
The request that the transfer received is accessed, therefore transfer server is typically to update interval with predetermined cache to come more
New caching.And be less than the unexpected winner website of renewal of the page frequency for user's access frequency, then it is likely to
The renewal cached on transfer server is determined by longer interval user's access frequency.
Above-mentioned renewal step can equally be realized by transfer server 10.For example, in targeted sites 30-1
In the case of addressable, processor 110 receives client 20-1 transfers in response to communicator 130
Access target website 30-1 ask and judge away from by storage device 120 preceding caching time
Meet or exceed predetermined cache and update interval, update the page info in the targeted sites of preceding caching.
Interval time between updating twice is the buffer update time.
There is user to ask and once cached up to pre- timing at a distance of preceding due to updating caching and needing to meet simultaneously
Between interval both, therefore, it is possible to avoid to cache the page unnecessary renewal.If in scheduled update
Interval has user to ask the transfer server access target page less than in the case of, and transfer server can be with
The access target page and the user that content of pages is sent to request, but its page cache can't be updated.
If scheduled update interval is full but without user's request, transfer server completely can not access target
The page (therefore will not also update caching), but until there is user to ask transfer to access next time again
Carry out the access of targeted sites and the renewal of page cache.
Predetermined cache on transfer server updates interval, simply can be set for all websites
For identical value.For example, predetermined cache can be updated into interval is uniformly set to 600s (10 minutes).
Different types of website can also be directed to, the buffer update time of different class is set.For example, for
Portal website's (for example, Sina, Sohu, homepage of Netease) of information frequent updating, can will be pre-
Determine buffer update interval and set very short, such as 60s (1 minute).And it is less frequent for information updating
Website/webpage (for example, all kinds of entries of Baidupedia), then can by predetermined cache renewal interval set
Obtain longer, such as 3600s (1 hour).
, then for example can basis for browser client using the internal transfer server voluntarily connected
The number of times number of client linking objective website updates corresponding caching.For example, for popular website,
It more can frequently update its caching on transfer server.
In addition, transfer server can also the reference target website parameter of itself formulate its buffer update
Strategy (that is, the predetermined cache for each targeted website, which updates, to be spaced).For example, for via a certain
Particular browser (including install application) in application on the desktop and mobile client
The user browsed, will can first access all websites on the day of user, pass through the browser
Transfer server is accessed once, and transfer server records the web page resources and the money of webpage to be visited
Source head response.(needed by transfer server when accessing the page first on the day of there are other users
Access), transfer server can access the page and content of pages is returned into user, while according to
Buffer update determination strategy come determine the need for update oneself caching corresponding page content.
In one embodiment, transfer server is made according to the parameter included in web page resources head response
Determine buffer update determination strategy.Specific buffer update determination strategy is as follows:
(1) if there is max-age parameters, predetermined cache is updated at intervals of max-age;
(2) if without max-age parameters, there are Etag parameters, then new acquisition content is contrasted and in preceding caching
Etag parameters, and the renewal caching in this Etag Parameters variation;
(3) if without max-age and Etag parameters, contrast is new to obtain content and in preceding caching
Last-modify parameters, caching date newer content;
(4) if without any cache information (such as no-cache or without max-age, Etag, last-modify
Parameter), then inquire about the term of validity for whether having setcookie.If so, then taking the cookie of minimum effective
Phase, decision logic was similar with (1) as max-age;
(5) if information above all without, max-age is set to definite value (for example, 300s), judge
Logical AND (1) is similar.
Transfer server is formulating buffer update strategy (that is, for the predetermined cache of each targeted website
Update interval) after, the ageing strategy of caching can also be preferably formulated (that is, for each target network
The caching expired time stood).Transfer server can record following letter after each renewal caching
Breath:Access the address (URL) of website, final updating time, history buffer renewal time and expired
Time.The final updating time can be that the cache-time that transfer server last time is got is (different
In the last modification time of the last-modify of webpage head response, i.e. webpage in itself).History buffer is more
The new time can be (last history buffer renewal time+(during current time-preceding buffer update
Between))/2.When asking for history buffer renewal time first, predetermined cache can be taken to update interval and made
For the initial value of history buffer renewal time.Caching expired time can be current time+history buffer more
New time * a, wherein a can be any positive integer, such as 1,3,5 or 10.History herein is delayed
Depositing renewal time is the preferred example of the preceding buffer update time, and passes through above formula meter
It is caching expired time to calculate caching expired time (for example, can be realized by processor 110) can then can be regarded as
The preferred example joined with preceding buffer update time correlation.In other preferred embodiments,
The average of all preceding buffer update times can also be used to be used as history buffer renewal time
Value, and thus calculate caching expired time.
Understand for convenience, several examples that above formula calculates caching expired time are given by here.
A certain browser is in morning 0:30 have user 1 to access website A for the first time on the same day.Due to being to use
Family 1 is browsed in the first time on the same day, thus by the acquiescence transfer browser of the browser (for example,
Fig. 1 transfer browser 10) conduct interviews.The content of pages of acquisition is returned to use by transfer browser
Family, and cache in such as storage device 120 content of pages of acquisition.This time for the slow of website A
The final updating time deposited is 0:30.Due to being to obtain first, thus can take predetermined cache update between
Every the initial value as history buffer renewal time, in this instance, take and obtained from head response
Max-age=900, i.e. history buffer renewal time is 15min.Caching expired time is current time
+ history buffer renewal time * 5=0:30+15min*5=1:45 (this time a takes empirical value 5).
0:30 to 0:During 45, even if there is other users (for example, user 2 or 3) to access website
A, also due to buffer update interval (15min) is not arrived without being updated to caching.If 0:45
There is user 4 to access website A, then transfer server can be more while to 4 back page content of user
New caching.Now, the final updating time for website A is 0:45;History buffer renewal time is
(a preceding history buffer renewal time+(a current time-preceding renewal time))/2=(15+
(0:45-0:30))/2=15min;Expired time is current time+history buffer renewal time * 5=
0:45+15min*5=2:00.
With user 40:45 access website A precedent difference, if 0:45 to 0:Do not have during 55
There is user to access website A by transfer server, even if buffer update interval (15min) is 0:45
When full caching will not also be updated.In other words, when site access is normal, transfer service
Device will not actively access website.If user 4 is 0:55 (and it is non-zero:45) website A is accessed, then
Transfer server can update caching while to 4 back page content of user.Now, final updating
Time is 0:55;History buffer renewal time is (preceding history buffer renewal time+(a current time
- preceding renewal time))/2=(15+ (0:55-0:30))/2=20min;Expired time is to work as
The preceding time+history buffer renewal time * 5=0:45+20min*5=2:25.
From the foregoing, it will be observed that even predetermined buffer update interval is identical, user accesses station more infrequently
Point, its page cache it is ageing also weaker.Transfer server is also tended to can not in the website
During access, caching is sent instead to user in the longer time.
Although elaborating the buffer update strategy of transfer server above in association with example and caching ageing plan
Slightly.But it is emphasized that buffer update and caching ageing is triggered under different scenes.
Buffer update is only used for the situation that targeted sites can be accessed, and buffer update interval can be by ringing
The parameter (for example, max-age, Etag, last-modify etc.) obtained in head is answered to determine or by transfer
Server sets itself (for example, according to type or popular degree of website).For example, working as transfer
Renewal time A pages last time is 10 in server:00, max-age is 600 (that is, 10 minutes),
Now the buffer update time can be 10:10 points.Namely when 10:There is user again by transfer after 10 points
The server access A pages, can just update caching.
The ageing situation for being only used for targeted sites inaccessible of caching, is when target pages can not be accessed
And used when being cached using transfer server, now ageing it can confirm to send out to user according to caching
The time for sending transfer server to cache.Still foregoing 0 is used:55 examples updated.If website A exists
1:00 because local server failure becomes inaccessible and continueed to such as morning 7:00, then
1:00 to 2:Website A user 5 or 6 is accessed between 25 can obtain what is returned from transfer server
The caching page is simultaneously browsed accordingly.And 2:To morning 7 after 25:00, because transfer server is sentenced
The page expired of its fixed caching, so even have other users request access, also can be to these users
Client returns to the page for representing to access, and for example malfunction the page.
Be presented above the present invention be used for carry out the method for targeted sites access and retouching for transfer server
State and preferred embodiment.The following description that corresponding targeted sites access mechanism will be provided with reference to Fig. 3.
Fig. 3 is the block diagram of targeted sites access mechanism 300 according to an embodiment of the invention.Target
Site access device 300 includes cache information transmitting element 310, and can preferably include caching
Information transmitting unit 320, the expired time calculating unit 330 of caching and/or communication unit 340.
Cache information transmitting element 310 fails in response to client to the access of targeted sites, is judging
It will be sent in the case of targeted sites inaccessible in the page info of the targeted sites of preceding caching described
Client.
Preferably, cache information transmitting element 310 can expire in the caching expired time of page info
Before, the page info of targeted sites is sent to client.
Optional buffer update unit 320 is in the case of the targeted sites are addressable, in response to visitor
Family end transfer access target website ask and judge to have met or exceeded away from the time in preceding caching
Predetermined cache updates interval, the page info in the targeted sites of preceding caching is updated, wherein twice
Interval time between renewal is the buffer update time.
Optionally caching expired time calculating unit 330 following formula can be used to calculate caching expired time:
Expired time=current time+history buffer renewal time * a are cached,
Wherein, a is greater than 1 positive integer, takes predetermined cache to update interval equal as history buffer renewal time
The initial value of value, and history buffer renewal time calculated by following formula:
History buffer renewal time=(a preceding history buffer renewal time+(current time-preceding is once delayed
Deposit renewal time))/2.
Optional communication unit 320 accesses institute in the case of targeted sites inaccessible, periodically
State targeted sites, until successful access and update preceding caching the targeted sites page info.
Finally, some examples according to targeted sites access scheme of the invention will be provided.
Browser client initiates the request that transfer is accessed when occurring web page access failure under direct-connected,
The transfer server for giving tacit consent to connection by browser conducts interviews to targeted sites.If accessing successfully, in
Turn server and the content of pages obtained is returned to browser client, and it is full at buffer update interval
In the case of update the corresponding page content that caches in transfer server.If transfer server is accessed still
Failure, now transfer server can be with the failure information of record access (e.g., including error code, source
Ip, target ip, target domain name etc.).Some is occurred in that in a short time when transfer server is determined
(a certain error code or a certain target ip data are in certain time for ip or the situation of domain name concentration error
Interior to exceed threshold value, same domain name or IP largely malfunction), transfer server thinks that the website is likely to occur
Factor that is unstable or can not accessing, in a period of time (the caching expired time for being directed to the URL)
When interior browser client conducts interviews again by transfer server, this time is allowed to access directly in
Turn the caching of server to obtain.In the case of the website is inaccessible, transfer server can be to the station
The access (for example, every five minutes) of line period is clicked through, until successful access and updates related slow
Deposit resource.After transfer server finds that the website can be with successful access, it is believed that the website has been repaired,
No longer return cache is to client.When more than caching expired time still above-mentioned website can not be accessed,
The client browser display error page of the website is then accessed by transfer server to trial.
Thus, user's error message can be precisely collected using browser client first, in real time follow-up
The stability state of each website, timely early warning website problem simultaneously responds.Secondly, can be according to history
The timeliness of value dynamic adjustment caching, extension caching is ageing and gets newest data as far as possible.
Again, the program can be reduced (such as there is mistake because webpage is unreachable caused by the problem of website itself
Repetition redirect, service end is unstable and responds imperfect etc.) caused by networking error rate.
10 points of September 6 day starts within such as 2015, http:There is big amount instruction in //m.ibabyes.com/
The error code of the data exception that reading service device is returned after connection is set up, September mistake on the 8th is continued until
Daily record amount is just reduced by mistake.Judge that renewal frequency is about 2 according to site history last-modify
My god.The transfer server cache policy calculated according to this programme, caching can be stored 10 days.Cause
This during this period of time user still can access website by accessing the caching of history.
10 points of September 9 day starts within such as 2015, and m.58.com homepage, which is accessed, big amount instruction clothes occurs
The error code that rebeating turns is thought highly of in business, about 11: 30 on the day of continueing to.The website is designated as no-cache,
But cookie cache-time is 1 hour in setcookie.The transfer calculated according to this programme
Server buffer strategy, caching can be stored 5 hours.Therefore during this period of time user still can be with
Website is accessed by accessing the caching of history.
There is no the processing scheme for collapsing and making in itself due to website in current industry, be substantially all
It is the scheme set for unstable networks.But many times, website unstable in itself also can
Bring user and bring offending networking experience.More particularly compared with minority's website, the renewal of the page time
It is long, once the repair time that goes wrong is also long, and it is then particularly evident to customer impact.If can accomplish
To such website real-time dynamic monitoring, responded as necessary by proxy caching, use will be greatly promoted
The networking experience at family.The present invention is just to provide the solution that a kind of targeted sites are accessed, and protection is in connection
The application in net field (for example, browser client).
Above it is described in detail by reference to accompanying drawing according to targeted sites access method of the invention, dress
Put and transfer server.
In addition, the method according to the invention is also implemented as a kind of computer program, the computer journey
Sequence includes the computer program code for being used to perform the above steps limited in the above method of the invention
Instruction.Or, the method according to the invention is also implemented as a kind of computer program product, the meter
Calculation machine program product includes computer-readable medium, is stored with the computer-readable medium for holding
The computer program of the above-mentioned functions limited in the above method of the row present invention.Those skilled in the art are also
It will be clear that, various illustrative logical blocks, module, circuit with reference to described by disclosure herein and
Algorithm steps may be implemented as the combination of electronic hardware, computer software or both.
The system and method that flow chart and block diagram in accompanying drawing show multiple embodiments according to the present invention
Architectural framework in the cards, function and operation.At this point, it is each in flow chart or block diagram
Square frame can represent a part for a module, program segment or code, the module, program segment or generation
A part for code includes one or more executable instructions for being used to realize defined logic function.Also should
Work as attention, in some realizations as replacement, the function of being marked in square frame can also with different from
The order marked in accompanying drawing occurs.For example, two continuous square frames can essentially be substantially in parallel
Perform, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also
It is noted that the square frame in each square frame and block diagram and/or flow chart in block diagram and/or flow chart
Combination, can be realized with the special hardware based system of function or operation as defined in performing,
Or can be realized with the combination of specialized hardware and computer instruction.
It is described above various embodiments of the present invention, described above is exemplary, and exhaustive
Property, and it is also not necessarily limited to disclosed each embodiment.In the model without departing from illustrated each embodiment
Enclose and spirit in the case of, many modifications and changes for those skilled in the art
It will be apparent from.The selection of term used herein, it is intended to best explain the original of each embodiment
Reason, practical application or the improvement to the technology in market, or make other common skills of the art
Art personnel are understood that each embodiment disclosed herein.
Claims (15)
1. a kind of targeted sites access method, including:
The access of the targeted sites is failed in response to client, is judging that the targeted sites can not
The page info of the targeted sites in preceding caching is sent to the client in the case of access.
2. the method as described in claim 1, wherein judging the feelings of the targeted sites inaccessible
To be sent to the client in the page info of the targeted sites of preceding caching under condition includes:
Before the caching expired time of the page info is expired, the page of the targeted sites is believed
Breath is sent to the client.
3. method as claimed in claim 2, wherein described be cached time phase and preceding caching more
New time correlation connection.
4. method as claimed in claim 2, in addition to:
In the case of the targeted sites are addressable, the Target Station is accessed in response to client transfer
That puts asks and judges that having met or exceeded predetermined cache away from the time in preceding caching updates interval,
The page info in the targeted sites of preceding caching is updated, wherein the interval time between updating twice
It is the buffer update time.
5. method as claimed in claim 4, wherein, the caching expired time is calculated by following formula:
Expired time=current time+history buffer renewal time * a are cached,
Wherein, a is greater than 1 positive integer, takes predetermined cache to update interval equal as history buffer renewal time
The initial value of value, and history buffer renewal time calculated by following formula:
History buffer renewal time=(a preceding history buffer renewal time+(current time-preceding is once delayed
Deposit renewal time))/2.
6. the method as described in claim 1, in addition to:
In the case of the targeted sites inaccessible, the targeted sites are periodically accessed, directly
To successful access and update preceding caching the targeted sites page info.
7. a kind of targeted sites access mechanism, including:
Cache information transmitting element, for failing in response to client to the access of the targeted sites,
In the case where judging the targeted sites inaccessible by the page of the targeted sites of preceding caching
Information is sent to the client.
8. device as claimed in claim 7, wherein the cache information transmitting element is in the page
Before the caching expired time of information is expired, the page info of the targeted sites is sent to the visitor
Family end.
9. device as claimed in claim 8, in addition to:
Buffer update unit, in the case of the targeted sites are addressable, in response to client
Transfer accesses asking and judging to have met or exceeded away from the time in preceding caching for the targeted sites
Predetermined cache updates interval, the page info in the targeted sites of preceding caching is updated, wherein twice
Interval time between renewal is the buffer update time.
10. device as claimed in claim 9, in addition to:
Expired time calculating unit is cached, the caching expired time is calculated using following formula:
Expired time=current time+history buffer renewal time * a are cached,
Wherein, a is greater than 1 positive integer, takes predetermined cache to update interval equal as history buffer renewal time
The initial value of value, and history buffer renewal time calculated by following formula:
History buffer renewal time=(a preceding history buffer renewal time+(current time-preceding is once delayed
Deposit renewal time))/2.
11. device as claimed in claim 7, in addition to:
Communication unit, in the case of the targeted sites inaccessible, periodically accessing institute
State targeted sites, until successful access and update preceding caching the targeted sites page info.
12. a kind of transfer server, including:
Communicator, for sending and receiving information;
Storage device, for storage and cache information;
Processor, is connected to the communicator and the storage device, and the processor is used for:
Letter of the client to the access failure of the targeted sites is received in response to the communicator
Breath, in the case where judging the targeted sites inaccessible by by the storage device in preceding caching
The page info of the targeted sites is sent to the client by the communicator.
13. transfer server as claimed in claim 12, wherein the processor is additionally operable to described
Before the caching expired time of page info is expired, the page info of the targeted sites is passed through described
Communicator is sent to the client.
14. transfer server as claimed in claim 13, wherein the processor is additionally operable to described
In the case of targeted sites are addressable, receive client transfer in response to the communicator and access institute
State targeted sites ask and judge away from having been reached by the storage device in the time of preceding caching or
Update and be spaced more than predetermined cache, update the page info in the targeted sites of preceding caching, wherein
Interval time between updating twice is the buffer update time.
15. transfer server as claimed in claim 14, wherein the processor is additionally operable under
Formula calculates the caching expired time:
Expired time=current time+history buffer renewal time * a are cached,
Wherein, a is greater than 1 positive integer, takes predetermined cache to update interval equal as history buffer renewal time
The initial value of value, and history buffer renewal time calculated by following formula:
History buffer renewal time=(a preceding history buffer renewal time+(current time-preceding is once delayed
Deposit renewal time))/2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610065121.3A CN107025226A (en) | 2016-01-29 | 2016-01-29 | Targeted sites access method, device and transfer server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610065121.3A CN107025226A (en) | 2016-01-29 | 2016-01-29 | Targeted sites access method, device and transfer server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107025226A true CN107025226A (en) | 2017-08-08 |
Family
ID=59524736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610065121.3A Pending CN107025226A (en) | 2016-01-29 | 2016-01-29 | Targeted sites access method, device and transfer server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107025226A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107580053A (en) * | 2017-09-08 | 2018-01-12 | 阿里巴巴集团控股有限公司 | Method for exhibiting data, device, client and system |
CN108829743A (en) * | 2018-05-24 | 2018-11-16 | 平安科技(深圳)有限公司 | Data cached update method, device, computer equipment and storage medium |
CN110209976A (en) * | 2019-06-10 | 2019-09-06 | 南威互联网科技集团有限公司 | A kind of buffering updating method and computer equipment of front end resource |
CN111105190A (en) * | 2019-12-12 | 2020-05-05 | 北京旷视机器人技术有限公司 | Method and device for determining site access sequence and electronic equipment |
CN115297173A (en) * | 2022-08-03 | 2022-11-04 | 国核自仪系统工程有限公司 | OPC communication method and OPC communication system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102469132A (en) * | 2010-11-15 | 2012-05-23 | 北大方正集团有限公司 | Method and system for grabbing web pages from servers with different IPs (Internet Protocols) in website |
CN102868719A (en) * | 2012-06-29 | 2013-01-09 | 北京奇虎科技有限公司 | Network access method and server based on cache |
CN102904937A (en) * | 2012-09-25 | 2013-01-30 | 百度在线网络技术(北京)有限公司 | Method and system for mobile terminal to access webpage, browser and transfer server |
CN102902799A (en) * | 2012-10-12 | 2013-01-30 | 中科方德软件有限公司 | Browser page display method and device based on WebKit |
CN103188293A (en) * | 2011-12-28 | 2013-07-03 | 腾讯科技(深圳)有限公司 | Method and system for allowing mobile terminal to access webpage |
-
2016
- 2016-01-29 CN CN201610065121.3A patent/CN107025226A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102469132A (en) * | 2010-11-15 | 2012-05-23 | 北大方正集团有限公司 | Method and system for grabbing web pages from servers with different IPs (Internet Protocols) in website |
CN103188293A (en) * | 2011-12-28 | 2013-07-03 | 腾讯科技(深圳)有限公司 | Method and system for allowing mobile terminal to access webpage |
CN102868719A (en) * | 2012-06-29 | 2013-01-09 | 北京奇虎科技有限公司 | Network access method and server based on cache |
CN102904937A (en) * | 2012-09-25 | 2013-01-30 | 百度在线网络技术(北京)有限公司 | Method and system for mobile terminal to access webpage, browser and transfer server |
CN102902799A (en) * | 2012-10-12 | 2013-01-30 | 中科方德软件有限公司 | Browser page display method and device based on WebKit |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107580053A (en) * | 2017-09-08 | 2018-01-12 | 阿里巴巴集团控股有限公司 | Method for exhibiting data, device, client and system |
CN108829743A (en) * | 2018-05-24 | 2018-11-16 | 平安科技(深圳)有限公司 | Data cached update method, device, computer equipment and storage medium |
CN110209976A (en) * | 2019-06-10 | 2019-09-06 | 南威互联网科技集团有限公司 | A kind of buffering updating method and computer equipment of front end resource |
CN111105190A (en) * | 2019-12-12 | 2020-05-05 | 北京旷视机器人技术有限公司 | Method and device for determining site access sequence and electronic equipment |
CN111105190B (en) * | 2019-12-12 | 2024-01-23 | 北京旷视机器人技术有限公司 | Method and device for determining site access sequence and electronic equipment |
CN115297173A (en) * | 2022-08-03 | 2022-11-04 | 国核自仪系统工程有限公司 | OPC communication method and OPC communication system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107025226A (en) | Targeted sites access method, device and transfer server | |
CN110096659A (en) | A kind of page display method, device, equipment and readable storage medium storing program for executing | |
CA2662553C (en) | Offline execution of web based applications | |
US8639806B2 (en) | Notice of restored malfunctioning links | |
CN101631052B (en) | Method and device for detecting number of access terminals | |
US7849202B2 (en) | System and method for tracking unique visitors to a website | |
CN103167044B (en) | The method of the intelligently parsing of domain name system DNS, testing device and system | |
US20200382392A1 (en) | Method and server for monitoring users during their browsing within a communications network | |
CN106161669A (en) | A kind of quick domain name analytic method and system and terminal thereof and server | |
CN100563214C (en) | A kind of method and system that improve accesses network resource speed | |
JP2008538883A (en) | Resource address request management method and related gateway device | |
CN104125121A (en) | Network hijacking behavior detecting system and method | |
CN106533944A (en) | Distributed API gateway, management method and management system | |
CN106060004A (en) | Database access method and database agent node | |
CN108718347A (en) | A kind of domain name analytic method, system, device and storage medium | |
WO2012075961A1 (en) | Method, device, and system for acquiring start page | |
CN107070988A (en) | Message processing method and device | |
CN106909690A (en) | Network data caching method | |
CN106411629A (en) | Method used for monitoring state of CDN node and equipment thereof | |
CN106326293A (en) | Access method and device based on dynamic webpage | |
CN106412054B (en) | Dynamic web addresses are converted to naming method, system and its application of static network address | |
CN107580052A (en) | From the network self-adapting reptile method and system of evolution | |
CN107070991A (en) | Network data buffer storage and system | |
CN114598748A (en) | Method, device and system for refreshing cache resources | |
CN105279156B (en) | Network information communication means and network information browsing apparatus |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170808 |
|
RJ01 | Rejection of invention patent application after publication |