Method and system for requesting accelerated rendering by mobile application

By intercepting WebView requests and matching local static resource files, combined with resource package management and update mechanisms, the problem of slow loading speed of WebView on mobile devices was solved, resulting in a reduction in first-screen rendering time and an improvement in user experience.

CN121658735APending Publication Date: 2026-03-13XIAMEN HUANLEGUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

The mobile WebView loading mechanism suffers from strong network dependence, repeated downloads, and an imperfect caching mechanism, resulting in long initial screen rendering times and a poor user experience.

Method used

By intercepting webpage loading requests, matching local static resource files, using version numbers to determine the target file for loading, and returning the result to WebView after the integrity verification is passed, combined with resource package management and update mechanisms, the validity and integrity of local resources are ensured.

Benefits of technology

Significantly shortens the first screen rendering time of web pages, improves the user browsing experience, reduces network resource waste, and optimizes loading speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658735A_ABST
    Figure CN121658735A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for requesting accelerated rendering by a mobile application, and the method comprises the steps: intercepting a webpage loading request when detecting that the mobile application triggers the webpage loading request, and extracting a URL (Uniform Resource Locator) in the request; if the resource type indicated by the URL is a static resource, matching the URL with a local specified directory to determine a local file matched with the URL if the resource type indicated by the URL is the static resource; if a plurality of matched local files exist, determining a target local file from the plurality of matched local files based on the version number corresponding to each matched local file; and loading a resource file based on the target local file, and after the integrity verification of the resource file is passed, setting an MIME type and HTTP header information and returning the MIME type and the HTTP header information to WebView. By setting the local resource loading mechanism, the problem of slow loading of the WebView page of the mobile terminal is solved, the first screen rendering time of the webpage is remarkably shortened, and the browsing experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing technology, and specifically to a method and system for accelerating rendering of mobile application requests. Background Technology

[0002] WebView refers to the embedded web page rendering component provided in mobile operating systems (such as Android and iOS), which is the core carrier for loading and displaying web page content in mobile applications.

[0003] In mobile applications with embedded web browsing, the existing WebView loading mechanism has the following technical problems: Highly dependent on network speed: WebView needs to download a large number of static resource files (JavaScript, HTML, CSS, images, etc.) from the network in real time, resulting in slow loading speed in mobile network environments.

[0004] Repeated download problem: The same static resources need to be downloaded again every time the page is accessed, which wastes network resources and prolongs loading time.

[0005] Long initial page rendering time: Users have to wait for all necessary resources to download before they can see the complete page content, resulting in a poor user experience.

[0006] Imperfect caching mechanism: Traditional browser caching mechanisms have limited effectiveness in mobile application scenarios and cannot effectively reduce network requests. Summary of the Invention

[0007] The main objective of this invention is to provide a method and system for accelerating rendering requests in mobile applications, in order to address the shortcomings of related technologies.

[0008] To achieve the above objectives, according to a first aspect of the present invention, a method for accelerating rendering of mobile application requests is provided, comprising: when a mobile application triggers a webpage loading request, intercepting the request and extracting the URL in the request; if the resource type indicated by the URL is a static resource, matching the URL with a specified local directory to determine the local file matched by the URL; if multiple matching local files exist, determining a target local file from the multiple matching local files based on the version number corresponding to each matching local file; loading a resource file based on the target local file, and after the resource file integrity verification passes, setting the MIME type and HTTP header information and returning it to the WebView.

[0009] Optionally, before matching the URL with the specified local directory, the method further includes sending a resource package update request to the server when the mobile application starts, so that the server can perform version detection based on the local resource package version information sent by the mobile application; if the version information of the local resource package is not the latest version, then download the latest version resource package; after the download is completed, check the integrity of the latest version resource package, and after the integrity check is completed, decompress the resource package, wherein the decompressed files are stored according to the structure of the specified directory, the directory consists of the resource version number and the correspondence between it and the URL.

[0010] Optionally, determining the target local file from multiple local files based on the version number corresponding to the local file includes: recording the version number in the sandbox after each decompression to obtain a version number record file; obtaining the version number from the version number record file when the mobile application starts; if the obtained version number exists in the directory, using that version number as the target version number; and using the local file corresponding to the target version number as the target local file.

[0011] Optionally, if the obtained version number does not exist in the directory, the latest version number is traversed from the decompressed directory and the version number record file is updated; the latest version number is used as the target version number, and the local file corresponding to the target version number is used as the target local file.

[0012] Optionally, if the resource file integrity check fails, the resource file is loaded from the network.

[0013] Optionally, if the target local file is corrupted, a resource file is loaded from the network; or, if the local file or the target local file cannot be determined, a resource file is loaded from the network.

[0014] Optionally, before responding to the webpage loading request triggered by the mobile application based on WebView, the method further includes: obtaining different resource packages through a preset interface, wherein each resource package is generated as a unique version number after being obtained; and compressing the resource packages.

[0015] Optionally, the system can count both missing and hit local resource packages and distribute the URLs corresponding to the local resource packages to different uploaders.

[0016] According to a second aspect of the present invention, a system for accelerating rendering of a mobile application based on an embedded WebView engine is provided, comprising: a resource package management unit for acquiring different resource packages through a preset interface, wherein each resource package generates a unique version number after being acquired; compressing the resource packages; and an intelligent update unit for sending a resource package update request to a server when the mobile application starts, so that the server can perform version detection based on the local resource package version information sent by the mobile application; if the version information of the local resource package is not the latest version, downloading the latest version resource package; after downloading, checking the integrity of the latest version resource package, and decompressing the resource package after the integrity check, wherein the decompressed files are processed according to... The resources are stored according to the structure of the specified directory, which consists of resource version numbers and their correspondence with URLs. The local resource matching module intercepts a webpage loading request triggered by a mobile application and extracts the URL from the request. If the resource type indicated by the URL is a static resource, the URL is matched against the specified local directory to determine the local file that matches the URL. If multiple matching local files exist, the target local file is determined from the multiple matching local files based on the version number corresponding to each matching local file. The resource file is loaded based on the target local file, and after the resource file integrity verification passes, the MIME type and HTTP header information are set and returned to the WebView.

[0017] According to a third aspect of the present invention, a computer program product is provided, characterized in that the computer program, when executed by a processor, implements the method described in any one of the first aspects.

[0018] This embodiment presents a method and system for accelerating rendering of mobile application requests. The method includes intercepting a webpage loading request triggered by a mobile application and extracting the URL from the request. If the resource type indicated by the URL is a static resource, the URL is matched against a specified local directory to determine the local file that matches the URL. If multiple matching local files exist, a target local file is determined from the multiple matching local files based on the version number corresponding to each matching local file. Resource files are loaded based on the target local file, and after the resource file integrity verification passes, the MIME type and HTTP header information are set and returned to the WebView. By implementing a local resource loading mechanism, the problem of slow page loading on mobile WebView is solved, significantly shortening the first-screen rendering time of the webpage and improving the user browsing experience. Attached Figure Description

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a method for accelerating rendering requests in mobile applications according to an embodiment of the present invention; Figure 2 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of the invention described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0023] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0024] According to an embodiment of the present invention, a method for accelerating rendering requests in mobile applications is provided. This method is applicable to the WebView engine, and the method is implemented in program code and then set in the WebView engine, such as... Figure 1 As shown, steps 101 to 103 are included below: Step 101: When a mobile application triggers a webpage loading request through the WebView engine, the request is intercepted and the URL in the request is extracted.

[0025] In this step, taking Android as an example, all network requests are intercepted using the `shouldInterceptRequest` method of `WebViewClient` to obtain the requested URL. The URL suffix is ​​used to identify whether the URL requested by the current WebView is a static resource, such as .png or .jpg. If it is a static resource, local resource acceleration matching is performed.

[0026] Step 102: If the resource type indicated by the URL is a static resource, then match the URL with the specified local directory to determine the local file that the URL matches.

[0027] In this step, when the app launches or the resource package download is complete, the built-in or updated resource package will be unzipped. The unzipped files are stored in different folders based on their version number and filename for easy and quick matching. For example, if there is a file named https: / / www.gaoding.com / icon_launcher.png in the resource package, the unzipped directory will be {resource package version number} / www.gaoding.com / icon_launcher.png.

[0028] When WebView loads resources, it performs directory matching based on the complete URL of the resource. If a file is found to exist, it is loaded using the local file, thus achieving a speed-up effect.

[0029] Step 103: If multiple matching local files exist, determine the target local file from the multiple matching local files based on the version number corresponding to each matching local file; load the resource file based on the target local file, and after the resource file integrity verification passes, set the MIME type and HTTP header information and return it to WebView.

[0030] In this step, when multiple matching resources exist, the system determines the priority based on factors such as version age and file integrity, and selects the most suitable local resource.

[0031] If a local resource is hit, the resource content is read directly from the local file system, and the correct MIME type and HTTP header information are returned to the WebView.

[0032] As an optional implementation of this embodiment, before matching the URL with the specified local directory, the method further includes: sending a resource package update request to the server when the mobile application starts, so that the server can perform version detection based on the local resource package version information sent by the mobile application; if the version information of the local resource package is not the latest version, then downloading the latest version resource package; after the download is completed, checking the integrity of the latest version resource package, and decompressing the resource package after the integrity check, wherein the decompressed files are stored according to the structure of the specified directory, and the directory consists of the resource version number and the correspondence between it and the URL.

[0033] In this optional implementation, during smart updates, resource packages are automatically detected and updated when the mobile application starts.

[0034] For example, when the mobile application starts, it sends the current local resource package version information to the server. The server compares the version numbers and returns an update list. A download task is then started in the background to download the latest resource package.

[0035] After the download is complete, the system verifies the integrity of the resource package, extracts it to a specified local directory, and updates the local resource index table. The update process employs atomic operations to ensure that application crashes or errors during the update process will not lead to resource corruption.

[0036] As an optional implementation of this embodiment, determining the target local file from multiple local files based on the version number corresponding to the local file includes: recording the version number in the sandbox after each decompression to obtain a version number record file; obtaining the version number from the version number record file when the mobile application starts; if the obtained version number exists in the directory, using the version number as the target version number; and using the local file corresponding to the target version number as the target local file.

[0037] As an optional implementation of this embodiment, if the obtained version number does not exist in the directory, the latest version number is traversed from the decompressed directory and the version number record file is updated; the latest version number is used as the target version number, and the local file corresponding to the target version number is used as the target local file.

[0038] In this optional implementation, a version number is saved to the sandbox after each update and decompression. When the app starts, it reads the file containing the version number record to obtain the version number. If the directory corresponding to this version number exists, the current version is used. If it does not exist, the decompressed directories are traversed, and the latest valid version number is used. The file storing the version number is then updated synchronously to determine which version of the resource package to use.

[0039] As an optional implementation method in this embodiment, if the resource file integrity verification fails, the resource file is loaded from the network.

[0040] In this optional implementation, during resource matching, a single file's MD5 integrity check is performed. If the check succeeds, local resources are used for acceleration; otherwise, the file is loaded from the network. The network refers to the uploads from each project team to their respective OSS service.

[0041] As an optional implementation of this embodiment, if the target local file is corrupted, a resource file is loaded from the network.

[0042] As an optional implementation of this embodiment, if the local file or the target local file cannot be determined, a resource file is loaded from the network.

[0043] In this optional implementation, a network fallback mechanism is designed. When local resources are unavailable or corrupted, the system automatically falls back to network download mode to ensure that the page loads normally.

[0044] As an optional implementation of this embodiment, before responding to the webpage loading request triggered by the mobile application based on WebView, the method further includes: obtaining different resource packages through a preset interface, wherein each resource package generates a unique version number after being obtained; and compressing the resource packages.

[0045] In this optional implementation, resource packages are managed, and the resource package management is responsible for integrating and managing the static web page resources of multiple teams. The specific implementation scheme is as follows: Resource collection mechanism: Collects static resource files that need to be accelerated, including JavaScript files (.js), CSS style files (.css), image files (.png, .jpg, .gif, etc.), HTML template files, etc.

[0046] Resource categorization and packaging: Resources are categorized by team, with each team responsible for scanning and integrating their own resource packages. Finally, resource packages from different teams are combined into a single complete resource package based on different projects. Each resource package includes a version number, file list, and verification information. When merging into a complete resource package, each team provides a JSON description file of the static resources used in the current project. The integration process involves parsing the JSON files provided by each team, downloading all static resources to a directory, and then compressing and organizing them into a single resource package.

[0047] Version control system: Generates a unique version identifier for each resource package, supports rollback mechanisms, and ensures the traceability and consistency of resource versions.

[0048] Compression optimization: The resource package is compressed using gzip to reduce the transmission size.

[0049] As an optional implementation method in this embodiment, the system counts the local resource packages that were not hit and those that were hit; and distributes the URLs corresponding to the local resource packages to different upload terminals.

[0050] In this optional implementation, loading performance data is collected in real time during performance monitoring and optimization: Loading time statistics: Records key performance indicators such as the first screen rendering time and resource loading time.

[0051] Hit rate analysis: Statistics on local resource hit rates are used to analyze which resources need optimization. Optimization strategies are as follows: Step 1: Obtain the URLs of resources that did not hit the local resource target, categorize the URLs by project group, distribute them to the corresponding project groups, and determine the processing time nodes.

[0052] Step 2: Different project teams re-upload the module resource packages according to the allocated URL resources.

[0053] Step 3: After each project team has completed its processing, the latest resource acceleration package is rebuilt and uploaded to the backend for distribution to users.

[0054] Step 4: After the user downloads successfully, reload the app; the hit rate will increase.

[0055] Network usage monitoring: Monitor network traffic usage and evaluate the system's effectiveness in saving network resources. Real-time optimization: Adjust caching strategies based on monitoring data to continuously optimize system performance.

[0056] In this embodiment, the engine is encapsulated as a component, providing a simple API interface for easy integration with other company apps. It supports flexible configuration options, including project configuration. It ensures system compatibility across different Android and iOS versions and supports mainstream WebView kernels.

[0057] This embodiment avoids network download delays through local resource matching, reducing page initial rendering time by 60-80%. A unified resource package management mechanism supports multi-team collaboration, avoiding resource conflicts and duplication. One-click page loading eliminates long waiting times for users, significantly improving the application experience. Atomic updates and network rollback mechanisms ensure the system functions correctly under various abnormal conditions. Standardized component interfaces are provided, allowing for rapid integration into mobile applications without complex configuration and development work.

[0058] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0059] According to embodiments of the present invention, a system for accelerating rendering of mobile applications based on an embedded WebView engine is also provided, including a resource package management unit for obtaining different resource packages through a preset interface, wherein each resource package generates a unique version number after being obtained; compressing the resource packages; and an intelligent update unit that sends a resource package update request to the server when the mobile application starts, so that the server can perform version detection based on the local resource package version information sent by the mobile application; if the version information of the local resource package is not the latest version, then downloading the latest version resource package; after the download is completed, checking the integrity of the latest version resource package, and decompressing the resource package after the integrity check, wherein the decompressed files are processed according to... The resources are stored according to the structure of the specified directory, which consists of resource version numbers and their correspondence with URLs. The local resource matching module intercepts a webpage loading request triggered by a mobile application and extracts the URL from the request. If the resource type indicated by the URL is a static resource, the URL is matched against the specified local directory to determine the local file that matches the URL. If multiple matching local files exist, the target local file is determined from the multiple matching local files based on the version number corresponding to each matching local file. The resource file is loaded based on the target local file, and after the resource file integrity verification passes, the MIME type and HTTP header information are set and returned to the WebView.

[0060] According to embodiments of the present invention, the present invention also provides an electronic device, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to implement the methods described in any of the above embodiments.

[0061] According to embodiments of the present invention, the present invention also provides a readable storage medium storing computer instructions that enable a computer to perform the methods described in any of the above embodiments when executed.

[0062] According to embodiments of the present invention, the present invention also provides a computer program product that, when executed by a processor, can implement the methods described in any of the above embodiments.

[0063] Figure 2A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices.

[0064] like Figure 2 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. The RAM 303 may also store various programs and data required for the operation of the electronic device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0065] Multiple components in electronic device 300 are connected to I / O interface 305, including: input unit 306, such as keyboard, mouse, etc.; output unit 307, such as various types of displays, speakers, etc.; storage unit 308, such as disk, optical disk, etc.; and communication unit 309, such as network card, modem, wireless transceiver, etc. Communication unit 309 allows electronic device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0066] The computing unit 301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as the object matching method. For example, in some embodiments, the object matching method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the methods described above may be performed.

[0067] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0068] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0069] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

Claims

1. A method for accelerating rendering requests in mobile applications, characterized in that, include: When a mobile application is detected to trigger a webpage loading request through the WebView engine, the request is intercepted and the URL in the request is extracted. If the resource type indicated by the URL is a static resource, then the URL is matched with a specified local directory to determine the local file that the URL matches. If multiple matching local files exist, the target local file is determined from the multiple matching local files based on the version number corresponding to each matching local file. The resource file is loaded based on the target local file, and after the integrity of the resource file is verified, the MIME type and HTTP header information are set and returned to the WebView engine.

2. The method for accelerating rendering of mobile applications according to claim 1, characterized in that, Before matching the URL with a specified local directory, the method further includes: When the mobile application starts, it sends a resource package update request to the server so that the server can check the version based on the local resource package version information sent by the mobile application; if the local resource package version information is not the latest version, the latest version resource package is downloaded. After the download is complete, the integrity of the latest version resource package is checked, and the resource package is decompressed after the check is complete. The decompressed files are stored according to the structure of the specified directory, which consists of the resource version number and the correspondence between the resource version number and the URL.

3. The method for accelerating rendering of mobile applications according to claim 2, characterized in that, The step of determining the target local file from multiple local files based on the version number corresponding to the local file includes: After each decompression, the version number is recorded in the sandbox, resulting in a version number record file; When the mobile application starts, the version number is obtained from the version number record file. If the obtained version number exists in the directory, it is used as the target version number. The local file corresponding to the target version number is used as the target local file.

4. The method for accelerating rendering of mobile applications according to claim 3, characterized in that, If the obtained version number does not exist in the directory, then iterate through the unzipped directory to find the latest version number and update the version number record file accordingly. Use the latest version number as the target version number, and use the local file corresponding to the target version number as the target local file.

5. The method for requesting accelerated rendering of a mobile application according to claim 4, characterized in that, If the resource file integrity check fails, the resource file is loaded from the network.

6. The method for accelerating rendering of mobile applications according to claim 4, characterized in that, If the target local file is corrupted, load the resource file from the network; Alternatively, if the local file or the target local file cannot be determined, a resource file is loaded from the network.

7. The method for accelerating rendering of mobile applications according to claim 6, characterized in that, Before responding to the webpage loading request triggered by the mobile application based on WebView, the method also includes: obtaining different resource packages through a preset interface, wherein each resource package generates a unique version number after being obtained; and compressing the resource packages.

8. The method for accelerating rendering of mobile applications according to claim 7, characterized in that, Count the local resource packages that were not hit and those that were hit; distribute the URLs corresponding to the local resource packages to different upload clients.

9. A system for accelerating rendering requests in mobile applications, characterized in that, include: The resource package management unit is used to obtain different resource packages through a preset interface. Each resource package is generated with a unique version number after being obtained; the resource packages are compressed. The intelligent update unit sends a resource package update request to the server when the mobile application starts, so that the server can perform version detection based on the local resource package version information sent by the mobile application; if the local resource package version information is not the latest version, the latest version resource package is downloaded; after the download is completed, the integrity of the latest version resource package is checked, and the resource package is decompressed after the integrity check is completed, wherein the decompressed files are stored according to the structure of the specified directory, and the directory consists of the resource version number and the correspondence between the URL; The local resource matching module intercepts a webpage loading request triggered by a mobile application and extracts the URL from the request. If the resource type indicated by the URL is a static resource, the URL is matched with a specified local directory to determine the local file that matches the URL. If multiple matching local files exist, the target local file is determined from the multiple matching local files based on the version number corresponding to each matching local file. The resource file is loaded based on the target local file, and after the resource file integrity verification is passed, the MIME type and HTTP header information are set and returned to the WebView engine.

10. A computer program product, characterized in that, When executed by a processor, the computer program implements the method described in any one of claims 1-6.