Method and system for limiting storage space of mobile micro-application

By setting storage space thresholds and dividing them by data type in mobile micro-applications, and combining user behavior records and idle time cleanup, the problem of automated management of mobile micro-application storage space is solved, achieving efficient utilization of device storage resources and improving user experience.

CN121858472APending Publication Date: 2026-04-14STATE GRID INFORMATION & TELECOMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511789320.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the problems of lack of real-time control, coarse granularity, and insufficient automation of mobile micro-application storage space, resulting in excessive consumption of device storage resources, affecting user experience and device performance.

Method used

By setting storage space limit thresholds for mobile micro-applications and categorizing them by data type into application body, cleanable persistent data, and cached data, user behavior is recorded, and data exceeding the threshold is cleaned up in priority during idle time. The automatic checking and cleanup process is interrupted and recovered, and users are alerted to confirm the operation when necessary.

Benefits of technology

It enables fine-grained automated management of mobile micro-application storage space, avoids accidental deletion of critical data, improves device performance and user experience, and reduces resource consumption and user operation burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121858472A_ABST
    Figure CN121858472A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for limiting a mobile micro-application storage space, and belongs to the technical field of micro-applications, the method comprises the following steps: dividing micro-application storage into an application package dynamic loading part, cleanable / uncleanable persistent data and cache data; recording behaviors such as micro-application package body loading, data operation, user idling, access counting and the like; when the user is idle, checking storage occupancy and screening super-threshold micro-applications; cleaning according to the sequence of the cache, the cleanable persistent data and the infrequently-used part of the packet body until the content is lower than a threshold value; when user operation is encountered during checking / cleaning, interruption is carried out, and next idle recovery is carried out; if the threshold value is still exceeded after cleaning, an alarm is given, and a user confirms whether common data is cleaned or not. According to the method, the problems of management and control deficiency, coarse granularity and insufficient automation in micro-application storage are solved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of micro-application technology, specifically relating to a method and system for limiting the storage space of mobile micro-applications. Background Technology

[0002] With the development of mobile internet, mobile portals (basic applications) and mobile micro-applications have become widely used, such as WeChat and mini-programs, effectively solving the problem of a single application carrying a large number of services. However, mobile micro-applications and portals are often built by different entities, and micro-application data is continuously stored on mobile devices, leading to a continuous increase in device storage usage, which affects user experience and device performance.

[0003] Mobile data can be considered as a server backup. In addition to cache, application packages and persistent data can also be cleaned up. However, existing storage management solutions have obvious defects. First, they rely on manual cleanup by the operating system or portal, which is a post-event remedy and cannot limit storage expansion in real time. Second, the cleanup granularity is too coarse and cannot distinguish between cleanable and non-cleanable data types, making it easy to accidentally delete critical data. Third, they require manual confirmation from users and are difficult to automate and manage seamlessly.

[0004] Therefore, existing technologies cannot solve the problems of lack of real-time control, coarse granularity, and insufficient automation in mobile micro-application storage. There is an urgent need for a fine-grained and automated method and system for limiting storage space. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a method and system for limiting the storage space of mobile micro-applications, so as to solve or partially solve the problems mentioned in the background art.

[0006] In view of the above objectives, in a first aspect, the present invention provides a method for limiting the storage space of mobile micro-applications, comprising: (1) Storage space limit preset: Set the storage space limit threshold for each mobile micro-application under the mobile portal, and divide the storage space of each mobile micro-application into the application package dynamic loading part, cleanable persistent data, non-cleanable persistent data and cached data according to the data type; (2) Behavior and data recording: During the use of the mobile micro-application, record the dynamic download and loading status of the mobile micro-application package, the data storage operation behavior, the user's idle behavior, the user's idle phase end behavior, and the user's access to the mobile micro-application count behavior. (3) Storage space check during idle time: When user idle behavior is detected, the actual storage space occupancy of the mobile micro-application is checked based on the preset limit threshold and the recorded behavior data, and micro-applications that exceed the limit threshold are filtered out to form a list of micro-applications to be cleaned up. (4) Clean up in priority during idle time: For micro-applications to be cleaned up, use the user's idle time to clean up the storage space in the order of cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package, until the storage space of the micro-application is reduced to within the limit threshold. (5) Interruption and recovery: If user operation behavior is detected during the inspection or cleanup process, the current work is interrupted and the completed inspection or cleanup results are recorded. When user idle behavior is detected again, the interrupted inspection or cleanup work is resumed first. (6) Alarm and user confirmation: If the storage space that can be cleaned by the micro-application still exceeds the limit threshold after cleaning, an alarm is triggered and the user is prompted to confirm whether to clean up the commonly used parts of the application package and the persistent data that cannot be cleaned up. After the user confirms, the corresponding cleaning operation is performed.

[0007] As a preferred method for limiting the storage space of mobile micro-applications, in step (3), during the process of checking the actual storage space occupancy of the mobile micro-applications, the process is performed according to a preset cycle, prioritizing the checking of micro-applications that have not been checked within the cycle; actual checking is performed on some data that has data storage operation behavior since the last check, and the results of the last check are used for some data that has no data storage operation behavior.

[0008] As a preferred method for limiting the storage space of mobile micro-applications, in step (4), the infrequently used parts of the dynamically loaded application package are determined by the number of times the user accesses the micro-application recorded in step (2). The dynamically loaded application package parts with an access count lower than a preset threshold are considered infrequently used parts.

[0009] As a preferred method for limiting the storage space of mobile micro-applications, in step (4), when the storage space of the micro-application is reduced to within the limit threshold, a target cleaning ratio is preset, and when the storage space of the micro-application reaches the target cleaning ratio, the cleaning of cleanable data is stopped.

[0010] As a preferred method for limiting the storage space of mobile micro-applications, in step (3), when micro-applications that exceed the limit threshold are selected, the total storage space occupied by the micro-applications is calculated. The total storage space occupied is the sum of the data size of the actual checked part and the data size of the part that follows the previous check result. The total storage space occupied is then compared with the preset limit threshold to determine whether it exceeds the threshold.

[0011] As a preferred method for limiting the storage space of mobile micro-applications, in step (4), when cleaning up multiple micro-applications to be cleaned, they are sorted according to the degree to which each micro-application exceeds the storage space limit threshold, and the micro-applications that exceed the limit to a higher degree are cleaned up first.

[0012] As a preferred method for limiting the storage space of mobile micro-applications, in step (6), an alarm is triggered when the limit threshold is still exceeded after all the cleanable storage space has been cleaned. The cleanable storage space includes cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package.

[0013] In a second aspect, the present invention also provides a system for limiting the storage space of mobile micro-applications, comprising: The mobile micro-application storage space scheduling module is used to set the storage space limit threshold for each mobile micro-application under the mobile portal, and to divide the storage space of each mobile micro-application into the application package dynamic loading part, cleanable persistent data, non-cleanable persistent data and cached data according to the data type. The behavior recording module is used to record the dynamic download and loading status of the mobile micro-application package, data storage operation behavior, user idle behavior, user idle phase end behavior, and user access to the mobile micro-application count behavior during the use of the mobile micro-application. The mobile micro-application storage space checking module is used to check the actual storage space usage of the mobile micro-application based on a preset limit threshold and recorded behavior data when user idle behavior is detected, filter out micro-applications that exceed the limit threshold, and form a list of micro-applications to be cleaned up. The mobile micro-application storage space cleanup module is used to clean up the storage space of micro-applications to be cleaned up during the user's idle time, in the order of cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package, until the storage space of the micro-application is reduced to within the limit threshold. The process interruption and recovery module is used to interrupt the current work and record the completed inspection or cleanup results if user operation behavior is detected during the inspection or cleanup process. When user idle behavior is detected again, the interrupted inspection or cleanup work will be resumed first. The storage space alarm module is used to trigger an alarm and prompt the user if the storage space that can be cleaned up by the micro-application still exceeds the limit threshold after cleaning. The user then confirms whether to clean up the commonly used parts of the application package and the persistent data that cannot be cleaned up. After the user confirms, the corresponding cleaning operation is performed.

[0014] As a preferred system solution for limiting the storage space of mobile micro-applications, the mobile micro-application storage space checking module checks the actual storage space occupancy of the mobile micro-applications according to a preset cycle, prioritizing the checking of micro-applications that have not completed the check within the cycle; it performs actual checks on data that has data storage operation behavior since the last check, and uses the results of the last check for data that has no data storage operation behavior.

[0015] As a preferred system solution for limiting the storage space of mobile micro-applications, the mobile micro-application storage space checking module, when filtering out micro-applications that exceed the limit threshold, calculates the total storage space occupied by the micro-applications. The total storage space occupied is the sum of the data size of the actual checked part and the data size of the part that follows the previous check result. Then, the total storage space occupied is compared with the preset limit threshold to determine whether it exceeds the threshold.

[0016] As a preferred system solution for limiting the storage space of mobile micro-applications, in the mobile micro-application storage space cleanup module, the infrequently used parts of the dynamically loaded portion of the application package are determined by the user's access behavior recorded by the behavior recording module. The dynamically loaded portion of the application package with an access count lower than a preset threshold is considered an infrequently used part.

[0017] As a preferred system solution for limiting the storage space of mobile micro-applications, the mobile micro-application storage space cleaning module sets a preset target cleaning ratio when the micro-application storage space is reduced to within the limit threshold. When the micro-application storage space reaches the target cleaning ratio, the cleaning of cleanable data is stopped.

[0018] As a preferred system solution for limiting the storage space of mobile micro-applications, the mobile micro-application storage space cleanup module sorts multiple micro-applications to be cleaned according to the degree to which each micro-application exceeds the storage space limit threshold, and prioritizes the micro-applications that exceed the limit to the greater extent.

[0019] As a preferred system solution for limiting the storage space of mobile micro-applications, the storage space alarm module triggers an alarm when the limit threshold is still exceeded after all cleanable storage space has been cleaned. The cleanable storage space includes cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package.

[0020] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method for limiting the storage space of a mobile micro-application, or any possible implementation thereof.

[0021] Fourthly, the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform steps in the method for limiting the storage space of a mobile micro-application, or any possible implementation thereof, in the first aspect.

[0022] From the above description, the beneficial effects of the present invention can be summarized as follows: First, this invention changes the limitation of existing technologies that can only remedy problems after the fact by using a control mode of preset storage thresholds and in-process inspection and cleanup. It monitors the space occupancy in real time during the data storage process of mobile micro-applications, and triggers cleanup once the preset threshold is exceeded, thus avoiding excessive occupation of storage resources from the source, ensuring the stability of mobile device storage resources, and alleviating problems such as application lag and slow device operation caused by insufficient storage.

[0023] Secondly, on the one hand, this invention refines mobile micro-application data into types such as dynamically loaded parts of the application package, cleanable / non-cleanable persistent data, and cached data, which can accurately distinguish the business attributes and cleanup priorities of different data. On the other hand, cleanup is performed in the order of cached data, cleanable persistent data, and infrequently used parts of the application package, and can be further differentiated for data subclasses, avoiding the problems of accidental deletion of key data and abnormal application functions caused by the one-size-fits-all cleanup of existing technologies, thereby improving the security and accuracy of data management.

[0024] Third, this invention captures users' idle time periods and automatically triggers storage checks and cleanup operations without requiring manual initiation by the user. Furthermore, if user interaction occurs during the check / cleanup process, it can be immediately interrupted and resumed preferentially the next time the user is idle, without interfering with normal user operation. This "seamless automation" mode reduces the user's operational burden and avoids operational errors that may occur during manual cleanup, significantly improving the user experience.

[0025] Fourth, this invention reduces unnecessary computation and storage consumption through strategies such as periodic checks, actual checks only on data that has been operated on, and sorting and cleaning according to the degree to which it exceeds the threshold. At the same time, it stops cleaning after reaching a preset target ratio, which ensures sufficient storage space and avoids the time-consuming reloading of applications caused by excessive cleaning, thereby achieving a balance between storage resources and application performance and improving the overall resource utilization efficiency of mobile devices.

[0026] Fifth, by clearly defining the scope of data that cannot be cleaned, this invention ensures that critical business data is not mistakenly cleaned, thus maintaining the stability of core application functions. At the same time, it only pushes an alarm to the user and asks for confirmation on whether to clean up frequently used data when the cleanable space is exhausted. This avoids unnecessary alarm interference and further protects the security of important data through the user confirmation process, thus balancing storage control and data security requirements. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in this invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram of a method for limiting the storage space of mobile micro-applications provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the technical architecture of the method for limiting the storage space of mobile micro-applications provided in an embodiment of the present invention; Figure 3 A schematic diagram of a system architecture for limiting the storage space of mobile micro-applications provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0030] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this invention should have the ordinary meaning understood by those skilled in the art to which this invention pertains. The terms "comprising" or "including," or similar words used in the embodiments of this invention, mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects.

[0031] With the rapid development of mobile internet technology, the functional complexity and business capacity of mobile applications continue to increase, and the architecture of mobile portals and mobile micro-applications has gradually become the industry mainstream. Taking WeChat and its mini-programs as an example, this model effectively solves the performance bottleneck problem caused by a single application carrying a large number of businesses by aggregating core functions in a mobile portal and splitting subdivided businesses into independent mobile micro-applications, thus meeting users' needs for diversified services.

[0032] However, mobile micro-applications and mobile portals are usually built by different entities, and mobile micro-applications have a certain degree of freedom in data storage management. As the number of mobile micro-applications increases and their usage frequency rises, the data they generate is continuously stored on the mobile device, causing the overall storage space occupied by mobile applications to continuously expand. This data covers various types of information required for application operation, which can be divided into three main categories: First, the application package, including the application's own code, resource files (images, audio, video, etc.), dependency libraries, and H5 modules dynamically downloaded when users use specific functions; second, persistent application data, including local database data (such as SQLite databases, Room / CoreData encapsulated data), file data in the application directory, key-value pair storage data (such as Realm), and documents synchronized from cloud storage to local storage, multimedia files in public directories, etc.; third, cached data, including temporary files generated during application execution, cached request data stored to accelerate operation, and log files recording application operation activities (including error information, debugging information, performance indicators, etc.).

[0033] Unlike server-side data management, which can only clean up cached data, mobile data can be considered a "backup" of server-side data. Therefore, the application package body and persistent application data on mobile devices also have the potential for cleanup, providing a feasible path to alleviate storage space consumption issues. Currently, cleaning up mobile application storage space mainly relies on two existing solutions: one is a general function provided by the mobile operating system, which only supports clearing the cache or deleting all application data, and cannot provide fine-grained management based on the characteristics of mobile micro-applications; the other is a manual cleanup function implemented by some mobile portal products, which allows users to delete all data (including application package body, persistent data, and cached data) of a single mobile micro-application, but it also lacks targeted management capabilities.

[0034] The aforementioned existing technologies have significant shortcomings and are unable to meet the needs of efficient management and control of mobile micro-application storage space: First, in terms of timing, existing solutions are all in a "post-event cleanup" mode, which can only take remedial measures after the storage space has been over-occupied. They cannot limit the unlimited expansion of storage space in real time during data storage, resulting in user devices being constantly under storage resource pressure, affecting the smoothness of application operation and user experience. Second, in terms of cleanup granularity, existing solutions cannot distinguish between data type differences. They cannot identify the boundaries between application package, cleanable persistent data, and non-cleanable persistent data, nor can they perform differentiated processing on temporary files, request data, and log files within cached data. They can only perform "one-size-fits-all" cleanup, which is prone to accidentally deleting critical business data, leading to application malfunctions. Third, in terms of automation, due to the coarse granularity of cleanup, existing solutions require users to manually confirm the cleanup operation, which cannot achieve seamless automated management and control, increases the user's operational burden, and is prone to data security risks due to user operation errors.

[0035] In summary, existing technologies struggle to address the core issues of inadequate real-time management, coarse granularity, and insufficient automation in mobile micro-application storage space. There is an urgent need for a method and system for limiting mobile micro-application storage space that enables fine-grained, automated, and seamless management, in order to alleviate excessive storage space consumption and improve the performance and user experience of mobile applications. The following are the specific details of embodiments of this invention.

[0036] See Figure 1 and Figure 2 This invention provides a method for limiting the storage space of mobile micro-applications, comprising the following steps: (1) Storage space limit preset: Set the storage space limit threshold for each mobile micro-application under the mobile portal, and divide the storage space of each mobile micro-application into application package dynamic loading part, cleanable persistent data, non-cleanable persistent data and cached data according to data type. From the perspective of data attributes, the necessity of different data types of mobile micro-applications for application operation varies significantly. For example, non-cleanable persistent data is core business data, and deletion will cause functional abnormalities; cached data is temporary data, and deletion will not affect the core function. Therefore, it is necessary to divide according to data type and set the limit threshold. The threshold setting needs to be combined with the storage capacity of mobile devices and the business needs of micro-applications to ensure that storage resources are not wasted and the normal operation of the application is met. The data type division corresponds to the three types of data (application package, persistent application data, and cached data) and sub-types occupied by mobile micro-applications, providing a basis for judgment for type-based inspection and priority-based cleanup, solving the defects of existing technologies that cannot distinguish data types and clean up in a one-size-fits-all manner.

[0037] (2) Behavior and Data Recording: During the use of the mobile micro-application, the dynamic download and loading status of the mobile micro-application package, data storage operation behavior, user idle behavior, user idle period end behavior, and user access count behavior of the mobile micro-application are recorded. On the one hand, recording the dynamic download and loading status of the package and data storage operation behavior can clarify the source and change of micro-application data, providing a basis for actual inspection only of data with operation, and reducing unnecessary inspection consumption; on the other hand, recording user idle behavior and idle period end behavior is necessary because the inspection and cleanup process consumes device resources, and if it is executed when the user is using the application, it will cause the application to lag, so it is necessary to capture idle periods to trigger control; and recording user access count behavior is the basis for determining the infrequently used parts of the application package. For example, packages with low access counts have low usage frequency, and the impact on users after cleanup is small, providing data support for priority cleanup.

[0038] (3) Storage Space Check During Idle Time: When user idle behavior is detected, the actual storage space occupancy of the mobile micro-application is checked based on the preset limit threshold and the recorded behavior data. Micro-applications exceeding the limit threshold are filtered out to form a list of micro-applications to be cleaned up. In terms of timing, using user idle behavior to trigger the check can avoid the check process occupying resources and affecting user use, thus achieving a seamless check. In terms of check logic, the preset threshold is the standard for determining whether to clean up, and the recorded behavior data is the key to simplifying the check process. By recording the data storage operation behavior in the early stage, it can be clear which data has changed and which has not changed, without having to check all data repeatedly, thus improving the check efficiency. Finally, the list of micro-applications to be cleaned up is filtered out, providing clear targets for cleanup and solving the problem of existing technologies having no clear cleanup targets and blind cleanup.

[0039] (4) Prioritized cleanup during idle time: For micro-applications to be cleaned up, storage space is cleaned up in the following order during user idle time: cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package, until the storage space of the micro-application is reduced to within the limit threshold. The priority order is based on the necessity of the data for the application operation. Cached data is temporary data (such as temporary files and cached request data). After deletion, it only needs to be reloaded or requested and does not affect the core business, so it has the highest priority. Cleanable persistent data, such as key-value pairs data of non-core business and unnecessary files in public directories, although persistent storage, can be deleted according to business requirements, so it has the next highest priority. Infrequently used parts of the dynamically loaded parts of the application package have the lowest priority because the user access frequency is low and the impact on user use after cleanup is small. This priority-based cleanup logic ensures that useless and safe storage space is released first, and avoids application function abnormalities caused by accidental deletion of critical data, thus solving the defects of existing technologies that cannot clean up by type and are prone to accidental deletion of critical data.

[0040] (5) Process Interruption and Recovery: If user operation is detected during the inspection or cleanup process, the current work is interrupted and the completed inspection or cleanup results are recorded. When user idle behavior is detected again, the interrupted inspection or cleanup work is resumed first. The inspection and cleanup process consumes device resources. If it continues to be executed while the user is operating the application, it will cause the application response to slow down and lag. Therefore, when user operation is detected, the current work is interrupted immediately, and resources are allocated to the functions that the user is using to ensure user experience. At the same time, the completed results are recorded and resumed first when idle, which can avoid repetitive work, improve management efficiency, and reflect the management goal of seamless automation.

[0041] (6) Alarm and User Confirmation: If the cleanable storage space of the micro-application still exceeds the limit threshold after cleanup, an alarm is triggered and the user is prompted to confirm whether to clean up the commonly used parts of the application package and the persistent data that cannot be cleaned up. After the user confirms, the corresponding cleanup operation is performed. The commonly used parts of the application package (highly accessed by users) and the persistent data that cannot be cleaned up (core business data) are directly related to the normal use of the application functions. For example, deleting the commonly used package requires re-downloading, which affects the efficiency of use; deleting the core database will cause user data loss, so it cannot be cleaned up automatically by the system. When the limit is still exceeded after all the cleanable space is cleaned up, it means that the space of highly necessary data needs to be released. At this time, the user is notified of the situation through an alarm and the user makes a decision based on their own needs. If the user urgently needs space, they confirm the cleanup; if they are worried about the impact on use, they cancel it. This system automation and user decision-making mode not only avoids the system from accidentally deleting key data, but also provides users with flexible choices, solving the defects of insufficient automation and the need for full manual confirmation in the existing technology.

[0042] In one possible embodiment, in step (3), during the process of checking the actual storage space occupancy of the mobile micro-application, the process is performed according to a preset cycle, prioritizing the checking of micro-applications that have not been checked within the cycle; actual checking is performed on the data that has data storage operation behavior since the last check, and the data that has no data storage operation behavior uses the results of the last check.

[0043] Specifically, performing checks according to preset cycles, such as weekly or monthly, can avoid the continuous resource occupation caused by real-time checks, while ensuring that the storage status is monitored regularly to prevent excessive storage expansion caused by long-term lack of checks; prioritizing the checks of incomplete micro-applications can ensure that all micro-applications can be covered, avoiding some micro-applications from being left unchecked for a long time and causing storage to go out of control; and only checking actual data with operations is based on the logic that no data with operations has changed and the storage space size is consistent with the last time, without having to repeatedly traverse files and calculate sizes, which significantly reduces the resource consumption and time cost of the check process.

[0044] In one possible embodiment, in step (4), the infrequently used parts of the application package dynamic loading part are determined by the number of times the user accesses the micro-application recorded in step (2). The application package dynamic loading part with an access count lower than a preset threshold is considered an infrequently used part.

[0045] Specifically, the frequency of use of dynamically loaded parts of an application package essentially depends on the user's usage frequency. Parts with high access counts are frequently used and need to be re-downloaded after being cleaned up, which increases user waiting time and affects the experience. Parts with low access counts are infrequently used and have minimal impact on daily use after being cleaned up. By pre-designing thresholds, the subjective judgment of "frequent use" can be transformed into objective data standards, ensuring the consistency and rationality of the judgment results, avoiding a decline in user experience caused by subjective misjudgment by the system, and providing a clear basis for priority-based cleanup.

[0046] In one possible embodiment, in step (4), when the micro-application storage space is reduced to within the limit threshold, a target cleanup ratio is preset, and when the micro-application storage space reaches the target cleanup ratio, the cleanup of cleanable data is stopped.

[0047] Specifically, simply cleaning up to below the threshold may cause new data in micro-applications to exceed the threshold again in the short term, requiring frequent cleaning triggers and increasing device resource consumption. Setting a target cleaning ratio can reserve a certain buffer space and reduce the frequency of cleaning again in the short term. At the same time, excessive cleaning will cause a large amount of cleanable data to be deleted, which will require users to download or request it again when they use it later, increasing network traffic consumption and application loading time. Therefore, setting a target cleaning ratio can find a balance between releasing enough space and reducing subsequent loading costs, thereby improving the overall management effect.

[0048] In one possible embodiment, in step (3), when micro-applications that exceed the limit threshold are screened out, the total storage space occupied by the micro-applications is calculated. The total storage space occupied is the sum of the data size of the actual checked part and the data size of the part that follows the previous check result. The total storage space occupied is then compared with the preset limit threshold to determine whether it exceeds the threshold.

[0049] Specifically, the total storage space of a micro-application consists of two parts: data with operations and data without operations. Data with operations may change, so actual inspection is required to obtain the current accurate size. Data without operations has not changed, so the previous inspection result can be used. If only the data of the actually inspected part is counted, the usage of data without operations will be missed, resulting in an underestimation of the total usage and causing control failure. If data without operations is repeatedly inspected, it will increase resource consumption. Therefore, adding the sizes of the two parts of data to obtain the total usage can ensure both statistical accuracy and inspection efficiency.

[0050] In one possible embodiment, in step (4), when cleaning up multiple micro-applications to be cleaned, they are sorted according to the degree to which each micro-application exceeds the storage space limit threshold, and the micro-applications that exceed the limit to a higher degree are cleaned up first.

[0051] Specifically, when multiple micro-applications exceed the threshold, such as micro-application A exceeding the threshold by 50MB and micro-application B exceeding the threshold by 10MB, micro-application A puts greater pressure on storage resources. If B is cleaned up first, it may not be able to quickly release enough space. For example, if the device only has 30MB of free space, cleaning up B will only release 10MB, which is still insufficient, leading to a continued storage shortage. However, if A is cleaned up first, 50MB can be released at once, quickly relieving the storage pressure. This strategy of prioritizing the degree of exceedance aligns with the management logic of prioritizing urgent issues. It can maximize the release of storage space within a limited cleanup time, quickly improve the device's storage status, and enhance the timeliness and effectiveness of management.

[0052] In one possible embodiment, in step (6), the alarm is triggered when the limit threshold is still exceeded after all the cleanable storage space has been cleaned. The cleanable storage space includes cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded part of the application package.

[0053] Specifically, the cleanable storage space refers to the portion that the system can safely and autonomously clean up. If an alarm is triggered before all cleanable space is cleaned up, it will cause users to receive frequent alarm notifications, causing interference. Only when the limit is still exceeded after all cleanable space has been cleaned up does it indicate that data that cannot be cleaned autonomously needs to be accessed. At this point, the user is informed. On the one hand, this prevents the system from arbitrarily cleaning up critical data and causing risks. On the other hand, it makes it clear to the user that there is no safe space to release and that a decision needs to be made. This ensures that the user perceives the necessity of the alarm, increases the user's attention to the alarm, and balances automated control with the user's right to know.

[0054] The application scenarios of this invention are as follows: Application Scenario 1: Integrated Social and Service Mobile Portal Scenario: Taking comprehensive mobile portals like WeChat and Alipay as examples, these applications aggregate a large number of third-party mobile micro-applications, covering diverse services such as shopping, travel, government affairs, and entertainment. As user frequency increases, the dynamic loading packages, persistent data, and cached data of each micro-application accumulate continuously, causing the overall storage usage of the application to increase from hundreds of MB to several GB, and even triggering device storage shortage warnings. This invention can play a role in this scenario. By preset storage thresholds for each mini-program, it automatically checks the storage usage of each mini-program when the user is idle after exiting the application, prioritizing the cleanup of low-frequency mini-programs with severe over-storage, releasing space in the order of cached images, order history cache, and infrequently used function packages; if the usage is still excessive after cleanup, it only pushes alerts to users for high-frequency mini-programs to avoid frequent interruptions, ensuring the smoothness of frequently used services while preventing storage resources from being excessively occupied by low-frequency micro-applications.

[0055] Application Scenario 2: Enterprise-level Mobile Office Portal Scenario Enterprise-level mobile portals such as WeChat Work and DingTalk typically provide employees with internal mobile micro-applications for attendance, approvals, project collaboration, and document management. These micro-applications often involve enterprise data, such as project documents and approval records, requiring a balance between storage control and data security. In existing solutions, if employees manually clean up data in these micro-applications, they are prone to accidentally deleting critical approval records or project documents. If not cleaned, document caches and log files gradually consume device storage, impacting work efficiency. This invention specifically addresses these pain points: it divides micro-application data into non-cleanable core data, such as archived approval forms and core enterprise documents, and cleanable data, such as temporary document caches, expired logs, and unused collaboration module packages, setting storage thresholds for each micro-application. During employee lunch breaks, after get off work, or other periods of device downtime, it automatically checks the storage of each micro-application, cleaning only cleanable data. If an employee suddenly logs into the office portal during the cleaning process, the cleaning is immediately interrupted and the progress is saved. If the cleanable data still exceeds the limit after cleaning, an alert is sent to the administrator or employee to confirm whether non-core historical data needs to be cleaned. This avoids accidental deletion of enterprise data and alleviates storage pressure on employee devices.

[0056] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and these multiple devices will interact with each other to complete the method for limiting the storage space of mobile micro-applications.

[0057] It should be noted that the above description describes some embodiments of the present invention. In some cases, the described actions or steps can be performed in a different order than that shown in the above embodiments and the desired result can still be achieved. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0058] See Figure 3 Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this embodiment of the invention also provides a system for limiting the storage space of mobile micro-applications, which implements the methods of the above embodiments or any possible implementation thereof, including: The mobile micro-application storage space scheduling module 100 is used to set the storage space limit threshold for each mobile micro-application under the mobile portal, and to divide the storage space of each mobile micro-application into the application package dynamic loading part, cleanable persistent data, non-cleanable persistent data and cached data according to the data type. The behavior recording module 200 is used to record the dynamic download and loading status of the mobile micro-application package, data storage operation behavior, user idle behavior, user idle phase end behavior, and user access to the mobile micro-application count behavior during the use of the mobile micro-application. The mobile micro-application storage space checking module 300 is used to check the actual storage space occupancy of the mobile micro-application based on a preset limit threshold and recorded behavior data when user idle behavior is detected, filter out micro-applications that exceed the limit threshold, and form a list of micro-applications to be cleaned up. The mobile micro-application storage space cleanup module 400 is used to clean up the storage space of micro-applications to be cleaned up by taking advantage of the user's idle time, in the order of cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package, until the storage space of the micro-application is reduced to within the limit threshold. The process interruption and recovery module 500 is used to interrupt the current work and record the completed inspection or cleanup results if user operation behavior is detected during the inspection or cleanup process. When user idle behavior is detected again, the interrupted inspection or cleanup work will be resumed first. The storage space alarm module 600 is used to trigger an alarm and prompt the user if the storage space that can be cleaned up by the micro-application still exceeds the limit threshold after cleaning. The user then confirms whether to clean up the commonly used parts of the application package and the persistent data that cannot be cleaned up. After the user confirms, the corresponding cleaning operation is performed.

[0059] In this embodiment, the mobile micro-application storage space checking module 300 checks the actual storage space occupancy of the mobile micro-application according to a preset cycle, prioritizing the checking of micro-applications that have not been checked within the cycle; it performs actual checks on data that has data storage operation behavior since the last check, and uses the results of the last check for data that has no data storage operation behavior.

[0060] In this embodiment, when the mobile micro-application storage space checking module 300 filters out micro-applications that exceed the limit threshold, it calculates the total storage space occupied by the micro-application. The total storage space occupied is the sum of the data size of the actual checked part and the data size of the part that follows the previous check result. Then, it compares the total storage space occupied with the preset limit threshold to determine whether it exceeds the threshold.

[0061] In this embodiment, in the mobile micro-application storage space cleanup module 400, the infrequently used parts of the application package dynamic loading part are determined by the user's access behavior of the micro-application recorded by the behavior recording module. The application package dynamic loading part with an access count lower than a preset threshold is considered an infrequently used part.

[0062] In this embodiment, the mobile micro-application storage space cleaning module 400 cleans up the micro-application storage space until it drops to within a limit threshold, then sets a preset target cleaning ratio. When the micro-application storage space reaches the target cleaning ratio, the cleaning of cleanable data is stopped.

[0063] In this embodiment, when the mobile micro-application storage space cleaning module 400 performs cleaning on multiple micro-applications to be cleaned, it sorts them according to the degree to which each micro-application exceeds the storage space limit threshold, and the micro-applications that exceed the limit to a higher degree are cleaned first.

[0064] In this embodiment, the storage space alarm module 600 triggers an alarm when the limit threshold is still exceeded after all cleanable storage space has been cleaned. The cleanable storage space includes cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded application package.

[0065] The apparatus described above is used to implement a method for limiting the storage space of mobile micro-applications in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0066] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a method for limiting the storage space of a mobile micro-application as described in any of the above embodiments.

[0067] Figure 4 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 710, a memory 720, an input / output interface 730, a communication interface 740, and a bus 750. The processor 710, memory 720, input / output interface 730, and communication interface 740 are interconnected internally via the bus 750.

[0068] The processor 710 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0069] The memory 720 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 720 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 720 and is called and executed by the processor 710.

[0070] The input / output interface 730 is used to connect input / output modules to enable information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0071] The communication interface 740 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0072] Bus 750 includes a pathway for transmitting information between various components of the device, such as processor 710, memory 720, input / output interface 730, and communication interface 740.

[0073] It should be noted that although the above-described device only shows the processor 710, memory 720, input / output interface 730, communication interface 740, and bus 750, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0074] The electronic devices described above are used to implement a method for limiting the storage space of mobile micro-applications in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0075] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, the present invention also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute a method for limiting the storage space of mobile micro-applications as described in any of the above embodiments.

[0076] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0077] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute a method for limiting the storage space of mobile micro-applications as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0078] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention is limited to these examples; within the framework of the invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity.

[0079] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of the invention, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of the invention, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of the invention will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of the invention, it will be apparent to those skilled in the art that the embodiments of the invention may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0080] Although the invention has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAMDRAM) may be used with the embodiments discussed.

[0081] The embodiments of this invention are intended to cover all such substitutions, modifications, and variations falling within the scope of the claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this invention should be included within the scope of protection of this invention.

Claims

1. A method for limiting the storage space of mobile micro-applications, characterized in that, include: Set a storage space limit threshold for each mobile micro-application under the mobile portal, and divide the storage space of each mobile micro-application into the application package dynamic loading part, cleanable persistent data, non-cleanable persistent data and cached data according to data type; During the use of the mobile micro-application, the dynamic download and loading status of the mobile micro-application package, data storage operation behavior, user idle behavior, user idle phase end behavior, and user access to the mobile micro-application count behavior are recorded. When user idle behavior is detected, based on preset limit thresholds and recorded behavior data, the actual storage space usage of the mobile micro-application is checked, micro-applications that exceed the limit thresholds are filtered out, and a list of micro-applications to be cleaned up is formed. For micro-applications to be cleaned up, during users' idle time, storage space is cleaned up in the following order: cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package, until the storage space of the micro-application is reduced to within the limit threshold. If user activity is detected during the inspection or cleanup process, the current work is interrupted and the completed inspection or cleanup results are recorded. When user idle activity is detected again, the interrupted inspection or cleanup work is resumed first. If the cleanup space of the micro-application still exceeds the limit threshold after cleanup, an alarm will be triggered and the user will be prompted to confirm whether to clean up the commonly used parts of the application package and the persistent data that cannot be cleaned up. After the user confirms, the corresponding cleanup operation will be performed.

2. The method for limiting the storage space of mobile micro-applications according to claim 1, characterized in that, In step (3), during the process of checking the actual storage space occupancy of the mobile micro-application, the process is performed according to a preset cycle, and priority is given to checking micro-applications that have not been checked within the cycle. For data that has undergone data storage operations since the last inspection, conduct an actual inspection; for data that has not undergone data storage operations, retain the results of the last inspection.

3. The method for limiting the storage space of mobile micro-applications according to claim 1, characterized in that, In step (4), the infrequently used parts of the dynamically loaded application package are determined by the number of times the user accesses the micro-application recorded in step (2). The dynamically loaded application package parts with fewer accesses than a preset threshold are considered infrequently used parts.

4. The method for limiting the storage space of mobile micro-applications according to claim 1, characterized in that, In step (4), when the micro-application storage space is reduced to within the limit threshold, a target cleanup ratio is preset. When the micro-application storage space reaches the target cleanup ratio, the cleanup of cleanable data is stopped.

5. The method for limiting the storage space of mobile micro-applications according to claim 1, characterized in that, In step (3), when micro-applications that exceed the limit threshold are selected, the total storage space occupied by the micro-applications is calculated. The total storage space occupied is the sum of the data size of the actual inspection part and the data size of the part that uses the previous inspection result. The total storage space occupied is then compared with the preset limit threshold to determine whether it exceeds the threshold.

6. The method for limiting the storage space of mobile micro-applications according to claim 1, characterized in that, In step (4), when cleaning up multiple micro-applications to be cleaned up, they are sorted according to the degree to which each micro-application exceeds the storage space limit threshold, and the micro-applications that exceed the limit to the greater extent are cleaned up first.

7. The method for limiting the storage space of mobile micro-applications according to claim 1, characterized in that, In step (6), the alarm is triggered when the limit threshold is still exceeded after all the cleanable storage space has been cleaned. The cleanable storage space includes cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package.

8. A system for limiting the storage space of mobile micro-applications to implement the method of any one of claims 1-7, characterized in that, include: The mobile micro-application storage space scheduling module is used to set the storage space limit threshold for each mobile micro-application under the mobile portal, and to divide the storage space of each mobile micro-application into the application package dynamic loading part, cleanable persistent data, non-cleanable persistent data and cached data according to the data type. The behavior recording module is used to record the dynamic download and loading status of the mobile micro-application package, data storage operation behavior, user idle behavior, user idle phase end behavior, and user access to the mobile micro-application count behavior during the use of the mobile micro-application. The mobile micro-application storage space checking module is used to check the actual storage space usage of the mobile micro-application based on a preset limit threshold and recorded behavior data when user idle behavior is detected, filter out micro-applications that exceed the limit threshold, and form a list of micro-applications to be cleaned up. The mobile micro-application storage space cleanup module is used to clean up the storage space of micro-applications to be cleaned up during the user's idle time, in the order of cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded parts of the application package, until the storage space of the micro-application is reduced to within the limit threshold. The process interruption and recovery module is used to interrupt the current work and record the completed inspection or cleanup results if user operation behavior is detected during the inspection or cleanup process. When user idle behavior is detected again, the interrupted inspection or cleanup work will be resumed first. The storage space alarm module is used to trigger an alarm and prompt the user if the storage space that can be cleaned up by the micro-application still exceeds the limit threshold after cleaning. The user then confirms whether to clean up the commonly used parts of the application package and the persistent data that cannot be cleaned up. After the user confirms, the corresponding cleaning operation is performed.

9. The system for limiting the storage space of mobile micro-applications according to claim 8, characterized in that, In the mobile micro-application storage space checking module, the process of checking the actual storage space occupancy of the mobile micro-application is executed according to a preset cycle, and priority is given to checking micro-applications that have not completed the check within the cycle. For data that has been data storage operations since the last inspection, conduct an actual inspection; for data that has not been data storage operations, use the results of the last inspection. In the mobile micro-application storage space checking module, when micro-applications that exceed the limit threshold are selected, the total storage space occupied by the micro-application is calculated. The total storage space occupied is the sum of the data size of the actual checked part and the data size of the part that follows the previous check result. The total storage space occupied is then compared with the preset limit threshold to determine whether it exceeds the threshold.

10. The system for limiting the storage space of mobile micro-applications according to claim 8, characterized in that, In the mobile micro-application storage space cleanup module, the infrequently used parts of the dynamically loaded portion of the application package are determined by the user's access behavior to the micro-application recorded by the behavior recording module. The dynamically loaded portion of the application package with an access count lower than a preset threshold is considered an infrequently used part. In the mobile micro-application storage space cleanup module, when the micro-application storage space is cleaned down to within the limit threshold, a preset target cleanup ratio is set. When the micro-application storage space reaches the target cleanup ratio, the cleanup of cleanable data is stopped. In the mobile micro-application storage space cleanup module, when cleaning up multiple micro-applications to be cleaned, they are sorted according to the degree to which each micro-application exceeds the storage space limit threshold, and the micro-applications that exceed the limit to the greater extent are cleaned up first. The storage space alarm module triggers an alarm when the limit threshold is still exceeded after all cleanable storage space has been cleaned. Cleanable storage space includes cached data, cleanable persistent data, and infrequently used parts of the dynamically loaded application package.