[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

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

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides an embedded H5-based access acceleration system, an embedded H5-based access acceleration method, a storage medium and electronic equipment, wherein the embedded H5-based access acceleration system comprises: a client and a server; responding to the loading of the H5 page by the client, and intercepting and acquiring a page address of the H5 page to be loaded; the client initiates a request to the offline package management module according to the page address; the offline package management module returns offline package information to the client according to the page address; the offline package information comprises an offline package download address; the client requests to download the offline package to the cloud disk module according to the offline package download address; and 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 by the client 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 in particular relates to an embedded H5-based access acceleration system, an embedded H5-based access acceleration method, a storage medium and electronic equipment.
Background
At present, in the process of preloading the client-side native H5, the client-side intercepts a resource request in a webpage through JSBridge technology, then forwards the resource request to a native program of the client-side, downloads content through the native program, finally carries out replacement, and directly loads when the next request is loaded.
However, the above-described manner has disadvantages in that: on the one hand, the loading speed is slow, for example, when loading is performed for the first time, second-level loading is difficult, and batch preloading of related resources cannot be performed for speed increasing. 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, a method, a storage medium and an electronic device based on embedded H5, so as to solve the defect that the prior art cannot further improve the access speed of 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 drawbacks of the prior art, an object of the present invention is to provide an access acceleration system, method, storage medium and electronic device based on embedded H5, for solving the problem that the access speed of embedded H5 cannot be further improved in the prior art.
To achieve the above and other related objects, an aspect of the present invention provides an embedded H5-based access acceleration system, including: 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 loading of the H5 page by the client, and acquiring a page address of the H5 page to be loaded by the H5 page interception module by utilizing a preset outer chain interception rule; the client initiates a request to the offline package management module according to the page address; the offline package management module returns offline 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 download address; the client requests the cloud disk module to download an offline package according to the offline package download 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 to be loaded again, and acquiring page loading resources corresponding to the H5 page to be loaded through the local storage address by the client according to the matching relation of the page address and the local storage address.
In an embodiment of the present invention, the server further includes: the service processing module and the offline package generating module; responding to the client to load the H5 page to be loaded again, initiating a page request to the service processing module by the client according to the page address, and returning the page content related to the page request to the client by the service processing module; the client 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; the client acquires a second resource list corresponding to the page address from the offline package management module; and responding to the difference between the first resource address list and the second resource 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 the 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 local storage condition of the resource content address list at the client includes: the client sends page addresses and all resource address information required by page loading to the offline package generating module; the off-line packet generating module reads the page address and all resource address lists required by page loading, takes all the resource address lists required by page loading as the first resource address list, and circulates the resource address list in the first resource address list; acquiring a resource address, judging whether the mapping relation between the page and the current resource address exists or not, and storing the corresponding relation between the page address and the resource address if the mapping relation does not exist; if so, acquiring the next resource address until all the resource addresses of the first resource address list are traversed.
In an embodiment of the present invention, the offline package management module performs version upgrade on an 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, including: 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 compressed package; uploading the compressed package to the cloud disk module; the cloud disk module returns a download address of the compressed packet; the offline packet generation 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 upgrading 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 H5 page interception module obtains a page address of the H5 page to be loaded by using a preset outbound interception rule, including: the client loads H5 content and initiates a client request according to the loaded H5 content address; and the H5 page interception module intercepts the client request by utilizing a preset outer chain interception rule, and acquires the page address of the H5 page to be loaded.
In an embodiment of the present invention, the offline package management module returns offline package information corresponding to the H5 page to be loaded to the client according to the page address, including: the client initiates an offline package request to the offline package management module by using a request parameter; wherein the request parameter comprises the page address; the offline package management module inquires offline package information corresponding to the page address according to the page address; and returning the offline package information to the client.
In an embodiment of the present invention, the client storing the offline package and recording a page address, an offline package version, and a local storage address corresponding to the offline package includes: the client judges whether the offline package exists locally; responding to the fact that the client-side does not have the offline package locally, initiating a request for downloading the offline package to the cloud disk module, 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 offline package which is locally existed at the client and the offline package version needs to be updated, initiating a request for downloading the offline package to the cloud disk module, 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.
To achieve the above and other related objects, another aspect of the present invention provides an embedded H5-based access acceleration method, including: responding to loading of the H5 page by the client, and acquiring a page address of the H5 page to be loaded by utilizing a preset outer chain interception rule; according to the page address, returning offline package information corresponding to the H5 page to be loaded to the client; the offline package information comprises an offline package download address; requesting to download the offline package according to the offline package download 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 to be loaded again, and acquiring page loading resources corresponding to the H5 page to be loaded through the local storage address according to the matching relation of 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 stored thereon a computer program which, when executed by a processor, implements the embedded H5-based access acceleration method.
To achieve the above and other related objects, a final aspect of the present invention provides an electronic device, including: 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 in the memory so as to enable the electronic equipment to execute the embedded H5-based access acceleration method.
As described above, the embedded H5-based access acceleration system, the embedded H5-based access acceleration method, the embedded H5-based access acceleration storage medium and the embedded H5-based electronic equipment have the following beneficial effects:
according to the method, the resource list obtained when the client loads the page is sent 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 method solves the problem that the embedded H5 loading speed is not fast enough, improves the loading speed, can realize second-level loading when loading for the first time, and can realize the batch preloading of related resources to speed up. The invention carries out version management through a management mechanism and can automatically update the cache content, thereby providing a specific version management and updating mechanism under the condition of preloading the embedded H5.
Drawings
Fig. 1 is a schematic diagram of an access acceleration system based on embedded H5 according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of an access acceleration system based on embedded H5 according to an embodiment of the present invention.
FIG. 3 is a flow chart illustrating the execution of the embedded H5-based access acceleration system of the present invention by a client in one embodiment.
FIG. 4 is a flowchart illustrating the execution of the embedded H5-based access acceleration system according to an embodiment of the present invention at a server.
FIG. 5 is a schematic flow chart of an access acceleration method based on embedded H5 according to an embodiment 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 element reference numerals
1. Client terminal
11 H5 page interception module
2. Service end
21. Offline package management module
22. Cloud disc module
23. Service processing module
24. Offline package generation module
S51 to S54 steps
6. Electronic equipment
61. Processor and method for controlling the same
62. Memory device
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present invention by way of illustration, and only the components related to the present invention are shown in the illustrations, not according to the number, shape and size of the components in actual implementation, and the form, number and proportion of each component in actual implementation may be arbitrarily changed, and the layout of the components may be more complex.
The embedded H5-based access acceleration system, the embedded H5-based access acceleration method, the storage medium and the electronic equipment 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 following describes in detail the principles and implementation of an access acceleration system, method, storage medium and electronic device based on embedded H5 according to the present embodiment with reference to fig. 1 to 6, so that those skilled in the art may understand the access acceleration system, method, storage medium and electronic device based on embedded H5 according to the present embodiment without creative effort.
First, the embedded H5-based access acceleration system provided in this embodiment will be described in detail with reference to the drawings. It should be noted that, it should be understood that the division of the modules of the following system is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. The modules can be realized in a form of calling the processing element through software, can be realized in a form of hardware, can be realized in a form of calling the processing element through part of the modules, and can be realized in a form of hardware. For example: a module may be a separately established processing element or may be integrated in a chip of a system as described below. In addition, a certain module may be stored in the memory of the following system in the form of program codes, and the functions of the following certain module may be called and executed by a certain processing element of the following system. The implementation of the other modules is similar. All or part of the modules can be integrated together or can be implemented independently. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module below may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
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 (ASIC), one or more digital signal processors (DIGITAL SIGNAL Processor DSP), one or more field programmable gate arrays (Field Programmable GATE ARRAY FPGA), etc. When a module is implemented in the form of a processing element calling program code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may call program code. These modules may be integrated together and implemented in the form of a System-on-a-chip (SOC) for short.
Referring to fig. 1, a schematic structure diagram of an access acceleration system based on embedded H5 according to an embodiment of the invention is shown. As shown in fig. 1, the embedded H5-based access acceleration system includes: a client 1 and a server 2; the client 1 comprises an H5 page interception module 11; the server 2 includes an offline package management module 21 and a cloud disk module 22.
Responding to the loading of the H5 page by the client 1, and acquiring a page address of the H5 page to be loaded by the H5 page interception module 11 by utilizing a preset outer link interception rule; the client 1 initiates a request to the offline package management module 21 according to the page address.
The offline package management module 21 returns offline package 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 an 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.
And responding to the client 1 to load the H5 page to be loaded again, and acquiring a page loading resource corresponding to the H5 page to be loaded through the local storage address by the client 1 according to the matching relation of the page address and the local storage address.
Referring to FIG. 2, a schematic diagram of an access acceleration system based on embedded H5 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 package generation module 24.
In response to the client 1 loading 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 obtains a second resource list corresponding to the page address from the offline package management module 21;
In response to the first resource address list being different from the second resource list, the client 1 generates a compressed packet according to the content address of the first resource address list, uploads the compressed packet to the cloud disk module, obtains the 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 the first resource address list according to the local storage condition of the resource content address list at the client includes:
And the client sends the page address and all resource address information required by page loading to the offline package generation module.
The offline packet generating module reads the page address and all resource address lists required by page loading, takes all the resource address lists required by page loading as the first resource address list, and circulates the resource address list in the first resource address list.
Acquiring a resource address, judging whether the mapping relation between the page and the current resource address exists or not, and storing the corresponding relation between the page address and the resource address if the mapping relation does not exist; if so, acquiring the next resource address until all the resource addresses of the first resource address list are traversed.
In an embodiment, the offline package management module performs 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, and 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 package.
And uploading the compressed package to the cloud disk module.
And the cloud disc module returns the download address of the compressed packet.
And the offline packet generation 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 upgrading on the offline package, and generates and stores new offline package information.
In an embodiment, in response to the client loading the H5 page, the H5 page interception module obtains a page address of the H5 page to be loaded by using a preset outbound interception rule, including:
And the client loads the H5 content and initiates a client request according to the loaded H5 content address.
And the H5 page interception module intercepts the client request by utilizing a preset outer chain interception rule, and acquires the page address of the H5 page to be loaded.
In an embodiment, the offline package management module returns offline package information corresponding to the H5 page to be loaded to the client according to the page address, including:
the client initiates an offline package request to the offline package management module by using a request parameter; wherein the request parameter includes the page address.
The offline package management module inquires offline package information corresponding to the page address according to the page address; and returning the offline package information to the client.
In an embodiment, the client stores the offline package and records a page address, an offline package version, and a local storage address corresponding to the offline package, including:
the client judges whether the offline package exists locally;
Responding to the fact that the client-side does not have the offline package locally, initiating a request for downloading the offline package to the cloud disk module, 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 offline package which is locally existed at the client and the offline package version needs to be updated, initiating a request for downloading the offline package to the cloud disk module, 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 the H5 page loading instruction, acquire the 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 the local directory of the client according to the preset outer chain interception rule when the H5 page loading instruction loads the H5 page in the client, if so, replace the resource outer chain of the loading resource with the address of the local directory, and acquire the loading resource from the local directory; and in addition, the loading speed of the H5 page in the client can be further improved by loading from the local directory, and the core part of the H5 page in the client can be loaded firstly even under the condition of weak network or no network.
In an embodiment, the operation of the access acceleration system based on embedded H5 further includes determining whether a pre-additively configured offline parameter is detected when the preset H5 item link is accessed by the application; if the preset offline parameters are detected when the preset links are accessed through the application program, reading the configuration file; downloading offline resources to the client according to the configuration file; when the user is detected to access the H5 project link in the application program, intercepting a request through the application program and returning a static file corresponding to the local client side, so that the user can automatically access the application program in a offline mode.
Specifically, when the H5 item entry link is configured by the operation background, such as https:// example. The application program reads the URL for the first time, detects the offset=true, and indicates that the project can be offline, reads the manifest. Json configuration file under the project root directory, and downloads all offline resources to the client according to the file and directory structure in the configuration file. When the user accesses the H5 in the application program, the application program intercepts the request and returns the static file corresponding to the local part, so that the automatic offline access effect is achieved.
Referring to fig. 3 and fig. 4, a flowchart of a client execution of the embedded H5-based access acceleration system of the present application in one embodiment and a flowchart of a server execution of the embedded H5-based access acceleration system of the present application in one embodiment are shown, respectively. As shown in fig. 3 and fig. 4, in practical application, the service end is a back end, the service processing module is back end-service processing, the offline package generating module is a back end-offline package generator, the offline package management module is a back end-offline package manager, and the Yun Pan module is a back end-cloud disk. Fig. 3 and 4 combine to present the working principle of the access acceleration system based on embedded H5 of the present application, wherein the "back-end offline packet generator send" in fig. 3: 1. the page address, 2, the whole address of the page load refers to the step of reading the page address from the request parameter and the whole resource address list required by the page load in fig. 4, and performing the loop on the resource address list. The "show page content" in fig. 3 and the "processed" in fig. 4 are converged to one point.
With reference to fig. 3 and 4, the workflow of the access acceleration system based on 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, intercepting the client request by using JSBridge technology (JSBridge technology adopted in the prior art) to obtain the page address to be loaded.
And 5, the client initiates a request to the offline package manager service of the back end, wherein the request parameter carries the page address.
And 6, receiving the page address in the request parameter by the offline package manager at the back end, inquiring the offline package information of the page address, and then returning.
Step 7, the client judges whether the offline package information returned by the back-end offline package manager is empty, and if not, reads the content in the offline package information, wherein the content comprises an offline package version and an offline package download address:
i. is there offline package information local to the client?
1. If not present
A) Initiating a request for downloading an offline packet, wherein the address is a returned offline packet downloading address;
b) The back-end cloud disk returns offline package content;
c) The client stores the returned offline package content information, records the page address, the offline package version, the offline package local storage address and other information.
2. If present
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 update is needed.
I. If it is required to update
(1) Initiating a request for downloading an offline packet, wherein the address is a returned offline packet downloading address;
(2) The back-end cloud disk returns offline package content;
(3) And the client stores the returned offline package content information, records the page address, the offline package version, the offline package local storage address and other information.
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, the mark is marked to be no longer intercepted, and the request is ensured JSBridge not to be intercepted again).
And 9, receiving the request by the back-end service processing module, and returning the related content of the page to the client.
And 10, the client acquires the returned content of the client through JSBridge, analyzes the content in the returned content, and acquires all resource content address lists (JS-script, CSS-style, video, picture and the like) in the page.
Step 11, creating an empty list, and marking the empty list as a difference set list.
Step 12. The client checks if there is an offline packet of the current page address?
A) If present
I. reading all resource content lists in the offline package;
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 into the difference set list created in the step 11;
The client replaces the resource address in the page that matches the address of the resource in the offline package with the resource address in the local offline package.
B) If not, all the resource contents in the page contents are stored in the poor set.
Step 13. At this time, the following steps 14 and 15 are concurrently performed:
step 14:
a) The client sends to the back-end offline package generator: page address and all resource address information required for page loading;
b) Reading the page address and all resource address lists (marked as list A) required by page loading from the request parameters, and circulating the resource address lists;
c) Obtaining a slave resource address from the list A;
d) Determining whether a mapping relationship between a page and a current resource address exists?
I. If it is not present, and storing the corresponding relation between the page address and the resource address.
E) Is the current cycle ended?
I. if not, returning to the step 14. C;
if it has ended
(1) And acquiring offline package information corresponding to the page address from a package manager at the back end.
(2) The packet manager at the back end returns all the information of the offline packet of the page address, including the page address, version information, and resource list information (the list record is B) contained in the offline packet.
(3) Is comparison list a and list B the same?
(3.1) If different
I. The content address of the circulation list A is used for downloading relevant resources to the local and placing the relevant resources in a folder;
compressing the downloaded content into a compressed package;
uploading the compressed package to a back-end cloud disk;
back-end cloud disk returns the download address of the compressed packet;
v. the back-end offline packet generator sends the page address and the list A as well as the compressed packet address to the packet manager;
the back-end package manager receives the request, acquires the offline package version of the page address from the parameters, and then upgrades the version (for example, 1 can be added);
storing new offline package information, including page address, list information, package download address, and version information;
viii. finish the treatment.
(3.2) If the same, no treatment is used.
F) The process ends and the flow ends.
And 15, continuing loading the page content by the client.
A) Performing page display;
b) The flow ends.
Referring to fig. 5, a schematic flow chart of an access acceleration method based on embedded H5 according to an embodiment of the present invention is shown. As shown in fig. 5, the access acceleration method based on embedded H5 specifically includes the following steps:
s51, responding to loading of the H5 page by the client, and acquiring a page address of the H5 page to be loaded by utilizing a preset outer link interception rule.
S52, returning offline 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, requesting 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.
S54, responding to the client to load the H5 page to be loaded again, and acquiring page loading resources corresponding to the H5 page to be loaded through the local storage address according to the matching relation of the page address and the local storage address.
The protection scope of the access acceleration method based on embedded H5 in the present invention is not limited to the execution sequence of the steps listed in this embodiment, and all the schemes implemented by the steps of increasing or decreasing and step replacing 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 is in one-to-one correspondence with the access acceleration method based on the embedded H5, 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 comprises but is not limited to the structure of the access acceleration system based on the embedded H5 listed in the embodiment, and all the structural variations and substitutions of the prior art 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 appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by computer program related hardware. The aforementioned computer program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned computer-readable storage medium includes: various computer storage media such as ROM, RAM, magnetic or optical disks may store program code.
Referring to fig. 6, a schematic structural connection diagram of an electronic device according to an embodiment of the invention is shown. As shown in fig. 6, the present embodiment provides an electronic device 6, specifically including: 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 that the electronic device 6 performs the steps of the embedded H5-based access acceleration method.
The processor 61 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), and the like; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuit, ASIC, field programmable gate array (Field Programmable GateArray, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The memory 62 may include random access memory (Random Access Memory, RAM) and may also include non-volatile memory (non-volatilememory), such as at least one disk memory.
In practical applications, the electronic device may be a computer including all or part of the components of a memory, a memory controller, one or more processing units (CPUs), a peripheral interface, an RF circuit, an audio circuit, a speaker, a microphone, an input/output (I/O) subsystem, a display screen, other output or control devices, and an external port; the computer includes, but is not limited to, a Personal computer such as a desktop computer, a notebook computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), and the like. In other embodiments, the electronic device may also be a server, where the server may be disposed on one or more entity servers according to multiple factors such as functions, loads, and the like, and may also be a cloud server formed by a distributed or centralized server cluster, which is not limited in this embodiment.
In summary, according to the access acceleration system, the method, the storage medium and the electronic device based on the embedded H5, the resource list obtained when the client loads the page is sent 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 method solves the problem that the embedded H5 loading speed is not fast enough, improves the loading speed, can realize second-level loading when loading for the first time, and can realize the batch preloading of related resources to speed up. The invention carries out version management through a management mechanism and can automatically update the cache content, thereby providing a specific version management and updating mechanism under the condition of preloading the embedded H5. The invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.

Claims (9)

1. An embedded H5-based access acceleration system, the embedded H5-based access acceleration system comprising: 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 loading of the H5 page by the client, and acquiring a page address of the H5 page to be loaded by the H5 page interception module by utilizing a preset outer chain interception rule; the client initiates a request to the offline package management module according to the page address;
The offline package management module returns offline 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 download address;
The client requests the cloud disk module to download an offline package according to the offline package download address; 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 page loading resources corresponding to the H5 page to be loaded through the local storage address by the client according to the matching relation of the page address and the local storage address;
The server side further comprises: the service processing module and the offline package generating module; responding to the client to load the H5 page to be loaded again, initiating a page request to the service processing module by the client according to the page address, and returning the page content related to the page request to the client by the service processing module; the client 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; the client acquires a second resource list corresponding to the page address from the offline package management module; and responding to the difference between the first resource address list and the second resource 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 the 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.
2. The embedded H5-based access acceleration system of claim 1, wherein generating a first resource address list based on a local storage of the resource content address list at the client comprises:
The client sends page addresses and all resource address information required by page loading to the offline package generating module;
The off-line packet generating module reads the page address and all resource address lists required by page loading, takes all the resource address lists required by page loading as the first resource address list, and circulates the resource address list in the first resource address list;
acquiring a resource address, judging whether the mapping relation between the page and the current resource address exists or not, and storing the corresponding relation between the page address and the resource address if the mapping relation does not exist; if so, acquiring the next resource address until all the resource addresses of the first resource address list are traversed.
3. The H5-based access acceleration system of claim 1, wherein the offline package management module performs 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, comprising:
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 compressed package;
Uploading the compressed package to the cloud disk module;
The cloud disk module returns a download address of the compressed packet;
The offline packet generation 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 upgrading on the offline package, and generates and stores new offline package information.
4. The H5-based access acceleration system of claim 1, wherein the H5 page intercept module, in response to the client loading an H5 page, obtains a page address of the H5 page to be loaded using a preset out-link intercept rule, comprising:
the client loads an H5 page and initiates a client request according to the loaded H5 page address;
and the H5 page interception module intercepts the client request by utilizing a preset outer chain interception rule, and acquires the page address of the H5 page to be loaded.
5. The H5-based access acceleration system of claim 1, wherein the offline package management module returns offline package information corresponding to the H5 page to be loaded to the client according to the page address, comprising:
The client initiates an offline package request to the offline package management module by using a request parameter; wherein the request parameter comprises the page address;
the offline package management module inquires offline package information corresponding to the page address according to the page address; and returning the offline package information to the client.
6. The embedded H5-based access acceleration system of claim 1, wherein the client storing the offline package and recording a page address, an offline package version, and a local storage address corresponding to the offline package, comprises:
the client judges whether the offline package exists locally;
Responding to the fact that the client-side does not have the offline package locally, initiating a request for downloading the offline package to the cloud disk module, 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 offline package which is locally existed at the client and the offline package version needs to be updated, initiating a request for downloading the offline package to the cloud disk module, 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.
7. The access acceleration method based on the embedded H5 is characterized by comprising the following steps of:
Responding to loading of the H5 page by the client, and acquiring a page address of the H5 page to be loaded by utilizing a preset outer chain interception rule;
According to the page address, returning offline package information corresponding to the H5 page to be loaded to the client; the offline package information comprises an offline package download address;
requesting to download the offline package according to the offline package download address; 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 page loading resources corresponding to the H5 page to be loaded through the local storage address according to the matching relation of the page address and the local storage address;
The client comprises an H5 page interception module; the server side comprises an offline package management module, a Yun Pan module, a service processing module and an offline package generation module; responding to the client to load the H5 page to be loaded again, initiating a page request to the service processing module by the client according to the page address, and returning the page content related to the page request to the client by the service processing module; the client 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; the client acquires a second resource list corresponding to the page address from the offline package management module; and responding to the difference between the first resource address list and the second resource 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 the 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.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the embedded H5-based access acceleration method of claim 7.
9. 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 in the memory, so that the electronic device executes the embedded H5-based access acceleration method of claim 7.
CN202211320794.0A 2022-10-26 2022-10-26 Access acceleration system and method based on embedded H5, storage medium and electronic equipment Active CN115714706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211320794.0A CN115714706B (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 CN115714706B (en) 2022-10-26 2022-10-26 Access acceleration system and method based on embedded H5, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115714706A CN115714706A (en) 2023-02-24
CN115714706B true CN115714706B (en) 2024-11-05

Family

ID=85231425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211320794.0A Active CN115714706B (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) CN115714706B (en)

Families Citing this family (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

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108520059A (en) * 2018-04-09 2018-09-11 世纪龙信息网络有限责任公司 Loading method, system, computer equipment and the storage medium of the client H5 pages
CN112612977A (en) * 2020-12-15 2021-04-06 京东数字科技控股股份有限公司 Page display method, system, device, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10147893C2 (en) * 2001-09-28 2003-11-27 Siemens Ag Method and device for resource access in HTML documents
US8244678B1 (en) * 2008-08-27 2012-08-14 Spearstone Management, LLC Method and apparatus for managing backup data
CN105160010A (en) * 2015-09-22 2015-12-16 北京金山安全软件有限公司 Method and device for starting browser through external link and terminal equipment
CN114697304B (en) * 2020-12-28 2023-12-01 京东科技控股股份有限公司 Gray release method, system, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108520059A (en) * 2018-04-09 2018-09-11 世纪龙信息网络有限责任公司 Loading method, system, computer equipment and the storage medium of the client H5 pages
CN112612977A (en) * 2020-12-15 2021-04-06 京东数字科技控股股份有限公司 Page display method, system, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115714706A (en) 2023-02-24

Similar Documents

Publication Publication Date Title
CN112000348B (en) Control method, device and computer equipment for service gray level release
CN108958796B (en) Service request processing method and device and service request processing system
CN111782339B (en) Container creation method and device, electronic equipment and storage medium
US8856365B2 (en) Computer-implemented method, computer system and computer readable medium
CN109614167B (en) Method and system for managing plug-ins
CN112948025B (en) Data loading method and device, storage medium, computing equipment and computing system
CN115714706B (en) Access acceleration system and method based on embedded H5, storage medium and electronic equipment
CN114217908A (en) Container starting method, system, device and equipment
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN109032693B (en) Method and device for loading display information, electronic equipment and readable storage medium
CN115268949A (en) Mirror preheating method, device, equipment and storage medium
CN112688807B (en) One-stop linkage response blue-green deployment method and device and electronic equipment
CN112214250A (en) Application program assembly loading method and device
CN104504113A (en) Method and device for processing information by mobile browser and mobile terminal
CN113656100A (en) Interface switching method and device, electronic device and computer program product
CN112463251A (en) Method and device for configuring hot publishing by uliweb framework
CN113934437B (en) Method and system for installing application on cloud mobile phone and client cloud mobile phone
CN113867776B (en) Method and device for issuing middle-stage application, electronic equipment and storage medium
CN112181470B (en) Patch deployment method and device
CN117827390A (en) Data processing method and computer device
US12026512B2 (en) Microservice data item storage and retrieval using generation-based cache
CN113741945B (en) Cloud application-based application disk thermal updating method, device, medium and equipment
CN111309380A (en) Service instance configuration method, device and system
CN112540772A (en) Application issuing method and system, electronic device and storage medium
CN111142972A (en) Method, apparatus, system, and medium for extending functions of application program

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

Effective date of registration: 20240910

Address after: Room F18, 26th Floor, TB Business Building, China Resources MixC, No. 6 Hongshanyuan Road, Hongshan Town, Gulou District, Fuzhou City, Fujian Province, 350002

Applicant after: Yonghui Technology Co.,Ltd.

Country or region after: China

Address before: 100000 No. 1701-1703, Floor 17, Tower A, Zhizhen Building, No. 7, Zhichun Road, Haidian District, Beijing

Applicant before: Beijing Yonghui Technology Co.,Ltd.

Country or region before: China

GR01 Patent grant