Application Cache Scanning Priority and Termination
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for scanning cache sizes on mobile devices are inefficient, particularly when multiple applications are installed, as they require processing each application's cache size individually, leading to prolonged scanning times.
Innovation Solution
A method that prioritizes cache scanning based on historical scanning records, scanning applications with higher cache sizes or more frequent skips first, and those with lower cache sizes or fewer skips last, while terminating the scan when a preset duration or condition is met, to optimize scanning time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If the getPackageSizeInfo function is invoked for each application to obtain cache size, then the total cache size of all applications can be acquired, but the scanning time becomes extremely long when multiple applications are installed
Solution Approach 1:
The patent applies preliminary action by sorting applications in descending order of their cache sizes before scanning. This allows the system to prioritize scanning applications with larger cache sizes first, ensuring that the most significant contributors to total cache usage are measured first, thereby reducing the overall scanning time while maintaining measurement precision for the most important applications.
Solution Approach 2:
The patent implements partial action by allowing the user to set a maximum scanning time parameter. When this time limit is reached, the scanning process is automatically terminated, even if not all applications have been scanned. This approach provides a balance between measurement completeness and time efficiency, allowing users to choose between full accuracy and faster results based on their needs.
2Measurement precision
If all applications are scanned to ensure complete cache size data, then measurement accuracy is maintained, but scanning duration increases significantly
Solution Approach 1:
The patent applies preliminary action by pre-sorting applications based on their cache sizes in descending order before the scanning process begins. This ensures that applications with the largest cache sizes are scanned first, allowing the system to achieve the most accurate measurements for the most significant applications within a shorter time frame, thus balancing accuracy and duration.
Solution Approach 2:
The patent implements dynamics by making the scanning process adaptive through a configurable maximum time parameter. The scanning duration is not fixed but can be dynamically adjusted based on user preferences and system conditions, allowing the process to be terminated early if the time limit is reached, thus balancing complete measurement against acceptable scanning duration.
Data Source
AI summary
Disclosed are a method for scanning cache of an application, an electronic device and a computer-readable storage medium. The method may include: acquiring a list of applications to be scanned; querying a historical scanning record of each application in the list of applications to be scanned; determining a scanning priority of each application and whether the application needs to be scanned according to the historical scanning record of each application; scanning applications that need to be scanned in the list of applications to be scanned in a descending order of the scanning priorities, so as to acquire cache sizes of respective applications that need to be scanned; and scanning applications that need not to be scanned in the list of applications to be scanned in a descending order of the scanning priorities, so as to acquire cache sizes of respective applications that need not to be scanned.


