Sandbox data processing method, and electronic device
By retaining sandbox data according to its retention policy when the sandbox application exits, the problem of sandbox data loss is solved, and the user status recovery and user experience improvement is achieved.
Patent Information
- Application Number
- PCT/CN2024/096198
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-05
- Filing Date
- 2024-05-29
- Publication Date
- 2025-03-13
AI Technical Summary
There is a problem of sandbox data loss in existing sandbox technology, especially when the sandbox application exits, sandbox data that has not fallen out of disk is easily lost.
Provides a sandbox data processing method, which runs a sandbox application by detecting user access operations to encrypted objects, and retains sandbox data according to its retention policy when the application exits, including accessing generated data, application information and sandbox environment.
It effectively solves the problem of sandbox data loss, ensuring that users can return to their previous operating state after the sandbox application exits, improving user experience and reducing overhead for electronic devices.
Smart Images

Figure CN2024096198_13032025_PF_FP_ABST
Abstract
Description
Sandbox data processing method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 5, 2023, with application number 202311140379.1 and application name “Sandbox Data Processing Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a sandbox data processing method and electronic equipment. Background Art
[0003] In the field of computer security, a sandbox is a security mechanism that provides an isolated environment for programs running on a device. Sandboxes ensure system security by strictly controlling the resources used by executing programs (including but not limited to files, networks, hardware, and other types of resources). Therefore, sandbox technology can effectively prevent the impact of malicious program behavior on system security. However, current sandbox technology suffers from the problem of sandbox data loss.
[0004] Summary of the Invention
[0005] The present application provides a sandbox data processing method and electronic device, which can retain sandbox data when a sandbox application exits, thereby solving the problem of sandbox data loss.
[0006] To achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, a sandbox data processing method is provided, which is applied to an electronic device. The method comprises: detecting a user access operation to a first object included in the electronic device, where the first object is an encrypted object; in response to the access operation, running a first application, where the first application is a sandbox application and is used to access the first object; and determining that the first application has exited, retaining first data according to the retention policy of the first application, where the first data includes data generated when the first object is accessed by the first application. Optionally, the first data may include various data such as the first application, information such as the first application's installation path and permission configuration, user edits to the first object, and the sandbox environment on which the first application depends.
[0008] Based on the above technical solution, when a user accesses an encrypted object on an electronic device, the electronic device can run a corresponding sandbox application to access the encrypted object. When the sandbox application exits, first data can be retained based on the sandbox application's retention policy. The first data is the data generated when the sandbox application accesses the encrypted object, i.e., the sandbox data. This allows the sandbox data to be retained when the sandbox application exits, resolving the issue of sandbox data loss. It should be understood that this method can be applied to scenarios such as enterprise or campus LANs. For example, an enterprise employee can access an encrypted file sent by another employee within the LAN. By creating an application clone, the encrypted file can be opened separately, ensuring data security. In everyday office scenarios, this method can also be used to open encrypted files on different devices with the same or different systems supporting each other. For example, computer A encrypts file B and sends it to computer C or mobile phone D. Computer C or mobile phone D can then open file B based on this solution. The systems of computers A and C can be the same or different. Mobile phone B's system can be connected to the systems of computer A or C, for example, by using or adding the same or similar underlying architecture to support the implementation of this method.
[0009] In one possible design, the retention policy of the first application is used to indicate that the first data should be retained when the first application exits. Based on this design, the sandbox application has its own retention policy, which is used to indicate that the sandbox application should retain its own sandbox data when it exits. This allows electronic devices to retain corresponding sandbox data based on the policies of each sandbox application, and the sandbox application determines its own life cycle. Compared with the method of uniformly managing the life cycle of the sandbox application by the electronic device system, this method not only solves the problem of sandbox data loss, but also improves the flexibility of sandbox lifecycle management and enhances user experience.
[0010] In one possible design, the retention policy of the first application is used to indicate that the first data is retained when the first application exits and the first data has not been written to the disk; before retaining the first data according to the retention policy of the first application, the method further includes: determining that the first data has not been written to the disk. Based on this design, the retention policy of the sandbox application indicates that the sandbox data is retained when the sandbox application exits and the sandbox data has not been saved to the disk. In this way, since the sandbox data has not been saved to the disk, the operations performed by the user on the objects managed by the sandbox mechanism in the sandbox application have not yet taken effect. When the sandbox application exits, the sandbox data is retained, so that when the user starts the sandbox application again to operate the objects managed by the sandbox mechanism, the state before the sandbox application exits can be restored, so that the user can continue to operate the objects managed by the sandbox mechanism based on the previous operation state, thereby ensuring user experience.
[0011] In one possible design, after retaining the first data according to the retention policy of the first application, the method further includes: generating a sandbox retention record, wherein the sandbox retention record includes a first startup parameter and an identifier of the first data, wherein the first startup parameter is used to indicate access to the first object through the first application. Based on this design, after the device retains the sandbox data, it generates a corresponding sandbox retention record, wherein the sandbox retention record includes the startup parameter and the identifier of the sandbox data. Then, when accessing a certain encrypted object through the sandbox application according to the startup parameter, the sandbox data can be obtained through the identifier of the sandbox data in the sandbox retention record. In this way, not only can the state before the sandbox application exits when the user restarts the sandbox application to operate the object managed by the sandbox mechanism, the user can continue to operate the object managed by the sandbox mechanism based on the previous operation state, but it can also avoid recreating the sandbox application, thereby reducing the overhead of the electronic device.
[0012] In one possible design, the method further includes: obtaining a first startup parameter; obtaining the first data based on the first startup parameter and the sandbox retention record; and starting the first application to access the first object based on the first data. Based on this design, when the electronic device obtains the startup parameter, it can obtain the sandbox data based on the startup parameter and the sandbox retention record, and then directly start the corresponding sandbox application through the sandbox data to access the corresponding encrypted object. This allows the user to restore the state before the sandbox application exits when starting the sandbox application again to operate on the object managed by the sandbox mechanism. The user can continue to operate on the object managed by the sandbox mechanism based on the previous operating state, and can also avoid recreating the sandbox application, thereby reducing the overhead of the electronic device.
[0013] In one possible design, the response to the access operation and the running of the first application include: installing the first application according to the target application installed on the electronic device, the first application being a clone of the target application, the first application having fewer permissions than the target application; and running the first application through a sandbox. Based on this design, a sandbox application is created based on an application already installed in the electronic device, that is, a clone of the application is created, and the permissions of the sandbox application are fewer than those of the installed application. In this way, running the sandbox application to access the encrypted object can implement permission management of the encrypted object and ensure the security of the encrypted object.
[0014] In one possible design, before the first application in the sandbox exits, the method further includes: determining that no user operation instructing the first application to exit has been received. Based on this design, if the electronic device does not receive a user operation instructing the sandbox application to exit before the sandbox application exits, it indicates that the sandbox application exit was not actively triggered by the user, but may have been caused by reasons such as application crashes or system crashes, that is, the sandbox application may have exited abnormally. In this way, preserving sandbox data can solve the problem of sandbox data loss when a sandbox application exits abnormally.
[0015] In one possible design, the method further includes: receiving a user operation instructing a second application to exit, where the second application is a sandbox application used to access a second object included in the device, where the second object is an encrypted object; in response to the user operation instructing the second application to exit, the second application exits, and according to the second application's retention policy, second data is not retained, where the second data includes data generated when the second application accesses the second object. Optionally, the second data may include various information such as the second application, its installation path, permission configuration, user edits to the second object, and the sandbox environment on which the second application depends. Based on this design, when the electronic device receives a user operation instructing the sandbox application to exit, it indicates that the exit of the sandbox application was actively triggered by the user, i.e., the exit was authorized by the user, i.e., the sandbox application exited normally. In this case, the corresponding sandbox data is not retained based on the sandbox application's retention policy, thereby satisfying the user's need to retain the sandbox data corresponding to the sandbox application.
[0016] In one possible design, the second application's retention policy indicates that the second data should not be retained when the second application exits. Based on this design, the second application's retention policy indicates that the second application's sandbox data should not be retained when the second application exits. That is, different sandbox applications can have different retention policies, allowing the sandbox application to determine its own lifecycle. Compared to a method where the electronic device system uniformly manages the lifecycle of sandbox applications, this can increase the flexibility of sandbox lifecycle management and enhance the user experience.
[0017] In one possible design, the retention policy of the second application is used to indicate that the second data will not be retained if the second application exits and the second data has been written to disk. Before not retaining the second data according to the retention policy of the second application, the method further includes: determining that the second data has been written to disk. Based on this design, if the electronic device determines that the sandbox data has been written to disk, it indicates that the user's operation on the encrypted object has taken effect. In this case, not retaining the sandbox data can save memory overhead of the electronic device while avoiding the loss of sandbox data.
[0018] In one possible design, the first data includes data corresponding to the installation path of the first application, and the second data includes data corresponding to the installation path of the second application. Based on this design, the first data is retained according to the retention policy of the first application, and the first data contains data on the installation path of the first application. It should be understood that in this scenario, the first application is not uninstalled, that is, the first application is retained. In this way, when the user starts the sandbox application again to operate the object managed by the sandbox mechanism, the re-creation of the sandbox application can be avoided, thereby increasing the speed at which the electronic device opens the first application. The second data is not retained according to the retention policy of the second application, and the second data contains data on the installation path of the second application. It should be understood that in this scenario, when the process of the second application is destroyed, the data on the installation path of the second application will also be deleted by the system, which can correspond to uninstalling the second application. In this way, the storage usage of the electronic device can be reduced.
[0019] In one possible design, the method further includes: obtaining a second startup parameter, the second startup parameter being used to instruct access to the second object through the second application; and, if it is determined based on the second startup parameter that the second data does not exist, installing the second application, and accessing the second object through the second application. Based on this design, after the electronic device obtains the startup parameter, if it is determined based on the startup parameter that the corresponding sandbox data does not exist, that is, if the corresponding sandbox application does not exist, it creates a corresponding sandbox application to access the encrypted object, thereby ensuring the security of the encrypted object.
[0020] In one possible design, determining that the second data does not exist based on the second startup parameter includes: determining that the second data does not exist when there is no sandbox retention record corresponding to the second startup parameter, and the sandbox retention record corresponding to the second startup parameter includes an identifier of the second startup parameter and an identifier of the second data. In this way, the electronic device can use the sandbox retention record to identify whether sandbox data is stored. If a startup parameter has a corresponding sandbox retention record, then the startup parameter has corresponding sandbox data. If a startup parameter does not have a corresponding sandbox retention record, then the startup parameter does not have corresponding sandbox data.
[0021] In one possible design, the retention policy of the first application is further configured to indicate one or more of a retention period and an encryption method for the first data. Thus, when retaining sandbox data, the electronic device can set the retention period for the sandbox data according to the retention policy, thereby ensuring the validity of the sandbox data while also avoiding the memory overhead associated with the sandbox data remaining in memory. Furthermore, when retaining sandbox data, the device can set the encryption method for the sandbox data according to the retention policy. Encrypting the sandbox data according to the encryption method ensures the security of the sandbox data.
[0022] In one possible design, the sandbox retention record also includes the retention policy of the first application. Thus, the sandbox retention record includes the retention policy of the sandbox application. Thus, when searching for sandbox data based on the sandbox retention record, the validity of the sandbox data can be determined based on the sandbox policy in the sandbox retention record, as well as the method for decrypting the sandbox data.
[0023] In one possible design, the first object and / or the second object includes a document.
[0024] In a second aspect, an electronic device is provided, which has the function of implementing the method described in the first aspect and any design thereof. The function can be implemented by hardware, or by hardware executing corresponding software implementation. The hardware or software includes one or more modules corresponding to the above functions. In a possible example, the electronic device includes a processing unit (or processing module); the processing unit is used to: detect a user's access operation to a first object included in the electronic device, where the first object is an encrypted object; in response to the access operation, run a first application, where the first application is a sandbox application, and the first application is used to access the first object; determine that the first application exits operation, and retain first data according to the retention policy of the first application, where the first data includes data generated when the first object is accessed through the first application.
[0025] In one possible design, the retention policy of the first application is used to indicate that the first data is retained when the first application exits.
[0026] In one possible design, the retention policy of the first application is used to indicate that the first data should be retained when the first application exits and the first data has not been written to the disk; before retaining the first data according to the retention policy of the first application, the processing unit is further used to determine that the first data has not been written to the disk.
[0027] In one possible design, after retaining the first data according to the retention policy of the first application, the processing unit is further used to generate a sandbox retention record, wherein the sandbox retention record includes a first startup parameter and an identifier of the first data, and the first startup parameter is used to indicate access to the first object through the first application.
[0028] In one possible design, the processing unit is further used to: obtain a first startup parameter; obtain the first data based on the first startup parameter and the sandbox retention record; and start the first application to access the first object based on the first data.
[0029] In one possible design, the processing unit is specifically used to: install the first application according to the target application installed on the electronic device, the first application is a clone of the target application, and the permissions of the first application are less than those of the target application; and run the first application through a sandbox.
[0030] In a possible design, before the first application in the sandbox exits execution, the processing unit is further configured to determine that no user operation instructing the first application to exit execution is obtained.
[0031] In one possible design, the processing unit is further used to: obtain a user operation instructing the second application to exit, where the second application is a sandbox application used to access a second object included in the device, and the second object is an encrypted object; in response to the user operation instructing the second application to exit, the second application exits, and according to the retention policy of the second application, the second data is not retained, where the second data includes data generated when the second object is accessed through the second application.
[0032] In one possible design, the retention policy of the second application is used to indicate that the second data will not be retained when the second application exits.
[0033] In one possible design, the retention policy of the second application is used to indicate that the second data will not be retained when the second application exits and the second data has been written to disk; before the second data is not retained according to the retention policy of the second application, the method also includes: determining that the second data has been written to disk.
[0034] In one possible design, the first data includes data corresponding to the installation path of the first application, and the second data includes data corresponding to the installation path of the second application.
[0035] In one possible design, the processing unit is also used to: obtain a second startup parameter, where the second startup parameter is used to indicate access to the second object through the second application; when determining that the second data does not exist based on the second startup parameter, install the second application and access the second object through the second application.
[0036] In one possible design, the processing unit is specifically used to: determine that the second data does not exist when there is no sandbox retention record corresponding to the second startup parameter, and the sandbox retention record corresponding to the second startup parameter contains an identifier of the second startup parameter and an identifier of the second data.
[0037] In one possible design, the retention policy of the first application is also used to indicate the retention period of the first data, one or more encryption methods.
[0038] In one possible design, the sandbox retention record also includes a retention policy for the first application.
[0039] In a third aspect, an electronic device is provided, comprising a processor and a memory, the memory being coupled to the processor and configured to store computer program code, the computer program code comprising computer instructions, the processor reading the computer instructions from the memory to cause the electronic device to execute the method described in the first aspect and any design thereof. Optionally, the memory may be coupled to the processor or independent of the memory.
[0040] In one possible design, the electronic device further includes a display screen, which can be used by the electronic device to perform display operations, such as displaying a first object, a second object, and the like.
[0041] In one possible design, the electronic device further includes a communication interface that can be used for the electronic device to communicate with other devices. Exemplarily, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or related circuits.
[0042] In a fourth aspect, a computer-readable storage medium is provided, which includes a computer program. When the computer program runs on an electronic device, the electronic device executes the method described in the first aspect and any one of the designs thereof.
[0043] In a fifth aspect, a computer program product is provided, which includes: a computer program or instructions, which, when the computer program or instructions are run on a computer, enables the computer to execute the method described in the first aspect and any one of the designs thereof.
[0044] In a sixth aspect, a circuit system is provided, the circuit system including a processing circuit, and the processing circuit is configured to execute the method described in any one of the designs of the first aspect above.
[0045] In the seventh aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor executes the method described in any one of the designs in the first or second aspect above.
[0046] It should be noted that the technical effects brought about by any design in the above-mentioned second to seventh aspects can refer to the technical effects brought about by the corresponding design in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] FIG1 is a schematic diagram of a scenario for starting a Windows sandbox according to an embodiment of the present application;
[0048] FIG2a is a schematic diagram of a scenario for starting a DLP sandbox according to an embodiment of the present application;
[0049] FIG2 b is a schematic diagram of generating an object managed by a DLP mechanism according to an embodiment of the present application;
[0050] FIG3 is a schematic structural diagram of a device provided in an embodiment of the present application;
[0051] FIG4 is a schematic structural diagram of another device provided in an embodiment of the present application;
[0052] FIG5 is a schematic diagram of the software structure of a device provided in an embodiment of the present application;
[0053] FIG6 is a first schematic diagram of an interface provided in an embodiment of the present application;
[0054] FIG7 is a second schematic diagram of an interface provided in an embodiment of the present application;
[0055] FIG8 is a flow chart of a sandbox data processing method provided in an embodiment of the present application;
[0056] FIG9 is a flow chart of another sandbox data processing method provided in an embodiment of the present application;
[0057] FIG10 is a flow chart of another sandbox data processing method provided in an embodiment of the present application;
[0058] FIG11 is a schematic structural diagram of another device provided in an embodiment of the present application;
[0059] FIG12 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The technical solutions provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0061] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
[0062] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, a, b, and c, where a, b, and c can be single or plural.
[0063] In addition, to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.
[0064] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner to facilitate understanding.
[0065] The features, structures, or characteristics of this application may be combined in any suitable manner in one or more embodiments. In the various embodiments of this application, the order of the sequence numbers of the processes does not necessarily indicate the order of execution. The order of execution of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation of the embodiments of this application.
[0066] Some optional features in the embodiments of the present application can be implemented independently in certain scenarios without relying on other features to solve corresponding technical problems and achieve corresponding effects. They can also be combined with other features in certain scenarios as needed.
[0067] In this application, unless otherwise specified, the same or similar parts between the various embodiments can be referenced to each other. In the various embodiments of this application, unless otherwise specified and there is no logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The implementation methods of this application do not constitute a limitation on the scope of protection of this application.
[0068] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0069] In the field of computer security, a sandbox is a security mechanism that provides an isolated environment for programs executed in a device. The sandbox ensures system security by controlling the resources used by the executed program (such as, but not limited to, various types of resources such as files, networks, and hardware). Therefore, the use of sandbox technology can effectively prevent the impact of malicious program behavior on system security. However, to improve security, sandboxes are usually temporary. When the application in the sandbox (hereinafter referred to as the sandbox application) exits, the sandbox data will be cleared. It is understood that in the embodiments of the present application, sandbox data can refer to the relevant data of the sandbox application (such as the relevant data of the sandbox application can include, but not limited to, the sandbox application, the data generated by the sandbox application during the sandbox operation, the sandbox environment on which the sandbox application depends on for operation, etc.), and the sandbox data can be used for the corresponding sandbox application to run in the sandbox. This temporary feature of the sandbox reduces the risk of sandbox data being leaked, but it also brings a series of problems such as sandbox data loss. For example, when the sandbox application exits, if the corresponding sandbox data is not saved to the disk, the sandbox data loss problem may occur.
[0070] It can be understood that in the embodiment of the present application, the sandbox data not being written to the disk may mean that the sandbox data is not saved on the disk.
[0071] For example, For example, the Windows Sandbox provides a lightweight desktop environment that allows you to run some software or programs in an isolated state. Programs installed in the Windows Sandbox run separately from programs installed on the host computer. To run a program in the Windows Sandbox, you need to install it in the Windows Sandbox.
[0072] For example, taking a computer as an example, FIG1 shows a schematic diagram of a scenario for starting the Windows Sandbox. As shown in FIG1 (1), the computer can display a function interface 100. The function interface 100 may include options corresponding to one or more functions supported by the computer (such as Windows Sandbox, virtual machine, file system, etc.), and the user can enable the corresponding function through these options. If the options corresponding to the one or more functions include a function option 101 corresponding to the Windows Sandbox, the user can enable the Windows Sandbox function of the computer through the function option 101. As shown in FIG1 (1), the computer detects an operation such as the user checking the function option 101. In response to the operation, the computer can display the opening entrance of the Windows Sandbox in the start menu, desktop, etc.
[0073] Taking the opening entrance of the Windows sandbox displayed on the start menu as an example, as shown in (2) in Figure 1, the computer can display the desktop 110, wherein a start menu 111 can be displayed on the desktop 110. Optionally, the desktop 110 can also display one or more icons of applications installed on the computer, such as an icon of a mailbox application, an icon of a browser application, etc., which are not introduced one by one here. The computer detects an operation such as a user clicking on the start menu 111, and in response to the operation, as shown in (3) in Figure 1, the computer presents a display control 121 of the Windows sandbox. Optionally, the computer can also present one or more other display controls, such as a display control for a browser, a display control for a mailbox, etc., which is not limited in this embodiment of the present application.
[0074] The user can launch the Windows Sandbox to run the program through the display control 121. If the computer detects an operation such as a user clicking the display control 121, the computer can launch the Windows Sandbox in response to the operation. For example, as shown in (4) in Figure 1, the computer can launch a window to display the lightweight desktop 130. The user can directly copy the program to the lightweight desktop 130, install the program in the Windows Sandbox, and run the program through the Windows Sandbox.
[0075] When the lightweight desktop 130 shown in (4) of FIG1 is closed, for example, when a user clicks a close button 131 included on the lightweight desktop 130, the lightweight desktop 130 is closed in response to the operation, and accordingly, the Windows sandbox is closed. When the Windows sandbox is closed, the sandbox data (such as the data related to the programs installed in the Windows sandbox) is cleared, which may cause the sandbox data to be lost.
[0076] For example, taking the data leakage prevention (DLP) sandbox as an example, for an object managed by the DLP mechanism, when a user accesses the object through an application, the system can build a DLP sandbox by creating a corresponding application clone and a userspace file system (fuse) mechanism. The corresponding application clone is run through the DLP sandbox to access the object. This can achieve independent permission control of the application clone and provide an isolated environment for the object.
[0077] It is understood that in this embodiment of the present application, the application clone is equivalent to a copy of the original application. The application clone and the original application can run independently without affecting each other. The application clone's data is stored independently and is not shared with the original application. The DLP sandbox can strengthen the control of the application clone's permissions, such as: not allowing the application clone to access the network, etc., to improve the security of the objects managed by the DLP mechanism.
[0078] For example, taking the object managed by the DLP mechanism as a document on a computer as an example, FIG2a shows a schematic diagram of a scenario for starting a DLP sandbox provided by an embodiment of the present application. As shown in (1) in FIG2a , the computer displays a desktop 200. Among them, one or more objects may be included on the desktop 200, and these one or more objects may include one or more of objects managed by the DLP mechanism and objects not managed by the DLP mechanism. Among them, objects managed by the DLP mechanism need to be managed by the DLP sandbox; objects not managed by the DLP mechanism can be called ordinary objects and do not need to be managed by the DLP sandbox. For example, the objects included on the desktop 200 may include, but are not limited to, one or more of applications installed on the computer (such as mailbox applications, video applications, etc.), stored files (such as documents, folders 1), etc. The stored files may include, but are not limited to, documents, pictures, videos, audio, application installation packages, and other files in various forms.
[0079] For example, the desktop 200 may include a document 201, where the document 201 is managed by the DLP mechanism. If the computer detects an operation such as a user opening the document 201, the computer may create a clone of the document editor application in response to the operation, run the clone of the document editor application through the DLP sandbox, and then open the document 201 through the clone of the document editor application running in the DLP sandbox. For example, the computer may present a document editing interface 210 such as that shown in (2) in FIG2a. The user may view, modify, and perform other operations on the document 201 in the document editing interface 210.
[0080] Optionally, the document editor application can be any application installed on the computer that has a document editing function, including but not limited to Optionally, when multiple document editor applications are installed on the computer, the computer can create a clone of the default document editor application or a clone of the document editor application selected by the user in response to the user's operation to open the document to open the document.
[0081] When the document editing interface 210, such as that shown in (2) of FIG. 2a , is closed, for example, when the user clicks the close button 211 included on the document editing interface 210, in response to the operation, the document editing interface 210 is closed, and accordingly, the clone of the document editor application exits operation, and the DLP sandbox exits. The DLP sandbox data (such as, but not limited to, the relevant data of the clone of the document editor application) will be cleared. At this time, if the sandbox data has not been written to the disk, there will be a problem of sandbox data loss. Accordingly, the user's operation data (such as the editing operation of the document in the document editing interface 210, such as that shown in (2) of FIG. 2a ) will also be lost, affecting the user experience.
[0082] In some embodiments, a common object can be converted to an object managed by the DLP mechanism by restricting its management permissions, for example, by limiting the accounts that can access and edit the common object. It is understood that a common object can refer to an object that can be accessed and edited by any account. Of course, objects managed by the DLP mechanism can also be generated through other methods, and this embodiment of the application does not impose any limitations on this.
[0083] Exemplarily, taking a common object as a document on a computer as an example, FIG2b shows a schematic diagram of generating an object managed by the DLP mechanism provided by an embodiment of the present application. As shown in FIG2b (1), the computer displays a desktop 220, on which a common document stored on the computer, namely, document 221, is displayed. A document managed by the DLP mechanism can be generated based on document 221. For example, a user can right-click or perform other operations on document 221. In response to the operation, as shown in FIG2b (2), the computer can present an encryption protection option 231, through which the management rights of document 221 can be restricted. Optionally, the computer can also present one or more other options, such as an open option, an open method option, etc., through which other operations (such as an open operation) can be performed on document 221.
[0084] As shown in (2) of FIG2b , the computer detects an operation such as a user clicking on the encryption protection option 231. In response to this operation, as shown in (3) of FIG2b , the computer can present a control 241. The user can restrict the users who can access and edit the document 221 by entering a specified account in the control 241. For example, if the computer detects that the user sets the account for accessing the document 221 to "111111" and the account for editing the document 221 to "222222" in the control 241, then in response to this operation, the computer can generate a document managed by the DLP mechanism. As shown in (4) of FIG2b , the computer can display a desktop 250. The desktop 250 can include the aforementioned documents managed by the DLP mechanism, such as document 251. Document 251 allows access by the user with the account "111111" and allows editing by the user with the account "222222".
[0085] Based on this, an embodiment of the present application provides a sandbox data processing method, which can retain sandbox data when the sandbox application exits execution, thereby solving the problem of sandbox data loss.
[0086] The technical solution provided in the embodiments of the present application can be applied to scenarios where applications in various sandboxes exit runtime. For example, the sandbox may include but is not limited to DLP sandbox, Windows sandbox, and other sandboxes.
[0087] The technical solution provided in the embodiments of the present application can be applied to the device 300 (which may be referred to as the electronic device 300 ), or to a system including the device 300 .
[0088] For example, device 300 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and various types of terminal devices such as a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device.
[0089] For another example, the device 300 in the present application may be a module, a module, a component, or a chip, etc., which is built into any device as one or more components or units.
[0090] In some embodiments, the device 300 may be a fixed device or a portable device.
[0091] Optionally, the operating system installed on the device 300 includes but is not limited to This application does not limit the specific type of device 300 or the installed operating system.
[0092] For example, taking the device 300 as a computer as an example, FIG3 shows a structural diagram of a device 300 provided in an embodiment of the present application.
[0093] The device 300 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna, a wireless communication module 350, an audio module 360, a display 370, and an input device 380, etc.
[0094] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0095] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0096] Processor 310 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 310 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 310. If processor 310 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 310 latency, and thus improves system efficiency.
[0097] In some embodiments of the present application, the processor 310 may retain the sandbox data based on a retention policy corresponding to the sandbox application. In still other embodiments of the present application, the processor 310 may also be configured to start the sandbox application based on a sandbox retention record.
[0098] In some embodiments, the processor 310 may include one or more interfaces, such as, but not limited to, a USB interface 330 .
[0099] The charging management module 340 is configured to receive charging input from a charger, which may be a wireless charger or a wired charger.
[0100] The power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340 to provide power to the processor 310, the internal memory 321, the display 370, and the wireless communication module 350.
[0101] The wireless communication function of the device 300 can be implemented through an antenna, a wireless communication module 350, a modem processor, and a baseband processor.
[0102] Antennas are used to transmit and receive electromagnetic wave signals. Each antenna in device 300 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antennas can be reused as diversity antennas for wireless local area networks. In other embodiments, antennas can be used in conjunction with tuning switches.
[0103] The wireless communication module 350 can provide wireless communication solutions applied to the device 300, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 350 can be one or more devices that integrate at least one communication processing module. The wireless communication module 350 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310. The wireless communication module 350 can also receive signals to be sent from the processor 310, frequency modulate them, amplify them, and convert them into electromagnetic waves for radiation through the antenna.
[0104] In some embodiments, the antenna of the device 300 is coupled to the wireless communication module 350 so that the device 300 can communicate with a network and other devices through wireless communication technology.
[0105] Device 300 implements display functionality through a GPU, display screen 370, and an application processor. Display screen 370 is used to display images, videos, and the like. Display screen 370 includes a display panel. In some embodiments of the present application, display screen 370 can be used to display objects included in device 300. For example, such objects may include, but are not limited to, various forms of data, such as applications, documents, folders, images, videos, audio, and application installation packages.
[0106] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the device 300. The external memory card communicates with the processor 310 via the external memory interface 320 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0107] The internal memory 321 can be used to store computer executable program codes, which include instructions. The processor 310 executes the instructions stored in the internal memory 321 to execute various functional applications and data processing of the device 300.
[0108] The internal memory 321 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the device 300, etc. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 310 executes various functional applications and data processing of the device 300 by running instructions stored in the internal memory 321 and / or instructions stored in a memory provided in the processor.
[0109] In some embodiments of the present application, the internal memory 321 may be used to store one or more of the retention policy, sandbox data, and sandbox retention records corresponding to the sandbox application. For an introduction to the retention policy, sandbox data, and sandbox retention data corresponding to the sandbox application, please refer to the following description.
[0110] The device 300 can implement audio functions such as music playback and recording through the audio module 360, speakers, receivers, microphones, headphone jacks, and application processors.
[0111] The audio module 360 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 360 can also be used to encode and decode audio signals. In some embodiments, the audio module 360 can be provided in the processor 310, or some functional modules of the audio module 360 can be provided in the processor 310.
[0112] The input device 380 may include a keyboard, a mouse, and the like. The keyboard is used to input English letters, numbers, punctuation marks, and the like into the device 300, thereby issuing commands to the device 300 and inputting data. The mouse is an indicator for the vertical and horizontal coordinate positioning of the device 300 display system, and is used to input instructions to the device 300. The input device 380 may be connected to the device 300 via a wired connection, for example, the input device 380 may be connected to the device 300 via a GPIO interface, a USB interface, or the like. The input device 380 may also be connected to the device 300 wirelessly, for example, the input device 380 may be connected to the device 300 via Bluetooth, infrared, or the like. In some embodiments of the present application, the input device 380 may be used to receive operations performed by a user on objects included in the device 100.
[0113] For example, the above only uses a computer as an example to illustrate the structure of the device 300 in the embodiment of the present application, but does not constitute a limitation on the structure and form of the device 300. The embodiment of the present application does not limit the structure and form of the device 300. For example, Figure 4 shows another exemplary structure of the device 300 provided in the embodiment of the present application. As shown in Figure 4, the device 300 includes a processor 401, a memory 402, and a display screen 403. The implementation of the processor 401, the memory 402, and the display screen 403 can refer to the relevant implementation of the processor, memory, and display screen shown in Figure 3.
[0114] In other embodiments of the present application, the electronic device may include more or fewer components than those shown in Figures 3 and 4, or may combine or separate certain components, or arrange the components differently. The components shown in the figures may be implemented in hardware, software, or a combination of software and hardware.
[0115] In some embodiments, the software system of the device 300 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture, etc. In the embodiment of the present application, the layered architecture is used as an example to illustrate the software structure of the device 300.
[0116] FIG5 is a schematic diagram of the software structure of a device 300 provided in an embodiment of the present application.
[0117] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, device 300 may include three layers: an application layer, a system services layer, and a data layer, from top to bottom.
[0118] The application layer includes a series of applications. Exemplarily, the application may include but is not limited to various applications such as mailbox applications, recycle bin applications, video applications, etc. (not shown in the figure). In some embodiments of the present application, as shown in Figure 5, the application includes a sandbox application. In some embodiments, the sandbox application can be a clone of the original application created. It can be understood that the original application is also the application installed in the device 300. Optionally, the sandbox application can be presented as a form running inside the device 300 system, which is generally not perceptible to the user. Of course, the sandbox application can also be presented in a form that is perceptible to the user, for example: the device 300 can display the icon of the sandbox application, or the device 300 supports the user to view the process of the sandbox application running in the device 300, etc. The embodiments of the present application are not limited to this.
[0119] In some other embodiments of the present application, the application may further include a file manager. The file manager may be used to manage files, folders, etc. in the device 300. Specifically, the file manager includes, but is not limited to, creating, searching, modifying, copying, and deleting files and folders, and displaying file and folder information, such as size, date, and time.
[0120] The system service layer provides an application programming interface (API) and programming framework for the application programs in the application layer. The system service layer may include some predefined functions.
[0121] As shown in FIG5 , the system service layer may include a sandbox application manager and an application package manager, etc.
[0122] The sandbox application manager can be used to manage the life cycle of the sandbox application included in the application layer, such as but not limited to launching, uninstalling, retaining, and reusing the sandbox application.
[0123] The application package manager can be used to implement functions such as application creation and uninstallation, component query matching, and permission management. In some embodiments of the present application, the application package manager can be used to implement sandbox application creation and uninstallation.
[0124] The data layer may be used to store data in the device 300 , such as one or more of sandbox retention records, original application information, sandbox information, etc., including but not limited to.
[0125] A sandbox retention record may refer to data related to a sandbox application that is retained (or stored) by the device 300. For example, a sandbox retention record may include, but is not limited to, various information such as startup parameters, sandbox identifiers, sandbox data, and retention policies. For an introduction to this information, please refer to the following. In some embodiments of the present application, a sandbox retention record may be used to launch a sandbox application.
[0126] The original application information may be information related to the original application installed in the device 300, such as but not limited to the installation package, installation path, permission configuration, and other information of the original application. In some embodiments of the present application, the application package manager of the system service layer may determine the sandbox information of the data layer based on the original application information of the data layer.
[0127] Sandbox information may refer to relevant information used to create a sandbox application in the application layer, including but not limited to the installation package, installation path, permission configuration, etc. In some embodiments of the present application, sandbox information can be used to create and run a sandbox application in the application layer.
[0128] It can be understood that the software structure of the device 300 shown in Figure 5 is only an example. In actual applications, it can also include more or fewer layers, and / or more or fewer modules, and the layers to which each module belongs can also be different. For example: the sandbox application manager and application package manager in the system service layer can also be integrated into one module. The embodiments of the present application do not limit this.
[0129] In conjunction with the architecture shown in FIG. 5 , the process of starting a sandbox application is described below by taking the object managed by the DLP mechanism as a file in the device 300 , which is managed by a file manager at the application layer, as an example.
[0130] The user can perform operations such as opening files in the device 300. In response to the opening event, the file manager can obtain the corresponding startup parameters and send the startup parameters to the sandbox application manager. Accordingly, the sandbox application manager can determine which method to use to start the corresponding sandbox application based on the received startup parameters and the sandbox retention record, so that the user can access the file through the sandbox application. For example, when the user chooses to use a text document application to open a file, the corresponding sandbox application can be a clone of the text document application. When the user chooses to use When an application is used to open a file, the corresponding sandbox application can be When the user chooses to use When an application is used to open a file, the corresponding sandbox application can be The app's clone. And so on.
[0131] In some embodiments, if the sandbox application manager determines that a corresponding sandbox application exists based on the startup parameters and the sandbox retention record, the sandbox application manager can directly start the existing sandbox application. In other embodiments, if the sandbox application manager determines that a corresponding sandbox application does not exist based on the startup parameters and the sandbox retention record, the sandbox application manager can instruct the application package manager to create a corresponding sandbox application. Accordingly, after receiving the instruction from the sandbox application manager, the application package manager can determine the sandbox information based on the corresponding original application information, and create and start the corresponding sandbox application through the sandbox information. It can be understood that the original application can refer to the application selected by the user to open the file, such as: text document application, application, Applications, etc.
[0132] It is understood that in this example, the object managed by the DLP mechanism is a file. When the object managed by the DLP mechanism is in other forms, the file manager can also be replaced by another form of manager. It is also understood that the managers described in the embodiments of this application can be integrated or independently provided.
[0133] The technical solutions involved in the following embodiments can all be implemented in devices having the structures shown in Figures 3, 4, and 5.
[0134] It is understood that in the embodiments of the present application, the device 300 is used as a device for description, and the device can perform some or all of the steps in the embodiments of the present application. These steps or operations are merely examples, and the embodiments of the present application can also perform other operations or variations of various operations. In addition, the various steps can be performed in a different order than those presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application need to be performed.
[0135] An embodiment of the present application provides a sandbox data processing method. When a device determines that a sandbox application has exited execution, the device can retain the sandbox data based on a retention policy corresponding to the sandbox application, thereby solving the problem of sandbox data loss.
[0136] For example, taking the sandbox application as an avatar of the document editor application running in the computer shown in Figure 2a, combined with the document editing interface 210 shown in (2) of Figure 2a, as shown in Figure 6, if the user modifies the content of the document 201 shown in (1) of Figure 2a in the document editing interface 210, such as the user adds the content "This can achieve independent permission control of the application", then when the avatar of the document editor application exits the sandbox operation, such as when the user performs an operation such as clicking on the close button 211 shown in Figure 6, then in response to the operation, the computer can retain the sandbox data (such as but not limited to the content included in the document editing interface 210 shown in Figure 6, that is, the modified document content, etc.) based on the retention policy of the document editor application.
[0137] Subsequently, when the user again opens the document 201 included on the desktop 200 such as shown in (1) in Figure 2a, in response to the operation, the computer can also present a document editing interface 210 such as shown in Figure 6, and the user can continue to edit the content of the document 201 based on the state of the clone of the document editor application before exiting.
[0138] It is understood that the above examples use document editing sandbox applications as an example. For other types of applications, the device can also retain sandbox data, thereby retaining the user's operation data in the sandbox application. This allows the user to resume the operation based on the state before the sandbox application exits when the sandbox application is launched again. For example, for a video editing sandbox application, the sandbox data retained by the device may include the user's editing records and playback records of the video in the video editing application. For a browser sandbox application, the sandbox data retained by the device may include the user's browsing records of web pages and open windows in the browser application.
[0139] In some embodiments, a single application can run in a sandbox, and the retained sandbox data can refer to data related to that application. This is used as an example in the embodiments of the present application. In other embodiments, multiple applications can run in a sandbox, and for each application running in the sandbox, the retained sandbox data can refer to data related to each application itself. Alternatively, the retained sandbox data can refer to data related to all applications running in the sandbox.
[0140] In some embodiments, a retention policy can be used to instruct a sandbox application to retain sandbox data when it exits. Therefore, if a sandbox application has a retention policy, it indicates that the sandbox data needs to be retained when the sandbox application exits. If a sandbox application does not have a retention policy, it indicates that the sandbox data does not need to be retained when the sandbox application exits. The retention policies in the embodiments of this application are all based on this example.
[0141] In other embodiments, a retention policy may be used to indicate whether a sandbox application retains sandbox data while the sandbox is running. For example, if a retention policy corresponding to a sandbox application indicates that the sandbox application retains sandbox data upon exiting, then the sandbox data must be retained upon exiting. If a retention policy corresponding to a sandbox application indicates that the sandbox application does not retain sandbox data upon exiting, then the sandbox data must not be retained upon exiting.
[0142] In some embodiments, the retention policy may also be used to determine under what circumstances sandbox data is retained when the sandbox application exits. In some specific implementations, the retention policy is specifically used to instruct the sandbox application to retain the sandbox data if the sandbox data has not been written to disk when the sandbox application exits. In other words, the retention policy is specifically used to instruct the sandbox application not to retain the sandbox data if the sandbox data has been written to disk when the sandbox application exits.
[0143] For example, as shown in FIG6 , when a user edits the content included in the document editing interface 210 through the clone of the document editor application running in the sandbox, but after the editing is completed, no save operation is performed (such as the user does not perform an operation such as clicking on the save button 601 shown in FIG6 ), that is, the document editing interface 210 shown in FIG6 is closed. If the user performs an operation such as clicking on the close button 211 shown in FIG6 , then the relevant data of the clone of the document editor application running in the sandbox (i.e., the sandbox data) is not saved to the disk.
[0144] Alternatively, when a user edits the content included in the document editing interface 210 through the clone of the document editor application running in the sandbox, but during the editing process, the clone of the document editor application running in the sandbox crashes, or the computer system crashes, etc., the relevant data of the clone of the document editor application running in the sandbox (i.e., sandbox data) is not saved to the disk.
[0145] Accordingly, in the above case, the computer can determine that the sandbox data needs to be retained according to the retention policy under this embodiment.
[0146] In contrast, as shown in FIG6 , when a user edits the content included in document editing interface 210 through an avatar of a document editor application running in a sandbox, and after completing the editing, performs a save operation (e.g., the user performs an operation such as clicking on Save button 601 shown in FIG6 ), and then closes document editing interface 210 as shown in FIG6 , the relevant data of the avatar of the document editor application running in the sandbox (i.e., the sandbox data) has been written to the disk. Accordingly, in this case, the computer can determine that the sandbox data does not need to be saved based on the retention policy under this embodiment.
[0147] Alternatively, as shown in FIG6 , when a user edits the content included in document editing interface 210 through a clone of a document editor application running in a sandbox, and after completing the editing, does not perform an operation such as clicking on Save button 601 shown in FIG6 to save document 201, the document editing interface 210 shown in FIG6 is closed. In response to this closing operation, the computer outputs a reminder message before exiting the clone of the document editor application. This reminder message is used to remind the user whether to save the content in document editing interface 210 shown in FIG6 . For example, when the computer receives the user's confirmation operation to save the content in document editing interface 210, in response to this operation, the computer saves the content in document editing interface 210, and the sandbox data is now stored on disk. Accordingly, in this case, the computer can determine that the sandbox data does not need to be saved based on the retention policy under this embodiment.
[0148] In this way, if the device determines, based on the retention policy, that the sandbox data has not been written to disk, it will retain the sandbox data when the sandbox application exits. Because the sandbox data has not been written to disk, operations performed by the user on sandboxed objects within the sandbox application have not yet taken effect. Preserving the sandbox data when the sandbox application exits allows the user to resume operations on sandboxed objects based on the previous state when the sandbox application is launched again, thus ensuring a better user experience. If the sandbox data has been written to disk, the device will not retain the sandbox data when the sandbox application exits. Because the sandbox data has been written to disk, operations performed by the user on sandboxed objects within the sandbox application have already taken effect. When the user resumes operations on sandboxed objects, the previous state can be restored. Therefore, not retaining the sandbox data ensures that the user can resume operations on sandboxed objects based on the previous state, thus saving device memory while ensuring a better user experience.
[0149] In other specific implementations, the retention policy can also be used to indicate that when a sandbox application exits, if the sandbox data has not been written to disk, the sandbox data will not be retained. For example, as shown in Figure 6, when a user edits the content included in the document editing interface 210 through an avatar of a document editor application running in the sandbox, and after completing the editing, does not perform an operation such as clicking the Save button 601 shown in Figure 6 to save the document 201, the document editing interface 210 shown in Figure 6 is closed. In response to this closing operation, the computer outputs a reminder message before exiting the avatar of the document editor application. This reminder message is used to remind the user whether to save the content in the document editing interface 210 shown in Figure 6. For example, when the computer receives the user's confirmation not to save the content in the document editing interface 210, the computer responds to this action and does not save the content in the document editing interface 210. In this case, the sandbox data is not written to disk. Accordingly, in this case, the computer can determine that the sandbox data does not need to be saved based on the retention policy of this embodiment.
[0150] In some specific implementations, the retention policy is specifically used to determine whether to retain the sandbox data based on the user's operation when the sandbox application exits. If the device determines that the sandbox application exit is triggered by the user, for example: the user performs an operation to instruct the sandbox application to exit (such as the user performs a close operation on the document editing interface 210 shown in Figure 6), then the device may determine that there is no need to retain the corresponding sandbox data. Optionally, in this case, the sandbox data may have been saved to disk or may not have been saved to disk.
[0151] If the device determines that the exit of the sandbox application is not triggered by the user, for example, due to a flash exit of the sandbox application, a system crash, etc., the device may determine that the corresponding sandbox data needs to be retained.
[0152] In some embodiments, the retention policy can also be used to determine one or more of the retention period of sandbox data, the encryption method of sandbox data, etc. Optionally, for different sandbox applications, the corresponding retention period of sandbox data, the encryption method of sandbox data, etc. can be the same or different, and the embodiments of the present application do not limit this. In this way, when the device retains the sandbox data, it sets the retention period of the sandbox data according to the retention policy, which can ensure the validity of the sandbox data, and at the same time avoid the memory overhead occupied by the sandbox data being retained in the memory. In addition, when the device retains the sandbox data, it sets the encryption method of the sandbox data according to the retention policy, so that the sandbox data is encrypted according to the encryption method, which can ensure the security of the sandbox data.
[0153] Optionally, in the embodiments of this application, the retention policy for sandbox applications can be set by the application developer based on actual business needs, and this embodiment of the application does not impose any specific restrictions on this. In this way, the sandbox application determines its own lifecycle. Compared with the method of having the device system uniformly manage the lifecycle of the sandbox application, this not only solves the problem of sandbox data loss, but also improves the flexibility of sandbox lifecycle management and enhances the user experience.
[0154] In some embodiments, after retaining the sandbox data, the device may generate a corresponding sandbox retention record. Optionally, the device may also persist the generated sandbox retention record. Exemplarily, the sandbox retention record may include a correspondence between the startup parameters and the sandbox data. Alternatively, the sandbox retention record may include a correspondence between the startup parameters and the sandbox identifier. The sandbox identifier may be used to index the corresponding sandbox data. The sandbox retention record may determine the sandbox data corresponding to the startup parameters, and the sandbox data may be used to launch the corresponding sandbox application.
[0155] Exemplarily, the startup parameters can be used to start an object included in the device that needs to be accessed through a sandbox application (or an object controlled by the sandbox mechanism). In some embodiments, the startup parameters can be used to instruct the device to start a sandbox application to access the object. Exemplarily, the object can include but is not limited to various forms of objects such as applications, documents, pictures, videos, audio, application installation packages, etc. In some specific implementations, the startup parameters can include an object identifier. Optionally, the startup parameters can also include the storage address of the object, the opening method, the sandbox application identifier, etc.
[0156] Optionally, an object controlled by the sandbox mechanism can be opened by different sandbox applications. Therefore, the startup parameters can also include an opening method, a sandbox application identifier, etc., which can be used by the device to determine which sandbox application to use to open the object. Optionally, the opening method included in the startup parameters can be a default one or selected by the user, and this embodiment of the application does not limit this.
[0157] For example, taking the object controlled by the sandbox mechanism as the document 201 shown in FIG2a, the computer detects that the user performs an operation such as right-clicking on the document 201. In response to the operation, as shown in FIG7 (1), the computer can present an open method option 701. The open method option 701 can be used by the user to select the desired open method to open the document 201. Optionally, the computer can also present one or more other options, such as an open option 702, a compression option, etc. The open option 702 can be used to open the document 201 using the default open method (e.g., the open method set by the file manager, etc.). The functions of other options are not described here.
[0158] As shown in FIG7 (1), the computer detects an operation such as the user pointing the cursor to the open method option 701. In response to this operation, as shown in FIG7 (2), the computer can present one or more open methods for the user to select. For example, the computer detects an operation such as the user clicking on the Word control 711. In response to this operation, the computer determines to use the Word application's clone (i.e., the sandbox application) to open the document 201. For another example, the computer detects an operation such as the user clicking on the text document control 712. In response to this operation, the computer determines to use the text document application's clone (i.e., the sandbox application) to open the document 201.
[0159] Similarly, taking the device as a mobile phone as an example, as shown in (3) in Figure 7, the mobile phone can display a file storage interface 720. Among them, one or more files stored on the mobile phone can be displayed in the file storage interface 720, such as folder 1, folder 2, document 721, etc. Optionally, the one or more files may include but are not limited to various types of data such as pictures, videos, audios, compressed packages, applications, etc., and the embodiment of the present application does not limit this. Taking the object controlled by the sandbox mechanism as document 721 as an example, the mobile phone detects an operation such as the user opening the document 721. In response to the operation, the mobile phone determines to adopt The application's clone opens document 721.
[0160] Taking the device as a tablet computer as an example, as shown in (4) in Figure 7, the tablet computer can also display a file storage interface 730. The file storage interface 730 can also display one or more files stored on the tablet computer, such as folder 4, folder 5, document 731, etc. Taking the object controlled by the sandbox mechanism as document 731 as an example, the tablet computer detects an operation such as opening the document 731 by the user. In response to the operation, the tablet computer uses the memo application to open the document 731.
[0161] It is understandable that the above examples are based on the default mobile phone For example, a mobile phone and / or tablet computer may use a default application to open a document stored on the mobile phone, and a tablet computer may use a default application to open a document stored on the tablet computer. The mobile phone and / or tablet computer may also use other applications to open stored documents by default. Alternatively, the user may select the opening method in a manner similar to that of a computer, and this embodiment of the application does not impose any limitation on this.
[0162] In some embodiments, the sandbox retention record may also include a retention policy corresponding to the sandbox data. Optionally, the retention policy may be used to determine one or more of the retention period, encryption method, etc. of the sandbox data indicated by the sandbox retention record. In this way, the sandbox retention record may be used by the device to determine whether the sandbox data is valid and to determine the method to be used to decrypt the sandbox data. In some embodiments, the sandbox data retained in the device may be data encrypted using the encryption method included in the corresponding sandbox retention record, that is, data encrypted using the encryption method indicated in the corresponding retention policy.
[0163] For example, FIG8 shows a flow chart of a sandbox data processing method provided in an embodiment of the present application. As shown in FIG8 , the method includes the following steps:
[0164] S801: The device determines that the sandbox application has exited.
[0165] In some embodiments, after a user closes the running interface of a sandbox application, the sandbox application exits in response to the closing operation. In other embodiments, the sandbox application exits when the sandbox application crashes or the device system crashes. The embodiments of the present application do not limit the method for exiting a sandbox application.
[0166] S802: The device determines whether the sandbox data needs to be retained.
[0167] In some embodiments, the device may determine whether to retain the sandbox data based on the retention policy corresponding to the sandbox application. For details on this implementation, please refer to the relevant implementations described above.
[0168] If the data needs to be retained, the process proceeds to step S803. If the data does not need to be retained, the process proceeds to step S804.
[0169] S803: The device retains the sandbox data and generates a sandbox retention record.
[0170] In some embodiments, the device may store sandbox data, sandbox retention data, etc. persistently.
[0171] S804. The device cleans up sandbox data.
[0172] Optionally, the device may delete the sandbox data. It is understood that after the sandbox data is deleted, the corresponding sandbox application is uninstalled, the corresponding sandbox application process is destroyed, and the corresponding sandbox application is also the sandbox application previously started.
[0173] Based on this design, when a sandbox application exits, including but not limited to an abnormal exit, the device can retain sandbox data based on the sandbox application's corresponding retention policy. This facilitates recovery from abnormally terminated sandbox applications, allowing users to continue operations based on the state before the sandbox application exited, improving the user experience.
[0174] It is understood that the above embodiment describes the process of retaining sandbox data after the sandbox application exits. The following describes the process of starting the sandbox application.
[0175] In some embodiments, after obtaining the startup parameters, the device can determine how to start the sandbox application based on the startup parameters and the sandbox retention record. In this embodiment, as a possible implementation, take the startup parameters including the object identifier and the sandbox retention record containing the correspondence between the object identifier and the sandbox identifier (or sandbox data) as an example. When the device determines that there is a sandbox retention record corresponding to the acquired startup parameters, it can start the sandbox application indicated in the sandbox retention record. When the device determines that there is no sandbox retention record corresponding to the acquired startup parameters, it can create a new sandbox application and start the sandbox application. For the method of creating a new sandbox application, please refer to the above description.
[0176] In this embodiment, as another possible implementation, the startup parameters include an object identifier and a sandbox application identifier (or are replaced by an opening method), and the sandbox retention record contains a correspondence between the object identifier and the sandbox identifier (or sandbox data) as an example. When the device determines that there is a sandbox retention record corresponding to the acquired startup parameters, and the sandbox application indicated in the sandbox retention record is the same as the sandbox application indicated in the startup parameters, the device can start the sandbox application indicated in the sandbox retention record. When the device determines that there is no sandbox retention record corresponding to the acquired startup parameters, or there is a sandbox retention record corresponding to the acquired startup parameters, but the sandbox application indicated by the sandbox retention record is different from the sandbox application indicated in the startup parameters, the device can create a new sandbox application and start the newly created sandbox application. The newly created sandbox identifier can be the sandbox application indicated by the sandbox application identifier.
[0177] It can be understood that in this implementation, the sandbox application indicated in the startup parameters is also the sandbox application indicated by the sandbox application identifier in the startup parameters.
[0178] It is also understood that in the above embodiment, the sandbox retention record corresponding to the startup parameters obtained by the device may refer to the sandbox retention record containing the startup parameters. The sandbox application indicated in the sandbox retention record may refer to the sandbox application contained in the sandbox data indicated by the sandbox identifier contained in the sandbox retention record. Alternatively, it may refer to the sandbox application contained in the sandbox data contained in the sandbox retention record.
[0179] For example, FIG9 shows a flowchart of another sandbox data processing method provided in an embodiment of the present application. As shown in FIG9 , the method includes the following steps:
[0180] S901: The device obtains startup parameters.
[0181] It is understood that the startup parameters described in the embodiments of this application may all refer to startup parameters corresponding to objects managed by the sandbox mechanism. In some embodiments, when a user launches an object managed by the sandbox mechanism on a device, the device may obtain the corresponding startup parameters in response to the launch operation. For further information on startup parameters, please refer to the above.
[0182] S902: The device determines whether a corresponding sandbox application already exists based on the startup parameters and the sandbox retention record.
[0183] For the specific implementation of this step, please refer to the relevant implementation described above.
[0184] S903: The device starts an existing sandbox application.
[0185] In some embodiments, before executing step S903, the device may also pre-process the sandbox data obtained in step S902, including but not limited to determining whether the sandbox data is valid based on the retention period of the sandbox data, decrypting the sandbox data based on the encryption method of the sandbox data, etc. If the sandbox data is valid and the decryption is successful, the sandbox application contained in the sandbox data is started.
[0186] S904: The device creates a new sandbox application and starts the sandbox application.
[0187] For the specific implementation of this step, please refer to the above description.
[0188] Based on this solution, when a device needs to launch a sandbox application to access an object, it can determine whether the sandbox application already exists based on the sandbox data indicated in the sandbox retention record. If so, it will be launched directly. The existing sandbox application retains the user's operation data from the last time it was exited. In this way, when the existing sandbox application is launched again to access the object, the user can continue to operate the object based on the last exit state, which can improve the user experience.
[0189] It is understood that the interfaces shown in the embodiments of the present application are merely schematic diagrams and do not constitute limitations of the embodiments of the present application. In actual applications, more or fewer interfaces may be included, and each interface may also include more or less content.
[0190] For example, FIG10 shows a flow chart of a sandbox data processing method provided by an embodiment of the present application, which can be applied to a device. As shown in FIG10 , the method includes the following steps:
[0191] S1001: Determine whether the first application in the sandbox exits.
[0192] The first application (ie, the sandbox application) is used to access a first object included in the device. The first object may be any object included in the device. For example, the first object may include but is not limited to data in various forms such as documents, videos, and pictures.
[0193] In some embodiments, before executing step S1001, the device may further detect a user access operation (such as, but not limited to, an open operation) on the first object, and run the first application in response to the access operation. The first object is an object managed by the sandbox mechanism, that is, an object that needs to be accessed through a sandbox application, such as an encrypted object. Optionally, before executing step S1001, the device may further determine that no user operation instructing the first application to exit operation has been obtained. In other words, the exit of the first application is not triggered by the user, and at this time, the first data may not be saved to the disk.
[0194] In some embodiments, the first application may be a clone of a target application installed on the device. The device may create the first application based on the target application, wherein the first application has fewer permissions than the target application, and then run the first application in a sandbox.
[0195] S1002: Retain first data according to a retention policy of the first application.
[0196] The first data (i.e., sandbox data) includes data generated when the first application accesses the first object, such as, but not limited to, operation records generated by the first application or the user operating the first object in the first application. In some embodiments, the first data may be part of the sandbox retention record, that is, the first data and / or an identifier of the first data may be included in the sandbox retention record.
[0197] In some embodiments, the retention policy of the first application is used to indicate that the first data is retained when the first application exits execution.
[0198] In other embodiments, the retention policy of the first application is used to indicate that the first data should be retained when the first application exits and the first data has not been written to the disk. In this embodiment, the device may also determine that the first data has not been written to the disk before executing step S1002.
[0199] In some embodiments, after executing step S1002, the device may further generate a sandbox retention record. The sandbox retention record includes a first startup parameter and an identifier of the first data (i.e., a sandbox identifier). The first startup parameter may be used to indicate access to the first object through the first application. The identifier of the first data may be used to index the first data. For further information about the sandbox retention record, please refer to the above.
[0200] In some embodiments, after generating a sandbox retention record, if the device obtains a first startup parameter, the first data can be obtained based on the first startup parameter and the sandbox retention record. For example, the first startup parameter contained in the sandbox retention record can be matched with the first startup parameter obtained by the device. If the match is successful, if they are identical, it means that the sandbox retention record is the retention record corresponding to the first startup parameter. The first data can then be obtained based on the identifier of the first data contained in the sandbox retention record corresponding to the first startup parameter. Then, based on the first data, the first application is launched to access the first object. In other words, the device can directly launch the previously saved sandbox application to access the first object.
[0201] In some embodiments, the method shown in FIG10 may further include the following steps:
[0202] S1003: Determine whether the second application in the sandbox exits.
[0203] Among them, the second application (i.e., the sandbox application) is used to access the second object included in the device, and the second object may also be an object included in the device other than the first object. For example, the second object may also include but not limited to documents, videos, pictures and other forms of data. Similarly, before executing step S1003, the device may also first detect the user's access operation to the second object (such as but not limited to the open operation, etc.), and run the second application in response to the access operation. Among them, the second object is also an object managed by the sandbox mechanism, that is, an object that needs to be accessed through the sandbox application, such as the second object may be an encrypted object. Optionally, before executing step S1003, the device may also first obtain a user operation instructing the second application to exit the operation, and in response to the user operation, the second application exits the operation. In other words, the exit of the second application is triggered by the user. Optionally, when the user triggers the sandbox application to exit the operation, the sandbox data may have been saved to the disk or may not have been saved to the disk.
[0204] In some embodiments, the second application may also be a clone of an application installed on the device.
[0205] In some embodiments, different objects managed by the sandbox mechanism can be accessed through different sandbox applications. For example, a first object can be opened through a first application, and a second object can be opened through a second application. The first application and the second application are different sandbox applications.
[0206] In other embodiments, different objects managed by the sandbox mechanism can be accessed through the same sandbox application, for example, a first object and a second object can both be accessed through the same sandbox application, such as a third application. Optionally, in this embodiment, the types of different objects accessed through the same sandbox application can be the same, for example, all documents, all videos, or all audio. Of course, the types of different objects accessed through the same sandbox application can also be the same, and this embodiment of the application does not limit this.
[0207] S1004: Do not retain the second data according to the retention policy of the second application.
[0208] The second data (ie, sandbox data) includes data generated when the second object is accessed through the second application, such as but not limited to the operation records generated by the second application and the user operating the second object in the second application.
[0209] In some embodiments, the retention policy of the second application is used to indicate that the second data is not retained when the second application exits execution. In this embodiment, the second data may have been written to the disk for storage or may not have been written to the disk for storage.
[0210] In other embodiments, the retention policy of the second application is used to indicate that the second data is not retained when the second application exits and the second data has been written to the disk. Optionally, before executing step S1004, the device may also first determine whether the second data has been written to the disk.
[0211] Optionally, after executing step S1004, the device may or may not generate a sandbox retention record. Optionally, when the device generates a sandbox retention record, the generated sandbox retention record may include the second startup parameter but not the identifier of the second data.
[0212] In some embodiments, if the device obtains a second startup parameter indicating that the second object is to be accessed through a second application, and if it is determined based on the second startup parameter that the second data does not exist, the device creates a second application to access the second object. In other words, the device may create a new sandbox application to access the second object.
[0213] In some specific implementations, when there is no sandbox retention record corresponding to the second startup parameter, the device can determine that the second data does not exist, and the sandbox retention record corresponding to the second startup parameter can include an identifier of the second startup parameter and an identifier of the second data.
[0214] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and software. Whether a function is executed in a hardware or software-driven hardware manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.
[0215] The embodiment of the present application can divide the functional modules of the device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0216] As shown in FIG11 , which is a schematic diagram of the structure of a device provided in an embodiment of the present application, the device 1100 can be used to implement the methods described in the above method embodiments.
[0217] The processing unit 1101 is used to support the device 1100 in executing any one of the processing functions in FIG. 1 to FIG. 10 .
[0218] Optionally, the device 1100 shown in Figure 11 may further include a storage unit 1102, wherein the storage unit 1102 stores a program or instruction. When the processing unit 1101 executes the program or instruction, the device 1100 shown in Figure 11 may perform the method shown in the above method embodiment.
[0219] Optionally, the device 1100 shown in Figure 11 may further include a display unit 1103. The display unit 1103 may be configured to support the device 1100 in performing display operations.
[0220] Optionally, the device 1100 shown in Figure 11 may further include a communication unit (not shown in Figure 11), which is used to support the device 1100 in executing the steps of communication between the device and other devices in the embodiments of the present application.
[0221] The technical effects of the device 1100 shown in FIG11 can be referenced to the technical effects of the method shown in the above method embodiment and will not be repeated here. The processing unit 1101 involved in the device 1100 shown in FIG11 can be implemented by a processor or processor-related circuit components, such as a processor or processing module. The communication unit can be implemented by a transceiver or transceiver-related circuit components, such as a transceiver or transceiver module. The display unit 1103 can be implemented by display screen-related components.
[0222] The embodiment of the present application also provides a chip system, as shown in Figure 12, which includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 can be interconnected via lines. For example, the interface circuit 1202 can be used to receive signals from other devices. For another example, the interface circuit 1202 can be used to send signals to other devices (such as the processor 1201). Exemplarily, the interface circuit 1202 can read instructions stored in the memory and send the instructions to the processor 1201. When the instructions are executed by the processor 1201, the device can execute the various steps performed by the device in the above embodiment. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
[0223] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0224] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.
[0225] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0226] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0227] An embodiment of the present application further provides a storage medium, in which instructions are stored. When the instructions are executed on a device, the device executes the method described in the above method embodiment.
[0228] An embodiment of the present application provides a program product, which includes: a program or instructions, which, when executed on a device or a computer, enables the device or computer to execute the method described in the above method embodiment.
[0229] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store execution instructions, and when the device is running, the processor can execute the execution instructions stored in the memory to enable the device to execute the methods in the above-mentioned method embodiments.
[0230] Among them, the equipment, storage medium, program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0231] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by 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.
[0232] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0233] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0234] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A sandbox data processing method, characterized in that: Applied to electronic equipment, the method comprises: Detecting a user's access operation to a first object included in the electronic device, where the first object is an encrypted object; In response to the access operation, running a first application, where the first application is a sandbox application and the first application is used to access the first object; It is determined that the first application is exited, and first data is retained according to a retention policy of the first application, where the first data includes data generated when the first object is accessed through the first application.
2. The method according to claim 1, characterized in that The retention policy of the first application is used to indicate that the first data is retained when the first application exits execution.
3. The method according to claim 1 or 2, characterized in that: The retention policy of the first application is used to indicate that when the first application exits and the first data is not written to the disk, the first data is retained; Before retaining the first data according to the retention policy of the first application, the method further includes: It is determined that the first data is not stored in the disk.
4. The method according to any one of claims 1 to 3, characterized in that After retaining the first data according to the retention policy of the first application, the method further includes: A sandbox reservation record is generated, wherein the sandbox reservation record includes a first startup parameter and an identifier of the first data, wherein the first startup parameter is used to indicate access to the first object through the first application.
5. The method according to claim 4, characterized in that The method further comprises: Get the first startup parameter; Acquire the first data according to the first startup parameter and the sandbox retention record; The first application is started to access the first object according to the first data.
6. The method according to any one of claims 1 to 5, characterized in that The step of running the first application in response to the access operation includes: According to the target application installed by the electronic device, installing the first application, the first application is a clone of the target application, and the permissions of the first application are less than the permissions of the target application; The first application is run through a sandbox.
7. The method according to any one of claims 1 to 6, characterized in that Before the first application exits execution, the method further includes: It is determined that no user operation instructing the first application to exit execution is obtained.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: A user operation instructing a second application to exit execution is obtained, where the second application is a sandbox application used to access a second object included in the device, where the second object is an encrypted object; In response to the user operation instructing the second application to exit, the second application exits, and according to a retention policy of the second application, second data is not retained, where the second data includes data generated when the second object is accessed through the second application.
9. The method according to claim 8, characterized in that The retention policy of the second application is used to indicate that the second data is not retained when the second application exits.
10. The method according to claim 8, characterized in that The retention policy of the second application is used to indicate that the second data is not retained when the second application is exited and the second data has been written to the disk; Before not retaining the second data according to the retention policy of the second application, the method further includes: It is determined that the second data has been written to the disk.
11. The method according to any one of claims 8 to 10, characterized in that: The first data includes data corresponding to an installation path of the first application, and the second data includes data corresponding to an installation path of the second application.
12. The method according to any one of claims 8 to 11, characterized in that The method further comprises: A second startup parameter is acquired, where the second startup parameter is used to indicate accessing the second object through the second application; When it is determined according to the second startup parameter that the second data does not exist, the second application is installed, and the second object is accessed through the second application.
13. The method according to claim 12, characterized in that The determining, according to the second startup parameter, that the second data does not exist includes: In a case where there is no sandbox reservation record corresponding to the second startup parameter, it is determined that there is no second data, wherein the sandbox reservation record corresponding to the second startup parameter includes an identifier of the second startup parameter and an identifier of the second data.
14. The method according to claim 4 or 5, characterized in that The retention policy of the first application is also used to indicate one or more of the retention period and encryption method of the first data.
15. The method according to claim 14, characterized in that The sandbox retention record also includes a retention policy for the first application.
16. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, the computer program code comprises computer instructions, and the processor reads the computer instructions from the memory so that the electronic device executes the method as described in any one of claims 1 to 15.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program, and when the computer program is executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 15.
18. A computer program product, characterized in that The computer program product comprises: a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Outgoing document encryption protection method
CN104715209A
Cookie management method and device based on iOS system
CN114282147A
System resource calling method and device
CN116382795A
Resource calling method and device
CN116467704A
Web based data collaboration tool
US20060117247A1