Clipboard management method, electronic device, and related apparatus

CN122963824APending Publication Date: 2026-10-23HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510500083.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]但在可能的实现中,在将剪贴板数据粘贴到虚拟机中后,虚拟机中的任一应用均可访问该剪贴板数据,可能会泄露来源于PC或分布式设备的剪贴板数据,剪贴板数据的安全性较差

Benefits of technology

[0044]应当理解的是,本申请的第二方面至第五方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963824A_ABST
    Figure CN122963824A_ABST
Patent Text Reader

Abstract

The application provides a clipboard management method, an electronic device and related devices, relates to the terminal technical field, and virtual machines running different operating systems in the electronic device; in the method, the electronic device can provide a setting window of a shared clipboard, and the window includes a plurality of access permission controls; a user can authorize access permissions in aspects of data types, device sources, application sources and / or user data detection of clipboard data; after authorization, data can be copied from the electronic device and pasted into the virtual machine; when the data does not meet the access permissions, the data cannot be pasted into the virtual machine. In this way, the clipboard data can be classified in dimensions of data types, device sources and application sources, the authorized range of the shared clipboard is reduced, and the security of the clipboard data is improved; in addition, the electronic device can provide a visual interface of shared clipboard access permissions, and a user can understand the authorized range of the shared clipboard through the interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a clipboard management method, electronic device, and related apparatus. Background Technology

[0002] With the development of terminal technology, data in electronic devices can be transmitted across systems and devices. For example, a personal computer (PC) can run a virtual machine running the Windows operating system, and the PC's operating system may be different from the Windows operating system; the PC can interact with the virtual machine running the Windows operating system across systems. As another example, after establishing a connection between a PC and distributed devices (such as mobile phones, tablets, or other PCs), both the PC and the virtual machine can interact with the distributed devices across devices.

[0003] In a possible implementation, the clipboard can be shared between a PC, a Windows operating system virtual machine, and a distributed device. For example, the virtual machine clipboard can read clipboard data from the PC or the distributed device and paste the clipboard data into the Windows operating system virtual machine. Alternatively, the clipboards of both the PC and the distributed device can read clipboard data from the Windows operating system virtual machine and paste the clipboard data into the PC or the distributed device.

[0004] However, in a possible implementation, after clipboard data is pasted into the virtual machine, any application in the virtual machine can access the clipboard data, which may leak clipboard data originating from a PC or distributed device, resulting in poor security of the clipboard data. Summary of the Invention

[0005] This application provides a clipboard management method, an electronic device, and related apparatus. In scenarios involving cross-device and cross-system clipboard sharing, the electronic device can refine the access permissions for clipboard data pasted into a virtual machine, such as data type, device source, and / or application source. This narrows the scope of shared clipboard authorization, reduces the probability of sharing user information to the virtual machine clipboard, lowers the risk of leaking user information, and improves the security of clipboard data.

[0006] In a first aspect, embodiments of this application provide a clipboard management method applied to an electronic device. The electronic device has a first operating system and a virtual machine running a second operating system. The first operating system is different from the second operating system. The method includes: the electronic device displaying a first window (e.g., a shared clipboard settings window 301 or a shared clipboard settings window 701), the first window including multiple access permission controls; the access permission controls are used to configure access permissions for the shared clipboard between the electronic device and the virtual machine, and the access permission controls include one or more of the following: data type access permission controls (e.g., text control 304, image control 305, graphic control 306, and file control 307, etc.), device type access permission controls (e.g., Phone control 308, PC control 309, Pad control 310, or USB peripheral control 311), application access permission controls (e.g., gallery application control 312 or other application control 313), or controls for indicating the detection of user information (e.g., sensitive data detection control 702).

[0007] In response to a triggered operation on the target control, grant the corresponding access permissions to the target control; the target control is one or more controls among multiple access permission controls; the target control can be, for example... Figure 4 The text control 304, image control 305, and graphic control 306 on interface A; Figure 5 PC control 309, Pad control 310, or USB peripheral control 311 in interface a; Figure 6 Other application controls 313 and in interface a Figure 8 The sensitive data detection control 702 in interface A is an example. Upon triggering this operation, the target control is turned on.

[0008] Electronic devices display a first interface (e.g.) Figure 4 The interface shown in b or Figure 6 The interface shown in b); the first interface includes a second window (a window managed by the first operating system, for example...). Figure 4 File management application window 401 or Figure 6 The gallery application window 601) and the third window (a window managed by the second operating system, such as...) Figure 4 The virtual machine window in the 402 or Figure 6 The virtual machine window 602 in the third window includes the desktop of the electronic device or the application window of the electronic device; the second window includes a first object (e.g., document 2 in file management application window 401 or picture 3 in gallery application window 601), and the third window does not include the first object.

[0009] The electronic device receives the operation for copying or cutting the first object in the second window (e.g. Figure 4 The interface shown in b and Figure 6 The interface shown in b), and the operation for pasting the first object received in the third window (such as...) Figure 4 The interface shown in c and Figure 6 The interface shown in c); where the first object does not meet the access permissions of the target control (e.g., Figure 4 Document 2 is a file that does not have authorized access permissions. Figure 6 The image in image 3 was not authorized to access the gallery app (the source of image 3 is the gallery app).

[0010] The electronic device displays the first object in the second window and does not display the first object in the third window; for unauthorized clipboard data, the electronic device and the virtual machine cannot share the clipboard, pasting fails, and the virtual machine window does not include data copied or cut from the electronic device side.

[0011] In this way, in scenarios involving cross-system and / or cross-device clipboard sharing, clipboard data can be further categorized based on data type, device origin, and application origin. This narrows the scope of shared clipboard authorization, reduces the probability of sharing user information to the virtual machine clipboard, lowers the risk of user information leakage, and improves clipboard data security. Furthermore, electronic devices can provide a visual interface for shared clipboard access permissions, allowing users to understand the scope of shared clipboard authorization and customize access settings to better suit their needs, further enhancing clipboard data security.

[0012] Optionally, data type access control includes one or more of the following: text access control (e.g., text control 304), image access control (e.g., image control 305), image and text access control (e.g., image and text control 306), or file access control (e.g., file control 307). Device type access control includes one or more of the following: mobile phone access control (e.g., Phone control 308), PC access control (e.g., PC control 309), tablet access control (e.g., Pad control 310), or USB peripheral access control (e.g., USB peripheral control 311). Application access control includes one or more of the following: specific application access control (e.g., gallery application control 312) or other application access control (e.g., other application control 313).

[0013] Optionally, access control may also include controls such as "Open All" (302) and "Close All" (303).

[0014] In this way, in scenarios where clipboards are shared across systems and / or devices, clipboard data can be further categorized by data type, device origin, and application origin. This narrows the scope of clipboard sharing authorization, reduces the probability of sharing user information to the virtual machine clipboard, lowers the risk of leaking user information, and improves the security of clipboard data.

[0015] Optionally, after the electronic device establishes communication with the distributed device and enables the access permissions corresponding to the target control, the process also includes: the electronic device receiving a second object (such as...) from the distributed device. Figure 5 In the interface shown in b), document 3 on the mobile phone, the second object is an object copied or cut from the desktop or application window of the distributed device. The electronic device receives an operation for pasting the second object in a third window (e.g., virtual machine window 502). Figure 5 (The operation received by the electronic device in the interface shown in c); where the second object does not meet the access permissions corresponding to the target control; the device source in document 3 is a mobile phone, but the Phone control 308 is in a closed state. The electronic device does not display the second object in the third window; for unauthorized clipboard data, the distributed device and the virtual machine cannot share the clipboard, pasting fails, and the virtual machine window does not include data copied or cut from the distributed device side.

[0016] In this way, in scenarios where clipboards are shared across devices, clipboard data can be further categorized by data type, device origin, and application origin. This narrows the scope of shared clipboard authorization, reduces the probability of sharing user information to the virtual machine clipboard, lowers the risk of leaking user information, and improves the security of clipboard data.

[0017] Optionally, it also includes: the electronic device displaying a prompt message to prompt the user to grant access to the shared clipboard of the first object (e.g., Figure 4 The prompt message 408 appears on the interface shown in d. Figure 5 The prompt message 508 is shown in the interface d shown in the figure. Figure 6 The prompt message shown in d in the interface is 608, etc.; and / or, the prompt message is used to prompt the user that the first object includes user information and ask the user whether to continue using the first object in the third window (e.g., Figure 8 The prompt message 806 is shown in the interface shown in c.

[0018] This allows for pop-up notifications to indicate that the clipboard sharing function has access restrictions, enabling users to adjust access permissions promptly; it also prompts users whether to continue copying user information, thereby increasing users' trust in the security of clipboard data.

[0019] Optionally, in the first interface, the second window also includes a third object, while the third window does not include the third object; after the electronic device displays the first interface, it further includes: the electronic device receiving an operation for copying or cutting the third object in the second window, and receiving an operation for pasting the third object in the third window; wherein the third object satisfies the access permissions corresponding to the target control; the electronic device displays the third object in the third window.

[0020] This process allows clipboard data from an electronic device or distributed device to be pasted into the virtual machine when access permissions are met. The virtual machine window then displays the clipboard data originating from the electronic device or distributed device. For a user interface example of a successful pasting scenario, please refer to [reference needed]. Figure 1 or Figure 2 The interface shown.

[0021] Specifically, with Figure 1 For example, the first interface can be, for instance... Figure 1 In the interface shown in 'a', the third object can be, for example, document 1; the operation to copy or cut the third object received in the second window can be an operation to copy or cut data in the window of the first operating system; the operation to paste the third object received in the third window can be an operation to paste data in the window of the second operating system. The third object can be successfully pasted if it meets the access permissions; for example, after pasting, document 1 will be included in the virtual machine window (e.g., the window of the second operating system).

[0022] The processing flow for this procedure can be referenced from the processing flow of the first object that satisfies the access permissions in S1208-S1210.

[0023] In this way, when sharing the clipboard, access permissions can be used to manage clipboard data securely, ensuring that all data in the virtual machine clipboard is data that meets the access permissions, reducing the probability of user information appearing in the virtual machine clipboard, reducing the risk of virtual machine clipboard data leakage, and improving data security.

[0024] Optionally, the electronic device includes a first module (e.g., a clipboard processing module); in response to a trigger operation on the target control, it enables access permissions corresponding to the target control, including:

[0025] In response to a trigger operation on the target control, the first module (e.g., the clipboard processing module) obtains clipboard configuration parameters. The clipboard configuration parameters are generated based on the target control. The clipboard configuration parameters include the values ​​of multiple access control controls, with the target control's value being the first value and the other controls' values ​​being the second value. Among these, the other controls are controls other than the target control among the multiple access control controls. The first value indicates that the target control is in an open state, and the second value indicates that the other controls are in a closed state. The first module enables the target sub-processing module and the second module (e.g., the electronic device clipboard management module) based on clipboard configuration parameters; the target sub-processing module is the module corresponding to the target control among multiple sub-processing modules (e.g., text processing module, image processing module, graphic and text processing module, and file processing module, the file processing module includes a public sandbox processing module and a private sandbox processing module); the sub-processing module is used to process clipboard data corresponding to data type access control (e.g., text processing module, image processing module, graphic and text processing module, and file processing module) and / or application access control (the file processing module includes a public sandbox processing module and a private sandbox processing module); the second module is used to sense changes in the data of the electronic device clipboard.

[0026] In this way, the target control selected by the user corresponds to the sub-processing module enabled by the electronic device, which helps save system resources and power consumption. The electronic device can cache clipboard configuration parameters to facilitate accurate determination of access permissions for clipboard data based on these parameters. Furthermore, based on the data type authorization mechanism, clipboard data can be further categorized into public sandbox file data and private sandbox file data according to the application source. Managing public and private sandbox file data separately effectively prevents Windows virtual machines from accessing unauthorized private sandbox file data, further enhancing clipboard data security.

[0027] Optionally, after the electronic device receives the operation for copying or cutting the first object in the second window, it further includes: the first module determining whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters; if the first object does not meet the access permissions corresponding to the target control, the first module does not synchronize the first object to the virtual machine clipboard.

[0028] This process corresponds to the relevant descriptions in steps S1205-S1206, and will not be repeated here. Thus, before synchronizing clipboard data to the virtual machine clipboard, the clipboard data can be further categorized by data type, device origin, and application origin, narrowing the scope of shared clipboard authorization, reducing the probability of sharing user information to the virtual machine clipboard, lowering the risk of user information leakage, and improving the security of clipboard data.

[0029] Optionally, before the first module (clipboard processing module) determines whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters, it further includes: in response to an operation for copying or cutting the first object, the electronic device clipboard obtains the first object. The second module (e.g., the electronic device clipboard management module) senses the data changes in the electronic device clipboard and obtains the first object from the electronic device clipboard. When the focus window switches to a third window (e.g., a virtual machine window), the second module (e.g., the electronic device clipboard management module) synchronizes the first object to the first module (clipboard processing module). The electronic device determines whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters, including: the first module matches the data type, application information, and device type of the first object with the clipboard configuration parameters; when the value corresponding to the data type of the first object is a second value, the value corresponding to the device type of the first object is a second value, or the value corresponding to the application information of the first object is a second value, the first module (clipboard processing module) determines that the first object does not meet the access permissions corresponding to the target control. It should be understood that if the value corresponding to any attribute information of the first object is a second value, the first object does not meet the access permissions; if the values ​​corresponding to all attribute information of the first object are first values, the first object meets the access permissions.

[0030] This process corresponds to the relevant descriptions in steps S1202 to S1205, and will not be repeated here. In this way, the electronic device can perceive data changes in its clipboard in real time through the enabled electronic device clipboard management module, reducing the latency of synchronizing from the electronic device clipboard to the virtual machine clipboard in shared clipboard scenarios; changes in the focus window can identify whether the user intends to use the shared clipboard function, improving the user experience; furthermore, the electronic device can manage access permissions for clipboard data through the target control selected by the user, enhancing the security of the clipboard data.

[0031] Optionally, if the target control includes a control for indicating the detection of user information (e.g., the sensitive data detection control 702 is in an enabled state), the electronic device further includes a third module (user information detection module); after the first module determines whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters, it further includes: if the first object meets the access permissions corresponding to the target control, the first module (clipboard processing module) passes the first object to the target sub-processing module. The target sub-processing module performs data format processing on the first object and passes the first object to the third module (user information detection module); wherein, the target sub-processing module is used to support cross-process data transmission between the first module (clipboard processing module) and the virtual machine. The third module (user information detection module) determines whether the first object includes user information. If the first object includes user information, a prompt message is displayed, and the prompt message corresponds to the first control (e.g., the first object is in an enabled state). Figure 8 The interface shown in Figure c contains the continue use control 808 and the second control (e.g., the cancel control 807). In response to a trigger operation on the first control, the third module synchronizes the first object to the virtual machine clipboard; or, in response to a trigger operation on the second control, the third module does not synchronize the first object to the virtual machine clipboard.

[0032] This process can correspond to Figure 8 and Figure 13 The illustrated embodiment demonstrates how, in a shared clipboard scenario, when clipboard data includes user information, a pop-up window can prompt the user whether to continue using the data. This prevents user information from being shared to the virtual machine without the user's knowledge, thus improving data security.

[0033] Optionally, after synchronizing the first object to the virtual machine clipboard, the third module further includes: clearing the first object from the virtual machine clipboard after a preset time. This way, if the user insists on synchronizing clipboard data to the virtual machine for use, the virtual machine can delete historical data from the virtual machine clipboard after a period of time, thereby reducing the time the virtual machine clipboard shares user information and improving data security.

[0034] Optionally, it also includes: when the distributed device is online and the device type of the distributed device meets the access permissions corresponding to the target control, the first module (clipboard processing module) enables the fourth module (distributed device clipboard management module) according to the clipboard configuration parameters. The fourth module is used to sense data changes in the clipboard of the distributed device.

[0035] This process corresponds to steps S1507-S1510. Thus, when a distributed device is connected and its device type is met, the distributed device clipboard management module is enabled to allow it to detect real-time data changes in the distributed device clipboard; when no distributed device is connected or its device type is not met, the distributed device clipboard management module is disabled to save system resources and power consumption.

[0036] Optionally, after the electronic device receives the second object from the distributed device, the method further includes: the first module determining whether the second object meets the access permissions corresponding to the target control based on the clipboard configuration parameters; if the second object does not meet the access permissions corresponding to the target control, the first module does not synchronize the second object to the virtual machine clipboard.

[0037] This process corresponds to the relevant descriptions in steps S1504-S1505, and will not be repeated here.

[0038] In this way, in scenarios where clipboards are shared across devices, clipboard data can be further categorized by data type, device origin, and application origin. This narrows the scope of shared clipboard authorization, reduces the probability of sharing user information to the virtual machine clipboard, lowers the risk of leaking user information, and improves the security of clipboard data.

[0039] In a second aspect, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory is used to store code instructions and the processor is used to execute the code instructions to perform the methods described in the first aspect or any possible implementation thereof.

[0040] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0041] Fourthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0042] Fifthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation thereof. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0043] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0044] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0045] Figure 1 A schematic diagram illustrating a scenario of cross-system clipboard sharing provided in an embodiment of this application;

[0046] Figure 2A schematic diagram illustrating a scenario of sharing a clipboard across devices, provided as an embodiment of this application;

[0047] Figure 3 A schematic diagram of an interface for configuring clipboard access permissions provided in an embodiment of this application;

[0048] Figure 4 This application provides a schematic diagram illustrating a scenario where shared clipboard access permissions are managed via data type, as illustrated in an embodiment of the present application.

[0049] Figure 5 This application provides a schematic diagram illustrating a scenario where shared clipboard access permissions are managed via device source, as illustrated in an embodiment of the present application.

[0050] Figure 6 This application provides a schematic diagram illustrating a scenario where shared clipboard access permissions are managed via an application source, as illustrated in an embodiment of this application.

[0051] Figure 7 A schematic diagram of another interface for configuring clipboard access permissions provided in an embodiment of this application;

[0052] Figure 8 This application provides a schematic diagram illustrating a scenario where shared clipboard access permissions are managed through user information detection.

[0053] Figure 9 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application;

[0054] Figure 10 A schematic diagram of the software structure of an electronic device and a distributed device provided in an embodiment of this application;

[0055] Figure 11 A flowchart illustrating the interaction between various software modules in a scenario of configuring shared clipboard access permissions, provided for embodiments of this application.

[0056] Figure 12 A flowchart illustrating the interaction between software modules in a scenario where shared clipboard access is used across systems, as provided in this application embodiment.

[0057] Figure 13 A schematic diagram of the user information detection process provided in this application embodiment;

[0058] Figure 14 A schematic diagram illustrating the clipboard data flow for detecting different data types provided in an embodiment of this application;

[0059] Figure 15 A flowchart illustrating the interaction between software modules in a scenario where shared clipboard access is used across devices, as provided in this application embodiment.

[0060] Figure 16 A flowchart illustrating a clipboard management method provided in an embodiment of this application;

[0061] Figure 17 This is a schematic diagram of a clipboard management device provided in an embodiment of this application. Detailed Implementation

[0062] To facilitate understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below:

[0063] 1. PC: A PC refers to a multi-purpose computer suitable for personal use, with dimensions, price, and performance. PCs can include desktops, laptops, mini-laptops, tablets, and ultrabooks. PCs can run various operating systems, such as Mac OS, HarmonyOS, Linux, Unix, DOS, and Windows.

[0064] 2. Virtual Machine: A virtual machine is a software-implemented computer that can run on a physical computer (such as a PC), simulating a complete computer system. Virtual machines allow multiple operating systems and applications to run on a single physical hardware device, isolated from each other.

[0065] In this embodiment, the operating system of the PC and the operating system of the virtual machine are different, so as to provide a multi-operating system environment through a single PC. For example, the PC does not run a Windows operating system, such as the PC running the Harmony operating system; the virtual machine runs a Windows operating system; the user can use the PC to run both the Harmony operating system and the Windows operating system simultaneously.

[0066] 3. Distributed devices: Distributed devices refer to computing devices or systems that are geographically dispersed but work collaboratively through network connections. For example, a PC acts as the host, and devices that work collaboratively with the PC through a network connection can be called distributed devices; examples of distributed devices include mobile phones, tablets, and other PC devices.

[0067] 4. Electronic devices:

[0068] The electronic devices in this application embodiment may include handheld devices, vehicle-mounted devices, etc., with shared clipboard functionality. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.

[0069] In this application embodiment, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.

[0070] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.

[0071] 5. Other terms:

[0072] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.

[0073] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0074] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer 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 represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0075] Let's combine the following... Figure 1 and Figure 2 The scenarios of cross-system clipboard sharing and cross-device clipboard sharing involved in the embodiments of this application will be described respectively.

[0076] It should be noted that electronic devices can achieve a multi-operating system environment through virtual machines. Specifically, the electronic device can run a first operating system, and it can also run a second operating system based on a virtual machine; the first and second operating systems are different.

[0077] The following example uses a PC as the electronic device, Harmony OS as the PC's operating system, and Windows OS as the virtual machine's operating system. Figure 1 The scenario of sharing the clipboard across systems in the embodiments of this application is described, such as... Figure 1 As shown:

[0078] The PC can display the desktop, such as Figure 1The interface shown in Figure a is shown in the figure. The PC desktop may include multiple application icons and application windows; the application icons may be, for example, PC management application icon 101 and file management application icon 102; the application window may be, for example, file management application window 103. The PC management application and file management application can be local applications installed on the PC, and the PC can manage the PC management application and file management application using the Harmony operating system. For example, in response to a trigger operation on file management application icon 102, the PC can launch the file management application and display, as shown in Figure a. Figure 1 The file management application window 103 in the interface shown in Figure a can include one or more files stored on the PC, such as Document 1, Document 2 and Picture 1.

[0079] A PC can run a virtual machine with a Windows operating system. For example, in... Figure 1 In the interface shown in Figure 'a', the PC desktop also includes a virtual machine window 104. The virtual machine window 104 can display the interface of the Windows operating system; for example, the virtual machine window 104 can be a full-screen data folder window, which may include image 2. The virtual machine window 104 may also include an identifier for the virtual machine's operating system, such as the operating system name 105, which could be Windows.

[0080] The PC and virtual machine can share the clipboard. After copying a file on the PC, you can paste it into the virtual machine; conversely, after copying a file in the virtual machine, you can paste it into the PC. For example, let's copy data from the PC and paste it into the virtual machine:

[0081] exist Figure 1 In the interface shown in Figure a, when a selection of document 1 and a mouse click are received, the PC can display a shortcut menu 106. The shortcut menu 106 can include options such as open control, cut control, copy control 107, delete control, and rename control. The PC can add data to the virtual machine clipboard based on the cut control or copy control 107. Taking the copy control 107 as an example, when a trigger operation is received for the copy control 107, the PC can copy document 1.

[0082] The PC can share copied data to the virtual machine clipboard. For example, after selecting the virtual machine window 104 with the mouse cursor, the PC can share document 1 copied on the PC to the virtual machine clipboard. For instance, when a mouse click is received in the virtual machine window 104, in response to this operation, a shortcut menu 108 is displayed in the virtual machine window 104. The shortcut menu 108 may include controls for creating a new folder, viewing, refreshing, pasting (109), and properties. The shortcut menu 108 includes the pasting control 109, and the pasting control 109 is not grayed out, indicating that the virtual machine clipboard contains data that can be pasted.

[0083] exist Figure 1 In the interface shown in b, when a trigger operation is received for the paste control 109, the virtual machine can paste the most recently copied or cut data from the clipboard into the data folder. Since the PC and virtual machine previously shared clipboard data, in response to the trigger operation for the paste control 109, document 1 can be displayed in the virtual machine window 104, as shown below. Figure 1 The interface shown in 'c' allows users to copy data on their PC and paste it into the virtual machine.

[0084] This application embodiment only takes copying data from a PC to a virtual machine as an example to illustrate the scenario of cross-system data transfer in this application embodiment; the process of copying data from a virtual machine to a PC is similar to... Figure 1 The scenarios shown are similar and will not be repeated here. Furthermore, this application embodiment only uses files as an example to illustrate the process of copying data and pasting data across systems; data interaction between PCs and virtual machines can also involve elements such as text, images, and graphics, which will not be described in detail in this application embodiment.

[0085] In this embodiment, the electronic device can work collaboratively with the distributed device. For example, when the electronic device and the distributed device are connected to the same network, they can share data. As another example, when the electronic device and the distributed device are logged into the same terminal account, they can share data. Yet another example, when the electronic device and the distributed device complete authentication through a matching code, they can share data.

[0086] Among these, electronic devices can be computer devices with high computing power and fast processing efficiency, whose computing power is sufficient to run virtual machines. Electronic devices can be, for example, PCs. Distributed devices do not need to be limited by computing power. For example, distributed devices can be mobile phones and tablets with less computing power than electronic devices; distributed devices can also be other PCs with computing power greater than or equal to that of electronic devices.

[0087] For example, taking a PC as the electronic device and a mobile phone as the distributed device, Figure 2 The following illustration demonstrates a scenario of cross-device clipboard sharing provided by an embodiment of this application. Figure 2 As shown:

[0088] The PC can display, for example, a file management application window 103 and a virtual machine window 104, such as... Figure 2 As shown in 'a'; related elements in the PC interface can be found by referring to... Figure 1 The relevant descriptions in the interface shown in 'a' are not repeated here.

[0089] The mobile phone can display a social application interface 201, which may include, for example, multiple chat records and input boxes; the multiple chat records may include document 3 202. In response to a trigger action on document 3 202, the electronic device can display a shortcut menu 203, such as... Figure 2 The interface shown in Figure 'a'. The shortcut menu 203 may include a copy control 204, a forward control, a favorite control, and a recall control. In response to a trigger operation on the copy control 204, the mobile phone can copy document 3 202 to the phone's clipboard.

[0090] When the mouse cursor is in the virtual machine window 104 on the PC, the PC can synchronize document 3 202 from the mobile phone clipboard to the virtual machine clipboard. Figure 2 In the interface shown in b, when a mouse click is received, a shortcut menu 205 can be displayed in the virtual machine window 104. The shortcut menu 205 may include a new folder control, a view control, a refresh control, a paste control 206, and a property control. The fact that the paste control 206 is displayed in the shortcut menu 205 and is not grayed out indicates that the virtual machine clipboard contains data that can be pasted.

[0091] exist Figure 2 In the interface shown in b, when a trigger operation is received for the paste control 206, the virtual machine can paste the most recently copied or cut data from the clipboard into the data folder. Since the mobile phone and virtual machine previously shared clipboard data, in response to the trigger operation for the paste control 206, document 3 202 can be displayed in the virtual machine window 104. In this way, the user can copy data on a distributed device and paste it into the virtual machine.

[0092] This application embodiment only takes copying data from a mobile phone to a virtual machine as an example to illustrate the scenario of cross-device data transmission in this application embodiment; the process of copying data from a virtual machine to a mobile phone is similar to... Figure 2The scenarios shown are similar and will not be repeated here. Furthermore, this application embodiment only uses files as an example to illustrate the process of copying data and pasting data across systems; data interaction between PCs, virtual machines, and mobile phones may also involve elements such as text, images, and graphics, which will not be described in detail in this application embodiment.

[0093] It should be noted that this embodiment uses the example of triggering copy, cut, and paste functions by clicking the mouse to illustrate data changes in the virtual machine clipboard. In practical applications, electronic devices, virtual machines, and distributed devices can trigger copy, cut, and / or paste based on other operations.

[0094] For example, electronic devices can trigger copy, cut, and / or paste using keyboard shortcuts; such as using Ctrl+X to cut, Ctrl+C to copy, and Ctrl+V to paste.

[0095] For example, electronic devices can trigger copying and pasting through drag-and-drop operations; such as in Figure 1 In the file management application window 103, the mouse is long-pressed on document 1 and dragged to the virtual machine window 104; during the continuous dragging process, when document 1 crosses the virtual machine window 104, the PC can share document 1 to the virtual machine clipboard; after the drag operation ends (the mouse is released), the virtual machine can paste document 1 from the clipboard into the folder of the virtual machine where the mouse cursor is located.

[0096] For example, electronic devices can copy and paste images via screenshots. For example, electronic devices can perform copy, cut, and paste functions based on voice commands. This application's embodiments will not further exemplify all operations used to trigger copy, cut, and paste.

[0097] It should be noted that the embodiments of this application illustrate various shortcut menu formats, such as shortcut menu 108 with multiple controls arranged vertically, and shortcut menu 203 with multiple controls arranged horizontally. The embodiments of this application do not limit the format of the shortcut menu that triggers copy, cut, and paste operations, nor do they limit the type and style of the controls in the shortcut menu.

[0098] When data from electronic or distributed devices is pasted into a virtual machine clipboard, the clipboard can contain data originating from those devices. A Windows operating system virtual machine can contain multiple applications; during virtual machine operation, these applications can directly access the virtual machine clipboard, making it easy for user information such as user identity information and account passwords from electronic or distributed devices to be leaked.

[0099] In view of this, embodiments of this application provide a clipboard management method. When an electronic device uses a virtual machine to share a clipboard across systems and / or devices, the electronic device can filter the data in the clipboard to reduce the probability of pasting user information into the virtual machine clipboard. Specifically, the electronic device can manage permissions based on the device source, data type, and / or application source of the clipboard data. When the clipboard data meets the access permissions, the clipboard data is pasted into the virtual machine. The importance of data with access permissions is lower than that of data with restricted access permissions. This reduces the probability of user information from electronic devices or distributed devices appearing in the virtual machine clipboard, thereby reducing the risk of user information leakage when virtual machine applications access the clipboard and improving the security of the virtual machine clipboard.

[0100] In this embodiment, electronic devices can enhance the security of data shared in a virtual machine clipboard through multi-dimensional access permission management. For example, after an electronic device or distributed device copies or cuts data, the electronic device can manage access permissions for the clipboard data. When the clipboard data meets the access permissions, the virtual machine clipboard can synchronize the clipboard data; when the clipboard data does not meet the access permissions, the virtual machine clipboard can not synchronize the clipboard data.

[0101] In scenarios involving shared clipboards, access permissions can include one or more of the following: permitted data types, permitted devices, permitted applications, or the ability to detect user information. The following section combines... Figures 3-8 The scenario of shared clipboard management based on access permissions in the embodiments of this application will be described.

[0102] Figure 3 This illustration shows a schematic diagram of an interface for configuring clipboard access permissions according to an embodiment of this application. Figure 3 As shown:

[0103] In this embodiment, the switch for configuring clipboard access permissions can be set in a Harmony Application Package (Hap). After running the Hap application, the electronic device can access the shared clipboard settings window based on the settings function in the Hap application, such as... Figure 3 The shared clipboard settings window 301 in the interface shown in Figure a. The shared clipboard settings window 301 may include multiple access permission controls.

[0104] In some embodiments, the shared clipboard settings window 301 can provide the function of enabling or disabling all access permissions with one click. For example, the shared clipboard settings window 301 may include an enable all control 302 and a disable all control 303; the enable all control 302 can be used to quickly enable all access permissions when sharing the clipboard; the disable all control 303 can be used to quickly disable all access permissions when sharing the clipboard.

[0105] In other embodiments, the shared clipboard settings window 301 provides the ability to customize shared clipboard access permissions. For example, the shared clipboard settings window 301 includes controls such as data type access permission controls, device type access permission controls, and / or application access permission controls.

[0106] Specifically, data type access control can be used to manage permissions for the data types of clipboard data; the data type access control may include one or more of the following: text control 304, image control 305, image and text control 306, and file control 307. Among them, text control 304, image control 305, image and text control 306, and file control 307 can all be toggled between an on and off state.

[0107] For example, when the text control 304 is closed, the electronic device or distributed device cannot share text to the virtual machine clipboard; when the text control 304 is open, the electronic device or distributed device can share text to the virtual machine clipboard. When the image control 305 is closed, the electronic device or distributed device cannot share images to the virtual machine clipboard; when the image control 305 is open, the electronic device or distributed device can share images to the virtual machine clipboard. When the graphic control 306 is closed, the electronic device or distributed device cannot share graphic control to the virtual machine clipboard; when the graphic control 306 is open, the electronic device or distributed device can share graphic control to the virtual machine clipboard. When the file control 307 is closed, the electronic device or distributed device cannot share files to the virtual machine clipboard; when the file control 307 is open, the electronic device or distributed device can share files to the virtual machine clipboard.

[0108] The text and images can be formatted images and / or text, for example, the text and images can be HyperText Markup Language (HTML) text.

[0109] Device type access control can be used to manage permissions for distributed device sources of clipboard data. Device type access control may include one or more of the following: Phone control 308, PC control 309, Pad control 310, or USB peripheral control 311. Among these, Phone control 308, PC control 309, Pad control 310, and USB peripheral control 311 can all be toggled between an on and off state.

[0110] For example, when Phone control 308 is closed, the phone cannot share data to the virtual machine clipboard; when Phone control 308 is open, the phone can share data to the virtual machine clipboard. When PC control 309 is closed, the PC cannot share data to the virtual machine clipboard; when PC control 309 is open, the PC can share data to the virtual machine clipboard; the PC from which the device originates can be any PC other than the PC used by the electronic device. When Pad control 310 is closed, the Pad cannot share data to the virtual machine clipboard; when Pad control 310 is open, the Pad can share data to the virtual machine clipboard. When USB peripheral control 311 is closed, the USB peripheral cannot share data to the virtual machine clipboard; when USB peripheral control 311 is open, the USB peripheral can share data to the virtual machine clipboard; the USB peripheral can be an external device capable of storing text, images, graphics, and files, such as a USB flash drive.

[0111] Application access control can be used to manage permissions for the application source of clipboard data. Application access control may include one or more of the following: Gallery application control 312 or other application controls 313. Both Gallery application control 312 and other application controls 313 can be toggled between an on and off state.

[0112] For example, when the Gallery application control 312 is closed, the electronic device or distributed device cannot share clipboard data from the Gallery application to the virtual machine clipboard; when the Gallery application control 312 is open, the electronic device or distributed device can share clipboard data from the Gallery application to the virtual machine clipboard. Similarly, when other application controls 313 are closed, the electronic device or distributed device cannot share clipboard data from other applications to the virtual machine clipboard; when other application controls 313 are open, the electronic device or distributed device can share clipboard data from other applications to the virtual machine clipboard.

[0113] It should be noted that this application embodiment only uses a gallery application as an example to illustrate the permission management process for application sources. In practical applications, electronic devices can also set access permission controls for other applications; for example, application access permission controls can also include memo application controls and note application controls, etc. This application embodiment does not limit the application sources that can be used to restrict shared clipboard access permissions.

[0114] exist Figure 3 In the interface shown in Figure 'a', multiple controls can be in a closed state. For example, control 303 is in an open state, while other controls are in a closed state. In some embodiments, the initial state of multiple controls can be as follows: Figure 3 As shown in interface a. When the electronic device uses the clipboard function for the first time, the device can guide the user to view and understand the shared clipboard function through prompts; the user can then use, for example, ... Figure 3 The interface shown in 'a' allows for customized settings or one-click access to the shared clipboard. Alternatively, when the user uses the shared clipboard function, if multiple controls are closed, the electronic device and virtual machine cannot share the clipboard; the electronic device can prompt the user to enable shared clipboard access.

[0115] It is understandable that when multiple controls are initially in an "on" state, during the user's use of the shared clipboard, the electronic device can share clipboard data of all data types, all device sources, or all application sources to the virtual machine without any prompting information; the user may not be aware of the shared clipboard access permission management function provided in this application embodiment. Therefore, in this application embodiment, the initial state of multiple controls can be a "off" state, for example, all controls 303 are in an "on" state.

[0116] In this embodiment of the application, users can customize or enable access permissions for multiple controls with a single click.

[0117] For example, in Figure 3 In the interface shown in Figure a, when a trigger operation is received for all open controls 302, the electronic device can enter... Figure 3 The interface shown in b is shown in the image. Figure 3 In the interface shown in b, multiple controls can be in the open state; for example, all controls 302, text control 304, image control 305, graphic control 306, file control 307, Phone control 308, PC control 309, Pad control 310, USB peripheral control 311, gallery application control 312, and other application controls 313 are all in the open state.

[0118] For example, in Figure 3In the interface shown in Figure a, when a trigger operation is received for one or more controls other than the "All On" control 302 and the "All Off" control 303, the electronic device can switch one or more controls from the off state to the on state, and enable the access permissions corresponding to one or more controls. When some controls are on and others are off, both the "All On" control 302 and the "All Off" control 303 can be in the off state.

[0119] It should be noted that the embodiments in this application only illustrate a scenario of enabling access permissions. When multiple controls are in an enabled state, the electronic device can switch multiple controls from an enabled state to a disabled state based on trigger operations on the multiple controls, such as from... Figure 3 Switching to the interface shown in b Figure 3 The interface shown in 'a' in this embodiment will not be described in detail here.

[0120] In this way, clipboard data can be further categorized by data type, device origin, and application origin, narrowing the scope of shared clipboard authorization, reducing the probability of sharing user information to the virtual machine clipboard, lowering the risk of user information leakage, and improving clipboard data security. In addition, electronic devices can provide a visual interface for shared clipboard access permissions, allowing users to understand the scope of shared clipboard authorization and customize access permissions according to their own needs, further enhancing clipboard data security.

[0121] The above embodiments illustrate scenarios for enabling or disabling access permissions to the shared clipboard. The following will combine... Figures 4-6 This application describes several scenarios where access permissions are restricted when sharing the clipboard.

[0122] Figure 4 This illustration shows a scenario where shared clipboard access permissions are managed via data type, as provided in an embodiment of this application. Figure 4 As shown:

[0123] The authorization details for the data types allowed to be shared in the shared clipboard are as follows: Figure 4 As shown in Figure a, text control 304, image control 305, and graphic control 306 are all in the open state, while file control 307 is in the closed state.

[0124] Taking a PC as an example, in a shared clipboard scenario, the electronic device can display, for instance, the following: Figure 4 The interface shown in b is shown in the image. Figure 4The interface shown in b can include a file management application window 401 and a virtual machine window 402. The file management application can be an application installed on the PC, and the file management application window 401 can include, for example, Document 1, Document 2, and Picture 1. The virtual machine window 402 can be, for example, a full-screen window of a data folder in a virtual machine, and the virtual machine window 402 can include Picture 2.

[0125] When a trigger action is received for document 2, the PC can display shortcut menu 403, such as... Figure 4 The interface shown in b is shown in the image. The shortcut menu 403 may include options such as open control, cut control, copy control 404, delete control, and rename control. In response to a trigger operation on the copy control 404, the PC can add document 2 to the PC's clipboard.

[0126] When the mouse cursor is positioned within virtual machine window 402, the PC can share the clipboard with the virtual machine. The PC can attempt to share document 2 from its clipboard to the virtual machine's clipboard. During clipboard sharing, the PC can manage access permissions for document 2. Figure 4 In the interface shown in Figure a, if file control 307 is closed, the PC's clipboard cannot share file content with the virtual machine's clipboard. In this case, document 2 is not pasted into the virtual machine's clipboard.

[0127] exist Figure 4 In the interface shown in c, when a trigger operation is received in the virtual machine window 402, the electronic device can display a shortcut menu 405; the shortcut menu 405 may include a new folder control, a view control, a refresh control, a paste control 406, and a property control, etc.

[0128] In one possible implementation, the virtual machine clipboard does not share data with the PC clipboard, and the virtual machine clipboard may not contain the data to be pasted. In this case, the paste control 406 can be grayed out to indicate to the user that there is no data to be pasted in the virtual machine clipboard; the virtual machine cannot paste document 2 into the virtual machine window 402 via the paste control 406.

[0129] Optionally, when the user triggers the grayed-out paste control 406, the PC or virtual machine can notify the user via a prompt message that document 2 cannot be pasted into the virtual machine window 402. For example, in the virtual machine window, a prompt pop-up window 407 can be displayed to the user; the prompt pop-up window 407 may include a prompt message 408, a cancel control 409, and a settings control 410. The prompt message 408 informs the user that the file cannot be pasted into the virtual machine window 402, and the prompt message 408 may be, for example, "Paste failed, please enable clipboard access permissions for the file." The cancel control 409 can be used to close the prompt pop-up window 407. The settings control 410 can be used to set access permissions for the shared clipboard; for example, when the user wants to share the file content in the clipboard, the user can click... Figure 4 The settings control 410 in the interface shown in d; in response to a trigger operation on the settings control 410, the PC can display as shown in d. Figure 3 The interface shown allows users to authorize access permissions for files in the data type settings window of the shared clipboard.

[0130] If pasting document 2 fails, document 2 may not be included in the virtual machine window 402.

[0131] In another possible implementation, when the paste control 406 is grayed out, the user may not trigger it, resulting in the user not noticing the pop-up prompt. In this embodiment, the paste control 406 may be in a non-grayed-out state (this scenario is not shown). After the user clicks the paste control 406, a pop-up prompt 407 is displayed in the virtual machine window 402 to ask the user whether to modify the access permissions of the shared clipboard.

[0132] Alternatively, the PC can prompt the user that the file cannot be copied and that clipboard access permission needs to be enabled when the mouse cursor is in virtual machine window 402.

[0133] In another possible implementation, the virtual machine clipboard contains data not shared with the PC's clipboard, and the virtual machine clipboard uses the content copied last time; for example, the data to be pasted in the virtual machine clipboard is image 2. In this case, in response to a trigger operation on the paste control 406, the virtual machine can paste a copy of image 2 in the virtual machine window 402; at the same time, the virtual machine window 402 can prompt the user, for example, through a pop-up window 407, whether to modify the access permissions of the shared clipboard. This avoids the scenario where the user mistakenly believes that the copy operation was not successfully triggered when copying content but being unable to paste it; at the same time, it can inform the user of the reason for the difference between the copied and pasted content through a prompt message.

[0134] It should be noted that this application embodiment only uses the example of copying, cutting, and pasting files through a shortcut menu to illustrate access permissions for data types. This application embodiment can also employ various copying, cutting, and pasting methods as shown in the above embodiments to manage access permissions for clipboard data of various data types; these will not be described in detail here.

[0135] It is understandable that in scenarios where users only need to copy and paste files, if the electronic device does not restrict access permissions for multiple data types, the PC can synchronize various types of data to the virtual machine clipboard. Applications in the virtual machine can then access content copied from the PC, such as images, graphics, and text, potentially leading to the leakage of other types of clipboard data. However, in this embodiment, clipboard data can be further categorized by data type to narrow the scope of shared clipboard access permissions, thereby reducing the risk of the virtual machine's operating system leaking clipboard data.

[0136] Figure 5 This illustration shows a scenario where shared clipboard access permissions are managed via device origin, as provided in an embodiment of this application. Figure 5 As shown:

[0137] The authorization details for the device sources allowed to be shared in the shared clipboard can be as follows: Figure 5 As shown in Figure a; in this figure, PC control 309, Pad control 310 and USB peripheral control 311 are all in the open state, while Phone control 308 is in the closed state.

[0138] Taking a PC as the electronic device and a mobile phone as the distributed device, in a shared clipboard scenario, the PC can display, for example... Figure 5 The interface shown in b is shown in the image. Figure 5 The interface shown in b can include a file management application window 501 and a virtual machine window 502. The file management application can be an application installed on the PC, and the file management application window 501 can include, for example, Document 1, Document 2, and Picture 1. The virtual machine window 502 can be, for example, a full-screen window of a data folder in a virtual machine.

[0139] In a shared clipboard scenario, the phone can display something like this: Figure 5 The interface shown in b is shown in the image. Figure 5 The interface shown in b in the document could be, for example, a social application interface, which could include document 3.

[0140] When a trigger action is received for document 3, the phone can display a shortcut menu 503, such as... Figure 5 The interface shown in b is as follows. The shortcut menu 503 may include a copy control 504, a forward control, a favorite control, and an undo control. In response to a trigger operation on the copy control 504, the phone can add document 3 to the phone's clipboard.

[0141] When the mouse cursor is moved to the virtual machine window 502, the mobile phone can share the clipboard with the virtual machine via the PC. The mobile phone can attempt to share document 3 from its clipboard to the virtual machine clipboard. During clipboard sharing, the PC can manage access permissions for the device origin of document 3. Figure 5 In the interface shown in Figure a, if the mobile control 308 is in the closed state, the mobile clipboard cannot share data with the virtual machine clipboard. In this case, document 3 is not pasted into the virtual machine clipboard.

[0142] exist Figure 5 In the interface shown in c, when a trigger operation is received in the virtual machine window 502, the virtual machine can display a shortcut menu 505. The shortcut menu 505 may include controls for creating a new folder, viewing, refreshing, pasting (506), and properties. The virtual machine clipboard does not share data with the phone's clipboard, and may not contain the data to be pasted. In this case, the virtual machine cannot paste document 3 into the virtual machine window 502 using the pasting control 506.

[0143] For example, in response to a triggered operation on the paste control 506, document 3 is not successfully pasted into the virtual machine window 502. The virtual machine window 502 may not contain document 3. Figure 5 The interface shown in d is shown in the image.

[0144] For example, in response to a trigger operation on the paste control 506, the PC or virtual machine can notify the user that mobile phone data cannot be pasted into the virtual machine window 502 via a prompt message. For instance, in the virtual machine window 502, a prompt pop-up window 507 may be displayed to the user; the prompt pop-up window 507 may include a prompt message 508, a cancel control 509, and a settings control 510. The prompt message 508 informs the user that mobile phone data cannot be pasted into the virtual machine window 502, and the prompt message 508 may be, for example, "Paste failed, please enable access to the phone's clipboard." The cancel control 509 can be used to close the prompt pop-up window 507. The settings control 510 can be used to set access permissions for the shared clipboard; for example, when a user wants to share data in the phone's clipboard, the user can click... Figure 5 The settings control 510 in the interface shown by d; in response to a trigger operation on the settings control 510, the PC can display as shown in the image. Figure 3 As shown in the interface, users can authorize access permissions for device sources in the shared clipboard settings window.

[0145] The process of triggering the pop-up notification can be found in the following reference. Figure 4The relevant descriptions of the three possible implementation methods are not repeated here; in addition, the embodiments of this application may also use other methods to trigger the prompt pop-up window, or ask the user whether to modify the access permissions in other ways, and the embodiments of this application do not limit this.

[0146] It should be noted that this application embodiment only uses the example of copying, cutting, and pasting data from a mobile phone via a shortcut menu to illustrate access permissions for the device source. This application embodiment can also employ various copying, cutting, and pasting methods as shown in the above embodiments to manage access permissions for clipboard data from various device types; these will not be described in detail here.

[0147] It is understandable that users frequently use mobile devices such as smartphones, which can contain a large amount of user information. When the electronic device does not identify the device origin of the distributed device, clipboard data from the mobile device can be synchronized to the virtual machine clipboard via a PC. Applications in the virtual machine can access this clipboard data from the mobile device, potentially leading to the leakage of user information. However, in this embodiment, clipboard data can be further categorized based on its device origin to narrow the scope of shared clipboard access permissions, thereby reducing the risk of the virtual machine's operating system leaking clipboard data.

[0148] Figure 6 This illustration shows a scenario where shared clipboard access permissions are managed through an application source, as provided in an embodiment of this application. Figure 6 As shown:

[0149] The authorization details for the data types allowed to be shared in the shared clipboard are as follows: Figure 6 As shown in Figure a; in this figure, the gallery application control 312 is in the closed state, while other application controls 313 are in the open state.

[0150] Taking a PC as an example, in a shared clipboard scenario, the electronic device can display, for instance, the following: Figure 6 The interface shown in b is shown in the image. Figure 6 The interface shown in b may include a gallery application window 601 and a virtual machine window 602. The gallery application can be an application installed on the PC, and the gallery application window 601 may include, for example, images 3 and 4. The virtual machine window 602 may be, for example, a full-screen window of a data folder in a virtual machine, and the virtual machine window 602 may include image 2.

[0151] When a trigger action is received for image 3, the PC can display shortcut menu 603, such as... Figure 6The interface shown in b is as follows. The shortcut menu 603 may include options such as open control, cut control, copy control 604, delete control, and rename control. In response to a trigger operation on the copy control 604, the PC can add image 3 to the PC clipboard.

[0152] When the mouse cursor is positioned within the virtual machine window 602, the PC can share the clipboard with the virtual machine. The PC can attempt to share image 3 from its clipboard to the virtual machine's clipboard. During clipboard sharing, the PC can manage access permissions for the application source of image 3. Figure 6 In the interface shown in Figure a, if the Gallery application control 312 is closed, the PC's clipboard cannot share data from the Gallery application with the virtual machine's clipboard. In this case, the virtual machine clipboard does not have image 3 pasted on it.

[0153] exist Figure 6 In the interface shown in Figure c, when a trigger operation is received in the virtual machine window 602, the electronic device can display a shortcut menu 605. The shortcut menu 605 may include controls for creating a new folder, viewing, refreshing, pasting (606), and properties. The virtual machine clipboard does not share data with the PC's clipboard gallery application, and therefore may not contain the data to be pasted. In this case, the virtual machine cannot paste image 3 into the virtual machine window 602 using the pasting control 606.

[0154] For example, in response to a triggered operation on the paste control 606, if image 3 is not successfully pasted into the virtual machine window 602, image 3 may not be present in the virtual machine window 602. Figure 6 As shown in the d interface.

[0155] For example, in response to a trigger operation on the paste control 606, the PC or virtual machine can notify the user that gallery data cannot be pasted into the virtual machine window 602 via a prompt message. For instance, in the virtual machine window, a prompt pop-up 607 may be displayed to the user; the prompt pop-up 607 may include a prompt message 608, a cancel control 609, and a settings control 610. The prompt message 608 informs the user that data from the gallery application cannot be pasted into the virtual machine window 602; the prompt message 608 may be, for example, "Paste failed, please enable clipboard access permissions for the gallery application." The cancel control 609 can be used to close the prompt pop-up 607. The settings control 610 can be used to set access permissions for the shared clipboard; for example, when the user wants to share clipboard data from the gallery application, the user can click... Figure 6 The settings control 610 in the interface shown by d; in response to a trigger operation on the settings control 610, the PC can display as shown in the image. Figure 3 The interface shown allows users to authorize access permissions for application sources in the shared clipboard settings window.

[0156] The process of triggering the pop-up notification can be found in the following reference. Figure 4 The relevant descriptions of the three possible implementation methods are not repeated here; in addition, the embodiments of this application may also use other methods to trigger the prompt pop-up window, or ask the user whether to modify the access permissions in other ways, and the embodiments of this application do not limit this.

[0157] It should be noted that this application embodiment only uses the example of copying, cutting, and pasting data from a PC gallery application via a shortcut menu to illustrate access permissions for application sources. This application embodiment can also employ various copying, cutting, and pasting methods as shown in the above embodiments to manage access permissions for clipboard data from multiple application sources; these will not be described in detail here.

[0158] It is understood that some applications may include a significant amount of user information. For example, a gallery application may store user facial photos, and a memo application may record user personal information such as usernames and passwords. For these applications, embodiments of this application can specify the application source to reduce the sharing of clipboard data from applications such as the gallery and memo applications. This allows for a more detailed classification of clipboard data based on the application source, narrowing the scope of authorized clipboard access permissions and thus reducing the risk of clipboard data leakage from the virtual machine's operating system.

[0159] In this embodiment, on the one hand, the electronic device can improve the security of clipboard data by refining the clipboard data to narrow the authorized scope. On the other hand, the electronic device can also prompt the user when it detects that the clipboard data includes user information, thereby improving the security of the clipboard data. The following describes... Figure 7 and Figure 8 The corresponding clipboard management method will be explained.

[0160] Figure 7 This illustration shows another interface diagram for configuring clipboard access permissions provided in an embodiment of this application, such as... Figure 7 As shown:

[0161] exist Figure 3 Based on the illustrated embodiment, the electronic device can display a shared clipboard settings window 701, such as... Figure 7 The interface shown in Figure 'a' includes, in addition to data type access control, device type access control, and application access control. Figure 7 The interface shown in Figure 'a' may also include controls for indicating the detection of user information, such as the sensitive data detection control 702. The sensitive data detection control 702 can be toggled between an on and off state.

[0162] For example, when the sensitive data detection control 702 is in the off state, the electronic device does not detect the clipboard data when the electronic device or distributed device shares clipboard data with the virtual machine. The shared clipboard data may include user information.

[0163] For example, when the sensitive data detection control 702 is enabled, the electronic device can detect clipboard data when sharing clipboard data with a virtual machine. If the clipboard data does not contain user information, the virtual machine can share the clipboard data. If the clipboard data includes user information, a prompt message can be triggered to inform the user that pasting clipboard data poses a risk of personal information leakage.

[0164] In the embodiments of this application, Figure 7 In the interface shown in Figure a, the sensitive data detection control 702 can be in a closed state. When a trigger operation is received for the sensitive data detection control 702, the electronic device can switch the sensitive data detection control 702 from the closed state to the open state, and enable user information detection.

[0165] Optional, in Figure 7 In the interface shown in b, the sensitive data detection control 702 can be in the on state. When a trigger operation is received for the sensitive data detection control 702, the electronic device can switch the sensitive data detection control 702 from the on state to the off state, and disable user information detection.

[0166] In this way, when sharing the clipboard, user information in the clipboard data can be identified; electronic devices and / or distributed devices can directly share clipboard data that does not include user information with virtual machines; when sharing clipboard data that includes user information, the system can intercept and display a pop-up notification to the user to reduce the leakage of user information and further improve the security of clipboard data.

[0167] Figure 8 This illustration shows a scenario where shared clipboard access permissions are managed through user information detection, as provided in an embodiment of this application. Figure 8 As shown:

[0168] When sharing a clipboard, the authorization status of user information can be detected as follows: Figure 8 As shown in Figure a, the sensitive data detection control 702 is in the open state.

[0169] Taking a PC as an example, in a shared clipboard scenario, the PC can display, for instance, the following: Figure 8 The interface shown in b is shown in the image. Figure 8The interface shown in b can include a document 1 window 801 and a virtual machine window 802. Document 1 can be a document stored locally on the PC, and the document 1 window 801 can include, for example, multiple lines of text, including user information such as name and mobile phone number. The virtual machine window 802 can be, for example, a full-screen window of document 3, and the virtual machine window 802 can also include multiple lines of text.

[0170] When a trigger action is received for the selected text, the PC can display the shortcut menu 803, such as... Figure 8 The interface shown in b is as follows. The shortcut menu 803 may include a copy control 804, a forward control, a favorite control, and an undo control. In response to a trigger operation on the copy control 804, the PC can add the selected text to the PC's clipboard.

[0171] When the mouse cursor is positioned in virtual machine window 802, the PC and virtual machine can share the clipboard. The PC can attempt to share selected text from its clipboard to the virtual machine's clipboard. Figure 8 In the interface shown as 'a', the sensitive data detection control 702 is enabled; during clipboard sharing, the PC can detect the selected text. If the PC determines that the selected text includes user information, the PC can choose to share the data in the virtual machine clipboard or not, depending on the user's selection.

[0172] When the selected text includes user information, the PC can prompt the user via a pop-up window whether they want to continue using the clipboard data that includes user information. For example... Figure 8 In the interface shown as c, the PC can display a pop-up window 805, which may include a prompt message 806, a cancel control 807, and a continue-use control 808. The prompt message 806 informs the user that user information exists in the currently copied content and asks whether to continue; for example, the prompt message 806 may state "User information exists in the copied text." The cancel control 807 can be used to close the prompt pop-up window 805, canceling the copy-paste operation. The continue-use control 808 can be used to share clipboard data including user information to the virtual machine clipboard.

[0173] In some cases, users may want to share clipboard data, including user information. Users can click [link to clipboard]. Figure 8 In the interface shown in 'c', the "Continue Using Control 808" option is used. In response to a trigger action on "Continue Using Control 808", the virtual machine clipboard can be synchronized to the selected text. The virtual machine can then paste the selected text.

[0174] For example, in Figure 8In the interface shown as d, when a trigger operation is received in the virtual machine window 802, the virtual machine window 802 can display a shortcut menu 809. The shortcut menu 809 includes controls for creating a new folder, viewing, refreshing, pasting (810), and properties. In response to a trigger operation on the pasting control 810, selected text, such as name and phone number (or other user information), is pasted into the virtual machine window 802. Figure 8 The interface shown in 'e'.

[0175] In other cases, users may not want to share clipboard data that includes user information. Users can click [here]. Figure 8 The cancel control 807 in the interface shown in Figure c; in response to the triggering operation of the cancel control 807, the current clipboard sharing operation is canceled. Subsequently, when a paste operation is received in the virtual machine window 802, user information such as name and mobile phone number (not shown in the figure) may not be displayed in the virtual machine window 802.

[0176] It should be noted that this application embodiment only uses the example of copying, cutting, and pasting data from a PC via a shortcut menu to illustrate access permissions for user information detection. This application embodiment can also employ various copying, cutting, and pasting methods as shown in the above embodiments to manage clipboard data permissions, and these will not be described in detail here.

[0177] It is understandable that even after finely classifying and managing clipboard data by data type, device source, and / or application source, user information may still appear in the clipboard data, leading to user information leakage. By managing access permissions for data type, device source, and / or application source, this application embodiment can further restrict users from sharing their information to the virtual machine clipboard without their knowledge through user information detection, thereby reducing user information in the virtual machine clipboard and thus lowering the risk of the virtual machine's operating system leaking clipboard data.

[0178] The above embodiments illustrate the scenarios of the clipboard management method provided in this application. The following will describe these scenarios in conjunction with... Figures 9-15 The processing flow of the clipboard management method provided in the embodiments of this application will be described.

[0179] To facilitate understanding of the technical solutions in the embodiments of this application, the following will first be combined with... Figure 9 The hardware structure of the electronic device in the embodiments of this application will be described. Figure 9 This is a schematic diagram of the structure of an electronic device to which this application applies, such as... Figure 9 As shown:

[0180] For example, Figure 9 A schematic diagram of the electronic device is shown.

[0181] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, buttons 190, an indicator 192, a camera 193, and a display screen 194, etc.

[0182] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0183] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). Different processing units may be independent devices or integrated into one or more processors. The controller may be the nerve center and command center of the electronic device; it can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0184] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the aforementioned memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0185] In this embodiment, the processor 110 can execute processes related to managing access permissions for the shared clipboard. For example, when configuring access permissions for the shared clipboard, the processor 110 can generate clipboard configuration parameters based on user-authorized access permission controls and enable related modules associated with access permissions. When using the shared clipboard function, the processor 110 can manage access permissions for clipboard data from electronic devices or distributed devices; after the clipboard data meets the access permissions, the clipboard data is synchronized to the virtual machine to improve the security of the clipboard data in the virtual machine.

[0186] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor. For example, in this embodiment, the processor can execute instructions stored in internal memory to cause the electronic device to perform the clipboard management method provided in this embodiment.

[0187] USB port 130 is a USB standard compliant interface, which can be a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic devices, and can also be used for data transfer between electronic devices and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0188] In this embodiment, the electronic device can interact with USB peripherals via a USB interface; in a shared clipboard scenario, the electronic device can synchronize clipboard data from the USB peripheral to the virtual machine.

[0189] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, 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), and infrared (IR) technologies.

[0190] The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via an antenna, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on them, and then convert them into electromagnetic waves for radiation via the antenna.

[0191] In this embodiment of the application, the electronic device can establish communication with distributed devices through a wireless communication module to realize the cross-device clipboard sharing function.

[0192] The electronic device implements display functions through a GPU, a display screen 194, and an application processor. The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In this embodiment, the electronic device can display a visual shared clipboard settings window to the user via the display screen 194, for example... Figure 3 or Figure 7 The interface shown.

[0193] It is understood that the modules and their connections illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may employ different modules or connection methods than those described in the above embodiments.

[0194] Figure 10 The following is a schematic diagram of the software structure of the electronic device and distributed device provided in the embodiments of this application, such as... Figure 10 As shown:

[0195] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. Taking a PC as an example, an electronic device can be divided into user mode and kernel mode. User mode is used to run applications and restricts direct hardware access to protect system security. Kernel mode is used to manage hardware resources and execute system calls, maintaining system stability and security.

[0196] like Figure 10 As shown: User mode can include system applications and / or third-party applications on an electronic device; for example, gallery applications, file management applications, desktop applications, and Hap applications. The electronic device can copy or cut clipboard data from desktop applications or application windows (such as gallery applications and file management applications). Hap applications can provide a visual user interface for configuring access permissions to the shared clipboard, such as... Figure 3 or Figure 7 The interface shown allows users to enable / disable clipboard control permissions by category according to their actual needs.

[0197] In this embodiment of the application, the kernel state may include: a clipboard permission configuration module, a clipboard processing module (e.g., a first module), an electronic device clipboard, an electronic device clipboard management module (e.g., a second module), a distributed device awareness module, a distributed device clipboard management module (e.g., a fourth module), a sub-processing module, a pop-up module, and a virtual machine.

[0198] Specifically, the clipboard permission configuration module can be used to set access permissions for the shared clipboard of Hap applications; the clipboard permission configuration module can generate clipboard configuration parameters based on the access permission switches that are enabled, and then pass the clipboard configuration parameters to the clipboard processing module.

[0199] The clipboard processing module can be used to manage clipboard data interaction between electronic devices, distributed systems, and virtual machines according to clipboard configuration parameters; and to enable corresponding sub-processing modules according to clipboard configuration parameters.

[0200] The clipboard of an electronic device stores clipboard data.

[0201] The electronic device clipboard management module can be used to detect changes in the electronic device clipboard and synchronize the clipboard data.

[0202] The distributed device sensing module can be used to sense the online and offline status of distributed devices, and update the online distributed devices and delete the offline distributed devices in the Hap application interface.

[0203] The distributed device clipboard management module can be used to detect changes in the clipboard of distributed devices and synchronize the clipboard data.

[0204] Sub-processing modules can be modules that further categorize access permissions; for example, text processing modules, image processing modules, image and text processing modules, and file processing modules. Among these, electronic devices can classify access permissions according to the user's... Figure 3 or Figure 7 The selection operation in the interface shown enables the corresponding sub-processing module. For example, when the text control 304 is in the open state and the image control 305 is in the closed state, the clipboard permission configuration module can enable the text processing module but disable the image processing module, so that the electronic device can transmit text data to the virtual machine but not image data.

[0205] The file processing module may include a public sandbox processing module and a private sandbox processing module. The private sandbox processing module can be used to process file data from a specific application, while the public sandbox processing module can be used to process file data from other applications. The specific application can be an application that allows clipboard sharing. For example, when the Gallery application control 312 is enabled, the electronic device can transfer clipboard data originating from the Gallery application to the virtual machine via the private sandbox processing module.

[0206] The pop-up module can be used to prompt users to enable access when clipboard data access is restricted, or to warn users of potential risks if user information is present in the clipboard data.

[0207] The virtual machine may include a clipboard user-mode program and a virtual machine clipboard. The clipboard user-mode program can be used to manage data shared to the virtual machine clipboard; the clipboard user-mode program may include a user information detection module (e.g., a third module), which can be used to determine whether the clipboard data carries user information. The virtual machine clipboard can be used to cache clipboard data.

[0208] Optionally, the pop-up module can also be set in the virtual machine; when clipboard data access is restricted, a prompt pop-up will be displayed in the virtual machine window.

[0209] A distributed device may include an application layer and a framework layer. The distributed device can obtain copied or cut data based on the application interface in the application layer; the distributed device can store data in the distributed device clipboard of the application framework layer.

[0210] It is understood that the division of the software structure of electronic devices and distributed devices in this application embodiment is only an example. This application embodiment does not limit the hierarchical division method in the software system of electronic devices and distributed devices. The modules in each level in the above embodiment are the modules involved in the embodiments of this application. Each level may also include more or fewer modules than shown in the figure, or combine some modules, or split some modules. This application embodiment does not impose any restrictions.

[0211] Let's combine the following... Figure 10 The process illustrated in the embodiments of this application will be briefly described, such as... Figure 10 As shown:

[0212] In one possible implementation, the Hap application receives a user operation and passes the on / off state of the access permission control to the clipboard permission configuration module; after generating clipboard configuration parameters, the clipboard permission configuration module passes the clipboard configuration parameters to the clipboard processing module; the clipboard processing module enables various modules, such as the electronic device clipboard management module, the distributed device clipboard management module, and multiple sub-modules, according to the clipboard configuration parameters.

[0213] In another possible implementation, after configuration, applications such as desktop applications, gallery applications, or file management applications receive copy or cut operations, and the electronic device clipboard obtains clipboard data. The electronic device clipboard management module detects the data changes in the electronic device clipboard and synchronizes the clipboard data to the clipboard processing module. The clipboard processing module manages access permissions for the clipboard data according to the clipboard configuration parameters. When the clipboard data meets the access permissions, the enabled sub-processing module transmits the clipboard data to the virtual machine. The user information detection module in the virtual machine determines whether the clipboard data includes user data. If it does not include user data, the clipboard data is synchronized to the virtual machine clipboard; or, if it includes user data, a pop-up window module prompts the user; or, if the clipboard data does not meet the access permissions, the transmission of clipboard data to the virtual machine is stopped.

[0214] In another possible implementation, after configuration, the application or desktop of the distributed device receives a copy or cut operation, and the distributed device clipboard obtains clipboard data. The distributed device clipboard management module detects the data change in the distributed device clipboard and synchronizes the clipboard data to the clipboard processing module. The clipboard processing module manages access permissions for the clipboard data according to the clipboard configuration parameters. When the clipboard data meets the access permissions, the enabled sub-processing module passes the clipboard data to the virtual machine. The user information detection module in the virtual machine determines whether the clipboard data includes user data. If it does not include user data, the clipboard data is synchronized to the virtual machine clipboard. Alternatively, if it includes user data, a pop-up window module prompts the user. Alternatively, if the clipboard data does not meet the access permissions, the transmission of clipboard data to the virtual machine is stopped.

[0215] The following is combined Figures 11-15 This section explains the interaction process between various software modules in a shared clipboard scenario.

[0216] Figure 11This illustration shows the interaction flowchart between various software modules in a scenario where access permissions for the shared clipboard are configured, as shown in an embodiment of this application. Figure 11 As shown:

[0217] S1101, the Hap application can display a first window, which includes multiple access control controls.

[0218] The first window may be, for example, a shared clipboard settings window 301 or a shared clipboard settings window 701. Access permission controls may be, for example, controls within the shared clipboard settings window 301 or a shared clipboard settings window 701. Access permission controls can be used to configure access permissions for sharing the clipboard between electronic devices and virtual machines; access permission controls may be, for example, data type access permission controls, device type access permission controls, application access permission controls, and / or controls used to indicate the detection of user information, etc.

[0219] S1102. In response to a trigger operation on the target control, the Hap application displays the target control switched to the open state.

[0220] The target control can be one or more controls from a set of access control controls. For example, the target control may include one or more of the following: all open control 302, all close control 303, text control 304, image control 305, image and text control 306, file control 307, phone control 308, PC control 309, Pad control 310, USB peripheral control 311, gallery application control 312, other application control 313, or sensitive data detection control 702, etc.

[0221] The triggering operation for the target control can be an operation used to open the target control. For example, if the target control is the "Open All Controls 302" option, the triggering operation for the target control can be the operation of clicking the "Open All Controls 302" option when it is closed.

[0222] S1103, The clipboard permission configuration module generates clipboard configuration parameters based on the target control; the clipboard configuration parameters are used to configure the access permissions corresponding to the target control.

[0223] Clipboard configuration parameters can be used to describe the on / off state of access control controls. Clipboard configuration parameters can be maps. For example, in a map, each access control can correspond to a key, which can be the name or identifier of the access control. Each access control can correspond to multiple values; for example, the value of any access control can include a first value and a second value. The first value can be used to indicate that the access control is in an on state, and the second value can be used to indicate that the access control is in a off state; the first value can be, for example, True, and the second value can be, for example, False; the first value can be, for example, 1, and the second value can be, for example, 0; or the first value can be, for example, 0, and the second value can be, for example, 1. This application does not limit the specific form of the first and second values.

[0224] The clipboard permission configuration module can handle access control settings for the Hap application interface and generate clipboard configuration parameters. For example, in the clipboard configuration parameters, if all target controls are enabled, the clipboard permission configuration module can set the value of the target control to the first value; if all other access control controls are disabled except for the target control, the clipboard permission configuration module can set the values ​​of the other controls to the second value.

[0225] by Figure 4 Taking Figure a as an example, the target control can be a text control 304, an image control 305, and a graphic control 306; other controls can be a file control 307. In the clipboard configuration parameters, the values ​​of text control 304, image control 305, and graphic control 306 are all the first value; the value of file control 307 is the second value.

[0226] S1104. The clipboard permission configuration module passes the clipboard configuration parameters to the clipboard processing module.

[0227] The clipboard permission configuration module can synchronize clipboard configuration parameters to the clipboard processing module.

[0228] On one hand, the clipboard processing module can pre-enable corresponding modules based on clipboard configuration parameters, such as sub-processing modules, electronic device clipboard management modules, and / or distributed device clipboard management modules. Subsequently, clipboard data that meets access permissions can be processed through these corresponding modules.

[0229] On the other hand, the clipboard processing module can cache clipboard configuration parameters. Subsequently, when clipboard data from an electronic device or distributed device is obtained, access permissions for the clipboard data can be determined based on the clipboard configuration parameters to prevent unauthorized clipboard data from being pasted into the virtual machine. This application embodiment describes a scenario involving configuring access permissions for a shared clipboard. Scenarios involving shared clipboard access permissions can be further discussed later. Figures 12-15The explanation will not be elaborated here.

[0230] S1105. The clipboard processing module enables the target sub-processing module according to the clipboard configuration parameters. The target sub-processing module is the module corresponding to the target control among multiple sub-processing modules. The sub-processing module is used to process the clipboard data corresponding to the data type access control and / or the application access control.

[0231] The target sub-processing module can be the sub-processing module corresponding to the access permission control that is enabled, among multiple sub-processing modules. The sub-processing module can be used to process clipboard data. An electronic device may include multiple sub-processing modules, such as text processing modules, image processing modules, image and text processing modules, and file processing modules.

[0232] It is understandable that multiple sub-processing modules can correspond to different data types of clipboard data. For example, a text processing module can be used to process text-type clipboard data, an image processing module can be used to process image-type clipboard data, an image-text processing module can be used to process image-text type clipboard data, and a file processing module can be used to process file-type clipboard data.

[0233] The target sub-processing module corresponds to the data type access permission control in the target control. Figure 4 Taking Figure a as an example, the target control can be a text control 304, an image control 305, or a graphic control 306, and the target control is in an open state; the access control in a closed state can be a file control 307. The clipboard processing module can enable the text processing module, image processing module, and graphic control module according to the clipboard configuration parameters, but disable the file processing module.

[0234] Sub-processing modules can also correspond to the application source of clipboard data. For example, the file processing module can be divided into a private sandbox processing module and a public sandbox processing module based on the application. The private sandbox processing module can be used to process private sandbox file data; private sandbox file data can be file data from a specific application (such as a gallery application). The public sandbox processing module can be used to process public sandbox file data; public sandbox file data can be file data from other applications.

[0235] The target sub-processing module corresponds to the application access permission control in the target control. The application access permission control includes the gallery application control 312. For example, when the gallery application control 312 is in the open state, the clipboard processing module can enable the private sandbox processing module according to the clipboard configuration parameters; when the gallery application control 312 is in the closed state, the clipboard processing module can disable the private sandbox processing module according to the clipboard configuration parameters.

[0236] It should be noted that on a PC, when copying and pasting images from a gallery application, the image can be in URL format such as xx.exe / .. / xx.jpg; the gallery application stores images as files; therefore, both the private sandbox processing module and the public sandbox processing module process file data; in this embodiment, the image corresponding to the image control 305 can be, for example, an image from a WPS application. In some scenarios, users may mistakenly believe that the permission to access images in the gallery application is the same as the access permission corresponding to the image control; in this embodiment, for example, when the gallery application control 312 and the image control 305 are enabled, and the file control 307 is closed, and the user attempts to paste an image file from the gallery application into a virtual machine, the electronic device can, for example, Figure 4 The pop-up window 407 in the interface shown in d prompts the user to open the file control 307 to guide the user to use the gallery application control 312 and the file control 307 correctly.

[0237] Based on the data type authorization mechanism, clipboard data can be further divided into public sandbox file data and private sandbox file data according to the application source. Managing public sandbox file data and private sandbox file data separately can effectively prevent Windows virtual machines from accessing unauthorized private sandbox file data, thereby further improving the security of clipboard data.

[0238] After enabling the target sub-processing module, the electronic device completes the configuration of shared clipboard access permissions. Subsequently, the electronic device can manage access permissions for clipboard data on the electronic device or distributed devices based on clipboard configuration parameters and the target sub-processing module. In this embodiment, the target control selected by the user in the HAP application interface corresponds to the enabled sub-processing module of the electronic device, which helps save system resources and power consumption. Furthermore, the electronic device can cache clipboard configuration parameters to facilitate accurate determination of access permissions for clipboard data based on these parameters later.

[0239] In this embodiment, the clipboard processing module may also enable the electronic device clipboard management module and / or the distributed device clipboard management module according to the clipboard configuration parameters.

[0240] When data sharing of the clipboard of an electronic device is permitted, the clipboard processing module can enable the clipboard management module of the electronic device; when data sharing of the clipboard of a distributed device is permitted, the clipboard processing module can enable the clipboard management module of the distributed device.

[0241] For example, if multiple data type access control controls in the clipboard configuration parameters all have the second value and / or multiple application access control controls all have the second value, then the clipboard processing module will not enable the electronic device clipboard management module. If any data type access control has the first value and any application access control has the first value, then the clipboard processing module will enable the electronic device clipboard management module.

[0242] For example, in the clipboard configuration parameters, if the values ​​corresponding to multiple device type access permission controls (excluding the USB peripheral control) are all the second value, then the clipboard processing module will not enable the distributed device clipboard management module. If the value corresponding to any device type access permission control (excluding the USB peripheral control) is the first value, then the clipboard processing module will enable the distributed device clipboard management module. Alternatively, if, except for the USB peripheral control, the distributed device is online and the value of the corresponding device type access permission control is the first value, then the clipboard processing module will enable the distributed device clipboard management module.

[0243] In this way, electronic devices can provide a visual interface for shared clipboard access permissions. Users can understand the scope of authorization for the shared clipboard through the interface, and customize access permissions according to their own needs, thereby improving the security of clipboard data.

[0244] Figure 12 This illustration shows the interaction flowchart between various software modules in a scenario where access permissions for a shared clipboard are used across systems, as shown in an embodiment of this application. Figure 12 As shown:

[0245] by Figure 4 or Figure 6 Taking the scenario of an electronic device and a virtual machine sharing the clipboard as an example, the clipboard management method may include the following steps:

[0246] S1201. The electronic device displays a first interface. The first interface includes a second window and a third window. The second window includes the desktop of the electronic device or the application window of the electronic device, and the third window is a virtual machine window. The second window includes a first object, while the third window does not include the first object.

[0247] The first interface can be, for example... Figure 4 The interface shown in b or Figure 6 The interface shown in b can correspond to the file management application window 401, the gallery application window 601, or the desktop of an electronic device; the third window can correspond to the virtual machine window 402, the virtual machine window 602, or the desktop of a virtual machine.

[0248] Understandably, the second window can be used to copy or cut data from the first operating system. Electronic devices can copy or cut data such as files, pictures, and application icons from the desktop; they can also copy or cut data from application windows, such as files in a file management application window, pictures in a gallery application window, and text in a document editing application window.

[0249] The third window can be used to paste data into a second operating system, such as a virtual machine window. A virtual machine can paste data such as files, images, and application icons onto its desktop; electronic devices can also paste data into the virtual machine's application window.

[0250] by Figure 4 For example, the first object could be document 2 in the file management application window 401, while document 2 is not included in the virtual machine window 402. Figure 6 For example, the first object may be image 3 in the gallery application window 601, while image 3 is not included in the virtual machine window 602.

[0251] The embodiments in this application are only combined with Figure 4 or Figure 6 This is an illustrative example and does not impose any restrictions on the definitions of the first interface, second window, third window, and first object; it will not be repeated hereafter.

[0252] S1202, When an operation for copying or cutting the first object is received in the second window, the clipboard of the electronic device obtains the first object.

[0253] Operations for copying or cutting the first object can be triggered by, for example, the copy or cut control in the shortcut menu; operations triggered by shortcut keys such as Ctrl+X and Ctrl+C; copy or cut operations triggered by screenshots; copy or cut operations triggered by voice commands; copy or cut operations triggered by dragging the first object out of the second window, etc.

[0254] After an electronic device receives a copy or cut operation, the electronic device's clipboard can be synchronized with the copied or cut data; for example, the electronic device's clipboard receives the first object.

[0255] S1203, The electronic device clipboard management module senses the data changes in the electronic device clipboard and obtains the first object from the electronic device clipboard.

[0256] When content is updated in the clipboard of an electronic device, the clipboard management module can detect the data change in the clipboard and synchronize the content in the clipboard; for example, the clipboard management module obtains the first object.

[0257] Understandably, the shared clipboard function can be toggled in the HAP application. When the shared clipboard function is enabled, the clipboard processing module can enable the electronic device clipboard management module, allowing the electronic device clipboard management module to periodically detect changes in the electronic device clipboard.

[0258] S1204. When the focus window is switched to the third window, the electronic device clipboard management module synchronizes the first object to the clipboard processing module.

[0259] The focus window is the window selected by the mouse cursor. Switching the focus window to a third window can occur, for example, when the user moves the mouse cursor to a third window and clicks within that window; or when the focus window switches from the second window to the third window.

[0260] In this embodiment, when the electronic device copies the first object in the second window and the focused window is not a virtual machine window, the user may paste the first object from the electronic device's clipboard to the desktop or other application window of the electronic device, rather than pasting the first object into the virtual machine. Therefore, this embodiment can determine whether the user intends to use a shared clipboard by checking whether the focused window is a virtual machine window.

[0261] If the user intends to use the shared clipboard, the clipboard processing module can obtain the first object and perform subsequent processing on the first object.

[0262] S1205 The clipboard processing module determines whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters.

[0263] The clipboard processing module may include clipboard configuration parameters. The first object may include attribute information such as data type, application information, and device type. The clipboard processing module can use the data type, application information, and device type of the first object to match the clipboard configuration parameters to determine whether the first object meets the access permissions corresponding to the target control.

[0264] For example, when the data type of the first object has a first value, the device type of the first object has a first value, and the application information of the first object has a first value, the clipboard processing module determines that the first object satisfies the access permissions corresponding to the target control. When the data type of the first object has a second value, the device type of the first object has a second value, or the application information of the first object has a second value, the clipboard processing module determines that the first object does not satisfy the access permissions corresponding to the target control.

[0265] Data types can include text, images, graphic text, and files; application information can include specific applications and other applications; device types can include mobile phones, PCs, tablets, and USB peripherals.

[0266] Specifically, if the data type of the first object is text, and the value corresponding to text in the clipboard configuration parameters is the first value, then the application information and device type are determined; or, if the data type of the first object is image, and the value corresponding to image in the clipboard configuration parameters is the first value, then the application information and device type are determined; or, if the data type of the first object is text and image, and the value corresponding to text and image in the clipboard configuration parameters is the first value, then the application information and device type are determined; or, if the data type of the first object is file, and the value corresponding to file in the clipboard configuration parameters is the first value, then the application information and device type are determined.

[0267] If the application of the first object is a specific application (e.g., the gallery application), and the value corresponding to the specific application in the clipboard configuration parameters is the first value, then the device type is determined. Alternatively, if the application of the first object is another application, and the value corresponding to the other application in the clipboard configuration parameters is the first value, then the device type is determined.

[0268] If the device type of the first object is a mobile phone, and the value corresponding to "mobile phone" in the clipboard configuration parameters is the first value, then the first object satisfies the access permissions corresponding to the target control; or, if the device type of the first object is a PC, and the value corresponding to "PC" in the clipboard configuration parameters is the first value, then the first object satisfies the access permissions corresponding to the target control; or, if the device type of the first object is a Pad, and the value corresponding to "Pad" in the clipboard configuration parameters is the first value, then the first object satisfies the access permissions corresponding to the target control; or, if the device type of the first object is a USB peripheral, and the value corresponding to "USB peripheral" in the clipboard configuration parameters is the first value, then the first object satisfies the access permissions corresponding to the target control.

[0269] It is understood that this application embodiment uses the sequential determination of data type, application information, and device type as an example to illustrate the process of determining whether the first object meets the access permissions corresponding to the target control. In practical applications, other orders can also be used to determine the access permissions of the first object. Alternatively, the electronic device can also determine the access permissions of the first object solely through data type, application information, device type, or a combination of these two. This application embodiment does not impose any limitations on this.

[0270] In some embodiments, the clipboard processing module can identify application information based on the application name, application package name, and executable file extension (.exe); for example, the clipboard processing module can obtain the path of the Uniform Resource Locator (URL) of the first object to obtain the .exe file, thereby determining the application source corresponding to the first object.

[0271] The clipboard processing module can identify the device type based on the device name and URL path. For example, when the device type of the first object is a distributed device such as a mobile phone, PC, or tablet, the distributed device communicates with the electronic device, and the clipboard processing module can obtain the device name of the distributed device to determine the device type of the first object. As another example, when the device type of the first object is a USB peripheral (such as a USB flash drive), the clipboard processing module can obtain the URL of the first object and determine the device type based on the URL.

[0272] S1206. If the first object does not meet the access permissions corresponding to the target control, the clipboard processing module stops synchronizing the first object to the virtual machine.

[0273] If any of the data type, application information, or device type of the first object does not meet the access permissions corresponding to the target control, the clipboard processing module can determine that the first object does not meet the access permissions corresponding to the target control, and the electronic device will prevent the first object from using the shared clipboard function; the clipboard processing module can also stop synchronizing the first object to the virtual machine. The first object is not included in the virtual machine clipboard.

[0274] S1207. When an operation to paste the first object is received in the third window, the pop-up module displays the first prompt message; the first prompt message is used to prompt the user to enable access permissions for the shared clipboard of the first object.

[0275] The operation for pasting the first object can be triggered by, for example, the paste control in the shortcut menu; the shortcut key such as Ctrl+V; the paste operation triggered by voice command; or the paste operation triggered by dragging the first object to the third window and releasing the mouse, etc.

[0276] The first prompt message could be, for example... Figure 4 The error message 408 or d in the interface shown in the figure. Figure 6 The prompt message 608 appears on the interface shown in d.

[0277] It is understandable that the first object is not included in the virtual machine clipboard; when a trigger operation for pasting the first object is received in the virtual machine window, the virtual machine clipboard will not paste the first object in the virtual machine window, and the pasting will fail; that is, the first object is included in the second window, but not in the third window.

[0278] In this way, in scenarios where clipboards are shared across systems, clipboard data can be further categorized by data type, device origin, and application origin. This narrows the scope of shared clipboard authorization, reduces the probability of sharing user information to the virtual machine clipboard, lowers the risk of user information leakage, and improves clipboard data security. In addition, pop-up windows can prompt users that the shared clipboard function has access permissions, allowing users to adjust their access permissions in a timely manner and increasing users' trust in the security of clipboard data.

[0279] Alternatively, after step S1205, the method may include:

[0280] S1208. If the first object satisfies the access permissions corresponding to the target control, the clipboard processing module passes the first object to the target sub-processing module; the target sub-processing module is used to support cross-process data transfer between the clipboard processing module and the virtual machine.

[0281] When the data type, application information, and device type of the first object all satisfy the access permissions corresponding to the target control, the clipboard processing module can determine that the first object meets the access permissions corresponding to the target control, and the electronic device can authorize the first object to use the shared clipboard function. The clipboard processing module can synchronize the first object to the virtual machine clipboard.

[0282] It is understood that in this embodiment, the clipboard processing module can run in a system service process (e.g., the HarmonyOS system service process (System Ability, SA)), and the virtual machine clipboard can run in the virtual machine process. The communication process between the clipboard processing module and the virtual machine clipboard is inter-process communication (IPC), which can trigger the IPC mechanism. To improve the security of inter-process communication, the electronic device can implement data transmission between the clipboard processing module and the virtual machine clipboard based on the target sub-processing module.

[0283] S1209. The target sub-processing module performs data format processing on the first object and synchronizes the first object to the virtual machine clipboard.

[0284] The target sub-processing module can process a first object in a first format into a first object in a second format. The first format can be a data format that the corresponding process of the clipboard processing module can recognize, and the second format can be a data format that the corresponding process of the virtual machine clipboard can recognize. Data format processing includes one or more of the following: serialization processing, data compatibility processing, data compression processing, or data encryption processing, etc. The embodiments of this application do not limit the specific steps of data format processing.

[0285] After processing the data format of the first object, the target sub-processing module can synchronize the first object to the virtual machine clipboard.

[0286] In this embodiment, the target sub-processing module may include one or more sub-processing modules. Clipboard data of different data types may differ in data format and size during cross-process transmission; for example, images can be transmitted in binary format, while text can be transmitted in string format, resulting in different data formats; images and videos have more bytes than text, leading to different data sizes and requiring different processing module performance. In this embodiment, the electronic device can use different sub-processing modules to process clipboard data of corresponding data types, thereby improving clipboard data transmission efficiency and reducing latency in copy-and-paste scenarios.

[0287] Furthermore, in this embodiment, the electronic device can be configured with a private sandbox processing module based on the application source. For example, applications such as gallery and memo applications store a large amount of user information, and a private sandbox processing module can be used to handle data format processing and cross-process transmission; other applications store less user information, and text processing, image processing, image and text processing, and file processing modules can be used to handle data format processing and cross-process transmission. This allows for separate management of private sandbox file data and public sandbox data, effectively preventing virtual machines from accessing unauthorized private sandbox file data on the electronic device.

[0288] S1210. When an operation to paste the first object is received in the third window, the virtual machine clipboard pastes the first object into the third window.

[0289] The clipboard processing module synchronizes the first object to the virtual machine clipboard through the target sub-processing module, where the first object can be cached. Subsequently, upon receiving an operation to paste the first object, the virtual machine clipboard pastes the first object into the third window. When the first object is data copied from the second window, both the second and third windows may include the first object. When the first object is data cut from the second window, the second window may not include the first object, but the third window may include it.

[0290] In this way, when sharing the clipboard, access permissions can be used to manage clipboard data securely, ensuring that all data in the virtual machine clipboard is data that meets the access permissions, reducing the probability of user information appearing in the virtual machine clipboard, reducing the risk of virtual machine clipboard data leakage, and improving data security.

[0291] In this embodiment, the electronic device can manage clipboard data access permissions based on data type, application source, and device source, thereby improving clipboard data security. Optionally, the electronic device can also perform further security management of clipboard data through user information detection. The following describes... Figure 13 The process of user information detection is explained, such as... Figure 13 As shown:

[0292] The electronic device can execute steps S1201-S1205 and S1208. In this embodiment, the electronic device can obtain a first object based on steps S1201-S1205 and determine whether the first object meets the access permissions; if the first object meets the access permissions, the electronic device can synchronize the first object to the target sub-processing module based on step S1208. This process can... Figure 12 The relevant descriptions in the illustrated embodiments will not be repeated here.

[0293] by Figure 8 Taking the scenario shown as an example, after the clipboard processing module passes the first object to the target sub-processing module, it also includes:

[0294] S1301, The target sub-processing module performs data format processing on the first object and synchronizes the first object to the user information detection module.

[0295] It should be noted that the user information detection module can be a module in the clipboard user-mode program. The clipboard user-mode program runs in a virtual machine process, so when the clipboard processing module synchronizes data with the user information detection module, it also needs to achieve cross-process communication through the target sub-processing module.

[0296] The process of data format processing of the first object by the target sub-processing module can be referred to the relevant description in step S1209, and will not be repeated here. After processing, the target sub-processing module can pass the first object to the user information detection module.

[0297] S1302, The user information detection module determines whether the first object includes user information.

[0298] In this embodiment of the application, the electronic device can use different detection methods to detect user information in a first object of different data types, such as... Figure 14 As shown:

[0299] The data type of the first object can include text, images, and files.

[0300] 1) When the first object is text, the user information detection module can identify user information in a fixed format in the first object through regular expression matching; or perform keyword matching on the first object, where the keywords include user information.

[0301] Fixed-format user information can include, for example, bank card numbers, ID card numbers, and email addresses. For instance, bank card numbers typically consist of 13-19 digits, and a regular expression could be `\d{13,19}`; ID card numbers typically consist of 18 digits and / or an X, and a regular expression could be `\d{17}[\dXx]`, and so on. If the text of the first object matches a preset regular expression, the user information detection module can determine that the first object contains user information.

[0302] Keywords can include words such as password, account, and name. When the text of the first object contains keywords, the user information detection module can determine that the first object contains user information.

[0303] 2) When the first object is an image, the user information detection module can use an image recognition algorithm to detect the content in the image and / or extract the text content in the image and use regular expression matching or keyword matching to match user information.

[0304] User information in an image can be, for example, a user's facial profile. The electronic device can store preset facial feature data of the user's facial image; after obtaining the first object, the user information detection module can calculate the similarity between the preset facial feature data and the facial feature data of the first object; if the similarity is less than a threshold, it is determined that the first object includes the user's facial image.

[0305] User information in an image can be, for example, user information in the text within the image. After recognizing the text in the first object, the text in the first object can be detected based on regular expression matching or keyword matching.

[0306] 3) When the first object is text and images, the user information detection module can use detection methods such as text and images, which will not be elaborated here.

[0307] 4) When the first object is a file, the user information detection module can perform regular expression matching or keyword matching based on the text in the file name and / or file content.

[0308] Optionally, to reduce latency in shared clipboard scenarios, the user information detection module can employ a detection method with high computational efficiency and low computational pressure. For example, when the first object is an image, the user information detection module can determine whether user information exists by examining the text in the image; or, for example, when the first object is a file, the user information detection module can determine whether user information exists by examining the file name. This application embodiment does not impose any limitations on this.

[0309] S1303, If the first object includes user information, the pop-up module displays a second prompt message, "Continue to use the control," and "Cancel the control." The second prompt message can be used to prompt the user that the first object includes user information and to ask the user whether to continue using the first object in the third window.

[0310] The second prompt message could be, for example... Figure 8 In the interface shown in c, the prompt pop-up 805 allows you to continue using the control, for example, continue using the control 808, and cancel the control, for example, cancel the control 807.

[0311] S1304. Upon receiving a trigger operation for continuing to use the control, the user information detection module synchronizes the first object to the virtual machine clipboard.

[0312] Upon receiving a trigger to continue using the control, the electronic device can confirm that the user understands the risks of continuing to use the first object. With the user's authorization, the electronic device can share data including user information to the virtual machine; the virtual machine clipboard can then access the first object.

[0313] S1305. When an operation to paste the first object is received in the third window, the virtual machine clipboard pastes the first object into the third window.

[0314] like Figure 8 The interface shown in d and Figure 8 The interface shown in 'e' is as follows. After pasting, the third window (e.g., virtual machine window 802) may include the first object (e.g., name and phone number).

[0315] S1306 The user information detection module periodically detects user information in the virtual machine clipboard.

[0316] Users may share clipboard data, including user information, to the virtual machine clipboard. In this embodiment, the risk of data leakage can be reduced by decreasing the caching time of clipboard data containing user information in the virtual machine clipboard.

[0317] S1307. If a preset time is reached and the virtual machine clipboard contains the first object, the virtual machine clipboard clears the first object.

[0318] For example, after the first object is shared to the virtual machine clipboard, the user information detection module repeatedly checks the data in the virtual machine clipboard after a preset time. When the virtual machine clipboard contains user information, the user information detection module clears all data or data containing user information from the virtual machine clipboard. The preset time can be, for example, 5 minutes.

[0319] Alternatively, the virtual machine clipboard data, including user information, can be cleared after a single use (e.g., pasting once). This application does not limit the caching duration of user information data in the virtual machine clipboard.

[0320] In this way, in a shared clipboard scenario, when clipboard data includes user information, a pop-up window can prompt the user whether they want to continue using the data. If the user insists on synchronizing the clipboard data to the virtual machine for use, the virtual machine can delete the historical data in the virtual machine clipboard after a period of time. This prevents user information from being shared to the virtual machine without the user's knowledge and reminds the user to prevent information leakage.

[0321] Optional, or, following S1303, also includes:

[0322] S1308. When a trigger operation is received for the cancel control, the user information detection module stops synchronizing the first object to the virtual machine clipboard.

[0323] For example, in Figure 8 In the interface shown as c, upon receiving a trigger operation for the cancel control 807, the user information detection module will not synchronize the first object to the virtual machine clipboard; the first object is not included in the virtual machine clipboard. Consequently, when using the paste function in the virtual machine window, the first object cannot be pasted into the virtual machine window.

[0324] Optional, or, following S1302, also includes:

[0325] S1309. If the first object does not contain user information, the user information detection module will synchronize the first object to the virtual machine clipboard.

[0326] S1310. Upon receiving an operation to paste the first object, the virtual machine clipboard pastes the first object into the third window.

[0327] The process of synchronizing the first object and pasting the first object can be found in the following reference. Figure 12 The relevant descriptions in the document will not be repeated here.

[0328] When the first object does not contain user information, its security is relatively high, and the loss to the user if the first object is leaked is minimal. In this case, the first object can be synchronized to the virtual machine clipboard; in a pasting scenario, the first object can be pasted into a virtual machine, electronic device, or distributed device.

[0329] Figure 15 This illustration shows the interaction flowchart between various software modules in a scenario where access permissions for using a shared clipboard across devices is granted, as shown in an embodiment of this application. Figure 15 As shown:

[0330] by Figure 5 Taking the scenario of shared clipboards among electronic devices, virtual machines, and distributed devices as an example, the clipboard management process may include:

[0331] S1501, In response to an operation for copying or cutting a second object, the distributed device clipboard obtains a second object; the second object is an object copied or cut from the desktop or application window of the distributed device.

[0332] The second object can be, for example... Figure 5 Document 3 on the phone is shown in the interface shown in b. The operation for copying or cutting the second object is the same as the operation for copying or cutting the first object. Upon receiving a copy or cut operation, the distributed device can synchronize the copied or cut content to the distributed device clipboard.

[0333] S1502, The distributed device clipboard management module detects the data changes in the distributed device clipboard and obtains the second object.

[0334] When content is updated in the distributed device clipboard, the distributed device clipboard management module can detect the data change in the distributed device clipboard and synchronize the content in the distributed device clipboard; for example, the distributed device clipboard management module obtains a second object.

[0335] S1503. When the focus window is switched to the third window, the distributed device clipboard management module synchronizes the second object to the clipboard processing module.

[0336] In this embodiment, when the electronic device copies a second object from a second window and the focused window is not a virtual machine window, the user may paste the second object from the electronic device's clipboard to the electronic device's desktop or other application window, rather than pasting the second object into the virtual machine. Therefore, this embodiment can determine whether the user intends to use a shared clipboard by checking whether the focused window is a virtual machine window.

[0337] If the user intends to use the shared clipboard, the clipboard processing module can obtain the second object and perform subsequent processing on the second object.

[0338] S1504. The clipboard processing module determines whether the second object meets the access permissions corresponding to the target control based on the clipboard configuration parameters.

[0339] S1505. If the second object does not meet the access permissions corresponding to the target control, the clipboard processing module stops synchronizing the second object to the virtual machine.

[0340] S1506. When an operation to paste a second object is received in the third window, the pop-up module displays a third prompt message; the third prompt message is used to prompt the user to enable access permissions for the shared clipboard of the second object.

[0341] The operation for pasting a second object can be referenced from the operation for pasting a first object. The third prompt message can be, for example... Figure 5 The interface shown in d displays message 508.

[0342] Steps S1504-S1506 can refer to the processing of the first object in steps S1205-S1207, and will not be repeated in this embodiment.

[0343] In this way, clipboard data can be further categorized by device origin, narrowing the scope of shared clipboard authorization, effectively reducing the probability of sharing data from distributed devices to the virtual machine clipboard, lowering the risk of leaking user information, and improving the security of clipboard data.

[0344] Prior to S1502, it also includes:

[0345] S1507. The distributed device sensing module detects that the distributed device has entered the online state and obtains the device type of the distributed device.

[0346] After the distributed device establishes communication with the electronic device, the distributed device sensing module can detect that the distributed device is online; the distributed device sensing module can obtain the device type of the distributed device; for example, the device name of the distributed device.

[0347] S1508, the distributed device perception module synchronizes the device type of the distributed device to the clipboard processing module.

[0348] S1509 The clipboard processing module determines whether the device type meets the access permissions corresponding to the target control based on the clipboard configuration parameters.

[0349] The clipboard configuration parameters can include configuration parameters corresponding to multiple device types, such as mobile phones, PCs, and tablets. Specifically, if the distributed device is a mobile phone, and the value corresponding to "mobile phone" in the clipboard configuration parameters is the first value, then the data of the distributed device satisfies the access permissions corresponding to the device type access permission control in the target control. Alternatively, if the distributed device is a PC, and the value corresponding to "PC" in the clipboard configuration parameters is the first value, then the data of the distributed device satisfies the access permissions corresponding to the device type access permission control in the target control. Or, if the distributed device is a tablet, and the value corresponding to "Pad" in the clipboard configuration parameters is the first value, then the data of the distributed device satisfies the access permissions corresponding to the device type access permission control in the target control.

[0350] It should be noted that the device name of a USB peripheral can be user-defined. When a USB peripheral is connected, the electronic device may not be able to determine whether a distributed device is a USB peripheral based solely on the device name; this can be done subsequently based on the URL path of the clipboard data.

[0351] S1510. If the device type meets the access permissions corresponding to the target control, the clipboard processing module enables the distributed device clipboard management module.

[0352] Understandably, when a distributed device comes online and meets the access permissions for its device type, the clipboard processing module can enable the distributed device clipboard management module. This allows the distributed device clipboard management module of the electronic device to begin sensing changes in the distributed device clipboard and authorizing access permissions for distributed devices, electronic devices, and virtual machines to share the clipboard.

[0353] Alternatively, in S1511, if the device type does not meet the access permissions corresponding to the target control, the clipboard processing module shall not enable the distributed device clipboard management module.

[0354] Understandably, when a distributed device does not meet the access permissions for its device type, the distributed device clipboard management module is unaware of changes to the distributed device clipboard, and the distributed device cannot share data to electronic devices or virtual machines based on the shared clipboard function.

[0355] In this way, electronic devices can sense the online and offline status of distributed devices and match the device source of the distributed devices; based on the matching, the distributed clipboard management module can be enabled to enable data interaction between distributed devices and virtual machines; or, based on the matching, the distributed clipboard management module can be disabled to prevent virtual machines from obtaining clipboard data from unauthorized distributed devices.

[0356] Based on the above embodiments, this application provides a clipboard management method. For example, Figure 16 This is a flowchart illustrating a clipboard management method provided in an embodiment of this application.

[0357] like Figure 16 As shown, this clipboard management method can be applied to electronic devices. The electronic device has a first operating system, and a virtual machine running a second operating system is also present in the electronic device. The first and second operating systems are different. The method includes the following steps:

[0358] S1601. The electronic device displays a first window, which includes multiple access control controls. The access control controls are used to configure access permissions for the electronic device and the virtual machine to share the clipboard. The access control controls include one or more of the following: data type access control, device type access control, application access control, or controls used to indicate the detection of user information.

[0359] The first window may be, for example, a shared clipboard settings window 301 or a shared clipboard settings window 701. Access permission controls may be, for example, controls within a shared clipboard settings window 301 or a shared clipboard settings window 701.

[0360] Specifically, data type access control includes one or more of the following: text access control (e.g., text control 304), image access control (e.g., image control 305), image and text access control (e.g., image and text control 306), or file access control (e.g., file control 307).

[0361] Device type access control includes one or more of the following: mobile phone access control (e.g., Phone control 308), PC access control (e.g., PC control 309), tablet access control (e.g., Pad control 310), or USB peripheral access control (e.g., USB peripheral control 311).

[0362] Application access control includes one or more of the following: application-specific access control (e.g., Gallery app control 312) or other application access control (e.g., other app control 313).

[0363] Optionally, the access control may also include an "Open All" control 302 and an "Close All" control 303, etc. This application embodiment does not limit the type and style of the access control.

[0364] S1602. In response to a trigger operation on the target control, enable the access permissions corresponding to the target control; the target control is one or more controls among multiple access permission controls.

[0365] For example, the target control may include one or more of the following: all open control 302, all close control 303, text control 304, image control 305, graphic and text control 306, file control 307, phone control 308, PC control 309, Pad control 310, USB peripheral control 311, gallery application control 312, other application controls 313, or sensitive data detection control 702, etc.

[0366] The trigger action for the target control can be an action used to open the target control, such as clicking an access control that is in a closed state.

[0367] In some embodiments, granting access permissions to the target control in response to a triggering operation on the target control may include:

[0368] 1) In response to a trigger operation on the target control, the first module (e.g., the clipboard processing module) obtains the clipboard configuration parameters.

[0369] Clipboard configuration parameters are used to configure the access permissions of the target control. The clipboard configuration parameters are generated based on the target control. For example, the clipboard permission configuration module can generate clipboard configuration parameters based on the target control, as shown in step S1103.

[0370] The clipboard configuration parameters include values ​​for multiple access control controls. The value of the target control is the first value, and the values ​​of the other controls are the second values. Among them, the other controls are controls other than the target control among the multiple access control controls. The first value is used to indicate that the target control is in the open state, and the second value is used to indicate that the other controls are in the closed state.

[0371] by Figure 4 Taking Figure a as an example, the target control is in the open state, and the target control can be a text control 304, an image control 305, or a graphic control 306; other controls are in the closed state, and other controls can be a file control 307. In the clipboard configuration parameters, the values ​​of text control 304, image control 305, and graphic control 306 are all the first value; the value of file control 307 is the second value.

[0372] 2) The first module enables the target sub-processing module and the second module (e.g., the electronic device clipboard management module) according to the clipboard configuration parameters; the target sub-processing module is the module corresponding to the target control among multiple sub-processing modules; the sub-processing module is used to process the clipboard data corresponding to the data type access control and / or application access control; the second module is used to sense changes in the data of the electronic device clipboard.

[0373] Sub-processing modules can be, for example, text processing modules, image processing modules, image and text processing modules, and file processing modules. Sub-processing modules can be used to process clipboard data corresponding to data type access control controls. For example, text processing modules, image processing modules, image and text processing modules, and file processing modules each process clipboard data of different data types. Sub-processing modules can also be used to process clipboard data corresponding to application access control controls. For example, a file processing module may include a public sandbox processing module and a private sandbox processing module; the private sandbox processing module can process file data for a specific application, while the public sandbox processing module processes file data for other applications.

[0374] The target sub-processing module is the module corresponding to the target control among multiple sub-processing modules. For example, if the text control 304 is in the open state, the target sub-processing module may include a text processing module. As another example, if the gallery application control 312 is in the open state, the target sub-processing module may include a private sandbox processing module.

[0375] Optionally, when the distributed device is online and the device type of the distributed device meets the access permissions corresponding to the target control, the first module enables the fourth module (e.g., the distributed device clipboard management module) according to the clipboard configuration parameters. The fourth module is used to sense data changes in the distributed device clipboard.

[0376] In this way, the target control selected by the user corresponds to the sub-processing module enabled by the electronic device, which helps save system resources and power consumption. The electronic device can cache clipboard configuration parameters to facilitate accurate determination of access permissions for clipboard data based on these parameters. Furthermore, based on the data type authorization mechanism, clipboard data can be further categorized into public sandbox file data and private sandbox file data according to the application source. Managing public and private sandbox file data separately effectively prevents Windows virtual machines from accessing unauthorized private sandbox file data, further enhancing clipboard data security.

[0377] S1603. The electronic device displays a first interface; the first interface includes a second window and a third window, the second window includes the desktop of the electronic device or the application window of the electronic device, and the third window is a virtual machine window; the second window includes a first object, and the third window does not include the first object.

[0378] The first interface can be, for example... Figure 4 The interface shown in b or Figure 6 The interface shown in b can correspond to the file management application window 401, the gallery application window 601, or the desktop of an electronic device; the third window can correspond to the virtual machine window 402, the virtual machine window 602, or the desktop of a virtual machine.

[0379] Understandably, the second window can be used to copy or cut data from the first operating system. Electronic devices can copy or cut data such as files, pictures, and application icons from the desktop; they can also copy or cut data from application windows, such as files in a file management application window, pictures in a gallery application window, and text in a document editing application window.

[0380] The third window can be used to paste data into a second operating system, such as a virtual machine window. A virtual machine can paste data such as files, images, and application icons onto its desktop; electronic devices can also paste data into the virtual machine's application window.

[0381] by Figure 4 For example, the first object could be document 2 in the file management application window 401, while document 2 is not included in the virtual machine window 402. Figure 6 For example, the first object may be image 3 in the gallery application window 601, while image 3 is not included in the virtual machine window 602.

[0382] S1604. The electronic device receives an operation for copying or cutting the first object in the second window and an operation for pasting the first object in the third window; wherein the first object does not meet the access permissions corresponding to the target control.

[0383] Operations for copying or cutting the first object can be triggered by, for example: operations triggered by the copy or cut control in the shortcut menu; operations triggered by shortcut keys such as Ctrl+X and Ctrl+C; copy or cut operations triggered by screenshots; copy or cut operations triggered by voice commands; copy or cut operations triggered by dragging the first object out of the second window, etc.

[0384] The operation for pasting the first object can be, for example, an operation triggered by the paste control in the shortcut menu; an operation triggered by a shortcut key such as Ctrl+V; a paste operation triggered by a voice command; a paste operation triggered by dragging the first object to the third window and then releasing the mouse, etc.

[0385] This process can be, for example: in Figure 4 Copy document 2 from file management window 401 and attempt to paste document 2 into virtual machine window 402; Figure 6 Copy image 3 from the gallery application window 601 and attempt to paste image 3 into the virtual machine window 602.

[0386] The statement that the first object does not meet the access permissions of the target control can be understood as follows: In this step, the electronic device judges the access permissions of the first object and determines that the first object does not meet the access permissions of the target control.

[0387] In some embodiments, after the electronic device receives an operation to copy or cut the first object in the second window, it further includes: a first module (clipboard processing module) determining whether the first object meets the access permissions corresponding to the target control according to the clipboard configuration parameters; if the first object does not meet the access permissions corresponding to the target control, the first module does not synchronize the first object to the virtual machine clipboard.

[0388] This process corresponds to the relevant descriptions in steps S1205-S1206, and will not be repeated here. Thus, before synchronizing clipboard data to the virtual machine clipboard, the clipboard data can be further categorized by data type, device origin, and application origin, narrowing the scope of shared clipboard authorization, reducing the probability of sharing user information to the virtual machine clipboard, lowering the risk of user information leakage, and improving the security of clipboard data.

[0389] In some embodiments, before the first module (clipboard processing module) determines whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters, the method further includes: in response to an operation for copying or cutting the first object, the electronic device clipboard obtains the first object; the second module (e.g., the electronic device clipboard management module) senses the data change in the electronic device clipboard and obtains the first object from the electronic device clipboard; when the focus window is switched to a third window, the second module (e.g., the electronic device clipboard management module) synchronizes the first object to the first module (e.g., the clipboard processing module).

[0390] This process corresponds to the relevant descriptions in steps S1202 to S1204, and will not be repeated here.

[0391] The electronic device determines whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters, including: the first module (e.g., the clipboard processing module) matches the data type, application information, and device type of the first object with the clipboard configuration parameters; when the value corresponding to the data type of the first object is the second value, the value corresponding to the device type of the first object is the second value, or the value corresponding to the application information of the first object is the second value, the first module determines that the first object does not meet the access permissions corresponding to the target control.

[0392] The process can be referred to in the relevant description in step S1205, and will not be repeated here.

[0393] Understandably, this process is only for... Figure 16The scenario shown illustrates a situation where clipboard data pasting fails due to unmet access permissions. Therefore, the corresponding determination result only indicates that the first object does not meet the access permissions corresponding to the target control. In other scenarios, after the first module matches the data type, application information, and device type of the first object with the clipboard configuration parameters, it may further include: when the value corresponding to the data type of the first object is a first value, the value corresponding to the device type of the first object is a first value, and the value corresponding to the application information of the first object is a first value, the clipboard processing module determines that the first object meets the access permissions corresponding to the target control.

[0394] In this way, electronic devices can perceive changes in clipboard data in real time through the enabled electronic device clipboard management module, reducing the latency of synchronizing from the electronic device clipboard to the virtual machine clipboard in shared clipboard scenarios; changes in the focus window can identify whether the user intends to use the shared clipboard function, improving the user experience; in addition, electronic devices can manage access permissions for clipboard data through the target control selected by the user, improving the security of clipboard data.

[0395] S1605, The electronic device displays the first object in the second window and does not display the first object in the third window.

[0396] This process can be understood as the virtual machine clipboard not being synchronized with the clipboard data of this copy; in response to receiving an operation to paste the first object in the third window, the electronic device cannot paste data from the first operating system into the second operating system. After the pasting failure, the user interface can present the effect that the first object continues to be displayed in the second window (the window of the first operating system), while the first object is not pasted in the third window (the window of the second operating system).

[0397] In this way, in scenarios involving cross-system and / or cross-device clipboard sharing, clipboard data can be further categorized based on data type, device origin, and application origin. This narrows the scope of shared clipboard authorization, reduces the probability of sharing user information to the virtual machine clipboard, lowers the risk of user information leakage, and improves clipboard data security. Furthermore, electronic devices can provide a visual interface for shared clipboard access permissions, allowing users to understand the scope of shared clipboard authorization and customize access settings to better suit their needs, further enhancing clipboard data security.

[0398] Optionally, based on cross-system interaction between electronic devices and virtual machines, communication is established between electronic devices and distributed devices to achieve cross-device and cross-system interaction between distributed devices and virtual machines; specifically, after enabling access permissions for the target control, it also includes:

[0399] The electronic device receives a second object from a distributed device, which is an object copied or cut from the desktop or application window of the distributed device; the electronic device receives an operation to paste the second object in a third window (e.g., a virtual machine window); wherein the second object does not satisfy the access permissions corresponding to the target control; the electronic device does not display the second object in the third window.

[0400] The second object is clipboard data in a distributed device; the second object can be, for example... Figure 5 In the interface shown in b, document 3 is located on the phone. The operations for copying or cutting the second object are the same as those for copying or cutting the first object. The operations for pasting the second object are the same as those for pasting the first object.

[0401] This process can correspond to Figure 5 For example, after copying or cutting document 3 on a mobile phone, the PC can obtain document 3; when a paste operation is received in the virtual machine window 502, because the Phone control 308 is in a closed state, the electronic device cannot paste document 3 into the virtual machine window 502. After the paste fails, the effect of not pasting into the second object in the third window (the window of the second operating system) can be displayed in the user interface.

[0402] In some embodiments, when the distributed device is online and the device type of the distributed device meets the access permissions corresponding to the target control, the first module (clipboard processing module) enables the fourth module (distributed device clipboard management module) according to the clipboard configuration parameters. The fourth module is used to sense data changes in the clipboard of the distributed device.

[0403] This process corresponds to steps S1507-S1510. Thus, when a distributed device is connected and its device type is met, the distributed device clipboard management module is enabled to allow it to detect real-time data changes in the distributed device clipboard; when no distributed device is connected or its device type is not met, the distributed device clipboard management module is disabled to save system resources and power consumption.

[0404] In some embodiments, after the electronic device receives the second object from the distributed device, the method further includes: a first module determining whether the second object meets the access permissions corresponding to the target control based on clipboard configuration parameters; if the second object does not meet the access permissions corresponding to the target control, the first module does not synchronize the second object to the virtual machine clipboard.

[0405] This process corresponds to the relevant descriptions in steps S1504-S1505, and will not be repeated here.

[0406] In this way, in scenarios where clipboards are shared across devices, clipboard data can be further categorized by data type, device origin, and application origin. This narrows the scope of shared clipboard authorization, reduces the probability of sharing user information to the virtual machine clipboard, lowers the risk of leaking user information, and improves the security of clipboard data.

[0407] Optionally, if the target control includes a control for indicating the detection of user information, the electronic device further includes a third module (user information detection module); after the first module (clipboard processing module) determines whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters, it further includes: if the first object meets the access permissions corresponding to the target control, the first module (clipboard processing module) passes the first object to the target sub-processing module; the target sub-processing module performs data format processing on the first object and passes the first object to the third module; wherein, the target sub-processing module is used to support cross-process data transmission between the first module and the virtual machine; the third module determines whether the first object includes user information; if the first object includes user information, a prompt message is displayed (e.g., ...). Figure 8 The prompt message 806 in the interface shown in c) corresponds to a first control (e.g., continue using control 808) and a second control (e.g., cancel control 807); in response to a trigger operation on the first control, the third module synchronizes the first object to the virtual machine clipboard; or, in response to a trigger operation on the second control, the third module does not synchronize the first object to the virtual machine clipboard.

[0408] This process can correspond to Figure 8 and Figure 13 The illustrated embodiment demonstrates how, in a shared clipboard scenario, when clipboard data includes user information, a pop-up window can prompt the user whether to continue using the data. This prevents user information from being shared to the virtual machine without the user's knowledge, thus improving data security.

[0409] Optionally, after synchronizing the first object to the virtual machine clipboard, the third module further includes: clearing the first object from the virtual machine clipboard after a preset time. This process corresponds to step S1307. In this way, if the user insists on synchronizing clipboard data to the virtual machine for use, the virtual machine can delete historical data from the virtual machine clipboard after a period of time, thereby reducing the time the virtual machine clipboard shares user information and improving data security.

[0410] Optionally, it may also include: the electronic device displaying a prompt message to prompt the user to enable access to the shared clipboard of the first object, and / or, the prompt message to prompt the user that the first object includes user information and to ask the user whether to continue using the first object in the third window.

[0411] A prompt message used to prompt the user to grant access to the shared clipboard for the first object could be, for example: Figure 4 The prompt message 408 appears on the interface shown in d; Figure 5 The prompt message 508 is shown in the interface d shown in the figure. Figure 6 The error message 608 appears on the interface shown in d.

[0412] To prompt the user that the first object contains user information and ask the user whether to continue using the first object in the third window, for example: Figure 8 The prompt message 806 appears on the interface shown in Figure c.

[0413] This allows for pop-up notifications to indicate that the clipboard sharing function has access restrictions, enabling users to adjust access permissions promptly; it also prompts users whether to continue copying user information, thereby increasing users' trust in the security of clipboard data.

[0414] Optionally, in the first interface, the second window also includes a third object, while the third window does not include the third object; after the electronic device displays the first interface, it further includes: the electronic device receiving an operation for copying or cutting the third object in the second window, and receiving an operation for pasting the third object in the third window; wherein the third object satisfies the access permissions corresponding to the target control; the electronic device displays the third object in the third window.

[0415] This process allows clipboard data from an electronic device or distributed device to be pasted into the virtual machine when access permissions are met. The virtual machine window then displays the clipboard data originating from the electronic device or distributed device. For a user interface example of a successful pasting scenario, please refer to [reference needed]. Figure 1 or Figure 2 The interface shown.

[0416] Specifically, with Figure 1 For example, the first interface can be, for instance... Figure 1 In the interface shown in 'a', the third object can be, for example, document 1; the operation to copy or cut the third object received in the second window can be an operation to copy or cut data in the window of the first operating system; the operation to paste the third object received in the third window can be an operation to paste data in the window of the second operating system. The third object can be successfully pasted if it meets the access permissions; for example, after pasting, document 1 will be included in the virtual machine window (e.g., the window of the second operating system).

[0417] The processing flow of this process can be referred to the processing flow of the first object that meets the access permissions in S1208-S1210, and will not be repeated in this embodiment.

[0418] In this way, when sharing the clipboard, access permissions can be used to manage clipboard data securely, ensuring that all data in the virtual machine clipboard is data that meets the access permissions, reducing the probability of user information appearing in the virtual machine clipboard, reducing the risk of virtual machine clipboard data leakage, and improving data security.

[0419] It should be noted that the user information (including but not limited to user device type, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0420] The clipboard management method according to the embodiments of this application has been described above. The apparatus for performing the above method provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced in each other, and the related apparatus provided in the embodiments of this application can perform the steps in the above clipboard management method.

[0421] like Figure 17 As shown, the clipboard management device 1700 can be used in communication equipment, circuits, hardware components, or chips. The clipboard management device includes a display unit 1701 and a processing unit 1702. The display unit 1701 supports the display steps performed by the clipboard management device 1700; the processing unit 1702 supports the information processing steps performed by the clipboard management device 1700.

[0422] In a possible implementation, the clipboard management device 1700 may also include a communication unit 1703. Specifically, the communication unit supports the clipboard management device 1700 in performing data transmission and data reception steps. The communication unit 1703 may be an input or output interface, pins, or circuitry, etc.

[0423] In a possible embodiment, the clipboard management device may further include a storage unit 1704. The processing unit 1702 and the storage unit 1704 are connected via a line. The storage unit 1704 may include one or more memories, which may be devices in one or more devices or circuits used for storing programs or data. The storage unit 1704 may exist independently and be connected to the processing unit 1702 of the clipboard management device via a communication line. Alternatively, the storage unit 1704 may be integrated with the processing unit 1702.

[0424] Storage unit 1704 may store computer-executable instructions for the methods in the terminal device, so that processing unit 1702 executes the methods in the above embodiments. Storage unit 1704 may be a register, cache, or RAM, etc., and storage unit 1704 may be integrated with processing unit 1702. Storage unit 1704 may be a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, and storage unit 1704 may be independent of processing unit 1702.

[0425] This application provides an electronic device, which includes a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the electronic device to perform the above-described method.

[0426] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.

[0427] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0428] In one possible implementation, a computer-readable medium may include random access memory (RAM), read-only memory (ROM), compact discread-only memory (CD-ROM) or other optical disc storage, magnetic disk storage or other magnetic storage devices, or any other medium targeted to carry or to store required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0429] This application provides a computer program product, which includes a computer program that, when run, causes the computer to perform the above-described method.

[0430] It should be noted that the modules or components described in the above embodiments can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), etc. Furthermore, when a module is implemented through processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors capable of calling program code, such as a controller. Additionally, these modules can be integrated together to implement a system-on-a-chip (SOC).

[0431] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0432] The term "multiple" in this document refers to two or more. The term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the preceding and following related objects; in formulas, " / " indicates a "division" relationship. Additionally, it should be understood that in the description of this application, words such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0433] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.

[0434] It is understood that, in the embodiments of this application, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

Claims

1. A clipboard management method, characterized in that, The method is applied to an electronic device, wherein the electronic device has a first operating system and a virtual machine running a second operating system, the first operating system being different from the second operating system; the method includes: The electronic device displays a first window, which includes multiple access control controls. The access control controls are used to configure the access permissions of the electronic device and the virtual machine to share the clipboard. The access control controls include one or more of the following: data type access control, device type access control, application access control, or controls for indicating the detection of user information. In response to a trigger operation on a target control, access permissions corresponding to the target control are enabled; the target control is one or more controls among a plurality of access permission controls. The electronic device displays a first interface; the first interface includes a second window and a third window, the second window includes the desktop of the electronic device or the application window of the electronic device, and the third window is a virtual machine window; the second window includes a first object, and the third window does not include the first object; The electronic device receives an operation for copying or cutting the first object in the second window and an operation for pasting the first object in the third window; wherein the first object does not satisfy the access permissions corresponding to the target control; The electronic device displays the first object in the second window and does not display the first object in the third window.

2. The method according to claim 1, characterized in that, The data type access control includes one or more of the following: text access control, image access control, image and text access control, or file access control; The device type access control includes one or more of the following: mobile phone access control, PC access control, tablet access control, or USB peripheral access control. Application access control includes one or more of the following: application-specific access control or other application access control.

3. The method according to claim 1 or 2, characterized in that, The electronic device establishes communication with the distributed device, and after enabling the access permissions corresponding to the target control, the method further includes: The electronic device receives a second object from the distributed device, the second object being an object copied or cut from the desktop or application window of the distributed device; The electronic device receives an operation to paste the second object in the third window; wherein the second object does not satisfy the access permissions corresponding to the target control; The electronic device does not display the second object in the third window.

4. The method according to any one of claims 1-3, characterized in that, Also includes: The electronic device displays a prompt message, which prompts the user to enable access to the shared clipboard of the first object, and / or prompts the user to indicate that the first object includes the user information, and asks the user whether to continue using the first object in the third window.

5. The method according to claim 1 or 2, characterized in that, In the first interface, the second window further includes a third object, and the third window does not include the third object; after the electronic device displays the first interface, it further includes: The electronic device receives an operation for copying or cutting the third object in the second window, and an operation for pasting the third object in the third window; wherein the third object satisfies the access permissions corresponding to the target control; The electronic device displays the third object in the third window.

6. The method according to claim 1, characterized in that, The electronic device includes a first module; the step of enabling access permissions corresponding to the target control in response to a trigger operation on the target control includes: In response to a trigger operation on the target control, the first module obtains clipboard configuration parameters; the clipboard configuration parameters are generated based on the target control; the clipboard configuration parameters include values ​​of multiple access control controls, the value of the target control is a first value, and the values ​​of other controls are second values; wherein, the other controls are controls other than the target control among the multiple access control controls, the first value is used to indicate that the target control is in an open state, and the second value is used to indicate that the other controls are in a closed state; The first module enables the target sub-processing module and the second module according to the clipboard configuration parameters; the target sub-processing module is the module corresponding to the target control among multiple sub-processing modules; the sub-processing module is used to process the clipboard data corresponding to the data type access control and / or the application access control; the second module is used to sense changes in the clipboard data of the electronic device.

7. The method according to claim 6, characterized in that, After receiving an operation to copy or cut the first object in the second window, the electronic device further includes: The first module determines whether the first object meets the access permissions corresponding to the target control based on the clipboard configuration parameters; If the first object does not meet the access permissions corresponding to the target control, the first module will not synchronize the first object to the virtual machine clipboard.

8. The method according to claim 7, characterized in that, Before the first module determines whether the first object satisfies the access permissions corresponding to the target control based on the clipboard configuration parameters, it further includes: In response to the operation of copying or cutting the first object, the electronic device clipboard obtains the first object; The second module senses the data changes in the clipboard of the electronic device and obtains the first object from the clipboard of the electronic device; When the focus window is switched to the third window, the second module synchronizes the first object to the first module; The electronic device determines whether the first object satisfies the access permissions corresponding to the target control based on the clipboard configuration parameters, including: The first module matches the data type, application information, and device type of the first object with the clipboard configuration parameters; When the value corresponding to the data type of the first object is the second value, the value corresponding to the device type of the first object is the second value, or the value corresponding to the application information of the first object is the second value, the first module determines that the first object does not meet the access permission requirements of the target control.

9. The method according to claim 7, characterized in that, If the target control includes a control for indicating the detection of user information, the electronic device further includes a third module; After the first module determines whether the first object satisfies the access permissions corresponding to the target control based on the clipboard configuration parameters, it further includes: If the first object satisfies the access permissions corresponding to the target control, the first module will pass the first object to the target sub-processing module; The target sub-processing module performs data format processing on the first object and transmits the first object to the third module; wherein, the target sub-processing module is used to support cross-process data transmission between the first module and the virtual machine; The third module determines whether the first object includes the user information; If the first object includes the user information, a prompt message is displayed, and the prompt message corresponds to a first control and a second control. In response to a trigger operation on the first control, the third module synchronizes the first object to the virtual machine clipboard; Alternatively, in response to a triggering operation on the second control, the third module does not synchronize the first object to the virtual machine clipboard.

10. The method according to claim 9, characterized in that, After the third module synchronizes the first object to the virtual machine clipboard, it further includes: After a preset time, the first object in the virtual machine clipboard is cleared.

11. The method according to claim 6, characterized in that, Also includes: When the distributed device is online and the device type of the distributed device meets the access permissions corresponding to the target control, the first module enables the fourth module according to the clipboard configuration parameters. The fourth module is used to sense data changes in the clipboard of the distributed device.

12. The method according to claim 11, characterized in that, After the electronic device receives the second object from the distributed device, it further includes: The first module determines whether the second object meets the access permissions corresponding to the target control based on the clipboard configuration parameters; If the second object does not meet the access permissions corresponding to the target control, the first module will not synchronize the second object to the virtual machine clipboard.

13. An electronic device, characterized in that, The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-12.

14. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-12.

16. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-12.