Application offline management method and device based on metadata

Through the offline management method of metadata-based application, using interception tools and offline package technology, the availability and cache management problems of web applications in offline environments are solved, and the pre-cache and storage of static resources and entity metadata is realized to ensure that the application is Provides full functionality when fully offline, improving user experience and reducing implementation costs.

CN119202442AInactive Publication Date: 2024-12-27BEIJING RENKE INTERACTIVE NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411711968.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional web applications cannot meet users' needs for high availability and smooth experience when the network is unstable or completely offline, especially the cache management is complex and difficult to control, and cannot effectively deal with the update needs of dynamic content.

Method used

Using the metadata-based application offline management method, intercept resource requests through intercepting tools. When the client is in offline mode, it uses local cached static resources and offline packages for offline rendering, and pre-download and decompress offline packages in online mode. Activate Service Worker to cache static resources to ensure that the application still runs normally when fully offline.

Benefits of technology

It significantly improves the offline usage capabilities of web applications, ensures that the application provides complete functions when fully offline, improves the user experience, and maintains data consistency through intelligent data synchronization mechanisms, reducing manual update requirements and reducing implementation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202442A_ABST
    Figure CN119202442A_ABST
Patent Text Reader

Abstract

The invention provides an application offline management method and device based on metadata, relates to the technical field of storage systems, is applied to a client side, and comprises the steps that under the condition that the client side is in an offline mode, if a resource request is detected, the resource request is intercepted through an interception tool; obtaining a static resource and an offline package in a local cache based on the resource request, and performing offline rendering on an application page based on entity metadata in the static resource and the offline package; wherein the offline package is obtained by requesting, downloading and decompressing the client from a server in advance in an online mode. According to the method provided by the invention, through combination of an interception tool and an offline package technology, the offline use capability of the Web application is greatly enhanced; the static resources and a large amount of entity metadata can be cached and stored in advance, it is ensured that even under the completely offline condition, the application can still provide complete functions, and the user experience is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of storage systems, and in particular to a metadata-based application offline management method and device. Background Art

[0002] With the popularity of the Internet and mobile devices, Web applications are increasingly used on various platforms. However, as users' demands for high availability, high performance, and smooth experience continue to increase, traditional Web applications have shown some shortcomings in some aspects. Especially when the network is unstable or completely offline, the availability and performance of Web applications often cannot meet user needs. This has prompted developers to seek new technical solutions to improve Web applications' offline capabilities, cache management, and overall user experience.

[0003] With the continuous development of Web standards, HTML5 has introduced some new features, such as application cache (AppCache) and offline storage technology, which enhances the functions of Web applications in offline state. However, these technologies also have their limitations, such as the complex and difficult to control management of application cache, and the inability to cope well with the update requirements of dynamic content.

[0004] How to improve the offline management capability of Web applications is a technical problem that needs to be solved at present. Summary of the invention

[0005] The present invention provides an application offline management method and device based on metadata, so as to solve the defects existing in the prior art.

[0006] The present invention provides an offline application management method based on metadata, which is applied to a client and includes the following steps: When the client is in offline mode, if a resource request is detected, intercepting the resource request by an interception tool; Based on the resource request, the static resources and offline packages in the local cache are obtained, and the application page is rendered offline based on the static resources and the entity metadata in the offline package; wherein, the offline package is obtained by the client requesting and downloading and decompressing the package in advance from the server in the online mode.

[0007] According to a metadata-based offline application management method provided by the present invention, when the client is in offline mode, if a resource request is detected, before intercepting the resource request by an interception tool, the method further includes: When the client is in online mode, if a first preset trigger condition is met, an offline package acquisition request is sent to the server; wherein the first preset trigger condition includes: the application is loaded for the first time or the user actively triggers the offline package download; The receiving server sends an initial offline package based on the offline package acquisition request, downloads and decompresses the initial offline package, obtains the offline package, and stores the offline package in a local cache.

[0008] According to a metadata-based offline application management method provided by the present invention, when the client is in offline mode, if a resource request is detected, before intercepting the resource request by an interception tool, the method further includes: When the client is in online mode, if a second preset trigger condition is met, registering and activating the interception tool; wherein the second preset trigger condition includes: the user accesses the application for the first time; The static resources of the application are stored in the local cache through the interception tool.

[0009] According to a metadata-based offline application management method provided by the present invention, after obtaining static resources and offline packages in the local cache based on the resource request, and performing offline rendering on the application page based on the static resources and entity metadata in the offline package, the method further includes: Store offline data generated when the application page is rendered offline in the local cache; When the client is in online mode and connected to the network, the offline data is uploaded to the server; wherein the offline data includes: form data filled in by the user in offline mode and uploaded attachments.

[0010] According to a metadata-based offline application management method provided by the present invention, when the client is in online mode and connected to the network, after uploading the offline data to the server, the method further includes: Obtaining a verification result performed by the server based on the form data; When the verification result indicates that the verification has failed, a prompt message and a failure reason are generated, and the offline data is re-uploaded to the server based on the failure reason.

[0011] The present invention also provides an application offline management device based on metadata, which is applied to a client and includes the following modules: An interception module, configured to intercept the resource request by using an interception tool if a resource request is detected when the client is in an offline mode; The offline management module is used to obtain the static resources and offline packages in the local cache based on the resource request, and to render the application page offline based on the static resources and entity metadata in the offline package; wherein the offline package is obtained by the client requesting and downloading and decompressing the package in advance from the server in the online mode.

[0012] According to a metadata-based application offline management device provided by the present invention, the device also includes an offline package acquisition module, which is specifically used to: When the client is in offline mode, if a resource request is detected, before intercepting the resource request by the interception tool, when the client is in online mode, if a first preset trigger condition is met, an offline package acquisition request is sent to the server; wherein the first preset trigger condition includes: the application is loaded for the first time or the user actively triggers the offline package download; The receiving server sends an initial offline package based on the offline package acquisition request, downloads and decompresses the initial offline package, obtains the offline package, and stores the offline package in a local cache.

[0013] According to a metadata-based application offline management device provided by the present invention, the device also includes a static resource cache module, which is specifically used to: When the client is in offline mode, if a resource request is detected, before intercepting the resource request by the interception tool, when the client is in online mode, if a second preset trigger condition is met, registering and activating the interception tool; wherein the second preset trigger condition includes: the user accesses the application for the first time; The static resources of the application are stored in the local cache through the interception tool.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for offline application management based on metadata as described above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for offline application management based on metadata as described above is implemented.

[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned metadata-based offline application management methods.

[0017] The present invention provides a metadata-based offline application management method and device, which are applied to a client. When the client is in offline mode, if a resource request is detected, the resource request is intercepted by an interception tool; static resources and offline packages in the local cache are obtained based on the resource request, and application pages are rendered offline based on the static resources and entity metadata in the offline package; wherein the offline package is obtained by the client requesting and downloading and decompressing the server in advance in the online mode. It can be seen that the present invention greatly enhances the offline use capability of Web applications by combining interception tools with offline package technology; static resources and a large amount of entity metadata can be pre-cached and stored to ensure that the application can still provide complete functions even when it is completely offline, significantly improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the 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 creative work.

[0019] Figure 1 It is a flowchart of the metadata-based application offline management method provided by the present invention.

[0020] Figure 2 It is a complete flow chart of the metadata-based application offline management method provided by the present invention.

[0021] Figure 3 It is a structural schematic diagram of the metadata-based application offline management device provided by the present invention.

[0022] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Before describing the method of the present invention in detail, the terms involved in the present invention are first explained schematically.

[0025] Entity metadata: refers to data that describes an entity. Metadata is a description of the attributes, characteristics, or relationships of these entities and does not contain data about the entity itself. Metadata can be used to define and describe entities and their relationships in the database to help understand and manage data. Metadata can be used to better understand and query data, perform data correlation analysis, and optimize data processing flows. In addition, metadata is also used to define and describe the source, quality, and other data-related information of the data, which is critical to ensuring the accuracy and reliability of the data. In short, entity metadata is data that describes an entity. It does not contain the specific content of the entity, but provides information about the structure, attributes, relationships, etc. of the entity to help understand and manage data.

[0026] Service Worker: It is one of the core components of PWA (Progressive Web Application) technology. It is a script that runs independently of the web page in the background and can provide a variety of enhanced functions for web applications, such as offline support, push notifications, and cache management. It plays an important role in improving the performance of web applications and user experience.

[0027] Application Cache (AppCache) technology: Application Cache is a technology introduced in the HTML5 standard, which is designed to allow Web applications to be used when users are offline. Through application cache, developers can specify a set of resources that will be cached by the browser and loaded directly from the cache when the user is offline. Application cache uses manifest files to define which resources need to be cached and which resources can be obtained from the network.

[0028] LocalStorage and IndexedDB: These technologies provide client-side storage capabilities for Web applications. LocalStorage provides simple key-value pair storage, suitable for storing small amounts of data; while IndexedDB is a powerful NoSQL database suitable for storing more complex data structures and large-scale data.

[0029] Pure Service Worker and Cache API: Service Worker is a script that runs in the background of the browser and can intercept and process network requests to control cache and offline access. It is the mainstream technology for offline support of Web applications. Service Worker combined with Cache API can provide a more flexible and efficient cache management mechanism for Web applications.

[0030] PWA (Progressive Web Apps) technology: PWA is a web application built using modern web technologies. It provides a user experience close to native applications by combining technologies such as Service Worker and Web App Manifest. PWA applications can be used offline and can be installed on user devices like native applications.

[0031] Combine the following Figure 1-Figure 4 The present invention describes a metadata-based application offline management method and device.

[0032] It should be noted that existing technologies usually use Webview technology to develop apps. Compared with pure native apps, it has the following advantages: cross-platform, fast iteration and update, reduced development costs, flexibility and easy adjustment, shared code and resources, consistent user experience, lightweight development, and seamless integration. However, it also has several major disadvantages, as follows: 1. High network dependency: Traditional web applications usually require real-time network connection to access resources such as HTML, JS, CSS, and images. If the network connection is unstable or the user is offline, the application may not work properly or may be completely unavailable.

[0033] 2. Complex cache management: Although some web applications can use the browser's cache mechanism to store static resources, this method has limitations in controlling cache updates and cleanup. The browser's cache strategy is usually managed by the browser itself, and it is difficult for developers to implement refined cache control, which may result in the use of outdated resources or occupying too much storage space.

[0034] 3. Difficulty in data synchronization: For applications that require a large amount of entity metadata, it is usually necessary to frequently communicate with the server to keep the data up to date. This approach not only increases network traffic, but may also lead to poor user experience, especially in low-bandwidth or no-network environments.

[0035] 4. Limited offline usability: Most web applications cannot be used normally in offline environments, especially those that rely on dynamic data. This limits the availability and user experience of the application.

[0036] Based on this, the present invention provides an offline application management method based on metadata to solve at least one of the above problems.

[0037] Figure 1 is a flowchart of the metadata-based application offline management method provided by the present invention, such as Figure 1 As shown, applied to the client, the method includes the following: Step 100: When the client is in offline mode, if a resource request is detected, the resource request is intercepted by an interception tool.

[0038] Figure 2 This is a complete flow chart of the metadata-based application offline management method provided by the present invention. Figure 2 The metadata-based application offline management method provided by the present invention is described.

[0039] It should be noted that in order to achieve offline rendering of application pages, it is necessary to cache offline package data and static resources locally in advance in the client online mode. The following describes the caching methods of the two types of data respectively.

[0040] In one embodiment, in step 100, when the client is in offline mode, if a resource request is detected, before intercepting the resource request by an interception tool, the method further includes: When the client is in online mode, if a first preset trigger condition is met, an offline package acquisition request is sent to the server; wherein the first preset trigger condition includes: the application is loaded for the first time or the user actively triggers the offline package download; The receiving server sends an initial offline package based on the offline package acquisition request, downloads and decompresses the initial offline package, obtains the offline package, and stores the offline package in a local cache.

[0041] It should be noted that the offline package contains a large amount of entity metadata and configuration information.

[0042] Specifically, see Figure 2 , the configuration process of the offline package is: setting basic information of the offline package, adding entity objects, filters for entity data, and setting permissions for the offline package. In the online mode of the client, users can download and decompress the offline package, and can also automatically or manually submit entity data generated in the offline mode. During the first loading of the application, or when the user actively triggers the offline package download, the offline package module will download an offline package containing a large amount of entity metadata. After the download is complete, the data in the offline package will be stored in IndexedDB or other suitable local storage.

[0043] In another embodiment, in step 100, when the client is in offline mode, if a resource request is detected, before intercepting the resource request by an interception tool, the method further includes: When the client is in online mode, if a second preset trigger condition is met, registering and activating the interception tool; wherein the second preset trigger condition includes: the user accesses the application for the first time; The static resources of the application are stored in the local cache through the interception tool.

[0044] Specifically, when a user visits an application for the first time, the Service Worker will be registered and activated. After activation, the Service Worker will pre-cache the static resources of the application (such as HTML, CSS, JS, and images). These resources are stored locally through the Cache API. When the user visits again, the application will directly read these resources from the local cache without relying on the network.

[0045] Step 200: Obtain static resources and offline packages in the local cache based on the resource request, and render the application page offline based on the static resources and entity metadata in the offline package; wherein the offline package is obtained by the client requesting and downloading and decompressing the package in advance from the server in the online mode.

[0046] Specifically, in a network environment, limited network requests will be made and the data will be kept in local LocalStorage or IndexedDB to ensure the consistency of online and offline data.

[0047] Furthermore, when the application is running offline, all resource requests will be intercepted by the Service Worker and responded to based on the locally cached and stored data. Since static resources, entity metadata, and some interface data are cached or stored, the main functions of the application can run normally in an offline state.

[0048] The above is a description of the steps of the metadata-based offline application management method provided by the present invention. From the description of the above steps, it can be seen that the metadata-based offline application management method provided by the present invention is applied to the client, and when the client is in offline mode, if a resource request is detected, the resource request is intercepted by an interception tool; based on the resource request, the static resources and offline packages in the local cache are obtained, and the application page is rendered offline based on the static resources and the entity metadata in the offline package; wherein, the offline package is obtained by the client requesting and downloading and decompressing the server in advance in the online mode. It can be seen that the present invention greatly enhances the offline usage capability of Web applications by combining interception tools with offline package technology; static resources and a large amount of entity metadata can be pre-cached and stored to ensure that even when completely offline, the application can still provide complete functions and significantly improve the user experience.

[0049] Based on the above embodiment, in this embodiment, after step 200 obtains the static resources and offline packages in the local cache based on the resource request, and performs offline rendering on the application page based on the static resources and entity metadata in the offline package, the method further includes: Step 310: Store offline data generated when the application page is rendered offline in a local cache.

[0050] Step 320: when the client is in online mode and connected to the network, upload the offline data to the server; wherein the offline data includes: form data filled in by the user in offline mode and uploaded attachments.

[0051] Step 330: Obtain a verification result performed by the server based on the form data.

[0052] Step 340: When the verification result indicates that the verification has failed, a prompt message and a failure reason are generated, and the offline data is re-uploaded to the server based on the failure reason.

[0053] Specifically, see Figure 2 When the client is in online mode and connected to the network, the entity metadata generated offline is automatically or manually uploaded and verified by the server. If the verification is successful, a success prompt will be displayed; if the verification fails, a failure prompt will be displayed and the failure page will be jumped. Edit according to the reason for the failure and re-upload the offline data.

[0054] The metadata-based offline application management method provided in this embodiment ensures data consistency by uploading data during the offline period after reconnecting to the network.

[0055] The metadata-based offline application management method provided by the embodiment of the present invention greatly enhances the offline usage capability of Web applications through the combination of Service Worker and offline package technology. Static resources and a large amount of entity metadata can be pre-cached and stored to ensure that the application can still provide complete functions even when completely offline, significantly improving the user experience; an intelligent data synchronization and update mechanism is introduced, which can automatically download and update offline packages when there is a network by monitoring the update of server-side data, ensuring the consistency of local data and server data. Users can automatically obtain the latest data after restoring network connection, reducing the need for manual updates and optimizing the use of network traffic; by combining the use of Service Worker, offline packages and local cache technology, a relatively simple but powerful solution is provided, developers do not need to deal with complex synchronization logic or compatibility issues, greatly reducing the implementation and maintenance costs, and can be widely used in modern browsers that support Service Worker, and have stronger compatibility.

[0056] The following is a description of an application offline management device based on metadata provided by the present invention. The application offline management device based on metadata described below and the application offline management method based on metadata described above can be referenced to each other.

[0057] Figure 3 is a schematic diagram of the structure of the metadata-based application offline management device provided by the present invention, such as Figure 3 As shown, the metadata-based application offline management device provided by the present invention is applied to a client, and includes: The interception module 301 is used to intercept the resource request by using an interception tool if a resource request is detected when the client is in offline mode; The offline management module 302 is used to obtain static resources and offline packages in the local cache based on the resource request, and to render the application page offline based on the static resources and entity metadata in the offline package; wherein the offline package is obtained by the client requesting and downloading and decompressing the server in advance in the online mode.

[0058] The metadata-based application offline management device provided by the present invention is applied to the client. When the client is in offline mode, if a resource request is detected, the resource request is intercepted by an interception tool; static resources and offline packages in the local cache are obtained based on the resource request, and application pages are rendered offline based on the static resources and entity metadata in the offline package; wherein the offline package is obtained by the client requesting and downloading and decompressing the server in advance in the online mode. It can be seen that the present invention greatly enhances the offline use capability of Web applications by combining interception tools with offline package technology; static resources and a large amount of entity metadata can be pre-cached and stored to ensure that the application can still provide complete functions even when it is completely offline, significantly improving the user experience.

[0059] Based on the above embodiment, in this embodiment, the device further includes an offline package acquisition module, which is specifically used to: When the client is in offline mode, if a resource request is detected, before intercepting the resource request by the interception tool, when the client is in online mode, if a first preset trigger condition is met, an offline package acquisition request is sent to the server; wherein the first preset trigger condition includes: the application is loaded for the first time or the user actively triggers the offline package download; The receiving server sends an initial offline package based on the offline package acquisition request, downloads and decompresses the initial offline package, obtains the offline package, and stores the offline package in a local cache.

[0060] Based on the above embodiment, in this embodiment, the device further includes a static resource cache module, which is specifically used to: When the client is in offline mode, if a resource request is detected, before intercepting the resource request by the interception tool, when the client is in online mode, if a second preset trigger condition is met, registering and activating the interception tool; wherein the second preset trigger condition includes: the user accesses the application for the first time; The static resources of the application are stored in the local cache through the interception tool.

[0061] Based on the above embodiment, in this embodiment, the device further includes an uploading module, which is specifically used for: After acquiring static resources and offline packages in the local cache based on the resource request and performing offline rendering on the application page based on the entity metadata in the static resources and offline packages, the offline data generated when the application page is rendered offline is stored in the local cache; When the client is in online mode and connected to the network, the offline data is uploaded to the server; wherein the offline data includes: form data filled in by the user in offline mode and uploaded attachments.

[0062] Based on the above embodiment, in this embodiment, the device further includes a verification module, which is specifically used to: The step of obtaining a verification result based on the form data by the server after uploading the offline data to the server when the client is in online mode and connected to the network; When the verification result indicates that the verification has failed, a prompt message and a failure reason are generated, and the offline data is re-uploaded to the server based on the failure reason.

[0063] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may be a robot or other electronic device, and the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the metadata-based application offline management method, which is applied to the client, and includes: When the client is in offline mode, if a resource request is detected, intercepting the resource request by an interception tool; Based on the resource request, the static resources and offline packages in the local cache are obtained, and the application page is rendered offline based on the static resources and the entity metadata in the offline package; wherein, the offline package is obtained by the client requesting and downloading and decompressing the package in advance from the server in the online mode.

[0064] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0065] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the metadata-based application offline management method provided by the above methods, applied to a client, including: When the client is in offline mode, if a resource request is detected, intercepting the resource request by an interception tool; Based on the resource request, the static resources and offline packages in the local cache are obtained, and the application page is rendered offline based on the static resources and the entity metadata in the offline package; wherein, the offline package is obtained by the client requesting and downloading and decompressing the package in advance from the server in the online mode.

[0066] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the metadata-based application offline management method provided by the above methods, and is applied to a client, including: When the client is in offline mode, if a resource request is detected, intercepting the resource request by an interception tool; Based on the resource request, the static resources and offline packages in the local cache are obtained, and the application page is rendered offline based on the static resources and the entity metadata in the offline package; wherein, the offline package is obtained by the client requesting and downloading and decompressing the package in advance from the server in the online mode.

[0067] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0068] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A metadata-based offline application management method, applied to a client, characterized in that: include: When the client is in offline mode, if a resource request is detected, intercepting the resource request by an interception tool; Based on the resource request, the static resources and offline packages in the local cache are obtained, and the application page is rendered offline based on the static resources and the entity metadata in the offline package; wherein, the offline package is obtained by the client requesting and downloading and decompressing the package in advance from the server in the online mode.

2. The metadata-based offline application management method according to claim 1, characterized in that: When the client is in offline mode, if a resource request is detected, before intercepting the resource request by an interception tool, the method further includes: When the client is in online mode, if a first preset trigger condition is met, an offline package acquisition request is sent to the server; wherein the first preset trigger condition includes: the application is loaded for the first time or the user actively triggers the offline package download; The receiving server sends an initial offline package based on the offline package acquisition request, downloads and decompresses the initial offline package, obtains the offline package, and stores the offline package in a local cache.

3. The metadata-based offline application management method according to claim 2, characterized in that: When the client is in offline mode, if a resource request is detected, before intercepting the resource request by an interception tool, the method further includes: When the client is in online mode, if a second preset trigger condition is met, registering and activating the interception tool; wherein the second preset trigger condition includes: the user accesses the application for the first time; The static resources of the application are stored in the local cache through the interception tool.

4. The metadata-based offline application management method according to claim 1, characterized in that: After acquiring the static resources and offline packages in the local cache based on the resource request, and performing offline rendering on the application page based on the static resources and entity metadata in the offline packages, the method further includes: Store offline data generated when the application page is rendered offline in the local cache; When the client is in online mode and connected to the network, the offline data is uploaded to the server; wherein the offline data includes: form data filled in by the user in offline mode and uploaded attachments.

5. The metadata-based offline application management method according to claim 4, characterized in that: When the client is in online mode and connected to the network, after uploading the offline data to the server, the method further includes: Obtaining a verification result performed by the server based on the form data; When the verification result indicates that the verification has failed, a prompt message and a failure reason are generated, and the offline data is re-uploaded to the server based on the failure reason.

6. A metadata-based application offline management device, applied to a client, characterized in that: include: An interception module, configured to intercept the resource request by using an interception tool if a resource request is detected when the client is in an offline mode; The offline management module is used to obtain the static resources and offline packages in the local cache based on the resource request, and to render the application page offline based on the static resources and entity metadata in the offline package; wherein the offline package is obtained by the client requesting and downloading and decompressing the package in advance from the server in the online mode.

7. The metadata-based application offline management device according to claim 6, characterized in that: The device also includes an offline package acquisition module, which is specifically used to: When the client is in offline mode, if a resource request is detected, before intercepting the resource request by the interception tool, when the client is in online mode, if a first preset trigger condition is met, an offline package acquisition request is sent to the server; wherein the first preset trigger condition includes: the application is loaded for the first time or the user actively triggers the offline package download; The receiving server sends an initial offline package based on the offline package acquisition request, downloads and decompresses the initial offline package, obtains the offline package, and stores the offline package in a local cache.

8. The metadata-based application offline management device according to claim 7, characterized in that: The device also includes a static resource cache module, which is specifically used to: When the client is in offline mode, if a resource request is detected, before intercepting the resource request by the interception tool, when the client is in online mode, if a second preset trigger condition is met, registering and activating the interception tool; wherein the second preset trigger condition includes: the user accesses the application for the first time; The static resources of the application are stored in the local cache through the interception tool.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the metadata-based offline application management method according to any one of claims 1 to 5 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for offline application management based on metadata as claimed in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Webpage offline access method and device, terminal and storage medium

    CN111859211A

  • Page offline rendering method and system, terminal equipment and storage medium

    CN115544407A

  • Page loading method and device, storage medium and electronic equipment

    CN116166911A

  • Method and device for recording information offline, electronic equipment and storage medium

    CN118445501A

  • Offline caching method and apparatus

    US20150189036A1