Sand-box based data cleaning method, system, electronic device and storage medium

CN116860162BActive Publication Date: 2026-08-28BEIJING 58 INFORMATION TTECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310714681.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2026-08-28
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

[0004]然而,由于用户发起数据清理操作的时机具有不确定性,因此,一般由用户发起的数据清理操作不能把缓存数据清理干净

Benefits of technology

[0017] This application also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the above-described sandbox-based data cleanup method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116860162B_ABST
    Figure CN116860162B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a sandbox-based data cleaning method and system, electronic equipment and storage medium, and relates to the technical field of computers. The method is applied to a set application program in a user terminal, the set application program is in communication connection with a target application program running in a sandbox mechanism, and the method comprises the following steps: establishing a communication connection with a server; receiving a data cleaning instruction sent by the server, wherein the data cleaning instruction comprises the identification of the target application program and a to-be-cleaned data storage path, wherein the server sends the data cleaning instruction based on the cache data amount under each data storage path in the sandbox corresponding to the target application program acquired in real time; and sending the data cleaning instruction to the target application program based on the identification of the target application program, so that the target application program cleans the cache data under the to-be-cleaned data storage path. The application does not need the user to manually initiate the data cleaning instruction, and the cleaning efficiency and accuracy are relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a sandbox-based data cleaning method, system, electronic device, and storage medium. Background Technology

[0002] With the widespread use of terminal devices (such as mobile phones, laptops, and tablets), the number of applications installed on these devices is increasing. Taking terminal devices running the iOS system as an example, iOS employs a sandbox mechanism. This means that applications installed on iOS can only read and write files within the file system created for that application and cannot access other file systems. This file system is the sandbox, and all non-code files (such as images, audio, configuration files, and text files) are stored within it. In simpler terms, each application has its own storage space, and it cannot bypass its own firewall to access the storage space of other applications. It's important to note that applications, during installation and runtime on terminal devices, typically generate data stored in the sandbox (also known as cached data) to improve application performance or enable certain functionalities. If this cached data is not cleaned up promptly, it will consume a significant amount of storage space on the terminal device, affecting its normal operation. Therefore, timely and effective cleanup of cached data is crucial.

[0003] Currently, methods for cleaning up data within the sandbox generally include: users can click the data cleanup button related to the target application on their terminal device to initiate a cleanup instruction, which will enable simple cleanup of the data within the sandbox.

[0004] However, since the timing of user-initiated data cleanup operations is uncertain, user-initiated data cleanup operations generally cannot completely clear cached data. Summary of the Invention

[0005] This application provides a sandbox-based data cleaning method, system, electronic device, and storage medium that eliminates the need for users to manually initiate data cleaning commands, resulting in high cleaning efficiency and accuracy.

[0006] This application provides a sandbox-based data cleanup method applied to a designated application in a user terminal. The designated application communicates with a target application running using a sandbox mechanism. The method includes: establishing a communication connection with a server; receiving a data cleanup instruction sent by the server, the data cleanup instruction including the identifier of the target application and the data storage path to be cleaned, wherein the server issues the data cleanup instruction based on the amount of cached data under each data storage path in the sandbox corresponding to the target application, which is obtained in real time; and sending the data cleanup instruction to the target application based on the identifier of the target application, so that the target application cleans up the cached data under the data storage path to be cleaned.

[0007] In an optional embodiment, the setting application and the target application communicate via a software development kit (SDK), wherein the SDK is integrated into the target application.

[0008] In an optional embodiment, the method further includes: receiving the cached data volume under each data storage path in the sandbox corresponding to the target application; wherein the cached data volume under each data storage path in the sandbox is detected by the SDK in real time; and sending the cached data volume under each data storage path in the sandbox and the identifier of the target application to the server.

[0009] In an optional embodiment, the step of establishing a communication connection between the setting application and the target application includes: receiving a communication identification code sent by the target application; if the communication identification code is identified as a preset identification code for establishing a communication connection, then returning a receipt identification code corresponding to the communication identification code to the target application to establish a communication connection between the setting application and the target application.

[0010] In an optional embodiment, the method further includes: receiving data cleanup result information sent by the target application; and sending the data cleanup result information to the server.

[0011] This application also provides a sandbox-based data cleanup method, applied to a target application running in a user terminal using a sandbox mechanism. The target application is communicatively connected to a designated application in the user terminal. The method includes: receiving a data cleanup instruction sent by the designated application, the data cleanup instruction including an identifier of the target application and a data storage path to be cleaned, wherein the data cleanup instruction is issued by the server to the designated application based on the amount of cached data under each data storage path in the sandbox corresponding to the target application obtained in real time; and cleaning up the cached data under the data storage path to be cleaned.

[0012] In an optional embodiment, the setting application and the target application communicate via a software development kit (SDK), wherein the SDK is integrated into the target application.

[0013] In an optional embodiment, the method further includes: detecting the amount of cached data under each data storage path in the sandbox corresponding to the target application in real time through the SDK; sending the amount of cached data under each data storage path in the sandbox to the designated application, so that the designated application sends the amount of cached data under each data storage path in the sandbox and the identifier of the target application to the server.

[0014] This application also provides a sandbox-based data cleanup method applied to a server. The method includes: establishing a communication connection between a user terminal and a designated application, the user terminal including the designated application and a target application running using a sandbox mechanism, the target application communicating with the designated application; real-time acquisition of the cached data volume under each data storage path in the sandbox corresponding to the target application; and sending a data cleanup instruction to the designated application based on the cached data volume under each data storage path in the sandbox corresponding to the target application, the data cleanup instruction including the identifier of the target application and the data storage path to be cleaned, so that the designated application sends the data cleanup instruction to the target application, causing the target application to clean up the cached data under the data storage path to be cleaned.

[0015] In an optional embodiment, the real-time acquisition of the cached data volume under each data storage path in the sandbox corresponding to the target application includes: receiving the cached data volume under each data storage path in the sandbox corresponding to the target application forwarded in real time by the designated application, wherein the cached data volume under each data storage path in the sandbox is detected in real time by the software development kit (SDK) integrated in the target application, and the designated application and the target application communicate with each other through the SDK.

[0016] This application also provides a sandbox-based data cleanup system, comprising: a server, a designated application in a user terminal, and a target application running using a sandbox mechanism, wherein the designated application is communicatively connected to both the server and the target application; the server is configured to establish a communication connection with the designated application in the user terminal, obtain in real time the amount of cached data under each data storage path in the sandbox corresponding to the target application, and send a data cleanup instruction to the designated application based on the amount of cached data under each data storage path in the sandbox corresponding to the target application; the designated application is configured to receive the data cleanup instruction sent by the server and send the data cleanup instruction to the target application; the target application is configured to receive the data cleanup instruction sent by the designated application and clean up the cached data under the data storage path to be cleaned, wherein the data cleanup instruction includes the identifier of the target application and the data storage path to be cleaned.

[0017] This application also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the above-described sandbox-based data cleanup method.

[0018] This application also provides a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by the processor of an electronic device, enables the electronic device to perform the above-described sandbox-based data cleanup method.

[0019] In this embodiment, by enabling the designated application to establish a communication connection with the server and receive data cleanup instructions issued by the server based on the amount of cached data under each data storage path in the sandbox corresponding to the target application obtained in real time, and then sending the data cleanup instructions to the target application based on the identifier of the target application, the target application can clean up the cached data under the data storage path to be cleaned. That is, this application does not require manual initiation by the user. The server can automatically clean up the cached data according to the amount of cached data under each data storage path in the sandbox corresponding to the target application obtained in real time, with high cleanup efficiency and accuracy. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0021] Figure 1 A flowchart of a sandbox-based data cleaning method provided in this application embodiment;

[0022] Figure 2 A flowchart illustrating another sandbox-based data cleaning method provided in this application embodiment;

[0023] Figure 3 A flowchart illustrating yet another sandbox-based data cleaning method provided in this application embodiment;

[0024] Figure 4 This is a schematic diagram of the structure of a sandbox-based data cleaning system provided in an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0027] With the widespread use of terminal devices (such as mobile phones, laptops, and tablets), the number of applications installed on these devices is increasing. Taking a terminal device running iOS as an example, iOS employs a sandbox mechanism. This means that applications installed on iOS can only read and write files within the file system created for that application; they cannot access other file systems. This file system is the sandbox, and all non-code files (such as images, audio, configuration files, and text files) are stored within it. In simpler terms, each application has its own storage space, and it cannot bypass its own firewall to access the storage space of other applications. It's important to note that applications, during installation and runtime on terminal devices, typically generate data (also known as cached data) stored in the sandbox to improve application performance or enable certain functions. If this cached data is not cleaned up in a timely manner, it will occupy a significant amount of storage space on the terminal device, affecting its normal operation. Therefore, timely and effective cleanup of cached data is crucial. To address the problem that existing user-initiated data cleanup operations cannot completely remove cached data, this application provides a sandbox-based data cleanup method.

[0028] Figure 1 This is a flowchart illustrating a sandbox-based data cleanup method provided in an embodiment of this application. The method is applied to a designated application in a user terminal, which communicates with a target application running using a sandbox mechanism. Figure 1 As shown, the method includes:

[0029] Step 101: Establish a communication connection with the server.

[0030] Step 102: Receive the data cleanup command sent by the server. The data cleanup command includes the identifier of the target application and the data storage path to be cleaned. The server issues the data cleanup command based on the amount of cached data under each data storage path in the sandbox corresponding to the target application, which is obtained in real time.

[0031] Step 103: Based on the target application's identifier, send a data cleanup command to the target application so that the target application can clean up the cached data in the data storage path to be cleaned.

[0032] In practical applications, since a communication connection is pre-established between the pre-configured application on the user terminal and the target application running under a sandbox mechanism, this application establishes a communication connection between the pre-configured application and the server to ensure that subsequent data cleanup commands from the server can be successfully sent to the target application. The pre-configured application can be understood as an application or service that runs continuously on the user terminal, capable of establishing a long-term connection with the server and receiving and sending commands. The target application can be any third-party application installed on the user terminal, such as WeChat, QQ, etc., which are not listed here.

[0033] In practice, the server continuously monitors the cached data volume in each data storage path within the sandbox corresponding to the target application. Based on this volume, the server sends a data cleanup command to the designated application. This command includes the target application's identifier and the data storage path to be cleaned. The designated application identifies the target application based on its identifier and sends the data cleanup command to it, thus enabling the target application to clean up the cached data in the data storage path to be cleaned.

[0034] It should be noted that, since the server and the designated application may communicate via a first data protocol, while the designated application and the target application may communicate via a second data protocol, and these two protocols differ, directly sending the data cleanup command to the target application might result in the target application being unable to recognize the command. Therefore, in this application, after receiving the data cleanup command from the server, the designated application performs format conversion and encapsulation of the data in the command. Once the target application receives the command, it then parses the converted and encapsulated command to obtain the cached data under the data storage path to be cleaned.

[0035] Furthermore, since the sandboxes for each app are isolated within the iOS system, and external systems cannot access the sandbox assigned to the current app, this application establishes data communication between the setting application and the target application via a Software Development Kit (SDK), where the SDK is integrated into the target application. In practice, the setting application and the SDK work together. Specifically, because certain mechanisms within the SDK can interact with the setting application, the setting application can control and clean up the target application's sandbox files. That is, the setting application sends a data cleanup command to the SDK, and upon receiving the command, the SDK directly executes the data cleanup operation.

[0036] In this embodiment, the step of setting up the application and establishing a communication connection between the application and the target application includes: receiving a communication identification code sent by the target application; if the communication identification code is identified as a preset identification code used to establish a communication connection, then returning a receipt identification code corresponding to the communication identification code to the target application to establish a communication connection between the application and the target application.

[0037] In practice, both the application and the target application have UDP ports configured. When the user terminal starts the target application, it generates a unique communication identifier to establish a communication connection and broadcasts this identifier. When the application's UDP port detects this unique identifier, it can determine that the application is attempting to establish a connection. The application then sends a receipt identifier to the target application, corresponding to the original communication identifier. At this point, the target application's UDP port is also listening. Upon receiving the receipt identifier, the application and target application successfully establish a communication connection.

[0038] The sandbox-based data cleanup method provided in this application establishes a communication connection between a designated application and a server, and receives a data cleanup command issued by the server based on the amount of cached data in each data storage path of the sandbox corresponding to the target application obtained in real time. Then, based on the identifier of the target application, the data cleanup command is sent to the target application, so that the target application can clean up the cached data in the data storage path to be cleaned. That is, this application does not require the user to manually initiate a data cleanup command. The server can automatically clean up the cached data according to the amount of cached data in each data storage path of the sandbox corresponding to the target application obtained in real time. The cleanup efficiency and accuracy are high.

[0039] In this embodiment of the application, the method further includes: receiving the cached data volume under each data storage path in the sandbox corresponding to the target application; wherein the cached data volume under each data storage path in the sandbox is detected by the SDK in real time; and sending the cached data volume under each data storage path in the sandbox and the identifier of the target application to the server.

[0040] In practical applications, the target application can periodically or in real time obtain the amount of cached data under each data storage path in the sandbox and send the amount of cached data to the designated application. The designated application then sends the amount of cached data to the server for reference by the developers or the server, and the server then issues more precise data cleanup instructions.

[0041] Specifically, as one implementation method, after the server receives the amount of cached data under each data storage path in the sandbox sent by the target application, it can compare the amount of cached data under each data storage path with a pre-set threshold. If the amount of cached data under a certain data storage path is greater than the pre-set threshold, the server directly sends a data cleanup command to the designated application, thereby cleaning up the cached data under that data storage path.

[0042] As another implementation, after the server receives the amount of cached data under each data storage path in the sandbox sent by the target application, the developers can compare the amount of cached data under each data storage path with the empirical value or the preset threshold. If the amount of cached data under a certain data storage path is greater than the empirical value or the preset threshold, the developers control the server to issue a data cleanup command to the designated application, thereby cleaning up the cached data under that data storage path.

[0043] It should be noted that the setting application in this application can uniformly receive and send commands to multiple applications to realize multi-application group control scenarios. Specifically, for example, the setting application receives the cached data volume under each data storage path from multiple target applications. The server can issue different data cleanup instructions to different target applications through the setting application based on the cached data volume under each data storage path of each target application. Since the data cleanup instructions contain the identifier of the target application, the data cleanup instructions can be accurately sent to each target application.

[0044] In this embodiment of the application, in order to facilitate developers to accurately understand the cleanup results of the target application, the method further includes: receiving data cleanup result information sent by the target application; and sending the data cleanup result information to the server.

[0045] For example, regarding data cleanup results, if the amount of cached data under the current data storage path in the sandbox does not reach the threshold, the data cleanup result will be "not cleaned" with the reason for not cleaning (e.g., the amount of cached data does not reach the threshold); if the amount of cached data under the current data storage path in the sandbox exceeds the threshold, the data cleanup result will be "cleaned" with the reason for cleaning (e.g., the amount of cached data exceeds the threshold).

[0046] In summary, the sandbox-based data cleanup method provided in this application can clean up cached data in the sandbox in real time, offering strong real-time performance. Furthermore, it can clean up data without affecting the functionality of the target application. Specifically, users can manually view the cached data under each data storage path in the sandbox and clean up cached data corresponding to unused functions based on their current usage of the target application. In addition, this application supports unified integration of multiple target applications on the same user terminal without requiring additional API interfaces for the target applications, thus improving work efficiency. By monitoring the amount of cached data from multiple target applications on the same user terminal, timely cleanup and early warning can be achieved.

[0047] Figure 2 Another sandbox-based data cleanup method provided in this application embodiment is applied to a target application running in a user terminal using a sandbox mechanism. The target application communicates with a designated application in the user terminal, such as... Figure 2 As shown, the method includes:

[0048] Step 201: Receive a data cleanup command sent by the designated application. The data cleanup command includes the identifier of the target application and the data storage path to be cleaned. The data cleanup command is sent by the server to the designated application based on the amount of cached data in each data storage path in the sandbox corresponding to the target application obtained in real time.

[0049] Step 202: Clean up the cached data in the data storage path to be cleaned.

[0050] The server continuously monitors the cached data volume in each data storage path within the sandbox corresponding to the target application. Based on this volume, it sends a data cleanup command to the designated application. This command includes the target application's identifier and the data storage path to be cleaned. The designated application identifies the target application based on its identifier and sends the data cleanup command to it, thus enabling the target application to clean up the cached data in the data storage path to be cleaned.

[0051] It should be noted that, since the server and the designated application may communicate via a first data protocol, while the designated application and the target application may communicate via a second data protocol, and these two protocols differ, directly sending the data cleanup command to the target application might result in the target application being unable to recognize the command. Therefore, in this application, after receiving the data cleanup command from the server, the designated application performs format conversion and encapsulation of the data in the command. Once the target application receives the command, it then parses the converted and encapsulated command to obtain the cached data under the data storage path to be cleaned.

[0052] Furthermore, since the sandboxes for each app are isolated in iOS, and external systems cannot access the sandbox assigned to the current app, this application establishes data communication between the setting application and the target application through a Software Development Kit (SDK), with the SDK integrated into the target application. In practice, the setting application and the SDK work together. Specifically, because certain mechanisms in the SDK can interact with the setting application, the setting application can control and clean up the target application's sandbox files. That is, the setting application sends a data cleanup command to the SDK, and upon receiving the command, the SDK directly performs the data cleanup.

[0053] The sandbox-based data cleanup method provided in this application receives a data cleanup command sent by the server to the designated application based on the amount of cached data in each data storage path of the sandbox corresponding to the target application obtained in real time. Based on the data cleanup command, the cached data in the data storage path to be cleaned can be cleaned up. That is, this application does not require the user to manually initiate a data cleanup command. The server can automatically clean up the cached data according to the amount of cached data in each data storage path of the sandbox corresponding to the target application obtained in real time. The cleanup efficiency and accuracy are high.

[0054] In this embodiment of the application, the sandbox-based data cleanup method further includes: real-time detection of the amount of cached data under each data storage path in the sandbox corresponding to the target application using an SDK; sending the amount of cached data under each data storage path in the sandbox to a designated application, so that the designated application sends the amount of cached data under each data storage path in the sandbox and the identifier of the target application to the server.

[0055] In practical applications, the target application can periodically or in real time obtain the amount of cached data under each data storage path in the sandbox and send the amount of cached data to the designated application. The designated application then sends the amount of cached data to the server for reference by developers or the server, thereby enabling the server to issue more accurate data cleanup commands.

[0056] Specifically, as one implementation method, after the server receives the amount of cached data under each data storage path in the sandbox sent by the target application, it can compare the amount of cached data under each data storage path with a pre-set threshold. If the amount of cached data under a certain data storage path is greater than the pre-set threshold, the server directly sends a data cleanup command to the designated application, thereby cleaning up the cached data under that data storage path.

[0057] As another implementation, after the server receives the amount of cached data under each data storage path in the sandbox sent by the target application, the developers can compare the amount of cached data under each data storage path with the empirical value or the preset threshold. If the amount of cached data under a certain data storage path is greater than the empirical value or the preset threshold, the developers control the server to issue a data cleanup command to the designated application, thereby cleaning up the cached data under that data storage path.

[0058] Figure 3 This application provides another sandbox-based data cleaning method, which is applied to a server, such as... Figure 3 As shown, the method includes:

[0059] Step 301: Establish a communication connection between the target application and the specified application in the user terminal. The user terminal includes the specified application and the target application running in a sandbox mechanism. The target application communicates with the specified application.

[0060] Step 302: Obtain the amount of cached data under each data storage path in the sandbox corresponding to the target application in real time.

[0061] Step 303: Based on the amount of cached data under each data storage path in the sandbox corresponding to the target application, send a data cleanup command to the designated application. The data cleanup command includes the identifier of the target application and the data storage path to be cleaned, so that the designated application sends the data cleanup command to the target application, causing the target application to clean up the cached data under the data storage path to be cleaned.

[0062] In practice, the server first establishes a communication connection with the designated application on the user terminal and obtains the amount of cached data under each data storage path in the sandbox corresponding to the target application in real time. Then, based on the amount of cached data under each data storage path in the sandbox, it sends a data cleanup command to the designated application. This data cleanup command includes the identifier of the target application and the data storage path to be cleaned. The designated application identifies the target application based on the identifier and sends the data cleanup command to the target application, thereby enabling the target application to clean up the cached data under the data storage path to be cleaned.

[0063] It should be noted that, since the server and the designated application may communicate via a first data protocol, while the designated application and the target application may communicate via a second data protocol, and these two protocols differ, directly sending the data cleanup command to the target application might result in the target application being unable to recognize the command. Therefore, in this application, after receiving the data cleanup command from the server, the designated application performs format conversion and encapsulation of the data in the command. Once the target application receives the command, it then parses the converted and encapsulated command to obtain the cached data under the data storage path to be cleaned.

[0064] The sandbox-based data cleanup method provided in this application establishes a communication connection with a designated application on the user terminal, obtains the amount of cached data in each data storage path of the sandbox corresponding to the target application in real time, and then sends a data cleanup command to the designated application based on the amount of cached data in each data storage path of the sandbox corresponding to the target application. This allows the designated application to send the data cleanup command to the target application, thereby completing the cleanup of cached data in the data storage paths of the target application based on the data cleanup command. In other words, this application eliminates the need for the user to manually initiate a data cleanup command; the server automatically cleans the cached data based on the real-time obtained amount of cached data in each data storage path of the sandbox corresponding to the target application, resulting in high cleanup efficiency and accuracy.

[0065] In this embodiment of the application, the real-time acquisition of the cached data volume under each data storage path in the sandbox corresponding to the target application includes: receiving the cached data volume under each data storage path in the sandbox corresponding to the target application forwarded in real time by the set application, wherein the cached data volume under each data storage path in the sandbox is detected in real time by the software development kit (SDK) integrated in the target application, and the set application and the target application communicate data through the SDK.

[0066] In practical applications, because the sandboxes corresponding to each app are isolated from each other in the iOS system, and external access is not possible to the sandbox assigned to the current app by the system, this application sets up data communication between the application and the target application through a Software Development Kit (SDK), wherein the SDK is integrated into the target application. In specific implementation, the application and the SDK are used together. Specifically, since certain mechanisms in the SDK can interact with the application, the application can control and clean up the sandbox files of the target application. That is, the application sends a data cleanup command to the SDK, and after receiving the data cleanup command, the SDK directly performs data cleanup.

[0067] In practice, the target application can periodically or in real time obtain the amount of cached data under each data storage path in the sandbox and send the amount of cached data to the designated application. The designated application then sends the amount of cached data to the server, so that the server receives the amount of cached data under each data storage path in the sandbox corresponding to the target application, which is forwarded in real time by the designated application.

[0068] After the server receives the amount of cached data in each data storage path of the sandbox corresponding to the target application, it can issue a data cleanup command based on the amount of cached data.

[0069] Specifically, as one implementation method, after the server receives the amount of cached data under each data storage path in the sandbox sent by the target application, it can compare the amount of cached data under each data storage path with a pre-set threshold. If the amount of cached data under a certain data storage path is greater than the pre-set threshold, the server directly sends a data cleanup command to the designated application, thereby cleaning up the cached data under that data storage path.

[0070] As another implementation, after the server receives the amount of cached data under each data storage path in the sandbox sent by the target application, the developers can compare the amount of cached data under each data storage path with the empirical value or the preset threshold. If the amount of cached data under a certain data storage path is greater than the empirical value or the preset threshold, the developers control the server to issue a data cleanup command to the designated application, thereby cleaning up the cached data under that data storage path.

[0071] It should be noted that the setting application in this application can uniformly receive and send commands to multiple applications to realize multi-application group control scenarios. Specifically, for example, the setting application receives the cached data volume under each data storage path from multiple target applications. The server can issue different data cleanup instructions to different target applications through the setting application based on the cached data volume under each data storage path of each target application. Since the data cleanup instructions contain the identifier of the target application, the data cleanup instructions can be accurately sent to each target application.

[0072] Figure 4 This is a schematic diagram of the structure of the sandbox-based data cleaning system provided in the embodiments of this application, as shown below. Figure 4 As shown, the system includes: a server 401, a setting application 4021 in a user terminal 402, and a target application 4022 running with a sandbox mechanism, wherein the setting application 4021 is communicatively connected to the server 401 and the target application 4022 respectively.

[0073] Server 401 is used to establish a communication connection with the application 4021 set in the user terminal 402, obtain the amount of cached data under each data storage path in the sandbox corresponding to the target application 4022 in real time, and send a data cleanup command to the application 4021 according to the amount of cached data under each data storage path in the sandbox corresponding to the target application 4022.

[0074] Application 4021 is configured to receive data cleanup instructions sent by server 401 and send the data cleanup instructions to target application 4022.

[0075] The target application 4022 is used to receive a data cleanup command sent by the setting application 4021 and clean up the cached data under the data storage path to be cleaned. The data cleanup command includes the identifier of the target application 4022 and the data storage path to be cleaned.

[0076] The sandbox-based data cleanup system provided in this application embodiment configures a server 401, a designated application 4021 in a user terminal 402, and a target application 4022 running using a sandbox mechanism, and establishes communication connections between the designated application 4021 and both the server 401 and the target application 4022. The server 401 establishes a communication connection with the designated application 4021 in the user terminal 402, and obtains the amount of cached data in each data storage path of the sandbox corresponding to the target application 4022 in real time. Based on the amount of cached data in each data storage path of the sandbox corresponding to the target application 4022, the server 401 sends a data cleanup command to the designated application 4021. After receiving the data cleanup command from the server 401, the designated application 4021 forwards the command to the target application 4022. Upon receiving the data cleanup command from the designated application 4021, the target application 4022 cleans up the cached data in the data storage path to be cleaned. In other words, this application does not require manual initiation by the user. The server 401 can automatically clean up the cached data based on the amount of cached data under each data storage path in the sandbox corresponding to the target application 4022 obtained in real time. The cleaning efficiency and accuracy are high.

[0077] This application also provides an electronic device, which can be a desktop computer, laptop computer, tablet computer, smartphone, digital assistant, smart wearable device, shopping guide terminal, smart TV, etc. Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 5 As shown, the electronic device includes a processor 51 and a memory 52 storing a computer program; wherein the processor 51 and the memory 52 may be one or more.

[0078] Memory 52 is primarily used to store computer programs that can be executed by processor 51, causing processor 51 to control the electronic device to perform corresponding functions, actions, or tasks. In addition to storing computer programs, memory 52 can also be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device.

[0079] The memory 52 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0080] In this embodiment, the implementation of processor 51 is not limited; it may be, for example, but not limited to, a CPU, GPU, or MCU. Processor 51 can be considered a control system for an electronic device, capable of executing computer programs stored in memory 52 to control the electronic device to perform corresponding functions, actions, or tasks. It is worth noting that, depending on the implementation of the electronic device and the context in which it operates, the required functions, actions, or tasks may differ; correspondingly, the computer programs stored in memory 52 will also differ, and processor 51 can control the electronic device to perform different functions and complete different actions or tasks by executing different computer programs.

[0081] In some alternative embodiments, such as Figure 5 As shown, the electronic device may also include other components such as a display 53, a power supply component 54, and a communication component 55. Figure 5 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 5 The components shown are optional. Electronic devices may also include other components to meet different application needs; for example, in cases where voice interaction is required, such as... Figure 5 As shown, the electronic device may also include an audio component 56. The specific components that an electronic device may include depend on the product form of the electronic device and are not limited here.

[0082] Display 53 is used to display a UI (User Interface). This UI may include images, text, icons, videos, and any combination thereof. When display 53 is a touch screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 51 for processing. Display 53 can also provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display 53, serving as the front panel of the electronic device; in other embodiments, there may be at least two displays 53, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, display 53 may be a flexible display, disposed on a curved or folded surface of the electronic device. Furthermore, display 53 may be configured as a non-rectangular, irregularly shaped image, i.e., a non-rectangular screen. Display 53 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0083] The power supply assembly 54 is used to power various components in the electronic device. The power supply assembly 54 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When the power supply assembly 54 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0084] Communication component 55 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. Communication component 55 communicates with communication networks and other communication devices via electromagnetic signals. Communication component 55 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, communication component 55 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. Communication component 55 can communicate with other terminals via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 1104 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0085] Audio component 56 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and environment, converting them into electrical signals that are input to processor 51 for processing, or to communication component 55 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned in a different part of the electronic device. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from processor 51 or communication component 55 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, audio component 56 may also include a headphone jack.

[0086] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be performed by an electronic device in the above method embodiments.

[0087] The communication components in the above embodiments are configured to facilitate wired or wireless communication between the device housing the communication component and other devices. The device housing the communication component can access wireless networks based on communication standards, such as Wi-Fi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IRDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0088] The display in the above embodiments includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of the touch or swipe action, but also the duration and pressure associated with the touch or swipe operation.

[0089] The power supply component in the above embodiments provides power to various components of the device in which the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.

[0090] The audio component in the above embodiments can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0095] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0096] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0097] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0098] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0099] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A sandbox-based data cleaning method, characterized in that, A configuration application applied to a user terminal, the configuration application communicating with a target application running under a sandbox mechanism, the method comprising: Establish a communication connection with the server; The server receives a data cleanup instruction, which includes the identifier of the target application and the data storage path to be cleaned. The server issues the data cleanup instruction based on the amount of cached data under each data storage path in the sandbox corresponding to the target application, which is obtained in real time. Based on the identifier of the target application, the data cleanup instruction is sent to the target application so that the target application can clean up the cached data under the data storage path to be cleaned.

2. The method according to claim 1, characterized in that, The specified application and the target application communicate via a software development kit (SDK), wherein the SDK is integrated into the target application.

3. The method according to claim 2, characterized in that, The method further includes: The SDK receives the cached data volume under each data storage path in the sandbox corresponding to the target application, wherein the cached data volume under each data storage path in the sandbox is detected by the SDK in real time. The cached data volume under each data storage path in the sandbox and the identifier of the target application are sent to the server.

4. The method according to any one of claims 1 to 3, characterized in that, The steps for establishing a communication connection between the specified application and the target application include: Receive the communication identification code sent by the target application; If the communication identifier is identified as a preset identifier for establishing a communication connection, a receipt identifier corresponding to the communication identifier is returned to the target application to establish a communication connection between the specified application and the target application.

5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Receive data cleanup result information sent by the target application; The data cleaning results are sent to the server.

6. A sandbox-based data cleaning method, characterized in that, The method, applied to a target application running in a sandbox mechanism on a user terminal, wherein the target application communicates with a designated application on the user terminal, includes: The system receives a data cleanup instruction sent by the specified application. The data cleanup instruction includes the identifier of the target application and the data storage path to be cleaned. The data cleanup instruction is sent by the server to the specified application based on the amount of cached data under each data storage path in the sandbox corresponding to the target application, which is obtained in real time. Clean up the cached data in the data storage path to be cleaned.

7. The method according to claim 6, characterized in that, The specified application and the target application communicate via a software development kit (SDK), wherein the SDK is integrated into the target application.

8. The method according to claim 7, characterized in that, The method further includes: The SDK is used to detect the amount of cached data in each data storage path of the sandbox corresponding to the target application in real time. The cached data volume under each data storage path in the sandbox is sent to the designated application, so that the designated application sends the cached data volume under each data storage path in the sandbox and the identifier of the target application to the server.

9. A sandbox-based data cleaning method, characterized in that, Applied to a server, the method includes: Establish a communication connection between the user terminal and a specified application, wherein the user terminal includes the specified application and a target application running in a sandbox mechanism, and the target application communicates with the specified application. Real-time acquisition of cached data volume under each data storage path in the sandbox corresponding to the target application; Based on the amount of cached data under each data storage path in the sandbox corresponding to the target application, a data cleanup instruction is sent to the designated application. The data cleanup instruction includes the identifier of the target application and the data storage path to be cleaned, so that the designated application sends the data cleanup instruction to the target application, causing the target application to clean up the cached data under the data storage path to be cleaned.

10. The method according to claim 9, characterized in that, The real-time acquisition of the cached data volume under each data storage path in the sandbox corresponding to the target application includes: The set application receives the cached data volume under each data storage path in the sandbox corresponding to the target application, which is forwarded in real time by the set application. The cached data volume under each data storage path in the sandbox is detected in real time by the software development kit (SDK) integrated in the target application. The set application and the target application communicate with each other through the SDK.

11. A sandbox-based data cleaning system, characterized in that, include: The configuration application in the server and the target application running in a sandbox mechanism, wherein the configuration application is communicatively connected to the server and the target application respectively; The server is used to establish a communication connection with a specified application in the user terminal, obtain the amount of cached data under each data storage path in the sandbox corresponding to the target application in real time, and send a data cleanup command to the specified application according to the amount of cached data under each data storage path in the sandbox corresponding to the target application. The specified application is used to receive data cleanup instructions sent by the server and send the data cleanup instructions to the target application; The target application is used to receive a data cleanup instruction sent by the designated application and clean up cached data under the data storage path to be cleaned. The data cleanup instruction includes the identifier of the target application and the data storage path to be cleaned.

12. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the sandbox-based data cleaning method as described in any one of claims 1-5, 6-8, or 9-10.

13. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the sandbox-based data cleaning method as described in any one of claims 1-5, 6-8, or 9-10.

Citation Information

Patent Citations

  • Application cache cleaning method and device, storage medium and terminal

    CN108920271A

  • Application program data processing method and device

    CN112817923A