Cross-platform H5 page resource loading method, storage medium and electronic equipment

By storing static resources of H5 pages locally in the HarmonyOS system and selecting the loading path according to the configuration information, the problem of H5 page lag caused by poor network conditions is solved, and smooth loading and timely updates are achieved when the network is unstable.

CN121523766APending Publication Date: 2026-02-13MOBILE TECH COMPANY CHINA TRAVELSKY HLDG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511682888.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In apps running on the HarmonyOS system, poor network conditions can cause stuttering and unsmooth page loading during H5 page loading.

Method used

The static style control resources of the H5 page are backed up locally, and the resource loading path is determined through the page configuration information. Local or online resource access is used to ensure that the page can still load smoothly when the network is unstable.

Benefits of technology

It improves the user experience, ensures smooth loading of H5 pages even under unstable network conditions, and updates and displays the latest content in a timely manner, avoiding page lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121523766A_ABST
    Figure CN121523766A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of H5 page optimization, in particular to a cross-platform H5 page resource loading method, a storage medium and electronic equipment. Comprising the steps that when a target application is started, page configuration information is obtained, and the information comprises an H5 service module name which is not modified and updated; each H5 page initial static style control resource in the target application is locally backed up. And if the back-section access path in the online resource request path of the H5 page is different from the back-section access path in the module page mapping information, directly loading the online resource. According to the method, related resources of the H5 page can be stored locally, smooth loading of the H5 page is ensured when the network is unstable, and the user experience is improved. However, the problem that local resources cannot be improved in real time after page updating exists. Therefore, by setting page configuration information, available module resources are synchronized in real time, a resource obtaining position is determined, a splicing path is loaded, display content is loaded timely and accurately, and it is ensured that a user can use the latest H5 page in time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of H5 page optimization, in particular to a cross-platform H5 page resource loading method, a storage medium and an electronic device. BACKGROUND

[0002] In some existing APPs running on the Hongmeng system, the pages corresponding to each business module are basically H5 pages. In the H5 page loading process, static style control resources for controlling the display style of the page and dynamic data resources for real-time display need to be loaded. The static style control resources include HTML documents for controlling the page skeleton, CSS style files for controlling the page style, layout and animation, JavaScript files for implementing interaction logic, data request and component initialization, and related static files such as pictures and fonts. The dynamic data resources include some real-time data.

[0003] The loading speed of the above information needs to depend on the quality of the current network. When the terminal is in a poor network condition, the H5 page interaction process will be stuck, and the page loading cannot be smoothly displayed. SUMMARY

[0004] To solve one of the above technical problems, the technical solution adopted by the present application is as follows: According to one aspect of the present application, a cross-platform H5 page resource loading method is provided, which comprises the following steps: In response to a start instruction of a target application, page configuration information corresponding to the target application is obtained from a server; the page configuration information includes the names of each unmodified and updated H5 business module; the target application includes a plurality of H5 business modules displayed in H5 pages, and the initial static style control resources corresponding to each H5 page are stored locally; According to the names of the H5 business modules in the page configuration information, the updated H5 business module corresponding to the post-access path in the local current module page mapping information is removed, so that only the post-access path corresponding to the unmodified and updated H5 business module is retained in the module page mapping information; the post-access path is the same part of the static style control resources corresponding to the H5 page in the local storage path and the server storage path; If the post-access path in the default online resource request path of any requested H5 page is different from all the post-access paths in the module page mapping information, the browser directly loads the online resource according to the default online resource request path of the requested H5 page; the online resource request path is composed of the online pre-embedded access path corresponding to the static style control resources of the corresponding H5 page as a prefix and the post-access path.

[0005] Further, after removing the updated H5 service module corresponding to the subsequent access path in the current module page mapping information according to the name of the H5 service module included in the page configuration information, the method further includes: If the subsequent access path in the default online resource request path of the H5 page loaded by any request is the same as any subsequent access path in the module page mapping information, the online pre-embedded access path in the online resource request path is replaced by the local pre-embedded access path. The browser directly loads the local resource according to the replaced online resource request path of the H5 page loaded by the request.

[0006] Further, in response to the starting instruction of the target application, the method further includes: In response to the starting instruction of the target application, it is checked whether the page configuration information is stored in the local cache. If the page configuration information is stored in the local cache, and the version number of the page configuration information is greater than the version number of the target application, the latest page configuration information is obtained through a preset configuration interface and updated to the local cache. The latest page configuration information is used as the page configuration information currently corresponding to the target application.

[0007] Further, after checking whether the page configuration information is stored in the local cache in response to the starting instruction of the target application, the method further includes: If the page configuration information is not stored in the local cache, the latest page configuration information is obtained through a preset configuration interface and updated to the local cache. The latest page configuration information is used as the page configuration information currently corresponding to the target application.

[0008] Further, after checking whether the page configuration information is stored in the local cache in response to the starting instruction of the target application, the method further includes: If the page configuration information is stored in the local cache, and the version number of the page configuration information is equal to the version number of the target application, the page configuration information in the current local cache is used as the page configuration information currently corresponding to the target application.

[0009] Further, the latest page configuration information is obtained through a preset configuration interface, including: A request is sent to the preset configuration interface. If the request is successful, the request is stopped. If the request fails, and the number of repeated requests is greater than a preset request threshold, the request is stopped and an alarm information is generated.

[0010] Further, after obtaining the page configuration information corresponding to the target application from the server, the method further comprises: If the number of the H5 service modules included in the page configuration information is less than the preset number threshold, generating the update information of the target application.

[0011] Further, the module page mapping information includes a set of back-end paths corresponding to each H5 service module in the target application; the set name of the set of back-end paths is the name of the H5 service module, and the element in the set of back-end paths is the back-end access path of each H5 page included in the H5 service module.

[0012] According to a second aspect of the present application, a non-transitory computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the cross-platform H5 page resource loading method.

[0013] According to a third aspect of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the cross-platform H5 page resource loading method when executing the computer program.

[0014] The present application has at least one of the following beneficial effects: The target application in the present application stores the initial static style control resource corresponding to each H5 page locally, and then stores the H5 page and its related resources locally, so that when the user switches or opens the related H5 page, most or even all of the resources for controlling the display of the H5 page can be obtained locally, thereby ensuring that the application program can still smoothly load the H5 page in the case of unstable or missing network connection, reducing the problem of page interaction process lag and page loading unable to be smoothly displayed, and significantly improving the user experience.

[0015] However, the above-mentioned page resource loading manner can also cause that if the related page is updated, the local related resource cannot be improved in real time, and thus the content displayed by the related H5 page is relatively lagging. In the present application, on this basis, it is determined through setting page configuration information which H5 business module resource is still available, and based on this, it is determined whether the resource of the related H5 page to be requested is in the local or online, and whether the online pre-embedded access path of the H5 page is replaced by the local pre-embedded access path is adaptively determined, to form the corresponding local resource access path or online resource access path, so as to load the display content of the H5 page more timely and accurately. Thus, when the H5 page is opened for display, if the related content is modified, the online modified content is updated and displayed in time, and if the related content is not modified, the local resource is loaded and displayed more quickly. In this way, when the H5 page needs to be updated, the detection and update process can be quickly and accurately performed, and the user can use the latest version of the H5 page in time. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0017] Figure 1 A flowchart of a cross-platform H5 page resource loading method provided by the embodiment of the present application is provided. Figure 2 A flowchart of generating an H5 page resource access path provided by the embodiment of the present application is provided. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0019] The H5 page is essentially a webpage built using web standard technologies such as HTML5, CSS3 and JavaScript. These standards are supported by all modern browsers (regardless of platform). That is, the running of the H5 page does not depend on a specific operating system, but depends on the browser or built-in WebView component on the device. As long as the target device has a compatible browser (such as Chrome, Safari, Firefox, Edge, and the built-in WebView of the Android and iOS systems), the H5 page can be accessed and run. This enables the application displayed by the H5 page to have the ability of "one development, multi-end adaptation", that is, the application can be used across platforms, like an APP (such as the Chinese Consulate HarmonyOS APP), which can run under Android and iOS, and also under the HarmonyOS system.

[0020] However, in the prior art, the "package" that needs to be deployed when the H5 page is put online usually refers to the final static resource set (that is, static style control resources) after construction, optimization and packaging, which is deployed to the server or CDN. The set includes folders or compressed packages of HTML, CSS, JS, pictures, fonts and other static files. When loading the page, these resources are requested to make the page normally displayed.

[0021] As a possible embodiment of the present application, as shown in Figure 1 a cross-platform H5 page resource loading method is provided, which comprises the following steps: S100: In response to a start instruction of a target application, page configuration information corresponding to the target application is obtained from a server. The target application includes a plurality of H5 business modules displayed by H5 pages, and the initial static style control resources corresponding to each H5 page are stored and backed up locally.

[0022] Since the loading of static style control resources will occupy more network traffic, they are backed up locally. Dynamic data resources are usually real-time data, and their volume is small, so they can be loaded in a weak network environment, and need to be obtained in real time, so dynamic data resources are still obtained online, and the obtaining process does not affect the display and loading of the page.

[0023] The page configuration information includes the name of each unmodified and updated H5 business module. The page configuration information can be set in the following form: "module": [ "passport", "annuity", "marriage" ]。

[0024] The field "module" indicates that the local module configuration is adopted, and indicates that the corresponding H5 business module pages included in the following set all adopt local pages. The fields "passport", "annuity", and "marriage" are the names of the H5 business modules.

[0025] The target application in this embodiment locally stores and backs up the initial static style control resources corresponding to each H5 page, and then stores the H5 page and its related resources locally. Thus, when a user switches or opens a related H5 page, most or even all of the resources for controlling the display of the H5 page can be obtained through a local request, so as to ensure that the application program can still smoothly load the H5 page in the case of unstable or missing network connection, reduce the problem of page interaction process lag and page loading unable to be smoothly displayed, and thus significantly improve the user experience.

[0026] Specifically, S100 includes: S101: In response to a starting instruction of a target application, it is checked whether page configuration information is stored in a local cache.

[0027] Specifically, whether the current latest page configuration information is can be determined according to whether the page configuration information exists in the local cache. Specifically, the determination can be made in the following three ways: First S102: If the page configuration information is stored in the local cache, and the version number of the page configuration information is greater than the version number of the target application, the latest page configuration information is obtained through a preset configuration interface, and is updated to the local cache.

[0028] S103: The latest page configuration information is taken as the current corresponding page configuration information of the target application.

[0029] Specifically, obtaining the latest page configuration information through the preset configuration interface includes: S1021: A request is sent to the preset configuration interface.

[0030] S1022: If the request is successful, the request is stopped.

[0031] S1023: If the request fails, and the number of repeated requests is greater than a preset request threshold, the request is stopped and an alarm information is generated.

[0032] When requesting the page configuration through the preset configuration interface, multiple request failures can occur due to poor network and other factors that affect the request success rate. In this embodiment, the request is stopped and an alarm information is generated in this case to timely remind the relevant personnel.

[0033] Second S112: If the page configuration information is not stored in the local cache, the latest page configuration information is obtained through a preset configuration interface, and is updated to the local cache.

[0034] S113: The latest page configuration information is taken as the page configuration information currently corresponding to the target application.

[0035] Third S122: If the page configuration information is stored in the local cache, and the version number of the page configuration information is equal to the version number of the target application, the page configuration information in the current local cache is taken as the page configuration information currently corresponding to the target application.

[0036] Generally, in actual use, the target application program will also be updated and BUG repaired, and in the modification process, some H5 pages may be updated, that is, the modified H5 pages are redeployed to the server or CDN corresponding static style control resources, which are different from the initial static style control resources stored locally.

[0037] In the embodiment, after each related H5 page is updated, the current page configuration information is updated, and the specific update content includes: the name of the H5 business module to which the modified H5 page belongs is deleted from the historical page configuration information, so as to ensure that the remaining H5 business modules in the page configuration information are all resource loading modules from the local. At the same time, the version number of the page configuration information is also increased. For example, if the current version number is 1.0.0, it is modified to 1.0.1.

[0038] Therefore, based on the above characteristics, in the embodiment, through S101 and S102, it can be ensured that after starting the target application each time, the latest page configuration information currently corresponding to the target application is obtained through the version number, so that when each H5 page is loaded subsequently, the corresponding resource access path can be generated more accurately.

[0039] And in the embodiment, the granularity of the modification of the page configuration information is the business module, so that once a small business update is needed, the entire application corresponding resource is updated, and more un-updated H5 pages can be ensured to be loaded quickly by accessing local resources. Of course, the modification granularity can also be adjusted according to actual needs.

[0040] Further, after S100, the method further includes: S110: If the number of H5 business module names included in the page configuration information is less than a preset number threshold, update information of the target application is generated.

[0041] In the most initial page configuration information, the names of all H5 business modules during installation of the target application are saved, but subsequent modification and update will cause the names of part of the H5 business modules to be gradually deleted, thereby causing the names of the H5 business modules in the page configuration information to be less and less during subsequent use, and the less the number of the remaining H5 business modules, the fewer the H5 pages that can be loaded quickly by accessing local resources, that is, the more serious the problems of page interaction process lag and page loading unable to be displayed smoothly. Therefore, when the number of the names of the H5 business modules included in the page configuration information is less than a certain number, the update of the target application program is triggered to backup the latest resources corresponding to each H5 page to the local.

[0042] S200: According to the names of the H5 business modules included in the page configuration information, the updated H5 business module corresponding to the back-end access path in the local current module page mapping information is removed, so that only the back-end access path corresponding to the H5 business module that is not modified and updated is reserved in the module page mapping information. The back-end access path is the static style control resource corresponding to the H5 page, and the same part in the local storage path and the server storage path.

[0043] Specifically, the module page mapping information includes a back-end path set corresponding to each H5 business module in the target application. The set name of the back-end path set is the name of the H5 business module, and the element in the back-end path set is the back-end access path of each H5 page included in the H5 business module.

[0044] The module page mapping information can be set as follows: "passport": [ " / certificate / apply-introduction", " / passport / receipt-status", " / passport / photoSample", ... ], "annuity": [ " / annuity / annuity-introduction", " / annuity / application-form", " / annuity / choose-org", ... ]。

[0045] Wherein, "passport" and "annuity" are the names of the H5 business modules, and " / certificate / apply-introduction" and " / annuity / annuity-introduction" are the back access paths of the H5 pages included in the corresponding H5 business modules.

[0046] Since one target application usually includes multiple H5 business modules, and each H5 business module includes a large number of H5 pages, although the page configuration information and the module page mapping information are both used to determine which H5 pages have been updated and need to be loaded online, and which H5 pages have not been updated and need to be loaded locally, considering the influence of the speed of pulling resources from the online on the smoothness of page loading and the accuracy of the determination information, in the embodiment, the page configuration information that needs to be obtained from the online only includes the name information of the H5 business module, thereby reducing the size of the information and improving the speed of pulling resources from the online. Then, more comprehensive and detailed page routing information is maintained in the local module page mapping information, and the module page mapping information is updated according to the page configuration information, so as to ensure the accuracy of the module page mapping information and facilitate the subsequent accurate matching of the back access paths of the H5 pages.

[0047] As shown in FIG. 3, Figure 2 S300: If the back access path in the default online resource request path of any requested H5 page is different from all the back access paths in the module page mapping information, the browser directly loads the online resource according to the default online resource request path of the requested H5 page. The online resource request path is composed of the online pre-embedded access path corresponding to the static style control resource of the corresponding H5 page as a prefix and the back access path. The online resource request path is also the server storage path.

[0048] Further, as shown in FIG. 4, Figure 2 after the back access paths of the updated H5 business modules in the current module page mapping information are removed according to the name of the H5 business module included in the page configuration information, the method further includes: S400: If the back access path in the default online resource request path of any requested H5 page is the same as any back access path in the module page mapping information, the online pre-embedded access path in the online resource request path is replaced with the local pre-embedded access path.

[0049] S500: The browser directly loads the local resource according to the replaced online resource request path of the requested H5 page.

[0050] The static style control resource of each H5 page in the embodiment is stored locally and online, so that the page loading can be performed by accessing the local resource or the online resource. Meanwhile, whether the local resource access path or the online access path, the latter part in the path is the same, and the former part is different due to the local and online positions. For example, the local resource access path corresponding to the H5 face A is F / app1 / annuity / annuity-introduction, and the online resource access path is jiqun1 / CDN2 / annuity / annuity-introduction.

[0051] The same part is / annuity / annuity-introduction (the latter access path), and the different parts are F / app1 (the local pre-embedded access path) and jiqun1 / CDN2 (the online pre-embedded access path). Based on the characteristics, the same part is stored and maintained as the latter access path in the module page mapping information in the embodiment, and the content in the module page mapping information is updated in real time according to whether the name of the H5 business module to which the latter access path belongs is contained in the page configuration information, so that the matching of the latter access path can be more accurate in the subsequent process. Specifically, according to the matching result of the page latter access path, it is determined whether the page is to access the online resource for loading or the local resource for loading. Since the default online resource request path is the path composed of the online pre-embedded access path as the prefix and the latter access path, when the online resource needs to be accessed, the resource request path does not need to be changed. When the local resource needs to be accessed, the online pre-embedded access path is directly replaced by the local pre-embedded access path, and the final resource access path is formed.

[0052] Therefore, when the H5 page is opened and displayed, if the related content is modified, the online modified content can be updated and displayed in time, and if the related content is not modified, the local resource can be loaded and displayed more quickly. In this way, when the H5 page needs to be updated, the detection and update process can be performed quickly and accurately, and the user can use the latest version of the H5 page in time.

[0053] In addition, although the steps of the method in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be divided into multiple steps, etc.

[0054] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0055] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.

[0056] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely in hardware, entirely in software (including firmware, microcode, etc.), or in a combination of hardware and software, collectively referred to herein as “circuit,” “module,” or “system.”

[0057] An electronic device according to this embodiment of the invention. The electronic device is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the invention.

[0058] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and buses connecting different system components (including memory and processor).

[0059] The memory stores program code that can be executed by a processor, causing the processor to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of the present invention.

[0060] The storage may include readable media in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).

[0061] The storage may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0062] A bus can represent one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus architectures.

[0063] The electronic device can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be performed via input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. The network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0064] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the present invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the present invention described in the "Exemplary Methods" section above.

[0065] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0066] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0067] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0068] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0069] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0070] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0071] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A cross-platform H5 page resource loading method, characterized in that, The method comprises the following steps: In response to a starting instruction of a target application, page configuration information currently corresponding to the target application is acquired from a server; the page configuration information comprises the name of each unmodified and updated H5 service module; the target application comprises a plurality of H5 service modules displayed in H5 pages, and initial static style control resources corresponding to each H5 page are stored locally; According to the name of the H5 service module included in the page configuration information, the updated H5 service module corresponding to the rear access path in the local current module page mapping information is removed, so that only the rear access path corresponding to the unmodified and updated H5 service module is retained in the module page mapping information; the rear access path is a static style control resource corresponding to the H5 page, and is the same part in the local storage path and the server storage path; If the rear access path in the default online resource request path of any requested H5 page is different from all the rear access paths in the module page mapping information, the browser directly loads the online resource according to the default online resource request path of the requested H5 page; the online resource request path is composed of the online pre-embedded access path corresponding to the static style control resource corresponding to the H5 page as a prefix and the rear access path.

2. The method of claim 1, wherein, After the updated H5 service module corresponding to the rear access path in the current module page mapping information is removed according to the name of the H5 service module included in the page configuration information, the method further comprises: If the rear access path in the default online resource request path of any requested H5 page is the same as any rear access path in the module page mapping information, the online pre-embedded access path in the online resource request path is replaced with the local pre-embedded access path; The browser directly loads the local resource according to the replaced and modified online resource request path of the requested H5 page.

3. The method of claim 1, wherein, In response to a starting instruction of a target application, page configuration information currently corresponding to the target application is acquired from a server, which comprises: In response to a starting instruction of a target application, it is checked whether the page configuration information is stored in the local cache; If the page configuration information is stored in the local cache and the version number of the page configuration information is greater than the version number of the target application, the latest page configuration information is acquired through a preset configuration interface and is updated to the local cache; The latest page configuration information is taken as the page configuration information currently corresponding to the target application.

4. The method of claim 3, wherein, After it is checked whether the page configuration information is stored in the local cache in response to a starting instruction of a target application, the method further comprises: If the page configuration information is not stored in the local cache, the latest page configuration information is acquired through a preset configuration interface and is updated to the local cache; The latest page configuration information is taken as the page configuration information currently corresponding to the target application.

5. The method of claim 3, wherein, After it is checked whether the page configuration information is stored in the local cache in response to a starting instruction of a target application, the method further comprises: If the page configuration information is stored in the local cache, and the version number of the page configuration information is equal to the version number of the target application, the page configuration information in the current local cache is taken as the page configuration information currently corresponding to the target application.

6. The method of claim 3, wherein, The method for obtaining the latest page configuration information through a preset configuration interface comprises: sending a request to the preset configuration interface; if the request is successful, stopping the request; if the request fails, and the number of repeated requests is greater than a preset request threshold, stopping the request and generating an alarm information.

7. The method of claim 1, wherein, After obtaining the page configuration information currently corresponding to the target application from the server, the method further comprises: if the number of names of H5 business modules included in the page configuration information is less than a preset number threshold, generating update information of the target application.

8. The method of claim 1, wherein, The module page mapping information includes a set of back-end path sets corresponding to each H5 business module in the target application; the set name of the set of back-end path sets is the name of the H5 business module, and the element in the set of back-end path sets is the back-end access path of each H5 page included in the H5 business module. 9.A non-transitory computer-readable storage medium storing a computer program, the computer program comprising instructions causing a processor to perform the method according to any one of claims 1 to 8. The computer program is executed by the processor to implement the cross-platform H5 page resource loading method of any one of claims 1 to 8.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the cross-platform H5 page resource loading method of any one of claims 1 to 8.