Accelerated method, system and server thereof and terminal that Web content loads
Technical field
The present invention relates to Internet technology, relate in particular to accelerated method, system and server thereof and terminal that a kind of Web content loads.
Background technology
At present, most of websites offer in terminal use's the network service content (such as webpage), and the content of dynamically changing every day only accounts for the very little part of full content.A lot of static contents, for example, still image or audio files often occupy the larger specific gravity of the content that it provided.If do not adopt effective content analysis filtering technique to solve the repeated downloads problem of static content, will cause browsing terminal use's repeated downloads lot of data of these contents.For network provider, also be to band-limited huge waste.
Under the condition of IE7.0, Firefox 2.0.0.5 client, the test result of the page download when not taking any filtration measure is as shown in table 1 below:
Network address |
Web data amount (byte) |
Content change percentage |
Actual download data volume (byte) |
Repeated downloads percentage |
Duration (second) is browsed in completion |
The homepage http://www.sina.com.cn of Sina |
476.594 |
1% |
476.594 |
99% |
?44 |
Proud outbound search http://s.maxthon.com |
127.411 |
0% |
127.411 |
100% |
?22 |
The homepage http://www.sohu.com of Sohu |
743.723 |
1% |
743.723 |
99% |
?37 |
Table 1
Proposed in the HTTP1.1 agreement client (IE) caching technology (referring to: http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13).Two key order word Last-Modified and Etag in agreement, have been stipulated.Client behind accession page, with the content caching of this page in this locality; When the page that the each access cache of user is crossed, the http client sends to server end with the final updating time that Last-Modified field in the buffer memory page comprises with request; Server end judges whether this page has had new renewal, if do not upgrade, then server is to client return state sign indicating number; This page of notice client does not upgrade; The page of buffer memory before client is directly used, if renewal is arranged, the page of server after client is returned renewal then.The Etag field comprises the cryptographic hash of the page of visit usually; Also can send to server end with request, server end is judging that requests for page has more under the news, judges whether the cryptographic hash of this page change has also taken place; If do not change; Then to client return state sign indicating number, otherwise, just return the new page and give client.
Under the condition of IE7.0, Firefox 2.0.0.5 client, the test result of the page download when taking based on http1.1 client-cache technology is as shown in table 2 below:
Network address |
Web data amount (byte) |
Content change percentage |
Actual download data volume (byte) |
Repeated downloads percentage |
Duration (second) is browsed in completion |
The homepage http://www.sina.com.cn of Sina |
476.594 |
1% |
36.662 |
87% |
11 |
Proud outbound search http://s.maxthon.com |
127.411 |
0% |
6.286 |
100% |
4 |
The homepage http://www.sohu.com of Sohu |
743.723 |
1% |
57.393 |
87.04% |
14 |
Table 2
Though the client of http agreement (IE) caching technology has reduced the data volume of repeated downloads; But; The client-cache technology of http agreement is that unit controls with the page, lacks the unified management to the Internet resources of server end, uses at the client and server end and all compares confusion; In actual use, effect and not obvious.
Summary of the invention
In view of this, the technical problem that the present invention will solve provides accelerated method and the system that a kind of Web content loads, and can improve the response speed to network access request, reduces the data download amount.
The accelerated method that Web content provided by the invention loads comprises:
Server end generates accelerated network content list;
Client is downloaded accelerated network content list from server end, download and the buffer memory accelerated network content list in Web content, be made as the available sign of the Web content of buffer memory available;
But the Web content of confirming request when client is designated the time spent at local cache and available, returns the Web content of local cache.
Wherein, the completeness check code that also comprises the accelerating network content in the accelerated network content list.
Client is regularly perhaps when trigger event takes place, from the Web content and the available sign thereof of server update local cache.
Further, behind the Web content in the client downloads accelerated network content list, also comprise:
Client is calculated the completeness check code of the Web content of downloading;
Client judges whether the completeness check code that calculates of Web content is identical with completeness check code in accelerated network content list; If; Then the available sign of the Web content of downloading is made as available, otherwise, be made as the available sign of the Web content of downloading unavailable.
Further, this accelerated method also comprises:
Server end generates the server version sign, and client downloads is also preserved the server version sign;
, comprising before the Web content and available sign of server update local cache in client:
Client is from server end Download Server version identifier;
Whether the server version sign that the client judgement is downloaded identifies identical with the server version in client storage; If it is identical; Then not from the Web content and the available sign of server update local cache, otherwise, Web content and available sign carried out from the server update local cache.
The accelerating system that Web content provided by the invention loads comprises:
Server is used to produce accelerated network content list, receives the tabulation download request, sends accelerated network content list;
The terminal is used for sending the tabulation download request to server, receives the accelerated network content list from server, download and the buffer memory accelerated network content list in Web content, be designated the Web content of buffer memory available; But the Web content of confirming request when said client is at local cache and be identified as the time spent, returns the Web content of local cache.
Wherein, server comprises:
The listed files maker is used to produce accelerated network content list, receives the tabulation download request, sends accelerated network content list.
Client comprises:
Information storage module, the Web content and the available sign thereof that are used to store local cache;
The content acquisition module is used for sending the tabulation download request to server, receives the accelerated network content list from server, download and the buffer memory accelerated network content list in Web content, be made as the available sign of the Web content of buffer memory available;
Request processing module is used to receive the access request of Web content, but is designated the time spent at the Web content of confirming request at local cache and available, then returns the Web content of local cache.
Further, the terminal also comprises:
Upgrade control module, be used for timing or when trigger event takes place, send updating message;
The content acquisition module also is used for when receiving updating message, sends the tabulation download request, receives accelerated network content list, upgrades the accelerating network content and the available sign of buffer memory.
Further, server also comprises:
The version identifier generation module is used to produce the server version sign, the request of reception server version identifier, send server version identifier;
Said terminal information memory module also is used for the storage server version identifier;
Said terminal also comprises:
The version identifier request module is used to receive the updating message from said renewal control module, the request of send server version identifier, reception server version identifier, send server version identifier;
The version identifier judge module; Be used to receive server version sign from said version identifier request module; Whether the server version sign of judging said reception is identical with the server version sign of storing at said information storage module, if inequality, then sends updating message to said content acquisition module; Otherwise, do not send updating message to said content acquisition module.
Further, the completeness check code that comprises the accelerating network content in the accelerated network content list;
Said server also comprises:
The completeness check code generator is used to receive Web content, for the Web content that receives generates completeness check code;
The listed files maker also is used for the Web content of said accelerated network content list is sent to said completeness check code generator, obtains the completeness check code of generation, and writes said accelerated network content list;
And the content acquisition module at terminal also is used to calculate the completeness check code of the Web content of buffer memory; Whether the completeness check code that calculates of Web content of judging said buffer memory is identical with completeness check code in said accelerated network content list; If it is identical; Then the available sign of said buffer memory is made as available, otherwise, be made as the available sign of said buffer memory unavailable.
The present invention also provides a kind of server, comprising:
The listed files maker is used to produce accelerated network content list, receives the tabulation download request, sends said accelerated network content list.
Server can also comprise:
The version identifier generation module is used to produce the server version sign, the request of reception server version identifier, send server version identifier.
Further, server also comprises:
The completeness check code generator is used to receive Web content, for the Web content that receives generates completeness check code;
Said listed files maker also is used for the Web content of said accelerated network content list is sent to said completeness check code generator, obtains the completeness check code of generation, and writes said accelerated network content list.
Further, server also comprises:
Monitoring module is used to monitor the change of accelerating network content, when monitoring the accelerating network content changing, upgrades completeness check code in the said accelerated network content list through said completeness check code generator.
The present invention also provides a kind of terminal, comprising:
Information storage module, the Web content and the available sign thereof that are used to store local cache;
The content acquisition module is used for sending the tabulation download request, receives accelerated network content list, download and the buffer memory accelerated network content list in Web content, be made as the available sign of the Web content of buffer memory available;
Request processing module is used to receive the access request of Web content, but is designated the time spent at the Web content of confirming request at local cache and available, then returns the Web content of local cache.
This terminal can also comprise:
Upgrade control module, be used for timing or when trigger event takes place, send updating message;
The content acquisition module also is used for when receiving updating message, sends the tabulation download request, receives accelerated network content list, upgrades the accelerating network content and the available sign of buffer memory.
Further, information storage module also is used for the storage server version identifier;
The terminal also comprises:
The version identifier request module is used to receive the updating message from said renewal control module, the request of send server version identifier, reception server version identifier, send server version identifier;
The version identifier judge module; Be used to receive server version sign from said version identifier request module; Whether the server version sign of judging said reception is identical with the server version sign of storing at said information storage module, if inequality, then sends updating message to said content acquisition module; Otherwise, do not send updating message to said content acquisition module.
Further, the completeness check code that comprises the accelerating network content in the accelerated network content list;
The content acquisition module also is used to calculate the completeness check code of the Web content of buffer memory; Whether the completeness check code that calculates of Web content of judging said buffer memory is identical with completeness check code in said accelerated network content list; If it is identical; Then the available sign of said buffer memory is made as available, otherwise, be made as the available sign of said buffer memory unavailable.
Accelerated method and system that Web content provided by the invention loads; In the unified accelerated network content list that generates of server end; Client obtains the Web content that quickens and is buffered in this locality from server end, and the upstate of the Web content of record buffer memory is when client is intercepted and captured the access request of Web content; But at definite Web content in local cache and time spent; Directly return the Web content of local cache, improved response speed, reduced the data download amount the access request of Web content.Further, the judgement that identifies through server version can reduce the data download when upgrading.And judge to local back whether its integrality changes in data content download, reduced the probability of wrong generation.
Description of drawings
Fig. 1 is the flow chart that an embodiment of the accelerated method that loads according to Web content of the present invention is shown;
Fig. 2 illustrates the flow chart that the client self of an embodiment of the accelerated method that loads according to Web content of the present invention is upgraded;
Fig. 3 is that the client that an embodiment of the accelerated method that loads according to Web content of the present invention is shown is intercepted and captured the flow chart that access request is handled;
Fig. 4 is the block diagram that an embodiment of the accelerating system that loads according to Web content of the present invention is shown.
Embodiment
With preferred embodiment the present invention is carried out detailed description with reference to the accompanying drawings.
Fig. 1 is the flow chart that an embodiment of the accelerated method that loads according to Web content of the present invention is shown.
As shown in Figure 1, in step 101, tabulate at the Web content that the server end generation needs to quicken.Will speed up the Web content list storage in a file, this document can pass through to be encrypted and compression, is without loss of generality, and is called and quickens file mxboost.zip.
In step 103, user end to server end request accelerated network content list, the acceleration file mxboost.zip that the reception server end sends.After the mxboost.zip deciphering and decompressing, client obtains the accelerated network content list of server end.Part or overall network content in the client downloads tabulation, and be buffered in this locality, the available sign that is buffered in local Web content is set to available.
In step 105; When the user when the browse request accesses network content, access request is intercepted and captured by client, client judge this Web content whether in accelerated network content list and correspondence available be designated available; If in accelerated network content list and available be designated available; Then directly return the Web content of local cache, otherwise, download this Web content to server requests.
Client can be regularly or trigger event when taking place, and execution in step 103 is so that upgrade the accelerating network content and the available sign thereof of local cache.Trigger event can be the user press renewing button or system operating state for idle.
In the face of generating accelerated network content list, describes server end down.
Server can generate accelerated network content list through the listed files maker.This document List Builder is according to input parameter, to one or more file or catalogue, generate the listed files that server end need quicken.Input parameter can specify the file type that comprises, whether to the verification etc. once more of the file that generates.Input parameter can be a regular expression, express to get rid of, and logic such as comprises, and for example getting rid of all is that the file of extension name can be expressed as with " php ":
.*\.php$
And the All Files that comprises under inc or the hdr catalogue can be expressed as:
.*\/(inc|hdr)\/.*?
Can also be that the listed files maker sets rule, the listed files maker screens the file that adds tabulation according to preset rule, as fall catalogue and the file etc. that empty file or size exceed certain limit according to rule-based filtering.The listed files maker can be supported several operation systems, like Linux, Unix, Windows etc.
The completeness check code that can also comprise the accelerating network content in the accelerated network content list.After accelerated network content list generated, each Web content in the tabulation generated its corresponding completeness check code.When the accelerating network content changes, the corresponding completeness check code of this Web content of the corresponding renewal of server end.Completeness check code can be the cryptographic hash of Web content.
Another embodiment of the accelerated method that loads according to Web content of the present invention; Server end generates and safeguards that 32 cryptographic hash identifies as server version; If server end place web website has any one file that variation has taken place, server end correspondingly upgrades this cryptographic hash.This cryptographic hash is downloaded and stored to client from server end.Fig. 2 illustrates the flow chart that upgrades according to the client self of this embodiment.
As shown in Figure 2, in step 201, client is sent to destination server and is supported to quicken query requests, and whether server acknowledge is supported to quicken.
In step 203, client judges according to replying of server whether server is supported to quicken, if do not support, then more new technological process finishes, otherwise, the step below continuing to carry out.
In step 205, client obtains 32 cryptographic hash as the server version sign from server.The parameter that this cryptographic hash can be used as message transmits between the server and client side, perhaps downloads to client as file.Under situation about transmitting with file, be without loss of generality, title this document is mxversion.txt.
In step 207, the client relatively server version of local cache identifies and newly downloaded server version sign, if identical; The not modification of content of server end then is described; The Web content of client-cache need not upgrade, and finishes more new technological process, if different; Change has taken place in the Web content that server end then is described, continues execution in step 209.
In step 209, client download to be quickened file mxboost.zip from server, to the deciphering of contracing of this document decompress(ion), acquisition file A.The title and the cryptographic hash that comprise server end accelerating network content among the file A, if variation has taken place some acceleration of web page (being designated as file B) on the server, the corresponding variation just takes place in the cryptographic hash of respective file B (being designated as Hash (B) A) in the A file so.Server file (the B1 that client is described from server end file in download A successively; B2; B3...Bn); And calculate the cryptographic hash Hash (Bi) of each file successively, if corresponding cryptographic hash Hash (Bi) A is inequality among this cryptographic hash Hash (Bi) and the file A, then the available sign of describing List (Bi) of the pairing this document of file Bi in this network server file tabulation of local cache is set to unavailable.If identical, will use downloaded files, upgrade the mirror image of the file Bi of local cache, and the available sign that the pairing this document of file Bi is described List (Bi) is set to available.
Fig. 3 is that the client that an embodiment of the accelerated method that loads according to Web content of the present invention is shown is intercepted and captured the flow chart that access request is handled.
As shown in Figure 3, in step 301, client is through hook (hook), and technology such as SPI (Service Provider Interface) is intercepted and captured the access request of the Web content of browser.
In step 303, client is according to the URI that comprises in the access request, judges in the Web content of local cache whether corresponding Web content is arranged, if do not have, then execution in step 309, otherwise, execution in step 305.
In step 305, the available sign of the map network content of client inspection local cache, if this availablely is designated unavailablely, then execution in step 309, otherwise, execution in step 307.
In step 307, client is directly returned the Web content of local cache and is given browser, and flow process finishes.
In step 309, client offers browser from the Web content of server end download request, and flow process finishes.
Fig. 4 is the block diagram that an embodiment of the accelerating system that loads according to Web content of the present invention is shown.
As shown in Figure 4, accelerating system of the present invention comprises terminal 41 and server 42, and wherein terminal 41 comprises information storage module 410, content acquisition module 411 and request processing module 412, and server 42 comprises listed files maker 420.
Listed files maker 420 is used to receive input parameter, produces accelerated network content list according to input parameter, receives the tabulation download request, sends accelerated network content list.The parameter of input can be a regular expression.
In terminal 41, information storage module 410, the Web content and the accelerated network content list that are used to store local cache comprise the title of accelerating network content in the tabulation;
Content acquisition module 411 is used for sending the tabulation download request to server, receives the accelerated network content list from server, download and the buffer memory accelerated network content list in Web content, be made as the available sign of the Web content of buffer memory available;
Request processing module 412 is used to receive the access request of Web content, the Web content of judging request whether in accelerated network content list and available be designated available; If; The Web content of then confirming request is designated available at local cache and available, return the Web content of local cache, otherwise; Send request to server, the Web content of download request.
Another embodiment of the accelerating system that loads according to Web content of the present invention also comprises the completeness check code of accelerating network content in the accelerated network content list.Server also comprises the completeness check code generator, is used to receive Web content, for the Web content that receives generates completeness check code.The Web content that the listed files maker also is used for will speed up the Web content tabulation sends to the completeness check code generator, obtains the completeness check code of generation, and writes accelerated network content list.The content acquisition module at terminal also is used to calculate the completeness check code of the Web content of buffer memory; Whether the completeness check code that calculates of Web content of judging buffer memory is identical with completeness check code in accelerated network content list; If it is identical; Then the available sign of buffer memory is made as available, otherwise, be made as the available sign of buffer memory unavailable.
Server can also comprise monitoring module; Be used to monitor the change of accelerating network content; When monitoring the accelerating network content changing, upgrade the completeness check code of the accelerating network content that changes in the accelerated network content list through the completeness check code generator.
Another embodiment of the accelerating system that loads according to Web content of the present invention, the terminal also comprises the renewal control module, is used for regularly or when trigger event takes place the transmission updating message.
The content acquisition module also is used to receive updating message, sends the tabulation download request, receives accelerated network content list, upgrades the accelerating network content and the available sign of buffer memory.
Another embodiment of the accelerating system that loads according to Web content of the present invention, server also comprises the version identifier generation module, is used to produce the server version sign, the request of reception server version identifier, send server version identifier.The server version sign can be 32 perhaps cryptographic hash of 64.
Correspondingly, the terminal information memory module also is used for the storage server version identifier.The terminal also comprises version identifier request module and version identifier judge module.
Wherein, the version identifier request module is used to receive the updating message of self refresh control module, the request of send server version identifier, and the reception server version identifier sends to the version identifier judge module with the server version sign.
The version identifier judge module; Be used to receive server version sign from the version identifier request module; Judge that whether the server version sign that receives is identical with the server version sign of storing at said information storage module, if inequality, then sends updating message to the content acquisition module; Otherwise, do not send updating message to the content acquisition module.
Table 3 is for illustrating the data of using the download situation after accelerated method of the present invention and the system:
Network address |
Web data amount (byte) |
Content change percentage |
Actual download data volume (byte) |
Repeated downloads percentage |
Duration (second) is browsed in completion |
Proud outbound search
http://s.maxthon.com |
127.411 |
?0% |
0 |
?0% |
0.5 |
Table 3
Data through table 3 can find out that accelerated method of the application of the invention and system have not only saved taking for the finite element network bandwidth: with respect to not taking any filtration measure, from 127k to 0k; With respect to having used the http filtration, from 6.286 to 0.And can shorten the used time of user's browsing network resources: with respect to not taking any filtration measure, from 22 seconds to 0.5 second; With respect to having used the http filtration, from 4 seconds to 0.5 second.
Accelerated method and system that Web content provided by the invention loads; In the unified accelerated network content list that generates of server end; Client obtains the Web content that quickens and is buffered in this locality from server end, and the upstate of the Web content of record buffer memory is when client is intercepted and captured the access request of Web content; But in the map network content time spent of confirming local cache; Directly return the Web content of local cache, improved response speed, reduced the data download amount the access request of Web content.Further, the judgement that identifies through server version can reduce the data download when upgrading.And judge to local back whether its integrality changes in data content download, reduced the probability of wrong generation.
Description of the invention provides for example with for the purpose of describing, and is not the disclosed form that exhaustively perhaps limit the invention to.A lot of modifications and variation are obvious for those of ordinary skill in the art.Selecting and describing embodiment is for better explanation principle of the present invention and practical application, thereby and makes those of ordinary skill in the art can understand the various embodiment that have various modifications that the present invention's design is suitable for special-purpose.