CN110990732A - Loading method, device and equipment based on webpage and storage medium - Google Patents

Loading method, device and equipment based on webpage and storage medium Download PDF

Info

Publication number
CN110990732A
CN110990732A CN201910985629.9A CN201910985629A CN110990732A CN 110990732 A CN110990732 A CN 110990732A CN 201910985629 A CN201910985629 A CN 201910985629A CN 110990732 A CN110990732 A CN 110990732A
Authority
CN
China
Prior art keywords
information
loaded
file
resource
target
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
CN201910985629.9A
Other languages
Chinese (zh)
Inventor
曾锐
张喜锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Ping An International Smart City 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN201910985629.9A priority Critical patent/CN110990732A/en
Publication of CN110990732A publication Critical patent/CN110990732A/en
Pending legal-status Critical Current

Links

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a loading method, a device, equipment and a storage medium based on a webpage, which relate to data processing, wherein the method comprises the following steps: acquiring a webpage access request of a user, and determining a current webpage to be accessed according to the webpage access request; searching a resource file to be loaded corresponding to the current webpage; extracting a static resource identifier in the resource file to be loaded, and acquiring corresponding static resource information to be loaded according to the static resource identifier; screening the static resource information to be loaded to obtain target static resource information; judging the type information of the target static resource information; and inserting the target static resource information into the resource file to be loaded according to the type information, and loading the current webpage through the inserted resource file to be loaded. According to the invention, the page can be loaded by directly loading the resource file to be loaded, and the overall page loading speed is improved.

Description

Loading method, device and equipment based on webpage and storage medium
Technical Field
The invention relates to the technical field of computer processing, in particular to a loading method, a loading device, loading equipment and a storage medium based on a webpage.
Background
Currently, the mainstream web page and resource management method is to store static resources related to the web page, such as Javascript files, Cascading Style Sheets (CSS) files, and picture resources separately, and refer to the required static resources in a hypertext Markup Language (HTML) file. If a large number of small files exist in the referenced resource file, such as Javascript files and CSS files of several lines of codes, or pictures within 10KB, the overall loading performance of the web page is affected, because the number of requests for static resources requested by the browser at the same time is limited, loading of most files is queued, and it is necessary to wait for completion of other loading tasks before starting a loading request, so that the loading speed of the web page is slow.
Disclosure of Invention
The invention mainly aims to provide a loading method, a loading device, loading equipment and a storage medium based on a webpage, and aims to solve the technical problem of too low webpage loading speed.
In order to achieve the above object, the present invention provides a loading method based on a web page, which comprises the following steps:
acquiring a webpage access request of a user, and determining a current webpage to be accessed according to the webpage access request;
searching a resource file to be loaded corresponding to the current webpage;
extracting a static resource identifier in the resource file to be loaded, and acquiring corresponding static resource information to be loaded according to the static resource identifier;
screening the static resource information to be loaded to obtain target static resource information;
judging the type information of the target static resource information;
and inserting the target static resource information into the resource file to be loaded according to the type information, and loading the current webpage through the inserted resource file to be loaded.
Preferably, the searching for the resource file to be loaded corresponding to the current webpage includes:
acquiring entry information of the current webpage, and extracting a hypertext markup language file in the entry information;
and generating a resource file to be loaded according to the hypertext markup language file.
Preferably, the generating a resource file to be loaded according to the hypertext markup language file includes:
creating an analyzer, and analyzing the hypertext markup language file through the analyzer to obtain an analyzed file;
acquiring a root node and a root name in the analysis file;
obtaining corresponding child node content value information according to the root node and the root name;
and generating a resource file to be loaded according to the content value information of the child nodes.
Preferably, the screening the static resource information to be loaded to obtain the target static resource information includes:
acquiring capacity information of the static resource information to be loaded;
and taking the static resource information to be loaded corresponding to the capacity information which does not exceed the preset threshold value as target static resource information.
Preferably, the inserting the target static resource information into the resource file to be loaded according to the type information, and implementing loading of the current webpage through the inserted resource file to be loaded includes:
when the type of the target static resource information is Javascript resource information, compressing and mixing script tag information in the Javascript resource information to generate first tag information;
and inserting the first label information into the resource file to be loaded to obtain a first target resource file, deleting the first label reference information in the first target resource file, and loading the current webpage through the deleted first target resource file.
Preferably, the inserting the target static resource information into the resource file to be loaded according to the type information, and implementing loading of the current webpage through the inserted resource file to be loaded includes:
when the type of the target static resource information is cascading style sheet resource information, compressing style label information in the cascading style sheet resource information to generate second label information;
and inserting the second label information into the resource file to be loaded to obtain a second target resource file, deleting second label reference information in the second target resource file, and loading the current webpage through the deleted second target resource file.
Preferably, the inserting the target static resource information into the resource file to be loaded according to the type information, and implementing loading of the current webpage through the inserted resource file to be loaded includes:
when the type of the target static resource information is picture resource information, converting the picture resource information into a picture character string;
and replacing the picture source information in the picture resource information with a picture character string, inserting the picture character string into the resource file to be loaded to obtain a third target resource file, and loading the current webpage through the third target resource file.
In addition, in order to achieve the above object, the present invention further provides a loading apparatus based on a web page, including:
the acquisition module is used for acquiring a webpage access request of a user and determining a current webpage to be accessed according to the webpage access request;
the searching module is used for searching the resource file to be loaded corresponding to the current webpage;
the extraction module is used for extracting the static resource identifier in the resource file to be loaded and acquiring the corresponding static resource information to be loaded according to the static resource identifier;
the screening module is used for screening the static resource information to be loaded to obtain target static resource information;
the judging module is used for judging the type information of the target static resource information;
and the inserting module is used for inserting the target static resource information into the resource file to be loaded according to the type information and loading the current webpage through the inserted resource file to be loaded.
Furthermore, to achieve the above object, the present invention also proposes an apparatus comprising: the system comprises a memory, a processor and a webpage-based loader stored on the memory and capable of running on the processor, wherein the webpage-based loader is configured to realize the steps of the webpage-based loading method.
In addition, to achieve the above object, the present invention further provides a storage medium, where a loading program based on a web page is stored, and the loading program based on a web page, when executed by a processor, implements the steps of the loading method based on a web page as described above.
According to the loading method based on the webpage, the webpage access request of a user is obtained, and the current webpage to be accessed is determined according to the webpage access request; searching a resource file to be loaded corresponding to the current webpage; extracting a static resource identifier in the resource file to be loaded, and acquiring corresponding static resource information to be loaded according to the static resource identifier; screening the static resource information to be loaded to obtain target static resource information; judging the type information of the target static resource information; the target static resource information is inserted into the resource file to be loaded according to the type information, and the current webpage is loaded through the inserted resource file to be loaded, so that the situation that the static resource information is searched from different storage areas in batches for loading is avoided, the static resource information is directly inserted into the resource file to be loaded, when the webpage is loaded, the resource file to be loaded is directly loaded, the HTTP request frequency is reduced, and the whole page loading speed is improved.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a loading method based on web pages according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a loading method based on web pages according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a loading method based on web pages according to the present invention;
fig. 5 is a schematic functional block diagram of a loading apparatus based on web pages according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a Display screen (Display), an input unit such as keys, and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The Memory 1005 may be a Random Access Memory (RAM) or a non-volatile Memory (e.g., a disk Memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a web-based loader.
In the device shown in fig. 1, the network interface 1004 is mainly used for connecting an external network and performing data communication with other network devices; the user interface 1003 is mainly used for connecting user equipment and performing data communication with the equipment; the device calls the loading program based on the web page stored in the memory 1005 through the processor 1001 and executes the implementation method of the loading based on the web page provided by the embodiment of the invention.
Based on the hardware structure, the embodiment of the loading method based on the webpage is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a loading method based on a web page according to the present invention.
In a first embodiment, the method for loading based on web pages comprises the following steps:
step S10, acquiring a webpage access request of a user, and determining a current webpage to be accessed according to the webpage access request.
It should be noted that, the execution subject of this embodiment is a loading device based on a web page, and may also be other devices that can implement the same or similar functions.
It is understood that the web page access request may be a hypertext transfer protocol (HTTP) request initiated by inputting a web page to be accessed by a user, and may also be other access manners, which is not limited in this embodiment.
And step S20, searching the resource file to be loaded corresponding to the current webpage.
In this embodiment, in the process of generating the page, the corresponding resource file needs to be loaded according to the requirement of the page, so as to generate a HyperText markup Language (HTML) file or a HyperText markup Language-up Language (HTML) file, and the display of the web page is realized through the HTML file.
Step S30, extracting the static resource identification in the resource file to be loaded, and obtaining the corresponding static resource information to be loaded according to the static resource identification.
In the specific implementation, the display of the page can be realized by acquiring the static resource identifier corresponding to each content in the page to be accessed, searching the corresponding static resource information according to the static resource identifier, and loading the static resource information.
And step S40, screening the static resource information to be loaded to obtain target static resource information.
It should be noted that the to-be-loaded static resource information includes a Javascript file, a CSS file, a picture file, and the like, and may also include other static resource information.
In this embodiment, in the loading process of the page, the static resource information includes a plurality of static resource information with small capacity and is distributed in different storage areas, and when loading is performed, corresponding static resource information needs to be searched from each area for loading.
And step S50, judging the type information of the target static resource information.
It should be noted that the target static resource information includes at least one of a Javascript file, a CSS file, and a picture file, and when the target static resource information is processed, different static resource information is processed in different processing manners, so that flexibility of data processing is improved, and an application range is expanded.
Step S60, the target static resource information is inserted into the resource file to be loaded according to the type information, and the loading of the current webpage is realized through the inserted resource file to be loaded.
It should be noted that the static resource information includes a Javascript file, a CSS file, and a picture file, where the Javascript file, the CSS file, and the picture file have a mutual dependency relationship, and the browser may be sequentially loaded according to the relationship therebetween, that is, the static resource is sequentially loaded. For example, in the process of loading static resources, each static resource has a dependency relationship when being loaded, so for example, the static resources that the target web page needs to load are three static resources, namely a static resource 1, a Javascript file, a 2-target CSS file, and a 3-target picture, and the loading of the Javascript file needs to depend on the CSS file and the target picture, that is, the static resource 1 needs to be loaded on the basis that the static resources 2 and the static resources 3 are already loaded. In this case, in order to avoid an error during the loading of the static resource, when the static resource is loaded, the CSS file and the target picture need to be loaded first, and then the Javascript file needs to be loaded, so that the loading accuracy is improved.
According to the scheme, the current webpage to be accessed is determined according to the webpage access request by acquiring the webpage access request of the user; searching a resource file to be loaded corresponding to the current webpage; extracting a static resource identifier in the resource file to be loaded, and acquiring corresponding static resource information to be loaded according to the static resource identifier; screening the static resource information to be loaded to obtain target static resource information; judging the type information of the target static resource information; the target static resource information is inserted into the resource file to be loaded according to the type information, and the current webpage is loaded through the inserted resource file to be loaded, so that the situation that the static resource information is searched from different storage areas in batches for loading is avoided, the static resource information is directly inserted into the resource file to be loaded, when the webpage is loaded, the resource file to be loaded is directly loaded, the HTTP request frequency is reduced, and the whole page loading speed is improved.
Further, as shown in fig. 3, a second embodiment of the loading method based on web pages according to the present invention is proposed based on the first embodiment, and in this embodiment, the step S20 includes:
step S201, obtaining entry information of the current web page, and extracting a hypertext markup language file in the entry information.
In this embodiment, the portal HTML file is scanned and analyzed, and all the loaded static resource information, i.e., Javascript codes, CSS codes, and pictures, are found in an extensible markup Language (XML) traversal manner.
And step S202, generating a resource file to be loaded according to the hypertext markup language file.
It should be noted that, by traversing the entry HTML file corresponding to the current web page, the function loadXMLString () may be used, and the function loadXMLString () is located in the external JavaScript of the current web page and is used to load the XML file in the HTML file.
Specifically, the element is cycled through all children nodes of a node tree. Traversing a node tree often requires looping XML documents such as: when the value of each element is extracted, the process is called as traversing a node tree to obtain all the child nodes, determining which child nodes contain static resource information such as Javascript codes, target CSS codes and target pictures from the obtained child nodes, and displaying the names and values of the child nodes, such as the capacity size of a file.
Further, the step S202 includes:
creating an analyzer, analyzing the hypertext markup language file through the analyzer to obtain an analyzed file, obtaining a root node and a root name in the analyzed file, obtaining corresponding child node content value information according to the root node and the root name, and generating a resource file to be loaded according to the child node content value information to realize information extraction of the hypertext markup language file. The method is realized by the following codes:
Figure BDA0002235662490000081
Figure BDA0002235662490000091
according to the scheme provided by the embodiment, the hypertext markup language file is analyzed through the analyzer to obtain an analysis file, the analysis file is traversed to obtain information of each node, and effective analysis of each resource file is achieved.
Further, as shown in fig. 4, a third embodiment of the loading method based on web pages according to the present invention is proposed based on the first embodiment or the second embodiment, in this embodiment, the description is made based on the first embodiment, and the step S40 includes:
step S401, obtaining the capacity information of the static resource information to be loaded.
In this embodiment, because the static resource information to be loaded is obtained, the target static resource information with a smaller file can be obtained from the static resource information to be loaded according to the size of the file, and the target static resource information with a smaller file is processed, so that the amount of the loaded static resource information is reduced, and the running speed of the webpage is increased.
Step S402, taking the static resource information to be loaded corresponding to the capacity information which does not exceed the preset threshold value as target static resource information to realize the screening of the static resource information to be loaded.
Further, the step S60 includes:
when the type of the target static resource information is a Javascript file, compressing and mixing script tag information in the Javascript file to generate first tag information, inserting the first tag information into the resource file to be loaded to obtain a first target resource file, deleting first tag reference information in the first target resource file, and loading the current webpage through the deleted first target resource file.
In the specific implementation, after the Javascript file is compressed and mixed, the file content is directly inserted into the HTML file as the script tag, and the corresponding file reference script tag is deleted, so that the Javascript file is loaded, and the corresponding file reference script tag is deleted, so that the phenomenon that the webpage is loaded again in the webpage loading process and the webpage running speed is slow is avoided.
Further, the step S60 includes:
when the type of the target static resource information is a cascading style sheet file, compressing style label information in the cascading style sheet file to generate second label information, inserting the second label information into the resource file to be loaded to obtain a second target resource file, deleting second label reference information in the second target resource file, and loading the current webpage through the deleted second target resource file.
In the specific implementation, after the CSS file is compressed, the file content is directly inserted into the HTML file as a style tag, and the corresponding file reference style tag is deleted, so that loading of the CSS file is realized, the corresponding file reference style tag is deleted, and the phenomenon that the webpage is loaded again in the webpage loading process and the webpage running speed is slow is avoided.
Further, the step S60 includes:
and when the type of the target static resource information is a picture file, converting the picture file into a picture character string, replacing picture source information in the picture file with the picture character string, inserting the picture character string into the resource file to be loaded to obtain a third target resource file, and loading the current webpage through the third target resource file.
In a specific implementation, after being compressed appropriately, the picture file is converted into a Base64 picture character string, and the picture source information of the original img label is replaced from the picture address to the Base64 picture content.
It should be noted that, different resource files are compressed in different ways, Javascript files are compressed in a confusing and compressing manner, such as UglifyJS, CSS files are line-feed by removing spaces, and pictures are generally converted into a base64 plain text format, which is not compressed but only transcoded.
According to the scheme provided by the embodiment, the Javascript file, the CSS file and the picture file are loaded into the resource file, and when the webpage is loaded, the resource file to be loaded is directly loaded, so that the HTTP request frequency is reduced, and the whole page loading speed is increased.
The invention further provides a loading device based on the webpage.
Referring to fig. 5, fig. 5 is a functional module diagram of a loading device based on web pages according to a first embodiment of the present invention.
In a first embodiment of the loading apparatus based on web pages of the present invention, the loading apparatus based on web pages includes:
the acquiring module 10 is configured to acquire a web page access request of a user, and determine a current web page to be accessed according to the web page access request.
It is understood that the web page access request may be a hypertext transfer protocol (HTTP) request initiated by inputting a web page to be accessed by a user, and may also be other access manners, which is not limited in this embodiment.
And the searching module 20 is configured to search for the resource file to be loaded corresponding to the current webpage.
In this embodiment, in the process of generating the page, the corresponding resource file needs to be loaded according to the requirement of the page, so as to generate a HyperText markup Language (HTML) file or a HyperText markup Language-up Language (HTML) file, and the display of the web page is realized through the HTML file.
The extracting module 30 is configured to extract the static resource identifier in the resource file to be loaded, and obtain corresponding static resource information to be loaded according to the static resource identifier;
in the specific implementation, the display of the page can be realized by acquiring the static resource identifier corresponding to each content in the page to be accessed, searching the corresponding static resource information according to the static resource identifier, and loading the static resource information.
And the screening module 40 is configured to acquire the static resource information to be loaded in the resource file to be loaded, and screen the static resource information to be loaded to obtain target static resource information.
It should be noted that the to-be-loaded static resource information includes a Javascript file, a CSS file, a picture file, and the like, and may also include other static resource information.
In this embodiment, in the loading process of the page, the static resource information includes a plurality of static resource information with small capacity and is distributed in different storage areas, and when loading is performed, corresponding static resource information needs to be searched from each area for loading.
And the judging module 50 is configured to judge the type information of the target static resource information.
It should be noted that the target static resource information includes at least one of a Javascript file, a CSS file, and a picture file, and when the target static resource information is processed, different static resource information is processed in different processing manners, so that flexibility of data processing is improved, and an application range is expanded.
And the inserting module 60 is configured to insert the target static resource information into the resource file to be loaded according to the type information, and load the current webpage through the inserted resource file to be loaded.
It should be noted that the static resource information includes a Javascript file, a CSS file, and a picture file, where the Javascript file, the CSS file, and the picture file have a mutual dependency relationship, and the browser may be sequentially loaded according to the relationship therebetween, that is, the static resource is sequentially loaded. For example, in the process of loading static resources, each static resource has a dependency relationship when being loaded, so for example, the static resources that the target web page needs to load are three static resources, namely a static resource 1, a Javascript file, a 2-target CSS file, and a 3-target picture, and the loading of the Javascript file needs to depend on the CSS file and the target picture, that is, the static resource 1 needs to be loaded on the basis that the static resources 2 and the static resources 3 are already loaded. In this case, in order to avoid an error during the loading of the static resource, when the static resource is loaded, the CSS file and the target picture need to be loaded first, and then the Javascript file needs to be loaded, so that the loading accuracy is improved.
According to the scheme, the current webpage to be accessed is determined according to the webpage access request by acquiring the webpage access request of the user; searching a resource file to be loaded corresponding to the current webpage; extracting a static resource identifier in the resource file to be loaded, and acquiring corresponding static resource information to be loaded according to the static resource identifier; screening the static resource information to be loaded to obtain target static resource information; judging the type information of the target static resource information; the target static resource information is inserted into the resource file to be loaded according to the type information, and the current webpage is loaded through the inserted resource file to be loaded, so that the situation that the static resource information is searched from different storage areas in batches for loading is avoided, the static resource information is directly inserted into the resource file to be loaded, when the webpage is loaded, the resource file to be loaded is directly loaded, the HTTP request frequency is reduced, and the whole page loading speed is improved.
Other embodiments or specific implementation manners of the loading device based on the web page according to the present invention may refer to the above method embodiments, and are not described herein again.
In addition, an embodiment of the present invention further provides a storage medium, where a loading program based on a web page is stored on the storage medium, and the loading program based on the web page is executed by a processor to perform the steps of the loading method based on the web page as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling an intelligent terminal (which may be a mobile phone, a computer, a terminal, an air conditioner, or a network terminal) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A loading method based on a webpage is characterized by comprising the following steps:
acquiring a webpage access request of a user, and determining a current webpage to be accessed according to the webpage access request;
searching a resource file to be loaded corresponding to the current webpage;
extracting a static resource identifier in the resource file to be loaded, and acquiring corresponding static resource information to be loaded according to the static resource identifier;
screening the static resource information to be loaded to obtain target static resource information;
judging the type information of the target static resource information;
and inserting the target static resource information into the resource file to be loaded according to the type information, and loading the current webpage through the inserted resource file to be loaded.
2. The web-based loading method according to claim 1, wherein the searching for the resource file to be loaded corresponding to the current web page comprises:
acquiring entry information of the current webpage, and extracting a hypertext markup language file in the entry information;
and generating a resource file to be loaded according to the hypertext markup language file.
3. The web-based loading method according to claim 2, wherein the generating a resource file to be loaded according to the hypertext markup language file comprises:
creating an analyzer, and analyzing the hypertext markup language file through the analyzer to obtain an analyzed file;
acquiring a root node and a root name in the analysis file;
obtaining corresponding child node content value information according to the root node and the root name;
and generating a resource file to be loaded according to the content value information of the child nodes.
4. The web-based loading method according to any one of claims 1 to 3, wherein the screening the static resource information to be loaded to obtain the target static resource information comprises:
acquiring capacity information of the static resource information to be loaded;
and taking the static resource information to be loaded corresponding to the capacity information which does not exceed the preset threshold value as target static resource information.
5. The web-based loading method according to any one of claims 1 to 3, wherein the inserting the target static resource information into the resource file to be loaded according to the type information and implementing the loading of the current web page through the inserted resource file to be loaded includes:
when the type of the target static resource information is Javascript resource information, compressing and mixing script tag information in the Javascript resource information to generate first tag information;
and inserting the first label information into the resource file to be loaded to obtain a first target resource file, deleting the first label reference information in the first target resource file, and loading the current webpage through the deleted first target resource file.
6. The web-based loading method according to any one of claims 1 to 3, wherein the inserting the target static resource information into the resource file to be loaded according to the type information and implementing the loading of the current web page through the inserted resource file to be loaded includes:
when the type of the target static resource information is cascading style sheet resource information, compressing style label information in the cascading style sheet resource information to generate second label information;
and inserting the second label information into the resource file to be loaded to obtain a second target resource file, deleting second label reference information in the second target resource file, and loading the current webpage through the deleted second target resource file.
7. The web-based loading method according to any one of claims 1 to 3, wherein the inserting the target static resource information into the resource file to be loaded according to the type information and implementing the loading of the current web page through the inserted resource file to be loaded includes:
when the type of the target static resource information is picture resource information, converting the picture resource information into a picture character string;
and replacing the picture source information in the picture resource information with a picture character string, inserting the picture character string into the resource file to be loaded to obtain a third target resource file, and loading the current webpage through the third target resource file.
8. A web page based loading apparatus, wherein the web page based loading apparatus comprises:
the acquisition module is used for acquiring a webpage access request of a user and determining a current webpage to be accessed according to the webpage access request;
the searching module is used for searching the resource file to be loaded corresponding to the current webpage;
the extraction module is used for extracting the static resource identifier in the resource file to be loaded and acquiring the corresponding static resource information to be loaded according to the static resource identifier;
the screening module is used for screening the static resource information to be loaded to obtain target static resource information;
the judging module is used for judging the type information of the target static resource information;
and the inserting module is used for inserting the target static resource information into the resource file to be loaded according to the type information and loading the current webpage through the inserted resource file to be loaded.
9. A web-based loading device, wherein the web-based loading device comprises: a memory, a processor, and a web-based loader stored on the memory and executable on the processor, the web-based loader configured to implement the steps of the web-based loading method of any one of claims 1 to 7.
10. A storage medium having a web-based loader stored thereon, wherein the web-based loader when executed by a processor implements the steps of the web-based loading method according to any one of claims 1 to 7.
CN201910985629.9A 2019-10-16 2019-10-16 Loading method, device and equipment based on webpage and storage medium Pending CN110990732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910985629.9A CN110990732A (en) 2019-10-16 2019-10-16 Loading method, device and equipment based on webpage and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910985629.9A CN110990732A (en) 2019-10-16 2019-10-16 Loading method, device and equipment based on webpage and storage medium

Publications (1)

Publication Number Publication Date
CN110990732A true CN110990732A (en) 2020-04-10

Family

ID=70082089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910985629.9A Pending CN110990732A (en) 2019-10-16 2019-10-16 Loading method, device and equipment based on webpage and storage medium

Country Status (1)

Country Link
CN (1) CN110990732A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112260853A (en) * 2020-09-17 2021-01-22 北京大米科技有限公司 Disaster recovery switching method and device, storage medium and electronic equipment
CN113568678A (en) * 2021-07-16 2021-10-29 上海淇玥信息技术有限公司 Method and device for dynamically loading resources and electronic equipment
CN114489639A (en) * 2021-12-22 2022-05-13 北京达佳互联信息技术有限公司 File generation method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6993591B1 (en) * 1998-09-30 2006-01-31 Lucent Technologies Inc. Method and apparatus for prefetching internet resources based on estimated round trip time
CN104426985A (en) * 2013-09-06 2015-03-18 腾讯科技(深圳)有限公司 Method, device and system for displaying webpage
CN106210000A (en) * 2016-06-30 2016-12-07 武汉斗鱼网络科技有限公司 A kind of method and system that webpage front-end resource is carried out load balancing
CN108319653A (en) * 2017-12-29 2018-07-24 谷米科技有限公司 Web page resources document handling method and device
CN109995857A (en) * 2019-03-21 2019-07-09 北京京东尚科信息技术有限公司 A kind of resource access method, server and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6993591B1 (en) * 1998-09-30 2006-01-31 Lucent Technologies Inc. Method and apparatus for prefetching internet resources based on estimated round trip time
CN104426985A (en) * 2013-09-06 2015-03-18 腾讯科技(深圳)有限公司 Method, device and system for displaying webpage
CN106210000A (en) * 2016-06-30 2016-12-07 武汉斗鱼网络科技有限公司 A kind of method and system that webpage front-end resource is carried out load balancing
CN108319653A (en) * 2017-12-29 2018-07-24 谷米科技有限公司 Web page resources document handling method and device
CN109995857A (en) * 2019-03-21 2019-07-09 北京京东尚科信息技术有限公司 A kind of resource access method, server and computer storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112260853A (en) * 2020-09-17 2021-01-22 北京大米科技有限公司 Disaster recovery switching method and device, storage medium and electronic equipment
CN112260853B (en) * 2020-09-17 2023-07-21 北京大米科技有限公司 Disaster recovery switching method and device, storage medium and electronic equipment
CN113568678A (en) * 2021-07-16 2021-10-29 上海淇玥信息技术有限公司 Method and device for dynamically loading resources and electronic equipment
CN113568678B (en) * 2021-07-16 2023-12-12 上海淇玥信息技术有限公司 Method and device for dynamically loading resources and electronic equipment
CN114489639A (en) * 2021-12-22 2022-05-13 北京达佳互联信息技术有限公司 File generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110990731B (en) Rendering method, device and equipment of static webpage and computer storage medium
US8387008B2 (en) Method for sharing a function between web contents
CN110990732A (en) Loading method, device and equipment based on webpage and storage medium
US20080235573A1 (en) Content Markup Transformation
US20170337168A1 (en) System and method for generating and monitoring feedback of a published webpage as implemented on a remote client
CN112036123B (en) PDF generation method, device, equipment and storage medium based on webpage
CN104657499A (en) Webpage loading method and device of client-side APP (Application)
EP3185145A1 (en) Methods for analyzing web sites using web services and devices thereof
WO2022048141A1 (en) Image processing method and apparatus, and computer readable storage medium
CN110837347A (en) Webpage printing method based on analysis plug-in, server and storage medium
CN113382083A (en) Webpage screenshot method and device
US9571557B2 (en) Script caching method and information processing device utilizing the same
CN104899203B (en) Webpage generation method and device and terminal equipment
CN114791988A (en) Browser-based PDF file analysis method, system and storage medium
CN111399863A (en) Dependent file packaging method, device, equipment and computer readable storage medium
CN111090651A (en) Data source processing method, device and equipment and readable storage medium
CN112579947A (en) Webpage element graph intercepting method and device and electronic equipment
CN115576536A (en) Method and system for automatically generating interface document by analyzing byte codes
CN111125605B (en) Page element acquisition method and device
CN104331390A (en) Method and device for screening text
CN110705210A (en) Chinese font loading method and device
CN110780983A (en) Task exception handling method and device, computer equipment and storage medium
US20110145700A1 (en) Structured document analysis apparatus and structured document analysis method
CN110858240A (en) Front-end module loading method and device
CN115906802B (en) Method, device, equipment and medium for analyzing condition logic data

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
TA01 Transfer of patent application right

Effective date of registration: 20210125

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: Shenzhen saiante Technology Service Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An International Smart City Technology Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410

RJ01 Rejection of invention patent application after publication