Application cache cleaning method, device, equipment and storage medium
By analyzing user behavior characteristics, caching data in a hierarchical manner and cleaning it intelligently, the problem of cache occupying storage space is solved, and the application speed is increased and the user experience is improved.
Patent Information
- Application Number
- CN202110184148.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-08
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2041-02-08
AI Technical Summary
In the prior art, application cache files are not managed in a timely manner, resulting in a large amount of storage space being occupied, affecting the application running speed, and user operations are cumbersome and unfriendly, making it difficult to effectively clean up valuable cache data.
By analyzing the user's historical operation behavior data, generating behavioral feature information, applying cache data in a hierarchical manner, and intelligently clearing low-priority cache data according to preset rules, retaining high-priority cache data.
Without any user intervention, the storage space occupied by cached data can be effectively reduced, the application running speed can be increased, and the user experience can be improved.
Smart Images

Figure CN113392041B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet application technology, and in particular to an application cache cleaning method, apparatus, device, and storage medium. Background Art
[0002] With the rapid development of Internet technology, people's requirements for network and application speed are becoming increasingly higher. Cleaning junk files has a crucial impact on application speed. For example, when users use the client to browse pages or watch videos, they easily generate a large number of cache files. These cache files take up a lot of space and become useless after the user finishes browsing the page or watching the video. If they are not deleted in time, they not only waste memory space, but also seriously affect the speed of application operation and the user experience.
[0003] In the prior art, the size of cache files is usually not managed during the application development process. That is, the cache files are allowed to be stored in the device's memory space until the user upgrades / uninstalls the application or receives a one-click cleanup trigger from the user.
[0004] However, if the user does not upgrade or uninstall the application for a long time, the cache files will gradually increase as the user uses the application for a longer time, seriously affecting the running speed of the application or system. There may even be an extreme situation where the cache files occupy all the memory space of the device, which will cause abnormal operation of the system and may even prevent the device from starting normally.
[0005] In addition, when the user needs to trigger a one-click cleanup of the application's cached data, he needs to enter the settings function through the application client and find the corresponding one-click cleanup control in the function list. In the process of performing the above operations, the user must operate on a specific page, and multiple operations are required to complete the cache cleanup. The location of the above functions is also relatively hidden, which is very unfriendly and inconvenient for some users who are not familiar with APP operations or do not know how to use this function. Moreover, one-click cleaning requires a lot of scanning time and cleaning time, the cleaning process is long, and when clearing cached data, all scanned cached data will be cleared, resulting in the cleaning of caches that are still valuable to users, causing inconvenience to users. Summary of the Invention
[0006] In response to the above-mentioned problems in the prior art, the purpose of this application is to provide an application cache cleaning method, device, equipment and storage medium, which can realize the intelligent clearing of application cache data and reduce the storage space occupied by cache data.
[0007] To solve the above problems, the present application provides an application cache cleaning method, including:
[0008] In response to the detected target operation behavior of the target user, generating a user behavior analysis request for the target user, and sending the user behavior analysis request to a backend server;
[0009] receiving behavior characteristic information sent by the backend server in response to the user behavior analysis request, wherein the behavior characteristic information is obtained by the backend server through analyzing historical operation behavior data of the target user;
[0010] hierarchically processing the application cache data corresponding to the target user according to the behavior characteristic information to obtain application cache data of multiple priorities;
[0011] The application cache data of the multiple priorities are cleaned up according to preset cleaning rules.
[0012] Another aspect of the present application provides an application cache cleaning method, comprising:
[0013] The application client generates a user behavior analysis request for the target user in response to the detected target operation behavior of the target user, and sends the user behavior analysis request to the backend server;
[0014] After receiving the user behavior analysis request, the backend server obtains the historical operation behavior data of the target user;
[0015] The backend server analyzes the historical operation behavior data to obtain behavior feature information of the target user, and sends the behavior feature information to the application client;
[0016] After receiving the behavior characteristic information, the application client performs hierarchical processing on the application cache data corresponding to the target user according to the behavior characteristic information to obtain application cache data of multiple priorities;
[0017] The application client cleans up the application cache data of the multiple priorities according to a preset cleaning rule.
[0018] Another aspect of the present application provides an application cache cleaning device, comprising:
[0019] a generating module, configured to generate a user behavior analysis request for the target user in response to the detected target operation behavior of the target user, and send the user behavior analysis request to a backend server;
[0020] a receiving module, configured to receive behavior characteristic information sent by the backend server in response to the user behavior analysis request, wherein the behavior characteristic information is obtained by the backend server through analyzing historical operation behavior data of the target user;
[0021] a processing module, configured to perform hierarchical processing on the application cache data corresponding to the target user according to the behavior characteristic information, to obtain application cache data of multiple priorities;
[0022] The cleaning module is used to clean up the application cache data of the multiple priorities according to preset cleaning rules.
[0023] On the other hand, the present application provides an application cache cleaning system, including an application client and a backend server;
[0024] The application client is configured to generate a user behavior analysis request for the target user in response to the detected target operation behavior of the target user, and send the user behavior analysis request to the backend server;
[0025] The backend server is configured to, upon receiving the user behavior analysis request, obtain the historical operation behavior data of the target user; analyze the historical operation behavior data to obtain the behavior characteristic information of the target user; and send the behavior characteristic information to the application client;
[0026] The application client is also used to, after receiving the behavior characteristic information, perform hierarchical processing on the application cache data corresponding to the target user according to the behavior characteristic information to obtain application cache data of multiple priorities; and clean up the application cache data of multiple priorities according to preset cleaning rules.
[0027] On the other hand, the present application provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the application cache clearing method as described above.
[0028] On the other hand, the present application provides a computer-readable storage medium, which stores at least one instruction or at least one program. The at least one instruction or the at least one program is loaded and executed by a processor to implement the application cache clearing method as described above.
[0029] Another aspect of the present application provides a computer program product or computer program, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described application cache clearing method.
[0030] Due to the above technical solution, this application has the following beneficial effects:
[0031] The application cache cleaning method of the present application determines the user's behavioral characteristic information by analyzing the user's historical operation behavior data, and classifies the application cache data based on the behavioral characteristic information, and intelligently clears the application cache data of different priorities, thereby clearing unimportant cache data and retaining cache data that is still valuable to the user. Without the user having to perform any operation, it can reduce the storage space occupied by cache data, increase the running speed of the application, and enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] To more clearly illustrate the technical solution of this application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0033] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0034] Figure 2 This is a flowchart of an application cache cleaning method provided by an embodiment of the present application;
[0035] Figure 3 This is a flowchart of an application cache cleaning method provided by another embodiment of the present application;
[0036] Figure 4 This is a schematic diagram of the structure of a linked list for storing cache data provided by an embodiment of the present application;
[0037] Figure 5 This is a flowchart of an application cache cleaning method provided by another embodiment of the present application;
[0038] Figure 6 This is a flowchart of an application cache cleaning method provided by another embodiment of the present application;
[0039] Figure 7 This is a flowchart of an application cache cleaning method provided by a specific embodiment of the present application;
[0040] Figure 8 This is a structural diagram of an application cache cleaning device provided by another embodiment of the present application;
[0041] Figure 9 This is a structural diagram of an application cache cleaning system provided by another embodiment of the present application;
[0042] Figure 10 It is a structural diagram of a terminal provided in another embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of this application.
[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0045] In order to make the purpose, technical solutions and advantages disclosed in the embodiments of the present application more clear, the embodiments of the present application are further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present application and are not intended to limit the embodiments of the present application. First, the embodiments of the present application explain the following concepts:
[0046] A linked list is a non-contiguous, non-sequential storage structure in physical memory. The logical order of data elements is achieved through the order of pointer links in the linked list. A linked list consists of a series of nodes (each element in the linked list is called a node), which can be dynamically generated at runtime. Each node consists of two parts: a data field for storing the data element and a pointer field for storing the address of the next node.
[0047] Least Recently Used (LRU) is a cache eviction algorithm that evicts data based on its historical access history. The core idea is that if data has been accessed recently, it is more likely to be accessed in the future. When the cache is full and new data arrives, the oldest data entry is deleted.
[0048] Reference Manual Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present application, such as Figure 1 As shown, the implementation environment may include at least a terminal 110 and a server 120. The terminal 110 and the server 120 may be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment of the present application.
[0049] The terminal 110 may include, but is not limited to, a smartphone, a tablet computer, an e-book reader, a laptop computer, or a desktop computer. The terminal 110 may run one or more application clients, which may be of the same type or different types. The application clients may be web pages provided to users by service providers, or application software provided to users by these service providers.
[0050] The server 120 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The server 120 may include a network communication unit, a processor, and a memory, etc.
[0051] In actual applications, the application client can be a video playback application client, a text reading application client, or a live broadcast application client, such as Tencent Video Client, QQ Reader, etc. The searches, page browsing, video watching, text reading, likes, etc. generated by the user during the use of the application client will leave operation behavior records and generate a large number of cache files. The application client sends the above-mentioned operation behavior records to the server 120 to obtain the user operation behavior log. After collecting the user operation behavior logs over a period of time, the user's historical operation behavior data can be obtained. The server 120 can perform statistical analysis on the user's historical operation behavior data to obtain the user's behavior feature information. The application client can classify the cache files generated by the user using the application client according to the user's behavior feature information, and intelligently clear unimportant cache files.
[0052] It should be noted that Figure 1 Just an example.
[0053] Example 1
[0054] Reference Manual Figure 2 , which shows the process of the application cache cleaning method provided by an embodiment of the present application, which can be applied to Figure 1 In the application client of the terminal. Figure 2 As shown, the method may include the following steps:
[0055] S210: In response to the detected target operation behavior of the target user, a user behavior analysis request for the target user is generated, and the user behavior analysis request is sent to a backend server.
[0056] In an embodiment of the present application, the target user can use the application client to browse pages, watch videos, read texts, or perform live video broadcasting, etc. For example, the target user can use video software to play videos or watch live broadcasts. During this process, the target operation behavior of the target user can be detected in real time. The target operation behavior can be the operation behavior of the target user performing a certain specific operation, such as the search behavior of searching for videos / live broadcasts / news for the target user. The target operation behavior can also be any operation behavior of the target user in the process of using the application client, including search behavior, news reading behavior, and video / live broadcast viewing behavior, etc. After the target operation behavior of the target user is detected, a user behavior analysis request for the target user can be generated and sent to the background server, so that the background server analyzes the behavior of the target user in response to the user behavior analysis request.
[0057] In an embodiment of the present application, during the process of a target user using an application client, the application client may record the target user's operational behavior data and report it to a backend server. The operational behavior data may include operation path information, such as searching for related videos from viewing history, searching for related videos through search, or searching for related videos using a list filter, etc. The backend server may obtain the target user's historical operational behavior data by collecting the target user's operational behavior data over a period of time while using the application client.
[0058] In a possible embodiment, the user behavior analysis request can also be generated when the application client reports the operation behavior data of the target user to the server. The user behavior analysis request can be sent to the background server at the same time as the reported data, so that the background server analyzes the behavior of the target user in response to the user behavior analysis request.
[0059] S220: Receive behavior feature information sent by the backend server in response to the user behavior analysis request, where the behavior feature information is obtained by the backend server through analysis of historical operation behavior data of the target user.
[0060] In an embodiment of the present application, after receiving the user behavior analysis request, the background server can obtain the historical operation behavior data of the target user, analyze the historical operation behavior data, obtain the behavior feature information of the target user, and return the behavior feature information.
[0061] In a possible embodiment, after the background server obtains the behavioral characteristic information of the target user, it can compare it with the behavioral characteristic information calculated last time. If the behavioral characteristic information has not changed, an empty packet is returned; if the behavioral characteristic information has changed, the behavioral characteristic information calculated this time is returned.
[0062] The historical operation behavior data includes data of application operations performed by the target user through various operation paths; the behavior characteristic information includes multiple operation paths and the target user's preference for various operation paths.
[0063] Specifically, the backend server analyzes the historical operation behavior data to obtain the behavior feature information of the target user, which may include:
[0064] Obtain the number of application operations performed by the target user through each operation path respectively;
[0065] The target user's preference for various operation paths is determined according to the number of operations.
[0066] In an embodiment of the present application, the multiple operation paths in the behavioral characteristic information can be a plurality of pre-set operation paths, in which case the number of the operation paths is fixed, for example, setting the search for related videos from viewing history, searching for related videos, or using list filtering to find related videos, etc.; the multiple operation paths in the behavioral characteristic information can also be various operation paths used by the target user in the historical operation behavior data among the pre-set multiple operation paths, in which case the number of the operation paths is determined based on the historical operation behavior data.
[0067] In the embodiment of the present application, when calculating the target user's preference for an operation path, the number of times it is used can be considered. The preference for an operation path that is used more frequently is higher, and the preference for an operation path that is used less frequently is lower. For example, the number of times the target user performs application operations through each operation path can be counted, and the number of operations can be directly used as the target user's preference for the corresponding operation path.
[0068] In one possible embodiment, when calculating the preference for an operation path, two dimensions, namely, the number of times the operation is performed and the duration of the operation, can also be considered. The number of times the operation is performed before and within a preset time period can be used to determine the target user's preference for the operation path. The preset time period can be set according to actual conditions, for example, it can be set to one week, and this embodiment of the present application does not limit this. Specifically, determining the target user's preference for various operation paths based on the number of operations can include:
[0069] For each operation path, obtaining the number of first operations performed by the target user on the application through the operation path before a preset time period;
[0070] Obtaining a second number of application operations performed by the target user through the operation path within a preset time period;
[0071] A weighted sum is taken of the first operation times and the second operation times to obtain the target user's preference for the operation path.
[0072] Specifically, the weight of the first number of operations and the weight of the second number of operations can be pre-set according to actual needs. In actual applications, the number of operations of the target user within a preset time period can be given priority, that is, the weight of the first number of operations can be set to a smaller weight and the weight of the second number of operations can be set to a larger weight. For example, the weight of the first number of operations can be set to 0.3 and the weight of the second number of operations can be set to 0.7.
[0073] S230: hierarchically processing the application cache data corresponding to the target user according to the behavior characteristic information to obtain application cache data of multiple priorities.
[0074] In an embodiment of the present application, the behavioral characteristic information may include multiple operation paths and the target user's preference for various operation paths. The application cache data is the cache data generated by the target user during the use of the application client, and the application cache data can be stored in the form of a linked list.
[0075] Specifically, refer to the attached manual Figure 3 , performing hierarchical processing on the application cache data corresponding to the target user according to the behavior characteristic information to obtain application cache data of multiple priorities may include:
[0076] S231: Determine the priorities of various operation paths according to the target user's preference for the various operation paths;
[0077] S232: determining, for each application cache data, a target operation path corresponding to the application cache data;
[0078] S233: Using the priority of the target operation path as the priority of the application cache data.
[0079] Among them, when determining the priorities of various operation paths according to the target user's preference for various operation paths, the multiple operation paths can be sorted from high to low according to the preference, and the operation paths that are ranked higher (i.e., have a higher preference) have a higher priority, and the operation paths that are ranked lower (i.e., have a lower preference) have a lower priority. For example, it is assumed that the priority of the operation path is set to three priorities, including a first priority, a second priority, and a third priority, the first priority is higher than the second priority, and the second priority is higher than the third priority. After sorting the multiple operation paths, the priority of the first 30% of the operation paths can be set to the first priority, the priority of the middle 40% of the operation paths can be set to the second priority, and the priority of the last 30% of the operation paths can be set to the third priority.
[0080] Among them, each of the application cache data is cache data generated by the target user performing an operation under a certain operation path, so the priority of the operation path corresponding to the cache data can be directly applied as its own priority. For example, assuming that the priority of the operation path includes a first priority, a second priority, and a third priority, the first priority is higher than the second priority, and the second priority is higher than the third priority, then the multiple priorities of the application cache data also include a first priority, a second priority, and a third priority, the first priority is higher than the second priority, and the second priority is higher than the third priority. The priority of the application cache data corresponding to the first priority operation path is the first priority, the priority of the application cache data corresponding to the second priority operation path is the second priority, and the priority of the application cache data corresponding to the third priority operation path is the third priority.
[0081] In the embodiment of the present application, after determining the priority of each application cache data, a level tag matching the priority can be added to each application cache data, and the level tag can identify the priority of the application cache data. Figure 4 As shown, the application cache data can be stored in a linked list. The linked list data storage rules are as follows: when new cache data is generated, the new cache data is inserted at the head of the linked list; each time a cache hit occurs (i.e., cache data is accessed), the cache data is moved to the head of the linked list; when the linked list is full, the cache data at the end of the linked list is eliminated. After determining the priority of each application cache data, the application cache data can be marked with a priority tag in the linked list.
[0082] S240: Cleaning up the application cache data of the multiple priorities according to a preset cleaning rule.
[0083] In an embodiment of the present application, the preset cleaning rules may be set in advance, and the preset cleaning rules include at least one strategy for cleaning application cache data of the multiple priorities.
[0084] In one cleaning strategy, cleaning the application cache data of the multiple priorities according to the preset cleaning rules may include:
[0085] When it is detected that the remaining storage space of the current device is less than a preset threshold, the application cache data is cleared in order of priority from low to high until it is detected that the remaining storage space of the current device is greater than or equal to the preset threshold.
[0086] Specifically, the application client can detect the remaining storage space of the current device in real time, determine whether the size of the remaining storage space is less than the preset threshold, and when it is less than the preset threshold (i.e., insufficient storage space), clean up the application cache data in order of priority from low to high, until the remaining storage space of the current device is greater than or equal to the preset threshold, and end the cleaning of the application cache data. For example, assuming that the multiple priorities include a first priority, a second priority, and a third priority, the first priority is higher than the second priority, and the second priority is higher than the third priority. When it is detected that the remaining storage space of the current device is less than the preset threshold, the application cache data of the third priority can be cleaned up first; after the cleaning is completed, if the remaining storage space of the current device is still less than the preset threshold, the application cache data of the second priority can be cleaned up; in extreme cases, after the cleaning of the application cache data of the second priority is completed, the remaining storage space of the current device is still less than the preset threshold, the application cache data of the first priority can be cleaned up until the remaining storage space of the current device is greater than or equal to the preset threshold.
[0087] In actual applications, when it is detected that the remaining storage space of the current device is less than a preset threshold, the application cache data is cleared in descending order of priority until it is detected that the remaining storage space of the current device is greater than or equal to the preset threshold, which may include:
[0088] When it is detected that the remaining storage space of the current device is less than a preset threshold, the application cache data is cleared in descending order of priority until it is detected that the application cache data corresponding to the target user includes only the application cache data of the first priority, or until it is detected that the remaining storage space of the current device is greater than or equal to the preset threshold; wherein the application cache data of the first priority is the application cache data of the highest priority;
[0089] When the application cache data corresponding to the target user only includes application cache data of the first priority, if it is detected that the remaining storage space of the current device is less than the preset threshold, the application cache data of the first priority is cleared according to the time order in which the application cache data of the first priority is accessed until it is detected that the remaining storage space of the current device is greater than or equal to the preset threshold.
[0090] Under this cleanup strategy, the following two situations may occur:
[0091] In the first case, the condition that the application cache data corresponding to the target user only includes the application cache data of the first priority is met first, and at this time, the remaining storage space of the current device is still less than the preset threshold. In this case, in order to avoid clearing out all important cache data during the cache cleaning process, in the process of cleaning the application cache data of the first priority, the cleaning can be carried out according to the order in which the application cache data of the first priority is accessed. Specifically, the historical access records of each application cache data of the first priority can be obtained in advance, and each application cache data can be stored in correspondence with the time when it is accessed. When it is necessary to clean the application cache data of the first priority, it can be cleaned in order from the earliest to the latest according to the time when the data is accessed. During the cleaning process, the remaining storage space of the current device is detected in real time. When it is detected that the remaining storage space is greater than or equal to the preset threshold, the cleaning is stopped.
[0092] For example, an algorithm such as LRU can be used to clean up the first-priority application cache data based on the historical access records of the application cache data. By using the above method to clean up the highest-priority application cache data, it is possible to clean up the data that users rarely access first and retain the data that users frequently access, thereby ensuring smooth operation of the application and improving the user experience.
[0093] In the second scenario, if the remaining storage space on the current device is greater than or equal to the preset threshold, the target user's application cache data includes not only the first-priority application cache data but also the application cache data of other priorities. In this case, the entire application cache cleanup process only needs to clean up the lower-priority application cache data.
[0094] In the above two situations, the method for clearing the cached data of lower-priority applications can be to directly clear all the cached data of the entire priority application, or to clear it according to the order in which the cached data of the priority application is accessed. The specific method is similar to the method for clearing the cached data of the first-priority application in the first situation, and will not be described in detail in this embodiment of the application. In this embodiment of the application, by intelligently detecting and clearing the application cached data, no user operation is required, which can reduce the storage space occupied by the cached data and improve the running speed of the application.
[0095] In another cleaning strategy, cleaning the application cache data of the multiple priorities according to the preset cleaning rules may include:
[0096] When a cache cleanup instruction is obtained, the cache data of the application with the lowest priority is cleaned up.
[0097] In an embodiment of the present application, the cache cleaning instruction can be an instruction input by the user based on the application client, or it can be an instruction generated periodically by the application client. Assuming that the application cache data of multiple priorities include application cache data of first priority, second priority and third priority, the first priority is higher than the second priority, and the second priority is higher than the third priority, when the cache cleaning instruction is obtained, it is only necessary to clean up the application cache data of the third priority.
[0098] In actual applications, the application client can be configured with a scheduled cache data cleanup function. Even if the user does not instruct cache cleanup, the cache cleanup instruction will be generated at a fixed time, for example, at 24:00 every day or when the user exits the application client. In this case, only the cache data of the lowest-priority application will be cleaned.
[0099] In actual applications, a partial cleanup control can also be set in the application client. When the user uses the partial cleanup control to clean the application cache, the cache cleanup instruction can also be generated to clean only the application cache data with the lowest priority. By setting up the partial cleanup function, the user can manually clear some unimportant cache data and retain the cache that is still valuable to the user.
[0100] In another cleaning strategy, a one-click cleanup control can be set up in the app client. When the user uses this one-click cleanup control to clean the app cache, a one-click cleanup instruction can be generated, in which case all app cache data needs to be cleaned. By retaining the one-click cleanup function, ordinary users no longer need to pay attention to cache cleanup, while certain special users can still clear the app cache with one-click cleanup.
[0101] It should be noted that other cleaning strategies may be set to clean up the application cache data of the multiple priorities, and this embodiment of the present application does not limit this.
[0102] To sum up, the application cache cleaning method of the present application determines the user's behavioral characteristic information by analyzing the user's historical operation behavior data, and classifies the application cache data based on the behavioral characteristic information, and intelligently clears application cache data of different priorities, thereby clearing unimportant cache data and retaining cache data that is still valuable to the user. Without the user performing any operation, it can reduce the storage space occupied by cache data, increase the running speed of the application, and enhance the user experience.
[0103] Example 2
[0104] Reference Manual Figure 5, which shows the process of the application cache cleaning method provided by another embodiment of the present application, which can be applied to Figure 1 In the implementation environment shown. Figure 5 As shown, the method may include the following steps:
[0105] S501: The application client generates a user behavior analysis request for the target user in response to a detected target operation behavior of the target user.
[0106] S502: The application client sends the user behavior analysis request to the backend server.
[0107] S503: After receiving the user behavior analysis request, the backend server obtains the historical operation behavior data of the target user.
[0108] Specifically, the historical operation behavior data includes data on application operations performed by the target user through various operation paths.
[0109] S504: The backend server analyzes the historical operation behavior data to obtain behavior feature information of the target user.
[0110] Specifically, the behavior feature information includes multiple operation paths and the target user's preference for each operation path. Figure 6 The backend server analyzes the historical operation behavior data to obtain the behavior feature information of the target user, which may include:
[0111] S610: The backend server obtains the number of times the target user performs application operations through each operation path;
[0112] S620: The backend server determines the target user's preference for various operation paths according to the number of operations.
[0113] The backend server determining the target user's preference for various operation paths according to the number of operations may include:
[0114] For each operation path respectively, the backend server obtains the number of first operations performed by the target user on the application through the operation path before a preset time period;
[0115] The backend server obtains a second number of application operations performed by the target user through the operation path within a preset time period;
[0116] The backend server performs a weighted summation on the first operation times and the second operation times to obtain the target user's preference for the operation path.
[0117] S505: The backend server sends the behavior feature information to the application client.
[0118] Specifically, if the behavior characteristic information of the target user has not changed, the background server may send an empty packet to the application client; if the behavior characteristic information of the target user has changed, the background server may send new behavior characteristic information to the application client.
[0119] S506: After receiving the behavior characteristic information, the application client performs hierarchical processing on the application cache data corresponding to the target user according to the behavior characteristic information to obtain application cache data of multiple priorities.
[0120] S507: The application client clears the application cache data of the multiple priorities according to a preset clearing rule.
[0121] Details of the relevant technical solutions can be found in Figure 2 The method embodiment shown.
[0122] In a specific embodiment, the Figure 7 , the application client can be a video client, and the background server can be a video background. When the video client detects the user's search, video viewing and other operation behaviors, it can send the search, video viewing and other operation behavior data to the video background. After receiving the operation behavior data, the video background can analyze the user's historical operation behavior data, obtain the user's preference level for various operation paths, and send it to the video client. The video client can determine the priority of each application cache data based on the user's preference level for various operation paths, and add a level label that matches the priority to the application cache data. The video client can also monitor the remaining storage space of the current device in real time. When the remaining storage space of the current device is insufficient, the application cache data is cleaned up in order of priority from low to high until the remaining storage space of the current device is greater than or equal to the preset threshold value.
[0123] To sum up, the application cache cleaning method of the present application determines the user's behavioral characteristic information by analyzing the user's historical operation behavior data, and classifies the application cache data based on the behavioral characteristic information, and intelligently clears application cache data of different priorities, thereby clearing unimportant cache data and retaining cache data that is still valuable to the user. Without the user performing any operation, it can reduce the storage space occupied by cache data, increase the running speed of the application, and enhance the user experience.
[0124] Reference Manual Figure 8 , which shows the structure of an application cache cleaning device 800 provided by an embodiment of the present application. Figure 8 As shown, the apparatus 800 may include:
[0125] A generating module 810 is configured to generate a user behavior analysis request for the target user in response to the detected target operation behavior of the target user, and send the user behavior analysis request to a backend server;
[0126] A receiving module 820 is configured to receive behavior characteristic information sent by the backend server in response to the user behavior analysis request, wherein the behavior characteristic information is obtained by the backend server through analysis of historical operation behavior data of the target user;
[0127] A processing module 830 is configured to perform hierarchical processing on the application cache data corresponding to the target user according to the behavior characteristic information to obtain application cache data of multiple priorities;
[0128] The cleaning module 840 is configured to clean up the application cache data of the multiple priorities according to a preset cleaning rule.
[0129] It should be noted that the devices provided in the above embodiments are only illustrated by the division of the above functional modules when implementing their functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the devices provided in the above embodiments and the corresponding method embodiments are based on the same concept. The specific implementation process is detailed in the corresponding method embodiments and will not be repeated here.
[0130] Reference Manual Figure 9 , which shows the structure of an application cache cleaning system 900 provided by an embodiment of the present application. Figure 9 As shown, the system 900 may include an application client 910 and a backend server 920;
[0131] The application client 910 is configured to generate a user behavior analysis request for the target user in response to the detected target operation behavior of the target user, and send the user behavior analysis request to the backend server 920;
[0132] The backend server 920 is configured to obtain the historical operation behavior data of the target user after receiving the user behavior analysis request; analyze the historical operation behavior data to obtain the behavior characteristic information of the target user, and send the behavior characteristic information to the application client 910;
[0133] The application client 910 is also used to, after receiving the behavior characteristic information, perform hierarchical processing on the application cache data corresponding to the target user according to the behavior characteristic information to obtain application cache data of multiple priorities; and clean up the application cache data of multiple priorities according to preset cleaning rules.
[0134] An embodiment of the present application also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the application cache clearing method provided in the above method embodiment.
[0135] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0136] In a specific embodiment, Figure 10 As shown, it shows a schematic diagram of the structure of a terminal provided by an embodiment of the present application. The terminal 1000 may include a memory 1010 of one or more computer-readable storage media, a processor 1020 of one or more processing cores, an input unit 1030, a display unit 1040, a radio frequency (RF) circuit 1050, a wireless fidelity (WiFi) module 1060, and a power supply 1070. Those skilled in the art will understand that Figure 10 The terminal structure shown in the figure does not constitute a limitation on the terminal 1000, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0137] The memory 1010 can be used to store software programs and modules. The processor 1020 executes various functional applications and data processing by running or executing the software programs and modules stored in the memory 1010 and calling the data stored in the memory 1010. The memory 1010 may mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory 1010 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1010 may also include a memory controller to provide the processor 1020 with access to the memory 1010.
[0138] The processor 1020 is the control center of the terminal 1000. It connects various components of the terminal using various interfaces and lines. It executes or runs software programs and / or modules stored in the memory 1010 and accesses data stored in the memory 1010 to perform various functions of the terminal 1000 and process data, thereby monitoring the entire terminal 1000. The processor 1020 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0139] The input unit 1030 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 1030 may include an image input device 1031 and other input devices 1032. The image input device 1031 can be a camera or a photoelectric scanning device. In addition to the image input device 1031, the input unit 1030 can also include other input devices 1032. Specifically, the other input devices 1032 can 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.
[0140] The display unit 1040 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the terminal. These graphical user interfaces can be composed of graphics, text, icons, videos, or any combination thereof. The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0141] The RF circuit 1050 can be used to receive and send signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is handed over to one or more processors 1020 for processing; in addition, uplink data is sent to the base station. Generally, the RF circuit 1050 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 1050 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0142] WiFi is a short-range wireless transmission technology. The terminal 1000 can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1060. It provides users with wireless broadband Internet access. Figure 10 A WiFi module 1060 is shown, but it is understandable that it is not an essential component of the terminal 1000 and can be omitted as needed without changing the essence of the application.
[0143] The terminal 1000 also includes a power supply 1070 (e.g., a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1020 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 1070 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0144] It should be noted that, although not shown, the terminal 1000 may also include a Bluetooth module, etc., which will not be described in detail here.
[0145] An embodiment of the present application also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing an application cache cleaning method. The at least one instruction or the at least one program is loaded and executed by the processor to implement the application cache cleaning method provided by the above method embodiment.
[0146] Optionally, in an embodiment of the present application, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0147] One embodiment of the present application further provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the application cache clearing method provided in the various optional implementation examples described above.
[0148] It should be noted that the order of the embodiments of the present application described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0149] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0150] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0151] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for cleaning application cache, characterized in that: include: In response to the detected target operation behavior of the target user, generating a user behavior analysis request for the target user, and sending the user behavior analysis request to a backend server; receiving behavior characteristic information sent by the backend server in response to the user behavior analysis request, the behavior characteristic information being obtained by the backend server through analysis of historical operation behavior data of the target user; the behavior characteristic information including multiple operation paths and the target user's preference for each operation path; Determining the priorities of various operation paths according to the target user's preference for the various operation paths; For each application cache data, determining a target operation path corresponding to the application cache data; Each application cache data is cache data generated by the target user performing operations under the corresponding operation path; Using the priority of the target operation path as the priority of the application cache data; The application cache data is cleaned up according to a preset cleaning rule and the priority of the application cache data.
2. The method according to claim 1, characterized in that The clearing of the application cache data according to the preset clearing rule and the priority of the application cache data includes: When it is detected that the remaining storage space of the current device is less than a preset threshold, the application cache data is cleared in order of priority from low to high until it is detected that the remaining storage space of the current device is greater than or equal to the preset threshold.
3. The method according to claim 2, characterized in that When it is detected that the remaining storage space of the current device is less than a preset threshold, the application cache data is cleared in descending order of priority until it is detected that the remaining storage space of the current device is greater than or equal to the preset threshold, including: When it is detected that the remaining storage space of the current device is less than a preset threshold, the application cache data is cleared in descending order of priority until it is detected that the application cache data corresponding to the target user includes only the application cache data of the first priority, or until it is detected that the remaining storage space of the current device is greater than or equal to the preset threshold; wherein the application cache data of the first priority is the application cache data of the highest priority; When the application cache data corresponding to the target user only includes application cache data of the first priority, if it is detected that the remaining storage space of the current device is less than the preset threshold, the application cache data of the first priority is cleared according to the time order in which the application cache data of the first priority is accessed until it is detected that the remaining storage space of the current device is greater than or equal to the preset threshold.
4. A method for cleaning application cache, characterized in that: The method comprises: The application client generates a user behavior analysis request for the target user in response to the detected target operation behavior of the target user, and sends the user behavior analysis request to the backend server; After receiving the user behavior analysis request, the backend server obtains the historical operation behavior data of the target user; The backend server analyzes the historical operation behavior data to obtain behavior characteristic information of the target user, and sends the behavior characteristic information to the application client; the behavior characteristic information includes multiple operation paths and the target user's preference for each operation path; After receiving the behavior feature information, the application client determines the priorities of various operation paths according to the target user's preference for the various operation paths; determines the target operation path corresponding to each application cache data; each application cache data is cache data generated by the target user performing an operation under the corresponding operation path; and uses the priority of the target operation path as the priority of the application cache data; The application client cleans up the application cache data according to a preset cleaning rule and the priority of the application cache data.
5. The method according to claim 4, characterized in that The historical operation behavior data includes data on application operations performed by the target user through various operation paths; the behavior feature information includes multiple operation paths and the target user's preference for various operation paths; The backend server analyzes the historical operation behavior data to obtain the behavior feature information of the target user, including: The backend server respectively obtains the number of times the target user performs application operations through each operation path; The backend server determines the target user's preference for various operation paths according to the number of operations.
6. The method according to claim 5, characterized in that The backend server determines the target user's preference for various operation paths according to the number of operations, including: For each operation path respectively, the backend server obtains the number of first operations performed by the target user on the application through the operation path before a preset time period; The backend server obtains a second number of application operations performed by the target user through the operation path within a preset time period; The backend server performs a weighted summation on the first operation times and the second operation times to obtain the target user's preference for the operation path.
7. An application cache cleaning device, characterized in that: include: a generating module, configured to generate a user behavior analysis request for the target user in response to the detected target operation behavior of the target user, and send the user behavior analysis request to a backend server; a receiving module, configured to receive behavior characteristic information sent by the backend server in response to the user behavior analysis request, the behavior characteristic information being obtained by the backend server through analysis of the target user's historical operation behavior data; the behavior characteristic information including multiple operation paths and the target user's preference for each operation path; a processing module, configured to determine the priorities of various operation paths according to the target user's preference for the various operation paths; For each application cache data, determining a target operation path corresponding to the application cache data; Each application cache data is cache data generated by the target user performing operations under the corresponding operation path; Using the priority of the target operation path as the priority of the application cache data; The cleaning module is used to clean up the application cache data according to a preset cleaning rule and the priority of the application cache data.
8. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the application cache clearing method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the application cache clearing method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the application cache cleaning method as described in any one of claims 1-6.
Citation Information
Patent Citations
Method and device for removing cached data
CN106776378A
Document processing method and related products
CN107220344A
Cache management method, system and device for target object and electronic device
CN110298004A