CN115714706A - Access acceleration system and method based on embedded H5, storage medium and electronic equipment - Google Patents

Access acceleration system and method based on embedded H5, storage medium and electronic equipment Download PDF

Info

Publication number
CN115714706A
CN115714706A CN202211320794.0A CN202211320794A CN115714706A CN 115714706 A CN115714706 A CN 115714706A CN 202211320794 A CN202211320794 A CN 202211320794A CN 115714706 A CN115714706 A CN 115714706A
Authority
CN
China
Prior art keywords
page
address
offline
client
packet
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
CN202211320794.0A
Other languages
Chinese (zh)
Inventor
莫文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Yonghui Technology Co ltd
Original Assignee
Beijing Yonghui Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Yonghui Technology Co ltd filed Critical Beijing Yonghui Technology Co ltd
Priority to CN202211320794.0A priority Critical patent/CN115714706A/en
Publication of CN115714706A publication Critical patent/CN115714706A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides an embedded H5-based access acceleration system, a method, a storage medium and electronic equipment, wherein the embedded H5-based access acceleration system comprises: a client and a server; responding to the client to load the H5 page, and intercepting and acquiring the page address of the H5 page to be loaded; the client side initiates a request to the offline packet management module according to the page address; the offline packet management module returns offline packet information to the client according to the page address; the offline package information comprises an offline package download address; the client requests the cloud disk module to download the offline package according to the offline package download address; and responding to the situation that the client loads the H5 page to be loaded again, and the client acquires the page loading resource corresponding to the H5 page to be loaded through the locally stored offline package information. The invention can effectively improve the loading speed of the embedded H5, and the embedded H5 provides a version management and updating mechanism under the condition of preloading.

Description

Access acceleration system and method based on embedded H5, storage medium and electronic equipment
Technical Field
The invention belongs to the technical field of page access, relates to a page access acceleration method, and particularly relates to an embedded H5-based access acceleration system, method, storage medium and electronic equipment.
Background
Currently, in the process of preloading H5 at the client, the client intercepts a resource request in a webpage through a JSBridge technology, then forwards the resource request to a native program of the client, then downloads content through the native program, and finally performs replacement, and when the next request is loaded, the resource request is directly loaded.
However, the above-described method has disadvantages in that: on one hand, the loading speed is slow, for example, when the first loading is carried out, the second-level loading is difficult to achieve, and the speed cannot be increased by preloading related resources in batches. On the other hand, there is no version management and the cache contents cannot be automatically updated.
Therefore, how to provide an access acceleration system, method, storage medium and electronic device based on embedded H5 to solve the defects that the prior art cannot further improve the access speed of the embedded H5, and the like, is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, the present invention provides an embedded H5-based access acceleration system, method, storage medium and electronic device, which are used to solve the problem that the prior art cannot further improve the access speed of the embedded H5.
To achieve the above and other related objects, an aspect of the present invention provides an embedded H5-based access acceleration system, where the embedded H5-based access acceleration system includes: a client and a server; the client comprises an H5 page interception module; the server comprises an offline package management module and a cloud disk module; responding to the client to load the H5 page, and acquiring a page address of the H5 page to be loaded by the H5 page interception module by using a preset external link interception rule; the client side initiates a request to the offline packet management module according to the page address; the offline packet management module returns offline packet information corresponding to the H5 page to be loaded to the client according to the page address; the off-line package information comprises an off-line package downloading address; the client requests the cloud disk module to download the offline package according to the offline package downloading address; storing the offline package and recording a page address, an offline package version and a local storage address corresponding to the offline package; and responding to the client to load the H5 page again, and the client acquires the page loading resource corresponding to the H5 page to be loaded through the local storage address according to the matching relation between the page address and the local storage address.
In an embodiment of the present invention, the server further includes: the system comprises a service processing module and an offline packet generating module; responding to the client to load the H5 page again, the client initiates a page request to the service processing module according to the page address, and the service processing module returns the page content related to the page request to the client; the client analyzes the page content to obtain a resource content address list of the H5 page to be loaded; generating a first resource address list according to the local storage condition of the resource content address list at the client; the client acquires a second resource list corresponding to the page address from the offline packet management module; responding to the difference between the first resource address list and the second resource address list, the client generates a compressed packet according to the content address of the first resource address list, uploads the compressed packet to the cloud disk module, acquires a download address of the compressed packet returned by the cloud disk module, and the offline packet management module carries out version upgrading on the offline packet of the page address according to the page address sent by the offline packet generation module, the first resource address list and the download address of the compressed packet.
In an embodiment of the present invention, generating a first resource address list according to a storage condition of the resource content address list in the local area of the client includes: the client sends a page address and all resource address information required by page loading to the offline packet generation module; the offline packet generation module reads the page address and all resource address lists required by page loading, takes all resource address lists required by page loading as the first resource address list, and circulates the resource address lists in the first resource address list; acquiring a resource address, judging whether a mapping relation between a page and the current resource address exists or not, and if not, storing the corresponding relation between the page address and the resource address; and if so, acquiring the next resource address until all resource addresses of the first resource address list are traversed.
In an embodiment of the present invention, the performing, by the offline package management module, version upgrade on the offline package of the page address according to the page address sent by the offline package generation module, the first resource address list, and the download address of the compressed package includes: circulating the content address of the first resource address list, downloading the resource of the content address to the local, and storing the resource in a folder; compressing the downloaded resources into a compression packet; uploading the compressed packet to the cloud disk module; the cloud disk module returns the download address of the compressed packet; the offline packet generating module sends the page address, the first resource address list and the download address of the compressed packet to the offline packet management module; and the offline package management module acquires the offline package of the page address, performs version upgrade on the offline package, and generates and stores new offline package information.
In an embodiment of the present invention, in response to the client loading an H5 page, the acquiring, by the H5 page interception module, a page address of the H5 page to be loaded by using a preset out-link interception rule includes: the client loads H5 content and initiates a client request according to the loaded H5 content address; and the H5 page intercepting module intercepts the client request by utilizing a preset external link intercepting rule to obtain a page address of the H5 page to be loaded.
In an embodiment of the present invention, the returning, by the offline packet management module, the offline packet information corresponding to the H5 page to be loaded to the client according to the page address includes: the client side initiates an offline packet request to the offline packet management module by using the request parameters; wherein, the request parameter comprises the page address; the offline packet management module inquires offline packet information corresponding to the page address according to the page address; and returning the offline packet information to the client.
In an embodiment of the present invention, the storing, by the client, the offline packet and recording the page address, the offline packet version, and the local storage address corresponding to the offline packet, includes: the client side judges whether the offline package exists locally; responding to the fact that the offline package does not exist locally at the client, initiating an offline package downloading request to the cloud disk module, and storing the offline package returned by the cloud disk module and recording a page address, an offline package version and a local storage address corresponding to the offline package; and responding to the fact that the offline package exists locally at the client and the version of the offline package needs to be updated, initiating a request for downloading the offline package to the cloud disk module, and storing the offline package returned by the cloud disk module and recording a page address, an offline package version and a local storage address corresponding to the offline package.
In order to achieve the above objects and other related objects, another aspect of the present invention provides an embedded H5-based access acceleration method, where the embedded H5-based access acceleration method includes: responding to the client to load the H5 page, and acquiring the page address of the H5 page to be loaded by using a preset external link interception rule; returning off-line package information corresponding to the H5 page to be loaded to the client according to the page address; the offline package information comprises an offline package downloading address; downloading an offline package according to the offline package downloading address request; storing the offline package and recording a page address, an offline package version and a local storage address corresponding to the offline package; responding to the client to load the H5 page to be loaded again, and acquiring the page loading resource corresponding to the H5 page to be loaded through the local storage address according to the matching relation between the page address and the local storage address.
To achieve the above and other related objects, a further aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the embedded H5-based access acceleration method.
To achieve the above and other related objects, a last aspect of the present invention provides an electronic device, comprising: a processor and a memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory so as to enable the electronic equipment to execute the embedded H5-based access acceleration method.
As described above, the access acceleration system, method, storage medium and electronic device based on embedded H5 according to the present invention have the following advantages:
according to the method, the resource list taken when the page is loaded by the client is sent to the back end, the back end automatically generates the off-line package according to different lists in real time, and then the client accelerates the access speed of the embedded H5 by loading the off-line package. The invention solves the problem that the loading speed of the embedded H5 is not fast enough, improves the loading speed, for example, the second-level loading can be realized during the first loading, and the speed can be increased by preloading related resources in batches. The invention carries out version management through a management mechanism and can automatically update the cache content, thereby providing a specific version management and update mechanism under the condition of preloading of the embedded H5.
Drawings
Fig. 1 is a schematic structural diagram of an access acceleration system based on embedded H5 according to an embodiment of the present invention.
Fig. 2 is a schematic diagram illustrating the architecture of an H5-embedded access acceleration system according to an embodiment of the present invention.
FIG. 3 is a flow chart illustrating the client implementation of the embedded H5 based access acceleration system of the present invention in one embodiment.
FIG. 4 is a flow chart illustrating a server-side implementation of the embedded H5 based access acceleration system of the present invention in one embodiment.
FIG. 5 is a schematic flow chart diagram illustrating an embodiment of an embedded H5-based access acceleration method of the present invention.
Fig. 6 is a schematic structural connection diagram of an electronic device according to an embodiment of the invention.
Description of the element reference numerals
1. Client terminal
11 H5 page interception module
2. Service terminal
21. Offline package management module
22. Cloud disk module
23. Service processing module
24. Offline packet generation module
S51 to S54 steps
6. Electronic device
61. Processor with a memory for storing a plurality of data
62. Memory device
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
The access acceleration system, the access acceleration method, the storage medium and the electronic equipment based on the embedded H5 can effectively improve the loading speed of the embedded H5, and the embedded H5 provides a version management and updating mechanism under the condition of preloading.
The principles and implementations of the access acceleration system, method, storage medium and electronic device based on embedded H5 according to the present embodiment will be described in detail below with reference to fig. 1 to 6, so that those skilled in the art can understand the access acceleration system, method, storage medium and electronic device based on embedded H5 without creative work.
First, the embedded H5-based access acceleration system provided in the present embodiment is described in detail with reference to the drawings. It should be noted that the division of the modules of the following system is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. And the modules can be realized in a form that all software is called by the processing element, or in a form that all the modules are realized in a form that all the modules are called by the processing element, or in a form that part of the modules are called by the hardware. For example: a module may be a separate processing element, or may be integrated into a chip of the system described below. Further, a certain module may be stored in the memory of the following system in the form of program code, and a certain processing element of the following system may call and execute the function of the following certain module. Other modules are implemented similarly. All or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, the steps of the above method or the following modules may be implemented by hardware integrated logic circuits in a processor element or instructions in software.
The following modules may be one or more integrated circuits configured to implement the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), and the like. When some of the following modules are implemented in the form of a program code called by a Processing element, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling the program code. These modules may be integrated together and implemented in the form of a System-on-a-chip (SOC).
Referring to fig. 1, a schematic structural diagram of an access acceleration system based on embedded H5 according to an embodiment of the present invention is shown. As shown in fig. 1, the access acceleration system based on embedded H5 includes: a client 1 and a server 2; the client 1 comprises an H5 page intercepting module 11; the server 2 comprises an offline package management module 21 and a cloud disk module 22.
In response to the client 1 loading an H5 page, the H5 page interception module 11 obtains a page address of the H5 page to be loaded by using a preset outer link interception rule; the client 1 initiates a request to the offline packet management module 21 according to the page address.
The offline packet management module 21 returns offline packet information corresponding to the H5 page to be loaded to the client 1 according to the page address; the offline package information includes an offline package download address.
The client 1 requests the cloud disk module 22 to download the offline package according to the offline package download address; and storing the offline package and recording a page address, an offline package version and a local storage address corresponding to the offline package.
Responding to the client 1 to load the H5 page to be loaded again, and the client 1 acquires the page loading resource corresponding to the H5 page to be loaded through the local storage address according to the matching relationship between the page address and the local storage address.
Referring to fig. 2, a schematic diagram of an embedded H5 based access acceleration system according to an embodiment of the present invention is shown. As shown in fig. 2, the server further includes: a service processing module 23 and an offline packet generating module 24.
Responding to the client 1 to load the H5 page to be loaded again, the client 1 initiates a page request to the service processing module 23 according to the page address, and the service processing module 23 returns the page content related to the page request to the client 1;
the client 1 analyzes the page content and acquires a resource content address list of the H5 page to be loaded; generating a first resource address list according to the local storage condition of the resource content address list at the client 1;
the client 1 acquires a second resource list corresponding to the page address from the offline packet management module 21;
in response to that the first resource address list is different from the second resource address list, the client 1 generates a compressed packet according to a content address of the first resource address list, uploads the compressed packet to the cloud disk module, obtains a download address of the compressed packet returned by the cloud disk module 22, and the offline packet management module 21 performs version upgrade on the offline packet of the page address according to the page address sent by the offline packet generation module 24, the first resource address list, and the download address of the compressed packet.
In an embodiment, generating a first resource address list according to a storage condition of the resource content address list in the local area of the client includes:
and the client sends a page address and all resource address information required by page loading to the offline packet generation module.
And the offline packet generation module reads the page address and all resource address lists required by page loading, takes all resource address lists required by page loading as the first resource address list, and circulates the resource address lists in the first resource address list.
Acquiring a resource address, judging whether a mapping relation between a page and the current resource address exists or not, and if not, storing the corresponding relation between the page address and the resource address; and if so, acquiring the next resource address until all resource addresses of the first resource address list are traversed.
In an embodiment, the performing, by the offline package management module, version upgrade on the offline package of the page address according to the page address sent by the offline package generation module, the first resource address list, and the download address of the compressed package includes:
and circulating the content address of the first resource address list, downloading the resource of the content address to the local, and storing the resource in a folder.
And compressing the downloaded resources into a compressed packet.
And uploading the compressed packet to the cloud disk module.
And the cloud disk module returns the download address of the compressed packet.
And the offline packet generating module sends the page address, the first resource address list and the download address of the compressed packet to the offline packet management module.
And the offline packet management module acquires the offline packet of the page address, carries out version upgrading on the offline packet, and generates and stores new offline packet information.
In an embodiment, in response to the client loading an H5 page, the acquiring, by the H5 page interception module, a page address of the H5 page to be loaded by using a preset outer chain interception rule includes:
and the client loads the H5 content and initiates a client request according to the loaded H5 content address.
And the H5 page intercepting module intercepts the client request by utilizing a preset external link intercepting rule to acquire a page address of the H5 page to be loaded.
In an embodiment, the returning, by the offline packet management module, the offline packet information corresponding to the H5 page to be loaded to the client according to the page address includes:
the client side initiates an offline packet request to the offline packet management module by using the request parameters; wherein the request parameter includes the page address.
The offline packet management module inquires offline packet information corresponding to the page address according to the page address; and returning the offline packet information to the client.
In an embodiment, the storing, by the client, the offline packet and recording a page address, an offline packet version, and a local storage address corresponding to the offline packet includes:
the client side judges whether the offline package exists locally;
responding to the fact that the offline package does not exist locally at the client, initiating an offline package downloading request to the cloud disk module, and storing the offline package returned by the cloud disk module and recording a page address, an offline package version and a local storage address corresponding to the offline package;
and responding to the fact that the offline package exists locally at the client and the version of the offline package needs to be updated, initiating a request for downloading the offline package to the cloud disk module, and storing the offline package returned by the cloud disk module and recording a page address, an offline package version and a local storage address corresponding to the offline package.
Therefore, the method and the device receive an H5 page loading instruction, obtain a resource outer chain of the H5 page according to the H5 page loading instruction, judge whether the loading resource of the H5 page is in a local directory of a client according to a preset outer chain interception rule when the H5 page is loaded in the client in response to the H5 page loading instruction, replace the resource outer chain of the loading resource with the address of the local directory if the loading resource is in the local directory, and obtain the loading resource from the local directory; in addition, the loading speed of the H5 page in the client is further increased by loading the loading resource from the local directory, and even under the condition of weak network or no network, the core part of the H5 page in the client can be loaded firstly.
In an embodiment, the operation of the access acceleration system based on the embedded H5 further includes determining whether a pre-added offline parameter is detected when the preset H5 item link is accessed through an application program; if the preset off-line parameter added in advance is detected when the application program is judged to access the preset link, reading the configuration file; downloading the offline resources to the client according to the configuration file; and when detecting that the user accesses the H5 project link in the application program, intercepting a request through the application program and returning a local corresponding static file at the client so as to automatically access the application program end off line.
Specifically, when the H5 project portal link is configured through the operation background, such as https:// example.com, a project offline parameter such as https:// example.comoffline = true is added. The application program reads the URL for the first time, detects that offline = true, shows that the project can be offline, reads the manifest. When the user accesses the H5 in the application program, the application program intercepts the request and returns the locally corresponding static file, thereby achieving the effect of automatic off-line access.
Referring to fig. 3 and fig. 4, a flowchart of a client side execution of the embedded H5 based access acceleration system according to an embodiment of the invention and a flowchart of a server side execution of the embedded H5 based access acceleration system according to an embodiment of the invention are respectively shown. As shown in fig. 3 and 4, in practical applications, the server is a backend, the service processing module is a backend-service process, the offline packet generating module is a backend-offline packet generator, the offline packet managing module is a backend-offline packet manager, and the cloud disk module is a backend-cloud disk. Fig. 3 and 4 jointly present the working principle of the access acceleration system based on embedded H5 in the present application, wherein "send to the backend offline packet generator in fig. 3: 1. the page address, 2, all addresses of page loading "point to the step of" reading the page address from the request parameter and all resource address lists required by page loading, and circulating the resource address lists "in fig. 4. The "content of the display page" in fig. 3 converges with the "processed" in fig. 4.
With reference to fig. 3 and fig. 4, the workflow of the access acceleration system based on the embedded H5 is as follows:
step 1. The method starts.
And 2, loading the content H5 by the client and loading the content.
And 3, the client initiates a request according to the loaded H5 content address.
And 4, the client intercepts the request of the client through a JSbridge technology (wherein the adopted JSbridge technology is the prior art) to obtain the page address to be loaded.
And 5, the client initiates a request to the offline packet manager service of the backend, and the request parameter carries the page address.
And 6, the offline packet manager at the rear end receives the page address in the request parameters, inquires the offline packet information of the page address and then returns.
Step 7, the client judges whether the off-line package information returned by the back-end off-line package manager is empty, if not, the content in the off-line package information is read, wherein the content comprises an off-line package version and a download address of an off-line package:
i. is offline package information present locally at the client?
1. If not present
a) Initiating a request for downloading an offline package, wherein the address is a returned offline package downloading address;
b) The back-end cloud disk returns the content of the offline package;
c) The client stores the returned offline packet content information, and records information such as a page address, an offline packet version, an offline packet local storage address and the like.
2. If present, is
a) And the client compares the local offline package version with the offline package version returned by the back-end offline package manager to determine whether the local offline package version needs to be updated.
i. If it needs to be updated
(1) Initiating a request for downloading the off-line package, wherein the address is a returned off-line package downloading address;
(2) The back-end cloud disk returns the content of the offline packet;
(3) The client stores the returned offline packet content information, and records information such as a page address, an offline packet version, an offline packet local storage address and the like.
And 8, the client initiates a page request to the back-end service processing module according to the page address (the request is added with a parameter mark to identify that the interception is not carried out any more, and the JSP bridge is ensured not to intercept the request again).
And 9, the back-end service processing module receives the request and returns the related content of the page to the client.
And step 10, the client acquires the returned content of the client through the JSB bridge, analyzes the content in the returned content, and acquires all resource content address lists (JS-scripts, CSS-styles, videos, pictures and the like) in the page.
And 11, creating an empty list marked as a difference list.
Step 12. Does the client check if an offline packet exists for the current page address?
a) If present, is
i. Reading all resource content lists in the offline package;
ii, removing the content of the resource list in the offline package from the resource content list in the page content loaded by the client to obtain a difference set, and storing the difference set in the difference set list created in the step 11;
the client replaces the resource address in the page matching the address of the resource in the offline package with the resource address in the local offline package.
b) If not, all resource content lists in the page content are stored into the difference set.
Step 13, at this point the following steps 14 and 15 are performed concurrently:
step 14:
a) The client sends to the backend offline packet generator: page address and all resource address information required by page loading;
b) Reading a page address and a whole resource address list (marked as a list A) required by page loading from the request parameters, and circulating the resource address list;
c) Acquiring a slave resource address from the list A;
d) Determine if a page and current resource address mapping relationship exists?
i. And if not, storing the corresponding relation between the page address and the resource address.
e) Is the current loop over?
i. If not, returning to the step 14.c;
if it has finished
(1) And acquiring the offline packet information corresponding to the page address from the packet manager at the back end.
(2) The packet manager at the back end returns all the information of the offline packet at the page address, including the page address, the version information, and the resource list information included in the offline packet (the list is recorded as B).
(3) Compare if list a and list B are the same?
(3.1) if different
i. Circulating the content address of the list A, downloading the related resource to the local, and placing the resource in a folder;
compressing the downloaded content into a compressed package;
uploading the compressed packet to a back-end cloud disk;
the back-end cloud disk returns the download address of the compressed packet;
v. the back-end off-line packet generator sends the page address, the list A and the compressed packet address to a packet manager;
vi, the back-end packet manager receives the request, acquires the offline packet version of the page address from the parameters, and then upgrades the version (for example, 1 can be added);
saving new off-line package information including page address, list information, package download address and version information;
and viii, finishing the treatment.
(3.2) if the same, no treatment is performed.
f) The process ends and the flow ends.
And step 15, the client continuously loads the page content.
a) Performing page display;
b) The flow ends.
Referring to fig. 5, a schematic flow chart of an embodiment of an embedded H5 based access acceleration method according to the present invention is shown. As shown in fig. 5, the access acceleration method based on embedded H5 specifically includes the following steps:
and S51, responding to the H5 page loaded by the client, and acquiring the page address of the H5 page to be loaded by using a preset external chain interception rule.
S52, returning the off-line package information corresponding to the H5 page to be loaded to the client according to the page address; the offline package information includes an offline package download address.
S53, downloading the offline package according to the offline package downloading address request; and storing the offline packet and recording a page address, an offline packet version and a local storage address corresponding to the offline packet.
And S54, responding to the client to load the H5 page again, and acquiring the page loading resource corresponding to the H5 page to be loaded through the local storage address according to the matching relation between the page address and the local storage address.
The protection scope of the access acceleration method based on the embedded H5 according to the present invention is not limited to the execution sequence of the steps listed in this embodiment, and all the schemes of adding, subtracting, and replacing steps in the prior art according to the principles of the present invention are included in the protection scope of the present invention.
The principle of the access acceleration system based on the embedded H5 corresponds to the access acceleration method based on the embedded H5 one to one, and the access acceleration system based on the embedded H5 can realize the access acceleration method based on the embedded H5, but the implementation device of the access acceleration method based on the embedded H5 includes, but is not limited to, the structure of the access acceleration system based on the embedded H5, which is listed in the embodiment, and all the structural modifications and substitutions of the prior art, which are made according to the principle of the invention, are included in the protection scope of the invention.
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the embedded H5 based access acceleration method.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned computer-readable storage medium comprises: various computer storage media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Please refer to fig. 6, which is a schematic structural connection diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 6, the present embodiment provides an electronic device 6, which specifically includes: a processor 61 and a memory 62; the memory 62 is configured to store a computer program, and the processor 61 is configured to execute the computer program stored in the memory 62, so as to enable the electronic device 6 to execute the steps of the embedded H5-based access acceleration method.
The Processor 61 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware component.
The Memory 62 may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
In practice, the electronic device may be a computer including all or some of the components of memory, memory controller, one or more processing units (CPUs), peripheral interfaces, RF circuits, audio circuits, speakers, microphones, input/output (I/O) subsystems, display screens, other output or control devices, and external ports; the computer includes, but is not limited to, personal computers such as desktop computers, notebook computers, tablet computers, smart phones, personal Digital Assistants (PDAs), and the like. In other embodiments, the electronic device may also be a server, where the server may be arranged on one or more entity servers according to various factors such as functions and loads, or may be a cloud server formed by a distributed or centralized server cluster, and this embodiment is not limited.
In summary, the access acceleration system, method, storage medium and electronic device based on embedded H5 of the present invention send the resource list taken when the client loads the page to the back end, the back end automatically generates the offline package according to different lists in real time, and then the client accelerates the access speed of the embedded H5 by loading the offline package. The invention solves the problem that the loading speed of the embedded H5 is not fast enough, improves the loading speed, for example, the loading can be carried out in second level when the embedded H5 is loaded for the first time, and the speed can be increased by preloading related resources in batches. The invention carries out version management through a management mechanism and can automatically update the cache content, thereby providing a specific version management and update mechanism under the condition of preloading of the embedded H5. The invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which may be made by those skilled in the art without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims (10)

1. An embedded H5-based access acceleration system, characterized in that the embedded H5-based access acceleration system comprises: a client and a server; the client comprises an H5 page interception module; the server side comprises an offline packet management module and a cloud disk module;
responding to the client to load the H5 page, and acquiring a page address of the H5 page to be loaded by the H5 page intercepting module by using a preset outer link intercepting rule; the client side initiates a request to the offline packet management module according to the page address;
the offline packet management module returns offline packet information corresponding to the H5 page to be loaded to the client according to the page address; the offline package information comprises an offline package downloading address;
the client requests the cloud disk module to download the offline package according to the offline package downloading address; storing the offline packet and recording a page address, an offline packet version and a local storage address corresponding to the offline packet;
and responding to the client to load the H5 page to be loaded again, and the client acquires page loading resources corresponding to the H5 page to be loaded through the local storage address according to the matching relation between the page address and the local storage address.
2. The embedded H5-based access acceleration system of claim 1, characterized in that the server further comprises: the system comprises a service processing module and an offline packet generating module;
responding to the client to load the H5 page again, the client initiates a page request to the service processing module according to the page address, and the service processing module returns the page content related to the page request to the client;
the client analyzes the page content to obtain a resource content address list of the H5 page to be loaded; generating a first resource address list according to the local storage condition of the resource content address list at the client;
the client acquires a second resource list corresponding to the page address from the offline packet management module;
responding to the difference between the first resource address list and the second resource address list, the client generates a compressed packet according to the content address of the first resource address list, uploads the compressed packet to the cloud disk module, acquires a download address of the compressed packet returned by the cloud disk module, and the offline packet management module carries out version upgrading on the offline packet of the page address according to the page address sent by the offline packet generation module, the first resource address list and the download address of the compressed packet.
3. The embedded H5-based access acceleration system of claim 2, characterized in that, according to the storage condition of the resource content address list locally at the client, generating a first resource address list comprises:
the client sends a page address and all resource address information required by page loading to the offline packet generation module;
the offline packet generation module reads the page address and all resource address lists required by page loading, takes all resource address lists required by page loading as the first resource address list, and circulates the resource address lists in the first resource address list;
acquiring a resource address, judging whether a mapping relation between a page and the current resource address exists or not, and if not, storing the corresponding relation between the page address and the resource address; and if so, acquiring the next resource address until all resource addresses of the first resource address list are traversed.
4. The system according to claim 2, wherein the offline packet management module performs version upgrade on the offline packet of the page address according to the page address sent by the offline packet generation module, the first resource address list, and the download address of the compressed packet, and includes:
circulating the content address of the first resource address list, downloading the resource of the content address to the local, and storing the resource in a folder;
compressing the downloaded resources into a compression packet;
uploading the compressed packet to the cloud disk module;
the cloud disk module returns the download address of the compressed packet;
the offline packet generating module sends the page address, the first resource address list and the download address of the compressed packet to the offline packet management module;
and the offline packet management module acquires the offline packet of the page address, carries out version upgrading on the offline packet, and generates and stores new offline packet information.
5. The embedded H5-based access acceleration system according to claim 1, wherein in response to the client loading an H5 page, the H5 page interception module obtains a page address of the H5 page to be loaded by using a preset out-link interception rule, including:
the client loads H5 content and initiates a client request according to the loaded H5 content address;
and the H5 page intercepting module intercepts the client request by utilizing a preset external link intercepting rule to obtain a page address of the H5 page to be loaded.
6. The embedded H5-based access acceleration system according to claim 1, wherein the offline packet management module returns the offline packet information corresponding to the H5 page to be loaded to the client according to the page address, and includes:
the client side initiates an offline packet request to the offline packet management module by using the request parameters; wherein the request parameter comprises the page address;
the offline packet management module inquires offline packet information corresponding to the page address according to the page address; and returning the offline packet information to the client.
7. The embedded H5-based access acceleration system according to claim 1, characterized in that the client stores the offline package and records the page address, offline package version and local storage address corresponding to the offline package, including:
the client side judges whether the offline package exists locally;
responding to the client side that the offline package does not exist locally, initiating a request for downloading the offline package to the cloud disk module, and storing the offline package returned by the cloud disk module and recording a page address, an offline package version and a local storage address corresponding to the offline package;
and responding to the fact that the offline package exists locally at the client and the version of the offline package needs to be updated, initiating a request for downloading the offline package to the cloud disk module, and storing the offline package returned by the cloud disk module and recording a page address, an offline package version and a local storage address corresponding to the offline package.
8. An embedded H5-based access acceleration method is characterized in that the embedded H5-based access acceleration method comprises the following steps:
responding to the client to load the H5 page, and acquiring a page address of the H5 page to be loaded by using a preset outer link interception rule;
returning off-line package information corresponding to the H5 page to be loaded to the client according to the page address; the offline package information comprises an offline package downloading address;
downloading an offline package according to the offline package downloading address request; storing the offline packet and recording a page address, an offline packet version and a local storage address corresponding to the offline packet;
responding to the client to load the H5 page to be loaded again, and acquiring the page loading resource corresponding to the H5 page to be loaded through the local storage address according to the matching relation between the page address and the local storage address.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the embedded H5 based access acceleration method of claim 8.
10. An electronic device, comprising: a processor and a memory;
the memory is configured to store a computer program, and the processor is configured to execute the computer program stored by the memory to cause the electronic device to perform the embedded H5 based access acceleration method of claim 8.
CN202211320794.0A 2022-10-26 2022-10-26 Access acceleration system and method based on embedded H5, storage medium and electronic equipment Pending CN115714706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211320794.0A CN115714706A (en) 2022-10-26 2022-10-26 Access acceleration system and method based on embedded H5, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211320794.0A CN115714706A (en) 2022-10-26 2022-10-26 Access acceleration system and method based on embedded H5, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115714706A true CN115714706A (en) 2023-02-24

Family

ID=85231425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211320794.0A Pending CN115714706A (en) 2022-10-26 2022-10-26 Access acceleration system and method based on embedded H5, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115714706A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117493716A (en) * 2023-11-08 2024-02-02 中建八局第一数字科技有限公司 Display updating method and device of mobile terminal Web App, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117493716A (en) * 2023-11-08 2024-02-02 中建八局第一数字科技有限公司 Display updating method and device of mobile terminal Web App, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
TWI743458B (en) Method, device and system for parallel execution of blockchain transactions
JP5705869B2 (en) Apparatus and method for loading and updating code of a cluster-based JAVA application system
CN108616599B (en) Method and device for registering and updating application service
CN109614167B (en) Method and system for managing plug-ins
CN111782339A (en) Container creation method and device, electronic equipment and storage medium
US10992746B2 (en) Automatic system response to external field-replaceable unit (FRU) process
CN111651219A (en) Method and equipment for managing multi-module project configuration file
CN115714706A (en) Access acceleration system and method based on embedded H5, storage medium and electronic equipment
CN112948025B (en) Data loading method and device, storage medium, computing equipment and computing system
CN111694639A (en) Method and device for updating address of process container and electronic equipment
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN113608742A (en) Detection method, code packet processing method, operation control method and computing device
CN110471744B (en) Password modification method, device, equipment and computer readable storage medium
CN111444148A (en) Data transmission method and device based on MapReduce
CN113934437B (en) Method and system for installing application on cloud mobile phone and client cloud mobile phone
US9003364B2 (en) Overriding system attributes and function returns in a software subsystem
US11977559B2 (en) Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs
CN114679465A (en) Resource operation method and device, electronic equipment and storage medium
CN111142972B (en) Method, apparatus, system, and medium for extending functions of application program
CN113867776A (en) Method and device for publishing middle station application, electronic equipment and storage medium
CN112540772A (en) Application issuing method and system, electronic device and storage medium
CN114490544B (en) Method and device for downloading container mirror image by newly adding host
CN110543351A (en) Data processing method and computer device
CN112688807B (en) One-stop linkage response blue-green deployment method and device and electronic equipment
US20240037017A1 (en) Verification of core file debugging resources

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