CN106790334A - A kind of page data transmission method and system - Google Patents

A kind of page data transmission method and system Download PDF

Info

Publication number
CN106790334A
CN106790334A CN201510828677.9A CN201510828677A CN106790334A CN 106790334 A CN106790334 A CN 106790334A CN 201510828677 A CN201510828677 A CN 201510828677A CN 106790334 A CN106790334 A CN 106790334A
Authority
CN
China
Prior art keywords
server
client
website
super
web
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
Application number
CN201510828677.9A
Other languages
Chinese (zh)
Inventor
吴伟勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou UCWeb Computer Technology Co Ltd
Guangzhou Dongjing Computer Technology Co Ltd
Original Assignee
Guangzhou Dongjing Computer Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Dongjing Computer Technology Co Ltd filed Critical Guangzhou Dongjing Computer Technology Co Ltd
Priority to CN201510828677.9A priority Critical patent/CN106790334A/en
Publication of CN106790334A publication Critical patent/CN106790334A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a kind of page data transmission method and system.The method includes:Server sets up one or more different super web page templates and saves it in its own and client;Server receives and parses through the page request of client transmission;When required non-figure web resource is preserved in the local cache of client, non- figure web resource needed for indicating client directly to be read from client local cache, the non-figure web resource that will otherwise be obtained according to page request carries out delta compression computing and obtains incremental data with super web page template, and incremental data is transmitted into client.Its advantage is:In the uncached non-figure web resource of client, the incremental data between non-figure web resource and super web page template is only transmitted to client by server, it is to avoid issue the partial data of non-figure web resource, shortens the page response time, saves transmission flow.

Description

A kind of page data transmission method and system
Technical field
The present invention relates to Internet communication technology field, in particular to a kind of transmission of page data Method and system.
Background technology
Mobile terminal is provided with the client of browser, when by the Client browse page, service How device is quickly the key of influence page response speed to client back page data.And page number According to including the main document page and the web resource related to page parsing.Web resource includes picture resource And outreach JavaScript (script) files and CSS (Cascading Style Sheets, stacking CSS) the non-figure web resource such as pattern file.Wherein, the website for being accessed for user's high frequency, should Web resource under each path of website is same or similar, therefore avoids repeating to issue identical web moneys Source is the key for improving page response speed.
At present, it is general using the web resource transmission method based on client-cache technology, in the method In, server obtains the web resource of the corresponding page of page domain name that client is accessed, and judges the web Whether resource can be cached, if it is then being provided to client return cache mark, the web Source and its unique mark.Client according to the cashing indication cache page domain name, the web resource and its Unique mark.When client initiates the page request under the page domain name again, determine from caching The all web resources associated with the page domain name, and the unique mark of these web resources is constituted mark Know set, the logo collection is included in above-mentioned page request.After server receives the page request, Calculate the unique mark of the corresponding all web resources of the page domain name, the unique mark of contrast conting with Unique mark in the logo collection that the page request is included, if logo collection is unique comprising certain for calculating Mark, it is determined that the client-cache unique mark corresponding web resource, then do not return to the web Resource, is returned only to indicate client to use the configured information of the web resource of local cache.Client After receiving the configured information, directly coordinate page parsing using the web resource of local cache.
The method of above-mentioned transmission web resource accesses some particular stations for user's high frequency certain effect Really, but user is not necessarily only fixed accesses certain website.And client-cache finite capacity, Ke Nengyou The picture resource of page parsing is not influenceed largely in caching, cause to influence the non-figure web of page parsing to provide The buffer memory in source is very low, and in client uncached non-figure web resource, server must issue the non-figure The partial data of web resource, extends the page response time, and waste transmission flow.
The content of the invention
In view of this, the purpose of the embodiment of the present invention is to provide a kind of page data transmission method and be System, in the uncached non-figure web resource of client, it is corresponding that server only issues non-figure web resource Incremental data is to client, it is to avoid issue the partial data of non-figure web resource.
A kind of page data transmission method is the embodiment of the invention provides, including:
Server sets up one or more different super web page templates and saves it in its own and visitor In the end of family, each super web page template is included in the similar non-figure under each path of a certain class website Web resource;
Server receives and parses through the page request of client transmission;
When required non-figure web resource is preserved in the local cache of client, server is indicated The client directly reads required non-figure web resource from the local cache of client, otherwise
The non-figure web resource that server will be obtained according to page request enters with the super web page template Row delta compression computing, obtains incremental data;
The incremental data is transferred to client by server.
Preferably, the condition that a certain class website meets includes:Similar non-figure under each path in website Web resource number is less than default value, and the total capacity of similar non-figure web resource is less than preset capacity; User's visit capacity of website is higher than predetermined threshold value;The correcting frequency of website is less than predeterminated frequency.
Preferably, also include:The data structure of the super web page template includes non-figure web resource class Type, the website domain name list of website, the version number of the super web page template and will be non-described in website The text data that the content of figure web resource type is merged into.
Preferably, also include:The non-figure web resource type includes script type and pattern class.
Preferably, in the step of server sets up one or more different super web page templates, The method for building up includes:
Server determines the completely the same multiple websites of organizational structure and by the website domain of the plurality of website Name composition website domain name list;
Server determines the non-figure web resource type under each path of website, sets the super webpage mould The version number of plate;
The content of the non-figure web resource type in website is merged into text data by server;
Server the text data is encrypted by default AES and encryption algorithm and Encoding operation, obtains the identifier of the super web page template, while using the identifier as the super net The filename of page template.
Preferably, the content of non-figure web resource type described in website is merged written by the server The step of notebook data, including:
Server is based on content of the file-level the described non-figure web resource type under each path in website Directly it is merged into text data;Or,
Server determines each data block in the content of the described non-figure web resource type under each path in website Between similarity degree, extract phase from the content of the described non-figure web resource type under each path Data block like degree more than preset similarity value, text data is merged into by the data block of extraction.
Preferably, also include:When client prepare access a website when, retrieve its preservation one or Multiple super web page templates, find out the super web page template suitable for the website, are obtained from local cache The corresponding client-cache list of website domain name of the website is taken, the client-cache list includes client The mark of the corresponding non-figure web resource of the website domain name that end has cached;Client sends page request To server, website domain name, the mark of super web page template of the website are provided in the page request Know symbol, non-figure web resource type, version number and the client-cache list.
Preferably, server parses the website domain name of website, super webpage from the page request The identifier of template, non-figure web resource type, version number and the client-cache list;
The server obtain it is corresponding with the website domain name and with the non-figure web resource class for parsing The non-figure web resource of type identical;
Calculate the mark of acquired non-figure web resource, determine in the client-cache list whether Comprising the mark for calculating, if comprising the non-figure web resource required for judging is present in the client In the local cache at end, otherwise required non-figure web resource is not present in the local slow of the client In depositing.
Preferably, in the step of the mark of the non-figure web resource acquired in the calculating, including: Content to the non-corresponding address of figure web resource and the non-figure web resource carries out Hash fortune Calculate, obtain the corresponding cryptographic Hash of the non-figure web resource, the cryptographic Hash is used as the non-figure The mark of web resource.
Preferably, the client is indicated directly to read from the local cache of the client in the server In the step of taking required non-figure web resource, including:
Server will cache configured information and be sent to the client, and the configured information that cached includes The mark of required non-figure web resource and cashing indication;
The client has cached configured information described in receiving, according to the mark of required non-figure web resource Know and required non-figure web resource is directly obtained from client local cache.
Preferably, the non-figure web resource and super net that will be obtained according to page request in the server Page template carries out delta compression computing, the step of obtain incremental data in, including:
Server parses the mark of the corresponding super web page template of website domain name from the page request Know symbol and version number;
Identifier and version number of the server according to the described super web page template for parsing, from its preservation One or more super web page templates in obtain corresponding super web page template, according to obtain non-figure Web resource and super web page template carry out delta compression computing, obtain incremental data.
Preferably, also include:The server will carry out the non-figure web resource of delta compression computing Mark, the identifier of super web page template and delta compression operation result be buffered in server local and delay Deposit system, the delta compression operation result be success flag and incremental data, or the delta compression fortune Result is calculated unsuccessfully to identify.
Preferably, also include:Before server carries out delta compression computing, inquiry server local delays Whether deposit system has cached the corresponding increasing of the identifier of mark and super web page template of non-figure web resource Amount compaction algorithms result;
When the uncached corresponding delta compression operation result of server local caching system, server will The non-figure web resource carries out delta compression computing with super web page template, obtains incremental data;
When server local caching system has cached corresponding delta compression operation result, directly from clothes Business device local cache system obtains corresponding delta compression operation result.
Preferably, it is described when the uncached corresponding delta compression operation result of server local caching system And server is carried out after delta compression computing obtains incremental data,
Server calculates the ratio between the capacity of the incremental data and the capacity of non-figure web resource, obtains To the corresponding delta compression rate of the non-figure web resource;
If the delta compression rate is less than default compression threshold, server is by the mark of the non-figure web resource Knowledge, the identifier of the super web page template, success flag and the incremental data are cached to server local Caching system;
If the delta compression rate is more than or equal to the default compression threshold, server is by the increasing Buffer service is by the mark of the non-figure web resource, the identifier of the super web page template and unsuccessfully marks for amount Knowledge is cached to server local caching system.
Preferably, also include:Response is carried out to the page request according to the delta compression operation result,
When corresponding delta compression operation result includes success flag and incremental data, server is increasing Amount mode carries out response to the page request;
When corresponding delta compression operation result includes unsuccessfully identifying, server is in partial data mode Response is carried out to the page request.
Preferably, the step of the server carries out response with incremental mode to the page request In, including:The server passes through page response header of the preset protocol form to the non-figure web resource Information, client-cache judge mark, increment operation mark, the identifier of super web page template, are somebody's turn to do The original size of non-figure web resource, the size of incremental data and the incremental data are packaged, will Data after encapsulation are transferred to client as page reply data.
Preferably, also include:The page reply data of client the reception server transmission, passes through Page reply data described in the preset protocol format analysis;
According to the super net corresponding with the identifier of the described super web page template for receiving of local cache Page template and the incremental data, the non-figure web resource required for reduction;
The original size that the size of the non-figure web resource according to reduction includes with page reply data judges Whether restoring operation succeeds;
If reducing successfully and the client-cache judging that mark instruction needs caching, will be required It is local that non-figure web resource is buffered in client.
Preferably, the step of response is carried out to the page request in partial data mode in the server In rapid, including:
The server is compressed by default compress mode to the non-figure web resource, is compressed Data;
By preset protocol form to page response header, the client-cache of the non-figure web resource Judge that mark, the mark of the default compress mode and the compressed data are packaged, after encapsulation Data be transferred to client as page reply data.
Preferably, also include:The page reply data of client the reception server transmission, passes through Page reply data described in the preset protocol format analysis;
According to the mark of the default compress mode, using corresponding default compress mode to the compression Data are decompressed, and obtain required non-figure web resource;
If the client-cache judges mark, instruction needs caching, and required non-figure web is provided Source cache is local in client.
Preferably, also include:Client manages its storage in the way of independently of client local cache One or more super web page templates;Client is closed or opened by the control parameter that backstage issues Open the corresponding super web page template in a certain class website.
Preferably, also include:Server detects each super web page template correspondence every preset time period Website correcting degree, when the correcting degree for detecting a website exceedes default correcting degree, root The super web page template of the corresponding redaction in the website is generated according to the website after correcting.
Preferably, also include:The page request that server sends according to client, determines that client is delayed Whether the version of the corresponding super web page template in the website to be accessed deposited is latest edition;
When it is not latest edition to determine the version of the super web page template of client-cache, service Device transmission update instruction information gives the client;
The client is downloaded from server according to the update instruction information and stores the super web page template Latest edition.
The embodiment of the present invention additionally provides a kind of page data Transmission system, including:Server and client End, wherein:
The server is used to set up one or more different super web page templates and save it in it In itself and the client, each super web page template is included under each path of a certain class website Similar non-figure web resource;
The server is used to receive and parse through the page request that the client sends;
The non-figure web resource that the server is used for required for being preserved in the local cache of client When, the non-figure web required for indicating the client directly to be read from the local cache of the client is provided Source, otherwise, non-figure web resource and the super web page template that will be obtained according to page request carry out increment Compaction algorithms, obtain incremental data;Client is transferred to using the incremental data as page reply data End.
Preferably, the condition that a certain class website meets includes:
Similar non-figure web resource number under each path in website is less than default value, and similar non-figure The total capacity of web resource is less than preset capacity;User's visit capacity of website is higher than predetermined threshold value;Website Correcting frequency be less than predeterminated frequency.
Preferably, also include:The data structure of the super web page template includes non-figure web resource class Type, the website domain name list of website, the version number of the super web page template and will be non-described in website The text data that the content of figure web resource type is merged into.
Preferably, also include:The non-figure web resource type includes script type and pattern class.
Preferably, the server is used to determine completely the same multiple websites of organizational structure and this is more The website domain name composition list of individual website;Determine the non-figure web resource type under each path of website, Set the version number of the super web page template;The content of non-figure web resource type described in website is closed And into text data;The text data is encrypted by default AES and encryption algorithm And encoding operation, the identifier of the super web page template is obtained, while super as this using the identifier The filename of web page template.
Preferably, the server is used for based on file-level the described non-figure under each path in website The content of web resource type is directly merged into text data;Or,
The server, the content for determining the described non-figure web resource type under each path in website In similarity degree between each data block, the content of the described non-figure web resource type under each path In extract similarity degree more than preset similarity value data block, the data block of extraction is merged into text Data.
Preferably, also include:The client is used to, when preparing to access a website, retrieve its preservation One or more super web page templates, the super web page template suitable for the website is found out, from local The corresponding client-cache list of website domain name of the website, the client-cache list are obtained in caching The mark of the corresponding non-figure web resource of the website domain name cached including client;Sending the page please Ask to server, the website domain name of the website, super web page template are provided in the page request Identifier, non-figure web resource type, version number and the client-cache list.
Preferably, the server be used for parsed from the page request website website domain name, The identifier of super web page template, non-figure web resource type, version number and the client-cache List;Obtain it is corresponding with the website domain name and with the non-figure web resource type identical for parsing Non- figure web resource;The mark of acquired non-figure web resource is calculated, the client-cache is determined Whether comprising the mark for calculating in list, if comprising the non-figure web resource required for judging is deposited Be the client local cache in, otherwise required non-figure web resource is not present in the client In the local cache at end.
Preferably, the server is additionally operable to the corresponding address of the non-figure web resource and described The content of non-figure web resource carries out Hash operation, obtains the corresponding cryptographic Hash of the non-figure web resource, The cryptographic Hash is used as the mark of the non-figure web resource.
Preferably, the server is used to that configured information will to have been cached and is sent to the client, it is described Caching configured information includes the mark of required non-figure web resource and cashing indication;
The client be used to receiving it is described cached configured information, provided according to required non-figure web The mark in source directly obtains required non-figure web resource from client local cache.
Preferably, the server is corresponding super for parsing website domain name from the page request The identifier of level web page template and version number;According to the identifier of the described super web page template for parsing With the version number, corresponding super net is obtained from one or more super web page templates that it is preserved Page template, delta compression computing is carried out according to the non-figure web resource and super web page template that obtain, is obtained To incremental data.
Preferably, also include:The server is additionally operable to have carried out the non-figure web of delta compression computing The mark of resource, the identifier of super web page template and delta compression operation result are buffered in server sheet Ground caching system, the delta compression operation result is success flag and incremental data, or the increment pressure Contracting operation result is unsuccessfully to identify.
Preferably, also include:The server was additionally operable to before delta compression computing is carried out, inquiry Whether server local caching system has cached the mark of non-figure web resource and the mark of super web page template Know the corresponding delta compression operation result of symbol;When the uncached corresponding increment of server local caching system During compaction algorithms result, the non-figure web resource is carried out into delta compression computing with super web page template, Obtain incremental data;When server local caching system has cached corresponding delta compression operation result When, directly obtain corresponding delta compression operation result from server local caching system.
Preferably, the server is additionally operable to when the uncached corresponding increment of server local caching system Compaction algorithms result and server carry out after delta compression computing obtains incremental data, calculating the incremental number According to capacity and the capacity of non-figure web resource between ratio, obtain the non-figure web resource corresponding Delta compression rate;If the delta compression rate is less than default compression threshold, by the non-figure web resource Mark, the identifier of the super web page template, success flag and the incremental data are cached to server sheet Ground caching system;If the delta compression rate is more than or equal to the default compression threshold, by the non-figure The mark of web resource, the identifier of the super web page template and unsuccessfully mark be cached to server local Caching system.
Preferably, the server be used for when corresponding delta compression operation result include success flag and During incremental data, response is carried out to the page request with incremental mode;When corresponding delta compression fortune Result is calculated including when unsuccessfully identifying, response being carried out to the page request in partial data mode.
Preferably, the server is additionally operable to the page to the non-figure web resource by preset protocol form Face response header, client-cache judge mark, increment operation mark, the mark of super web page template Knowing symbol, the original size of the non-figure web resource, the size of incremental data and the incremental data is carried out Encapsulation, client is transferred to using the data after encapsulation as page reply data.
Preferably, also include:The client is used for the page answer number of the reception server transmission According to by page reply data described in the preset protocol format analysis;According to local cache with connect The corresponding super web page template of identifier and the incremental data of the described super web page template received, also Non- figure web resource required for original;The size of the non-figure web resource according to reduction and page answer number Judge whether restoring operation succeeds according to the original size for including;If reducing successfully and the client-cache Judge that mark instruction needs caching, then required non-figure web resource is buffered in client local.
Preferably, the server is additionally operable to carry out the non-figure web resource by default compress mode Compression, obtains compressed data;By preset protocol form to the page response header of the non-figure web resource Information, client-cache judge that mark, the mark of the default compress mode and the compressed data are entered Row encapsulation, client is transferred to using the data after encapsulation as page reply data.
Preferably, also include:The client is used for the page answer number of the reception server transmission According to by page reply data described in the preset protocol format analysis;According to the default compression side The mark of formula, is decompressed using corresponding default compress mode to the compressed data, obtains institute The non-figure web resource for needing;If the client-cache judges mark, instruction needs caching, by institute It is local that the non-figure web resource for needing is buffered in client.
Preferably, also include:The client is additionally operable in the way of independently of client local cache Manage one or more super web page templates of its storage;The control parameter that is issued by backstage is closed Or open the corresponding super web page template in a certain class website.
Preferably, also include:The server is additionally operable to detect each super net every preset time period The correcting degree of the corresponding website of page template, when the correcting degree for detecting a website exceedes default correcting During degree, the super web page template of the corresponding redaction in the website is generated according to the website after correcting.
Preferably, also include:The server is additionally operable to the page request sent according to client, really Whether the version for determining the corresponding super web page template in the website to be accessed of client-cache is newest Version;When it is not latest edition to determine the version of the super web page template of client-cache, clothes Business device transmission update instruction information gives the client;
The client is additionally operable to be downloaded from server according to the update instruction information and to store this super The latest edition of web page template.
Page data transmission method provided in an embodiment of the present invention and system, its advantage is:Set up One or more different super web page templates simultaneously save it in server and client side, super webpage mould Plate includes the similar non-figure web resource under a certain each path in class website.When required non-figure web is provided When source is not existed in client local cache, the non-figure web that server will be obtained according to page request Resource carries out delta compression computing and obtains incremental data with super web page template, and incremental data is transmitted into visitor Family end.Because only be transmitted to for the incremental data between non-figure web resource and super web page template by server Client, it is to avoid issue the partial data of non-figure web resource, shorten the page response time, saves Transmission flow is saved.
To enable the above objects, features and advantages of the present invention to become apparent, preferable reality cited below particularly Example is applied, and coordinates appended accompanying drawing, be described in detail below.
Brief description of the drawings
Figure 1A shows a kind of page data transmission method flow chart of the invention;
Figure 1B shows a kind of flow chart for updating super web page template of the invention;
Fig. 2 shows a kind of page data Transmission system structural representation of the invention.
Specific embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the invention, Rather than whole embodiments.The group of the embodiment of the present invention generally described and illustrated in accompanying drawing herein Part can be arranged and designed with a variety of configurations.Therefore, sheet below to providing in the accompanying drawings The detailed description of inventive embodiment is not intended to limit the scope of claimed invention, but only Only represent selected embodiment of the invention.Based on embodiments of the invention, those skilled in the art are not having There is the every other embodiment obtained on the premise of making creative work, belong to protection of the present invention Scope.
It is based in the web resource transmission method of client-cache in view of correlation technique, client-cache Finite capacity, may cause to influence the buffer memory of non-figure web resource due to caching a large amount of picture resources Very low, in client uncached non-figure web resource, server must issue the complete of non-figure web resource Entire data, extends the page response time and wastes transmission flow.
Based on this, a kind of page data transmission method and system are the embodiment of the invention provides.Lead to below Embodiment is crossed to be described.
Embodiment 1
Referring to Figure 1A, a kind of page data transmission method is the embodiment of the invention provides.The method is specific Comprise the following steps:
Step 101:Server sets up one or more different super web page templates and saves it in it In itself and client, each super web page template is included in same under each path of a certain class website The non-figure web resource of class.
In embodiments of the present invention, server can be the corresponding background server of browser or agency's clothes Business device etc..
The data structure of above-mentioned super web page template includes non-figure web resource type, the website domain of website List of file names, the version number of super web page template and the content by above-mentioned non-figure web resource type in website The text data being merged into.Non- figure web resource includes the JavaScript scripts and CSS samples that outreach Formula table, above-mentioned non-figure web resource type includes script type and pattern class, and super web page template can be Script supertemplete and pattern supertemplete.
The use of super web page template is the website domain name based on website, because the non-figure of different web sites There is very big difference in the convergence situation and size of data of web resource.Super web page template is directed to website All similar non-figure web resource under each path, primarily directed to JavaScript scripts and CSS CSS, i.e., for the website domain name for giving, the corresponding super web page template of the website domain name is most There are a script supertemplete and one style supertemplete more.
In embodiments of the present invention, it is adaptable to the condition bag met needed for the website of super web page template Include:
(1) number of the similar non-figure web resource under each path in website is less than default value, and together The total capacity of the non-figure web resource of class is less than the similar non-figure web under each path in preset capacity, i.e. website Resource is to assemble and convergent, so avoids client and server from preserving and safeguard super web page template Overhead it is excessive;
(2) user's visit capacity of website belongs to the website of high frequency access higher than predetermined threshold value, i.e. website, The utilization rate of the corresponding super web page template of website that high frequency is accessed is very high;
(3) the correcting frequency of website is less than predeterminated frequency, and correcting frequency refers to that the script of website is used Technology or the framework frequency that great changes will take place, such as website is transferred to another from certain script bank Script bank, or website format layout occur Important Adjustment, then or website CSS files occur Very big change.Great changes will take place for the corresponding non-figure web resource possibility in website during due to website revision, So need to regenerate the corresponding super web page template in website after correcting, it is therefore desirable to which website changes Version frequency is less than predeterminated frequency, to avoid frequently generating the super web page template of redaction, reduces super The storage of web page template and maintenance cost.
In embodiments of the present invention, server determines that the completely the same multiple websites of organizational structure simultaneously should The website domain name composition website domain name list of multiple websites, determines non-under each path of this multiple website Figure web resource type, and set the version number of the super web page template.
Server can be according to the version number of the default release-naming rule settings super web page template.In advance If release-naming rule can be to be numbered according to natural number or lexicographic order.
The content of non-figure web resource type in website is merged into text data by server.Specifically, Server is based on file-level, and the content of the above-mentioned non-figure web resource type under each path in website is direct It is merged into text data;Or, server first determines the above-mentioned non-figure web resource under each path in website Similarity degree in the content of type between each data block, the non-figure web resource class under each path Data block of the similarity degree more than preset similarity value is extracted in the content of type, the data block that will be extracted is closed And into text data.
The text data that server is obtained by default AES and encryption algorithm to above-mentioned merging It is encrypted and encoding operation, obtains the identifier of the super web page template, while is made with the identifier It is the filename of the super web page template.
Above-mentioned identifier is to safeguard same super webpage mould as server and client identification both sides Plate and issue the crucial foundation of incremental data.
Above-mentioned default AES can be MD5 (Message-Digest Algorithm 5, letter Breath-digest algorithm 5), default encryption algorithm can be base64 (for transmitting 8Bit byte generations The coded system of code).Server is encrypted computing and obtains by MD5 algorithms to above-mentioned text data Ciphertext, obtains the character of the preceding predetermined number of the ciphertext, and the character for obtaining is carried out by base64 Transcoding computing obtains 8 characters, and this 8 characters are defined as the identifier of super web page template. Preceding 6 characters of ciphertext can be taken in the embodiment of the present invention 8 characters are encoded to by base64 Identifier.
Text data, the identifier of generation, the website domain name of composition that server obtains above-mentioned merging List, non-figure web resource type and version number constitute super web page template, by the super web page template Storage is in server and client side.
Client managed in the way of independently of client local cache its storage one or more surpass Level web page template.During client terminal start-up, super web page template is loaded, respectively with website domain name and mark Symbol sets up double indexes of super web page template, quick in order to slave site domain name and two dimensions of identifier Get corresponding super web page template.
Client is corresponding super to turn off or on a certain class website by the control parameter that backstage issues Level web page template.It is corresponding that server can also turn off or on a certain class website by control parameter Super web page template.
Due to the corresponding website of super web page template it may happen that correcting, in order to ensure super webpage mould The validity of plate, in a preferred embodiment of the invention, server needs periodically to detect net Stand whether correcting, if correcting, generation correcting after the corresponding redaction in website super web page template, And indicate client to update the super web page template of the redaction.
As shown in Figure 1B, the process for updating super web page template includes:
S1:Server detects the correcting of the corresponding website of each super web page template every preset time period Degree, when the correcting degree for detecting a website exceedes default correcting degree, according to correcting after should Website generates the super web page template of the corresponding redaction in the website;
Above-mentioned preset time period can be 5 hours or 10 hours etc..Stored for server local Each super web page template, server loads the corresponding website of super web page template every preset time period All non-figure web resource in domain name list under each website domain name, and each non-figure web resource Delta compression computing is carried out with the super web page template and obtain delta compression data, calculate each increment pressure The delta compression rate of contracting data, delta compression rate can embody the correcting degree of website.When certain website All non-figure web resource delta compression rate exceed compression ratio threshold value when, determine the correcting of the website Degree exceedes default correcting degree, then the non-figure web resource based on the website after correcting generates the net The super web page template of corresponding redaction of standing.
S2:The page request that server sends according to client, determines being accessed for client-cache The version of the corresponding super web page template in website whether be latest edition, if it is, to the page Request carries out response, if it is not, then performing step S3;
Website domain name and version number are parsed in the page request that server sends from client, according to this Website domain name obtains the version number of the corresponding super web page template of the website domain name from server local.If The version number of server local is higher than the version number in page request, it is determined that go out being somebody's turn to do for client-cache The corresponding super web page template of website domain name is not latest edition.
When server determine client-cache be not latest edition when, server this will issue page Request in person the partial data of the non-figure web resource required for asking.
S3:Server transport update instruction information gives the client;
Above-mentioned update instruction information include the identifier of the super web page template of legacy version and version number, The super web page template pair of the identifier of the super web page template of redaction and version number and redaction The website domain name list answered.
S4:The client is downloaded from server according to the update instruction information and stores the super webpage mould The latest edition of plate.
After client receives the update instruction information that server is issued, can update at once, it is also possible to On follow-up certain suitable opportunity, row updates again, such as updated again when being switched to WiFi network.
The idiographic flow that client updates super web page template is as follows:
1, the identifier of the super web page template of legacy version of the client in update instruction information, Mark the super web page template of legacy version invalid in super web page template manager;
2, client sends and updates request to server;
Renewal request carries the identifier and version number, redaction of the super web page template of legacy version The applicable website of the super web page template of the identifier of super web page template and version number and redaction Domain name list.
3, server receive client send the renewal request, compare the renewal request it is errorless after, Response is carried out to renewal request according to response protocol form:
After server confirms that the information write is errorless in renewal request, by certain compress mode to new The super web page template of version is compressed, and then encapsulates the super of redaction by response protocol form The identifier of web page template and version number, the corresponding website domain name row of the super web page template of redaction The super webpage of table, the compressed data of the super web page template of redaction, compress mode and redaction Data after encapsulation are transferred to client by template initial data size as reply data is updated.
4, client receives the renewal reply data, according to the renewal response of response protocol format analysis Data, after parsing the super web page template of redaction, judging the super web page template of the redaction is No successfully resolved, if success, performs step 6, if unsuccessful, performs step 5;
Judge whether the mode of successfully resolved can include for the super web page template of redaction:Judge parsing The size of the super web page template of the redaction for going out whether with update the initial data that includes of reply data It is in the same size, or, the identifier of the super web page template of redaction that judgement is parsed whether with more The identifier that new reply data includes is consistent.
5, client re-flags the super web page template of legacy version in super web page template manager Effectively, record this renewal and mistake occur, the follow-up response based on server again indicates to be updated.
6, the super web page template of redaction is added to super web page template manager by client, and The super web page template of legacy version is deleted, this super web page template is completed and is updated.
In another preferred embodiment of the invention, can be provided with advance in server with client Client-cache strategy, the non-figure web money that client-cache policy definition client can be cached The condition met needed for source, the capacity of such as non-figure web resource can just be cached when being less than capacity threshold. Server judges according to the client-cache strategy first before non-figure web resource is issued to client Whether client can cache the non-figure web resource, if it is, indicating the client-cache non-figure web Resource, otherwise indicates client not cache the non-figure web resource.The client-cache plan for referring here to Any client-cache strategy well known in the art can be slightly used, excessive introduction is not done here.
When server determines that client can cache non-figure web resource, server is provided to the non-figure web The address in source and content carry out Hash operation and obtain a cryptographic Hash, using the cryptographic Hash as the non-figure web The mark of resource, and caching instruction, the non-figure web resource and its mark are handed down to client.Visitor Family end is slow by the non-figure web resource, the corresponding website domain name of the non-figure web resource and its mark correspondence In there is client local cache.
When user needs to browse the webpage of certain website and clicks on the corresponding link of the webpage, client will The corresponding website of the link is defined as the website that need to be accessed, and the net is obtained from client local cache The mark of the corresponding non-figure web resource of website domain name stood, the mark of the non-figure web resource that will be obtained Composition client-cache list, client obtains the mark of the corresponding super web page template of the website domain name Symbol, version number and Fei Tu web resource types.Client sends page request to server, in the page Request in person and ask middle carrying website domain name, client-cache list, identifier, version number and Fei Tu web Resource type.
Step 102:Server receives and parses through the page request of client transmission;
Server receives the page request that client sends, and parses client from the page request The website domain name of the website for being accessed, and parse client-cache list, identifier, version number With non-figure web resource type.Step 103:Required for being preserved in the local cache of client During non-figure web resource, server indicates client that institute is directly read from the local cache of the client The non-figure web resource for needing;
Server is obtained and the website domain according to the website domain name for parsing and non-figure web resource type Name it is corresponding and with the non-non- figure web resource of figure web resource type identical for parsing, to the non-figure The content of the corresponding address of web resource and the non-figure web resource carries out Hash operation, obtains the non-figure The corresponding cryptographic Hash of web resource, the cryptographic Hash is defined as the mark of the non-figure web resource.Calculate After going out the mark of the non-figure web resource, it is determined that whether comprising meter in the client-cache list for parsing The mark of calculation, if comprising the non-figure web required for being preserved in the local cache for judging client There is no the non-figure web resource required for preserving in the local cache of resource, otherwise client.
Server will cache configured information and be sent to the client, and this has cached configured information includes institute The mark of the non-figure web resource for needing and cashing indication.Client receives this and has cached configured information, The mark of non-figure web resource required for configured information includes has been cached according to this directly from client Required non-figure web resource is obtained in local cache.
Server can be according to preset protocol form the http response headers of the non-figure web resource and non- The mark of figure web resource and cashing indication has been packaged, client is handed down to by the information after encapsulation. After client receives the information that server is issued, solved from the information according to above-mentioned preset protocol form The http response headers of the non-figure web resource and the mark of non-figure web resource and cashing indication are separated out, And according to the mark of the non-figure web resource from client local cache the corresponding non-figure of direct access Web resource.Above-mentioned preset protocol form can be the standard agreement form of HTML5.
In a preferred embodiment of the invention, can be provided with advance between server and client side Client-cache strategy, when server needs to issue non-figure web resource to client, and the non-figure web When resource hits the client local cache, server need not issue the non-figure web resource, but Directly indicate client that the non-figure web resource is obtained from local cache, so need not again carry out it He operates, and also greatlys save transmission flow.
Step 104:When the non-figure web resource required for not having to preserve in the local cache of client, The non-figure web resource that server will be obtained according to page request carries out delta compression with super web page template Computing, obtains incremental data;
Server obtains right according to the website domain name of parsing from the corresponding Website server of the website domain name The non-figure web resource answered, and the identifier according to the super web page template for parsing and version number, from Corresponding super web page template is obtained in its one or more super web page template for preserving, according to acquisition Non- figure web resource and super web page template carry out delta compression computing, obtain incremental data.
In embodiments of the present invention, server can be by SDCH (Shared Dictionary Compression over HTTP, the mechanism of http data compressions is carried out based on dictionary) to non-figure web Resource and super web page template carry out delta compression computing.
SDCH is a kind of extension compatible with HTTP/1.1 (HTTP-version 1.1), It supports the compression to http response data by sharing dictionary between clients and servers. The scene of SDCH applications is as follows:Server first issues dictionary to client by the extension;Work as client When asking a certain http resources, the resource can be based on the same word that both sides preserve by server Allusion quotation carries out delta compression, and server issues incremental data to client;Client uses corresponding increment Incremental data is reduced to asked http resources by compression algorithm.
The super web page template stored in server and client side in the embodiment of the present invention is above-mentioned visitor The dictionary shared between family end and server.For the two number evidences for giving, using a data as word Another data is compressed by allusion quotation or template using delta compression algorithm, can be based on this two number Same data stream in is identified, so as to reduce the identical data in the compressed data of output Stream.This two number is higher according to similarity, then incremental data is fewer.Delta compression algorithm is also provided simultaneously Incremental data based on generation carries out itself compression of different stage to reduce the size of incremental data, Further improve compression effectiveness.
Because all pages under each path of some websites all use same super web page template, each page The variance data in face is considerably less, it is assumed that the similarity of each page is close to 90%, then by using SDCH Technology, server first issues the super web page template of the website to client, when client accesses the net During a certain page stood, the response page can be carried out based on super webpage mould using delta compression mode The incremental data of plate, the purpose of transmitting data stream amount is reduced so as to reach.
In another preferred embodiment of the invention, increment buffer service is provided with server, And the identifier of the mark of the non-figure web resource of delta compression computing, super web page template will have been carried out And delta compression operation result is buffered in server local caching system, the delta compression operation result is Success flag and incremental data, or the delta compression operation result are unsuccessfully to identify.
Success flag and unsuccessfully mark are what is determined by the delta compression rate of incremental data.Delta compression Rate is the ratio between the capacity and the capacity of non-figure web resource of incremental data.If the increasing of incremental data Amount compression ratio is less than default compression threshold, then in the delta compression fortune of server local caching system storage Calculating result includes success flag and the incremental data.If the delta compression rate of incremental data is more than or equal to The default compression threshold, the then delta compression operation result for being stored in server local caching system is only wrapped Include and unsuccessfully identify.The default compression threshold can be 5% etc..
Multiple transfers that above-mentioned increment buffer service can make to operate on server browse service processes The delta compression operation result of shared increment operation.Primarily with respect to a given non-figure web resource, Multiple users are there may be to be required for issuing the non-figure web resource, or same user is when different Between section need to issue the non-figure web resource, and the non-figure web resource and its super webpage mould of matching Plate is all changeless within limited a period of time, so by increment buffer service in server The increment of the local cache system cache non-increment operation of the figure web resource relative to super web page template Compaction algorithms result, can effectively reduce the delta compression computing to the non-figure web resource, so as to save Save the computing resource of processor.
Due to server there is provided increment buffer service, thus server carry out delta compression computing it Before, can first passing through increment buffer service inquiry server local caching system, whether to have cached this non- The corresponding delta compression operation result of mark of the mark of figure web resource and super web page template.Work as clothes During the business uncached corresponding delta compression operation result of device local cache system, server is again by the non-figure Web resource carries out delta compression computing with super web page template, obtains incremental data.When server sheet When ground caching system has cached corresponding delta compression operation result, directly system is cached from server local System obtains corresponding delta compression operation result, and subsequent server is according to the delta compression operation result pair Page request carries out response.
In embodiments of the present invention, when the uncached corresponding delta compression fortune of server local caching system Calculating result and server is carried out after delta compression computing obtains incremental data, and server calculates the incremental number According to capacity and the capacity of non-figure web resource between ratio, obtain the non-figure web resource corresponding Delta compression rate.If the delta compression rate is less than default compression threshold, server is cached by increment Service is by the mark of the non-figure web resource, the identifier of the super web page template, success flag and is somebody's turn to do Incremental data is cached to server local caching system.If the delta compression rate is more than or equal to default pressure Contracting threshold value, then server by increment buffer service by the mark of the non-figure web resource, the super net Page template identifier and unsuccessfully mark be cached to server local caching system.
Step 105:Incremental data is transferred to client by server.
When the uncached corresponding delta compression operation result of server local caching system and server enters After row delta compression computing obtains incremental data, if the delta compression rate of the incremental data is more than default pressure Contracting threshold value, then carry out response with incremental mode to the page request of client.Otherwise, with partial data Mode carries out response to the page request of client.
When server local caching system has cached corresponding delta compression operation result and the increment pressure When contracting operation result includes success flag and incremental data, server is entered with incremental mode to page request Row response.When server local caching system has cached corresponding delta compression operation result and the increment When compaction algorithms result includes unsuccessfully identifying, server is answered page request in partial data mode Answer.
In a preferred embodiment of the invention, can be provided with advance between server and client side Client-cache strategy, before server carries out response to the page request of client, according to server The existing client-cache strategy between client, the non-figure web moneys required for judging page request Source generates client-cache and judges mark if appropriate in client local cache according to judged result Know.
It is above-mentioned response is carried out with incremental mode operation be:Server is non-to this by preset protocol form The page response header of figure web resource, client-cache judge mark, increment operation mark, surpass The level identifier of web page template, the original size of the non-figure web resource, the size of incremental data and increasing Amount data are packaged, and client is transferred to using the data after encapsulation as page reply data.
The page reply data of client the reception server transmission, by the preset protocol format analysis page Face reply data, according to the identifier that page reply data includes, obtains from client local cache Corresponding super web page template is taken, the incremental data in the web page template and page reply data is also Original goes out required non-figure web resource.
In embodiments of the present invention, size and the page of the client always according to the non-figure web resource of reduction The original size that reply data includes judges whether restoring operation succeeds, if the non-figure web resource of reduction Size it is consistent with original size, then reduce successfully, otherwise go back primary failure.Also primary failure shows data Transmission goes wrong, and abandons the non-figure web resource that reduction is obtained.
If reducing the client-cache successfully and in page reply data judges that mark instruction needs caching, To be buffered in client local for the non-figure web resource that then client will be reduced.
It is above-mentioned response is carried out in partial data mode operation be:Server is by presetting compress mode pair The non-figure web resource is compressed, and obtains compressed data, by preset protocol form to the non-figure web The page response header of resource, client-cache judge mark, the mark and pressure of default compress mode Contracting data are packaged, and client is transferred to using the data after encapsulation as page reply data.It is above-mentioned Default compress mode can be gzip or 7zip etc..
The page reply data of client the reception server transmission, by the preset protocol format analysis page Face reply data, the mark of the default compress mode in page reply data, using corresponding pre- If compress mode is decompressed to compressed data, required non-figure web resource is obtained.If client End caching judges that mark instruction needs caching, then required non-figure web resource is buffered in into client Locally.
The preset protocol form and response protocol form being previously mentioned in the embodiment of the present invention can be HTML5, WebApp agreement or H264 agreements etc..The embodiment of the present invention in above-mentioned each threshold value all Can be set based on empirical value.
The beneficial effect of the embodiment of the present invention is:Set up one or more different super web page templates and incite somebody to action It is stored in server and client side, and super web page template is including similar under a certain each path in class website Non- figure web resource.When required non-figure web resource is not existed in client local cache, The non-figure web resource that server will be obtained according to page request carries out delta compression with super web page template Computing obtains incremental data, and incremental data is transmitted into client.Because server is only by non-figure web moneys Incremental data between source and super web page template is transmitted to client, it is to avoid issue non-figure web resource Partial data, shorten the page response time, save transmission flow.
Embodiment 2
Referring to Fig. 2, a kind of page data Transmission system is the embodiment of the invention provides, the system can be with Perform the page data transmission method described in above-described embodiment 1.The system includes server 201 and visitor Family end 202;
Server 201, for setting up one or more different super web page templates and saving it in it In itself and client 202, each super web page template is included under each path of a certain class website Similar non-figure web resource;Receive and parse through the page request of the transmission of client 202;Work as client When required non-figure web resource is preserved in 202 local cache, indicate the client 202 straight Connect and required non-figure web resource is read from the local cache of the client 202, otherwise, by root The non-figure web resource obtained according to page request carries out delta compression computing with super web page template, obtains Incremental data;Client 202 is transferred to using incremental data as page reply data.
The condition that above-mentioned a certain class website meets includes:Similar non-figure web resource under each path in website Number is less than default value, and the total capacity of similar non-figure web resource is less than preset capacity;Website User's visit capacity is higher than predetermined threshold value;The correcting frequency of website is less than predeterminated frequency.
The data structure of above-mentioned super web page template includes non-figure web resource type, the website domain of website List of file names, the version number of super web page template and the content by above-mentioned non-figure web resource type in website The text data being merged into.
Non- figure web resource includes the JavaScript scripts and CSS style sheet that outreach.Above-mentioned non-figure Web resource type includes script type and pattern class.Super web page template can for script supertemplete and Pattern supertemplete.
Further, during one or more different super web page templates are set up, server 201, for determining the completely the same multiple websites of organizational structure and by the website domain name of the plurality of website Composition list;Determine the non-figure web resource type under each path of website;Set the super webpage mould The version number of plate;The content of above-mentioned non-figure web resource type in website is merged into text data;It is logical Cross default AES and encryption algorithm to be encrypted above-mentioned text data and encoding operation, obtain The identifier of the super web page template, while using the identifier as the file of the super web page template Name.Server 201 is by above-mentioned text data, identifier, website domain name list, non-figure web resource Type and version number constitute super web page template, by the storage of super web page template in its own and client In 202.
When the above-mentioned content by above-mentioned non-figure web resource type in website is merged into text data, service Device 201, for based on file-level that the content of the non-figure web resource type under each path in website is straight Engage and into text data;Or,
Server 201, for each in the content for determining the non-figure web resource type under each path in website Similarity degree between data block, extracts from the content of the non-figure web resource type under each path The data block of extraction is merged into text data by similarity degree more than the data block of preset similarity value.
Further, client 202, for when preparing to access a website, retrieving the one of its preservation Individual or multiple super web page templates, find out the super web page template suitable for the website, from local cache The middle corresponding cache list of client 202 of website domain name for obtaining the website, the client 202 is cached List includes the mark of the corresponding non-figure web resource of the website domain name that client 202 has been cached;Hair Send page request to server 201, the website domain name of the website is provided in the page request, is surpassed The level identifier of web page template, non-figure web resource type, version number and client-cache row Table.
Further, server 201, for parsed from page request website website domain name, The identifier of super web page template, non-figure web resource type, version number and the client-cache List, obtain it is corresponding with the website domain name and with the non-figure web resource type identical for parsing Non- figure web resource;The mark of the non-figure web resource for obtaining is calculated, the caching row of client 202 are determined Whether comprising the mark for calculating in table, if comprising the non-figure web resource required for judging is present In the local cache of the client 202, otherwise required non-figure web resource is not present in the visitor In the local cache at family end 202.
Server 201, is additionally operable to in the corresponding address of non-figure web resource and non-figure web resource Appearance carries out Hash operation, obtains the corresponding cryptographic Hash of non-figure web resource, and cryptographic Hash is used as into non-figure The mark of web resource.
In the non-figure web resource required for judging is present in the local cache of the client 202 When, server 201 is sent to the client 202 for will cache configured information, has cached and has referred to Show that information includes the mark of required non-figure web resource and cashing indication;
Client 202, has cached configured information, according to required non-figure web resource for receiving Mark required non-figure web resource is directly obtained from the local cache of client 202.
Further, server 201, it is corresponding super for parsing website domain name from page request The identifier of level web page template and version number;According to the identifier and version of the super web page template for parsing This number, corresponding super web page template is obtained from one or more super web page templates that it is preserved, Non- figure web resource and super web page template according to obtaining carry out delta compression computing, obtain incremental number According to.
Further, server 201, are additionally operable to have carried out the non-figure web moneys of delta compression computing The mark in source, the identifier of super web page template and delta compression operation result are buffered in server 201 Local cache system, the delta compression operation result is success flag and incremental data, or the increment Compaction algorithms result is unsuccessfully to identify.
Server 201, was additionally operable to before delta compression computing is carried out, and inquiry server 201 is local Caching system whether cached non-figure web resource mark and super web page template identifier it is corresponding Delta compression operation result;When the uncached corresponding delta compression fortune of the local cache system of server 201 When calculating result, the non-figure web resource is carried out into delta compression computing with super web page template, increased Amount data;When the local cache system cache of server 201 during corresponding delta compression operation result, Directly corresponding delta compression operation result is obtained from the local cache system of server 201.
When the uncached corresponding delta compression operation result of server local caching system and server 201 Carry out after delta compression computing obtains incremental data, server 201 is additionally operable to when server 201 The ground uncached corresponding delta compression operation result of caching system and server 201 carries out delta compression fortune After calculation obtains incremental data, calculate between the capacity of the incremental data and the capacity of non-figure web resource Ratio, obtains the corresponding delta compression rate of the non-figure web resource;If the delta compression rate is less than default Compression threshold, then by increment buffer service by the mark of the non-figure web resource, the super webpage mould The identifier of plate, success flag and the incremental data are cached to the local cache system of server 201;If The delta compression rate is more than or equal to default compression threshold, then by increment buffer service by the non-figure The mark of web resource, the identifier of the super web page template and unsuccessfully mark be cached to server 201 Local cache system.
Further, when server 201 is answered page request according to the delta compression operation result When answering, server 201, for including success flag and increment when corresponding delta compression operation result During data, response is carried out to page request with incremental mode;When corresponding delta compression operation result bag Include when unsuccessfully identifying, response is carried out to page request in partial data mode.
Further, during server 201 carries out response with incremental mode to the page request, Server 201, is additionally operable to believe the page response header of the non-figure web resource by preset protocol form Breath, client-cache judge mark, increment operation mark, the identifier of super web page template, this is non- The original size of figure web resource, the size of incremental data and incremental data are packaged, after encapsulation Data be transferred to client 202 as page reply data.
Further, client 202, for the page reply data of the transmission of the reception server 201, By preset protocol format analysis page reply data;According to local cache and the super webpage for receiving Non- figure web moneys required for the corresponding super web page template of identifier and the incremental data reduction of template Source;The original size that the size of the non-figure web resource according to reduction includes with page reply data judges Whether restoring operation succeeds;If reducing successfully and client-cache judging that mark instruction needs caching, Required non-figure web resource is buffered in client 202 local.
Further, during server 201 carries out response in partial data mode to page request, Server 201, is additionally operable to be compressed the non-figure web resource by default compress mode, obtains Compressed data;By preset protocol form to page response header, the client of the non-figure web resource End caching judges that mark, the mark of default compress mode and compressed data are packaged, after encapsulation Data are transferred to client 202 as page reply data.
Further, client 202, for the page reply data of the transmission of the reception server 201, By preset protocol format analysis page reply data;According to the mark of default compress mode, using right The default compress mode answered is decompressed to compressed data, obtains required non-figure web resource; If client-cache judges mark, instruction needs caching, and required non-figure web resource is buffered in Client 202 is local.
Further, client 202, are additionally operable in the way of independently of the local cache of client 202 Manage one or more super web page templates of its storage;The control parameter that is issued by backstage is closed Or open the corresponding super web page template in a certain class website.
Further, server 201, are additionally operable to detect each super webpage mould every preset time period The correcting degree of the corresponding website of plate, when the correcting degree for detecting a website exceedes default correcting degree When, the super web page template of the corresponding redaction in the website is generated according to the website after correcting.
Further, server 201, are additionally operable to the page request sent according to client 202, really Whether the version for determining the corresponding super web page template in the website to be accessed of the caching of client 202 is most Redaction;When the version of the super web page template for determining the caching of client 202 is not latest edition When, the transmission update instruction information of server 201 gives the client 202;
Client 202, is additionally operable to be downloaded from server 201 and store this according to the update instruction information The latest edition of super web page template.
The beneficial effect of the embodiment of the present invention is:Set up one or more different super web page templates and incite somebody to action It is stored in server and client side, and super web page template is including similar under a certain each path in class website Non- figure web resource.When required non-figure web resource is not existed in client local cache, The non-figure web resource that server will be obtained according to page request carries out delta compression with super web page template Computing obtains incremental data, and incremental data is transmitted into client.Because server is only by non-figure web moneys Incremental data between source and super web page template is transmitted to client, it is to avoid issue non-figure web resource Partial data, shorten the page response time, save transmission flow.
The page data Transmission system that the embodiment of the present invention is provided is only specific system reality of the invention Example is applied, protection scope of the present invention is not limited thereto.Those skilled in the art can be clearly Recognize, for convenience and simplicity of description, the specific work process of system described above can be with With reference to the corresponding process in above method embodiment.
If the function using realize in the form of SFU software functional unit and as independent production marketing or When using, can store in a computer read/write memory medium.Based on such understanding, this Part or the technical side that the technical scheme of invention substantially contributes to prior art in other words The part of case can be embodied in the form of software product, and the computer software product is stored at one In storage medium, including some instructions are used to so that computer equipment (can be personal computer, Server, or the network equipment etc.) perform all or part of each embodiment methods described of the invention Step.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or light Disk etc. is various can be with the medium of store program codes.
The above, specific embodiment only of the invention, but protection scope of the present invention not office Be limited to this, any one skilled in the art the invention discloses technical scope in, can Change or replacement are readily occurred in, should be all included within the scope of the present invention.Therefore, the present invention Protection domain should be based on the protection scope of the described claims.

Claims (10)

1. a kind of page data transmission method, it is characterised in that methods described includes:
Server sets up one or more different super web page templates and saves it in its own and visitor In the end of family, each super web page template is included in the similar non-figure under each path of a certain class website Web resource;
Server receives and parses through the page request of client transmission;
When required non-figure web resource is preserved in the local cache of client, server is indicated Client directly reads required non-figure web resource from the local cache of the client, otherwise
The non-figure web resource that server will be obtained according to page request is carried out with the super web page template Delta compression computing, obtains incremental data;
The incremental data is transferred to client by server.
2. method according to claim 1, it is characterised in that a certain class website meets Condition include:
Similar non-figure web resource number under each path in website is less than default value, and similar non-figure The total capacity of web resource is less than preset capacity;User's visit capacity of website is higher than predetermined threshold value;Website Correcting frequency be less than predeterminated frequency.
3. method according to claim 1, it is characterised in that server set up one or In the step of multiple different super web page templates, the method for building up includes:
Server determines the completely the same multiple websites of organizational structure and by the website domain of the plurality of website Name composition website domain name list;
Server determines the non-figure web resource type under each path of website, sets the super webpage mould The version number of plate;
The content of non-figure web resource type described in website is merged into text data by server;
Server the text data is encrypted by default AES and encryption algorithm and Encoding operation, obtains the identifier of the super web page template, while using the identifier as the super net The filename of page template.
4. method according to claim 1, it is characterised in that in the server by basis The non-figure web resource that page request is obtained carries out delta compression computing with super web page template, is increased In the step of amount data, including:
Server parses the mark of the corresponding super web page template of website domain name from the page request Know symbol and version number;
Identifier and version number of the server according to the described super web page template for parsing, from its preservation One or more super web page templates in obtain corresponding super web page template, according to obtain non-figure Web resource and super web page template carry out delta compression computing, obtain incremental data.
5. method according to claim 1, it is characterised in that also include:
Server detects the correcting journey of the corresponding website of each super web page template every preset time period Degree, when the correcting degree for detecting a website exceedes default correcting degree, according to the net after correcting Stand and generate the super web page template of the corresponding redaction in the website.
6. a kind of page data Transmission system, it is characterised in that the system includes server and visitor Family end;
The server, for setting up one or more different super web page templates and saving it in it In itself and the client, each super web page template is included under each path of a certain class website Similar non-figure web resource;
The server, for receiving and parsing through the page request that the client sends;
The server, for the non-figure web moneys required for being preserved in the local cache of client During source, indicate the client that required non-figure web is directly read from the local cache of the client Resource, otherwise, non-figure web resource and the super web page template that will be obtained according to page request are increased Amount compaction algorithms, obtain incremental data;Institute is transferred to using the incremental data as page reply data State client.
7. system according to claim 6, it is characterised in that a certain class website meets Condition include:
Similar non-figure web resource number under each path in website is less than default value, and similar non-figure The total capacity of web resource is less than preset capacity;User's visit capacity of website is higher than predetermined threshold value;Website Correcting frequency be less than predeterminated frequency.
8. system according to claim 6, it is characterised in that the server is used to determine The website domain name of the plurality of website is simultaneously constituted website domain name by the completely the same multiple websites of organizational structure List;Determine the non-figure web resource type under each path of website, set the super web page template Version number;The content of non-figure web resource type described in website is merged into text data;By pre- If AES and encryption algorithm the text data is encrypted and encoding operation, obtain this surpass The identifier of level web page template, while using the identifier as the filename of the super web page template.
9. system according to claim 6, it is characterised in that the server is used for from institute State identifier and the version number that the corresponding super web page template of website domain name is parsed in page request;Root Identifier and the version number according to the described super web page template for parsing, preserved from it or Corresponding super web page template is obtained in multiple super web page templates, according to the non-figure web resource for obtaining Delta compression computing is carried out with super web page template, incremental data is obtained.
10. system according to claim 6, it is characterised in that also include:The server It is additionally operable to be detected every preset time period the correcting degree of the corresponding website of each super web page template, when When the correcting degree for detecting a website exceedes default correcting degree, according to the website generation after correcting The super web page template of the corresponding redaction in the website.
CN201510828677.9A 2015-11-25 2015-11-25 A kind of page data transmission method and system Pending CN106790334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510828677.9A CN106790334A (en) 2015-11-25 2015-11-25 A kind of page data transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510828677.9A CN106790334A (en) 2015-11-25 2015-11-25 A kind of page data transmission method and system

Publications (1)

Publication Number Publication Date
CN106790334A true CN106790334A (en) 2017-05-31

Family

ID=58963854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510828677.9A Pending CN106790334A (en) 2015-11-25 2015-11-25 A kind of page data transmission method and system

Country Status (1)

Country Link
CN (1) CN106790334A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107784086A (en) * 2017-10-09 2018-03-09 中国平安人寿保险股份有限公司 A kind of loading method of webpage, terminal device and computer-readable recording medium
CN108282518A (en) * 2017-12-26 2018-07-13 阿里巴巴集团控股有限公司 A kind of customer terminal webpage generation method and device
CN109190072A (en) * 2018-09-18 2019-01-11 网宿科技股份有限公司 A kind of method and apparatus sending web page resources
CN109284616A (en) * 2018-08-17 2019-01-29 优视科技有限公司 Data access and data distributing method, device, equipment and storage medium
CN111177539A (en) * 2019-12-16 2020-05-19 北京百度网讯科技有限公司 Search result page generation method and device, electronic equipment and storage medium
CN112685044A (en) * 2020-12-20 2021-04-20 武汉迈威通信股份有限公司 Webpage compression and storage method and system based on ROM
CN117724852A (en) * 2024-02-07 2024-03-19 微网优联科技(成都)有限公司 Cloud computer computing resource allocation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102065572A (en) * 2009-11-17 2011-05-18 中国移动通信集团广东有限公司 Mobile browser, gateway, browsing system and access method for internet page
CN103605770A (en) * 2013-11-26 2014-02-26 优视科技有限公司 Method and server for generating web page templates
CN103731492A (en) * 2013-12-31 2014-04-16 优视科技有限公司 Page transmission processing method, device and system
CN103731493A (en) * 2013-12-31 2014-04-16 优视科技有限公司 Page transmission method, device and system
US20140156828A1 (en) * 2012-11-30 2014-06-05 Red Hat Israel, Ltd. Method and system for abstracting restful web service http between a client and a server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102065572A (en) * 2009-11-17 2011-05-18 中国移动通信集团广东有限公司 Mobile browser, gateway, browsing system and access method for internet page
US20140156828A1 (en) * 2012-11-30 2014-06-05 Red Hat Israel, Ltd. Method and system for abstracting restful web service http between a client and a server
CN103605770A (en) * 2013-11-26 2014-02-26 优视科技有限公司 Method and server for generating web page templates
CN103731492A (en) * 2013-12-31 2014-04-16 优视科技有限公司 Page transmission processing method, device and system
CN103731493A (en) * 2013-12-31 2014-04-16 优视科技有限公司 Page transmission method, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李红,岳云康,樊东燕: "《电子商务网页设计》", 31 December 2011 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107784086A (en) * 2017-10-09 2018-03-09 中国平安人寿保险股份有限公司 A kind of loading method of webpage, terminal device and computer-readable recording medium
CN108282518A (en) * 2017-12-26 2018-07-13 阿里巴巴集团控股有限公司 A kind of customer terminal webpage generation method and device
CN109284616A (en) * 2018-08-17 2019-01-29 优视科技有限公司 Data access and data distributing method, device, equipment and storage medium
CN109284616B (en) * 2018-08-17 2022-02-11 阿里巴巴(中国)有限公司 Data access and data issuing method, device, equipment and storage medium
CN109190072A (en) * 2018-09-18 2019-01-11 网宿科技股份有限公司 A kind of method and apparatus sending web page resources
CN111177539A (en) * 2019-12-16 2020-05-19 北京百度网讯科技有限公司 Search result page generation method and device, electronic equipment and storage medium
CN112685044A (en) * 2020-12-20 2021-04-20 武汉迈威通信股份有限公司 Webpage compression and storage method and system based on ROM
CN117724852A (en) * 2024-02-07 2024-03-19 微网优联科技(成都)有限公司 Cloud computer computing resource allocation method and device
CN117724852B (en) * 2024-02-07 2024-05-07 微网优联科技(成都)有限公司 Cloud computer computing resource allocation method and device

Similar Documents

Publication Publication Date Title
CN106790334A (en) A kind of page data transmission method and system
JP3990115B2 (en) Server-side proxy device and program
US8312172B2 (en) Method and system for delta compression
CN104221003B (en) Utilize data de-duplication based on stream of the asynchronous data dictionary in the infrastructure that multi-tenant is shared
CN104104717B (en) Deliver channel data statistical approach and device
CN104104649B (en) The method of page login, apparatus and system
EP1907922B1 (en) A method for detecting state changes between data stored in a first computing device and data received from a second computing device
CN101132420B (en) Link overwriting method and device based on SSL VPN
CN101079895B (en) A method, system and proxy service device for quick access to Web page
CN103379140B (en) A kind of log processing rule synchronization method and relevant device and system
CN102882974B (en) Method for saving website access resource by website identification version number
CN104714965B (en) Static resource De-weight method, static resource management method and device
CN104283723B (en) Network access log processing method and processing device
CN102638580A (en) Webpage information processing method and webpage information processing device
CN107016074B (en) Webpage loading method and device
KR101568947B1 (en) Method and system for downloading font file
CN101287013A (en) Method for updating Webpage and Web proxy device
CN105677646A (en) Word stock generation method and system, and server
CN113452780A (en) Access request processing method, device, equipment and medium for client
CN105074688B (en) Use the data deduplication based on stream of peer node figure
US7539776B1 (en) Dynamic uniform resource locator compression
CN104615597A (en) Method, device and system for clearing cache file in browser
CN109413148A (en) Access control method, server, terminal and computer scale storage medium
JP2003345708A (en) Device, method and program for transferring data
CN106959975B (en) Transcoding resource cache processing method, device and equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531