Accelerate the device and method that browsing device net page shows
Technical field
The present invention relates to the device that a kind of network information is browsed, relate in particular to a kind of device that browsing device net page shows of accelerating.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 impact of two factors: access speed and real-time.The URL that access speed requires browser can respond the user within the shortest time asks, and real-time then requires at every turn up-to-date content presentation to the user.
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-saving that the visit device was accessed is got off, in order to can show quickly when accessing the same page next time.Two kinds of terrifically situations are 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 to some extent caching mechanism just can between the access speed of browser and real-time, regulate.
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 in 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 then direct display buffer file for example upgraded once data cached in 5 minutes at regular intervals.
Wanting browser can have faster speed, and just needs adopt the mode that the demonstration of data separates with renewal.Preferably embodiment for this technology is exactly search engine such as google, baidu etc., 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 the speed that this situation shows is the fastest.Out of date if resource exists, the checking that will construct so this resource is 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 again to download 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, the dotted line frame is input as resource request take interior as common visit device kernel process simplification figure among Fig. 1, is generally the URL form, is output as and is shown to the visit device.
Chinese invention patent prospectus CN101075236A (open day is on November 21st, 2007) discloses a kind of apparatus and method that browsing device net page shows of accelerating, 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, although 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 impact 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 access 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 device that browsing device net page shows of accelerating, 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, the device that quickening browsing device net page of the present invention shows comprises:
The agency service end, the IE request that is used for the reception browser is wrapped, and sends network link information to agent client;
Agent client, be used for the network link information that the Receiving Agent service end is transmitted, analyze the corresponding webpage of this network link information and whether be present in cache manager, if exist, then the direct modeling remote server sends the IE respond packet to browser, and whether each page elements in the analyzing web page be static file, sends the IE request bag that this page elements need to upgrade for the page elements that is not static file to remote server; If do not exist, then send network link information to remote server, and send the IE respond packet that remote server returns to browser;
Cache manager is for the webpage that upgrades buffer memory.
The present invention utilizes said apparatus to accelerate the method that browsing device net page shows, comprises the steps:
(1) browser transmission IE request is wrapped to the agency service end;
(2) the agency service end is sent to agent client with IE request bag;
(3) whether agent client analysis IE asks webpage corresponding to link information in the bag to be present in the buffer memory, if otherwise wrap to the IE request of remote server transmission webpage, and the reception response data returns the IE respond packet of this webpage to 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 bag that this page elements need to 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 simultaneously remote server and sends the IE respond packet, reduced the mutual of data between browser and the remote server, thereby accelerated the speed that browsing device net page shows.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 browser data treatment scheme under the general case;
Fig. 2 is the overall construction drawing of the device of quickening browsing device net page demonstration 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, the device of quickening browsing device net page demonstration of the present invention comprises: agency service end, agent client and cache manager.Wherein the agency service end is used for receiving the IE request bag of browser, sends network link information to agent client.Agent client, be used on the one hand the network link information that the Receiving Agent service end is transmitted, analyze the corresponding 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 device that quickening browsing device net page of the present invention shows also comprises the intelligent predicting module, is used for the webpage that the behavior prediction user according to the user will link, and this link information is sent to 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 transmission IE request is wrapped to the agency service end, and the agency service end is sent to agent client with IE request bag.
Then agent client information extraction, whether webpage corresponding to link information of analyzing in the IE request bag is present in the buffer memory, if not, then sends the IE request bag 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 bag that this page elements need to upgrade for the page elements that is not static file to remote server.
Cache manager is responsible for 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 accelerated, can producing a resource updates request, adding to by the priority Test Strategy and upgrade the URL formation.Can the analysis user behavior, the resource that prediction will be accessed is added 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 module is the analysis user behavior, thus the resource that predictive user will be accessed.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 access homepage
Http:// www.abc.comFor example be assumed to be 500ms when user's mouse stops certain hour in 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) if the target program that needs to accelerate is by oneself exploitation, so directly uses Load Library to load the Hook module and get final product.Otherwise just developing a loader starts browser and realizes the module injection.(3) realize accelerating 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) acceleration service itself is as a public acceleration platform independently, and do not depend on certain concrete browser.As long as injected the module that realizes directed connection and intelligent predicting function to browser, all requests and information of forecasting in this browser all can be forwarded to the acceleration service module.(2) do not affect the efficient of browser process.The function of orientation module is very little, and nearly all logic strategy is all accelerating service module.(3) extensibility is strong.Can increase expansion ground acceleration function to accelerating service module easily.(4) independence is strong.The user can use browser and the generic browser of concrete accelerating performance simultaneously, needn't revise the browser configuration.