CN106202083A - Resource packaging system, method and device for web page - Google Patents

Resource packaging system, method and device for web page Download PDF

Info

Publication number
CN106202083A
CN106202083A CN201510219807.9A CN201510219807A CN106202083A CN 106202083 A CN106202083 A CN 106202083A CN 201510219807 A CN201510219807 A CN 201510219807A CN 106202083 A CN106202083 A CN 106202083A
Authority
CN
China
Prior art keywords
resource
file
web page
packing
subordinate
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
CN201510219807.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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510219807.9A priority Critical patent/CN106202083A/en
Publication of CN106202083A publication Critical patent/CN106202083A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

This application discloses a kind of resource packaging system for web page, also disclose three kinds of resource packaging methods for web page and related device simultaneously, wherein said resource packaging system includes: distribution platform and packing platform;Described distribution platform, for the packing interface provided by described packing platform, sends the resource packing request of web page to be accelerated to described packing platform;Described packing platform is for according to the resource packing request received, obtaining resource file generation resource bag of packing that described request relates to.Use technique scheme, packing platform and distribution platform are independent of one another, and interacted by packing interface, therefore, when distribution platform has web page to accelerate demand, it is not necessary to migrate between platforms, can infrastructure in original, the ripe distribution platform of still multiplexing, while ensureing development efficiency and reliability, it is achieved the resource packing function of web page to be accelerated.

Description

Resource packaging system, method and device for web page
Technical field
The application relates to the field accelerating web page, is specifically related to a kind of resource for web page and packs System.The application further relates to a kind of resource packaging method for web page and related device, and additionally Two kinds of resource packaging methods for web page and related device.
Background technology
At prevailing present of network, increasing user passes through the various consultation information of Network Capture, particularly The mobile terminals such as mobile phone become user and receive and an important channel of the information of acquisition.On the mobile terminal device Can by Web App access web page, it is also possible to by Native App (locally applied, the most former Raw application) in webview browser component browse web page.But the most sometimes The restriction of the vulnerable network of meeting restricted movement environment, operates in the web page in Native App webview Loading velocity is the slowest, it will usually have the white screen phenomenon about the 1-3 second, the smooth body intrinsic with Native App Test and do not conform to, affect very much Consumer's Experience.
In order to improve Consumer's Experience, existing scheme is by web page to be accelerated and related resource file, including Html file, Javascript script file, Cascading Style Sheet css file etc., break into resource compressed package built-in In Native App, or downloading to Native App in advance from server end, then user should in access Resource file can be directed to this locality during web page, obtain resource requirement file from this locality, thus eliminate white screen Problem, promotes the viewing experience of user.
Refer to the structural representation of the packaging system that Fig. 1, Fig. 1 are existing scheme, in this scenario, issue Platform together with packing platform intergration, be equivalent to carry out in same platform the issue of web page and The packing of resource file.This system architecture is used to there is following defect: to need to be added by packing scheme The web page of speed has to move to above-mentioned distribution platform from original ripe distribution platform, on the one hand increases Add moving costs, on the other hand, due to original ripe distribution platform be generally also one good extensive Exploitation cooperation platform, not only includes perfect rights management, issues Row control, be also equipped with the exploitation enriched Instrument and issue calibration tool etc., and after performing above-mentioned migration, will be unable in the original distribution platform of multiplexing is upper State infrastructure, cause the problems such as development efficiency is low, reliability is low.
Therefore, a kind of scheme is needed badly to solve the problems referred to above present in existing scheme.
Summary of the invention
The application provides a kind of resource packaging system for web page, to solve present in prior art The problems referred to above.
The application additionally provides a kind of resource packaging method for web page and device.
The application also provides for other two kinds of resource packaging methods for web page and device.
The application provides a kind of resource packaging system for web page, including: distribution platform and packing are flat Platform;
Described distribution platform, for the packing interface provided by described packing platform, is sent out to described packing platform Send the resource packing request of web page to be accelerated;
Described packing platform is for asking according to the resource packing received, and web page to be accelerated described in acquisition relates to And resource file and pack generation resource bag.
Optionally, the packing interface that described packing platform provides includes following parameter: web page to be accelerated URL information.
Optionally, described packing platform specifically for, according to the described resource packing URL information carried of request Obtain corresponding web page file and associated static resource file, and the file of above-mentioned acquisition is packed Generate resource bag.
Optionally, described static resource file includes at least one in following element: javascript script, Css Cascading Style Sheet, audio frequency, video, picture file.
Optionally, the packing interface that described packing platform provides also includes following parameter: web page to be accelerated The resource file address list that middle Dynamic trigger loads;
Described packing platform is additionally operable to, and obtains according to the resource file address list that the packing request of described resource is carried Take corresponding resource file, and generation resource bag of packing.
Optionally, described packing platform is additionally operable to, the embedded page in web page file described in recursive lookup File and associated static resource file, and the above-mentioned file packing found is generated resource bag.
Optionally, described packing platform is additionally operable to, the subordinate of link in web page file described in recursive lookup Web page file and associated static resource file, and the above-mentioned file packing found is generated resource bag.
Optionally, described packing platform is additionally operable to, and selects the page to visit from the subordinate's web page file found The amount of asking meets pre-conditioned subordinate's web page file, and by selected subordinate web page file and relevant quiet State resource file is as resource file to be packed.
Optionally, described page access amount meets pre-conditioned including:
Page access amount is more than predetermined threshold value;Or,
After sorting according to page access amount, tagmeme is in preset range.
Optionally, described page access amount includes: page browsing amount PV, or page independence user sessions UV.
Optionally, described packing platform is additionally operable to, and is unsatisfactory for pre-conditioned subordinate web for page access amount Pagefile, it is judged that whether it is positioned in default white list, if so, by described subordinate web page file In resource file to be packed described in adding to.
Optionally, described packing platform is additionally operable to, and extracts common resource file from resource file to be packed;
The packing of described packing platform generates resource bag, including: by described to the common resource file extracted and deletion Resource file to be packed after common resource file is packed respectively and is generated resource bag.
Optionally, described packing platform is specifically for generation resource bag of packing in the following ways:
Resource file to be packed is generated a resource bag;Or,
Resource bag is generated in units of each web page file and associated static resource file;Or,
Resource bag is generated in units of web page at the same level and associated static resource file.
Optionally, described packing platform is additionally operable to, and the resource bag that packing generates is pushed to client.
Optionally, described packing platform is additionally operable to, before described client push resource bag, from the most raw The resource bag become select the resource bag of predetermined quantity as resource bag to be pushed.
Optionally, described packing platform is additionally operable to, and the local resource package informatin reported according to client, to visitor Family end pushes its resource bag not yet downloaded.
Optionally, the packing interface that described packing platform provides uses http protocol to realize.
Optionally, described web page file and embedded pagefile include: html file, htm file or Person's xml document.
The application also provides for a kind of resource packaging method for web page, including:
From packing interface set in advance from distribution platform, resource for web page to be accelerated Packing request;
According to described request, the resource file that web page to be accelerated described in acquisition relates to;
The resource file packing obtained is generated resource bag.
Optionally, described resource packing request carries following parameter according to the requirement of described packing interface: to be added The URL information of speed web page.
Optionally, the resource file that web page to be accelerated described in described acquisition relates to includes:
The URL information carried according to described request, obtains corresponding web page file;
By analyzing described web page file, obtain the static resource file relevant to described web page;
And using the file of above-mentioned acquisition as resource file to be packed.
Optionally, the parameter that described resource packing request is carried according to the requirement of described packing interface also includes: The resource file address list that in web page to be accelerated, Dynamic trigger loads;
Described method also includes:
Obtain corresponding resource file according to described resource file address list, and add resource to be packed literary composition to In part.
Optionally, also include:
Embedded pagefile in web page file described in recursive lookup and associated static resource file, and will The above-mentioned file found adds in resource file to be packed.
Optionally, also include:
In web page file described in recursive lookup, subordinate's web page file and the associated static resource of link are civilian Part, and the above-mentioned resource file found is added in resource file to be packed.
Optionally, in web page file described in described recursive lookup link subordinate's web page file and During associated static resource file, for each subordinate web page file execution operations described below:
Obtain the page access amount that described subordinate web page file is corresponding;
Judge that whether described page access amount is more than predetermined threshold value;
If so, described subordinate web page file and associated static resource file are added to resource to be packed literary composition In part;
If it is not, terminate the recursive lookup process to described subordinate web page file.
Optionally, including:
Page access amount is selected to meet pre-conditioned subordinate's Web page from the subordinate's web page file found Face file, and using selected subordinate web page file and associated static resource file as resource file to be packed.
Optionally, including:
For the most selected subordinate's web page file as resource file to be packed, it is judged that whether it is positioned at Preset white list in, if so, described subordinate web page file is added to described in resource file to be packed In.
Optionally, before packing generates resource bag, execution operations described below:
Common resource file is extracted from resource file to be packed;
The described resource file by acquisition is packed and is generated resource bag and include: by the common resource file of extraction with delete Pack respectively except the resource file to be packed after described common resource file and generate resource bag.
Optionally, the described step that the resource file packing obtained is generated resource bag, real in the following way Existing:
Resource file to be packed is generated a resource bag;Or,
Resource bag is generated in units of each web page file and associated static resource file;Or,
Resource bag is generated in units of web page at the same level and associated static resource file.
Optionally, also include:
The resource bag that packing generates is pushed to client.
Optionally, also include:
The local resource package informatin reported according to client, the resource bag that it is not yet downloaded to client push.
Optionally, described packing interface set in advance uses http protocol to realize.
The application also provides for a kind of resource packing apparatus for web page, including:
Packing request reception unit, is used for from packing interface set in advance from distribution platform, pin Treat the resource packing request accelerating web page;
Resource file acquiring unit, is used for the resource file that web page to be accelerated described in obtaining relates to;
Resource bag signal generating unit, generates resource bag for the resource file packing that will obtain.
Optionally, the packing interface that described packing request reception unit is used includes following parameter: wait to accelerate The URL information of web page.
Optionally, described resource file acquiring unit includes:
Web page file acquisition subelement, for the URL information carried according to described request, obtains therewith Corresponding web page file;
Static resource file acquisition subelement, for by analyzing described web page file, obtaining with described The static resource file that web page is relevant, and by described static resource file and described web page file Obtain the web page file conduct resource file to be packed in the lump that subelement obtains.
Optionally, the packing interface that described packing request reception unit is used also includes following parameter: to be added The resource file address list that in speed web page, Dynamic trigger loads;
Described device also includes:
Dynamic resource file obtaining unit, for obtaining corresponding resource according to described resource file address list File, and add in resource file to be packed.
Optionally, described device also includes:
Embedded page resource acquiring unit, the embedded page literary composition in web page file described in recursive lookup Part and associated static resource file, and the above-mentioned file found is added in resource file to be packed.
Optionally, described device includes:
Subordinate's page resource acquiring unit, the subordinate web of link in web page file described in recursive lookup Pagefile and associated static resource file, and the above-mentioned resource file found is added to resource to be packed literary composition In part.
Optionally, described subordinate page resource acquiring unit includes:
Recursion control subelement, subordinate's web page of link in web page file described in recursive lookup File and associated static resource file, and for the web page file triggering following subelement work of each subordinate:
Page access amount obtains subelement, for obtaining the page access that described subordinate web page file is corresponding Amount;
Threshold decision subelement, is used for judging that whether described page access amount is more than predetermined threshold value;If so, will Described subordinate web page file and associated static resource file add in resource file to be packed;If it is not, Notify that described recursion control subelement terminates the recursive lookup process to described subordinate web page file.
Optionally, described subordinate page resource acquiring unit includes: recursive lookup subelement and page screening Unit;
Described recursive lookup subelement, the subordinate web of link in web page file described in recursive lookup Pagefile and associated static resource file;
Described page screening subelement, for from subordinate's web page literary composition that described recursive lookup subelement finds Part select page access amount meet pre-conditioned subordinate's web page file, and by selected subordinate Web page Face file and associated static resource file add in resource file to be packed.
Optionally, described subordinate page resource acquiring unit also includes:
White list resource adds subelement, for for the most selected subordinate web as resource file to be packed Pagefile, it is judged that whether it is positioned in default white list, if so, by described subordinate web page file In resource file to be packed described in adding to.
Optionally, described device also includes:
Public resource extraction unit, for extracting common resource file from resource file to be packed;
Described resource bag signal generating unit specifically for, will extract common resource file and delete described public money Resource file to be packed after source file is packed respectively and is generated resource bag.
Optionally, described resource bag signal generating unit specifically for, by resource file to be packed generate a resource Bag;Or, in units of each web page file and associated static resource file, generate resource bag;Or, Resource bag is generated in units of web page at the same level and associated static resource file.
Optionally, described device also includes:
Resource bag push unit, for being pushed to client by the resource bag that packing generates.
Optionally, described device also includes:
The on-demand push unit of resource bag, for the local resource package informatin reported according to client, to client Push its resource bag not yet downloaded.
The application also provides for the another kind of resource packaging method for web page, including:
Obtain the to be packed resource file relevant to web page;
Common resource file is extracted from described resource file to be packed;
By the resource file to be packed after the common resource file of extraction and the described common resource file of deletion respectively Packing generates resource bag.
The application also provides for the another kind of resource packing apparatus for web page, including:
Resource file acquiring unit to be packed, for obtaining the to be packed resource file relevant to web page;
Common resource file extraction unit, for extracting common resource file from described resource file to be packed;
Independent resource bag signal generating unit, for the common resource file that will extract and deletion described public resource literary composition Resource file to be packed after part is packed respectively and is generated resource bag.
The application also provides for the another kind of resource packaging method for web page, including:
Subordinate's web page of recursive lookup web page link;
Page access amount is met the resource file packing involved by pre-conditioned subordinate's web page and generates money Source is wrapped.
Optionally, described page access amount meets pre-conditioned including:
Page access amount is more than predetermined threshold value;Or,
After sorting according to page access amount, tagmeme is in preset range.
The application also provides for the another kind of resource packing apparatus for web page, including:
Subordinate's page searches unit, for subordinate's web page of recursive lookup web page link;
Subordinate's page resource bag signal generating unit, for meeting pre-conditioned subordinate's Web page by page access amount Resource file packing involved by face generates resource bag.
Compared with prior art, the application has the advantage that
The application provides a kind of resource packaging system for web page and correlation method and device, Qi Zhongsuo The system of stating includes: distribution platform and packing platform;Described distribution platform is for providing by described packing platform Packing interface, to described packing platform send web page to be accelerated resource packing request;Described packing Platform is for according to the resource packing request received, obtaining resource file generation of packing that described request relates to Resource bag.Use technique scheme, packing platform and distribution platform independent of one another, and connect by packing Mouth interacts, therefore, when distribution platform has web page to accelerate demand, it is not necessary to enter between platforms Row migrates, can infrastructure in original, the ripe distribution platform of still multiplexing, ensureing exploitation effect While rate and reliability, it is achieved the resource packing function of web page to be accelerated.
The another kind that the application provides is used for resource packaging method and the device of web page, for different This situation of a large amount of public resource it is usually present, by extracting public affairs from resource file to be packed between web page Altogether resource file, and by the common resource file of extraction and treat packing money after deleting described common resource file Source file is packed respectively and is generated resource bag, thus eliminates the resource redundancy existed between resource bag, on the one hand, The network bandwidth downloaded shared by resource bag can be reduced, on the other hand, it is also possible to reduce resource bag to client Taking of end memory space.
The third resource packaging method being used for web page and device that the application provides, for prior art In generally by artificially specifying the situation of which subordinate's page packing, it is proposed that a kind of based on automatic prediction Subordinate's page resource packaging method: screen subordinate's web page according to page access amount, selects the page Visit capacity meets the page of preset requirement and packs.By the money generated in client preset employing this method Source is wrapped, it is possible to make the loading performance of subordinate's web page rationally be promoted, and takes between performance and storage Must balance.
Accompanying drawing explanation
Fig. 1 is the structural representation of the packaging system of existing scheme;
Fig. 2 is the structural representation of a kind of resource packaging system for web page that the embodiment of the present application provides Figure;
Fig. 3 is the flow chart of the embodiment of a kind of resource packaging method for web page that the application provides;
Fig. 4 is the schematic diagram of the embodiment of a kind of resource packing apparatus for web page that the application provides;
Fig. 5 is the another kind that provides of the application flow process for the embodiment of the resource packaging method of web page Figure;
Fig. 6 is the signal for the embodiment of the resource packing apparatus of web page of the another kind that provides of the application Figure;
Fig. 7 be the application provide the third for the flow process of the embodiment of the resource packaging method of web page Figure;
Fig. 8 be the application provide the third for the signal of the embodiment of the resource packing apparatus of web page Figure.
Detailed description of the invention
Elaborate a lot of detail in the following description so that fully understanding the application.But, this Shen Please implement to be much different from alternate manner described here, those skilled in the art can not disobey Doing similar extension in the case of back of the body the application intension, therefore, the application is not by following public specific embodiment Restriction.
In the embodiment of the present application, it is provided that a kind of resource packaging system for web page, one is used for The resource packaging method of web page and device, and other two kinds of resource packaging methods for web page And device.The scheme provided the embodiment of the present application below is described in detail explanation.
Refer to Fig. 2, Fig. 2 is a kind of resource packaging system for web page that the embodiment of the present application provides Structural representation.The resource packaging system for web page that the embodiment of the present application provides includes: issue Platform 202 and packing platform 201, packing platform 201 provides packing interface to distribution platform 202.
Distribution platform 202 typically refers to, and develops web page, and the web that will have developed in development environment The page is distributed to the platform of user by specific mode.In the present embodiment, distribution platform 202 and packing Platform 201 is no longer integrated in together, but separate, and distribution platform 202 is by packing platform The 201 packing interfaces provided connect with the latter.
The packing interface that packing platform 201 provides can use various ways to realize, such as: self-defined message Mechanism etc..As one implementation easily, standard HTTP can be used to realize described interface, That is: packing platform 201 receives the resource packing request being sent in HTTP request mode.
Packing platform 201 is asked according to the resource packing from packing interface, Web page to be accelerated described in acquisition Resource file that face relates to generation resource bag of packing.The resource file that described web page to be accelerated relates to can To include, web page file to be accelerated and associated static resource file, it is also possible to be in above-mentioned resource file Partial document.The resource file related to by treating acceleration web page is packed and is preset at client in advance In equipment, the quick loading of web page can be realized on the client, reduce the probability that white screen phenomenon occurs.
In order to realize above-mentioned functions, the packing interface that packing platform 201 provides can comprise and pack with resource Relevant parameter, such as: the address list of the resource file that web page to be accelerated relates to, platform 201 of packing Corresponding resource file can be obtained according to the address above mentioned list transmitted from this interface from server end, and beat Bag generates resource bag.
In order to reduce the volume of transmitted data between distribution platform 202 and packing platform 201, save the network bandwidth, The present embodiment provides a kind of preferred implementation, the packing interface that packing platform 201 provides to include following ginseng Number: the URL information of web page to be accelerated.It is described in detail below for this preferred implementation.
The above-mentioned packing interface provided based on packing platform 201, distribution platform 202 is by this interface, to beating Bag platform 201 sends the resource packing request carrying web page URL information to be accelerated.
Packing platform 201 is for according to the URL information carried in the resource packing request received, from server End obtains web page file to be accelerated and associated static resource file, and is packed by the file of above-mentioned acquisition Generate resource bag.
Described web page file to be accelerated refers to the source file of web page to be accelerated, including html file, Htm file or xml document etc..Described associated static resource file refers to, described in web page to be accelerated The static resource file comprised, it may include one of following file or combination: Javascript script file, css level Connection stylesheet files, audio file, video file, picture file etc..Described web page to be accelerated be by The complete page that described source file and associated static resource file show after browser loads and renders.
In the specific implementation, packing platform 201 can be according to the URL ginseng carried in the packing request of described resource Number, first obtains corresponding web page file from server end, then this web page file is carried out text Analyze, according to information such as labels, find out the static resource file that this web page comprises, and from server end Obtain these static resource files, then the file of above-mentioned acquisition is packed and generate resource bag.
Preferably, it is contemplated that in web page in addition to comprising above-mentioned static resource, it is also possible to comprise dynamic contact Send out load resource, therefore, packing interface parameter in addition to the URL information of web page to be accelerated, The resource file address list that in web page to be accelerated, Dynamic trigger loads can also be included.Described dynamic contact Send out the resource loaded to include: be embedded in shell script, just triggering when corresponding shell script performs time The resource file loaded.Owing to this kind of resource file generally cannot be by the conventional text to web page file Analyzing and obtain, therefore distribution platform 202 can inform packing platform 201 by the way of Transfer Parameters.
Accordingly, packing platform 201 can be additionally used in, according to the above-mentioned money carried in the packing request of described resource Source file address list, obtains corresponding resource file, and generation resource bag of packing from server end.
Preferably, it is contemplated that web page to be accelerated may also contain the embedded page, in order to improve described web The loading velocity that the page is overall, packing platform 201 can be additionally used in, in web page file described in recursive lookup Embedded pagefile and associated static resource file, and will find above-mentioned file packing generate resource bag.
The described embedded page typically refers to, other web pages of display in the subrange of web page, Including html file, htm file or xml document etc., generally marked by iframe in web page file The address of the embedded page of src attribute-bit signed, therefore can be by treating in acceleration web page file The analysis of iframe label, obtains embedded pagefile, and by the analysis of embedded pagefile is obtained relevant Static resource file.
Why use the mode of recursive lookup, be primarily directed to the embedded page comprises the situation of the embedded page, Can first analyze in web page to be accelerated and whether have the embedded page, if it has, obtain embedded pagefile and Associated static resource file;Search again in this embedded page and the most still comprise the embedded page ..., class successively Push away, obtain all embedded pagefile i.e. associated static resource file of web page to be accelerated, and life of packing Become resource bag.
By above description it can be seen that due between distribution platform 202 and packing platform 201 by beating Packet interface docks, the web page accelerating needs, and distribution platform 202 has only to 201, platform of packing Packing request, packing platform 201 is sent to pack according to the packing acquisition request resource file received.Thus Visible, this system achieve packing platform 201 and distribution platform 202 between separate, ensure send out While the original development efficiency of cloth platform and reliability, it is achieved that the resource packing function of web page.
On the basis of system architecture described above, packing platform 201 can also have for subordinate's page Resource packing function, public resource optimization process, to functions such as client push resource bags, the most one by one Illustrate.
Packing platform 201 except can treat acceleration web page and associated static resource file packing in addition to, Described packing platform 201 is additionally operable in web page file described in recursive lookup subordinate's web page literary composition of link Part and associated static resource file, and the above-mentioned file packing found is generated resource bag.
Described web page to be accelerated can comprise the link jumping to other web pages, at Web page The address information generally linked with the src attribute-bit of a label in the file of face, the most in the specific implementation, can By analyzing a label in web page file to be accelerated, to obtain subordinate's web page file, and to pass through Analysis to described subordinate web page file obtains associated static resource file.
Jumping to the link of other web pages owing to each web page may comprise, therefore, packing is flat Platform 201 can obtain all subordinates web page file and associated static resource literary composition in the way of using recursive lookup Part is also packed.Specifically, packing platform 201 will web page be accelerated as first level pages, at this page File searches whether comprise the link accessing two grades of pages, if it has, obtain corresponding web page file And associated static resource file;Then search whether to comprise three grades of pages of access in the two grades of pagefiles found The link in face ..., the like.For the ease of describing, in the present embodiment by above-mentioned two grades, three grades of pages Faces etc. are referred to as subordinate's web page of web page to be accelerated.
Preferably, it is contemplated that the memory space of the client device that use resource bag carries out page acceleration is limited , therefore, in order to obtain balance between acceleration and memory space, packing platform 201 can be additionally used in, From the subordinate's web page file found, screen page access amount meet pre-conditioned subordinate's web page literary composition Part, and using selected subordinate web page file and associated static resource file as resource file to be packed.Institute Stating page access amount and include page browsing amount PV, or page independence user sessions UV, these information can be from The access log of service end obtains.
Described page access amount meets pre-conditioned including: page access amount is more than predetermined threshold value;Or, according to After the sequence of page access amount, tagmeme is in preset range.Separately below to above two subordinate web page The screening mode of file illustrates.
1) page access amount subordinate's web page file more than predetermined threshold value is selected.Specifically, packing platform 201 during recursive lookup subordinate web page, if the subordinate's web page judging to be currently found Page access amount is more than predetermined threshold value, then choose this subordinate's web page file, then further in accordance with aforesaid way First level pages is searched downwards, during until the page access amount of the subordinate's web page found is less than predetermined threshold value, Stop the recursive lookup process of described subordinate web page.
2) the subordinate's web page file found is ranked up according to page access amount, and therefrom chooses tagmeme The subordinate's web page file being in preset range.Adopting in this way, packing platform 201 can first be looked for Go out all of subordinate web page file, and sort from high to low according to the page access amount of each pagefile, The most therefrom choose subordinate's web page file that tagmeme is in the predetermined quantity of a high position, such as, sort first 15 Subordinate's web page file.
After packing platform 201 uses aforesaid way to filter out subordinate's web page file, can be by selected subordinate Web page file and the packing of associated static resource file generate resource bag.In prior art, generally by artificially referring to Fixed by which subordinate's page packing, lack automatic prediction ability, and acceleration treated by this packing platform 201 On the basis of the packing of web page resource, additionally it is possible to automatically carry out subordinate's web page according to page access amount Screening, and therefrom select the page that page access amount is high to pack, if client is prefixed these resources Bag, can not only promote the loading performance of web page to be accelerated, additionally it is possible to make subordinate's web page performance also Rationally promoted, and between performance and storage, obtained balance.
It should be noted that be unsatisfactory for pre-conditioned subordinate's web page for page access amount, it is also possible to There is the situation that some specialized page needs accelerates, therefore in being embodied as, can be for such special Page setup white list, it may be assumed that the subordinate's web page file that must pack is added in described white list. Accordingly, packing platform 201 is additionally operable to before to subordinate's web page resource packing, for page access Amount is unsatisfactory for pre-conditioned subordinate's web page file, it is judged that whether it is positioned in default white list, if It is that described subordinate web page file is also added in resource file to be packed.
Preferably, described packing platform 201 is additionally operable to, and extracts public resource literary composition from resource file to be packed Part, and the resource file to be packed after the common resource file of extraction and the described common resource file of deletion is divided Da Bao not generate resource bag.
In actual application, between different web pages, be usually present substantial amounts of public resource, such as with Lower scene: resource file a and the b packing generation bag A that web page 1 comprises planned by packing platform 201, Resource file a and the c packing comprised by web page 2 generates bag B, in this case in bag A and bag B Resource file a be common resource file, comprise this document respectively and naturally can cause redundancy in two bags, The extra network bandwidth can be taken during client downloads above-mentioned bag A and bag B, and client can be taken Additional storage space.
For the problems referred to above, the packing platform 201 in the technical program is before packing, by treating packing The analysis of resource file, therefrom extracts common resource file, is then independently packed by common resource file, then Other resource files to be packed after deleting common resource file are packed.Still continuing to use above-mentioned example, packing is flat Platform 201 can generate three resource bags, and bag A comprises resource b, and bag B comprises resource c, and bag C comprises money Source a.
After client downloads above-mentioned resource bag, can be redirected to when needing the resource loading web page 1 Local.Such as browser sends acquisition web page 1 and merges the HTTP request of resource http://sample.com/path??/ a ,/b, this request can be directed to this locality, and it is right with web page 1 first to search The resource bag A answered, therefrom obtains resource b, then searches public resource bag C, therefrom obtains resource a, then In the way of HTTP response, return to browser by after two combination of resources, thus help speed up Web page The loading procedure in face 1.Also it is same reason for loading web page 2.
As can be seen here, packing platform 201, by extracting public resource independent packing, can eliminate resource bag Between exist redundancy, on the one hand, network downloading flow can be reduced, on the other hand, it is also possible to it is right to reduce Taking of client memory space.
Packing platform 201 is obtaining web page to be accelerated and related resource file, two grades and following page at different levels On the basis of face resource file, extraction common resource file etc. process, finally resource file to be packed is beaten Bag generates resource bag.Packing platform 201 specifically can be packed to use any one mode following: will treat Packing resource file generates a resource bag;With each web page file and associated static resource file as list Position generates resource bag;Resource bag is generated in units of web page at the same level and associated static resource file.? In being embodied as, it is also possible to the above-mentioned packing manner of flexible combination, such as: can by web page to be accelerated and Associated static resource file (including the resource file that embedded page resource and Dynamic trigger load) breaks into one Resource bag, breaks into one by all subordinates web page and the associated static resource file of web page to be accelerated Resource bag is also possible.For the public resource literary composition extracted for the consideration that public resource optimization is processed Part can also break into one or more resource bag with reference to aforesaid way.
In being embodied as, after packing platform 201 generates resource bag, can be sent to resource bag issue and put down Platform 202, is supplied to client by distribution platform 202, in order to reduce the data interaction amount between platform, improves Execution efficiency, the technical program is provided resource bag by distribution platform 202 to client.For example, it is possible to according to The HTTP request of the download resource bag that client is actively initiated, sends out to client in the way of HTTP response Send resource bag.
Preferably, in order to allow client can obtain resource bag in time, it is achieved the quick loading of web page, The resource bag active push that packing platform 201 is additionally operable to generate packing is to client.After client terminal start-up, Length based on TCP/IP can be set up with the service end at packing platform 201 place to be connected, thus platform 201 of packing Can be no longer based on client request passive to response, but generating the very first time of resource bag, by institute State resource bag by being connected active push to client with the length between client.
Memory capacity in view of client is limited, and packing platform 201 is additionally operable to, to described client Before end pushes resource bag, select the resource bag of predetermined quantity as to be pushed from the resource bag generated Resource bag.When being embodied as, packing platform 201 can be according to authority corresponding to business belonging to the page to be accelerated Rank, the quantity of the resource bag treating propelling movement is controlled by.Such as, packing platform 201 generates 100 altogether Individual resource bag, but business corresponding to these resource bags is only to the authority of 50 resource bags of client push, So can carry out the screening of resource bag according to predetermined policy, and the resource bag meeting quantitative requirement is pushed to Client.
As can be seen here, packing platform 201 is asked by the packing of packing interface distribution platform 202, root According to asking to be packaged as relevant resource file resource bag, and resource bag is pushed to client, thus realize " be distributed to client from development environment ".
Additionally, there is possible (such as client device is not keyed up) not receiving resource bag for client, Packing platform 201 is additionally operable to the local resource package informatin that reports according to client, to client push its not yet The resource bag downloaded.Such as, after client sets up long connection with service end every time, can be actively flat to packing Platform 201 reports the relevant information of its locally stored resource bag, such as: bag title, version number etc..Packing The resource package informatin that the information that platform 201 reports according to client is safeguarded with packing platform 201 oneself compares Right, it is possible to know which resource bag is client lack, and these resource bags are pushed to client again.
In sum, the resource packaging system for web page that the present embodiment provides, platform 201 of packing With distribution platform 202 independently of one another, the packing interface that both are provided by packing platform 201 interacts, Use native system carry out resource packing, it is not necessary to migrate between platforms, can still multiplexing original, The ripe infrastructure in distribution platform 202, has been effectively ensured development efficiency and reliability.
In the above-described embodiment, it is provided that a kind of resource packaging system for web page, in contrast Answering, the application also provides for a kind of resource packaging method for web page.Refer to accompanying drawing 3, it is this The flow chart of the embodiment of a kind of resource packaging method for web page that application provides.Due to the method The part that embodiment is identical with said system embodiment repeats no more, and refers to speaking on somebody's behalf mutually in system embodiment Bright.
A kind of resource packaging method for web page that the embodiment of the present application provides, including:
Step S301, from packing interface set in advance from distribution platform, for web to be accelerated The resource packing request of the page.
The packing request of described resource can carry following parameter according to the requirement of described packing interface: web to be accelerated The URL information of the page;Can also carry: the resource file ground that in web page to be accelerated, Dynamic trigger loads Location list.
Step S302, according to described request, the resource file that web page to be accelerated described in acquisition relates to.
Specifically, the URL information can carried according to described request, obtain corresponding web page literary composition Part;By analyzing described web page file, obtain the static resource file relevant to described web page; And using the file of above-mentioned acquisition as resource file to be packed.
Obtain by the way after accelerating the resource file that web page relates to, it is also possible to perform following behaviour Make, obtain the resource file of Dynamic trigger loading, embedded page resource file, subordinate's page resource further Files etc., then perform the packing of step S303 and generate resource bag.It is further illustrated below.
The resource that Dynamic trigger loads can be obtained according to the resource file address list that resource packing request is carried File, and add in resource file to be packed.
Can with the embedded pagefile in web page file described in recursive lookup and associated static resource file, And the above-mentioned file found is added in resource file to be packed.
It is possible to further in web page file described in recursive lookup link subordinate's web page file and Associated static resource file, and the above-mentioned resource file found is added in resource file to be packed.
Subordinate's web page file can also be screened, can be to use following two mode: 1) described The subordinate web page file of link and associated static resource file in web page file described in recursive lookup During, perform operations described below for each subordinate web page file: obtain described subordinate web page literary composition The page access amount that part is corresponding;Judge that whether described page access amount is more than predetermined threshold value;If so, by described Subordinate's web page file and associated static resource file add resource file to be packed to;If it is not, terminate right The recursive lookup process of described subordinate web page file.2) select from the subordinate's web page file found Page access amount meets pre-conditioned subordinate's web page file, and by selected subordinate web page file and Associated static resource file is as resource file to be packed.
For the most selected subordinate's web page file as resource file to be packed, it can be determined that whether it Be positioned in default white list, if so, described subordinate web page file is added to described in resource to be packed In file.
Step S303, generates resource bag by the resource file packing obtained.
Before packing, common resource file can be extracted from the resource file to be packed obtained, then Resource file to be packed after the common resource file of extraction and the described common resource file of deletion is packed respectively Generate resource bag.
In being embodied as, can pack in the following way:
Resource file to be packed is generated a resource bag;Or, with each web page file and relevant quiet State resource file is that unit generates resource bag;Or, with web page at the same level and associated static resource file Resource bag is generated for unit.
After completing packaging operation, it is also possible to the resource bag of generation is pushed to client.
In addition to above-mentioned active push, this method can also include: the local resource reported according to client Package informatin, the resource bag that it is not yet downloaded to client push.
In the above-described embodiment, it is provided that a kind of resource packaging method for web page, in contrast Answering, the application also provides for a kind of resource packing apparatus for web page.Refer to Fig. 4, it is this Shen The schematic diagram of the embodiment of a kind of resource packing apparatus for web page please.Due to device embodiment base This is similar in appearance to embodiment of the method, so describing fairly simple, relevant part sees the part of embodiment of the method Illustrate.Device embodiment described below is only schematically.
A kind of resource packing apparatus for web page of the present embodiment, including: packing request reception unit 401, for from packing interface set in advance from distribution platform, for web page to be accelerated Resource packing request;Resource file acquiring unit 402, is used for the money that web page to be accelerated described in obtaining relates to Source file;Resource bag signal generating unit 403, generates resource bag for the resource file packing that will obtain.
Optionally, the packing interface that described packing request reception unit 401 is used includes following parameter: treat Accelerate the URL information of web page.
Optionally, described resource file acquiring unit 402 includes:
Web page file acquisition subelement, for the URL information carried according to described request, obtains therewith Corresponding web page file;
Static resource file acquisition subelement, for by analyzing described web page file, obtaining with described The static resource file that web page is relevant, and by described static resource file and described web page file Obtain the web page file conduct resource file to be packed in the lump that subelement obtains.
Optionally, the packing interface that described packing request reception unit 401 is used also includes following parameter: The resource file address list that in web page to be accelerated, Dynamic trigger loads;
Described device also includes:
Dynamic resource file obtaining unit, for obtaining corresponding resource according to described resource file address list File, and add in resource file to be packed.
Optionally, described device also includes:
Embedded page resource acquiring unit, the embedded page literary composition in web page file described in recursive lookup Part and associated static resource file, and the above-mentioned file found is added in resource file to be packed.
Optionally, described device includes:
Subordinate's page resource acquiring unit, the subordinate web of link in web page file described in recursive lookup Pagefile and associated static resource file, and the above-mentioned resource file found is added to resource to be packed literary composition In part.
Optionally, described subordinate page resource acquiring unit includes:
Recursion control subelement, subordinate's web page of link in web page file described in recursive lookup File and associated static resource file, and for the web page file triggering following subelement work of each subordinate:
Page access amount obtains subelement, for obtaining the page access that described subordinate web page file is corresponding Amount;
Threshold decision subelement, is used for judging that whether described page access amount is more than predetermined threshold value;If so, will Described subordinate web page file and associated static resource file add in resource file to be packed;If it is not, Notify that described recursion control subelement terminates the recursive lookup process to described subordinate web page file.
Optionally, described subordinate page resource acquiring unit includes: recursive lookup subelement and page screening Unit;
Described recursive lookup subelement, the subordinate web of link in web page file described in recursive lookup Pagefile and associated static resource file;
Described page screening subelement, for from subordinate's web page literary composition that described recursive lookup subelement finds Part select page access amount meet pre-conditioned subordinate's web page file, and by selected subordinate Web page Face file and associated static resource file add in resource file to be packed.
Optionally, described subordinate page resource acquiring unit also includes:
White list resource adds subelement, for for the most selected subordinate web as resource file to be packed Pagefile, it is judged that whether it is positioned in default white list, if so, by described subordinate web page file In resource file to be packed described in adding to.
Optionally, described device also includes:
Public resource extraction unit, for extracting common resource file from resource file to be packed;
Described resource bag signal generating unit specifically for, will extract common resource file and delete described public money Resource file to be packed after source file is packed respectively and is generated resource bag.
Optionally, described resource bag signal generating unit 403 specifically for, by resource file to be packed generate one Resource bag;Or, in units of each web page file and associated static resource file, generate resource bag; Or, in units of web page at the same level and associated static resource file, generate resource bag.
Optionally, described device also includes:
Resource bag push unit, for being pushed to client by the resource bag that packing generates.
Optionally, described device also includes:
The on-demand push unit of resource bag, for the local resource package informatin reported according to client, to client Push its resource bag not yet downloaded.
Provide a kind of resource packaging system for web page in the above-described embodiments and a kind of for web The resource packaging method of the page, the application also provides for the another kind of resource packaging method for web page.Please With reference to Fig. 5, its another kind being the application offer is for the stream of the embodiment of the resource packaging method of web page Cheng Tu, the part that the present embodiment is identical with above-described embodiment content repeats no more, below emphasis difference is described Place.Described another kind includes for the resource packaging method of web page:
Step S501, obtains the to be packed resource file relevant to web page.
Described the to be packed resource file relevant to web page is possible not only to include usually said web page File and associated static resource file, it is also possible to include in web page successively nested embedded pagefile, The resource file that Dynamic trigger loads, and subordinate's pagefile of web page file and associated static resource File.Concrete which resource file that obtains, can be according to concrete application demand as resource file to be packed Determining, the present embodiment is not specifically limited.
Step S502, extracts common resource file from described resource file to be packed.
Step S503, by the common resource file of extraction with delete and treat packing money after described common resource file Source file is packed respectively and is generated resource bag.
In the above-described embodiment, it is provided that the another kind of resource packaging method for web page, phase therewith Corresponding, the application also provides for the another kind of resource packing apparatus for web page.Refer to Fig. 6, it is The another kind of the application is for the schematic diagram of the embodiment of the resource packing apparatus of web page.Owing to device is real Executing example and be substantially similar to embodiment of the method, so describing fairly simple, relevant part sees embodiment of the method Part illustrate.Device embodiment described below is only schematically.
The resource packing apparatus for web page that the present embodiment provides, including: resource file to be packed obtains Take unit 601, for obtaining the to be packed resource file relevant to web page;Common resource file extracts Unit 602, for extracting common resource file from described resource file to be packed;Independent resource bag generates single Unit 603, for by civilian to the common resource file of extraction and resource pack after deleting described common resource file Part is packed respectively and is generated resource bag.
The above-mentioned resource packaging method for web page of the present embodiment offer and device, for different This situation of a large amount of public resource it is usually present, by extracting public resource literary composition before packing between web page Common resource file is also independently packed by part, eliminates the resource redundancy existed between resource bag, on the one hand, The network bandwidth downloaded shared by resource bag can be reduced, on the other hand, it is also possible to reduce resource bag to client Taking of end memory space.
Provide a kind of resource packaging system for web page and two kinds in the above-described embodiments for web The resource packaging method of the page, the application also provides for the third resource packaging method for web page.Please With reference to Fig. 7, its be the application provide the third for the stream of the embodiment of the resource packaging method of web page Cheng Tu, the part that the present embodiment is identical with above-described embodiment content repeats no more, below emphasis difference is described Place.Described the third includes for the resource packaging method of web page:
Step S701, subordinate's web page of recursive lookup web page link.
Step S702, meets the resource file involved by pre-conditioned subordinate's web page by page access amount Packing generates resource bag.
Described page access amount meets pre-conditioned including: page access amount is more than predetermined threshold value;Or, according to After the sequence of page access amount, tagmeme is in preset range.
Resource file involved by described subordinate web page includes: subordinate's web page file and relevant Static resource file.
In the above-described embodiment, it is provided that the third is for the resource packaging method of web page, phase therewith Corresponding, the application also provides for the third resource packing apparatus for web page.Refer to Fig. 8, it is The third of the application is for the schematic diagram of embodiment of the resource packing apparatus of web page.Owing to device is real Executing example and be substantially similar to embodiment of the method, so describing fairly simple, relevant part sees embodiment of the method Part illustrate.Device embodiment described below is only schematically.
The resource packing apparatus for web page that the present embodiment provides, including:
Subordinate's page searches unit 801, for subordinate's web page of recursive lookup web page link;
Subordinate's page resource bag signal generating unit 802, for meeting pre-conditioned subordinate web by page access amount Resource file packing involved by the page generates resource bag.
The above-mentioned resource packaging method for web page of the present embodiment offer and device, for prior art In generally by artificially specifying the situation of which subordinate's page packing, it is proposed that a kind of based on automatic prediction Subordinate's page resource packaging method: screen subordinate's web page according to page access amount, selects the page Visit capacity meets the page of preset requirement and packs.By the money generated in client preset employing this method Source is wrapped, it is possible to make the loading performance of subordinate's web page rationally be promoted, and takes between performance and storage Must balance.
Although the application is open as above with preferred embodiment, but it is not for limiting the application, Ren Heben Skilled person, without departing from spirit and scope, can make possible variation and amendment, Therefore the protection domain of the application should be defined in the range of standard with the application claim.
In a typical configuration, calculating equipment includes one or more processor (CPU), input/output Interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or the form such as Nonvolatile memory, such as read only memory (ROM) or flash memory (flash RAM). Internal memory is the example of computer-readable medium.
1, computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by Any method or technology realize information storage.Information can be computer-readable instruction, data structure, journey The module of sequence or other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic random access memory (DRAM), its The random access memory (RAM) of his type, read only memory (ROM), electrically erasable is read-only deposits Reservoir (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tape, tape magnetic magnetic Disk storage or other magnetic storage apparatus or any other non-transmission medium, can be used for storage can be set by calculating The standby information accessed.According to defining herein, computer-readable medium does not include non-temporary computer-readable matchmaker Body (transitory media), such as data signal and the carrier wave of modulation.
2, it will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer Program product.Therefore, the application can use complete hardware embodiment, complete software implementation or combine software Form with the embodiment of hardware aspect.And, the application can use and wherein include meter one or more The computer-usable storage medium of calculation machine usable program code (include but not limited to disk memory, CD-ROM, optical memory etc.) form of the upper computer program implemented.

Claims (50)

1. the resource packaging system for web page, it is characterised in that including: distribution platform and beating Bag platform;
Described distribution platform, for the packing interface provided by described packing platform, is sent out to described packing platform Send the resource packing request of web page to be accelerated;
Described packing platform is for asking according to the resource packing received, and web page to be accelerated described in acquisition relates to And resource file and pack generation resource bag.
Resource packaging system for web page the most according to claim 1, it is characterised in that institute The packing interface that stating packing platform provides includes following parameter: the URL information of web page to be accelerated.
Resource packaging system for web page the most according to claim 2, it is characterised in that institute State packing platform specifically for, obtain corresponding according to the described resource packing URL information carried of request Web page file and associated static resource file, and generation resource bag that the file of above-mentioned acquisition is packed.
Resource packaging system for web page the most according to claim 3, it is characterised in that institute State static resource file and include at least one in following element: javascript script, css Cascading Style Sheet, Audio frequency, video, picture file.
Resource packaging system for web page the most according to claim 3, it is characterised in that institute The packing interface that stating packing platform provides also includes following parameter: in web page to be accelerated, Dynamic trigger loads Resource file address list;
Described packing platform is additionally operable to, and obtains according to the resource file address list that the packing request of described resource is carried Take corresponding resource file, and generation resource bag of packing.
Resource packaging system for web page the most according to claim 3, it is characterised in that institute State packing platform to be additionally operable to, the embedded pagefile in web page file described in recursive lookup and associated static Resource file, and the above-mentioned file packing found is generated resource bag.
Resource packaging system for web page the most according to claim 3, it is characterised in that institute State packing platform be additionally operable to, in web page file described in recursive lookup link subordinate's web page file and Associated static resource file, and the above-mentioned file packing found is generated resource bag.
Resource packaging system for web page the most according to claim 7, it is characterised in that institute State packing platform to be additionally operable to, select page access amount to meet from the subordinate's web page file found and preset bar Subordinate's web page file of part, and using selected subordinate web page file and associated static resource file as Resource file to be packed.
Resource packaging system for web page the most according to claim 7, it is characterised in that institute State page access amount and meet pre-conditioned including:
Page access amount is more than predetermined threshold value;Or,
After sorting according to page access amount, tagmeme is in preset range.
Resource packaging system for web page the most according to claim 8, it is characterised in that Described page access amount includes: page browsing amount PV, or page independence user sessions UV.
The 11. resource packaging systems for web page according to claim 8, it is characterised in that Described packing platform is additionally operable to, and is unsatisfactory for pre-conditioned subordinate's web page file for page access amount, Judge whether it is positioned in default white list, if so, described subordinate web page file is added to described In resource file to be packed.
12. according to the arbitrary described resource packaging system for web page of claim 1-11, its feature Being, described packing platform is additionally operable to, and extracts common resource file from resource file to be packed;
The packing of described packing platform generates resource bag, including: by described to the common resource file extracted and deletion Resource file to be packed after common resource file is packed respectively and is generated resource bag.
13. according to the arbitrary described resource packaging system for web page of claim 1-11, its feature Being, described packing platform is specifically for generation resource bag of packing in the following ways:
Resource file to be packed is generated a resource bag;Or,
Resource bag is generated in units of each web page file and associated static resource file;Or,
Resource bag is generated in units of web page at the same level and associated static resource file.
14. according to the arbitrary described resource packaging system for web page of claim 1-11, its feature Being, described packing platform is additionally operable to, and the resource bag that packing generates is pushed to client.
The 15. resource packaging systems for web page according to claim 14, it is characterised in that Described packing platform is additionally operable to, before described client push resource bag, from the resource bag generated Select the resource bag of predetermined quantity as resource bag to be pushed.
16. according to the arbitrary described resource packaging system for web page of claim 1-11, its feature Being, described packing platform is additionally operable to, and the local resource package informatin reported according to client pushes away to client Give the resource bag that it is not yet downloaded.
17. according to the arbitrary described resource packaging system for web page of claim 1-11, its feature Being, the packing interface that described packing platform provides uses http protocol to realize.
18. according to the arbitrary described resource packaging system for web page of claim 3-11, its feature Being, described web page file and embedded pagefile include: html file, htm file or xml File.
19. 1 kinds of resource packaging methods for web page, it is characterised in that including:
From packing interface set in advance from distribution platform, resource for web page to be accelerated Packing request;
According to described request, the resource file that web page to be accelerated described in acquisition relates to;
The resource file packing obtained is generated resource bag.
The 20. resource packaging methods for web page according to claim 19, it is characterised in that The packing request of described resource carries following parameter according to the requirement of described packing interface: web page to be accelerated URL information.
The 21. resource packaging methods for web page according to claim 20, it is characterised in that The resource file that web page to be accelerated described in described acquisition relates to includes:
The URL information carried according to described request, obtains corresponding web page file;
By analyzing described web page file, obtain the static resource file relevant to described web page;
And using the file of above-mentioned acquisition as resource file to be packed.
The 22. resource packaging methods for web page according to claim 21, it is characterised in that The parameter that the packing request of described resource is carried according to the requirement of described packing interface also includes: Web page to be accelerated The resource file address list that in face, Dynamic trigger loads;
Described method also includes:
Obtain corresponding resource file according to described resource file address list, and add resource to be packed literary composition to In part.
The 23. resource packaging methods for web page according to claim 21, it is characterised in that Also include:
Embedded pagefile in web page file described in recursive lookup and associated static resource file, and will The above-mentioned file found adds in resource file to be packed.
The 24. resource packaging methods for web page according to claim 21, it is characterised in that Also include:
In web page file described in recursive lookup, subordinate's web page file and the associated static resource of link are civilian Part, and the above-mentioned resource file found is added in resource file to be packed.
The 25. resource packaging methods for web page according to claim 24, it is characterised in that The subordinate's web page file linked in web page file described in described recursive lookup and associated static resource During file, for each subordinate web page file execution operations described below:
Obtain the page access amount that described subordinate web page file is corresponding;
Judge that whether described page access amount is more than predetermined threshold value;
If so, described subordinate web page file and associated static resource file are added to resource to be packed literary composition In part;
If it is not, terminate the recursive lookup process to described subordinate web page file.
The 26. resource packaging methods for web page according to claim 24, it is characterised in that Including:
Page access amount is selected to meet pre-conditioned subordinate's Web page from the subordinate's web page file found Face file, and using selected subordinate web page file and associated static resource file as resource file to be packed.
27. according to the resource packaging method for web page described in claim 25 or 26, its feature It is, including:
For the most selected subordinate's web page file as resource file to be packed, it is judged that whether it is positioned at Preset white list in, if so, described subordinate web page file is added to described in resource file to be packed In.
28. according to the arbitrary described resource packaging method for web page of claim 19-26, and it is special Levy and be, before packing generates resource bag, execution operations described below:
Common resource file is extracted from resource file to be packed;
The described resource file by acquisition is packed and is generated resource bag and include: by the common resource file of extraction with delete Pack respectively except the resource file to be packed after described common resource file and generate resource bag.
29. according to the arbitrary described resource packaging method for web page of claim 19-26, and it is special Levy and be, the described step that the resource file packing obtained is generated resource bag, realize in the following way:
Resource file to be packed is generated a resource bag;Or,
Resource bag is generated in units of each web page file and associated static resource file;Or,
Resource bag is generated in units of web page at the same level and associated static resource file.
30. according to the arbitrary described resource packaging method for web page of claim 19-26, and it is special Levy and be, also include:
The resource bag that packing generates is pushed to client.
31. according to the arbitrary described resource packaging method for web page of claim 19-26, and it is special Levy and be, also include:
The local resource package informatin reported according to client, the resource bag that it is not yet downloaded to client push.
32. according to the arbitrary described resource packaging method for web page of claim 19-26, and it is special Levying and be, described packing interface set in advance uses http protocol to realize.
33. 1 kinds of resource packing apparatus for web page, it is characterised in that including:
Packing request reception unit, is used for from packing interface set in advance from distribution platform, pin Treat the resource packing request accelerating web page;
Resource file acquiring unit, is used for the resource file that web page to be accelerated described in obtaining relates to;
Resource bag signal generating unit, generates resource bag for the resource file packing that will obtain.
34. according to the resource packing apparatus for web page described in right 33, it is characterised in that described The packing interface that packing request reception unit is used includes following parameter: the URL of web page to be accelerated believes Breath.
35. according to the resource packing apparatus for web page described in right 34, it is characterised in that described Resource file acquiring unit includes:
Web page file acquisition subelement, for the URL information carried according to described request, obtains therewith Corresponding web page file;
Static resource file acquisition subelement, for by analyzing described web page file, obtaining with described The static resource file that web page is relevant, and by described static resource file and described web page file Obtain the web page file conduct resource file to be packed in the lump that subelement obtains.
The 36. resource packing apparatus for web page according to claim 35, it is characterised in that The packing interface that described packing request reception unit is used also includes following parameter: in web page to be accelerated The resource file address list that Dynamic trigger loads;
Described device also includes:
Dynamic resource file obtaining unit, for obtaining corresponding resource according to described resource file address list File, and add in resource file to be packed.
The 37. resource packing apparatus for web page according to claim 35, it is characterised in that Described device also includes:
Embedded page resource acquiring unit, the embedded page literary composition in web page file described in recursive lookup Part and associated static resource file, and the above-mentioned file found is added in resource file to be packed.
The 38. resource packing apparatus for web page according to claim 35, it is characterised in that Described device includes:
Subordinate's page resource acquiring unit, the subordinate web of link in web page file described in recursive lookup Pagefile and associated static resource file, and the above-mentioned resource file found is added to resource to be packed literary composition In part.
39. according to the resource packing apparatus for web page described in claim 38, it is characterised in that Described subordinate page resource acquiring unit includes:
Recursion control subelement, subordinate's web page of link in web page file described in recursive lookup File and associated static resource file, and for the web page file triggering following subelement work of each subordinate:
Page access amount obtains subelement, for obtaining the page access that described subordinate web page file is corresponding Amount;
Threshold decision subelement, is used for judging that whether described page access amount is more than predetermined threshold value;If so, will Described subordinate web page file and associated static resource file add in resource file to be packed;If it is not, Notify that described recursion control subelement terminates the recursive lookup process to described subordinate web page file.
40. according to the resource packing apparatus for web page described in claim 38, it is characterised in that Described subordinate page resource acquiring unit includes: recursive lookup subelement and page screening subelement;
Described recursive lookup subelement, the subordinate web of link in web page file described in recursive lookup Pagefile and associated static resource file;
Described page screening subelement, for from subordinate's web page literary composition that described recursive lookup subelement finds Part select page access amount meet pre-conditioned subordinate's web page file, and by selected subordinate Web page Face file and associated static resource file add in resource file to be packed.
41. according to the resource packing apparatus for web page described in claim 39 or 40, its feature Being, described subordinate page resource acquiring unit also includes:
White list resource adds subelement, for for the most selected subordinate web as resource file to be packed Pagefile, it is judged that whether it is positioned in default white list, if so, by described subordinate web page file In resource file to be packed described in adding to.
42. according to the arbitrary described resource packing apparatus for web page of claim 33-40, and it is special Levying and be, described device also includes:
Public resource extraction unit, for extracting common resource file from resource file to be packed;
Described resource bag signal generating unit specifically for, will extract common resource file and delete described public money Resource file to be packed after source file is packed respectively and is generated resource bag.
43. according to the arbitrary described resource packing apparatus for web page of claim 33-40, and it is special Levy and be, described resource bag signal generating unit specifically for, by resource file to be packed generate a resource bag; Or, in units of each web page file and associated static resource file, generate resource bag;Or, with Web page at the same level and associated static resource file are that unit generates resource bag.
44. according to the arbitrary described resource packing apparatus for web page of claim 33-40, and it is special Levying and be, described device also includes:
Resource bag push unit, for being pushed to client by the resource bag that packing generates.
45. according to the arbitrary described resource packing apparatus for web page of claim 33-40, and it is special Levying and be, described device also includes:
The on-demand push unit of resource bag, for the local resource package informatin reported according to client, to client Push its resource bag not yet downloaded.
46. 1 kinds of resource packaging methods for web page, it is characterised in that including:
Obtain the to be packed resource file relevant to web page;
Common resource file is extracted from described resource file to be packed;
By the resource file to be packed after the common resource file of extraction and the described common resource file of deletion respectively Packing generates resource bag.
47. 1 kinds of resource packing apparatus for web page, it is characterised in that including:
Resource file acquiring unit to be packed, for obtaining the to be packed resource file relevant to web page;
Common resource file extraction unit, for extracting common resource file from described resource file to be packed;
Independent resource bag signal generating unit, for the common resource file that will extract and deletion described public resource literary composition Resource file to be packed after part is packed respectively and is generated resource bag.
48. 1 kinds of resource packaging methods for web page, it is characterised in that including:
Subordinate's web page of recursive lookup web page link;
Page access amount is met the resource file packing involved by pre-conditioned subordinate's web page and generates money Source is wrapped.
The 49. resource packaging methods for web page according to claim 48, it is characterised in that Described page access amount meets pre-conditioned including:
Page access amount is more than predetermined threshold value;Or,
After sorting according to page access amount, tagmeme is in preset range.
50. 1 kinds of resource packing apparatus for web page, it is characterised in that including:
Subordinate's page searches unit, for subordinate's web page of recursive lookup web page link;
Subordinate's page resource bag signal generating unit, for meeting pre-conditioned subordinate's Web page by page access amount Resource file packing involved by face generates resource bag.
CN201510219807.9A 2015-04-30 2015-04-30 Resource packaging system, method and device for web page Pending CN106202083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510219807.9A CN106202083A (en) 2015-04-30 2015-04-30 Resource packaging system, method and device for web page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510219807.9A CN106202083A (en) 2015-04-30 2015-04-30 Resource packaging system, method and device for web page

Publications (1)

Publication Number Publication Date
CN106202083A true CN106202083A (en) 2016-12-07

Family

ID=57457783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510219807.9A Pending CN106202083A (en) 2015-04-30 2015-04-30 Resource packaging system, method and device for web page

Country Status (1)

Country Link
CN (1) CN106202083A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786630A (en) * 2017-09-06 2018-03-09 阿里巴巴集团控股有限公司 A kind of web applications packet processing method, device and equipment
CN107800714A (en) * 2017-11-10 2018-03-13 中国民生银行股份有限公司 A kind of file of client shows method and apparatus
CN110889059A (en) * 2018-09-11 2020-03-17 优视科技有限公司 Method, client, server and system for presetting page resources
CN110989978A (en) * 2019-11-06 2020-04-10 北京达佳互联信息技术有限公司 Page packaging method and device, electronic equipment and storage medium
CN111090455A (en) * 2019-11-27 2020-05-01 杭州古点网络科技有限公司 Method for optimizing WEB project front-end resource and reissuing war package
CN111596935A (en) * 2020-04-27 2020-08-28 五八有限公司 Script packing method and device, electronic equipment and storage medium
CN111724133A (en) * 2020-06-19 2020-09-29 北京达佳互联信息技术有限公司 Method and device for creating project

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110099277A1 (en) * 2009-10-28 2011-04-28 Verizon Patent And Licensing, Inc. Network architecture for resource requests
CN102184231A (en) * 2011-05-12 2011-09-14 广州市动景计算机科技有限公司 Method and device for acquiring page resources
CN103475744A (en) * 2013-09-30 2013-12-25 中国农业银行股份有限公司 Resource downloading method, device and system on basis of Web application
CN103929432A (en) * 2014-04-28 2014-07-16 深圳如果技术有限公司 Website packing and unpacking method
CN104281677A (en) * 2014-09-29 2015-01-14 百度在线网络技术(北京)有限公司 Page displaying method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110099277A1 (en) * 2009-10-28 2011-04-28 Verizon Patent And Licensing, Inc. Network architecture for resource requests
CN102184231A (en) * 2011-05-12 2011-09-14 广州市动景计算机科技有限公司 Method and device for acquiring page resources
CN103475744A (en) * 2013-09-30 2013-12-25 中国农业银行股份有限公司 Resource downloading method, device and system on basis of Web application
CN103929432A (en) * 2014-04-28 2014-07-16 深圳如果技术有限公司 Website packing and unpacking method
CN104281677A (en) * 2014-09-29 2015-01-14 百度在线网络技术(北京)有限公司 Page displaying method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786630A (en) * 2017-09-06 2018-03-09 阿里巴巴集团控股有限公司 A kind of web applications packet processing method, device and equipment
CN111885082A (en) * 2017-09-06 2020-11-03 创新先进技术有限公司 Web application package processing method, device and equipment
US11157254B2 (en) 2017-09-06 2021-10-26 Advanced New Technologies Co., Ltd. Method, apparatus, and device for processing web application package
CN111885082B (en) * 2017-09-06 2023-08-01 创新先进技术有限公司 Web application package processing method, device and equipment
CN107800714A (en) * 2017-11-10 2018-03-13 中国民生银行股份有限公司 A kind of file of client shows method and apparatus
CN110889059A (en) * 2018-09-11 2020-03-17 优视科技有限公司 Method, client, server and system for presetting page resources
CN110989978A (en) * 2019-11-06 2020-04-10 北京达佳互联信息技术有限公司 Page packaging method and device, electronic equipment and storage medium
CN111090455A (en) * 2019-11-27 2020-05-01 杭州古点网络科技有限公司 Method for optimizing WEB project front-end resource and reissuing war package
CN111596935A (en) * 2020-04-27 2020-08-28 五八有限公司 Script packing method and device, electronic equipment and storage medium
CN111724133A (en) * 2020-06-19 2020-09-29 北京达佳互联信息技术有限公司 Method and device for creating project

Similar Documents

Publication Publication Date Title
CN106202083A (en) Resource packaging system, method and device for web page
CN105045887B (en) The system and method for mixed mode cross-domain data interaction
CN110225417A (en) Data processing method and server, the method and server that detect Caton
CN104852934A (en) Method for realizing flow distribution based on front-end scheduling, device and system thereof
US11240290B2 (en) Application download method and apparatus, application sending method and apparatus, and system
CN109672580A (en) Full link monitoring method, apparatus, terminal device and storage medium
CN106126693A (en) The sending method of the related data of a kind of webpage and device
US20170142203A1 (en) Method for host scheduling for container deployment, electronic device and non-transitory computer-readable storage medium
CN107528718A (en) Obtain the methods, devices and systems of resource
CN106817388A (en) The system that virtual machine, host obtain the method, device and access data of data
CN107888717A (en) A kind of domain name determines method, apparatus and electronic equipment
CN106547683A (en) A kind of redundant code detection method and device
CN107438051A (en) streaming media quick start method, device and system
CN112688804A (en) Service platform deployment method, device, equipment and storage medium
US10334014B2 (en) Accessing connected service resources in a distributed application programming interface
CN106649581B (en) Webpage repairing method and client
CN101770511B (en) Browse system for accelerating backspace operation of mobile communication equipment terminal and application method thereof
CN111309432B (en) Fault drilling method, device and system
CN107302584A (en) A kind of efficient collecting method
US11262995B2 (en) Method and apparatus for downloading installation-free application
CN103501251B (en) Method and device for processing data packet under offline condition
CN106919595A (en) A kind of method, device and electronic equipment mapped for Cookie
KR102196403B1 (en) Reduced redirection
JP2008108047A (en) Communication picture reproducing device and communication picture reproducing program
CN111339388B (en) Information crawling system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1231221

Country of ref document: HK

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161207

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1231221

Country of ref document: HK