Memory management method and device, terminal equipment and storage medium
By managing the general file mapping in terminal device memory according to user usage habits, the problem of the memory occupancy of application files in the prior art is solved, and the loading time and memory optimization are achieved.
Patent Information
- Application Number
- CN202411957642.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-28
- Publication Date
- 2025-04-29
AI Technical Summary
In prior art In terminal devices, general files mapped to memory cannot reduce the loading time of the application and improve fluency if they are not files of the current user's commonly used applications, and the memory consumption leads to a reduction in available memory.
According to the commonly used applications used by users within the preset time, manage the mapping of common files of common applications in memory. By detecting the application usage data, identifying common applications, and mapping their corresponding general files into memory, while releasing memory that is not occupied by common files that are commonly used applications.
It reduces the loading time of commonly used applications, improves the available memory of terminal devices, and improves the smoothness of application usage.
Smart Images

Figure CN119902882A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal devices, and in particular to a memory management method, device, terminal device and storage medium. Background Art
[0002] In terminal devices, the system generally maps common files of commonly used applications into memory based on user experience values. When commonly used applications are used, the time for reading and loading common files into memory can be saved, thereby reducing the loading time of commonly used applications and improving the smoothness of using commonly used applications.
[0003] If the common files mapped to the memory are not common files of the current user's frequently used applications, it will not reduce the loading time of the application and will not improve the smoothness of the application. The mapped common files will always occupy the memory of the terminal device, thereby reducing the available memory of the terminal device. Summary of the invention
[0004] The embodiments of the present application provide a memory management method, apparatus, terminal device and storage medium, which are used to manage the mapping of common files of commonly used applications in memory according to commonly used applications used by users within a preset time period, thereby reducing the loading time of commonly used applications and increasing the available memory of the terminal device to a certain extent.
[0005] A first aspect of the present application provides a memory management method, which may include:
[0006] Detect usage data of each application on the terminal device within a preset time period;
[0007] Determining frequently used applications based on the usage data of each application;
[0008] Mapping a common file corresponding to a first target application into the memory, wherein the first target application is an application whose common file is not mapped into the memory;
[0009] and / or,
[0010] The general file corresponding to the second target application in the memory is released, and the second target application is an application in the memory that is not one of the common applications and is mapped to the general file.
[0011] A second aspect of the present application provides a memory management device, which may include:
[0012] A detection module, used to detect usage data of each application on the terminal device within a preset time period;
[0013] A processing module, used for determining frequently used applications according to the usage data of each application;
[0014] The processing module is further used to map the common file corresponding to the first target application to the memory, wherein the first target application is an application whose common file is not mapped to the memory;
[0015] and / or,
[0016] The processing module is further used to release the general file corresponding to the second target application in the memory, where the second target application is an application in the memory that is not one of the common applications and is mapped by the general file.
[0017] A third aspect of the present application provides a terminal device, which may include a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the terminal device executes the program, the method described in the first aspect of the present application is implemented.
[0018] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect of the present application.
[0019] Yet another aspect of an embodiment of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method described in the first aspect of the present application.
[0020] Another aspect of an embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the present application.
[0021] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0022] In an embodiment of the present application, the usage data of each application on the terminal device within a preset time period is detected; based on the usage data of each application, the commonly used application is determined; the common file corresponding to the first target application is mapped to the memory, and the first target application is an application whose common file is not mapped to the memory; and / or, the common file corresponding to the second target application in the memory is released, and the second target application is an application whose common file is mapped to the memory that does not belong to the commonly used application. According to the commonly used applications used by the user within the preset time period, the mapping of the common files of the commonly used applications in the memory is managed, and the common file corresponding to the first target application is mapped to the memory, and the first target application is an application whose common file is not mapped to the memory, thereby reducing the loading time of the commonly used applications and releasing the common file corresponding to the second target application in the memory, and the second target application is an application whose common file is mapped to the memory that does not belong to the commonly used application, so the available memory of the terminal device can be improved to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.
[0024] Figure 1 A schematic diagram of an embodiment of the memory management method in the embodiment of the present application;
[0025] Figure 2 This is another schematic diagram of an embodiment of the memory management method in the embodiment of the present application;
[0026] Figure 3 This is another schematic diagram of an embodiment of the memory management method in the embodiment of the present application;
[0027] Figure 4 This is another schematic diagram of an embodiment of the memory management method in the embodiment of the present application;
[0028] Figure 5 A schematic diagram of moving the identifier of a non-commonly used application to a target folder for management in an embodiment of the present application;
[0029] Figure 6 This is a schematic diagram of an embodiment of a memory management device in an embodiment of the present application;
[0030] Figure 7 This is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application;
[0031] Figure 8 This is another schematic diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The embodiments of the present application provide a memory management method, apparatus, terminal device and storage medium, which are used to manage the mapping of common files of commonly used applications in memory according to commonly used applications used by users within a preset time period, thereby reducing the loading time of commonly used applications and increasing the available memory of the terminal device to a certain extent.
[0033] In order to make the technical personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, they should all fall within the scope of protection of the present application.
[0034] The following is a brief description of some terms involved in this application, as follows:
[0035] 1. General files
[0036] Exemplarily, common files of an application may include jar packages and so library files.
[0037] In Android development, commonly used jar packages and so library files are mainly used to introduce Java class libraries and native libraries (dynamic link libraries compiled from C / C++ code) to implement specific functions. The following is some information about commonly used jar packages and so library files:
[0038] (1) Commonly used jar packages:
[0039] Android Support Libraries: android-support-v4, android-support-v7-appcompat, etc., provide backward compatibility, allowing developers to use new Application Programming Interfaces (APIs) without worrying about device compatibility issues.
[0040] Image loading library: used to load and cache images.
[0041] Database operation library: Such as Room, which is part of Android Jetpack and provides an abstraction layer to simplify SQLite database operations.
[0042] (2) Commonly used so library files:
[0043] Native Development Kit (NDK) library: C / C++ libraries developed using NDK are usually compiled into so files and used to perform performance-sensitive tasks or call local system services.
[0044] Encryption and security libraries: For example, using the so file of the OpenSSL library to provide encryption and security functions.
[0045] Graphics and image processing libraries: such as libjpeg.so, libpng.so, etc., used for image decoding and encoding.
[0046] Audio and video processing libraries: for example, libmp3lame.so for audio encoding and libffmpeg.so for video encoding and decoding.
[0047] Machine learning libraries: such as TensorFlowLite's so file, which is used to run machine learning models on mobile devices.
[0048] 2. Memory
[0049] Memory refers to the hardware used to temporarily store data and programs in embedded devices or terminal devices such as smartphones, tablets, smart watches, etc. The following are some key features and related information of terminal device memory.
[0050] Memory types can include random access memory and read-only memory, as shown below:
[0051] Random Access Memory (RAM): used to store the operating system, currently running applications, and temporary data. Common types of RAM include Low Power Double Data Rate SDRAM (LPDDR).
[0052] Read-Only Memory (ROM): Used to store firmware and system software, which is usually unchangeable or can only be changed through specific programs.
[0053] Storage medium: Memory can be based on volatile media (such as dynamic random access memory (DRAM)) or non-volatile media (such as NAND flash).
[0054] 3. Memory Mapping
[0055] Memory Mapping: Memory mapping is a technique that maps file contents directly into the process address space. This means that when an application needs to access file data, it can access it directly in memory without having to read the data from disk into memory. Since the file data is already in memory, the application can access the data quickly, reducing the time to read data from disk. It can also reduce the need for disk input / output (I / O), which can improve application performance, especially in I / O-intensive applications.
[0056] General files: Usually, only files that are large, frequently accessed, and infrequently changed are suitable for memory mapping, such as resource files and database files of some large games.
[0057] Dynamic mapping and unmapping: In some cases, an application may need to dynamically map a file into memory and unmap it when it is no longer needed to free up memory resources.
[0058] Usage scenarios: For applications that are time-sensitive to startup, such as games or large applications, memory mapping can significantly reduce startup time. For applications that need to quickly access large amounts of data, memory mapping can increase data access speed.
[0059] Implementation method: In the Android system, the memory mapping of files can be implemented through the bitmap method of the File Channel class.
[0060] Monitoring and management: Memory usage needs to be monitored to ensure that memory-mapped files do not occupy too much memory and affect system stability.
[0061] In summary, memory mapping is an effective performance optimization technology, but it is necessary to decide whether to use it and how to use it according to the specific needs and usage scenarios of the application. The correct memory mapping strategy can significantly improve the performance of the application.
[0062] In some implementations, the terminal device will map the common files of the user's frequently used applications to the memory based on the big data experience value, so that the commonly used applications can save the time of reading and loading the above common files into the memory when in use, thereby reducing the loading time of the application and improving the fluency of the application. However, the commonly used applications here are not necessarily universal for every user, that is, the commonly used applications cannot be flexibly updated according to the user's usage habits. If the common files mapped by the commonly used applications are not the common files of the user's frequently used applications, it is impossible to reduce the loading time of the application and improve the fluency of the application. The mapped common files will always occupy the memory of the terminal device, thereby reducing the available memory of the terminal device.
[0063] In an embodiment of the present application, based on commonly used applications used by users within a preset time period, the mapping of common files of commonly used applications in the memory is managed, and the common files corresponding to the first target application are mapped to the memory. The first target application is an application whose common files are not mapped to the memory. This can reduce the loading time of commonly used applications and release the common files corresponding to the second target application in the memory. The second target application is an application whose common files are mapped to the memory and does not belong to the commonly used applications. Therefore, the available memory of the terminal device can be improved to a certain extent.
[0064] In the embodiment of the present application, the terminal device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self driving, a wireless terminal device in remote medical, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.
[0065] As an example but not limitation, in the embodiments of the present application, the terminal device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0066] The following is a further description of the embodiments of the present application by way of example. Figure 1 As shown, it is a schematic diagram of an embodiment of the memory management method in the embodiment of the present application, which may include:
[0067] 101. Detect usage data of each application on the terminal device within a preset time period.
[0068] The terminal device detects usage data of each application on the terminal device within a preset time period. For example, the preset time period can be: one week, half a month, one month, three months, half a year, one year, or two years.
[0069] The usage data may include at least one of the number of times the device is used and the duration of use. The usage data may be at least one of the total number of times the device is used and the total duration of use within a preset duration, or may be at least one of the number of times the device is used and the duration of use per day within a preset duration, which is not limited in the specific embodiments of the present application.
[0070] 102. Determine frequently used applications based on the usage data of each application.
[0071] 1. When the usage data includes at least one of the total number of uses and the total duration of use within a preset duration, the preset number of uses can be understood as the preset total number of uses, and the preset duration of use can be understood as the preset total duration of use.
[0072] Optionally, in some possible implementations, the usage data includes at least one of the number of times the application is used and the duration of use; and determining the frequently used application according to the usage data of each application may include:
[0073] When the first usage count of the first application is greater than the preset usage count, determining that the first application is a frequently used application; or,
[0074] When a first usage duration of a first application is greater than a preset usage duration, determining that the first application is a frequently used application; or,
[0075] When a first usage count of a first application is greater than a preset usage count, and a first usage duration of the first application is greater than a preset usage duration, the first application is determined to be a frequently used application.
[0076] Exemplarily, assuming that the preset duration is 1 month, if the number of times application (Application, APP) 1 is used is 22, and the preset number of times is 10, then 22 is greater than 10, and application 1 is determined to be a frequently used application.
[0077] Assuming that the preset duration is 1 month, if the usage duration of application (Application, APP) 1 is 600 minutes and the preset usage duration is 300 minutes, then 600 minutes is greater than 300 minutes, and application 1 is determined to be a frequently used application.
[0078] Assuming that the preset duration is 1 month, if the number of times application (Application, APP) 1 is used is 22 and the preset number of times is 10, then 22 is greater than 10; and if the usage duration of application (Application, APP) 1 is 600 minutes and the preset usage duration is 300 minutes, then 600 minutes is greater than 300 minutes, and application 1 is determined to be a frequently used application.
[0079] Assuming that the preset duration is 1 month, if the number of times application (Application, APP) 2 is used is 100 and the preset number of times is 10, then 100 is greater than 10, and application 2 is determined to be a frequently used application.
[0080] Assuming that the preset duration is 1 month, if the usage duration of application (Application, APP) 2 is 3600 minutes and the preset usage duration is 300 minutes, then 3600 minutes is greater than 300 minutes, and application 2 is determined to be a frequently used application.
[0081] Assuming that the preset duration is 1 month, if the number of times Application (Application, APP) 2 is used is 100 and the preset number of times is 10, then 100 is greater than 10, and if the usage duration of Application (Application, APP) 2 is 3600min and the preset usage duration is 300min, then 3600min is greater than 300min, and Application 2 is determined to be a frequently used application.
[0082] 2. When the usage data is at least one of the number of uses per day and the daily usage duration within the preset duration, the preset number of uses can be understood as the preset total number of uses, or as the preset number of uses corresponding to each day; the preset usage duration can be understood as the preset total usage duration, or as the preset usage duration corresponding to each day.
[0083] 1) When the usage data is at least one of the number of uses per day and the duration of use per day within a preset duration, the preset number of uses may be understood as the preset total number of uses, and the preset duration of use may be understood as the preset total duration of use.
[0084] (1) If the preset number of times of use is understood as the preset total number of times of use, it is necessary to sum up the number of times of use per day within the preset time period and then compare it with the preset total number of times of use to determine the frequently used applications; or,
[0085] (2) If the preset usage duration is understood as the preset total usage duration, it is necessary to sum up the daily usage duration within the preset duration and then compare it with the preset total usage duration to determine the frequently used applications; or,
[0086] (3) When the preset number of times of use is understood as the preset total number of times of use, it is necessary to sum up the number of times of use for each day within the preset duration and then compare it with the preset total number of times of use; and when the preset usage duration is understood as the preset total usage duration, it is necessary to sum up the usage duration for each day within the preset duration and then compare it with the preset total usage duration to determine the frequently used applications.
[0087] 2) When the usage data includes at least one of the number of uses per day and the usage duration per day within the preset duration, the preset number of uses is understood to be the preset number of uses corresponding to each day; the preset usage duration is understood to be the preset usage duration corresponding to each day.
[0088] (1) Determining frequently used applications based on usage data of each application may include: when a preset number of usages is a preset number of usages corresponding to each day, comparing the number of usages per day within a preset time period with the preset number of usages to determine frequently used applications for each day; then calculating a first proportion of each application determined as a frequently used application within the preset time period, and when a first proportion of a third application determined as a frequently used application within the preset time period among each application is greater than a first proportion threshold, determining that the third application is a frequently used application.
[0089] Exemplarily, assuming that the preset duration is one month, the usage data of each application includes the number of times it is used each day. The preset number of times is 1. If the number of times an application is used on a certain day is greater than the preset number of times, then the application is determined to be a frequently used application on that day. Then, the first ratio of the number of times the application is determined to be a frequently used application in this month to the number of days in this month is calculated. For example, if the first ratio is 40% and the first ratio threshold is 30%, then the first ratio of 40% is greater than the first ratio threshold of 30%, and the application is determined to be a frequently used application. Or,
[0090] (2) Determining frequently used applications based on usage data of each application may include: when a preset usage time is a preset usage time corresponding to each day, comparing the usage time of each day within the preset time with the preset usage time to determine frequently used applications for each day; then calculating a second proportion of each application determined as a frequently used application within the preset time, and when a second proportion of a third application determined as a frequently used application within the preset time among each application is greater than a second proportion threshold, determining the third application as a frequently used application.
[0091] For example, assuming that the preset duration is one month, the usage data of each application includes the daily usage duration. The preset usage duration is 5 minutes. If the usage duration of an application on a certain day is greater than the preset usage duration, then the application is determined to be a frequently used application on that day. Then, the second ratio of the number of times the application is determined to be a frequently used application in this month is calculated to account for the number of days in this month. For example, if the second ratio is 50% and the second ratio threshold is 40%, then the second ratio of 50% is greater than the second ratio threshold of 40%, and the application is determined to be a frequently used application. Or,
[0092] (3) Determining frequently used applications based on usage data of each application may include: when a preset number of usages is a preset number of usages corresponding to each day, comparing the number of usages per day within a preset time period with the preset number of usages to determine frequently used applications per day, and then calculating a first proportion of each application determined as a frequently used application within the preset time period; when a preset usage time period is a preset usage time period corresponding to each day, comparing the usage time per day within the preset time period with the preset usage time to determine frequently used applications per day, and then calculating a second proportion of each application determined as a frequently used application within the preset time period; when a first proportion of a third application determined as a frequently used application within the preset time period among each application is greater than a first proportion threshold, and a second proportion of a third application determined as a frequently used application within the preset time period among each application is greater than a second proportion threshold, determining that the third application is a frequently used application.
[0093] Exemplarily, assuming that the preset duration is one month, the usage data of each application includes the number of times the third application is used and the usage duration per day. The preset number of times is 1, if the number of times the third application is used on a certain day is greater than the preset number of times, then the third application is determined to be a frequently used application on that day, and then the first proportion of the number of times the third application is determined to be a frequently used application in this month to the number of days in this month is calculated, for example, the first proportion is 40%, the first proportion threshold is 30%, then the first proportion of 40% is greater than the first proportion threshold of 30%; and the preset usage duration is 5 minutes, if the usage duration of the third application on a certain day is greater than the preset usage duration, then the third application is determined to be a frequently used application on that day, and then the second proportion of the number of times the third application is determined to be a frequently used application in this month to the number of days in this month is calculated, for example, the second proportion is 50%, the second proportion threshold is 40%, then the second proportion of 50% is greater than the second proportion threshold of 40%, and the third application is determined to be a frequently used application.
[0094] It should be noted that different preset durations correspond to different preset usage times and preset usage durations.
[0095] In the technical solution of the present application, the usage data of the application includes at least one of the number of uses and the usage duration, and how to determine whether the application is a frequently used application based on the number of uses and at least one of the usage duration is specifically explained, thereby improving the feasibility of the solution.
[0096] Optionally, in some possible implementations, determining the frequently used applications according to the usage data of the respective applications may include: determining frequently used applications of at least two priorities according to the usage data of the respective applications.
[0097] In this technical solution, at least two priority frequently used applications can be determined based on the usage data of each application, so that when memory is limited, the common files of higher priority applications can be mapped in the memory. The application can quickly access this data, reducing the time to read data from the disk.
[0098] According to the usage data of each application, at least two frequently used applications of priority are determined, and the following is explained in detail as follows:
[0099] 1. When the usage data is at least one of the total number of uses and the total usage duration within a preset duration, the preset number of uses can be understood as the preset total number of uses, and the preset usage duration can be understood as the preset total usage duration.
[0100] Optionally, in some possible implementations, determining at least two priority levels of frequently used applications based on the usage data of the respective applications may include: determining the first application as a first-level frequently used application when a first usage count of the first application is greater than a first preset usage count; determining the second application as a second-level frequently used application when a second usage count of the second application is greater than a second preset usage count, the second preset usage count being greater than the first preset usage count, and the priority of the second-level frequently used application being higher than the priority of the first-level frequently used application.
[0101] Exemplarily, assuming that the preset duration is 1 month, if the number of times application (Application, APP) 1 is used is 22, and the first preset number of times of use is 10, then 22 is greater than 10, and application 1 is determined to be a first-level frequently used application.
[0102] If the usage count of application (Application, APP) 2 is 100 and the second preset usage count is 50, then 100 is greater than 50, and it is determined that application 2 is a second-level frequently used application.
[0103] Optionally, in some possible implementations, determining at least two priorities of frequently used applications based on the usage data of the respective applications may include: determining the first application as a first-level frequently used application when a first usage time of the first application is greater than a first preset usage time; determining the second application as a second-level frequently used application when a second usage time of the second application is greater than a second preset usage time, the second preset usage time being greater than the first preset usage time, and the priority of the second-level frequently used application being higher than the priority of the first-level frequently used application.
[0104] Assuming that the preset duration is 1 month, if the usage duration of application (Application, APP) 1 is 600 minutes, and the first preset usage duration is 300 minutes, then 600 minutes is greater than 300 minutes, and application 1 is determined to be a first-level frequently used application.
[0105] If the usage time of application (Application, APP) 2 is 3600 minutes and the second preset usage time is 900 minutes, then 3600 minutes is greater than 900 minutes, and application 2 is determined to be a second-level frequently used application.
[0106] Optionally, in some possible implementations, determining at least two priorities of frequently used applications based on the usage data of the respective applications may include: determining the first application as a first-level frequently used application when a first usage count of the first application is greater than a first preset usage count and a first usage duration of the first application is greater than the first preset usage duration; and determining the second application as a second-level frequently used application when a second usage count of the second application is greater than a second preset usage count and a second usage duration of the second application is greater than the second preset usage duration.
[0107] Assuming that the preset duration is 1 month, if the number of times application (Application, APP) 1 is used is 22, and the first preset number of times is 10, then 22 is greater than 10; and if the usage duration of application (Application, APP) 1 is 600 minutes, and the first preset usage duration is 300 minutes, then 600 minutes is greater than 300 minutes, and application 1 is determined to be a first-level frequently used application.
[0108] If the number of times application (Application, APP) 2 is used is 100 and the second preset number of times is 50, then 100 is greater than 50, and if the usage time of application (Application, APP) 2 is 3600 minutes and the second preset usage time is 900 minutes, then 3600 minutes is greater than 900 minutes, and application 2 is determined to be a second-level frequently used application.
[0109] 2. When the usage data is at least one of the number of uses per day and the daily usage duration within the preset duration, the preset number of uses can be understood as the preset total number of uses, or as the preset number of uses corresponding to each day; the preset usage duration can be understood as the preset total usage duration, or as the preset usage duration corresponding to each day.
[0110] 1) When the usage data is at least one of the number of uses per day and the duration of use per day within a preset duration, the preset number of uses may be understood as the preset total number of uses, and the preset duration of use may be understood as the preset total duration of use.
[0111] In this implementation, for determining at least two priority levels of commonly used applications, reference can be made to the description above, where the usage data is at least one of the total number of uses and the total usage duration within a preset duration, the preset number of uses can be understood as the preset total number of uses, and the preset usage duration can be understood as the preset total usage duration, and no further details will be given herein.
[0112] 2) When the usage data is at least one of the number of uses per day and the usage duration per day within a preset duration, the preset number of uses is understood to be the preset number of uses corresponding to each day; the preset usage duration is understood to be the preset usage duration corresponding to each day.
[0113] (1) Determining at least two priorities of frequently used applications based on the usage data of each application may include: when a preset number of usages is a preset number of usages corresponding to each day, comparing the number of usages per day within a preset time period with the preset number of usages to determine the frequently used applications for each day; then calculating a first proportion of each application determined as a frequently used application within the preset time period, and when a first proportion of a third application determined as a frequently used application within the preset time period among each application is greater than a first proportion threshold and less than or equal to a third proportion threshold, determining the third application as a first-level frequently used application; and when the first proportion is greater than the third proportion threshold, determining the third application as a second-level frequently used application, the third proportion threshold is greater than the first proportion threshold, and the priority of the second-level frequently used application is greater than the priority of the first-level frequently used application.
[0114] (2) Determining at least two priorities of frequently used applications based on the usage data of each application may include: when the preset usage time is the preset usage time corresponding to each day, comparing the usage time of each day within the preset time with the preset usage time to determine the frequently used applications for each day; then calculating a second proportion of each application determined as a frequently used application within the preset time, and when the second proportion of a third application determined as a frequently used application within the preset time among each application is greater than a second proportion threshold and less than or equal to a fourth proportion threshold, determining the third application as a frequently used application; and when the second proportion is greater than a fourth proportion threshold, determining the third application as a second-level frequently used application, the fourth proportion threshold is greater than the second proportion threshold, and the priority of the second-level frequently used application is greater than the priority of the first-level frequently used application.
[0115] (3) Determining at least two priority levels of frequently used applications based on the usage data of each application may include:
[0116] Implementation 1:
[0117] In the case where the preset number of times of use is the preset number of times of use corresponding to each day, the number of times of use per day within the preset duration is compared with the preset number of times of use to determine the commonly used applications per day; then a first proportion of each application determined as a commonly used application within the preset duration is calculated; in the case where the preset usage duration is the preset usage duration corresponding to each day, the usage duration per day within the preset duration is compared with the preset usage duration to determine the commonly used applications per day; then a second proportion of each application determined as a commonly used application within the preset duration is calculated;
[0118] When a first ratio of the third application determined as a frequently used application within a preset time period among the various applications is greater than a first ratio threshold, and a second ratio of the third application determined as a frequently used application within a preset time period among the various applications is greater than a second ratio threshold, determining the third application as a second-level frequently used application;
[0119] Otherwise, when the first proportion of the third application among various applications determined as frequently used applications within a preset time period is greater than the first proportion threshold, or when the second proportion of the third application among various applications determined as frequently used applications within a preset time period is greater than the second proportion threshold, the third application is determined as a first-level frequently used application.
[0120] Implementation 2:
[0121] In the case where the preset number of times of use is the preset number of times of use corresponding to each day, the number of times of use per day within the preset duration is compared with the preset number of times of use to determine the frequently used applications per day, and then a first proportion of each application determined as a frequently used application within the preset duration is calculated; in the case where the preset usage duration is the preset usage duration corresponding to each day, the usage duration per day within the preset duration is compared with the preset usage duration to determine the frequently used applications per day, and then a second proportion of each application determined as a frequently used application within the preset duration is calculated;
[0122] When a first ratio of the third application determined as a frequently used application within a preset time period among the various applications is greater than a first ratio threshold and is less than or equal to a third ratio threshold, and a second ratio of the third application determined as a frequently used application within a preset time period among the various applications is greater than a second ratio threshold and is less than or equal to a fourth ratio threshold, the third application is determined as a first-level frequently used application;
[0123] When a first proportion of third applications among various applications determined as frequently used applications within a preset time period is greater than a third proportion threshold, and a second proportion of third applications among various applications determined as frequently used applications within a preset time period is greater than a fourth proportion threshold, the third application is determined as a second-level frequently used application.
[0124] In this technical solution, specific instructions are given on how to determine at least two priority commonly used applications based on the usage data of each application, so that when memory is limited, the common files of higher priority applications can be mapped in the memory. The application can quickly access this data, reducing the time to read data from the disk.
[0125] 103. Map a common file corresponding to a first target application into a memory, where the first target application is an application whose common file is not mapped into the memory.
[0126] For example, suppose the commonly used applications determined last time include APP1, APP4, and APP5, and the common files corresponding to APP1, APP4, and APP5 have been mapped to the memory last time. The commonly used applications determined this time include APP1 and APP2, and APP2 belongs to the commonly used applications of this time whose common files are not mapped to the memory; therefore, APP2 is mapped to the memory as the common file corresponding to the first target application.
[0127] In the present technical solution, after determining the commonly used applications based on the usage data of each application, the applications among the commonly used applications that are not mapped to the memory, that is, the general files corresponding to the first target application, can be mapped to the memory so that the application can quickly access these data, reducing the time to read data from the disk.
[0128] In some possible implementations, mapping the common files corresponding to the first target application into the memory may include: detecting the remaining storage space of the memory; and when the remaining storage space is less than or equal to a storage space threshold, mapping the common files corresponding to commonly used applications with higher priority into the memory.
[0129] In this technical solution, the remaining storage space of the memory is detected; when the remaining space of the terminal device memory is less than or equal to the storage space threshold, that is, the remaining storage space of the memory is limited, the general files corresponding to the commonly used applications with higher priority are mapped to the memory.
[0130] In an embodiment of the present application, the usage data of each application on the terminal device within a preset time period is detected; based on the usage data of each application, the commonly used application is determined; the common file corresponding to the first target application is mapped to the memory, and the first target application is an application whose common file is not mapped to the memory. Based on the commonly used applications used by the user within the preset time period, the mapping of the common files of the commonly used applications in the memory is managed, and the common file corresponding to the first target application is mapped to the memory, and the first target application is an application whose common file is not mapped to the memory, thereby reducing the loading time of the commonly used applications.
[0131] like Figure 2 As shown, it is a schematic diagram of another embodiment of the memory management method in the embodiment of the present application, which may include:
[0132] 201. Detect usage data of each application on the terminal device within a preset time period.
[0133] 202. Determine frequently used applications according to the usage data of each application.
[0134] 203. Release the general file corresponding to the second target application in the memory, where the second target application is an application in the memory that is not one of the common applications and is mapped by the general file.
[0135] For example, suppose the commonly used applications determined last time include APP1, APP4 and APP5, and the common files corresponding to APP1, APP4 and APP5 have been mapped to the memory last time. The commonly used applications determined this time include APP1 and APP2, and APP4 and APP5 do not belong to the commonly used applications determined this time, so the common files corresponding to APP4 and APP5 need to be released.
[0136] In this technical solution, after determining the commonly used applications based on the usage data of the various applications, the general files corresponding to the applications in the memory that do not belong to the commonly used applications are released, thereby increasing the available memory of the terminal device and reducing the impact on the operation of other applications.
[0137] Optionally, in some possible implementations, releasing the general file corresponding to the second target application in the memory may include: detecting the remaining storage space of the memory; and releasing the general file corresponding to the second target application in the memory when the remaining storage space is less than or equal to a storage space threshold.
[0138] For example, assuming that the commonly used applications determined last time include APP1, APP4, and APP5, and the common files corresponding to APP1, APP4, and APP5 have been mapped to the memory last time. The commonly used applications determined this time include APP1 and APP2, and APP4 and APP5 do not belong to the commonly used applications determined this time. The remaining storage space of the memory is detected. If the remaining storage space is less than or equal to the storage space threshold, the common files corresponding to APP4 and APP5 need to be released.
[0139] Optionally, when the remaining storage space is greater than the storage space threshold, the common files corresponding to APP4 and APP5 may be released, or the common files corresponding to APP4 and APP5 may not be released.
[0140] In the present technical solution, the remaining storage space of the memory is detected; when the remaining space of the terminal device memory is less than or equal to the storage space threshold, that is, when the remaining storage space of the memory is limited, the general files corresponding to the applications in the memory that do not belong to the commonly used applications are released, thereby increasing the available memory of the terminal device and reducing the impact on the operation of other applications.
[0141] Optionally, in some possible implementations, the method may further include: detecting the remaining storage space of the memory, and when the remaining storage space is less than or equal to a storage space threshold, if the applications corresponding to the general files mapped in the memory are all commonly used applications, then releasing the general files corresponding to the commonly used applications with lower priority.
[0142] For example, if the commonly used applications determined this time are APP1, APP2, APP3, APP4 and APP5, the common files corresponding to APP1, APP2, APP3, APP4 and APP5 are all mapped in the memory. At this time, it is detected that the remaining storage space in the memory is less than or equal to the storage space threshold, that is, the remaining space in the memory is insufficient. In this case, the common files corresponding to the applications with lower priority among APP1, APP2, APP3, APP4 and APP5 can be released. For example: APP1 belongs to the first-level application, APP2, APP3, APP4 and APP5 belong to the second-level application, and the priority of the second-level application is higher than that of the first-level application. In this case, the common files corresponding to APP1 can be released from the memory. For how to determine the priority of commonly used applications, please refer to the above. Figure 1 The relevant descriptions in the illustrated embodiment will not be repeated here.
[0143] In the present technical solution, the remaining storage space of the memory is detected; when the remaining space of the terminal device memory is less than or equal to the storage space threshold, that is, when the remaining storage space of the memory is limited, the general files corresponding to the low-priority applications among the commonly used applications in the memory are released, thereby increasing the available memory of the terminal device and reducing the impact on the operation of other applications.
[0144] In the embodiment of the present application, the usage data of each application on the terminal device within a preset time period is detected; the commonly used application is determined based on the usage data of each application; the universal file corresponding to the second target application in the memory is released, and the second target application is a universal file mapped to an application in the memory that does not belong to the commonly used application. The universal file corresponding to the second target application in the memory is released, and the second target application is a universal file mapped to an application in the memory that does not belong to the commonly used application, so the available memory of the terminal device can also be improved to a certain extent.
[0145] It should be noted that Figure 1 The embodiments shown and Figure 2 The embodiments combined with the illustrated embodiments are also within the protection scope of the present application and will not be described in detail here.
[0146] like Figure 3 As shown, it is a schematic diagram of another embodiment of the memory management method in the embodiment of the present application, which may include:
[0147] 301. Detect usage data of each application on the terminal device within a preset time period.
[0148] 302. Determine frequently used applications according to the usage data of each application.
[0149] 303. Map the general file corresponding to the first target application to the memory, where the first target application is an application whose general file is not mapped to the memory; and / or release the general file corresponding to the second target application in the memory, where the second target application is an application whose general file is mapped to the memory and does not belong to the common application.
[0150] It should be noted that steps 301-302 in the embodiment of the present application are similar to Figure 1 Steps 101-102 in the embodiment shown are similar, and step 303 in the embodiment of the present application is similar to Figure 1 In the illustrated embodiment, steps 103 and Figure 2 Step 203 in the illustrated embodiment is similar and will not be described in detail here.
[0151] 304. Update a list of commonly used applications according to the commonly used applications, wherein common files of applications in the list of commonly used applications are mapped in the memory.
[0152] Optionally, in some possible implementations, updating the list of commonly used applications based on the commonly used applications may include: adding the first target application to the list of commonly used applications.
[0153] Optionally, in some possible implementations, updating the list of commonly used applications based on the commonly used applications may include: removing the second target application from the list of commonly used applications.
[0154] Exemplarily, the list of commonly used applications can be updated based on the commonly used applications determined this time, and the common files of the applications in the list of commonly used applications are mapped in the memory. If the first target application is an application whose common file is not mapped to the memory, the first target application needs to be added to the list of commonly used applications. If the second target application is an application whose common file is mapped to the memory and does not belong to the commonly used application, the second target application needs to be removed from the list of commonly used applications.
[0155] Assume that the frequently used applications determined last time include APP1, APP4 and APP5, and the frequently used application list obtained last time includes APP1, APP4 and APP5. The frequently used applications determined this time include APP1 and APP2, so the frequently used application list obtained this time includes APP1 and APP2; it is necessary to update the frequently used application list obtained last time to the frequently used application list obtained this time, that is, to add APP2 to the frequently used application list, and delete APP4 and APP5 from the frequently used application list.
[0156] In this technical solution, the frequently used application list can be updated in real time according to the frequently used applications obtained each time, so as to timely know which applications are frequently used applications according to the frequently used application list, and the corresponding general files are mapped in the memory, thereby improving the management efficiency of the frequently used application list.
[0157] It should be noted that, when the remaining space stored in the terminal device memory is less than or equal to the storage space threshold, the common files of the low-priority applications in the list of commonly used applications are released from the memory.
[0158] In an embodiment of the present application, according to the commonly used applications used by the user within a preset time, the mapping of the common files of the commonly used applications in the memory is managed, and the common files corresponding to the first target application are mapped to the memory. The first target application is an application whose common files of the commonly used application are not mapped to the memory, so that the loading time of the commonly used application can be reduced, and the common files corresponding to the second target application in the memory are released. The second target application is an application that does not belong to the commonly used application and maps the common files to the memory. Therefore, the available memory of the terminal device can be improved to a certain extent. The embodiment of the present application can select the commonly used applications of the user according to at least one of the use time and the number of times of the application by the specific user, for example, the jar package and so library files used by the commonly used application are mapped to the memory. When the application usage is lower than a certain threshold, the application is removed from the list of commonly used applications, the common files mapped to the memory are released, and the common files of the new commonly used application are mapped to the memory. Adapt to the user's usage habits, accurately map the required common files to the memory, improve the efficiency of memory use, and improve the fluency of application use. Flexible mapping and demapping files for different users effectively improve the efficiency of memory use.
[0159] like Figure 4 As shown, it is a schematic diagram of another embodiment of the memory management method in the embodiment of the present application, which may include:
[0160] 401. Detect usage data of each application on the terminal device within a preset time period.
[0161] 402. Determine frequently used applications according to the usage data of each application.
[0162] 403. Map the general file corresponding to the first target application to the memory, where the first target application is an application whose general file is not mapped to the memory; and / or release the general file corresponding to the second target application in the memory, where the second target application is an application whose general file is mapped to the memory and does not belong to the common application.
[0163] It should be noted that steps 401-402 in the embodiment of the present application are similar to Figure 1 Steps 101-102 in the embodiment shown are similar, and step 403 in the embodiment of the present application is similar to Figure 1 In the illustrated embodiment, steps 103 and Figure 2 Step 203 in the illustrated embodiment is similar and will not be described in detail here.
[0164] 404. Determine infrequently used applications based on the usage data of each application.
[0165] 1. When the usage data is at least one of the total number of uses and the total usage duration within a preset duration, the preset number of uses can be understood as the preset total number of uses, and the preset usage duration can be understood as the preset total usage duration.
[0166] Optionally, determining the uncommonly used applications according to the usage data of each application may include:
[0167] When the first usage count of the first application is less than or equal to the preset usage count, determining that the first application is a non-commonly used application; or,
[0168] When the first usage duration of the first application is less than or equal to the preset usage duration, determining that the first application is a non-commonly used application; or,
[0169] When a first usage count of a first application is less than or equal to a preset usage count and a first usage duration of the first application is less than or equal to a preset usage duration, the first application is determined to be a less frequently used application.
[0170] 2. When the usage data is at least one of the number of uses per day and the daily usage duration within the preset duration, the preset number of uses is understood to be the preset number of uses corresponding to each day; the preset usage duration is understood to be the preset usage duration corresponding to each day.
[0171] (1) Determining infrequently used applications based on usage data of each application may include: when a preset number of usages is a preset number of usages corresponding to each day, comparing the number of usages per day within a preset time period with the preset number of usages to determine infrequently used applications per day; then calculating a third proportion of each application determined as an infrequently used application within the preset time period, and when the third proportion of a fourth application among each application determined as an infrequently used application within the preset time period is greater than a fifth proportion threshold, determining that the fourth application is an infrequently used application.
[0172] or,
[0173] (2) Determining infrequently used applications based on usage data of each application may include: when a preset usage time is a preset usage time corresponding to each day, comparing the usage time of each day within the preset time with the preset usage time to determine infrequently used applications for each day; then calculating a fourth proportion of each application determined as an infrequently used application within the preset time, and when the fourth proportion of a fourth application among each application determined as an infrequently used application within the preset time is greater than a sixth proportion threshold, determining that the fourth application is an infrequently used application.
[0174] or,
[0175] (3) Determining infrequently used applications based on usage data of each application may include: when a preset number of usages is a preset number of usages corresponding to each day, comparing the number of usages per day within a preset duration with the preset number of usages to determine infrequently used applications per day, and then calculating a third ratio of each application determined as an infrequently used application within the preset duration; when a preset usage duration is a preset usage duration corresponding to each day, comparing the usage duration per day within the preset duration with the preset usage duration to determine infrequently used applications per day, and then calculating a fourth ratio of each application determined as an infrequently used application within the preset duration; when the third ratio of the fourth application among each application determined as an infrequently used application within the preset duration is greater than a fifth ratio threshold, and when the fourth ratio of the fourth application among each application determined as an infrequently used application within the preset duration is greater than a sixth ratio threshold, determining the fourth application as an infrequently used application.
[0176] In the technical solution of the present application, the usage data of the application includes at least one of the number of uses and the usage duration, and how to determine whether the application is an infrequently used application based on the number of uses and at least one of the usage duration is specifically explained, thereby improving the feasibility of the solution.
[0177] 405. Move the identifier of the infrequently used application to a target folder for management.
[0178] For example, assuming that the infrequently used applications determined this time include APP6, APP7, and APP8, the identifiers of the infrequently used applications obtained this time can be moved to a target folder (eg, an infrequently used application folder) for management. Figure 5 As shown, it is a schematic diagram of moving the identifier of an infrequently used application to a target folder for management in an embodiment of the present application.
[0179] In the application embodiment, infrequently used applications can be determined based on the usage data of the various applications, and the identifiers of the infrequently used applications can be moved to a target folder for management, thereby preventing infrequently used applications from interfering with the use of commonly used applications and improving the user experience of using commonly used applications.
[0180] like Figure 6 As shown, it is a schematic diagram of an embodiment of a memory management device in an embodiment of the present application, which may include:
[0181] The detection module 601 is used to detect the usage data of each application on the terminal device within a preset time period;
[0182] A processing module 602 is used to determine frequently used applications according to the usage data of each application;
[0183] The processing module 602 is further used to map the common file corresponding to the first target application to the memory, wherein the first target application is an application whose common file is not mapped to the memory;
[0184] and / or,
[0185] The processing module 602 is further used to release the general file corresponding to the second target application in the memory, where the second target application is an application in the memory that is not one of the common applications and is mapped by the general file.
[0186] Optionally, in some possible implementations, the usage data includes at least one of the number of times the usage is performed and the duration of the usage;
[0187] The processing module 602 is specifically configured to determine that the first application is a frequently used application when the first usage count of the first application is greater than a preset usage count; or
[0188] The processing module 602 is specifically configured to determine that the first application is a frequently used application when the first usage duration of the first application is greater than a preset usage duration; or
[0189] The processing module 602 is specifically used to determine that the first application is a frequently used application when a first usage count of the first application is greater than a preset usage count and a first usage duration of the first application is greater than a preset usage duration.
[0190] Optionally, in some possible implementations, the usage data includes at least one of the number of times the device is used each day and the duration of use each day within a preset duration;
[0191] The processing module 602 is specifically used to compare the number of uses per day within a preset time period with the preset number of uses to determine the commonly used applications per day; calculate a first proportion of each application determined as a commonly used application within the preset time period, and if the first proportion of the third application determined as a commonly used application within the preset time period among the applications is greater than a first proportion threshold, determine the third application as a commonly used application; or,
[0192] The processing module 602 is specifically used to compare the daily usage time within the preset time with the preset usage time to determine the commonly used applications of each day; calculate the second proportion of each application determined as a commonly used application within the preset time, and if the second proportion of the third application determined as a commonly used application within the preset time among the various applications is greater than the second proportion threshold, determine the third application as a commonly used application; or,
[0193] Processing module 602 is specifically used to compare the number of uses per day within a preset duration with the preset number of uses, determine the frequently used applications per day, and calculate a first proportion of each application determined as a frequently used application within the preset duration; compare the usage time per day within the preset duration with the preset usage time, determine the frequently used applications per day, and calculate a second proportion of each application determined as a frequently used application within the preset duration; and determine that the third application is a frequently used application when the first proportion of the third application among each application determined as a frequently used application within the preset duration is greater than a first proportion threshold and the second proportion of the third application among each application determined as a frequently used application within the preset duration is greater than a second proportion threshold.
[0194] Optionally, in some possible implementations, the processing module 602 is specifically used to detect the remaining storage space of the memory; when the remaining storage space is less than or equal to a storage space threshold, the common file corresponding to the second target application in the memory is released.
[0195] Optionally, in some possible implementations, the processing module 602 is specifically configured to release the common file corresponding to the second target application in the memory when the second target application is not a highest priority application.
[0196] Optionally, in some possible implementations, the processing module 602 is further configured to update a list of commonly used applications based on the commonly used applications, wherein common files of applications in the list of commonly used applications are mapped in the memory.
[0197] Optionally, in some possible implementations, the processing module 602 is specifically configured to add the first target application to a list of commonly used applications.
[0198] Optionally, in some possible implementations, the processing module 602 is specifically configured to remove the second target application from the list of commonly used applications.
[0199] Optionally, in some possible implementations, the processing module 602 is specifically configured to determine a non-commonly used application according to the usage data of each application;
[0200] The display module 603 is used to move the identifier of the infrequently used application to a target folder for management.
[0201] like Figure 7 As shown, it is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application, which may include: Figure 6 The memory management device shown.
[0202] like Figure 8 FIG. 1 is a schematic diagram of another embodiment of a terminal device in an embodiment of the present application. Figure 8 A detailed introduction to the various components of the mobile phone in the terminal device:
[0203] The RF circuit 810 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 880 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 810 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 810 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0204] The memory 820 can be used to store software programs and modules. The processor 880 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 820. The memory 820 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 820 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0205] The input unit 830 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 830 may include a touch panel 831 and other input devices 832. The touch panel 831, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 831 or near the touch panel 831 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 831 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 880, and can receive and execute commands sent by the processor 880. In addition, the touch panel 831 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 831, the input unit 830 may also include other input devices 832. Specifically, the other input devices 832 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0206] The display unit 840 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 840 may include a display panel 841. Optionally, the display panel 841 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 831 may cover the display panel 841. When the touch panel 831 detects a touch operation on or near it, it is transmitted to the processor 880 to determine the type of touch event. Subsequently, the processor 880 provides a corresponding visual output on the display panel 841 according to the type of touch event. Although in Figure 8 In the embodiment, the touch panel 831 and the display panel 841 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 831 and the display panel 841 can be integrated to realize the input and output functions of the mobile phone.
[0207] The mobile phone may also include at least one sensor 850, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 841 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0208] The audio circuit 860, the speaker 861, and the microphone 862 can provide an audio interface between the user and the mobile phone. The audio circuit 860 can transmit the received audio data to the speaker 861 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and converted into audio data, and then the audio data is output to the processor 880 for processing, and then sent to another mobile phone through the RF circuit 810, or the audio data is output to the memory 820 for further processing.
[0209] Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the Wi-Fi module 870. It provides users with wireless broadband Internet access. Figure 8A Wi-Fi module 870 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0210] The processor 880 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 820, and calling data stored in the memory 820, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 880 may include one or more processing units; preferably, the processor 880 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 880.
[0211] The mobile phone also includes a power supply 890 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 880 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
[0212] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0213] In the embodiment of the present application, the processor 880 is used to detect usage data of each application on the terminal device within a preset time period; determine the frequently used application according to the usage data of each application;
[0214] The processor 880 is further configured to map a common file corresponding to a first target application into the memory, wherein the first target application is an application whose common file is not mapped into the memory;
[0215] and / or,
[0216] The processor 880 is further configured to release a general file corresponding to a second target application in the memory, where the second target application is an application in the memory that is not one of the common applications and is mapped from the general file.
[0217] Optionally, in some possible implementations, the usage data includes at least one of the number of times the usage is performed and the duration of the usage;
[0218] The processor 880 is specifically configured to determine that the first application is a frequently used application when a first usage count of the first application is greater than a preset usage count; or
[0219] The processor 880 is specifically configured to determine that the first application is a frequently used application when a first usage duration of the first application is greater than a preset usage duration; or
[0220] Processor 880 is specifically configured to determine that the first application is a frequently used application when a first usage count of the first application is greater than a preset usage count and a first usage duration of the first application is greater than a preset usage duration.
[0221] Optionally, in some possible implementations, the usage data includes at least one of the number of times the device is used each day and the duration of use each day within a preset duration;
[0222] Processor 880 is specifically configured to compare the number of times of use per day within a preset time period with the preset number of times of use to determine the frequently used applications per day; calculate a first proportion of each application determined as a frequently used application within the preset time period, and determine that the third application is a frequently used application when the first proportion of the third application determined as a frequently used application within the preset time period among the applications is greater than a first proportion threshold; or,
[0223] Processor 880 is specifically configured to compare the daily usage time within the preset time with the preset usage time to determine the frequently used applications of each day; calculate a second proportion of each application determined as a frequently used application within the preset time, and determine that the third application is a frequently used application when the second proportion of the third application determined as a frequently used application within the preset time among the applications is greater than a second proportion threshold; or,
[0224] Processor 880 is specifically used to compare the number of uses per day within a preset duration with the preset number of uses, determine the frequently used applications per day, and calculate a first proportion of each application determined as a frequently used application within the preset duration; compare the usage time per day within the preset duration with the preset usage time, determine the frequently used applications per day, and calculate a second proportion of each application determined as a frequently used application within the preset duration; and determine that the third application is a frequently used application when the first proportion of the third application among the various applications determined as a frequently used application within the preset duration is greater than a first proportion threshold and the second proportion of the third application among the various applications determined as a frequently used application within the preset duration is greater than a second proportion threshold.
[0225] Optionally, in some possible implementations, the processor 880 is specifically used to detect the remaining storage space of the memory; when the remaining storage space is less than or equal to a storage space threshold, the general file corresponding to the second target application in the memory is released.
[0226] Optionally, in some possible implementations, the processor 880 is further configured to update a list of commonly used applications based on the commonly used applications, and common files of the applications in the list of commonly used applications are mapped in the memory.
[0227] Optionally, in some possible implementations, the processor 880 is specifically configured to add the first target application to a list of commonly used applications.
[0228] Optionally, in some possible implementations, the processor 880 is specifically configured to remove the second target application from the list of commonly used applications.
[0229] Optionally, in some possible implementations, the processor 880 is specifically configured to determine a non-commonly used application according to the usage data of each application;
[0230] The display unit 840 is used to move the identifier of the infrequently used application to a target folder for management.
[0231] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0232] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0233] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0234] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0235] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0236] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or 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 to enable 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 application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0237] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 application.
Claims
1. A memory management method, characterized in that: include: Detect usage data of each application on the terminal device within a preset time period; Determining frequently used applications based on the usage data of each application; Mapping a common file corresponding to a first target application into the memory, wherein the first target application is an application whose common file is not mapped into the memory; and / or, The general file corresponding to the second target application in the memory is released, and the second target application is an application in the memory that is not one of the common applications and is mapped to the general file.
2. The method according to claim 1, characterized in that The usage data includes at least one of the number of times the application is used and the duration of the application. The determining the frequently used application according to the usage data of each application includes: When the first usage count of the first application is greater than the preset usage count, determining that the first application is a frequently used application; or, When a first usage duration of a first application is greater than a preset usage duration, determining that the first application is a frequently used application; or, When a first usage count of a first application is greater than a preset usage count, and a first usage duration of the first application is greater than a preset usage duration, the first application is determined to be a frequently used application.
3. The method according to claim 1, characterized in that The usage data includes at least one of the number of times a user uses a application per day and the duration of the application used per day within a preset duration; and determining the frequently used application programs based on the usage data of each application program includes: Compare the number of daily uses within a preset time period with the preset number of uses to determine the commonly used applications every day; calculate a first proportion of each application determined as a commonly used application within the preset time period, and if the first proportion of the third application determined as a commonly used application within the preset time period among the applications is greater than a first proportion threshold, determine the third application as a commonly used application; or, Compare the daily usage time within the preset time with the preset usage time to determine the commonly used applications of each day; calculate the second proportion of each application determined as a commonly used application within the preset time, and if the second proportion of the third application determined as a commonly used application within the preset time among the applications is greater than the second proportion threshold, determine the third application as a commonly used application; or, Compare the number of daily uses within a preset duration with the preset number of uses, determine the frequently used applications of each day, and calculate the first proportion of each application determined as a frequently used application within the preset duration; compare the daily usage time within the preset duration with the preset usage time, determine the frequently used applications of each day, and calculate the second proportion of each application determined as a frequently used application within the preset duration; if the first proportion of the third application among each application determined as a frequently used application within the preset duration is greater than the first proportion threshold, and the second proportion of the third application among each application determined as a frequently used application within the preset duration is greater than the second proportion threshold, determine the third application as a frequently used application.
4. The method according to any one of claims 1 to 3, characterized in that The releasing of the common file corresponding to the second target application in the memory includes: Detecting the remaining storage space of the memory; When the remaining storage space is less than or equal to the storage space threshold, the common file corresponding to the second target application in the memory is released.
5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: A list of commonly used applications is updated according to the commonly used applications, and common files of applications in the list of commonly used applications are mapped in the memory.
6. The method according to claim 5, characterized in that The updating of the list of commonly used applications according to the commonly used applications includes: adding the first target application to a list of commonly used applications; and / or, The second target application is removed from the common application list.
7. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Determining infrequently used applications based on the usage data of the various applications; The identifier of the infrequently used application is moved to a target folder for management.
8. A memory management device, characterized in that: include: A detection module, used to detect usage data of each application on the terminal device within a preset time period; A processing module, used for determining frequently used applications according to the usage data of each application; The processing module is further used to map the common file corresponding to the first target application to the memory, wherein the first target application is an application whose common file is not mapped to the memory; and / or, The processing module is further used to release the general file corresponding to the second target application in the memory, where the second target application is an application in the memory that is not one of the common applications and is mapped by the general file.
9. A terminal device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the terminal device executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.