Access acceleration system, method, storage medium and electronic device based on embedded H5

By using the access acceleration system embedded in H5 during the H5 page loading process, using offline package management and cloud disk modules, the problems of slow loading speed and lack of version management are solved, and second-level loading and automatic updates are achieved, and loading is improved. Efficiency and resource management.

CN115714706BActive Publication Date: 2024-11-05YONGHUI SUPERMARKET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211320794.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2024-11-05
Estimated Expiration
2042-10-26

Smart Images

  • Figure CN115714706B_ABST
    Figure CN115714706B_ABST
Patent Text Reader

Abstract

The present invention provides an access acceleration system, method, storage medium and electronic device based on embedded H5, wherein the access acceleration system based on embedded H5 includes: a client and a server; in response to the client loading an H5 page, intercepting and obtaining the page address of the H5 page to be loaded; the client initiates a request to an 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 includes an offline package download address; the client requests the cloud disk module to download the offline package according to the offline package download address; in response to the client loading the H5 page to be loaded again, the client obtains the page loading resource corresponding to the H5 page to be loaded through the locally stored offline package information. The present invention can effectively improve the loading speed of embedded H5, and embedded H5 provides version management and update mechanism in the case of preloading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of page access, and relates to a page access acceleration method, and in particular to an access acceleration system, method, storage medium and electronic device based on embedded H5. Background Art

[0002] Currently, in the process of native preloading of H5 on the client, the client uses JSBridge technology to intercept resource requests in the web page, and then forwards them to the client's native program. Next, the content is downloaded through the native program, and finally replaced. When the next request is made to load, it can be loaded directly.

[0003] However, the above method has the following disadvantages: on the one hand, the loading speed is slow. For example, when loading for the first time, it is difficult to load in seconds, and it is impossible to preload related resources in batches to speed up. On the other hand, there is no version management, and the cache content cannot be automatically updated.

[0004] Therefore, how to provide an access acceleration system, method, storage medium and electronic device based on embedded H5 to solve the defects of the existing technology that cannot further improve the access speed of embedded H5 has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0005] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide an access acceleration system, method, storage medium and electronic device based on embedded H5, so as to solve the problem that the prior art cannot further improve the access speed of embedded H5.

[0006] To achieve the above-mentioned purpose and other related purposes, the present invention provides an access acceleration system based on embedded H5 on one hand, and the access acceleration system based on embedded H5 includes: a client and a server; the client includes an H5 page interception module; the server includes an offline package management module and a cloud disk module; in response to the client loading the H5 page, the H5 page interception module obtains the page address of the H5 page to be loaded by using a preset external link 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 includes an offline package download address; the client requests the cloud disk module to download the offline package according to the offline package download address; the offline package is stored and the page address, offline package version and local storage address corresponding to the offline package are recorded; in response to the client loading the H5 page to be loaded again, the client obtains 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.

[0007] In one embodiment of the present invention, the server also includes: a service processing module and an offline package generation module; in response to the client loading the H5 page to be loaded 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 parses the page content and obtains a resource content address list of the H5 page to be loaded; generates a first resource address list according to the storage status of the resource content address list locally on the client; the client obtains a second resource list corresponding to the page address from the offline package management module; in response to the first resource address list being different from the second resource list, the client generates a compressed package according to the content address of the first resource address list, uploads the compressed package to the cloud disk module, obtains the download address of the compressed package returned by the cloud disk module, and the offline package management module performs a 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.

[0008] In one embodiment of the present invention, a first resource address list is generated according to the storage status of the resource content address list locally on the client, including: the client sends a page address and all resource address information required for page loading to the offline package generation module; the offline package generation module reads the page address and the list of all resource addresses required for page loading, takes the list of all resource addresses required for page loading as the first resource address list, and loops the resource address lists in the first resource address list; obtains a resource address, determines whether a mapping relationship between the page and the current resource address exists, and if not, stores the corresponding relationship between the page address and the resource address; if so, obtains the next resource address, until all resource addresses in the first resource address list are traversed.

[0009] In one embodiment of the present invention, the offline package management module performs a version upgrade on the offline package of the page address according to the page address, the first resource address list and the download address of the compressed package sent by the offline package generation module, including: looping the content address of the first resource address list, downloading the resources of the content address to the local, and storing them 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 the download address of the compressed package; the offline package generation module sends the page address, the first resource address list and the download address of the compressed package to the offline package management module; the offline package management module obtains the offline package of the page address, performs a version upgrade on the offline package, and generates and saves new offline package information.

[0010] In one embodiment of the present invention, in response to the client loading the H5 page, the H5 page interception module uses a preset external link interception rule to obtain the page address of the H5 page to be loaded, including: the client loads the H5 content and initiates a client request according to the loaded H5 content address; the H5 page interception module uses a preset external link interception rule to intercept the client request and obtain the page address of the H5 page to be loaded.

[0011] In one 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 using request parameters; wherein the request parameters include the page address; the offline package management module queries the offline package information corresponding to the page address according to the page address; and returns the offline package information to the client.

[0012] In one embodiment of the present invention, 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 determines whether the offline package exists locally; in response to the offline package not existing locally on the client, initiates a request to download the offline package to the cloud disk module, stores the offline package returned by the cloud disk module and records the page address, offline package version and local storage address corresponding to the offline package; in response to the offline package existing locally on the client and the offline package version needs to be updated, initiates a request to download the offline package to the cloud disk module, stores the offline package returned by the cloud disk module and records the page address, offline package version and local storage address corresponding to the offline package.

[0013] To achieve the above-mentioned purpose and other related purposes, the present invention provides an access acceleration method based on embedded H5 on the other hand, and the access acceleration method based on embedded H5 includes: in response to the client loading the H5 page, using the pre-set external link interception rule to obtain the page address of the H5 page to be loaded; according to the page address, returning the offline package information corresponding to the H5 page to be loaded to the client; the offline package information includes an offline package download address; requesting to download the offline package according to the offline package download address; storing the offline package and recording the page address, offline package version and local storage address corresponding to the offline package; in response to the client loading the H5 page to be loaded again, according to the matching relationship between the page address and the local storage address, obtaining the page loading resource corresponding to the H5 page to be loaded through the local storage address.

[0014] To achieve the above-mentioned purpose and other related purposes, the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the access acceleration method based on embedded H5 is implemented.

[0015] To achieve the above-mentioned purpose and other related purposes, the last aspect of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that the electronic device executes the access acceleration method based on embedded H5.

[0016] As described above, the access acceleration system, method, storage medium and electronic device based on embedded H5 described in the present invention have the following beneficial effects:

[0017] The present invention obtains a resource list when the client loads a page and sends it to the backend. The backend automatically generates an offline package in real time according to different lists, and then the client accelerates the access speed of the embedded H5 by loading the offline package. The present invention solves the problem that the embedded H5 loading speed is not fast enough and improves the loading speed. For example, when loading for the first time, it can be loaded in seconds, and related resources can be preloaded in batches to speed up. The present invention performs version management through a management mechanism, and can automatically update cache content. Therefore, the embedded H5 provides a specific version management and update mechanism when preloaded. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Shown is a schematic diagram of the structure of an access acceleration system based on embedded H5 in one embodiment of the present invention.

[0019] Figure 2 Shown is a structural principle diagram of an access acceleration system based on embedded H5 in one embodiment of the present invention.

[0020] Figure 3 Shown is a client execution flow chart of an embedded H5-based access acceleration system in one embodiment of the present invention.

[0021] Figure 4 Shown is a server-side execution flow chart of an access acceleration system based on embedded H5 in one embodiment of the present invention.

[0022] Figure 5 Shown is a principle flow chart of an access acceleration method based on embedded H5 in one embodiment of the present invention.

[0023] Figure 6 It is a schematic diagram showing the structural connection of an electronic device in one embodiment of the present invention.

[0024] Component number description

[0025] 1 Client

[0026] 11 H5 page interception module

[0027] 2 Server

[0028] 21 Offline package management module

[0029] 22 Cloud Disk Module

[0030] 23 Service Processing Module

[0031] 24 Offline package generation module

[0032] Steps S51 to S54

[0033] 6 Electronic devices

[0034] 61 Processor

[0035] 62 Memory DETAILED DESCRIPTION

[0036] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0037] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present invention in a schematic manner, and thus the illustrations only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0038] The access acceleration system, method, storage medium and electronic device based on embedded H5 described in the present invention can effectively improve the loading speed of embedded H5, and the embedded H5 provides version management and update mechanism when pre-loaded.

[0039] The following will be combined Figures 1 to 6 The principles and implementation methods of an access acceleration system, method, storage medium and electronic device based on embedded H5 of this embodiment are elaborated in detail, so that those skilled in the art can understand the access acceleration system, method, storage medium and electronic device based on embedded H5 of this embodiment without creative work.

[0040] First, the access acceleration system based on embedded H5 provided in this embodiment is described in detail in conjunction with the diagram. It should be noted that it should be understood that the division of the various modules of the following system is only a division of logical functions. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by processing elements, or all in the form of hardware, or some modules can be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example: a module can be a separately established processing element, or it can be integrated in a chip of the following system. In addition, a module can also be stored in the memory of the following system in the form of program code, and called and executed by a processing element of the following system. The implementation of other modules is similar. These modules can be integrated together in whole or in part, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the following modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0041] The following modules may be one or more integrated circuits configured to implement the above method, for example: one or more application specific integrated circuits (ASIC), one or more digital signal processors (DSP), one or more field programmable gate arrays (FPGA), etc. When a module below is implemented in the form of a processing element calling a program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call a program code. These modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0042] See also Figure 1 , which is a schematic diagram of the structure of an access acceleration system based on embedded H5 in one embodiment of the present invention. Figure 1 As shown, the access acceleration system based on embedded H5 includes: a client 1 and a server 2; the client 1 includes an H5 page interception module 11; the server 2 includes an offline package management module 21 and a cloud disk module 22.

[0043] In response to the client 1 loading the H5 page, the H5 page interception module 11 obtains the page address of the H5 page to be loaded using the preset external link interception rule; the client 1 initiates a request to the offline package management module 21 according to the page address.

[0044] 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.

[0045] The client 1 requests the cloud disk module 22 to download the offline package according to the offline package download address; stores the offline package and records the page address, offline package version and local storage address corresponding to the offline package.

[0046] In response to the client 1 loading the H5 page to be loaded again, the client 1 obtains 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.

[0047] See also Figure 2 , which is a schematic diagram of the structure of an access acceleration system based on embedded H5 in one embodiment of the present invention. Figure 2 As shown, the server also includes: a service processing module 23 and an offline package generation module 24.

[0048] 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;

[0049] The client 1 parses the page content to obtain a resource content address list of the H5 page to be loaded; and generates a first resource address list according to the storage status of the resource content address list locally on the client 1;

[0050] The client 1 obtains a second resource list corresponding to the page address from the offline package management module 21;

[0051] In response to the first resource address list being different from the second resource list, the client 1 generates a compressed package according to the content address of the first resource address list, uploads the compressed package to the cloud disk module, obtains the download address of the compressed package returned by the cloud disk module 22, and the offline package management module 21 upgrades the version of the offline package of the page address according to the page address sent by the offline package generation module 24, the first resource address list and the download address of the compressed package.

[0052] In one embodiment, generating a first resource address list according to the storage status of the resource content address list locally on the client includes:

[0053] The client sends the page address and all resource address information required for page loading to the offline package generation module.

[0054] The offline package generation module reads the page address and a list of all resource addresses required for page loading, takes the list of all resource addresses required for page loading as the first resource address list, and loops through the resource address lists in the first resource address list.

[0055] Get a resource address, determine whether a mapping relationship between the page and the current resource address exists, if not, store the corresponding relationship between the page address and the resource address; if it exists, get the next resource address until all resource addresses in the first resource address list are traversed.

[0056] In one embodiment, the offline package management module performs a 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, including:

[0057] The content addresses in the first resource address list are looped, and the resources at the content addresses are downloaded to the local computer and stored in a folder.

[0058] Compress the downloaded resources into a compressed package.

[0059] Upload the compressed package to the cloud disk module.

[0060] The cloud disk module returns the download address of the compressed package.

[0061] The offline package generation module sends the page address, the first resource address list and the download address of the compressed package to the offline package management module.

[0062] The offline package management module obtains the offline package of the page address, performs version upgrade on the offline package, and generates and saves new offline package information.

[0063] In one embodiment, in response to the client loading the H5 page, the H5 page interception module obtains the page address of the H5 page to be loaded using a preset external link interception rule, including:

[0064] The client loads the H5 content and initiates a client request according to the address of the loaded H5 content.

[0065] The H5 page interception module intercepts the client request using a preset external link interception rule to obtain the page address of the H5 page to be loaded.

[0066] In one 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:

[0067] The client initiates an offline package request to the offline package management module using request parameters; wherein the request parameters include the page address.

[0068] The offline package management module queries offline package information corresponding to the page address according to the page address; and returns the offline package information to the client.

[0069] In one embodiment, the client stores the offline package and records the page address, offline package version and local storage address corresponding to the offline package, including:

[0070] The client determines whether the offline package exists locally;

[0071] In response to the offline package not existing locally on the client, initiating a request to download 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;

[0072] In response to the offline package existing locally on the client and the offline package version needing to be updated, a request to download the offline package is initiated to the cloud disk module, the offline package returned by the cloud disk module is stored, and the page address, offline package version and local storage address corresponding to the offline package are recorded.

[0073] Therefore, the present application receives an H5 page loading instruction, obtains the resource external link of the H5 page according to the H5 page loading instruction, and when loading the H5 page in the client in response to the H5 page loading instruction, determines whether the loading resource of the H5 page is in the local directory of the client according to the pre-set external link interception rules. If so, replaces the resource external link of the loading resource with the address of the local directory, and obtains the loading resource from the local directory; pulls the loading resource from the local directory to reduce the consumption of the client H5 page loading traffic. In addition, loading from the local directory also further improves the loading speed of the H5 page in the client, and the core part of the H5 page in the client can be loaded first even in weak network or no network.

[0074] In one embodiment, the access acceleration system based on embedded H5 also includes, when running, determining whether a pre-added offline parameter is detected when accessing a preset H5 project link through an application; if a pre-added offline parameter is detected when accessing the preset link through an application, reading a configuration file; downloading offline resources to the client according to the configuration file; and when detecting that a user accesses the H5 project link within the application, intercepting the request through the application and returning the corresponding static file locally on the client, so as to enable automatic offline access within the application.

[0075] Specifically, when configuring the H5 project entry link through the operation background, such as https: / / example.com, add the project offline parameter such as https: / / example.com?offline=true. When the application reads the URL for the first time, it detects offline=true, indicating that this project can be offline. It reads the manifest.json configuration file in 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 this H5 in the application, the application intercepts the request and returns the corresponding local static file to achieve automatic offline access.

[0076] See also Figure 3 and Figure 4 , respectively showing a client execution flow chart of an access acceleration system based on embedded H5 in one embodiment of the present invention and a server execution flow chart of an access acceleration system based on embedded H5 in one embodiment of the present invention. Figure 3 and Figure 4 As shown, in actual applications, the server is the backend, the service processing module is the backend-service processing, the offline package generation module is the backend-offline package generator, the offline package management module is the backend-offline package manager, and the cloud disk module is the backend-cloud disk. Figure 3 and Figure 4 The working principle of the access acceleration system based on embedded H5 in this application is presented, wherein: Figure 3 "Send to the backend offline package generator: 1. Page address, 2. All addresses loaded by the page" points to Figure 4 The step of "Read the page address and the list of all resource addresses required for page loading from the request parameters, and loop the resource address list" in the . Figure 3 "Show page content" in Figure 4 The "Processing Completed" in the .

[0077] Combination Figure 3 and Figure 4 , the workflow of the access acceleration system based on embedded H5 is as follows:

[0078] Step 1. The method starts.

[0079] Step 2. The client loads content H5 and loads the content.

[0080] Step 3. The client initiates a request based on the loaded H5 content address.

[0081] Step 4. The client intercepts the client request through JSBridge technology (wherein the JSBridge technology adopted is the existing technology) and obtains the address of the page to be loaded.

[0082] Step 5. The client initiates a request to the offline package manager service at the backend, with the page address in the request parameter.

[0083] Step 6. The backend offline package manager receives the page address in the request parameter, queries the offline package information of the page address, and then returns.

[0084] Step 7. The client determines whether the offline package information returned by the backend offline package manager is empty. If it is not empty, read the content, including the offline package version and the download address of the offline package:

[0085] i. Does the offline package information exist locally on the client?

[0086] 1. If it does not exist

[0087] a) Initiate a request to download an offline package, the address is the returned offline package download address;

[0088] b) The backend cloud disk returns the offline package content;

[0089] c) The client stores the returned offline package content information, and records the page address, offline package version, offline package local storage address and other information.

[0090] 2. If it exists

[0091] a) The client compares the local offline package version with the offline package version returned by the backend offline package manager to see if an update is needed.

[0092] i. If update is required

[0093] (1). Initiate a request to download an offline package, the address is the returned offline package download address;

[0094] (2). The backend cloud disk returns the offline package content;

[0095] (3) The client stores the returned offline package content information, and records the page address, offline package version, offline package local storage address and other information.

[0096] Step 8. The client initiates a page request to the backend service processing module according to the page address (a parameter marker is added to the request to indicate that it will no longer be intercepted, ensuring that JSBridge will not intercept the request again).

[0097] Step 9. The backend service processing module accepts the request and returns the relevant content of the page to the client.

[0098] Step 10. The client obtains the returned content from the client through JSBridge, parses the content, and obtains a list of all resource content addresses in the page (JS-scripts, CSS-styles, videos, pictures, etc.).

[0099] Step 11. Create an empty list and mark it as the difference list.

[0100] Step 12. Does the client check whether the offline package of the current page address exists?

[0101] a) If it exists

[0102] i. Read the list of all resource contents in the offline package;

[0103] ii. Remove the contents 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, which is stored in the difference set list created in step 11;

[0104] iii. 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.

[0105] b) If it does not exist, store the entire resource content list in the page content into the difference set.

[0106] Step 13. At this point, the following steps 14 and 15 are executed concurrently:

[0107] Step 14:

[0108] a) The client sends to the backend offline package generator: the page address and all resource address information required for page loading;

[0109] b) Read the page address and the list of all resource addresses required for page loading (referred to as List A) from the request parameters, and loop through the resource address list;

[0110] c) Get a slave resource address from list A;

[0111] d) Determine whether a mapping relationship exists between the page and the current resource address?

[0112] i. If it does not exist, store the correspondence between the page address and the resource address.

[0113] e) Is the current loop finished?

[0114] i. If not finished, return to step 14.c;

[0115] ii. If it has ended

[0116] (1) Obtain the offline package information corresponding to the page address from the backend package manager.

[0117] (2) The backend package manager returns all the information of the offline package of the page address, including the page address, version information, and the resource list information contained in the offline package (the list is recorded as B).

[0118] (3) Compare List A and List B. Are they the same?

[0119] (3.1). If different

[0120] i. Loop through the content addresses of List A, download the relevant resources to the local computer, and put them in a folder;

[0121] ii. Compress the downloaded content into a compressed package;

[0122] iii. Upload the compressed package to the backend cloud disk;

[0123] iv. The backend cloud disk returns the download address of the compressed package;

[0124] v. The backend offline package generator sends the page address, list A, and compressed package address to the package manager;

[0125] vi. The backend package manager receives the request, obtains the offline package version of the page address from the parameter, and then upgrades the version (for example, it can add 1);

[0126] vii. Save the new offline package information, including page address, list information, package download address, and version information;

[0127] viii. Processing completed.

[0128] (3.2). If they are the same, no processing is required.

[0129] f) The processing is completed and the process ends.

[0130] Step 15. The client continues to load the page content.

[0131] a) Display the page;

[0132] b) The process ends.

[0133] See also Figure 5, which is a principle flow chart of an access acceleration method based on embedded H5 in one embodiment of the present invention. Figure 5 As shown, the access acceleration method based on embedded H5 specifically includes the following steps:

[0134] S51, in response to the client loading the H5 page, the page address of the H5 page to be loaded is obtained using the preset external link interception rule.

[0135] S52: Return 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.

[0136] S53, downloading an offline package according to the offline package download 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.

[0137] S54, in response to the client loading the H5 page to be loaded again, according to the matching relationship between the page address and the local storage address, obtaining a page loading resource corresponding to the H5 page to be loaded through the local storage address.

[0138] The protection scope of the access acceleration method based on embedded H5 described in the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0139] The principle of the access acceleration system based on embedded H5 described in the present invention corresponds one to one with the access acceleration method based on embedded H5 described in the present invention. The access acceleration system based on embedded H5 described in the present invention can implement the access acceleration method based on embedded H5 described in the present invention, but the implementation device of the access acceleration method based on embedded H5 described in the present invention includes but is not limited to the structure of the access acceleration system based on embedded H5 listed in this embodiment. All structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.

[0140] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the access acceleration method based on embedded H5 is implemented.

[0141] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned computer-readable storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various computer storage media that can store program codes.

[0142] See also Figure 6 , which is a schematic diagram showing the structural connection of an electronic device in one embodiment of the present invention. Figure 6 As shown, this embodiment provides an electronic device 6, which specifically includes: a processor 61 and a memory 62; the memory 62 is used to store computer programs, and the processor 61 is used to execute the computer programs stored in the memory 62, so that the electronic device 6 executes each step of the access acceleration method based on embedded H5.

[0143] The above-mentioned processor 61 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0144] The memory 62 may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0145] In practical applications, the electronic device may be a computer including all or part of the components such as a memory, a storage controller, one or more processing units (CPU), 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 personal computers such as desktop computers, laptop computers, tablet computers, smart phones, and personal digital assistants (PDAs). In other embodiments, the electronic device may also be a server, which may be arranged on one or more physical servers according to various factors such as function and load, or may be a cloud server composed of a distributed or centralized server cluster, which is not limited in this embodiment.

[0146] In summary, the access acceleration system, method, storage medium and electronic device based on embedded H5 described in the present invention obtains a resource list when the client loads the page, and sends it to the backend. The backend automatically generates an 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 present invention solves the problem that the embedded H5 loading speed is not fast enough and improves the loading speed. For example, when loading for the first time, it can be loaded in seconds, and related resources can be preloaded in batches to speed up. The present invention performs version management through a management mechanism, and can automatically update cache content. Therefore, the embedded H5 provides a specific version management and update mechanism when preloaded. The present invention effectively overcomes the various shortcomings in the prior art and has a high industrial utilization value.

[0147] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. An access acceleration system based on embedded H5, characterized in that: The access acceleration system based on embedded H5 includes: a client and a server; the client includes an H5 page interception module; the server includes an offline package management module and a cloud disk module; In response to the client loading the H5 page, the H5 page interception module obtains the page address of the H5 page to be loaded using a preset external link 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 includes an offline package download address; The client requests the cloud disk module to download the offline package according to the offline package download address; stores the offline package and records the page address, offline package version and local storage address corresponding to the offline package; In response to the client loading the H5 page to be loaded again, the client acquires a page loading resource corresponding to the H5 page to be loaded through the local storage address according to a matching relationship between the page address and the local storage address; The server also includes: a service processing module and an offline package generation module; in response to the client loading the H5 page to be loaded 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 parses the page content and obtains the resource content address list of the H5 page to be loaded; generates a first resource address list according to the storage status of the resource content address list locally on the client; the client obtains a second resource list corresponding to the page address from the offline package management module; in response to the first resource address list being different from the second resource list, the client generates a compressed package according to the content address of the first resource address list, uploads the compressed package to the cloud disk module, obtains the download address of the compressed package returned by the cloud disk module, and the offline package management module performs a 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.

2. According to claim 1, the access acceleration system based on embedded H5 is characterized in that: Generating a first resource address list according to the storage status of the resource content address list locally on the client includes: The client sends the page address and all resource address information required for page loading to the offline package generation module; The offline package generation module reads the page address and a list of all resource addresses required for page loading, takes the list of all resource addresses required for page loading as the first resource address list, and loops through the resource address lists in the first resource address list; Get a resource address, determine whether a mapping relationship between the page and the current resource address exists, if not, store the corresponding relationship between the page address and the resource address; if it exists, get the next resource address until all resource addresses in the first resource address list are traversed.

3. The access acceleration system based on embedded H5 according to claim 1 is characterized in that: The offline package management module performs a 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, including: Circulate the content addresses in the first resource address list, download the resources at the content addresses to the local computer, and store them in a folder; Compress the downloaded resources into a compressed package; Upload the compressed package to the cloud disk module; The cloud disk module returns the download address of the compressed package; The offline package generation module sends the page address, the first resource address list and the download address of the compressed package to the offline package management module; The offline package management module obtains the offline package of the page address, performs version upgrade on the offline package, and generates and saves new offline package information.

4. The access acceleration system based on embedded H5 according to claim 1 is characterized in that: In response to the client loading the H5 page, the H5 page interception module obtains the page address of the H5 page to be loaded using a preset external link interception rule, including: The client loads the H5 page and initiates a client request according to the address of the loaded H5 page; The H5 page interception module intercepts the client request using a preset external link interception rule to obtain the page address of the H5 page to be loaded.

5. The access acceleration system based on embedded H5 according to claim 1 is characterized in that: 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 using a request parameter; wherein the request parameter includes the page address; The offline package management module queries offline package information corresponding to the page address according to the page address; and returns the offline package information to the client.

6. The access acceleration system based on embedded H5 according to claim 1 is 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 determines whether the offline package exists locally; In response to the offline package not existing locally on the client, initiating a request to download 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; In response to the offline package existing locally on the client and the offline package version needing to be updated, a request to download the offline package is initiated to the cloud disk module, the offline package returned by the cloud disk module is stored, and the page address, offline package version and local storage address corresponding to the offline package are recorded.

7. An access acceleration method based on embedded H5, characterized in that: The access acceleration method based on embedded H5 includes: In response to the client loading the H5 page, the page address of the H5 page to be loaded is obtained using the preset external link interception rules; According to the page address, returning offline package information corresponding to the H5 page to be loaded to the client; the offline package information includes an offline package download address; Request downloading of the offline package according to the offline package download address; storing the offline package and recording the page address, offline package version and local storage address corresponding to the offline package; In response to the client loading the H5 page to be loaded again, according to the matching relationship between the page address and the local storage address, obtaining a page loading resource corresponding to the H5 page to be loaded through the local storage address; The client includes an H5 page interception module; the server includes an offline package management module, a cloud disk module, a service processing module and an offline package generation module; in response to the client loading the H5 page to be loaded 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 parses the page content and obtains a resource content address list of the H5 page to be loaded; a first resource address list is generated according to the storage status of the resource content address list locally on the client; the client obtains a second resource list corresponding to the page address from the offline package management module; in response to the first resource address list being different from the second resource list, the client generates a compressed package according to the content address of the first resource address list, uploads the compressed package to the cloud disk module, obtains the download address of the compressed package returned by the cloud disk module, and the offline package management module performs a 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.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the access acceleration method based on embedded H5 described in claim 7 is implemented.

9. An electronic device, characterized in that: include: Processor and memory; The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that the electronic device executes the access acceleration method based on embedded H5 as described in claim 7.