Method and device capable of improving hybrid development application performance and storage medium

Through modular applications and offline resource management, the network dependency and resource redundancy issues in hybrid development are resolved, normal rendering and fast loading are achieved in weak network environments, and user experience and resource management efficiency are improved.

CN120653327APending Publication Date: 2025-09-16JIANGSU ANJI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510975839.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Traditional hybrid development technology has high network dependence, loading delay issues and resource redundancy, resulting in a poor user experience and excessively large installation packages. Existing solutions fail to effectively solve core issues such as dynamic resource updates, modular splitting and offline verification.

Method used

Modularize the target application, obtain and embed web offline resources, set up a startup mechanism to give priority to them after the application starts, check for updates through asynchronous threads, perform integrity and security verification, and support offline loading and dynamic resource management.

Benefits of technology

Ensure normal page rendering in weak or no network environment, improve resource loading efficiency, reduce loading time, improve user satisfaction, reduce installation package size by 30%, and increase page rendering speed by 40%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653327A_ABST
    Figure CN120653327A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device capable of improving hybrid development application performance and a storage medium, and belongs to the technical field of computer networks. The method capable of improving the hybrid development application performance comprises the following steps that web offline resources of a target application are obtained, and at least part of the web offline resources are embedded into the target application; and setting a starting mechanism of the web offline resources, wherein the starting mechanism is that the web offline resources are preferentially used after the target application is started. By means of the method, offline page loading can be supported, normal page rendering in a weak network or network-free environment is ensured, resource loading efficiency is improved, resource loading time is shortened, and therefore the use satisfaction degree of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer network technology, and specifically relates to a method, device and storage medium for improving the performance of hybrid development applications. Background Art

[0002] Hybrid application development combines the advantages of native applications and web technologies, enabling cross-platform deployment in multiple operating system environments and becoming a key trend in mobile application development. However, traditional H5-based hybrid development technology has the following significant drawbacks:

[0003] High network dependency: Web pages need to load resources from the server in real time. When the network is unstable or unavailable, the page cannot be rendered properly, resulting in functional interruption or a poor user experience.

[0004] Loading delay problem: In a weak network environment, resource loading time increases significantly, affecting page response speed and reducing user satisfaction;

[0005] Resource redundancy: Traditional hybrid applications usually package all web resources on the client, resulting in an excessively large installation package, affecting download and storage efficiency.

[0006] While some existing solutions attempt to optimize loading efficiency through caching mechanisms, they still haven't addressed core issues like dynamic resource updates, modular decomposition, and offline verification. Therefore, a new technical solution is urgently needed that balances offline availability, dynamic update capabilities, and lightweight resource management. Summary of the Invention

[0007] Therefore, the present invention provides a method, device and storage medium for reducing the noise of alarm information based on machine learning, which can improve operation and maintenance efficiency and ensure system stability.

[0008] In a first aspect, the present invention provides a method for improving the performance of hybrid development applications, comprising the following steps:

[0009] Acquire web offline resources of a target application, and embed at least part of the web offline resources into the target application;

[0010] A startup mechanism for the web offline resource is set, wherein the startup mechanism is that the web offline resource is used first after the target application is started.

[0011] Optionally, obtaining the web offline resource of the target application specifically includes:

[0012] modularizing the target application;

[0013] Obtain static resources from several online pages of the modularized target application, and package the static resources into a target compressed package;

[0014] Download the target compressed package.

[0015] Optionally, modularizing the target application includes:

[0016] Splitting the target application into multiple independent modules according to preset requirements, each of which corresponds to a web resource number; the preset requirements include one or more of business functions, basic components, and general modules;

[0017] The independent modules interact with each other through JavaScript Bridge, and the web resource package of each independent module is independently generated and dynamically loaded to form the web offline resource.

[0018] Optionally, the Web resource bundle includes a configuration file for describing the Web resource bundle information and static resource files stored according to the classification of the independent modules, and the configuration file includes one or more of a resource ID, a version number, and a dependency relationship.

[0019] Optionally, the plurality of online pages include one or more of HTML, JavaScript, and CSS pages.

[0020] Optionally, the method further includes:

[0021] After the target application is started, an asynchronous thread is started to check whether the web offline resource is updated;

[0022] If the web offline resource is updated, the updated web offline resource is downloaded.

[0023] Optionally, integrity and security verification is performed on the downloaded and updated web offline resources, and after passing the verification, they are stored locally for subsequent page loading;

[0024] The integrity and security verification includes:

[0025] Verify that the hash value of the resource package is consistent with the hash value provided by the server;

[0026] Verify the digital signature of the resource bundle to ensure it has not been tampered with.

[0027] In a second aspect, a device for improving the performance of hybrid development applications is also provided, the device comprising:

[0028] A resource acquisition module, configured to acquire web offline resources of a target application and embed at least part of the web offline resources into the target application;

[0029] The mechanism setting module is used to set a startup mechanism for the web offline resource, wherein the startup mechanism is that the web offline resource is used first after the target application is started.

[0030] In a third aspect, a device for improving the performance of hybrid development applications is also provided, the device comprising a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement the method for improving the performance of hybrid development applications as described above.

[0031] In a fourth aspect, a computer-readable storage medium is also provided, characterized in that a program is stored in the computer-readable storage medium, and the program is loaded and executed by a processor to implement the method for improving the performance of hybrid development applications as described above.

[0032] The beneficial effects of the present invention include: by obtaining the web offline resources of the target application, embedding at least part of the web offline resources into the target application, and setting a startup mechanism for the web offline resources, the startup mechanism is to give priority to the web offline resources after the target application is started, thereby supporting offline loading of pages, ensuring normal rendering of pages in weak network or no network environment, improving resource loading efficiency, reducing resource loading time, and thus improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 A flowchart of a method for improving the performance of hybrid development applications provided by one embodiment of the present invention.

[0035] Figure 2 Another flow chart of a method for improving hybrid development application performance provided by one embodiment of the present invention.

[0036] Figure 3 Another flow chart of a method for improving hybrid development application performance provided by an embodiment of the present invention.

[0037] Figure 4 A block diagram of an alarm information noise reduction device based on machine learning provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0038] The technical solutions of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments. It should be noted that the embodiments of the present invention and the features therein may be combined with each other unless there is a conflict.

[0039] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0040] In the present invention, unless otherwise specified, the directional words used, such as "up, down, top, bottom", usually refer to the directions shown in the drawings, or to the components themselves in the vertical, perpendicular or gravity direction; similarly, for ease of understanding and description, "inside and outside" refer to the inside and outside relative to the outline of each component itself, but the above directional words are not used to limit the present invention.

[0041] First, let's explain some terms: HTML, JavaScript, CSS

[0042] HTML (HyperText Markup Language) is the foundation of the Web world and is used to build the structure of web pages.

[0043] JavaScript is an interpreted scripting language that is dynamically typed, weakly typed, and prototype-based, with built-in type support. It is an object-based, event-driven, and relatively secure client-side scripting language. It is widely used in client-side web development, often adding dynamic functionality to HTML pages, but can also be used in server-side programming and other contexts.

[0044] CSS (Cascading Style Sheets) is a computer language used to add styles (fonts, spacing, colors, etc.) to structured documents (such as HTML documents or XML applications). The file extension is .css.

[0045] Figure 1 A method for improving the performance of hybrid development applications provided by an embodiment of the present invention includes the following steps:

[0046] Step 101: Obtain the web offline resources of the target application and embed at least part of the web offline resources into the target application;

[0047] Step 102: Setting a startup mechanism for web offline resources. The startup mechanism is that web offline resources are used first after the target application is started.

[0048] Optionally, obtaining the web offline resource of the target application specifically includes:

[0049] Modularize the target application;

[0050] Obtain static resources from several online pages of the modularized target application and package the static resources into a target compressed package;

[0051] Download the target compressed package.

[0052] Optionally, modularizing the target application includes:

[0053] Split the target application into multiple independent modules according to preset requirements. Each independent module corresponds to a web resource number. The preset requirements include one or more of business functions, basic components, and common modules.

[0054] Independent modules interact with each other through JavaScript Bridge, and the web resource bundle of each independent module is independently generated and dynamically loaded to form web offline resources.

[0055] The target application can be split into multiple independent modules (e.g., user center, payment module, navigation component, etc.) based on business functions, basic components, and common modules. Each independent module is developed using web technology and assigned a unique resource ID and version number. The static resources (HTML, JS, CSS) of each independent module are packaged into a separate web offline package (compressed file). Each independent web offline package includes a resource description file (e.g., package.json) that records the resource ID, version number, dependencies, and verification information; and static resource files that are stored by module function.

[0056] Finally, multi-platform support ensures cross-platform compatibility by enabling the loading and configuration of modular components through native code on Android and iOS platforms. For example, the WebView component loads the corresponding module based on the resource ID, and JSBridge is used to enable inter-module communication.

[0057] Optionally, the Web resource bundle includes a configuration file for describing the Web resource bundle information and static resource files stored according to independent module classifications. The configuration file includes one or more of a resource ID, a version number, and a dependency relationship.

[0058] Optionally, the plurality of online pages include one or more of HTML, JavaScript, and CSS pages.

[0059] Optionally, the method further comprises:

[0060] After the target application is started, an asynchronous thread is started to check whether the web offline resources are updated;

[0061] If the web offline resource is updated, the updated web offline resource is downloaded.

[0062] Optionally, integrity and security verification is performed on the downloaded and updated web offline resources. Once verified, they are stored locally for subsequent page loading.

[0063] Among them, integrity and security verification includes:

[0064] Verify that the hash value of the resource package is consistent with the hash value provided by the server;

[0065] Verify the digital signature of the resource bundle to ensure it has not been tampered with.

[0066] See Figure 2 and Figure 3 Specifically: when the application starts, it will first load the Web offline package resources from the local storage and render the page. If there are no local resources (first startup), the built-in basic package will be loaded. An independent thread will be started in the background, and the resource ID and version number will be sent to the server to check whether there is an update. If a new version exists, the incremental resource package will be downloaded. After the download is complete, the resource package will be integrity checked (such as SHA-256 hash value comparison) and security scanned. After verification, it will be unzipped to the specified directory and the local version number will be updated. The latest resources will be automatically loaded at the next startup. If the update package verification fails, it will fall back to the old version of the resource and record the error log; if the resource package is not downloaded completely, the H5 container will load the built-in resources to ensure that basic functions are available.

[0067] Data transmission and function calls are implemented between modules through JSBridge. For example, the payment module calls the authentication interface of the user center. The server can configure the enabled status of the module, and the client can load non-core modules (such as active pages) on demand according to the strategy, further reducing the initial resource volume. Therefore, this method can increase the page rendering speed by more than 40% through offline loading, and significantly improve the user experience in weak network environments. In addition, after modularization, the size of the client installation package is reduced by about 30%, and dynamic loading further reduces memory usage. At the same time, it supports hot updates and dynamic configuration of modules to meet the needs of rapid iteration.

[0068] To sum up: by obtaining the web offline resources of the target application, embedding at least part of the web offline resources into the target application, and setting a startup mechanism for the web offline resources, the startup mechanism is to give priority to the web offline resources after the target application is started, thereby supporting offline page loading, ensuring normal page rendering in weak or no network environment, improving resource loading efficiency, reducing resource loading time, and thus improving user satisfaction.

[0069] An embodiment of the present invention provides a device for improving the performance of hybrid development applications, comprising:

[0070] A resource acquisition module, configured to acquire the web offline resources of the target application and embed at least part of the web offline resources into the target application;

[0071] The mechanism setting module is used to set the startup mechanism of web offline resources. The startup mechanism is that web offline resources are used first after the target application is started.

[0072] For relevant details, please refer to the above method embodiment.

[0073] It should be noted that: the alarm information noise reduction device based on machine learning provided in the above embodiment only uses the division of the above functional modules as an example when performing network access. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the alarm information noise reduction device based on machine learning is divided into different functional modules to complete all or part of the functions described above. In addition, the alarm information noise reduction device based on machine learning provided in the above embodiment and the alarm information noise reduction method embodiment based on machine learning belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0074] Figure 4 A block diagram of a device for improving the performance of hybrid development applications provided by an embodiment of the present invention, the device at least includes a processor 401 and a memory 402.

[0075] Processor 401 may include one or more processing cores, such as a quad-core processor 401 or an octal-core processor 401. Processor 401 may be implemented using at least one of the following hardware forms: a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.

[0076] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory 402 and non-volatile memory 402, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is used to be executed by the processor 401 to implement the method for improving the performance of hybrid development applications provided by the method embodiment of the present invention.

[0077] In some embodiments, the apparatus for improving hybrid development application performance may also optionally include a peripheral device interface and at least one peripheral device. The processor 401, memory 402, and peripheral device interface may be connected via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface via a bus, signal lines, or circuit boards. Illustratively, the peripheral devices include, but are not limited to, a radio frequency circuit, a touchscreen display, an audio circuit, and a power supply.

[0078] Of course, the device that can improve the performance of hybrid development applications can also include fewer or more components, which is not limited in this embodiment.

[0079] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored. The program is loaded and executed by a processor to implement the method for improving the performance of hybrid development applications in the above method embodiment.

[0080] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored. The program is loaded and executed by a processor to implement the method of improving the performance of hybrid development applications in the above-mentioned method embodiment.

[0081] Obviously, the embodiments described above are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, those skilled in the art may make other different forms of changes or modifications without making any creative work, and all of these should fall within the scope of protection of the present invention.

Claims

1. A method for improving the performance of hybrid development applications, characterized in that: The steps include: Acquire web offline resources of a target application, and embed at least part of the web offline resources into the target application; A startup mechanism for the web offline resource is set, wherein the startup mechanism is that the web offline resource is used first after the target application is started.

2. The method according to claim 1, wherein The acquiring of the target application's web offline resources specifically includes: modularizing the target application; Obtain static resources from several online pages of the modularized target application, and package the static resources into a target compressed package; Download the target compressed package.

3. The method according to claim 2, wherein The modularizing the target application includes: Splitting the target application into multiple independent modules according to preset requirements, each of which corresponds to a web resource number; the preset requirements include one or more of business functions, basic components, and general modules; The independent modules interact with each other through JavaScript Bridge, and the web resource package of each independent module is independently generated and dynamically loaded to form the web offline resource.

4. The method according to claim 3, wherein The Web resource bundle includes a configuration file for describing the Web resource bundle information and static resource files stored according to the classification of the independent modules. The configuration file includes one or more of a resource ID, a version number, and a dependency relationship.

5. The method according to claim 2, wherein The plurality of online pages include one or more of HTML, JavaScript, and CSS pages.

6. The method according to claim 1, wherein The method further comprises: After the target application is started, an asynchronous thread is started to check whether the web offline resource is updated; If the web offline resource is updated, the updated web offline resource is downloaded.

7. The method according to claim 6, wherein Verify the integrity and security of the downloaded and updated web offline resources, and store them locally after verification for subsequent page loading; The integrity and security verification includes: Verify that the hash value of the resource package is consistent with the hash value provided by the server; Verify the digital signature of the resource bundle to ensure it has not been tampered with.

8. A device for improving the performance of hybrid development applications, characterized in that: The device comprises: A resource acquisition module, configured to acquire web offline resources of a target application and embed at least part of the web offline resources into the target application; The mechanism setting module is used to set a startup mechanism for the web offline resource, wherein the startup mechanism is that the web offline resource is used first after the target application is started.

9. A device for improving the performance of hybrid development applications, characterized in that: The device includes a processor and a memory; the memory stores a program, and the program is loaded and executed by the processor to implement the method for improving the performance of hybrid development applications as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, which is loaded and executed by a processor to implement the method for improving the performance of hybrid development applications as described in any one of claims 1 to 7.