CN112632425B - Method, device, equipment and storage medium for generating offline resource file - Google Patents

Method, device, equipment and storage medium for generating offline resource file Download PDF

Info

Publication number
CN112632425B
CN112632425B CN202011455175.3A CN202011455175A CN112632425B CN 112632425 B CN112632425 B CN 112632425B CN 202011455175 A CN202011455175 A CN 202011455175A CN 112632425 B CN112632425 B CN 112632425B
Authority
CN
China
Prior art keywords
resource
path
replaced
file
page
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.)
Active
Application number
CN202011455175.3A
Other languages
Chinese (zh)
Other versions
CN112632425A (en
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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202011455175.3A priority Critical patent/CN112632425B/en
Publication of CN112632425A publication Critical patent/CN112632425A/en
Application granted granted Critical
Publication of CN112632425B publication Critical patent/CN112632425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for generating an offline resource file. The method comprises the following steps: acquiring an online resource file corresponding to the page, and analyzing the online resource file to obtain an analysis result; replacing the resource path to be replaced in the analysis result with a target resource path according to the path replacement list corresponding to the online resource file; acquiring page resources corresponding to the resource path to be replaced, and storing the page resources in a storage position corresponding to the target resource path; and generating an offline resource file based on the replaced analysis result and the page resource. According to the embodiment of the invention, the online resource file is analyzed, the resource path to be replaced in the analysis result is replaced, and the page resource corresponding to the resource path to be replaced is stored in the storage position corresponding to the target resource path, so that the problem of large workload of a developer is solved, the development difficulty of the developer is reduced, and the conversion efficiency of the resource file is improved.

Description

Method, device, equipment and storage medium for generating offline resource file
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for generating an offline resource file.
Background
In the page loading process of the existing client, the problems of slow page resource loading speed and network dependence are commonly existed. In order to improve the loading speed of the resources and reduce the network dependency, the current common technical means is to store the page resources in the local cache of the client in advance, and when the client loads the page, the page resources required by the loading are directly obtained from the local cache.
In order to realize local caching of page resources, a manifest attribute needs to be introduced into an online resource file (such as an HTML file) to define the page resources needing to be cached, so that a client can download the page resources while loading the page. Or converting the online resource file into an offline resource file by adopting a manual mode, wherein the offline resource file comprises the downloaded page resource, and sending the offline resource file to the client.
In the process of implementing the present invention, the inventor finds that at least the following technical problems exist in the prior art:
Introducing a manifest attribute into an online resource file can increase the development difficulty and workload of client developers. The manual conversion mode is easy to miss or make mistakes, the operation speed is slow and troublesome, and the efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for generating an offline resource file, which reduce development difficulty and workload of developers and improve conversion efficiency of the resource file.
In a first aspect, an embodiment of the present invention provides a method for generating an offline resource file, where the method includes:
acquiring an online resource file corresponding to a page, and analyzing the online resource file to obtain an analysis result;
replacing the resource path to be replaced in the analysis result with a target resource path according to the path replacement list corresponding to the online resource file;
acquiring page resources corresponding to the resource path to be replaced, and storing the page resources in a storage position corresponding to the target resource path;
and generating an offline resource file based on the replaced analysis result and the page resource.
In a second aspect, an embodiment of the present invention further provides an apparatus for generating an offline resource file, where the apparatus includes:
The online resource file analysis module is used for acquiring online resource files corresponding to the pages, and analyzing the online resource files to obtain analysis results;
the resource path replacement module to be replaced is used for replacing the resource path to be replaced in the analysis result into a target resource path according to the path replacement list corresponding to the online resource file;
the page resource storage module is used for acquiring page resources corresponding to the resource path to be replaced and storing the page resources in storage positions corresponding to the target resource path;
and the offline resource file generation module is used for generating an offline resource file based on the replaced analysis result and the page resource.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of generating offline resource files of any of the above-referenced.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method of generating an offline resource file according to any of the above-mentioned aspects.
The embodiments of the above invention have the following advantages or benefits:
according to the embodiment of the invention, the online resource file is analyzed, the resource path to be replaced in the analysis result is replaced, and the page resource corresponding to the resource path to be replaced is stored in the storage position corresponding to the target resource path, so that the problem that the online resource file needs to be manually converted into the offline resource file is solved, the development difficulty and the workload of a developer are reduced, and the conversion efficiency and the conversion quality of the resource file are improved.
Drawings
Fig. 1 is a flowchart of a method for generating an offline resource file according to an embodiment of the present invention.
Fig. 2 is a flowchart of a method for generating an offline resource file according to a second embodiment of the present invention.
Fig. 3 is a flowchart of a method for generating an offline resource file according to a third embodiment of the present invention.
Fig. 4 is a flowchart of a specific example of a method for generating an offline resource file according to the third embodiment of the present invention.
Fig. 5 is a schematic diagram of an offline resource file generating device according to a fourth embodiment of the present invention.
Fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a method for generating an offline resource file according to an embodiment of the present invention, where the method may be performed by an offline resource file generating device, and the device may be implemented in software and/or hardware, and the device may be configured in a terminal device. The method specifically comprises the following steps:
s110, acquiring an online resource file corresponding to the page, and analyzing the online resource file to obtain an analysis result.
The online resource file includes an online static resource file, for example. The static resource file is used for describing the file corresponding to the page resource which is not changed frequently in the front-end page. In one embodiment, the online resource file optionally includes at least one of a hyper text markup language HTML file, a cascading style sheet CSS file, and a scripting language JS file.
Among these, HTML (HyperText Markup Language ) is an identifying, fully-built markup language that includes a series of tags by which document formats can be unified, making discrete page resources connected as a logical whole. Specifically, the CSS (Cascading Style Sheets, cascading style sheet) is a computer language for representing file styles such as HTML or XML (eXtensible Markup Language, extensible markup pre-language), and the CSS not only can statically modify a web page, but also can dynamically format each element of the page in cooperation with various scripting languages. JS (javascript) is a high-level programming language with functional prioritization, either lightweight, interpreted or just-in-time.
In one embodiment, optionally, the HTML file sent by the server is obtained based on the URL (Uniform Resource Locator ) address. In one embodiment, optionally, the HTML file is parsed, and based on a resource path in the parsing result, a CSS file or a JS file sent by the server is obtained.
In one embodiment, optionally, when the online resource file comprises an HTML file, the parsing result comprises a document object model tree. The document object model (Document Object Model, DOM) is an exemplary language platform that enables programs and scripts to dynamically access and update document content, structure, and styles, and is a standard interface that describes the logical structure and functional components of a document object. The DOM tree depicts a hierarchical tree of nodes encapsulating all the content in the HTML file (tags, text, path attributes, etc.) into nodes.
In one embodiment, optionally, when the online resource file comprises a CSS file, the parsing result comprises a script object. The script object is an object compiled in JavaScript language, for example.
In one embodiment, optionally, when the online resource file comprises a JS file, the parsing result includes an abstract syntax tree. Among these, the abstract syntax tree (Abstract Syntax Tree, AST) is an abstract representation of the source code syntax structure, which represents the syntax structure of the programming language in the form of a tree, each node on the tree representing a structure in the source code.
S120, replacing the resource path to be replaced in the analysis result with the target resource path according to the path replacement list corresponding to the online resource file.
Specifically, the path replacement list records at least one resource path to be replaced and target resource paths corresponding to the resource paths to be replaced.
In one embodiment, optionally, replacing the resource path to be replaced in the obtained analysis result with the target resource path according to the path replacement list corresponding to the online resource file includes: when a conversion instruction is received, acquiring path replacement parameters in the conversion instruction; the path replacement parameters comprise a path replacement list and a preset path object; traversing the analysis result, obtaining a resource path to be replaced corresponding to the preset path object in the analysis result, and replacing the resource path to be replaced with a target resource path based on the path replacement list.
In an exemplary embodiment, the conversion instruction may be used to define a conversion rule of the online resource file, and the user may implement conversion setting of the online resource file by inputting the conversion instruction including the path replacement parameter. Specifically, the preset path object is used for representing a path object containing a resource path in the analysis result.
In one embodiment, optionally, when the online resource file includes an HTML file, the preset path object includes a preset tag node, wherein the preset tag node includes at least one of a script node, a link node, and an image node. Specifically, the preset tag node is a node in the DOM tree, and the script node, the link node and the image node are nodes corresponding to a script (script) tag, a link (link) tag and an image (img) tag in the HTML file respectively. Specifically, the path attribute corresponding to the preset label node is read to obtain the path of the resource to be replaced.
In one embodiment, optionally, when the online resource file includes a CSS file, the preset path object includes a preset field, wherein the preset field includes at least one of a background (background) field, a background-image field, a content (content) field, and a font (font) field. Specifically, the preset field is a field containing a resource path in the script object, and the path attribute corresponding to the preset field is read to obtain the resource path to be replaced.
S130, acquiring the page resource corresponding to the resource path to be replaced, and storing the page resource in a storage position corresponding to the target resource path.
In one embodiment, optionally, obtaining a page resource corresponding to the resource path to be replaced includes: if the path type of the resource path to be replaced belongs to the network resource path, accessing the server based on the resource path to be replaced, and receiving page resources sent by the server; and if the path type of the resource path to be replaced belongs to the offline resource path, acquiring the page resource corresponding to the resource path to be replaced from the online resource file.
The exemplary method includes that if a resource path to be replaced starts with 'http/https', the path type of the resource path to be replaced is a network resource path, and correspondingly, if the resource path to be replaced does not start with 'http/https', the path type of the resource path to be replaced is an offline resource path.
On the basis of the above embodiment, optionally, if the path type of the current resource path to be replaced belongs to the offline resource path, the current resource path to be replaced is reserved. Specifically, if the path type of the current to-be-replaced resource path belongs to the offline resource path, it is indicated that the page resource corresponding to the current to-be-replaced resource path already exists in the online resource file, that is, the page resource belongs to the offline resource, so that the current to-be-replaced resource path in the analysis result is reserved, and the replacing operation of the current to-be-replaced resource path is skipped.
And S140, generating an offline resource file based on the analysis result after replacement and the page resource.
Specifically, the analysis result after replacement is an analysis result containing the target resource path, and the page resources comprise page resources sent by the server side and/or page resources in the online resource file. The converted online resource file is obtained based on the analysis result after replacement, for example. Specifically, the offline resource file includes the above-mentioned page resources and the converted online resource file.
According to the technical scheme, the online resource file is analyzed, the resource path to be replaced in the analysis result is replaced, the page resource corresponding to the resource path to be replaced is stored in the storage position corresponding to the target resource path, the problem that the online resource file needs to be manually converted into the offline resource file is solved, development difficulty and workload of developers are reduced, and meanwhile conversion efficiency and conversion quality of the resource file are improved.
Example two
Fig. 2 is a flowchart of a method for generating an offline resource file according to a second embodiment of the present invention, and the technical solution of this embodiment is further refinement based on the foregoing embodiment. Optionally, when the online resource file includes a JS file, the parsing result includes an abstract syntax tree, the preset path object includes a preset category, and the path replacement parameter in the conversion instruction further includes a preset resource path set; correspondingly, the obtaining the resource path to be replaced corresponding to the preset path object in the analysis result includes: acquiring at least one target character string corresponding to the preset category in the abstract syntax tree; the preset category comprises an identifier category and/or a character string literal constant category; and respectively matching each target character string with the path character strings in the preset resource path set, and taking the successfully matched target character strings as the resource paths to be replaced.
The specific implementation steps of the embodiment include:
s210, acquiring an online resource file corresponding to the page, and analyzing the online resource file to obtain an analysis result.
In this embodiment, the online resource file includes a JS file, and the parsing result includes an abstract syntax tree.
S220, when a conversion instruction is received, acquiring a path replacement parameter in the conversion instruction.
In this embodiment, the path replacement parameters include a path replacement list, a preset path object, and a preset resource path set. The preset path object comprises a preset category. Specifically, the preset resource path set includes at least one resource path to be replaced, and the resource path to be replaced is represented in a character string form.
S230, traversing the abstract syntax tree, obtaining at least one target character string corresponding to a preset category in the abstract syntax tree, respectively matching each target character string with a path character string in a preset resource path set, and taking the successfully matched target character string as a resource path to be replaced.
In this embodiment, the preset categories include an identifier category (identifier) and/or a string literal constant category (string real).
Specifically, character string identification is performed on at least one grammar node in a preset category to obtain at least one target character string corresponding to the preset category. The path character string is a character string corresponding to the resource path to be replaced in the preset resource path set.
In one embodiment, optionally, the path replacement parameter further includes a string concatenation parameter; correspondingly, taking the successfully matched target character string as a resource path to be replaced comprises the following steps: if the target splicing parameters corresponding to at least two successfully matched target character strings exist in the character string splicing parameters, splicing the successfully matched target character strings according to the target splicing parameters, and taking the spliced character strings as a resource path to be replaced.
The character string splicing parameters specifically comprise at least one splicing parameter, and each splicing parameter can respectively comprise at least two character strings for splicing, a splicing connector and a splicing relation. For example, the concatenation parameters include string a, string B, and concatenation connector "&", the concatenation relationship is [ string a string B ], assuming string a is "http:// abc. Com/s", and string B is "rsv _bp=1". If the two successfully matched target character strings are respectively the same as the character string A and the character string B in the splicing parameters, the splicing parameters are used as target splicing parameters, and the two target character strings are spliced according to splicing connectors and splicing relations in the target splicing parameters, so that a spliced resource path to be replaced is' http:// abc. The splice parameters are only exemplified here and are not particularly limited.
The advantage of this is that, because the resource path to be replaced may be spliced by a plurality of character strings, the character string identification method can only identify the target character strings in the resource path to be replaced, so that at least two target character strings which are successfully matched may correspond to the same resource path to be replaced. According to the embodiment, the character string splicing parameters are input, and the target character string is matched with the splicing parameters, so that the spliced resource path to be replaced can be accurately replaced, and subsequent logic abnormality caused by error replacement is avoided.
S240, replacing the resource path to be replaced with the target resource path based on the path replacement list.
S250, acquiring the page resource corresponding to the resource path to be replaced, and storing the page resource in a storage position corresponding to the target resource path.
On the basis of the foregoing embodiment, optionally, before acquiring the page resource corresponding to the resource path to be replaced, the method further includes: when the online resource file contains resource files corresponding to at least two pages respectively, determining whether page resources corresponding to the resource paths to be replaced exist in the storage unit or not based on the resource storage catalogue corresponding to the target resource paths; and if the page resources corresponding to the resource path to be replaced do not exist in the storage unit, triggering and executing the operation of acquiring the page resources corresponding to the resource path to be replaced.
The online resource file includes a resource file corresponding to the page a and a resource file corresponding to the page B, and specifically, the resource file corresponding to the page a and the resource file corresponding to the page B each include at least one of an HTML file, a CSS file, and a JS file. In one embodiment, optionally, the path replacement parameter further includes a file type of the online resource file, and the online resource file is acquired based on the file type of the online resource file. In an exemplary embodiment, when the file type of the online resource file is an HTML file, the online resource file includes HTML files corresponding to at least one page, respectively.
The resource storage directory may be used to represent a target resource path corresponding to the acquired page resource in the storage unit, and specifically, the acquired page resource is stored in a storage location corresponding to the target resource path in the storage unit. In one embodiment, optionally, a resource storage directory is generated based on the target resource path in the path replacement list. In another embodiment, optionally, a resource storage directory is generated based on the alternate target resource path. Specifically, after the resource path to be replaced is replaced by the target resource path or after the page resource is stored in the storage path corresponding to the target resource path, the target resource path is added into the resource storage directory.
Specifically, if the page resource corresponding to the resource path to be replaced does not exist in the storage unit, the page resource corresponding to the resource path to be replaced is acquired, and the page resource is stored in a storage position corresponding to the target resource path in the storage unit. And if the page resources corresponding to the resource path to be replaced exist in the storage unit, skipping the operation of acquiring the page resources corresponding to the resource path to be replaced.
The method has the advantages that the repeated acquisition operation of the resources on the same page is avoided aiming at the same online resource file, so that the conversion efficiency of the resource file is improved, and the resource occupation of a storage unit is reduced.
And S260, generating an offline resource file based on the analysis result after replacement and the page resource.
Since most of the references in the HTML file are public JS files, it is relatively difficult to identify the resource paths in the JS files under the influence of the compiling logic of the JS files themselves. According to the technical scheme, the JS file is analyzed into the abstract syntax tree, the obtained target character string in the abstract syntax tree is matched with the path character string in the preset resource path set, and the successfully matched target character string is used as a resource path to be replaced, so that the problem of difficulty in identifying the resource path in the JS file is solved, the purpose of converting the online JS file into the offline JS file is achieved, more page resources are ensured to be stored in a local storage unit, and the loading rate of a client side in page rendering based on the offline resource file is further improved.
Example III
Fig. 3 is a flowchart of a method for generating an offline resource file according to a third embodiment of the present invention, where the technical solution of this embodiment is further refinement on the basis of the foregoing embodiment. Optionally, the path replacement parameter further includes a non-replacement resource type; correspondingly, the replacing the resource path to be replaced in the analysis result with the target resource path according to the path replacement list corresponding to the online resource file includes: matching the resource type of the current resource path to be replaced in the analysis result with the non-replacement resource type; and if the matching is unsuccessful, replacing the current resource path to be replaced with a corresponding target resource path based on the path replacement list.
The specific implementation steps of the embodiment include:
s310, acquiring an online resource file corresponding to the page, and analyzing the online resource file to obtain an analysis result.
S320, analyzing whether the resource type of the current resource path to be replaced is matched with the non-replacement resource type, if so, executing S330, and if not, executing S350.
Specifically, according to the page resource corresponding to the current resource path to be replaced, determining the resource type to which the current resource path to be replaced belongs. For example, if the page resource corresponding to the current resource to be replaced path is a picture, the resource type to which the current resource to be replaced path belongs is a picture type. If the page resource corresponding to the current resource path to be replaced is a JS file, the resource type to which the current resource path to be replaced belongs is a JS type.
Specifically, the non-replacement resource type may be used to filter the resource paths that do not need to be replaced with the target resource path in the resource paths to be replaced. For example, the non-replacement resource type may be a picture type or a JS type. The non-substitution type is not particularly limited herein.
Wherein, in particular, the non-replacement resource type may be used to filter online resource files that do not require parsing and path replacement operations to be performed. On the basis of the above embodiment, optionally, when the online resource file includes an HTML file, the resource type to which the current resource path to be replaced belongs is a CSS type or a JS type, if matching between the resource type to which the current resource path to be replaced belongs and the non-replacement resource type is unsuccessful, the CSS file or the JS file corresponding to the current resource path to be replaced is obtained, and based on the CSS file or the JS file, the parsing and the path replacing operations are performed. Specifically, the path attribute corresponding to the link node in the DOM tree includes a resource path corresponding to the CSS file or the JS file. The unsuccessful matching of the resource type to which the current resource path to be replaced belongs with the non-replacement resource type indicates that analysis and path replacement operations need to be executed on the CSS file or the JS file corresponding to the resource path of the CSS type or the JS type respectively.
S330, replacing the current resource path to be replaced with the target resource path based on the path replacement list.
S340, acquiring the page resource corresponding to the current resource path to be replaced, storing the page resource in a storage position corresponding to the target resource path, and executing S360.
S350, reserving a current resource path to be replaced in the analysis result.
Specifically, if the resource type of the current to-be-replaced resource path in the analysis result is successfully matched with the non-replacement resource type, it is indicated that the replacement operation is not required for the current to-be-replaced resource path in the analysis result.
S360, judging whether a resource path to be replaced which is not matched with the non-replacement resource type exists, if so, executing S370, and if not, executing S380.
Specifically, the resource type of each to-be-replaced resource path in the analysis result is matched with the non-replacement resource type respectively, and if no to-be-replaced resource path which is not matched with the non-replacement resource type exists, the current to-be-replaced resource path is the last to-be-replaced resource path which is matched with the non-replacement resource type in the obtained analysis result.
And S370, taking the unmatched resource paths to be replaced as current resource paths to be replaced, and executing S320.
Wherein, specifically, the unmatched resource paths to be replaced include resource paths to be replaced that do not match the non-replacement resource types. For example, when there are at least two unmatched resource paths to be replaced, optionally one unmatched resource path to be replaced is used as the current resource path to be replaced, or the current resource path to be replaced is determined according to the acquisition sequence corresponding to the unmatched resource paths to be replaced. The order in which the current resource paths to be replaced are determined is not limited herein.
S380, generating an offline resource file based on the analysis result after replacement and the page resource.
On the basis of the above embodiment, optionally, the method further includes: generating a path update list based on the resource path to be replaced, and displaying the path update list; the path update list comprises at least one of a target resource path corresponding to the resource path to be replaced, a download state of the page resource corresponding to the resource path to be replaced and a replacement state of the resource path to be replaced.
The download status may be, for example, downloading, downloaded, failed download, or not downloaded, among others. In one embodiment, optionally, the path update list further includes feedback information corresponding to the download failure status and/or the no download status. The feedback information corresponding to the download failure state may be "the server does not send" or "the server is not successfully connected", and the feedback information corresponding to the non-download state may be "belongs to the repeated download resource".
The replacement status may be replaced, failed replacement, or not replaced, among others, by way of example. In one embodiment, optionally, the path update list further includes feedback information corresponding to the replacement failure state and/or the non-replacement state. The feedback information corresponding to the replacement failure state may be "the corresponding target resource path is not found in the path replacement list", and the feedback information corresponding to the non-replacement state may be "the non-replacement resource type".
The method has the advantages that a user can conveniently check the conversion result of the online resource file, so that the obtained offline resource file can be corrected or a conversion tool can be adjusted in time.
On the basis of the above embodiment, optionally, the method further includes: and generating a check page based on the offline resource file, and displaying the check page on the client. Specifically, an HTTP service is started, and a verification page is displayed on a client. The method has the advantages that the obtained offline resource file is displayed to the user in the form of the check page, so that the user can directly check the conversion effect of the offline resource file, and the check process is simpler and more visual.
On the basis of the above embodiment, optionally, the method further includes: and uploading the offline resource file to the server so that the client downloads the offline resource file from the server and performs rendering display of the page based on the offline resource file. The offline resource file is packaged and uploaded to the server side, for example. The offline resource file provided by the embodiment contains all static resources used for page rendering, so that when the client performs page rendering, the client does not need to acquire required page resources from the server, and only needs to acquire the offline resource file from the local storage unit to perform page rendering display, thereby improving the acquisition rate of the resource file and the subsequent rendering efficiency, and further ensuring the loading rate of the client during page rendering.
Fig. 4 is a flowchart of a specific example of a method for generating an offline resource file according to the third embodiment of the present invention. Specifically, a scaffold tool is globally installed in the terminal device, and in this embodiment, the scaffold tool is a conversion tool that converts an online resource file into an offline resource file. H5 packages are obtained, where HTML5 is the standard for the fifth generation of HTML and H5 is the page implemented based on HTML 5. And decompressing the H5 coil to a certain directory, wherein the H5 coil is compressed with an online resource file, and executing a conversion command under the directory, and the conversion command comprises path replacement parameters in the embodiment.
In particular, the path replacement parameter includes a non-replacement resource type. And acquiring an HTML file in the online resource file, and analyzing the HTML file to obtain js, css, img and a font resource path in an analysis result, wherein js and css resource paths are acquired from a link node in the analysis result. And matching the obtained resource type of the resource path with the non-replacement resource type, if the matching is successful, not analyzing the resource path, skipping the resource path, and if the matching is unsuccessful, analyzing the resource path, and replacing the resource path with the target resource path. Specifically, if the JS or CSS resource path is successfully matched with the non-replacement resource type, the obtained JS file or CSS file is parsed, and if the JS or CSS resource path is successfully matched with the non-replacement resource type, the JS file or CSS file is skipped.
Analyzing the CSS file to obtain img and a font resource path in an analysis result, matching the acquired resource type of the resource path with a non-replacement resource type, if the matching is successful, not analyzing the resource path, skipping the resource path, if the matching is unsuccessful, analyzing the resource path, and replacing the resource path with a target resource path. Analyzing the JS file to obtain img and JS reference resources in an analysis result, matching the resource type of the obtained resource path with a non-replacement resource type, if the matching is successful, not analyzing the resource path, skipping the resource path, if the matching is unsuccessful, analyzing the resource path, and replacing the resource path with a target resource path.
And generating a path update list after completing the replacement of all the resource paths based on the path replacement parameters in the conversion instruction, or recording the path update list after completing the replacement of each resource path. And generating a check page based on the finally generated offline resource file, and starting the HTPP service to display a processing result on the client, wherein the processing result comprises the check page and/or a path update list.
According to the technical scheme, the to-be-replaced resource path is matched with the non-replacement resource type in the path replacement parameters, the to-be-replaced resource path is filtered based on the non-replacement resource type, the problem of consistency of the path replacement parameters of different online resource files is solved, personalized configuration of conversion of different resource files is achieved, and subsequent logic abnormality caused by error replacement is avoided.
Example IV
Fig. 5 is a schematic diagram of an offline resource file generating device according to a fourth embodiment of the present invention. The embodiment can be applied to the situation of converting an online resource file into an offline resource file, the device can be realized in a software and/or hardware mode, and the device can be configured in terminal equipment. The device for generating the offline resource file comprises the following steps: an online resource file parsing module 410, a to-be-replaced resource path replacement module 420, a page resource saving module 430, and an offline resource file generating module 440.
The online resource file analysis module 410 is configured to obtain an online resource file corresponding to the page, and analyze the online resource file to obtain an analysis result;
the resource path to be replaced replacing module 420 is configured to replace a resource path to be replaced in the analysis result with a target resource path according to a path replacement list corresponding to the online resource file;
the page resource saving module 430 is configured to acquire a page resource corresponding to a resource path to be replaced, and save the page resource in a storage location corresponding to a target resource path;
the offline resource file generating module 440 is configured to generate an offline resource file based on the replaced parsing result and the page resource.
According to the technical scheme, the online resource file is analyzed, the resource path to be replaced in the analysis result is replaced, the page resource corresponding to the resource path to be replaced is stored in the storage position corresponding to the target resource path, the problem that the online resource file needs to be manually converted into the offline resource file is solved, development difficulty and workload of developers are reduced, and meanwhile conversion efficiency and conversion quality of the resource file are improved.
Based on the above technical solution, optionally, the to-be-replaced resource path replacing module 420 includes:
the path replacement parameter acquisition unit is used for acquiring path replacement parameters in the conversion instruction when the conversion instruction is received; the path replacement parameters comprise a path replacement list and a preset path object;
the resource path to be replaced replacing unit is used for traversing the analysis result, obtaining a resource path to be replaced corresponding to the preset path object in the analysis result, and replacing the resource path to be replaced with the target resource path based on the path replacing list.
On the basis of the technical scheme, the online resource file optionally comprises at least one of a Hyper Text Markup Language (HTML) file, a Cascading Style Sheet (CSS) file and a scripting language (JS) file.
On the basis of the technical scheme, optionally, when the online resource file comprises an HTML file, the analysis result comprises a document object model tree, and the preset path object comprises a preset tag node, wherein the preset tag node comprises at least one of a script node, a link node and an image node.
On the basis of the above technical solution, optionally, when the online resource file includes a CSS file, the analysis result includes a script object, and the preset path object includes a preset field, where the preset field includes at least one of a background field, a background picture field, a directory field, and a font field.
On the basis of the technical scheme, optionally, when the online resource file comprises a JS file, the analysis result comprises an abstract syntax tree, the preset path object comprises a preset category, and the path replacement parameter in the conversion instruction further comprises a preset resource path set;
a resource path replacement unit to be replaced, comprising:
the target character string acquisition subunit is used for acquiring at least one target character string corresponding to a preset category in the abstract syntax tree; the preset categories comprise identifier categories and/or character string literal constant categories;
and the resource path to be replaced determining unit is used for respectively matching each target character string with the path character strings in the preset resource path set, and taking the successfully matched target character strings as the resource path to be replaced.
On the basis of the technical scheme, optionally, the path replacement parameters further comprise character string splicing parameters; the to-be-replaced resource path determining unit is specifically configured to:
if the target splicing parameters corresponding to at least two successfully matched target character strings exist in the character string splicing parameters, splicing the successfully matched target character strings according to the target splicing parameters, and taking the spliced character strings as a resource path to be replaced.
On the basis of the technical scheme, optionally, the path replacement parameter further comprises a non-replacement resource type;
based on the above technical solution, optionally, the resource path replacement module to be replaced 420 is specifically configured to:
matching the resource type of the current resource path to be replaced with the non-replacement resource type in the analysis result; and if the matching is unsuccessful, replacing the current resource path to be replaced with the corresponding target resource path based on the path replacement list.
On the basis of the above technical solution, optionally, the apparatus further includes:
the page resource storage determining module is used for determining whether page resources corresponding to the resource path to be replaced exist in the storage unit or not based on the resource storage catalogue corresponding to the target resource path when the online resource file contains the resource files corresponding to at least two pages respectively;
the page resource acquisition triggering module is used for triggering and executing the operation of acquiring the page resource corresponding to the resource path to be replaced if the page resource corresponding to the resource path to be replaced does not exist in the storage unit.
Based on the above technical solution, optionally, the page resource saving module 430 is specifically configured to:
If the path type of the resource path to be replaced belongs to the network resource path, accessing the server based on the resource path to be replaced, and receiving page resources sent by the server;
and if the path type of the resource path to be replaced belongs to the offline resource path, acquiring the page resource corresponding to the resource path to be replaced from the online resource file.
On the basis of the above technical solution, optionally, the apparatus further includes:
the path update list generation module is used for generating a path update list based on the resource path to be replaced and displaying the path update list; the path update list comprises at least one of a target resource path corresponding to the resource path to be replaced, a download state of the page resource corresponding to the resource path to be replaced and a replacement state of the resource path to be replaced.
On the basis of the above technical solution, optionally, the apparatus further includes:
and the verification page generation module is used for generating a verification page based on the offline resource file and displaying the verification page on the client.
On the basis of the above technical solution, optionally, the apparatus further includes:
and the offline resource file uploading module is used for uploading the offline resource file to the server so that the client downloads the offline resource file from the server and performs rendering display of the page based on the offline resource file.
The device for generating the offline resource file provided by the embodiment of the invention can be used for executing the method for generating the offline resource file provided by the embodiment of the invention, and has the corresponding functions and beneficial effects of the executing method.
It should be noted that, in the embodiment of the offline resource file generating apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Example five
Fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention, where the embodiment of the present invention provides services for implementing the method for generating an offline resource file according to the foregoing embodiment of the present invention, and the device for generating an offline resource file according to the foregoing embodiment of the present invention may be configured. Fig. 6 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 6 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 6, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown in fig. 6, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the offline resource file generation method provided by the embodiment of the present invention.
Through the electronic equipment, the problem that online resource files are required to be manually converted into offline resource files is solved, development difficulty and workload of developers are reduced, and meanwhile conversion efficiency and conversion quality of the resource files are improved.
Example six
The sixth embodiment of the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for generating an offline resource file, the method comprising:
acquiring an online resource file corresponding to the page, and analyzing the online resource file to obtain an analysis result;
replacing the resource path to be replaced in the analysis result with a target resource path according to the path replacement list corresponding to the online resource file;
acquiring page resources corresponding to the resource path to be replaced, and storing the page resources in a storage position corresponding to the target resource path;
and generating an offline resource file based on the replaced analysis result and the page resource.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the above method operations, and may also perform the related operations in the method for generating an offline resource file provided in any embodiment of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (15)

1. A method for generating an offline resource file, comprising:
acquiring an online resource file corresponding to a page, and analyzing the online resource file to obtain an analysis result;
replacing the resource path to be replaced in the analysis result with a target resource path according to the path replacement list corresponding to the online resource file;
acquiring page resources corresponding to the resource path to be replaced, and storing the page resources in a storage position corresponding to the target resource path;
Generating an offline resource file based on the replaced analysis result and the page resource;
the replacing the resource path to be replaced in the obtained analysis result with the target resource path according to the path replacement list corresponding to the online resource file comprises the following steps:
when a conversion instruction is received, acquiring path replacement parameters in the conversion instruction; the path replacement parameters comprise a path replacement list and a preset path object;
traversing the analysis result, obtaining a resource path to be replaced corresponding to the preset path object in the analysis result, and replacing the resource path to be replaced with a target resource path based on the path replacement list;
and the path replacement list records at least one resource path to be replaced and target resource paths corresponding to the resource paths to be replaced respectively.
2. The method of claim 1, wherein the online resource file comprises at least one of a hyper text markup language HTML file, a cascading style sheet CSS file, and a scripting language JS file.
3. The method of claim 2, wherein when the online resource file comprises an HTML file, the parsing result comprises a document object model tree, and the preset path object comprises a preset tag node, wherein the preset tag node comprises at least one of a script node, a link node, and an image node.
4. The method of claim 2, wherein when the online resource file comprises a CSS file, the parsing result comprises a script object, and the preset path object comprises a preset field, wherein the preset field comprises at least one of a background field, a background picture field, a directory field, and a font field.
5. The method of claim 2, wherein when the online resource file comprises a JS file, the parsing result comprises an abstract syntax tree, the preset path object comprises a preset category, and the path replacement parameter in the conversion instruction further comprises a preset resource path set;
correspondingly, the obtaining the resource path to be replaced corresponding to the preset path object in the analysis result includes:
acquiring at least one target character string corresponding to the preset category in the abstract syntax tree; the preset category comprises an identifier category and/or a character string literal constant category;
and respectively matching each target character string with the path character strings in the preset resource path set, and taking the successfully matched target character strings as the resource paths to be replaced.
6. The method of claim 5, wherein the path replacement parameters further comprise string concatenation parameters;
correspondingly, the step of taking the successfully matched target character string as the resource path to be replaced comprises the following steps:
if the target splicing parameters corresponding to at least two successfully matched target strings exist in the string splicing parameters, splicing the successfully matched target strings according to the target splicing parameters, and taking the spliced strings as a resource path to be replaced.
7. The method according to any of claims 1-6, wherein the path replacement parameters further comprise a non-replacement resource type;
correspondingly, the replacing the resource path to be replaced in the analysis result with the target resource path according to the path replacement list corresponding to the online resource file includes:
matching the resource type of the current resource path to be replaced in the analysis result with the non-replacement resource type;
and if the matching is unsuccessful, replacing the current resource path to be replaced with a corresponding target resource path based on the path replacement list.
8. The method of any of claims 1-6, wherein prior to acquiring the page resources corresponding to the resource path to be replaced, the method further comprises:
When the online resource file contains resource files corresponding to at least two pages respectively, determining whether page resources corresponding to the resource path to be replaced exist in a storage unit or not based on a resource storage catalog corresponding to the target resource path;
and if the page resources corresponding to the resource path to be replaced do not exist in the storage unit, triggering and executing the operation of acquiring the page resources corresponding to the resource path to be replaced.
9. The method according to any one of claims 1-6, wherein the obtaining a page resource corresponding to the resource path to be replaced comprises:
if the path type of the resource path to be replaced belongs to a network resource path, accessing a server based on the resource path to be replaced, and receiving page resources sent by the server;
and if the path type of the resource path to be replaced belongs to an offline resource path, acquiring page resources corresponding to the resource path to be replaced from the online resource file.
10. The method of any of claims 1-6, wherein after generating an offline resource file based on the replaced resolution result and the page resources, the method further comprises:
Generating a path update list based on a resource path to be replaced, and displaying the path update list; the path update list comprises at least one of a target resource path corresponding to the resource path to be replaced, a download state of a page resource corresponding to the resource path to be replaced and a replacement state of the resource path to be replaced.
11. The method of any of claims 1-6, wherein after generating an offline resource file based on the replaced resolution result and the page resources, the method further comprises:
and generating a check page based on the offline resource file, and displaying the check page on the client.
12. The method according to any one of claims 1-6, further comprising:
uploading the offline resource file to a server, so that a client downloads the offline resource file from the server, and rendering and displaying pages based on the offline resource file.
13. An offline resource file generating device, comprising:
the online resource file analysis module is used for acquiring online resource files corresponding to the pages, and analyzing the online resource files to obtain analysis results;
The resource path replacement module to be replaced is used for replacing the resource path to be replaced in the analysis result into a target resource path according to the path replacement list corresponding to the online resource file;
the page resource storage module is used for acquiring page resources corresponding to the resource path to be replaced and storing the page resources in storage positions corresponding to the target resource path;
the offline resource file generation module is used for generating an offline resource file based on the replaced analysis result and the page resource;
the resource path replacement module to be replaced comprises:
a path replacement parameter obtaining unit, configured to obtain a path replacement parameter in a conversion instruction when the conversion instruction is received; the path replacement parameters comprise a path replacement list and a preset path object;
the resource path to be replaced replacing unit is used for traversing the analysis result, acquiring a resource path to be replaced corresponding to the preset path object in the analysis result, and replacing the resource path to be replaced with a target resource path based on the path replacing list;
and the path replacement list records at least one resource path to be replaced and target resource paths corresponding to the resource paths to be replaced respectively.
14. An electronic device, the electronic device comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of generating offline resource files of any of claims 1-12.
15. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the method of generating an offline resource file according to any of claims 1-12.
CN202011455175.3A 2020-12-10 2020-12-10 Method, device, equipment and storage medium for generating offline resource file Active CN112632425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011455175.3A CN112632425B (en) 2020-12-10 2020-12-10 Method, device, equipment and storage medium for generating offline resource file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011455175.3A CN112632425B (en) 2020-12-10 2020-12-10 Method, device, equipment and storage medium for generating offline resource file

Publications (2)

Publication Number Publication Date
CN112632425A CN112632425A (en) 2021-04-09
CN112632425B true CN112632425B (en) 2024-02-06

Family

ID=75310089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011455175.3A Active CN112632425B (en) 2020-12-10 2020-12-10 Method, device, equipment and storage medium for generating offline resource file

Country Status (1)

Country Link
CN (1) CN112632425B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342400B (en) * 2021-06-29 2022-05-17 上海哔哩哔哩科技有限公司 Off-line package packing method and device and computer equipment
CN117454847B (en) * 2023-12-26 2024-03-15 南京翼辉信息技术有限公司 Method for converting online document into offline document

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7096417B1 (en) * 1999-10-22 2006-08-22 International Business Machines Corporation System, method and computer program product for publishing interactive web content as a statically linked web hierarchy
US8832275B1 (en) * 2012-03-30 2014-09-09 Google Inc. Offline web browser
CN106354877A (en) * 2016-09-27 2017-01-25 北京奇虎科技有限公司 Off-line browsing method and device for webpage
CN106681788A (en) * 2017-02-17 2017-05-17 北京金山安全软件有限公司 Method and device for reducing application installation packages and electronic equipment
CN107479868A (en) * 2017-06-23 2017-12-15 阿里巴巴集团控股有限公司 A kind of interface loading method, device and equipment
CN108153778A (en) * 2016-12-05 2018-06-12 腾讯科技(深圳)有限公司 Webpage store method, webpage read method and device
CN108228818A (en) * 2017-12-29 2018-06-29 网易(杭州)网络有限公司 Web page resources loading method and device, electronic equipment and storage medium
CN108287839A (en) * 2017-01-09 2018-07-17 阿里巴巴集团控股有限公司 A kind of page loading method and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9361395B2 (en) * 2011-01-13 2016-06-07 Google Inc. System and method for providing offline access in a hosted document service
US10754825B2 (en) * 2013-08-28 2020-08-25 Red Hat, Inc. Path resolver for client access to distributed file systems

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7096417B1 (en) * 1999-10-22 2006-08-22 International Business Machines Corporation System, method and computer program product for publishing interactive web content as a statically linked web hierarchy
US8832275B1 (en) * 2012-03-30 2014-09-09 Google Inc. Offline web browser
CN106354877A (en) * 2016-09-27 2017-01-25 北京奇虎科技有限公司 Off-line browsing method and device for webpage
CN108153778A (en) * 2016-12-05 2018-06-12 腾讯科技(深圳)有限公司 Webpage store method, webpage read method and device
CN108287839A (en) * 2017-01-09 2018-07-17 阿里巴巴集团控股有限公司 A kind of page loading method and equipment
CN106681788A (en) * 2017-02-17 2017-05-17 北京金山安全软件有限公司 Method and device for reducing application installation packages and electronic equipment
CN107479868A (en) * 2017-06-23 2017-12-15 阿里巴巴集团控股有限公司 A kind of interface loading method, device and equipment
CN108228818A (en) * 2017-12-29 2018-06-29 网易(杭州)网络有限公司 Web page resources loading method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112632425A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN111274760B (en) Rich text data processing method and device, electronic equipment and computer storage medium
US7870482B2 (en) Web browser extension for simplified utilization of web services
CN111680253B (en) Page application data packet generation method and device, computer equipment and storage medium
CN109814866B (en) Processing method and device for converting page application into native application
CN113158101B (en) Visual page rendering method, device, equipment and storage medium
US9460224B2 (en) Selection mapping between fetched files and source files
CN106294493B (en) Method and device for realizing document format conversion
CN110333863A (en) A kind of method and device for generating, showing the small routine page
CN112632425B (en) Method, device, equipment and storage medium for generating offline resource file
CN113126990B (en) Page development method, device, equipment and storage medium
CN112905179A (en) Mobile terminal H5 page generation method and device, electronic equipment and storage medium
CN112765516A (en) Page content display method and device, storage medium and electronic device
CN111740948A (en) Data packet issuing method, dynamic updating method, device, equipment and medium
CN112463256A (en) Method, system, electronic device and storage medium for determining configuration file
CN113419729A (en) Front-end page building method, device, equipment and storage medium based on modularization
CN112306594A (en) Rendering method and device based on mobile terminal and storage medium
CN113836469A (en) Website front-end development method and equipment
CN110716804A (en) Method and device for automatically deleting useless resources, storage medium and electronic equipment
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN113721910A (en) Interface code generation method and device, electronic equipment and computer readable medium
JP2009031960A (en) Technology for relaying communication between client device and server device
CN113761412A (en) Application page display method and device, electronic equipment, medium and application system
CN110717134A (en) Product description issuing method and device, storage medium and electronic equipment
CN114238831A (en) HTML code fragment processing method, system, electronic equipment and storage medium
CN114285774A (en) Flow recording method and device, electronic equipment and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

GR01 Patent grant
GR01 Patent grant