CN107368484A - Compression method and device, the acquisition methods and device of the static resource file of webpage - Google Patents

Compression method and device, the acquisition methods and device of the static resource file of webpage Download PDF

Info

Publication number
CN107368484A
CN107368484A CN201610312554.4A CN201610312554A CN107368484A CN 107368484 A CN107368484 A CN 107368484A CN 201610312554 A CN201610312554 A CN 201610312554A CN 107368484 A CN107368484 A CN 107368484A
Authority
CN
China
Prior art keywords
file
static resource
webpage
information
static
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
CN201610312554.4A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610312554.4A priority Critical patent/CN107368484A/en
Publication of CN107368484A publication Critical patent/CN107368484A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

This application discloses the compression method and device of the static resource file of webpage, acquisition methods and device.One embodiment of methods described includes:Webpage is obtained from web page server;The document structure information for the static resource file that the webpage includes is obtained, the document structure information includes file name and file directory information;The static resource structured file of the corresponding document structure information of generation;Merge, compress the static resource file and obtain static resource compressed file;The static resource compressed file and static resource structured file are packaged into static resource compressed package.The embodiment obtains the document structure information of static resource file, and then obtain the static resource structured file of respective file structural information, realize the record of the address information to the structural relation and static resource file of static resource file on web page server, both the loading velocity of webpage on the client had been ensure that, has improved the efficiency of rear end exploitation again.

Description

Compression method and device, the acquisition methods and device of the static resource file of webpage
Technical field
The application is related to network processing techniques field, and in particular to technical field of webpage processing, especially It is related to the compression method and device of the static resource file of webpage, acquisition methods and device.
Background technology
Current mobile Internet, substantial amounts of content are carried by the webpage in browser, With the continuous development of each corporate business, the effect requirements of function and displaying to webpage are got over Come higher, the static resource file of webpage (is not performed, and by client by web page server The file that browser performs, for example, extending entitled html, htm, css, js, jpg, txt File) volume it is also increasing.But no matter current 3rd generation mobile communication technology or Fourth generation mobile communication technology, network speed are all restricted, and this results in webpage in mobile terminal The time of upper loading is longer;Meanwhile network rate are also costly, limit mobile Internet Development.The front-end technology personnel of webpage are optimized using various means to webpage, to carry High webpage is in the online access speed of mobile interchange.Wherein, an important means are exactly to net Static resource file in page carries out Piece file mergence and compression, to reduce the number of static resource file Amount and size.
The exploitation of webpage is divided into front end exploitation and rear end exploitation, the static resource in being developed to front end The purpose that file is merged and compressed, be meet mobile terminal normally online on the premise of, So that mobile terminal lacks consumption network flow, and quick obtaining webpage as far as possible.But merge and compress Static resource file afterwards is unfavorable for rear end exploitation, because the static state after merging and compressing The situation that picture clarity declines, and debugging difficulty improves occurs when rear end is developed for resource file, Reduce the efficiency of rear end exploitation.
The content of the invention
This application provides the compression method of the static resource file of webpage and device, acquisition methods And device, to solve the technical problem mentioned in background technology.
In a first aspect, this application provides a kind of compression method of the static resource file of webpage, Methods described includes:Webpage is obtained from web page server;Obtain the static money that the webpage includes The document structure information of source file, the document structure information include file name and file directory Information;The static resource structured file of the corresponding document structure information of generation;Merge, compression The static resource file obtains static resource compressed file;By the static resource compressed file Static resource compressed package is packaged into static resource structured file.
Second aspect, this application provides a kind of acquisition methods of the static resource file of webpage, Methods described includes:The static resource structured file checked in static resource compressed package;According to institute State static resource structured file and determine address of the static resource file on web page server;In net The static resource file is obtained at the address on page server.
The third aspect, this application provides a kind of compression set of the static resource file of webpage, Described device includes:Webpage acquiring unit, for obtaining webpage from web page server;File knot Structure information acquisition unit, the file structure of the static resource file included for obtaining the webpage Information, the document structure information include file name and file directory information;Static resource knot Structure file generating unit, for generating the static resource structure text of the corresponding document structure information Part;Static resource compressed file acquiring unit, for merging, compressing the static resource file Obtain static resource compressed file;Static resource compressed package acquiring unit, for by the static state Resource compressed file and static resource structured file are packaged into static resource compressed package.
Fourth aspect, this application provides a kind of acquisition device of the static resource file of webpage, Described device includes:Static resource structured file retrieval unit, for checking that static resource compresses Static resource structured file in bag;Static resource document location determining unit, for according to institute State static resource structured file and determine address of the static resource file on web page server;It is static Resource file acquiring unit, for obtaining the static state at the address on web page server Resource file.
Compression method and device, the acquisition methods and device for the static resource file that the application provides, The document structure information of static resource file is obtained, and then obtains respective file structural information Static resource structured file, realize structural relation and the static resource text to static resource file The record of address information of the part on web page server, both ensure that webpage on the client plus Speed is carried, improves the efficiency of rear end exploitation again.
Brief description of the drawings
Retouched by reading with reference to the detailed of being made to non-limiting example of being made of the following drawings State, other features, objects and advantages will become more apparent upon:
Fig. 1 is an implementation according to the compression method of the static resource file of the webpage of the application The flow chart of example;
Fig. 2 is an implementation according to the acquisition methods of the static resource file of the webpage of the application The flow chart of example;
Fig. 3 is the compression method and acquisition methods according to the static resource file of the webpage of the application Application scenarios a schematic diagram;
Fig. 4 is an implementation according to the compression set of the static resource file of the webpage of the application The structural representation of example;
Fig. 5 is an implementation according to the acquisition device of the static resource file of the webpage of the application The structural representation of example;
Fig. 6 is the structural representation according to one embodiment of the web page server of the application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is appreciated that , specific embodiment described herein is used only for explaining related invention, rather than to the hair Bright restriction.It also should be noted that for the ease of description, illustrate only in accompanying drawing with About the related part of invention.
It should be noted that in the case where not conflicting, embodiment and embodiment in the application In feature can be mutually combined.Describe this in detail below with reference to the accompanying drawings and in conjunction with the embodiments Application.
Fig. 1 shows the flow of one embodiment of the compression method of the static resource file of webpage Figure 100, the compression method of the static resource file of the webpage comprise the following steps:
Step 101, webpage is obtained from web page server.
Web page server is used to preserve the various files related to webpage, and Website development is divided into front end Two parts are developed in exploitation and rear end.Generally, the web page files of front end exploitation are needed after being sent to End is developed to continue with.Before web page files to be sent to rear end exploitation, it is necessary to webpage text Part is handled accordingly, for example, static resource file is compressed and merged.Therefore, Need to be sent to the webpage developed rear end firstly the need of obtaining from web page server.
Step 102, the document structure information for the static resource file that the webpage includes is obtained.
, it is necessary to be carried out to the static resource file of webpage before webpage to be sent to rear end exploitation Processing.From the description of background section, after static resource file is merged and compressed, A variety of the problem of being unfavorable for processing are likely to occur developing rear end.For the ease of rear end development process In the file of front end exploitation is handled, it is necessary to first determine static resource Piece file mergence and compression Document structure information before, to meet the needs of rear end development process.Wherein, the file Structural information includes file name and file directory information.
It is described to obtain what the webpage included in some optional implementations of the present embodiment The document structure information of static resource file may comprise steps of:
The first step, identify the static resource file in webpage.
Various types of files can be included in webpage, wherein, the size and webpage for influenceing webpage exist One importance of the transmission speed on mobile network is exactly the static resource file in webpage, Not only type is more for static resource file, and quantity is also a lot.Therefore, it is necessary to first from webpage In identify static resource file.
Second step, record the file name of the static resource file in webpage.
When in rear end, exploitation needs to handle the associated documents in webpage, it can often pass through Directly file name corresponding to inquiry is searched on web page server.
3rd step, file directory letter is obtained according to the file structure between the static resource file Breath.
Static resource file needs to be merged and compress, and is treated to static resource file Cheng Zhong, it may be desirable to determine the position of a certain static resource file and other static resource files Relation (for example, belonging to same catalogue or file etc.).Therefore, it is necessary to obtain static resource text The file directory information of part.
4th step, the file name and file directory information are packaged into document structure information.
After obtaining file name and file directory information, file name and file directory information are sealed Document structure information is dressed up, is easy to the analysis subsequently to static resource file.
Step 103, the static resource structured file of the corresponding document structure information of generation.
Document structure information is to be analyzed what is obtained to the static resource file in webpage, when after When end exploitation needs to handle static resource file, generally require to obtain from web page server Corresponding static resource file, rather than static resource file is obtained directly in webpage, therefore, Also need to obtain the corresponding relation between the static resource file and web page server of webpage.
In some optional implementations of the present embodiment, the corresponding file knot of generation The static resource structured file of structure information may comprise steps of:
The first step, search address information of the static resource file on web page server.
Want directly to handle the static resource file on web page server, it is necessary to know quiet (that is, static resource file takes address information of the state resource file on web page server in webpage The position being engaged on device), it is known that address information can just find corresponding static state from web page server Resource file.
Second step, the document structure information and address information are packaged into static resource structure text Part.
Document structure information describes the file name and static resource of static resource file in webpage Mutual alignment relation between file, the address information of static resource file determine static resource Position of the file on web page server, just can be to quiet by document structure information and address information State resource file is positioned on webpage and web page server, and obtains static resource file (the static resource file on web page server can be considered as static resource text in webpage to original document The original document of part).
Step 104, merge, compress the static resource file and obtain static resource compressed file.
Static resource file in webpage is merged and compressed, has both reduced static resource text The quantity of part, the size of static resource file is reduced again, obtain corresponding static resource file Static resource compressed file.
Step 105, the static resource compressed file and static resource structured file are packaged into Static resource compressed package.
There is corresponding relation in static resource compressed file and static resource structured file, static state is provided Source compressed file and static resource structured file are packaged into static resource compressed package, complete to webpage The compression of static resource file.After the completion of compression, it is possible to the static resource will be included and compressed The webpage of bag is sent to Website development rear end.
With further reference to Fig. 2, it illustrates the one of the acquisition methods of the static resource file of webpage The flow chart 200 of individual embodiment, the acquisition methods of the static resource file of the webpage are including following Step:
Step 201, the static resource structured file checked in static resource compressed package.
Rear end exploitation is received after static resource compressed package, it is necessary to the static resource text in webpage Part is handled accordingly.Because static resource compressed file is generally not easy to directly to corresponding Static resource file is handled, and only needs to get the static state in static resource compressed package herein Resource structures file, the static money before compression can be found according to static resource structured file Source file.
Step 202, determine static resource file in webpage according to the static resource structured file Address on server.
Include address of the static resource file on web page server in static resource structured file Information, therefore, it is necessary to the static resource file in static resource structured file is got first Address information.
It is described according to the static resource knot in some optional implementations of the present embodiment Structure file determines that address of the static resource file on web page server may comprise steps of:
The first step, document structure information and address are parsed from the static resource structured file Information.
Firstly the need of parsed from static resource structured file document structure information and address letter Breath, wherein, document structure information is used to describe the mutual alignment relation between static resource file, Address information is used to describe position of the static resource file on web page server.
Second step, determined to need the static resource file operated according to the document structure information.
Static resource file is more, is not usually to all static resources in the development process of rear end File will be handled, but some static resource files therein are handled.It is static After the completion of resource file processing, it is also necessary to which the static resource file after processing is put back into static money Correspondence position of the source file in webpage, therefore, it is necessary to first determine to need the static resource operated File.
3rd step, the static resource file for determining to need to operate according to the address information is in webpage Address on server.
Determine after needing static resource file to be processed, according to address information inquiry static resource Address of the file on web page server, so as to the static resource file on web page server Obtain.
Step 203, the static resource file is obtained at the address on web page server.
After determining address of the static resource file on web page server, directly it can be taken in webpage The static resource file is obtained on business device.
It is described to be believed according to the file structure in some optional implementations of the present embodiment The static resource file that breath determines to need to operate may comprise steps of:
The first step, the file name of corresponding static resource file is parsed from document structure information And file directory information.
When needing to handle some static resource file, in order to be looked on web page server The static resource file is looked for, simple method is exactly that the static resource is searched on web page server The file name of file.It is also desirable to the file directory information of static resource file is obtained, To meet the structural requirement of file in webpage and to call requirement.
Second step, determined to need the static state operated according to the file name and file directory information Resource file.
Position of the static resource file for determining to need to operate by file directory information in webpage Put, then, determine on web page server to need the static state operated by file name can Resource file.
The method that above-described embodiment of the application provides obtains the file structure of static resource file Information, and then the static resource structured file of respective file structural information is obtained, realize to quiet Address information of the structural relation and static resource file of state resource file on web page server Record, both ensure that the loading velocity of webpage on the client, improve the effect of rear end exploitation again Rate.
Fig. 3 is the compression method and acquisition methods according to the static resource file of the webpage of the application Application scenarios a schematic diagram.In Fig. 3, static resource that developer A passes through webpage The compression method of file is compressed to the static resource file in webpage, the static state finally given Static resource compressed file and static resource structured file are contained in resource compressed package.Wherein, Static resource compressed file is the compressed file of static resource file, static resource structured file bag The file name, file directory information and static resource file of static resource file are contained in webpage Address information on server.After developer B gets static resource compressed package, by clear Device of looking at is handled web page contents, when needing that the static resource file in webpage is handled When, the static resource structured file in static resource compressed package goes local Hyper text transfer to assist Discuss whois lookup static resource file, rather than the static money directly from static resource compressed package Source compressed file obtains static resource file.After getting static resource file, after processing File is placed into webpage.Thus both ensure to carry out the loading velocity of webpage on the client, again Improve the efficiency of rear end exploitation.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, the application provides One embodiment of the compression set of the static resource file of webpage a kind of, the device embodiment It is corresponding with the embodiment of the method shown in Fig. 1.
As shown in figure 4, the compression set 400 of the static resource file of webpage described in the present embodiment Including:Webpage acquiring unit 401, document structure information acquiring unit 402, static resource structure File generating unit 403, static resource compressed file acquiring unit 404 and static resource compression Bag acquiring unit 405.Wherein, webpage acquiring unit 401 is used to obtain net from web page server Page;Document structure information acquiring unit 402 is used to obtain the static resource text that the webpage includes The document structure information of part, the document structure information include file name and file directory information; Static resource structured file generation unit 403 is used to generate the quiet of the corresponding document structure information State resource structures file;Static resource compressed file acquiring unit 404 is used to merge, compress institute State static resource file and obtain static resource compressed file;Static resource compressed package acquiring unit 405 are used to the static resource compressed file and static resource structured file being packaged into static money Source compressed package.
In some optional implementations of the present embodiment, the document structure information obtains single Member 402 includes:Static resource file identification subelement (not shown), file name record Subelement (not shown), file directory information obtain subelement (not shown) and text Part structural information obtains subelement (not shown).Wherein, static resource file identification is single Member is used to identify the static resource file in webpage;File name record subelement is used to record net The file name of the static resource file in page;File directory information obtains subelement and is used for File directory information is obtained according to the file structure between the static resource file;File structure Acquisition of information subelement is used to the file name and file directory information being packaged into file structure Information.
In some optional implementations of the present embodiment, the static resource structured file life Include into unit 403:Address information searches subelement (not shown) and static resource knot Structure file generated subelement (not shown).Wherein, address information searches subelement and is used to look into Look for address information of the static resource file on web page server;Static resource structured file Generation subelement is used to the document structure information and address information being packaged into static resource structure File.
In some optional implementations of the present embodiment, the static money of the webpage of the present embodiment The compression set 400 of source file also includes:Transmitting element, for the static resource will to be included The webpage of compressed package is sent to Website development rear end.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, the application provides One embodiment of the acquisition device of the static resource file of webpage a kind of, the device embodiment It is corresponding with the embodiment of the method shown in Fig. 2.
As shown in figure 5, the acquisition device 500 of the static resource file of webpage described in the present embodiment Including:Static resource structured file retrieval unit 501, static resource document location determining unit 502 and static resource file obtaining unit 503.Wherein, static resource structured file retrieval unit The 501 static resource structured file for checking in static resource compressed package;Static resource file Position determination unit 502 is used to determine static resource file according to the static resource structured file Address on web page server;Static resource file obtaining unit 503 is used in web service The static resource file is obtained at the address on device.
In some optional implementations of the present embodiment, the static resource document location is true Order member 502 includes:Parse subelement (not shown), static resource file determines that son is single First (not shown) and position determination subelement (not shown).Wherein, parsing is single Member is used to parse document structure information and address information from the static resource structured file; Static resource file determination subelement is used to be determined to need what is operated according to the document structure information Static resource file;Position determination subelement is used to determine to need to operate according to the address information Address of the static resource file on web page server.
In some optional implementations of the present embodiment, the static resource file determines son Unit includes parsing module and static resource file determining module.Wherein, parsing module be used for from The file name and file directory letter of corresponding static resource file are parsed in document structure information Breath;Static resource file determining module is used for true according to the file name and file directory information The static resource file operated is needed calmly.
Below with reference to Fig. 6, it illustrates suitable for for realizing the web service of the embodiment of the present application The structural representation of the computer system 600 of device.
As shown in fig. 6, computer system 600 includes CPU (CPU) 601, its Can according to the program being stored in read-only storage (ROM) 602 or from storage part 608 The program that is loaded into random access storage device (RAM) 603 and perform various appropriate actions And processing.In RAM603, also it is stored with system 600 and operates required various program sums According to.CPU601, ROM602 and RAM603 are connected with each other by bus 604.Input/ Output (I/O) interface 605 is also connected to bus 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.; Including cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc. Output par, c 607;Storage part 608 including hard disk etc.;And including such as LAN card, The communications portion 609 of the NIC of modem etc..Communications portion 609 is via such as The network of internet performs communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as disk, CD, magneto-optic disk, semiconductor memory etc., Be arranged on as needed on driver 610, in order to the computer program that reads from it according to Need to be mounted into storage part 608.
Especially, in accordance with an embodiment of the present disclosure, can be with above with reference to the process of flow chart description It is implemented as computer software programs.For example, embodiment of the disclosure includes a kind of computer journey Sequence product, it includes being tangibly embodied in the computer program on machine readable media, above-mentioned meter Calculation machine program bag contains the program code for being used for the method shown in execution flow chart.In such implementation In example, the computer program can be downloaded and installed by communications portion 609 from network, And/or it is mounted from detachable media 611.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, Architectural framework in the cards, function and the operation of method and computer program product.This point On, each square frame in flow chart or block diagram can represent a module, program segment or code A part, a part for above-mentioned module, program segment or code is used for comprising one or more The executable instruction of logic function as defined in realization.It should also be noted that at some as replacement In realization, the function of being marked in square frame can also be with different from the order marked in accompanying drawing hair It is raw.For example, two square frames succeedingly represented can essentially perform substantially in parallel, they Sometimes can also perform in the opposite order, this is depending on involved function.It is also noted that It is, each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart Combination, function or the special hardware based system of operation it can be realized as defined in execution, Or it can be realized with the combination of specialized hardware and computer instruction.
Being described in unit involved in the embodiment of the present application can be real by way of software It is existing, it can also be realized by way of hardware.Described unit can also be arranged on processing In device, for example, can be described as:A kind of processor includes webpage acquiring unit, file structure Information acquisition unit, static resource structured file generation unit, static resource compressed file obtain Unit and static resource compressed package acquiring unit.Wherein, the title of these units is in certain situation Under do not form restriction to the unit in itself.For example, webpage acquiring unit can also be described For " being used for the unit for obtaining webpage ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, The nonvolatile computer storage media can be in above-described embodiment included in said apparatus Nonvolatile computer storage media;Can also be individualism, without non-in supplying terminal Volatile computer storage medium.Above-mentioned nonvolatile computer storage media be stored with one or The multiple programs of person, when said one or multiple programs are performed by an equipment so that above-mentioned Equipment:Webpage is obtained from web page server;Obtain the static resource file that the webpage includes Document structure information, the document structure information include file name and file directory information;It is raw Into the static resource structured file of the corresponding document structure information;Merge, compress the static state Resource file obtains static resource compressed file;By the static resource compressed file and static money Source structure Document encapsulation is into static resource compressed package.
Above description is only the preferred embodiment of the application and saying to institute's application technology principle It is bright.It will be appreciated by those skilled in the art that invention scope involved in the application, and it is unlimited In the technical scheme that the particular combination of above-mentioned technical characteristic forms, while it should also cover and not depart from In the case of the inventive concept, it is combined by above-mentioned technical characteristic or its equivalent feature And the other technical schemes formed.Such as features described above and (but not limited to) disclosed herein The technical scheme that technical characteristic with similar functions is replaced mutually and formed.

Claims (14)

  1. A kind of 1. compression method of the static resource file of webpage, it is characterised in that methods described Including:
    Webpage is obtained from web page server;
    Obtain the document structure information for the static resource file that the webpage includes, the file knot Structure information includes file name and file directory information;
    The static resource structured file of the corresponding document structure information of generation;
    Merge, compress the static resource file and obtain static resource compressed file;
    The static resource compressed file and static resource structured file are packaged into static resource pressure Contracting bag.
  2. 2. according to the method for claim 1, it is characterised in that described to obtain the webpage Comprising the document structure information of static resource file include:
    Identify the static resource file in webpage;
    Record the file name of the static resource file in webpage;
    File directory information is obtained according to the file structure between the static resource file;
    The file name and file directory information are packaged into document structure information.
  3. 3. according to the method for claim 1, it is characterised in that described in the generation is corresponding The static resource structured file of document structure information includes:
    Search address information of the static resource file on web page server;
    The document structure information and address information are packaged into static resource structured file.
  4. 4. according to the method for claim 1, it is characterised in that methods described also includes:
    Webpage comprising the static resource compressed package is sent to Website development rear end.
  5. A kind of 5. acquisition methods of the static resource file of webpage, it is characterised in that methods described Including:
    The static resource structured file checked in static resource compressed package;
    Determine static resource file on web page server according to the static resource structured file Address;
    The static resource file is obtained at the address on web page server.
  6. 6. according to the method for claim 5, it is characterised in that described according to the static state Resource structures file determines that address of the static resource file on web page server includes:
    Document structure information and address information are parsed from the static resource structured file;
    Determined to need the static resource file operated according to the document structure information;
    The static resource file for determining to need to operate according to the address information is on web page server Address.
  7. 7. according to the method for claim 6, it is characterised in that described according to the file The static resource file that structural information determines to need to operate includes:
    The file name and file mesh of corresponding static resource file are parsed from document structure information Record information;
    Determined to need the static resource text operated according to the file name and file directory information Part.
  8. A kind of 8. compression set of the static resource file of webpage, it is characterised in that described device Including:
    Webpage acquiring unit, for obtaining webpage from web page server;
    Document structure information acquiring unit, the static resource file included for obtaining the webpage Document structure information, the document structure information includes file name and file directory information;
    Static resource structured file generation unit, for generating the corresponding document structure information Static resource structured file;
    Static resource compressed file acquiring unit, for merging, compressing the static resource file Obtain static resource compressed file;
    Static resource compressed package acquiring unit, for by the static resource compressed file and static state Resource structures Document encapsulation is into static resource compressed package.
  9. 9. device according to claim 8, it is characterised in that the document structure information Acquiring unit includes:
    Static resource file identification subelement, for identifying the static resource file in webpage;
    File name records subelement, for recording the text of the static resource file in webpage Part title;
    File directory information obtains subelement, for according to the text between the static resource file Part structure obtains file directory information;
    Document structure information obtains subelement, for by the file name and file directory information It is packaged into document structure information.
  10. 10. device according to claim 8, it is characterised in that the static resource knot Structure file generating unit includes:
    Address information searches subelement, for searching the static resource file in web page server On address information;
    Static resource structured file generates subelement, for by the document structure information and address Information encapsulation is into static resource structured file.
  11. 11. device according to claim 8, it is characterised in that described device also includes:
    Transmitting element, opened for the webpage comprising the static resource compressed package to be sent into website Send out rear end.
  12. A kind of 12. acquisition device of the static resource file of webpage, it is characterised in that the dress Put including:
    Static resource structured file retrieval unit, for checking the static state in static resource compressed package Resource structures file;
    Static resource document location determining unit, for true according to the static resource structured file Determine address of the static resource file on web page server;
    Static resource file obtaining unit, for being obtained at the address on web page server The static resource file.
  13. 13. device according to claim 12, it is characterised in that the static resource text Part position determination unit includes:
    Subelement is parsed, for parsing file structure letter from the static resource structured file Breath and address information;
    Static resource file determination subelement, for determining needs according to the document structure information The static resource file of operation;
    Position determination subelement, for being determined to need the static money operated according to the address information Address of the source file on web page server.
  14. 14. device according to claim 13, it is characterised in that the static resource text Part determination subelement includes:
    Parsing module, for parsing the text of corresponding static resource file from document structure information Part title and file directory information;
    Static resource file determining module, for according to the file name and file directory information It is determined that need the static resource file operated.
CN201610312554.4A 2016-05-11 2016-05-11 Compression method and device, the acquisition methods and device of the static resource file of webpage Pending CN107368484A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610312554.4A CN107368484A (en) 2016-05-11 2016-05-11 Compression method and device, the acquisition methods and device of the static resource file of webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610312554.4A CN107368484A (en) 2016-05-11 2016-05-11 Compression method and device, the acquisition methods and device of the static resource file of webpage

Publications (1)

Publication Number Publication Date
CN107368484A true CN107368484A (en) 2017-11-21

Family

ID=60303976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610312554.4A Pending CN107368484A (en) 2016-05-11 2016-05-11 Compression method and device, the acquisition methods and device of the static resource file of webpage

Country Status (1)

Country Link
CN (1) CN107368484A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108347479A (en) * 2018-01-26 2018-07-31 政采云有限公司 More warehouse static resource method for uploading based on content distributing network and system
CN110636111A (en) * 2019-08-22 2019-12-31 北京达佳互联信息技术有限公司 Resource packaging method and device, electronic equipment and storage medium
CN113127429A (en) * 2021-06-16 2021-07-16 北京车智赢科技有限公司 Compression processing method and system and computing equipment
CN113342400A (en) * 2021-06-29 2021-09-03 上海哔哩哔哩科技有限公司 Off-line package packing method and device and computer equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108347479A (en) * 2018-01-26 2018-07-31 政采云有限公司 More warehouse static resource method for uploading based on content distributing network and system
CN108347479B (en) * 2018-01-26 2020-12-18 政采云有限公司 Multi-warehouse static resource uploading method and system based on content distribution network
CN110636111A (en) * 2019-08-22 2019-12-31 北京达佳互联信息技术有限公司 Resource packaging method and device, electronic equipment and storage medium
CN113127429A (en) * 2021-06-16 2021-07-16 北京车智赢科技有限公司 Compression processing method and system and computing equipment
CN113342400A (en) * 2021-06-29 2021-09-03 上海哔哩哔哩科技有限公司 Off-line package packing method and device and computer equipment
CN113342400B (en) * 2021-06-29 2022-05-17 上海哔哩哔哩科技有限公司 Off-line package packing method and device and computer equipment

Similar Documents

Publication Publication Date Title
US7131062B2 (en) Systems, methods and computer program products for associating dynamically generated web page content with web site visitors
US20040030991A1 (en) Systems and methods for facilitating automatic completion of an electronic form
CN107066609A (en) Image display method and device
CN111274760A (en) Rich text data processing method and device, electronic equipment and computer storage medium
JP3623715B2 (en) Communication terminal device
CN107153716B (en) Webpage content extraction method and device
CN108021598B (en) Page extraction template matching method and device and server
US11030384B2 (en) Identification of sequential browsing operations
CN107368484A (en) Compression method and device, the acquisition methods and device of the static resource file of webpage
CN106921682A (en) File uploading method and device
CN113382083B (en) Webpage screenshot method and device
CN107908615A (en) A kind of method and apparatus for obtaining search term corresponding goods classification
CN107526755B (en) Data processing method and device
CN114817968B (en) Method, device and equipment for tracing path of featureless data and storage medium
CN113032244B (en) Interface test method, device, computer system and computer readable storage medium
CN107436843A (en) Webpage performance test methods and device
CN112765516A (en) Page content display method and device, storage medium and electronic device
US20080313291A1 (en) Method and apparatus for encoding data
CN106951495A (en) Method and apparatus for information to be presented
CN107357794A (en) Optimize the method and apparatus of the data store organisation of key value database
CN113742551A (en) Dynamic data capture method based on script and puppeteer
CN112286815A (en) Interface test script generation method and related equipment thereof
JP4405695B2 (en) Update information automatic display method, apparatus, medium, and program
CN110162301B (en) Form rendering method, form rendering device and storage medium
CN107508705B (en) Resource tree construction method of HTTP element and computing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171121