Accelerate browsing device net page device shown and method
Technical field
The present invention relates to the device that a kind of network information is browsed, relate in particular to a kind of quickening browsing device net page device shown.The invention still further relates to a kind of method that browsing device net page shows of accelerating.
Background technology
Using access internet through browsers, is the most basic a kind of application of computer networking technology.At present IE of a great variety, the firefox of browser, NetScape, Opera, Maxthon etc., but all be subjected to the influence of two factors: access speed and real-time.Access speed requires browser can respond user's URL request in the shortest time, and real-time then requires up-to-date content to be presented to the user at every turn.
The visit device have one very part and parcel be exactly buffer memory, how using caching mechanism is the important indicator of estimating a visit device performance.Caching mechanism is exactly that the page that the visit device was visited is preserved, so that can show quickly when visiting the same page next time.Two kinds of situations are terrifically arranged, once be if buffer memory in have no longer to services request, but directly extract in the buffer memory the page and the demonstration, this situation is fastest but real-time is the poorest.The 2nd, no matter whether have target pages in the buffer memory, all to the remote server request target page, such speed is the slowest, but real-time is the highest.Thereby use caching mechanism just can between the access speed of browser and real-time, regulate to some extent.
Here it is the visit device two basic problems: the demonstration of data and renewal.For example IE is that display update combines, only just show guaranteeing under the up-to-date situation of data, even if thereby the page in the buffer memory exist, speed still can be slow.For example Opera then separates the demonstration of data with upgrading, if the page of user's request exists in buffer memory, so just direct display buffer file for example upgraded once data cached in 5 minutes then at regular intervals.
Wanting browser can have faster speed, and just needs adopt the mode that the demonstration of data separates with renewal.The preferably embodiment of technology is exactly search engine such as google, baidu etc. hereto, directly from own database the data of having handled well are returned to the user when the user asks to search for, the renewal of data then is constantly to obtain the page, deal with data also being saved in the database on the backstage by Web Spider.
In the ordinary course of things, the visit device at first carries out local verification when access resources, and whether whether the detection resource exist and be expired, if exist it effective, so just directly gets data cached and is shown to and go sight-seeing the device interface, and this situation speed of displaying is the fastest.Out of date if resource exists, the checking that will construct this resource is so wrapped remote server and is gone checking.So just directly do not return 304 bags if this resource on the remote server is upgraded, represent that this resource has been up-to-date, does not need to download again again; If this resource on the remote server is upgraded, so just return 200 bags that comprise up-to-date resource, represent that this resource needs out of date download again.This flow process as shown in Figure 1, among Fig. 1 frame of broken lines with interior be common visit device kernel process simplification figure, be input as resource request, be generally the URL form, be output as and be shown to the visit device.
Chinese invention patent prospectus CN101075236A (open day is on November 21st, 2007) discloses a kind of quickening browsing device net page device shown and method, by the link in the prediction current page, the pre-webpage of downloading each link is saved in local cache, thereby accelerate the surfing of browser, though above-mentioned technology will show and upgrade separately, but when showing the page of local cache for browser at every turn, operation routinely still needs to set up communication with remote server, receive that the affirmation current page that remote server returns is the IE respond packet 304 of the up-to-date page, browser just shows the page of local cache, this mutual process is sometimes very fast sometimes very slow, and speed is subjected to the influence of network synthesis factor.And the renewal of above-mentioned technology is downloaded in advance according to the all-links of each page, and then the formation of down loading updating becomes a lot, also is not that the user can go to visit a lot, downloads a lot of unnecessary webpages and has wasted the space that bandwidth has also been wasted buffer memory.
Summary of the invention
Technical matters to be solved by this invention provides a kind of quickening browsing device net page device shown, and it can accelerate the display speed of browser.For this reason, the present invention also will provide a kind of method that browsing device net page shows of accelerating.
For solving the problems of the technologies described above, quickening browsing device net page device shown of the present invention comprises:
The agency service end is used to receive the IE request package of browser, sends network link information to agent client;
Agent client, be used to receive the network link information that the agency service end transmits on the one hand, analyze the pairing webpage of this network link information and whether be present in cache manager, exist and then webpage is analyzed, do not exist then and send network link information to remote server, send the IE respond packet that remote server returns to browser on the other hand, or the simulation remote server sends the IE respond packet to browser;
Cache manager is used for the analysis according to agent client, the webpage in the buffer memory is upgraded, for browser display.
The present invention utilizes said apparatus to accelerate the method that browsing device net page shows, comprises the steps:
(1) browser sends the IE request package to the agency service end;
(2) the agency service end is sent to agent client with the IE request package;
(3) whether the agent client webpage of analyzing the link information correspondence in the IE request package is present in the buffer memory, if otherwise send the IE request package of webpage to remote server, and receive response data the IE respond packet of this webpage is returned browser, termination routine;
(4) for the webpage that exists in the buffer memory, the direct modeling remote server sends No. 304 respond packet to browser, and this link is added to cache manager, when browser receives No. 304 responses, directly obtains page data and demonstration from buffer memory;
(5) whether each page elements in the analyzing web page is static file, sends the IE request package that this page elements need upgrade for the page elements that is not static file to remote server.
Because the present invention with showing the method separate with renewal, simulates remote server simultaneously and sends the IE respond packet, reduced the mutual of data between browser and the remote server, thereby accelerated the browsing device net page speed of displaying.The present invention also by the behavior of predictive user, upgrades the webpage of buffer memory in addition, thereby has also saved the time that webpage is opened, and has improved efficient.
Description of drawings
Below in conjunction with the drawings and specific embodiments the present invention is described in further detail.
Fig. 1 is a browser data treatment scheme under the general case;
Fig. 2 is the overall construction drawing of quickening browsing device net page device shown of the present invention;
Fig. 3 is the process flow diagram of the method for quickening browsing device net page demonstration of the present invention;
Fig. 4 is the work synoptic diagram that the present invention is used for a plurality of browsers.
Embodiment
As shown in Figure 2, quickening browsing device net page device shown of the present invention comprises: agency service end, agent client and cache manager.Wherein the agency service end is used to receive the IE request package of browser, sends network link information to agent client.Agent client, be used to receive the network link information that the agency service end transmits on the one hand, analyze the pairing webpage of this network link information and whether be present in cache manager, exist and then webpage is analyzed, do not exist then and send network link information to remote server, send the IE respond packet that remote server returns to browser on the other hand, or the simulation remote server sends the IE respond packet to browser.Cache manager is used for the analysis according to agent client, the webpage in the buffer memory is upgraded, for browser display.
Quickening browsing device net page device shown of the present invention also comprises intelligent predicting, is used for the webpage that the behavior prediction user according to the user will link, and this link information sent causes cache manager.
As shown in Figure 3, the present invention utilizes said apparatus to accelerate the method that browsing device net page shows, comprises the steps:
At first browser sends the IE request package to the agency service end, and the agency service end is sent to agent client with the IE request package.
Agent client information extraction then, whether the webpage of analyzing the link information correspondence in the IE request package is present in the buffer memory, if not, then sends the IE request package of webpage to remote server, and the reception response data returns the IE respond packet of this webpage to browser, termination routine.
This webpage of storing in the buffer memory is carried out the logic strategy analysis, if webpage is present in the buffer memory, whether expiredly do not need to detect, do not need through server authentication yet, but the direct modeling remote server sends No. 304 respond packet to browser, then this link is added to cache manager, when browser receives No. 304 responses, just directly from buffer memory, obtain page data and show.
Further whether each page elements in the analyzing web page is static file (comprising static images and static scenario), sends the IE request package that this page elements need upgrade for the page elements that is not static file to remote server.
Cache manager is responsible for the renewal and pre-download of resource, wherein need safeguard two URL formations, and the one, upgrade the URL formation, the 2nd, pre-download URL formation.The agency service process is being provided, when request is quickened, can producing a resource updates request, adding to by the priority Test Strategy and upgrade the URL formation.Can the analysis user behavior, prediction will accessed resources, adds pre-download URL formation to by priority policy.Here priority policy generally can directly use the method for FIFO first come, first served.Why to need cache manager, to separate with renewal in order realizing showing exactly, reach asynchronous effect.
The major function of intelligent predicting is the analysis user behavior, thereby predictive user will accessed resources.But this is an expansion module, can progressively add according to real needs.But can be by opening each linking element in the page post analysis webpage, according to the web page interlinkage that user's behavior prediction user may link, this link is added the pre-download URL formation of cache management.This is the strategy set that is made of a series of Forecasting Methodologies, and for example the URL of current accessed is
Http:// www.abc.com/xyz, infer that the user probably can visit homepage
Http:// www.abc.comFor example be assumed to be 500ms when user's mouse stops certain hour on certain position of visit device, this just represents that the user probably can click the link of this position.These all are predictable behaviors.Even only hundreds of, tens milliseconds can both be realized certain acceleration effect in advance.
Fig. 4 is the work synoptic diagram that the present invention is used for a plurality of browsers, and the present invention can realize by 3 steps: (HOOK) module is injected in (1) exploitation, realizes directed the connection and intelligent predicting.(2) target program that quickens if desired is by oneself exploitation, so directly uses Load Library to load the Hook module and gets final product.Otherwise just developing a loader starts browser and realizes the module injection.(3) realize quickening service, need the development and agency server.The agreement of using in the browser has HTTP, Secure, FTP, Gopher, Socks etc., but does not need to realize fully all agency by agreement services.Generally speaking, the main function of browser is to realize web browser, and can only realize a HTTP Proxy service this moment.
The method that quickening browsing device net page of the present invention shows mainly contains following advantage: (1) adds Speed service itself is as a public acceleration platform independently, and do not depend on certain concrete browsing Device. As long as injected the module that realizes directed connection and intelligent predicting function, this browser to browser In all the request and information of forecasting all can be forwarded to the acceleration service module. (2) do not affect and browse The efficient of device process. The function of orientation module is very little, and nearly all logic strategy is all accelerating clothes The affair module. (3) extensibility is strong. Can increase the acceleration of expansion ground to accelerating service module easily Function. (4) independence is strong. The user can use the browser of concrete accelerating performance and common simultaneously Browser needn't be revised the browser configuration.