Cross-end interaction method, device, system and storage medium
Patent Information
- Application Number
- CN202410043011.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2044-01-10
AI Technical Summary
对于集中粘贴场景以及跨设备场景下,往往需要很繁杂的步骤才能实现剪贴板数据的共享,剪贴板数据的共享过程不够便捷,严重影响了用户的使用体验
[0078] In a sixth aspect, a computer program product containing instructions is provided that, when run on a computer, causes the computer to perform the methods as described in the first aspect or any implementation thereof.
Smart Images

Figure CN120335693B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a cross-terminal interaction method, device, system and storage medium. Background Technology
[0002] With the continuous development of terminal technology, users frequently copy multiple images and texts separately in their daily lives and studies. Furthermore, with the increasing variety of terminals and the widespread application of multi-device collaboration, users can copy or cut data on one device and then paste it into other applications or devices. Moreover, in some scenarios, users need to repeatedly use multiple different data sets across multiple applications and electronic devices within a certain period. For example, in applications such as creating documents, writing papers, producing presentations, book reviews, and movie reviews, users typically copy relevant text and images first and then paste them. In this scenario, the user's use of copied or cut data is not a one-time event.
[0003] However, the current native clipboard on devices only provides one-time copy and paste functionality. When users repeatedly need to access multiple different data, they must copy and paste the data once, then repeat this process again to collect all the data. The same repetitive copy and paste steps are required when sharing multiple different data across multiple applications and electronic devices. In scenarios involving concentrated pasting or cross-device use, the process of sharing clipboard data is often cumbersome and inconvenient, severely impacting the user experience.
[0004] Therefore, improving the efficiency of clipboard data sharing across electronic devices is an urgent problem to be solved. Summary of the Invention
[0005] This application provides a cross-platform interaction method, device, system, and storage medium, which can greatly improve the sharing efficiency of clipboard data, thereby enhancing the user experience. The technical solution is as follows:
[0006] Firstly, a cross-platform interaction method is provided, applicable to a system including a first electronic device and a second electronic device, both located within the same trust ring. The method includes: the first electronic device displaying a first interface; responding to a user's first clipboard operation on a first material input in the first interface, obtaining first clipboard data from the native clipboard of the first electronic device; the first clipboard operation being a copy or cut operation; storing the first clipboard data in the first clipboard of the first electronic device and encapsulating it as a card, then displaying it in a first floating window on the second interface. The first floating window may also display other cards, such as a second card, where the second card includes second clipboard data obtained by the user performing a second clipboard operation on a second material, wherein the first card corresponding to the first clipboard data is the most recently displayed card. Upon satisfying a preset synchronization timing, the first electronic device synchronizes unsynchronized data to the second electronic device in the ring, the unsynchronized data including at least the first clipboard data; after obtaining the unsynchronized data, the second electronic device encapsulates it as a card and displays it in a second floating window on a third interface; the second floating window includes at least a third card corresponding to the first clipboard data. Since the second clipboard data included in the second card was collected before the first clipboard data, and clipboard data is synchronized between the electronic devices in the loop, the second floating window also includes a fourth card corresponding to the second clipboard data. In response to a drag operation on any card (e.g., the third card) in the second floating window, the second electronic device drags all the clipboard data included in that card to the first editing area; that is, it displays all the first clipboard data corresponding to the third card in the first editing area, thus achieving data reuse.
[0007] If the second clipboard data was obtained by the first electronic device from the native clipboard, and since the second clipboard data included in the second card was saved before the first clipboard data, then the second clipboard data may have already been synchronized to the second clipboard of the second electronic device. Of course, the second clipboard data can also be synchronized to the second clipboard of the second electronic device along with the first clipboard data. The second clipboard data can also be saved by the user on the second electronic device; in this case, the second clipboard data does not need to be synchronized to the second electronic device. Alternatively, the second clipboard data can be saved by the user on other electronic devices (electronic devices other than the first and second electronic devices); in this case, the second clipboard data is synchronized to the second electronic device from those other electronic devices.
[0008] If the user performs the second clipboard operation on the second material on the first electronic device, the second clipboard data is obtained by the first electronic device from the native clipboard. If the user performs the second clipboard operation on the second material on another electronic device (which may be the second electronic device), the second clipboard data is obtained by the other electronic device from its native clipboard, and then synchronized from the clipboard of the other electronic device to the first clipboard of the first electronic device.
[0009] In some embodiments of this application, the first electronic device may be a mobile phone, and the second electronic device may be a tablet computer or a desktop computer.
[0010] In the solution provided in this application, when the first electronic device displays the first interface, it responds to the user's input of a first clipboard operation (copy or cut operation) on the first material displayed on the first interface, obtains the first clipboard data corresponding to the first clipboard operation, and saves it in the first clipboard of the first electronic device. After the first clipboard data is saved, the first clipboard encapsulates the first clipboard data into a card format and displays it in the first floating window. The first clipboard is a storage container used by the first electronic device to save multiple clipboard data. It can save clipboard data from the native clipboard, and newly saved clipboard data in the first clipboard will not overwrite the previous clipboard data. That is, the first electronic device can save data copied or cut multiple times to the native clipboard and display it in the first floating window for the user to view, improving the convenience of operation. The first electronic device also automatically synchronizes the first clipboard data to other devices in the loop (e.g., the second electronic device), saves it in the second clipboard of the second electronic device, and displays the third card corresponding to the first clipboard data in the second floating window of the second electronic device. By synchronizing clipboard data in the first clipboard, data that a user has copied or cut multiple times and saved to the native clipboard on their local device can be saved and displayed on other devices in the loop, allowing for viewing and use. This enables cross-device sharing of clipboard data, improves the efficiency of cross-device clipboard data sharing, facilitates user reuse, and enhances the user experience.
[0011] Furthermore, when the same trust ring also includes a third electronic device, the first electronic device also synchronizes the first clipboard data to the third electronic device. The third electronic device obtains the first clipboard data, saves it in the clipboard of the third electronic device, and displays the card corresponding to the first clipboard data in the third floating window of the third electronic device.
[0012] Users can also reuse clipboard data saved on a second electronic device or clipboard data synchronized from other devices. In response to a drag operation on any card in the second floating window, all clipboard data contained in that card can be dragged to the first editing area, achieving data reuse. This allows for deletion, modification, and other operations on the clipboard data in the editing area, improving the efficiency of using saved clipboard data.
[0013] In some embodiments of this application, the dragging operation can be actions or gestures such as dragging, pulling, dragging, traction, etc.
[0014] In some embodiments of this application, the clipboard data stored in the clipboard is complete data. Due to the limited display area of the interface, the data displayed on the cards in the floating window can be all or part of the complete data. When a card is selected, the complete data in the clipboard is retrieved, thereby displaying the complete data in the editing area; the edited data represents the complete data.
[0015] In some embodiments of this application, the complete data stored in the clipboard can be text or images. When electronic devices synchronize clipboard data, they can synchronize the original text or the original images. The clipboard stores complete data, which is convenient for users to directly access when using shared data, reducing the number of interactions between electronic devices and improving data sharing efficiency.
[0016] In some embodiments of this application, a user opens an editing interface on a second electronic device, selects any card in a second floating window, and pastes all the clipboard data included in the card into the editing area of the editing interface by calling the second clipboard. The data in the card can come from either the first electronic device or the second electronic device, thereby enabling the sharing and convenient use of collected data.
[0017] In conjunction with the first aspect, in one possible implementation, after the first electronic device obtains the first clipboard data from the native clipboard, the method further includes: within a first preset time period after the first clipboard operation, the first electronic device receives a third clipboard operation input by the user for the third material. The native clipboard stores one-time data, i.e., the first clipboard data is overwritten by the third clipboard data, and the native clipboard only contains the third clipboard data. The third clipboard data is obtained from the native clipboard, stored in the first clipboard, and encapsulated as a card and displayed in a first floating window. At least one card is displayed in the first floating window, and a fifth card corresponding to the third clipboard data is the most recently displayed card among the at least one cards.
[0018] In some embodiments of this application, the third clipboard operation can be a cut operation or a copy operation. The third material can be the same material as the first material; that is, the user can cut or copy the same content or different content of the same material multiple times, and the user can also cut or copy different materials multiple times.
[0019] In some embodiments of this application, after collecting the first clipboard data, the user can continue to collect clipboard data (i.e., the third clipboard data) on the first electronic device through cut or copy operations, and the third clipboard data is encapsulated in card form and displayed in the first floating window. The user can copy or cut multiple times on the local device (e.g., the first electronic device), and the copied or cut data is collected in the first clipboard and updated in the first floating window, realizing multiple collections of clipboard data, which is convenient for users to view and use at any time, and improving the user experience.
[0020] In conjunction with the first aspect, in one possible implementation, after the first electronic device obtains the first clipboard data from the native clipboard, the method further includes: if the first electronic device does not receive a clipboard operation input by the user within a first preset time period after the first clipboard operation, then closing the first clipboard and closing the first floating window.
[0021] In some embodiments of this application, after the first clipboard data is saved, if the user does not perform any cut or copy operations within a certain period of time, the first clipboard of the first electronic device will no longer save new clipboard data, and the first clipboard and the first floating window will be closed to reduce power consumption.
[0022] In conjunction with the first aspect, in one possible implementation, after the second electronic device obtains first clipboard data from the first clipboard of the first electronic device in response to the first synchronization request, the method further includes: if the second clipboard of the second electronic device in the loop contains data that has not been synchronized to the first electronic device (e.g., fourth clipboard data), then synchronizing the unsynchronized data to the first electronic device. After obtaining the fourth clipboard data, the first electronic device encapsulates it into a card format (i.e., a sixth card) and displays it in the first floating window.
[0023] In some embodiments of this application, the local end (e.g., a first electronic device) synchronizes first clipboard data to the remote end (e.g., a second electronic device), indicating that a data channel is established between the local end and the remote end. Therefore, if the remote end's clipboard contains data that has not been synchronized to the local end (e.g., fourth clipboard data), the remote end's clipboard encapsulates the data that the remote end has not sent to the local end, and the established data channel synchronizes the data to the local end's clipboard. This achieves data channel multiplexing, reduces data transmission conflicts, and improves data transmission efficiency.
[0024] In conjunction with the first aspect, in one possible implementation, the sixth card includes a first icon and / or a second icon, the first icon indicating that the device source identifier of the fourth clipboard data is a second electronic device, and the second icon indicating that the application source identifier of the fourth clipboard data is an application source identifier.
[0025] In some embodiments of this application, the device source identifier may be a general identifier representing a device, and the application source identifier may be a general identifier representing an application.
[0026] The device source identifier for the first clipboard data displayed on the aforementioned third card is the first electronic device.
[0027] In some embodiments of this application, displaying icons indicating the device source and application source on the card prompts the user about the device and application sources of each clipboard data, thereby increasing the diversity and richness of the interface display and enhancing the fun of human-computer interaction.
[0028] In conjunction with the first aspect, in one possible implementation, the method further includes: if the second clipboard of the second electronic device in the ring contains data that has not been synchronized with the first electronic device, then, under a preset synchronization timing condition, the second electronic device synchronizes the unsynchronized data with the first electronic device. The unsynchronized data may include the fifth clipboard data. After obtaining the fifth clipboard data, the first electronic device encapsulates it into a card format and displays it in a first floating window. The first floating window includes cards corresponding to each clipboard data, that is, the first floating window includes at least the card corresponding to the fifth clipboard data.
[0029] In some embodiments of this application, when a preset synchronization timing is met, not only does the first electronic device automatically synchronize clipboard data to other devices in the loop (e.g., the second electronic device), but the first electronic device can also receive data synchronized by the second electronic device. Taking the fifth clipboard data as an example, the first electronic device receives the fifth clipboard data synchronized by the second electronic device. Thus, the first floating window of the first electronic device displays not only all or part of the first clipboard data it has collected, but also all or part of the synchronized fifth clipboard data. By synchronizing the clipboard data in the second clipboard of the second electronic device, data copied or cut by the user in the second electronic device can be collected and displayed in the first electronic device in the loop. The two are synchronized with each other, realizing cross-device sharing of clipboard data, improving the efficiency of cross-device clipboard data sharing, and enhancing the user experience.
[0030] In conjunction with the first aspect, in one possible implementation, the preset synchronization timing is any one of the following: within a second preset time period after the second electronic device obtains clipboard data, when the data channel between the first and second electronic devices is idle, when the second electronic device establishes a connection with the first electronic device, when the second clipboard is first started, when the second clipboard is passively updated, or when the second clipboard is opened.
[0031] By setting preset synchronization times, the first electronic device synchronizes its clipboard data with the second electronic device when the preset synchronization time is met, and vice versa. The clipboards of the electronic devices can share saved clipboard data, enabling cross-device clipboard data sharing, improving the efficiency of cross-device clipboard data sharing, and enhancing the user experience.
[0032] In conjunction with the first aspect, in one possible implementation, the method further includes: the first electronic device, in response to a drag operation on any card in the first floating window, drags all the clipboard data included in that card to the second editing area, thereby performing operations such as deletion and modification on the second editing data, and improving the efficiency of using the collected clipboard data.
[0033] Users can open the editing interface on the first electronic device, select any displayed card, and paste all the clipboard data corresponding to the card into the editing area of the editing interface by calling the first clipboard. The data in the card can come from the first electronic device or other electronic devices, realizing the sharing of collected data and its use at any time, thus improving the user experience.
[0034] In conjunction with the first aspect, in one possible implementation, when the third card indicates the first image, the method further includes: the second electronic device sending an image data request to the first electronic device; the first electronic device responding to the image data request sending the first image to the second electronic device, and the first image being displayed in the first editing area.
[0035] In some embodiments of this application, the complete data can be text or images. Text, due to its small size, can be directly synchronized. Images, however, typically occupy more space. When synchronizing data between electronic devices, only the image information can be synchronized. This image information may include a thumbnail or partial screenshot of the image, the image's storage location information, the image's device source identifier, the image's application source identifier, and the image's acquisition timestamp. The image thumbnail or partial screenshot is used for illustrative display in the floating window of the synchronized device. The image's device source identifier indicates the device source of the image data request (e.g., the first image originates from the first electronic device).
[0036] In some embodiments of this application, when a user selects a card indicating an image, if the image is synchronized clipboard data, the requesting party needs to send an image data request based on the image's device source identifier. The requested party sends the image information to the requesting party, and the requesting party reads the original image from the requested party based on the image's storage location information in the image information. After obtaining the original image, the requesting party displays it in the editing area. If the image is clipboard data from the user's own collection, the image can be directly read based on its storage location information and displayed in the editing area without sending an image data request. This reduces unnecessary transmission losses and improves resource utilization.
[0037] In conjunction with the first aspect, in one possible implementation, before the first electronic device displays the second interface, the method includes: the first electronic device activating the first clipboard in response to listening to a first clipboard event triggered by a first clipboard operation.
[0038] In some embodiments of this application, the first clipboard is used to store clipboard data. In practical applications, the user can first access the first clipboard. At this time, a floating window is displayed on the interface. Then, in response to the user's first clipboard operation on the first material input in the first interface, the first clipboard data is obtained from the native clipboard of the first electronic device and stored in the first clipboard. Of course, the first clipboard can also be activated through the first clipboard operation (copy operation or cut operation) when the first electronic device displays the first interface. This application does not limit this aspect.
[0039] In some embodiments of this application, the electronic device listens for clipboard events. Copy and cut operations trigger clipboard events, causing new data to be added to the native clipboard. The presence of new data indicates that the user intends to save the clipboard data, and a first clipboard is activated. The clipboard data is then saved using the first clipboard. Using the first clipboard added to the electronic device in this application as a saver, multiple saves and sharing of different data are possible.
[0040] In conjunction with the first aspect, in one possible implementation, in response to a first clipboard event triggered by a first clipboard operation, the method further includes: a first electronic device sending the first clipboard event to a second electronic device; the second electronic device saving the first clipboard event and the device identifier of the first electronic device, and listening for a paste event; if a first paste event is detected within a third preset time period after saving the first clipboard event, a clipboard data request is sent to the first electronic device based on the device identifier to request the acquisition of the first clipboard data corresponding to the first clipboard event. In response to the clipboard data request, the first electronic device sends the first clipboard data to the second electronic device; after receiving the first clipboard data, the second electronic device pastes the data according to the first clipboard data. When the first clipboard data is text, the text can be pasted; when the first clipboard data indicates image information, the image is read from the first electronic device according to the image information, thereby pasting the image.
[0041] In some embodiments of this application, when the local device (e.g., a first electronic device) detects a clipboard event, it activates its clipboard and performs a clipboard data saving step. Simultaneously, the local device also activates the peer device (e.g., a second electronic device) to send the clipboard event to other devices in the loop (e.g., another second electronic device). The peer device saves the clipboard event and its device identifier. If a user performs a paste operation on the peer device within a certain period, triggering a paste event, the peer device sends a clipboard data request to the local device based on the device identifier, requesting to obtain the data corresponding to the clipboard event. In response to the clipboard data request, the local device sends the data corresponding to the clipboard event to the peer device, enabling the peer device to paste based on the data.
[0042] In some embodiments of this application, the first clipboard data can indicate text or an image. When synchronizing data between the aforementioned electronic devices, considering the space occupied by the data, the original text and image information are synchronized. Therefore, the first clipboard data is essentially text or image information. In this example, when the other end pastes clipboard data copied or cut by this end, it needs to paste text or an image. Thus, if the first clipboard data is text, the other end requests the text on its first clipboard from this end. The other end receives the text and can then paste it. If the first clipboard data is image information, the other end requests the image information from this end. After receiving the image information, the other end reads the image from this end based on the image information and then pastes the image.
[0043] When a copy or cut operation is performed on the local device, and a paste operation is performed on the remote device, clipboard data can be retrieved from the local device for pasting, thus improving data utilization efficiency.
[0044] It should be noted that the terms "local" and "peer" in this application are not absolute. When new data is added to the peer's clipboard, the peer can be considered as the local, and the local as the peer, thus enabling data collection and synchronization. This application will not elaborate further here.
[0045] In conjunction with the first aspect, in one possible implementation, after the second electronic device receives the first clipboard data, it pastes the data according to the first clipboard data, including: after receiving the first clipboard data, the second electronic device adds it to the native clipboard of the second electronic device; then it retrieves the first clipboard data from the native clipboard and pastes the data according to the first clipboard data.
[0046] In some embodiments of this application, after receiving data sent by the first electronic device, the second electronic device adds the data to the native clipboard of the other end, and then retrieves the data from the clipboard for pasting.
[0047] After the other end performs the paste operation, the clipboard data obtained from this end is added to the native clipboard, and then the clipboard data is obtained from the native clipboard for pasting, thus improving data utilization efficiency.
[0048] In conjunction with the first aspect, in one possible implementation, the method further includes: adding the first clipboard data to the native clipboard of the second electronic device, triggering a second clipboard event, and the second electronic device responding to the second clipboard event by not saving the first clipboard data corresponding to the second clipboard event in the second clipboard.
[0049] In some embodiments of this application, the data on the native clipboard is one-time data. New data will overwrite the previous data, and the new data will trigger the clipboard in the electronic device to save the new data on the native clipboard.
[0050] In some embodiments of this application, adding data to the native clipboard of the second electronic device triggers a clipboard event. Although the clipboard event is detected and new data is added to the native clipboard, since this new data originates from the first electronic device, and the first clipboard of the first electronic device has already saved this data and will synchronize it to the second electronic device, the second clipboard of the second electronic device will no longer save the new data from the native clipboard. This reduces duplicate saving, improves data simplicity, and thus improves resource utilization.
[0051] In conjunction with the first aspect, in one possible implementation, after saving the first clipboard event and the device identifier of the first electronic device, and listening for the paste event, the method further includes: if the second electronic device does not listen for the first paste event within a third preset time period after saving the first clipboard event, then deleting the first clipboard event; or, if the second electronic device is detected to be offline, then deleting the first clipboard event.
[0052] In some embodiments of this application, the peer device (e.g., a second electronic device) stores the clipboard event and the device identifier. In one scenario, if the user does not perform a paste operation on the peer device within a certain period and the peer device does not detect the paste event, the peer device deletes the saved first clipboard event. In another scenario, after the peer device saves the clipboard event, if it detects that the peer device is offline, there is no time limit, and the first clipboard event can be deleted, reducing resource waste and improving resource utilization.
[0053] In conjunction with the first aspect, in one possible implementation, in response to the first clipboard event triggered by the first clipboard operation, before starting the first clipboard, the method further includes: the first electronic device registering a clipboard listener through a system service process and obtaining clipboard access without notification permission; and listening for clipboard events through the clipboard listener.
[0054] The system server of the first electronic device starts a system service process. This system service process registers a clipboard listener, which can obtain clipboard access permission without notification. When listening for clipboard events through the clipboard listener, the user can be prevented from being notified when using third-party applications, thus avoiding excessive clipboard notifications and improving the user experience.
[0055] In conjunction with the first aspect, in one possible implementation, after the second electronic device displays the third interface, the method further includes: if the first electronic device is detected to be offline, deleting or hiding the data originating from the first electronic device in the second floating window; the data originating from the first electronic device includes the first clipboard data.
[0056] In some embodiments of this application, after the peer device (e.g., a second electronic device) collects the data synchronized by the first electronic device (e.g., first clipboard data), if it detects that the first electronic device is offline, it deletes or hides the data originating from the first electronic device in the second clipboard and the second floating window. For data deletion, the first electronic device can synchronize data to the peer device after it comes online; therefore, synchronized data is not saved after the electronic device goes offline, reducing resource consumption and improving resource utilization.
[0057] In conjunction with the first aspect, in one possible implementation, the cards displayed in both the first and second floating windows are arranged in the order of their acquisition timestamps.
[0058] In some embodiments of this application, the card acquisition timestamp refers to the timestamp of the clipboard data corresponding to the card being acquired on each electronic device. In a ring of electronic devices, the acquisition timestamps of the same card are consistent; therefore, the display order of cards in the floating window of the electronic device is also consistent. Standardizing the display order of cards improves the standardization of the display interface.
[0059] In conjunction with the first aspect, in one possible implementation, when the first clipboard data indicates text, the first card includes all or part of the characters in the text; when the first clipboard data indicates an image, the first card includes an image, or a thumbnail or partial screenshot of the image.
[0060] In some embodiments of this application, due to the limited display area of the interface, the data displayed on the card in the floating window can be all or part of the complete data.
[0061] When the first clipboard data indicates text, what is synchronized between electronic devices is the text itself. For shorter text, for example, if the characters corresponding to the text are less than or equal to the maximum number of characters displayed on the card, the card displayed on each electronic device shows all the characters of the text. For longer text, for example, if the characters corresponding to the text are greater than the maximum number of characters displayed on the card, the card displayed on each electronic device shows only a portion of the text.
[0062] When the first clipboard data indicates an image, for smaller images (e.g., images smaller than or equal to the maximum card size), electronic devices can synchronize the image, and the card displayed on each electronic device is the image. For larger text (e.g., images larger than the maximum card size), the electronic devices synchronize image information, which may include a thumbnail or partial screenshot of the image, image storage location information, image device source identifier, image application source identifier, image acquisition timestamp, etc. The card displayed on each electronic device is a thumbnail or partial screenshot of the image.
[0063] Display as much clipboard-related data as possible within a limited area to help users understand the general information of each card and improve the user experience.
[0064] In conjunction with the first aspect, in one possible implementation, the upper limit of the number of cards displayed in the first floating window is a first preset number; displaying the second interface includes: if the number of cards already displayed in the first floating window reaches the first preset number, then displaying the first card in the first floating window, while hiding the card with the earliest timestamp among the displayed cards.
[0065] In some embodiments of this application, due to the limited display area of the interface, the number of cards displayed in the floating window is limited. The first preset number can be a positive integer, such as 3, 4, 5, 6, etc. When it is necessary to display the card corresponding to newly added data, if the number of cards already displayed in the floating window reaches the upper limit, the card that was displayed first needs to be hidden, and at the same time, the card corresponding to the newly added data needs to be displayed. The display order of cards in the floating window can be sorted according to the card's acquisition timestamp. Therefore, the card currently displayed with the earliest acquisition timestamp can be hidden here. The card's acquisition timestamp refers to the acquisition timestamp of the clipboard data corresponding to the card on each electronic device. The acquisition timestamps of the same card are consistent in the electronic devices in the loop. Therefore, the display order of cards in the floating window of the electronic device is also consistent.
[0066] By displaying the newest cards and hiding the cards with the earliest timestamps, the system presents the latest clipboard data to the user, thus improving the user experience.
[0067] When displaying the card corresponding to newly added data (e.g., the first card), the card with the earliest timestamp can also be hidden simultaneously. This allows for a scenario where one card gradually hides while the other gradually appears. Alternatively, they can occur sequentially, with one card completely hidden before the other is displayed.
[0068] It should be noted that different electronic devices can be set with the same first preset quantity or different first preset quantities.
[0069] In conjunction with the first aspect, in one possible implementation, the first floating window includes a card display progress bar for indicating and adjusting the display progress of cards in the first floating window; the method further includes: a first electronic device displaying hidden cards in the first floating window in response to a drag operation on the card display progress bar.
[0070] In some embodiments of this application, when the number of cards displayed in the floating window reaches its limit, the first displayed card is also hidden. The first floating window also includes a card display progress bar for positioning cards; users can drag or scroll this progress bar to reveal other hidden cards. This facilitates viewing all cards and improves the user experience.
[0071] In conjunction with the first aspect, in one possible implementation, the upper limit of clipboard data collected in the first clipboard is a second preset number; before collecting the first clipboard data obtained by the first clipboard operation into the first clipboard, the method further includes: if the number of clipboard data already collected in the first clipboard of the first electronic device reaches the second preset number, then the earliest collected clipboard data is deleted.
[0072] In some embodiments of this application, the storage space of the first clipboard is limited, that is, the number of clipboard data collections is limited. The second preset number can be a positive integer, such as 10, 20, 30, etc. When new data needs to be collected, if the number of clipboard data already collected reaches the upper limit, the oldest collected clipboard data needs to be deleted, and the new data needs to be collected. The oldest collected clipboard data refers to the clipboard data with the earliest timestamp among the collected clipboard data. This example sets an upper limit for the first clipboard, and improves resource utilization by deleting old data and collecting new data.
[0073] It should be noted that different electronic devices can be set with the same second preset number or different second preset numbers.
[0074] In a second aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the methods as described in the first aspect or any implementation thereof.
[0075] Thirdly, this application provides a cross-platform interactive system, which includes a first electronic device and a second electronic device, wherein the first electronic device and the second electronic device perform the methods involved in the first aspect or any implementation thereof.
[0076] Fourthly, a computer-readable storage medium is provided, which stores instructions that, when executed on a computer, cause the computer to perform the methods as described in the first aspect or any implementation thereof.
[0077] Fifthly, embodiments of this application provide a chip system that can be applied to an electronic device. The chip system includes one or more processors that invoke computer instructions to cause the electronic device to perform the method described in the first aspect or any implementation thereof.
[0078] In a sixth aspect, a computer program product containing instructions is provided that, when run on a computer, causes the computer to perform the methods as described in the first aspect or any implementation thereof.
[0079] It is understood that the electronic devices in the fourth, fifth and sixth aspects can refer to the electronic devices provided in the second aspect, that is, they can refer to the first electronic device or the second electronic device in the first aspect.
[0080] It is understood that the electronic device provided in the second aspect, the cross-platform interactive system provided in the third aspect, the computer storage medium provided in the fourth aspect, the chip system provided in the fifth aspect, and the computer program product provided in the sixth aspect are all used to execute the method described in the first aspect or any implementation thereof. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of any possible implementation of the first aspect, which will not be repeated here. Attached Figure Description
[0081] Figure 1 A schematic diagram of multiple devices under the same trust ring provided in this application;
[0082] Figure 2 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application;
[0083] Figure 3 This is a block diagram of a terminal software system provided in an embodiment of this application;
[0084] Figure 4 A schematic diagram of the clipboard in the collection space application provided in this application;
[0085] Figure 5 The status and display style of the clipboard provided in this application;
[0086] Figure 6 A schematic diagram of a floating window provided in this application;
[0087] Figure 7 A schematic diagram illustrating the collection of clipboard data provided in this application;
[0088] Figure 8 A schematic diagram of another floating window provided for this application;
[0089] Figure 9A schematic diagram of a card provided for this application;
[0090] Figure 10 A schematic diagram of another type of floating window provided in this application;
[0091] Figure 11 A schematic diagram of a pop-up window provided in an embodiment of this application;
[0092] Figure 12 A schematic diagram of clipboard data provided in this application;
[0093] Figure 13 An illustration of another method for collecting clipboard data provided in this application;
[0094] Figure 14 This application provides a schematic diagram illustrating the use of clipboard data.
[0095] Figure 15 An exemplary flowchart of a cross-platform interaction method provided in an embodiment of this application;
[0096] Figure 16 An exemplary flowchart of another cross-platform interaction method provided in an embodiment of this application;
[0097] Figure 17 A schematic diagram of the clipboard provided in an embodiment of this application;
[0098] Figure 18 An exemplary flowchart of another cross-platform interaction method provided in the embodiments of this application. Detailed Implementation
[0099] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0100] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " indicates "or," for example, A / B can mean A or B; "and / or" in this document 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 existing alone, A and B existing simultaneously, and B existing alone. Furthermore, to facilitate a clear description of the technical solutions of this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.
[0101] To facilitate understanding, the terms used in the embodiments of this application will be explained first.
[0102] 1. Materials, in this application, may include various types of information such as text, graphics, images, videos, and web pages; among which, images may be static images or dynamic images, and this application does not limit them.
[0103] 2. Native Clipboard: The native clipboard is a region in memory used to temporarily store cut and copy information. After a user performs a cut or copy operation, the cut or copied information is first saved to the native clipboard. Then, if a paste operation is detected, the information saved in the native clipboard is pasted into the corresponding location. Subsequently, if other information is cut or copied, the content saved in the native clipboard will be updated to reflect this new information. In other words, the native clipboard only saves the most recently cut or copied information. When a user pastes, they can only paste the most recently saved information from the native clipboard.
[0104] 3. Trust ring and trusted devices: In this application, a trust ring refers to multiple electronic devices that have passed trusted authentication and are connected to the same local area network or directly (e.g., establishing a Wi-Fi Direct connection or a Bluetooth connection), possessing the ability to communicate with each other. These electronic devices form a trust ring. Electronic devices within this trust ring can be collaboratively managed and share resources. In this application, electronic devices within this trust ring can achieve functions such as cross-device reuse for collecting materials.
[0105] Electronic devices can establish a trust relationship and form a trust loop through trusted authentication using any of the following methods: 1) Logging into the same account on two or more electronic devices, and then using that account for trusted authentication to establish a trust relationship and form a trust loop. 2) Using a proprietary protocol for trusted authentication to establish a trust relationship and form a trust loop. 3) Using a cloud login for trusted authentication to establish a trust relationship and form a trust loop. These methods are merely examples and are not intended to limit the scope of this application.
[0106] It is understood that the electronic device in this application can be a mobile phone, tablet computer, or other electronic device, as well as a desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device (such as smartwatch, smart bracelet, etc.), in-vehicle device, smart home device (such as smart TV, large screen, etc.) and / or smart city device. The embodiments of this application do not impose any special restrictions on the specific type of electronic device.
[0107] For example, such as Figure 1 As shown, devices such as mobile phones, tablets, desktop computers, laptops, and smart TVs can log in to the same account and connect to the same local area network, forming a trust ring. Within this trust ring, devices that are already working together can continue their current tasks on the mobile phone, such as continuing to watch videos on the smart screen, or easily browse and edit files on the mobile phone on the computer.
[0108] Within a trust ring, a terminal device can be considered a trusted device of other devices. In other words, a terminal device with a trust relationship established through trusted authentication is called a trusted device. For example, a mobile phone and a tablet within the same trust ring can be considered trusted devices of each other; that is, the tablet is a trusted device of the mobile phone, and the mobile phone is also a trusted device of the tablet.
[0109] Next, the application scenarios involved in the embodiments of this application will be introduced.
[0110] The native clipboard on electronic devices provides one-time copy and paste functionality. This means that after copying on the local device, if another copy operation is performed, the native clipboard will be updated with the latest copied data. Consequently, the pasted data on either the local or remote device will only be the most recently copied data. If continuous copying is required on the local device, each copied data must be pasted promptly before the next copy is performed; otherwise, the native clipboard will overwrite the previously copied data. Only the last copied data is used for pasting; if pasting is done continuously on either the local or remote device, only the last copied data will be pasted. In other words, the native clipboard can only save the most recently (or last) cut or copied data. If a copy operation is performed once, and then another copy operation is performed, the previously saved data in the native clipboard will be overwritten by the newly copied data. Electronic devices cannot use the native clipboard to continuously paste multiple data entries. In cross-device scenarios, sharing clipboard data often requires complex steps.
[0111] To address the technical limitation of native clipboards in electronic devices, which only allow for one-time copy and paste and cannot support multiple collections and sharing of different data, this application allows users to collect data copied or cut to the native clipboard into a specific clipboard (i.e., an additional clipboard added to the electronic device). A convenient entry point (a floating window displayed on the local interface) is provided for users to view and reuse this data, improving data utilization efficiency. Simultaneously, the clipboard data collected locally can be synchronized to other devices. Data copied or cut multiple times and placed into the native clipboard on one device can be collected and displayed on other devices in the loop for viewing and use. This enables cross-device clipboard data sharing, improves the efficiency of cross-device clipboard data sharing, facilitates user reuse, and enhances the user experience. Furthermore, if a paste event occurs on either the local or other device, the clipboard data on the local device can be directly reused, enabling instant data pasting and further improving data utilization efficiency.
[0112] In this application, the electronic device can listen for clipboard events on its local device through system service processes, such as the Android system signing process. Upon detecting new data, it saves the data recently copied or cut by the user to the native clipboard. Simultaneously, leveraging the near-field trust loop capability of the same account, it broadcasts clipboard events to other devices, thereby synchronizing the clipboard data saved on the local device to other devices. After a certain period of time, other devices can view and use the synchronized clipboard data from the local device through a convenient entry point (i.e., a floating window displayed on the device's interface).
[0113] The cross-platform interaction method provided in this application is applied to scenarios where multiple electronic devices interact. The electronic devices can be terminals such as mobile phones, tablets, cameras, and smart wearable devices; this application does not limit this type. The following explanation uses an electronic device as an example of a terminal.
[0114] Figure 2 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. See also... Figure 2 Terminal 100 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, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0115] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0116] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal 100. In other embodiments of this application, the terminal 100 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.
[0117] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0118] The controller can serve as the central nervous system and command center of the terminal 100. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0119] 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 this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0120] The wireless communication function of terminal 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0121] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0122] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the terminal 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0123] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0124] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal 100, 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. 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 antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0125] In some embodiments, the antenna 1 of the terminal 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal 100 can communicate with the network and other devices through wireless communication technology.
[0126] Terminal 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0127] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, terminal 100 may include one or N displays 194, where N is an integer greater than 1.
[0128] Terminal 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0129] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions, such as saving music, video, and other files on the external storage card.
[0130] Internal memory 121 can be used to store computer-executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of terminal 100 by running the instructions stored in internal memory 121. 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 by terminal 100 during use (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.
[0131] Terminal 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D and application processor.
[0132] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Terminal 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, terminal 100 detects the touch operation intensity based on pressure sensor 180A. Terminal 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than the pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0133] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. Touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of terminal 100, in a different position than display screen 194.
[0134] It should be noted that the above Figure 2 The schematic diagram of the terminal shown can be a schematic diagram of the structure of any device in the same trust ring.
[0135] The software system of terminal 100 will be described next.
[0136] The software system of terminal 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered Android system as an example to illustrate the software system of terminal 100.
[0137] Figure 3This is a block diagram of a software system for a terminal 100 provided in an embodiment of this application. The terminal's software system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the application uses the layered architecture Android system as an example to illustrate the software structure of the terminal.
[0138] See Figure 3 A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android Runtime, the system layer, and the kernel layer.
[0139] The application layer can include a series of application packages. For example... Figure 3 As shown, the application package can include a collection space, social applications, shopping applications, news applications, game applications, communication applications, etc. The collection space also includes a clipboard for storing clipboard data. The application package can also include applications such as short film applications, camera, gallery, calendar, calling, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0140] Data saved in the Favorites section can be displayed in a floating window. This floating window occupies only a portion of the electronic device's screen and can hover above the corresponding application's page without interfering with normal application use. For example, an electronic device can run the Favorites section while displaying a chat application interface, allowing users to save or paste materials.
[0141] The following operations can be performed at the application layer of the first electronic device: opening an application, such as a social application, shopping application, news application, game application, communication application, etc., and displaying it on the interface; allowing the user to copy or cut materials in the application; displaying saved clipboard data for the user to view; and using clipboard data in the editable area.
[0142] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 3As shown, the application framework layer includes a system server, clipboard, native clipboard, and switching components. The native clipboard is the system clipboard native to electronic devices; it can be viewed as a clipboard manager that provides a clipboard interface to other applications, allowing them to listen for clipboard events. The native clipboard has the function of saving the last copied, cut, or pasted data. The clipboard in this application is a container for storing multiple clipboard data. This application reuses the functionality of the native clipboard, saving one-time clipboard data stored in the native clipboard in a non-overwritten form.
[0143] The system server is used to start the system service process. This process registers a clipboard listener to monitor clipboard events. When the system service process detects a clipboard event, it activates a switching component. This component retrieves clipboard data and establishes connections with other devices through the core layer's communication components. These application-layer operations trigger both the system service process to activate the clipboard and the switching component; these triggering events are completed at the application framework layer.
[0144] The application framework layer may also include a window manager, content providers, a view system, a phone manager, a resource manager, and a notification manager. The window manager manages window programs. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture the screen. The content provider stores and retrieves data, making this data accessible to the application. This data can include video, images, audio, made and received calls, browsing history and bookmarks, and a phone book. The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build the application's display interface, which can consist of one or more views, such as a view displaying SMS notification icons, a view displaying text, and a view displaying images. The phone manager provides communication functions for the terminal 100, such as managing call status (including connection and disconnection). The resource manager provides the application with various resources, such as localized strings, icons, images, layout files, and video files. The notification manager allows the application to display notification information in the status bar, which can be used to convey informational messages and can disappear automatically after a short pause without user interaction. For example, the notification manager is used to notify users of download completions and message alerts. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications. Furthermore, the notification manager can appear as dialog boxes on the screen, such as displaying text messages in the status bar, emitting sounds, causing electronic devices to vibrate, or flashing indicator lights.
[0145] The Android Runtime comprises the core libraries and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part contains the functionalities that Java calls, and the other part is the core Android library itself. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0146] The system library can include multiple functional modules, such as a surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), and 2D graphics engines (e.g., SGL). The surface manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media libraries support playback and recording of various common audio and video formats, as well as still image files. The media libraries support various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The 3D graphics processing libraries are used for 3D graphics drawing, image rendering, compositing, and layer processing. The 2D graphics engine is the drawing engine for 2D graphics.
[0147] The kernel layer is the layer between hardware and software. It includes communication components. Communication channels are established between these components to transmit data. The application framework layer is connected to the kernel layer via a lower-level channel. When a switching component in the application framework layer is activated, it establishes a communication connection with the kernel layer's communication components on the other side of the electronic device.
[0148] The kernel layer can also contain display drivers, camera drivers, audio drivers, and sensor drivers, etc.
[0149] Furthermore, in this application, multiple electronic devices can establish a communication channel through a kernel-level communication component, enabling cross-device bookmarking and clipboard data sharing. For example, a communication channel can be established between the first and second electronic devices through a kernel-level communication component. This component is always-on, allowing real-time message monitoring and communication between itself. In the second electronic device, the kernel layer and the application framework layer are also connected through a low-level channel. On one hand, the kernel-level communication component in the second electronic device activates the switching component in the application framework layer, enabling cross-device pasting of clipboard data. On the other hand, the kernel-level communication component also activates the clipboard in the application framework layer, enabling cross-device synchronization of clipboard data. The paste and synchronization operations trigger the display of the bookmarks space in the application layer of the second electronic device.
[0150] It should be noted that the above Figure 3 The block diagram of the terminal's software system shown can be the software system block diagram of any device in the same trust ring.
[0151] The following is combined Figure 4 This application describes the clipboard in the collection space application.
[0152] The Collection Space application is a management application (APP) with functions such as collecting and sharing any type of material. Users can use the Collection Space application to fulfill their needs for collecting and sharing materials. Furthermore, the Collection Space application can be developed into a personal study space, work space, etc. The data retention rules in the Collection Space application can be permanent.
[0153] The materials collected in the Collection Space application include, but are not limited to, text, graphics, images, videos, audio, web pages, tables, etc.
[0154] The clipboard in this application differs from the native clipboard. The native clipboard is the system clipboard native to electronic devices, which has the function of saving the last copied, cut, or pasted data. The clipboard in this application is a container provided in this application for storing multiple clipboard data. For ease of distinction, this application refers to the native system clipboard in electronic devices as the native clipboard, and the clipboard used to store multiple clipboard data as the clipboard.
[0155] Clipboard data saved in the clipboard can be displayed as cards in the corresponding floating window. Each card displays all or part of the clipboard data. The clipboard is a feature in the collection space application used to save clipboard data. Clipboard data can represent text (e.g., web links, plain text), images, etc. Images can be static images (such as pictures) or dynamic images (such as animations or videos).
[0156] As an example, the process of a user accessing the clipboard can be as follows: Figure 4 As shown, Figure 4 As shown in Figure A, the Collection Space app is launched when a user opens it, or when an electronic device responds to a user's copy or cut operation on materials. The Collection Space app is displayed as a floating window, and the upper right corner of the floating window may include three dots to indicate the "More" control. Figure 4 As shown in Figure A, the floating window can be displayed on the interface of any application. The floating window only occupies a part of the entire screen of the electronic device and does not affect the normal use of the application. Figure 4 Image A in the image shows the materials that users have saved in the Collection Space app. These materials can be saved by dragging and dropping or by taking a screenshot. Saved materials can be in the form of web pages, images, videos, files, etc., and are displayed in a floating window. For example... Figure 4 As shown in Figure B, users can click or touch the "More" control, responding to the user's action, such as... Figure 4As shown in Figure C, the electronic device can display options below the "More" control. These options include, but are not limited to, "Enter Full Screen," "Clipboard," "Add to Desktop," "Settings," and "Off." In other words, when a user clicks or presses the "More" control at the top of the Favorites Space app's floating window, the electronic device responds to the click or touch operation by displaying more functions to the user. Figure 4 As shown in Figure D, users can select the "Clipboard" option. The clipboard is a feature in the Collection Space app used to save multiple clipboard data. Figure 4 As shown in Figure E, in response to the selection operation, the electronic device accesses the clipboard and displays a floating window corresponding to the clipboard. This floating window includes data saved to the clipboard through copy or cut operations. The selection operation can be a click or a touch operation. The above describes the process of accessing the clipboard via the Collection Space APP in this application.
[0157] The native clipboard, as a one-time storage space on electronic devices, only retains the last clipboard data; new data overwrites the previous clipboard data. The data stored in the native clipboard may include: package name (indicating the application process writing the data), user identifier (indicating whether it's the primary or secondary user), device identifier, and clipboard data. Based on the package name and device identifier, it can be determined which application process on which electronic device the data originated from.
[0158] The clipboard in this application is a storage container used by electronic devices to collect multiple clipboard data. It is used to collect clipboard data from the native clipboard, and new data will not overwrite the previous clipboard data. That is, the clipboard can collect data that has been copied or cut multiple times into the native clipboard.
[0159] The floating window can also include other controls, such as three dots to indicate the "More" control and a back control to go back to the previous level of the clipboard. The previous level of the clipboard is the Favorites app.
[0160] This application embodiment is merely an example of a functional module used as a collection space application for illustration. It should be understood that the clipboard can also correspond to an independent application. That is, the clipboard can be accessed directly by clicking, or the clipboard can be opened by clipboard operation, and then the clipboard data can be collected through the clipboard. This application embodiment does not limit this.
[0161] It is understandable that the clipboard can also be accessed through other entry points. For example, the Favorites application can display a clipboard icon on the relevant application interface, and users can access the clipboard by clicking the icon. This application embodiment does not limit the entry point for accessing the clipboard.
[0162] The clipboard in the Collections Space app can exhibit various forms during use to indicate different processing stages or processes the electronic device is undergoing. For example, the clipboard's form can include a hidden state and a floating state. These names are merely illustrative; for instance, a hidden state could also be called a minimized state, and a floating state could also be called a distributed state. This application does not limit the scope of these terms.
[0163] The clipboard's hidden state indicates that it has been accessed in the foreground or is running in the background; its floating state displays the data collected in the clipboard in a floating window on the currently displayed interface.
[0164] Optionally, the clipboard in its hidden state can be a vertical bar. For example, when the clipboard is hidden, the hidden window can be presented by snapping to the inside edge of the screen, such as... Figure 5 The hidden window a is shown in the image. When hidden window a is positioned inside the edge of the screen, it will not affect the user's normal viewing of the displayed content. The hidden window can be a vertical strip, which will not visually attract the user's attention and will not interfere with the user's normal use.
[0165] It should be noted that the position of the inner edge of the screen described in the embodiments of this application can be located on the upper side, lower side, left side or right side of the inner edge, and this application does not limit it in this regard.
[0166] It should be noted that the clipboard can switch from a hidden state to a floating state, and vice versa. Optionally, this switching can be an animation effect such as scrolling or scaling. For example, the hidden clipboard window 'a' can switch from a vertical bar with a gradually expanding animation effect to a floating window 'b'. This is merely an example, and this application does not limit its scope. Of course, the clipboard can also be expanded into a full-screen state. The full-screen state is used to display the materials collected in the clipboard in the entire display area; the full-screen state is equivalent to the main interface of the clipboard.
[0167] When a user needs to browse the content displayed on the interface of an electronic device, the user can switch the clipboard from a floating state to a hidden state by clicking or touching an area of the interface other than the floating window, making it appear inside the edge of the screen. When a user needs to view or use the clipboard data, the user can switch the clipboard from a hidden state to a floating state by clicking or touching the hidden window of the clipboard.
[0168] Optionally, each clipboard entry in the clipboard collection is displayed as a card in a floating window. The clipboard's floating window can be displayed in different styles in different areas of the screen, depending on the size and shape of the electronic device. The floating window is a small window within the interface, not occupying the entire screen of the electronic device, and will not affect the user's normal viewing of the displayed content. The floating window can be displayed as a long strip or a horizontal bar on the side of the screen without interfering with normal user operation. For example, the clipboard's floating window b can specifically include two display styles: one is a long strip, such as... Figure 5 The floating window b1 shown in the image; another type is horizontal, such as... Figure 5 The floating window b2 shown is an example. The corresponding display cards in the long, narrow floating window b1 and the horizontal floating window b2 are in the same order. Floating windows b1 and b2 can be displayed with an effect that snaps to the inside edge of the display screen, avoiding interference with the currently displayed content. Floating windows b1 and b2 also include card display progress bars, which are used to indicate and adjust the display progress of the cards.
[0169] It should be noted that although the clipboard may switch between various modes during use, it remains on top of the multiple display layers in the display interface in each mode, and is not covered or affected by the content displayed below.
[0170] The following description, using the clipboard example above, illustrates the cross-platform interaction method provided in this application. Multiple electronic devices within the same trust ring can achieve, for example... Figures 6-12 The application scenarios shown.
[0171] Figure 6 Figure A in the middle Figure 6 Figure B in the middle and Figure 6 Diagram C shows the cards currently displayed in floating windows on a mobile phone, tablet, and computer within the same trust ring. Each card displays all or part of each clipboard data entry. The mobile phone and computer use elongated floating windows to display the cards, while the tablet uses a horizontal floating window. The order in which the cards are displayed in the floating windows is consistent across all three devices. Each floating window also includes a progress bar for the card display.
[0172] On mobile phones and computers, the card corresponding to newly added data is displayed at the bottom of the floating window; it can be understood that newly added data can also be displayed at the top of the floating window. On tablets, newly added data is displayed on the right side of the floating window; it can be understood that newly added data can also be displayed on the left side of the floating window. This application does not limit this.
[0173] Electronic devices can support saving clipboard data locally. They can also broadcast monitored clipboard events to other devices within the same trust loop, allowing other devices to directly paste the clipboard data if they detect a paste event shortly afterward. Furthermore, after saving clipboard data locally, the electronic device can synchronize the clipboard data, its application source identifier, and device source identifier to the clipboard of trusted devices for display and use. There can be one or more trusted devices.
[0174] For example, a user can perform a copy or cut operation on any electronic device in the loop. New data (e.g., copied text) appears on the native clipboard of the electronic device, triggering the clipboard to save the new data from the native clipboard. Taking a mobile phone as an example, if... Figure 7 As shown in Figure A. Figure 7 Figure A illustrates the text copying operation for any website on the phone. Users can select all or part of the text on the current screen by long-pressing or double-tapping. Figure 7 In Figure A, the selected text is shown in gray. The phone responds to this long press or double-tap action, as follows: Figure 7 The display interface shown in Figure B pops up an options window, which includes, but is not limited to, buttons for copy, cut, search, and cancel. Figure 7 As shown in Figure C, users can select the "Copy" button in the options through click or touch operations. Figure 7 As shown in Figure D, in response to the selection of the "Copy" button, the mobile phone saves the copied text to the clipboard, and the latest saved text is displayed as a card at the bottom of the floating window.
[0175] It should be noted that, Figure 7 Figure A in the middle - Figure 7 In Figure C, the clipboard is shown in a hidden window, which is understandable. Figure 7 Figure A in the middle - Figure 7 In diagram C, the clipboard can also be disabled, that is, Figure 7 Figure A in the middle - Figure 7 In Figure C, the hidden clipboard window is not displayed. The copy operation launches the Favorites application and triggers the opening of the clipboard. Figure 7 The D-figure in the document shows the clipboard's floating window. This application does not limit this.
[0176] Based on the above Figure 7In Figure D, the phone's clipboard displays the latest saved text. The phone then synchronizes the clipboard data with the tablet and computer, which are within the same trust ring. Changes to the saved clipboard data on the tablet and computer within the same trust ring will alter the displayed cards in the floating window. For example... Figure 8 As shown in Figure A, the most recently saved texts from the phone are displayed as cards on the right side of the computer's floating window. Figure 8 As shown in Figure B, the latest saved texts on the phone are displayed in card format below the floating window on the tablet.
[0177] Based on the above Figures 6-9 This section introduces the display format of cards in the floating window.
[0178] Because the display area on an electronic device's interface is limited, the clipboard stores multiple clipboard entries. A limited number of these entries are displayed in a floating window, while the others are hidden. For the hidden clipboard entries, a progress bar can be dragged or scrolled to allow for sequential display of the cards. The floating window displays part or all of each clipboard entry as a card.
[0179] The display area on an electronic device's interface is limited; therefore, the data displayed on a card is also limited. When clipboard data indicates text, the card can display all characters of the text, or only the first few characters, keywords, middle characters, or last few characters, etc. For example... Figure 7 As shown in Figure D, the clipboard data reads, "The light is yellowish and the clouds are soft, suitable for shooting sunrises, backlighting, and silhouette portraits." The corresponding card in the clipboard data displays, "The light is yellowish and the clouds are soft, suitable for shooting sunrises."
[0180] When displaying clipboard data as an image, the image itself can be shown, a thumbnail of the image can be shown, or a portion of the image can be shown. This portion can be a screenshot of the top left, top right, bottom left, bottom right, or center of the image. The characters and images displayed in the floating window are for illustrative purposes and may not represent the complete clipboard data.
[0181] Each clipboard entry also includes one or more pieces of information such as a device source identifier, application source identifier, and acquisition timestamp. During data synchronization, these information are also synchronized. The device source identifier indicates which electronic device generated the clipboard data, the application source identifier indicates which application copied or cut the data, and the acquisition timestamp indicates the earliest time the clipboard data was acquired on the electronic device. The device source identifier and application source identifier can be displayed on the card; the device source identifier is displayed in the upper left corner, and the application source identifier is displayed in the lower right corner. It should be understood that the device source identifier and application source identifier can also be displayed in other locations on the card. For newly added data on this electronic device, the device source identifier may not be added. Figure 7 As shown in Figure D, the application source identifier of the text is displayed in the lower right corner of the card corresponding to the most recently saved text in the phone's floating window. Figure 8 As shown in Figure A, the bottom right corner of the card displaying the most recently saved text in the computer's floating window shows the application source identifier for the text, while the top left corner displays the device source identifier, which indicates the mobile phone. Similarly, as... Figure 8 As shown in Figure B, the bottom right corner of the card displaying the most recently saved text in the tablet's floating window shows the application source identifier for the text, while the top left corner displays the device source identifier, which indicates the mobile phone. Of course, this is merely an example, and it can be displayed in other ways; this application does not limit this to any particular method.
[0182] Here, the device source identifier and the application source identifier can be set in any two different locations among the upper left, lower left, upper right, or lower right corners of the card; this application does not limit this.
[0183] When multiple clipboard data entries are displayed as cards in the floating windows of different electronic devices, they can be sorted according to the timestamp of their acquisition. In the same electronic device, the acquisition timestamp of the same card is consistent; therefore, the display order of the cards in the floating windows of each electronic device is also consistent, as described above. Figure 6 The cards shown in the floating window, and the above Figure 7 The D diagram in the middle Figure 8 The cards shown in the floating window.
[0184] It should be noted that if the cards appear from the bottom of the floating window, the clipboard data with the most recent timestamp (i.e., newly added data) will be displayed as a card at the bottom, while the other cards at the top will be hidden. If the cards appear from the right side of the floating window, the clipboard data with the most recent timestamp (i.e., newly added data) will be displayed as a card on the far right, while the other cards on the far left will be hidden.
[0185] Due to the limited display area of the interface, the number of cards that can be displayed in the floating window is also limited. The maximum number of cards that can be displayed in the floating window can be appropriately set by those skilled in the art based on the size of the electronic device. When it is necessary to display the card corresponding to newly added data, if the number of cards already displayed in the floating window reaches the maximum, such as... Figure 6 As shown in Figure A, the card that was displayed first needs to be hidden, while the card corresponding to the newly added data needs to be displayed. For example... Figure 6 Figure A in the middle and Figure 7 As shown in Figure D. Figure 7 The new data in clipboard favorites in image D is... Figure 6 This is based on Figure A. Since the display order of cards in the floating window can be sorted according to the card's acquisition timestamp, the card with the earliest acquisition timestamp can be hidden here. Figure 7 The floating window of the D-graph in the middle is for... Figure 6 In Figure A, the topmost card is hidden. New data is displayed as cards. Figure 7 The bottom of the floating window in the D diagram is displayed.
[0186] Figure 6 Figure A in the middle Figure 7 The way cards in the D-image can be hidden and shown can be directly from the clipboard. Figure 7The interface presented in the D-graph of the floating window is shown to the user without showing the hiding and showing process. Alternatively, the hiding and showing process can be shown to the user. For example, the top card of the floating window gradually hides, while the card corresponding to the newly added data gradually appears at the bottom of the floating window, until the top card is completely hidden. At this point, the card corresponding to the newly added data is fully displayed at the bottom of the floating window. Alternatively, the top edge of the top card can be completely hidden when it reaches the top edge of the floating window, while the two middle cards and the card corresponding to the newly added data simultaneously move upwards, and the card corresponding to the newly added data gradually appears at the bottom of the floating window until it is fully displayed. This application does not limit the form of card hiding and showing.
[0187] The display area on an electronic device's interface is limited; therefore, the data displayed in a card is also limited. A card in a floating window may display a portion of a clipboard entry, and users can zoom in on the card by clicking or touching to view the complete clipboard data. Figure 9 As shown in Figure A, the electronic device responds to the user's click or touch operation on the card, displaying as shown in Figure A. Figure 9 The image in Figure B shows the complete clipboard data. The enlarged card can include: the complete clipboard data, the timestamp of the clipboard data retrieval, and the total number of characters in the clipboard data, etc.
[0188] When the floating window reaches its maximum display limit, the first card displayed will be hidden. A progress bar will appear in the floating window to indicate and adjust the display progress of cards. Users can drag or scroll the progress bar to reveal other hidden cards. Figure 10 As shown in Figure A, the phone responds to the user's dragging operation, determines the dragging displacement based on the dragging direction, and moves the cards in the floating window according to the dragging displacement to achieve the rotation of card display. Figure 10 As shown in Figure B, the cards at the bottom of the floating window gradually hide, while the hidden cards gradually appear at the top of the floating window. As the finger continues to drag, the progress bar shows the cards gradually disappearing from the bottom of the floating window until they are completely hidden, and simultaneously, the hidden cards are fully displayed at the top of the floating window. Figure 10 As shown in Figure C.
[0189] It should be noted that the method of hiding or showing cards can be done by hiding or showing the cards as a whole. For example, when the bottom card reaches the bottom edge of the floating window, it skips the gradual hiding and becomes completely hidden directly. At the same time, the two middle cards move down until they reach the bottom edge, at which point the hidden card is fully displayed directly at the top of the floating window. Alternatively, when the bottom card reaches the bottom edge of the floating window, it can be completely hidden directly, while the two middle cards and the hidden card move down simultaneously, and the hidden card gradually appears at the top of the floating window until it is fully displayed. This application does not limit the form of hiding and showing cards.
[0190] The relationship between the clipboard and the native clipboard in this application is described below.
[0191] The basic principle of the native clipboard: The native clipboard is actually an Application Programming Interface (API) provided to developers by the operating system. Operating systems can include iOS and Android. In Android, it's displayed as a clipboard interface, while in iOS, it's displayed as a UIPaste board interface. Third-party applications on electronic devices can call the clipboard event interface to obtain clipboard access permissions, register listeners, and listen for clipboard events, including cut, copy, and paste. When a clipboard event occurs, if a third-party application is open, it listens for the event and triggers a clipboard access notification, which is then displayed to the user. For example, a pop-up window may appear at the top or bottom of the screen displaying the clipboard access notification, informing the user that the native clipboard has been accessed. This notification typically includes the application's name so the user knows which application accessed the native clipboard. For example, application A is accessing the clipboard (referring to the native clipboard), or has already pasted content from the clipboard (referring to the native clipboard) into application A. Figure 11 As shown, Figure 11After a user copies or cuts data and then opens the Microfilm application to create a short film, a pop-up window will appear in the application displaying a clipboard access notification: "Content from the clipboard (referring to the native clipboard) has been pasted into the Microfilm application." If the user needs to paste copied or cut data from the native clipboard, they can do so by clicking or tapping the clipboard access notification. The native clipboard is one-time use, storing only the last copied or cut data. If the user performs a paste operation within a certain period after copying or cutting data, the native clipboard will provide the user with the last copied or cut data.
[0192] The system service process in the system server of the electronic device in this application is a high-level system process, capable of obtaining clipboard access without notification permission. This permission means that accessing the clipboard will not trigger an access notification. The system service process registers a clipboard listener and obtains this permission. Thus, the system service process can listen for clipboard events through the registered clipboard listener. When it detects a change in data on the native clipboard, if the user is using a third-party application, the third-party application will not display a clipboard notification to the user, thereby achieving clipboard event listening without disturbing the user.
[0193] This application enables the collection of clipboard data and its synchronization with other devices. It can be applied to scenarios where users need to collect data and share it across devices, without requiring third-party applications to notify the user. Based on this, the system server starts a system service process, which registers a clipboard listener and obtains clipboard access permission without notification. Therefore, when listening for clipboard events through the clipboard listener, the system can avoid prompting the user when they use third-party applications, thus preventing excessive notifications and improving the user experience.
[0194] The clipboard in this application is a storage container used by electronic devices to collect multiple clipboard data, which is used to collect clipboard data from the native clipboard, and new data will not overwrite the previous clipboard data.
[0195] The clipboard has limited storage space, meaning there's a limit to the number of clipboard data it can store. Before adding new clipboard data, the clipboard checks if it has reached the limit. If it has, it cannot add more and must delete the oldest stored clipboard data. After deleting the oldest stored data, the clipboard can retrieve the new data (i.e., add new data) and save it.
[0196] The difference between the original clipboard and the clipboard in this application can be seen through... Figure 12 Figure A in the diagram (i.e., Figure 7 (D diagram in the middle) and Figure 12 The comparison between Figure B and Figure B in the diagram is explained. Figure 12 Figure B in the text refers to... Figure 7 The data on the original clipboard after performing a copy operation in graph C is shown below. Figure 12 In Figure A, the floating window displays at least four cards, plus some hidden cards, indicating that the clipboard contains at least four clipboard records. The bottom card in the floating window corresponds to the most recent clipboard data. After the latest clipboard data is saved, the previously saved clipboard data is not overwritten and is still displayed as cards. However, the native clipboard data on electronic devices only contains the most recent clipboard data, such as... Figure 12 As shown in Figure B, Figure 12 Figure B in the diagram shows all the data on the original clipboard.
[0197] The following is combined Figure 13 Figure A in the middle - Figure 13 The E diagram in this application illustrates the clipboard data obtained multiple times for clipboard collection.
[0198] The above Figure 7 After saving clipboard data to the clipboard in the D-map, users can continue to save clipboard data on their electronic devices by cutting or copying. The clipboard data is then displayed as cards in a floating window, such as... Figure 13 Figure A in the middle - Figure 13 As shown in Figure D.
[0199] When a user performs a copy or cut operation, they are essentially clicking or touching an area of the interface other than the floating window. This allows the clipboard to be switched from a floating state to a hidden state, appearing on the inside edge of the electronic device's screen. For example... Figure 13 As shown in Figure A, the user copies a page displayed by any application on the phone. Figure 13 Figure A illustrates the text copying operation for any file on the phone. Users can select all or part of the text on the current screen by long-pressing or double-clicking. Figure 13 In diagram A, the area shown in gray is the phone's response to a long press or double tap, as... Figure 13 As shown in Figure B, the phone displays a pop-up options window, which includes, but is not limited to, buttons for copy, cut, search, and cancel. Figure 13 As shown in Figure C, users can select the "Copy" button by clicking or touching. Figure 13 As shown in Figure D, in response to the selection, the phone saves the copied text to the clipboard, and the latest saved text is displayed as a card at the bottom of the floating window.
[0200] It should be noted that, Figure 13 The application shown in Figure A is... Figure 7 The application shown in Figure A can be the same application or different applications. Users can copy pages displayed within the same application multiple times, or copy or cut multiple times across applications, thus saving multiple clipboard data. Figure 7 and Figure 13 This is merely an illustrative example and does not limit the scope of the embodiments described in this application.
[0201] The above Figure 13 Figure A in the middle - Figure 13 The clipboard data collection process shown in Figure D is similar to the above. Figure 7 Figure A in the middle - Figure 7 The process of collecting image D in the image is the same.
[0202] In this application, users can copy or cut multiple times on electronic devices. The copied or cut data is stored in the clipboard and updated in the form of cards in a floating window. This enables users to collect copied or cut data multiple times, making it convenient for them to view and use it at any time, thus improving the user experience.
[0203] The following combination Figure 13 The D diagram and Figure 13 Figure E in the document illustrates the differences between the native clipboard and the clipboard in this application. Figure 13 E-graph in the text refers to Figure 13 The data on the original clipboard after performing a copy operation in graph C. Figure 12 Figure B in the text refers to Figure 7 The data on the original clipboard after performing a copy operation in diagram C is as described above. Figure 13 Figure A in the middle - Figure 13 The D diagram in the diagram is Figure 7 Following the D-chart in the image, continue collecting clipboard data. Figure 13 As shown in Figure E, the native clipboard only retains the most recently copied data. Figure 13 The E diagram in the middle has been replaced Figure 12 The data in the original clipboard in Figure B. Figure 13In the D diagram, the floating window displays at least four cards, plus some hidden cards, indicating that the clipboard contains at least four clipboard records. The bottom card in the floating window corresponds to the most recent clipboard record. When the latest clipboard record is saved, previously saved clipboard records are not overwritten. However, the native clipboard on electronic devices only contains the most recent clipboard record, such as... Figure 13 As shown in Figure E. Figure 13 The E diagram shows all the data on the native clipboard.
[0204] The following is combined Figure 14 This section introduces how to paste data from the clipboard.
[0205] For the clipboard of either the first or second electronic device, the card in the floating window displays all or part of the clipboard data. To easily distinguish between the clipboard data in the clipboard and the data displayed in the card (which may be part of the complete data), the clipboard data in the clipboard is referred to as edit data, and this edit data is the complete data. Taking a user's use of clipboard data on a mobile phone as an example, after the user opens an application, the editing area on the interface can display an editing cursor, such as... Figure 14 As shown in Figure A. For clipboard data indicating text, users can drag the corresponding clipboard data from the clipboard to the editing area by dragging the card, such as... Figure 14 As shown in Figure B. After dragging to the editing area, the user releases the card, and the entire clipboard data is displayed in the editing area, as shown in Figure B. Figure 14 As shown in Figure C, the editing cursor is moved to the end of the clipboard data to provide a starting position for the next paste. Further, after displaying all the clipboard data in the editing area, the clipboard is displayed in a hidden window; the clipboard switches from a floating window to a hidden window, as shown... Figure 14 As shown in Figure D, this allows users to easily view the pasted content. Alternatively, the clipboard can be switched from a floating state to a hidden state after detecting that the user has clicked on an area outside the clipboard; this application does not impose any restrictions on this.
[0206] Of course, users can also select cards by double-clicking or long-pressing them, and then paste the clipboard data into the editing area. Alternatively, users can select multiple cards in the clipboard and paste the clipboard data of all cards into the editing area at once; this application does not limit this.
[0207] It's important to note that when clipboard data indicates an image, the pasting method can be the same as for text. The difference lies in the storage method. Images typically consume more memory than text, so they need to be stored in a distributed file system on the device where the image originated. When synchronizing the clipboard, only the image information is synchronized. This information can include one or more of the following: image thumbnail or partial screenshot, image storage location information, image device origin identifier, image application origin identifier, and image acquisition timestamp. Distributed file storage means that file-type data is stored on the source device. During file synchronization, only the file information is transmitted; when the user actually wants to access the file, it is transferred, accessed, and viewed from the source device.
[0208] For images displayed in a floating window of an electronic device, if the device source identifier of the image indicates the electronic device itself, the image can be read through the image's storage location information in the image information, and then displayed in the editing area. If the device source identifier of the image indicates another electronic device, then when the user triggers the pasting of the image, the electronic device needs to read the image from the other electronic device according to the image's device source identifier, or the electronic device needs to receive an image sent by another electronic device, and then paste the image into the editing area.
[0209] The following explanation uses the example of saving clipboard data in the first electronic device (terminal 1) and the second electronic device (terminal 2) as an example. Figure 15 This section introduces the process of saving data to the clipboard of electronic devices.
[0210] S11, The system service process of terminal 1 registers a clipboard listener.
[0211] The system service process is started by the system server. After starting, the system service process can register a clipboard listener and obtain clipboard access permission without notification. The system service process listens for clipboard events through the clipboard listener. When it detects changes in the data on the native clipboard, if the user is using a third-party application, the third-party application will not display a clipboard notification to the user. This achieves clipboard event listening without disturbing the user. See the description of the system service process registering the clipboard listener above; it will not be repeated here.
[0212] It should be noted that S11 can be completed before executing the cross-platform interaction method provided in this application. For example, when the electronic device restarts or powers on, the system service process registers the clipboard listener; or, when the system server starts running, the system service process starts and registers the clipboard listener. Of course, after the system service process registers the clipboard listener, the clipboard listener can be in a persistent state, requiring only one registration and not needing to be registered again. This embodiment of the application does not impose any restrictions on this.
[0213] S12. The user copies or cuts the material on the interface displayed on terminal 1.
[0214] Taking terminal 1 as a mobile phone as an example, as described above Figure 7 Figure A in the middle - Figure 7 As shown in Figure C, users can first select a portion of the text in the material and then click the "Copy" button to copy the material.
[0215] S13. The system service process detects new data in the native clipboard through the clipboard listener.
[0216] The system service process listens for changes in clipboard data through a clipboard listener. Copy or cut operations trigger clipboard events, which in turn cause changes to the data in the native clipboard. The system service process can detect new data in the native clipboard; this new data is the clipboard data.
[0217] S14, The system service process pulls up the clipboard.
[0218] The presence of new data in the native clipboard indicates that the user intends to save it. The system service process then launches the clipboard, that is, it activates the clipboard in the favorites space, so that the clipboard can retrieve the clipboard data from the native clipboard.
[0219] It's important to note that the clipboard is a container used in the Collections Space application to store clipboard data. Users can access Collections Space by dragging and dropping any data, which will bring up the Collections Space homepage panel—that is, display the corresponding floating window for Collections Space to the user, as described above. Figure 4 Figure A shows the clipboard. When a user performs a copy or cut operation on any data, the user is directly taken to the clipboard, and the clipboard's home panel is displayed, that is, the corresponding floating window for the clipboard is shown to the user. Figure 4 The Chinese map (E-map) does not need to be displayed first. Figure 4 The Chinese A map is shown again. Figure 4 Image E in Chinese.
[0220] It should be noted that if the clipboard is already enabled before executing the cross-platform interaction method provided in this application, then S14 does not need to be executed.
[0221] S15. The clipboard retrieves clipboard data from the native clipboard and saves the clipboard data.
[0222] The system service process binds to the clipboard in terminal 1's favorites space by calling the bind service. The system service process listens for clipboard events through a registered clipboard listener. If it detects a change in clipboard data (i.e., new data in the native clipboard), it calls the bind service to start (or launch) terminal 1's clipboard so that the clipboard can obtain and save the current clipboard data (i.e., the new data).
[0223] If the clipboard is being used for the first time, an initialization process can be performed before saving the current clipboard data. If the clipboard is already open before executing the cross-platform interaction method provided in this application, the initialization process is not required, and the clipboard data can be saved directly.
[0224] S16. The user copies or cuts the material again on the interface displayed on terminal 1.
[0225] As mentioned above Figure 13 Figure A in the middle - Figure 13 As shown in Figure C, users can select a portion of the text in the material and then click the "Copy" button to copy the material again.
[0226] The materials in S16 can be the same as those in S12, or they can be different materials.
[0227] S17. The system service process detects new data in the native clipboard within a preset time period.
[0228] If a user performs a copy or cut operation again within a preset time period (e.g., 10 seconds), the system service process will detect the new data. At this time, the system service process has already launched the clipboard and does not need to launch it again.
[0229] S18. The system service process sends a notification message to the clipboard.
[0230] Notification messages are used to indicate that new data has been added to the native clipboard. System service processes send notification messages to the clipboard via the binder service to inform the clipboard that new data has been added to the native clipboard.
[0231] S19. The clipboard retrieves the current clipboard data from the native clipboard.
[0232] After receiving the notification message, the clipboard retrieves the current clipboard data (i.e., the newly added data) from the native clipboard and saves it.
[0233] Since there's a limit to the number of clipboard entries that can be saved, if the number of saved clipboard entries exceeds this limit after saving new data, the earliest saved clipboard entry will be deleted—that is, the earliest timestamp of the clipboard entry will be deleted. Alternatively, if the number of saved clipboard entries has already reached the limit before saving new data, the earliest saved clipboard entry will be deleted to make room for the new data.
[0234] It should be noted that within a preset time period after the clipboard is activated, if the system service process detects new data in the native clipboard, it will send a notification message to the clipboard. Upon receiving the notification message, the clipboard retrieves the clipboard data from the native clipboard and saves it. One or more new data entries can occur within the preset time period, and correspondingly, one or more clipboard data entries can be saved. In other words, steps S16-S19 can be executed once or multiple times until the system service process does not detect any new data in the native clipboard within the preset time period.
[0235] S20. The system service process did not detect any new data in the native clipboard within a preset time period.
[0236] S21. The system service process closes the clipboard.
[0237] If the user does not perform any copy or cut operations within a preset time period, and the system service process does not detect any new data through the clipboard listener, the system service process will call the unbind service to unbind the clipboard in the favorites space, thereby closing the clipboard. For example, the floating window corresponding to the clipboard will exit and disappear from the sidebar, reducing resource consumption.
[0238] The following describes the synchronization process of the clipboard across the electronic device through steps S22-S29.
[0239] S22. When the preset synchronization timing is met, the clipboard of terminal 1 sends a synchronization request to the communication component of terminal 1.
[0240] This synchronization request is used to request the synchronization of data in the clipboard of terminal 1 that has not been synchronized to terminal 2.
[0241] The timing of clipboard synchronization between electronic devices can include the following.
[0242] After the clipboard data is saved, the clipboard data of terminal 1 is immediately synchronized to the clipboard of terminal 2. That is, when the saved clipboard data changes, the data is synchronized to the clipboard of terminal 2, which improves the timeliness of data synchronization.
[0243] Terminal 1 synchronizes its clipboard data to Terminal 2's clipboard after a certain period (e.g., 30 seconds, 60 seconds, etc.). Terminal 1 saves its clipboard data, and if it detects another clipboard event within a preset time period, it will also save any newly added data. Therefore, on the one hand, after a period of saving clipboard data, multiple clipboard data entries that haven't yet been sent to Terminal 2 can be packaged and sent together, improving data synchronization efficiency. On the other hand, compared to responding to and sending other immediate events, clipboard data synchronization has a lower priority; therefore, clipboard data doesn't need to be synchronized to Terminal 2 immediately but can be synchronized after a certain period, increasing the flexibility of data synchronization.
[0244] When terminals 1 and 2 communicate with each other, data channel resources may become busy in certain scenarios. To avoid conflicts with data channel resources for other events, terminal 1's clipboard can synchronize data with terminal 2's clipboard when channel resources are idle, improving resource utilization and increasing the success rate of data synchronization.
[0245] If terminal 1 saves clipboard data, and terminal 2 is not yet on the loop or is offline, terminal 1's clipboard will temporarily be unable to synchronize data with terminal 2. Once terminal 2 successfully joins the loop or becomes online and establishes a connection with terminal 1, terminal 1's clipboard will synchronize data with terminal 2's clipboard. This allows terminal 2's clipboard to display updated data promptly, improving the comprehensiveness of data synchronization.
[0246] If the clipboard of terminal 2 is not enabled or is in a dormant state, it means that terminal 2 does not need to use the clipboard for the time being. When the clipboard of terminal 2 is enabled for the first time, the clipboard of terminal 1 will synchronize data with the clipboard of terminal 2.
[0247] The Favorites space on terminal 2 is enabled, but the user has not interacted with it, indicating that the Favorites space function is not currently needed on terminal 2. When the user pulls down to update the Favorites space, the clipboard on terminal 1 synchronizes data with the clipboard on terminal 2.
[0248] The clipboard in the bookmarks section of terminal 2 is open, but the user is not using it, indicating that the clipboard is not currently needed on terminal 2. When the clipboard in the bookmarks section of terminal 2 is opened, the clipboard in terminal 1 will synchronize data with the clipboard in terminal 2.
[0249] Understandable Figure 15 This example illustrates how data synchronization is performed between the clipboard of terminal 1 and the clipboard of terminal 2 after a certain period of time (e.g., 30s, 60s, etc.) when clipboard data is stored. Terminal 1 and terminal 2 can also synchronize data at any of the above synchronization times, and this embodiment does not limit this.
[0250] S23, The communication component of terminal 1 sends a synchronization request to the communication component of terminal 2 in the loop.
[0251] S24. The communication component of terminal 2 sends a synchronization request to the clipboard of terminal 2.
[0252] S25. Terminal 2's clipboard responds to the synchronization request, obtains the data to be synchronized, parses the data, and saves the data.
[0253] As mentioned above Figure 8 As shown, Figure 7 Mobile phones in China Figure 8 The computer in Figure A, and Figure 8 The data collected by the tablet in Figure B is synchronized (i.e., Figure 7 The latest card shown in the D image is displayed, and the data synced from the phone is displayed in a floating window on the computer and tablet.
[0254] Among them, the data to be synchronized refers to the data in the clipboard of terminal 1 that has not been synchronized to terminal 2.
[0255] When triggered by a synchronization event, the clipboard of terminal 1 sends a synchronization request to the communication component of terminal 1 to synchronize the data in the clipboard. The communication component of terminal 1 then sends a synchronization request to the communication component of terminal 2. The communication component of terminal 2 sends a synchronization request to the clipboard of terminal 2. This synchronization request may carry data to be synchronized (e.g., text). Terminal 2 responds to the synchronization request by retrieving the data to be synchronized from the request. Alternatively, the synchronization request may carry file information of the data to be synchronized (e.g., text or an image). Terminal 2 responds to the synchronization request by retrieving the file information. For example, if the data to be synchronized is an image, the file information may include a thumbnail or partial screenshot of the image, and the image's storage location information. If the user needs to reuse the image, the clipboard of terminal 2 can read the image from the distributed storage of terminal 1 based on the file information. After parsing the data to be synchronized, the clipboard of terminal 2 inserts it into the database of terminal 2, completing the process of synchronizing data from terminal 1 to the clipboard of terminal 2. The database of terminal 2 can be the clipboard of terminal 2 itself.
[0256] Terminal 2's clipboard provides a convenient entry point for the user (i.e., the card in the floating window displayed on Terminal 2's interface). The user can access the data in Terminal 2's clipboard at any time, including data synchronized from Terminal 1 and clipboard data collected by Terminal 2 itself based on clipboard events it has listened to.
[0257] S26. Terminal 2's clipboard sends a synchronization request to Terminal 2's communication component.
[0258] After synchronizing the data in terminal 1's clipboard, terminal 2 encapsulates its database and requests terminal 1 to synchronize the data in its clipboard. This synchronization request is used to request the synchronization of data in terminal 2's clipboard that has not been synchronized to terminal 1.
[0259] S27. The communication component of terminal 2 sends a synchronization request to the communication component of terminal 1.
[0260] S28. The communication component of terminal 1 sends a synchronization request to the clipboard of terminal 1.
[0261] S29. Terminal 1's clipboard responds to the synchronization request, obtains the data to be synchronized, parses the data, and saves the data.
[0262] The data to be synchronized refers to the data in the clipboard of terminal 2 that has not been synchronized to terminal 1.
[0263] The process of terminal 2 requesting synchronization of data in the clipboard from terminal 1 includes: terminal 2's clipboard sending a synchronization request to terminal 2's communication component; terminal 2's communication component sending a synchronization request to terminal 1's communication component; terminal 1's communication component sending a synchronization request to terminal 1's clipboard; terminal 1's clipboard responding to the synchronization request, obtaining the data to be synchronized, parsing the data, and inserting it into terminal 1's database, thus completing the process of terminal 2 synchronizing data with terminal 1's clipboard. The database of terminal 1 can be terminal 1's clipboard.
[0264] Since terminal 1 and terminal 2 have established a data channel, if terminal 2's clipboard contains data that has not been synchronized to terminal 1's clipboard, terminal 2's clipboard will encapsulate the data from terminal 2's database that has not been sent to terminal 1, and the established data channel will then synchronize the data to terminal 1's clipboard. This can be viewed as another synchronization opportunity, enabling data channel reuse, reducing data transmission conflicts, and improving data transmission efficiency.
[0265] Terminal 1's clipboard provides a convenient entry point for the user (i.e., the card in the floating window displayed on Terminal 1's interface). The user can access the data in Terminal 1's clipboard at any time, including data synchronized from Terminal 2 and clipboard data collected by Terminal 1 itself based on clipboard events it has listened to.
[0266] After synchronizing data from Terminal 2, if Terminal 2 goes offline, the synchronized data from Terminal 2 is deleted from Terminal 1's clipboard, and the data synchronized from Terminal 2's clipboard is not displayed in Terminal 1's floating window. After Terminal 2 comes online or joins the loop, the data in Terminal 1's clipboard can be updated by synchronizing Terminal 2's clipboard. Not saving synchronized data in Terminal 1's clipboard after Terminal 2 goes offline reduces resource consumption. Alternatively, the synchronized data from Terminal 2 can be hidden or grayed out in Terminal 1's floating window. For example, the user can see the synchronized data from Terminal 2, but cannot reuse it; the synchronized data from Terminal 2 will be displayed after Terminal 2 comes online or joins the loop.
[0267] Similarly, after synchronizing data from terminal 1, if terminal 1 goes offline, the clipboards of terminal 2 and other devices will delete the synchronized data from terminal 1. In other words, terminal 2's clipboard will delete the data synchronized from terminal 1's clipboard. After terminal 1 comes online or joins the loop, the clipboard of terminal 1 can be synchronized to update the data in terminal 2's clipboard. Terminal 2's clipboard does not save synchronized data after terminal 1 goes offline, reducing resource consumption. Alternatively, the synchronized data from terminal 1 can be hidden in terminal 2's floating window. For example, the user can see the synchronized data from terminal 1, but cannot reuse it. After terminal 1 comes online or joins the loop, the synchronized data from terminal 1 will be displayed.
[0268] Below Figure 15 Based on the combination Figure 16 This section introduces the pasting operation across electronic devices.
[0269] In some scenarios, after a user copies or cuts materials on terminal 1, they can paste them onto another device (e.g., terminal 2). The system service process on terminal 1 detects new data in the native clipboard through a clipboard listener. This triggers not only terminal 1 to save the clipboard data but also to send a clipboard event from terminal 1 to terminal 2. This example illustrates the cross-device pasting process.
[0270] In the above Figure 15 After S11-S13, the following steps can also be performed.
[0271] S30, Terminal 1's system service process starts the switching component.
[0272] The system service process binds to the handoff component of terminal 1 by calling the bind service. The system service process listens for clipboard events through a registered clipboard listener. If it detects a change in the data in the native clipboard (i.e., new data in the native clipboard), it calls the bind service to start (or launch) the handoff component of terminal 1.
[0273] It should be noted that, Figure 16 The system service process startup and switching component and the above Figure 15 The process of a system service process launching the clipboard can be executed simultaneously. Of course, the process of a system service process launching the switching component and launching the clipboard can also be executed sequentially, and this application does not limit this.
[0274] S31, the switching component of terminal 1 obtains clipboard data from the native clipboard and saves the clipboard data.
[0275] If the switching component of terminal 1 is started for the first time, the switching component can perform an initialization process before saving the clipboard data, and then obtain and save the current clipboard data.
[0276] S32, The switching component of terminal 1 sends a clipboard event to the communication component of terminal 1 through the near-field channel.
[0277] The communication component (Magic Link) of Terminal 1 is in a persistent state and can listen for messages in real time. The switching component of Terminal 1 sends clipboard events to the communication component of Terminal 1 through the near-field channel.
[0278] S33, The communication component of terminal 1 sends a clipboard event to the communication component of terminal 2.
[0279] The communication component of terminal 2 is in a persistent state and can listen for messages in real time. The communication component of terminal 2 can receive clipboard events sent by the communication component of terminal 1.
[0280] S34, The communication component of terminal 2 activates the switching component of terminal 2.
[0281] The communication component of terminal 2 starts (or pulls up) the switching component of terminal 2, and the switching component of terminal 2 receives clipboard events.
[0282] S35, the switching component of terminal 2 saves clipboard events and device identifiers.
[0283] The switching component of terminal 2 saves clipboard events and the corresponding device identifier (IdentityDocument, ID) for each clipboard event.
[0284] If the switching component of terminal 2 is started for the first time, the switching component can first perform an initialization process before saving the clipboard events, then save the clipboard events, and obtain the device identifier of the corresponding device, that is, the device ID of terminal 1.
[0285] It should be noted that the switching component of terminal 2 stores clipboard events, not clipboard data. If the user actually needs to paste clipboard data, terminal 2 can request the clipboard data from the switching component of terminal 1. There is no need for terminal 1 to transfer the clipboard data every time. Instead, the data is transferred only when terminal 2 needs to paste, thus reducing resource consumption.
[0286] S36, Terminal 2's switching component registers a paste event.
[0287] The switch component in terminal 2 registers a paste event and starts a timer, which can be set to 60s, 90s, 100s, etc. In other words, the switch component listens for the paste event.
[0288] S37. If the switching component of terminal 2 does not listen to the paste event within a preset time period after saving the clipboard event, then delete the clipboard event.
[0289] If the user does not perform a paste operation within a preset time period (e.g., 1 minute), the switching component of terminal 2 does not detect the paste event, and the switching component of terminal 2 deletes the clipboard event. S38-S46 are no longer executed.
[0290] If Terminal 2 goes offline after saving the clipboard event, the switching component of Terminal 2 will delete the clipboard event.
[0291] S38. If the switching component of terminal 2 detects a paste event within a preset time period after saving the clipboard event, a clipboard data request is generated.
[0292] The user performs a paste operation on the interface displayed on terminal 2, triggering a paste event.
[0293] S39. The switching component of terminal 2 sends a clipboard data request to the communication component of terminal 2 based on the device identifier.
[0294] If a user performs a paste operation within a preset time period (e.g., 1 minute), the switching component of terminal 2 listens for the paste event, generates a clipboard data request, encapsulates the clipboard data request, and sends it to the communication component of terminal 2.
[0295] S40, the communication component of terminal 2 sends a clipboard data request to the communication component of terminal 1.
[0296] S41, The communication component of terminal 1 sends a clipboard data request to the switching component of terminal 1.
[0297] S42, The switching component of terminal 1 obtains the saved clipboard data.
[0298] S43, The switching component of terminal 1 sends clipboard data to the communication component of terminal 1.
[0299] S44. The communication component of terminal 1 sends clipboard data to the communication component of terminal 2.
[0300] S45, The communication component of terminal 2 sends clipboard data to the switching component of terminal 2.
[0301] S46, the switching component of terminal 2 copies clipboard data to the native clipboard and pastes data from the native clipboard.
[0302] Terminal 2's communication component sends a clipboard data request to Terminal 1's communication component. Terminal 1's communication component then sends a clipboard data request to Terminal 1's switching component, which retrieves the saved clipboard data based on the request. Next, Terminal 1's switching component sends the clipboard data to Terminal 1's communication component, which in turn sends the clipboard data to Terminal 2's communication component. Terminal 2's communication component then sends the clipboard data to Terminal 2's switching component. Terminal 2's switching component adds the clipboard data to Terminal 2's native clipboard, thus pasting the clipboard data (i.e., the copied or cut data from Terminal 1) from the native clipboard.
[0303] It should be noted that the native clipboard here refers to the original system clipboard of Terminal 2, which has the function of saving the last copied, cut, or pasted data.
[0304] Clipboard data can be either image information or text. When the clipboard data is text, terminal 2 retrieves the text and pastes it. When the clipboard data indicates image information, terminal 2 retrieves the image information, then reads the image from terminal 1 based on the image information, and then pastes the image. The clipboard data pasted by terminal 2 refers to complete data. When the clipboard data indicates an image, the image information is synchronized during clipboard data synchronization. However, in this example, an image is pasted; therefore, the clipboard data request is for retrieving complete clipboard data. To distinguish it from the image information synchronized during image synchronization, the complete clipboard data can be referred to as edit data.
[0305] Terminal 2's clipboard has the same functionality as Terminal 1's clipboard. Terminal 2's system service process listens for clipboard events through a registered clipboard listener. When a user performs a paste operation on Terminal 2, it triggers Terminal 2 to retrieve clipboard data from Terminal 1 and add it to Terminal 2's native clipboard. Then, it retrieves clipboard data from Terminal 2's native clipboard for pasting. If new data is added to Terminal 2's native clipboard, it triggers Terminal 2 to save the new data. However, because the data pasted by Terminal 2 is copied or cut from Terminal 1, and the copied or cut data from Terminal 1 is synchronized from Terminal 1's clipboard to Terminal 2's clipboard, this results in duplicate data being saved in the clipboard.
[0306] For example, a user copies data A on the interface displayed on terminal 1, triggering terminal 1 to save data A to its clipboard. The saved data A originates from terminal 1's native clipboard. After copying data A on the interface displayed on terminal 1, the user performs a paste operation on the interface displayed on terminal 2. In response to this paste operation, terminal 2 first retrieves data A from terminal 1 and adds it to terminal 2's native clipboard. The addition of data A to terminal 2's native clipboard triggers terminal 2 to also save data A to its clipboard, and the saved data A originates from terminal 2's clipboard. Simultaneously, the saved data A in terminal 1's clipboard is synchronized to terminal 2's clipboard, meaning the saved data A in terminal 2's clipboard originates from terminal 1's clipboard. This results in terminal 2's clipboard having data A saved repeatedly.
[0307] In this application, to avoid duplicate data collection—that is, to prevent duplicate clipboard data in terminal 2's clipboard—terminal 2's clipboard determines the data source before collecting the data corresponding to a clipboard event. It distinguishes whether the data was copied or cut from another device; if so, no record is generated. In other words, if the data originates from a copy or cut operation on terminal 1, terminal 2's clipboard filters out data from this source and does not save it in terminal 1's clipboard, improving the simplicity of data collection and reducing resource consumption.
[0308] For example, taking terminal 1 as a mobile phone and terminal 2 as a computer, the user in Figure 7 In Figure C, after clicking the copy button for data A, pasting the copied or cut data from the phone onto the computer triggers the computer's clipboard to save data A. For example... Figure 17 As shown, Figure 17 The image shows the contents of the computer's clipboard, including not only data from the computer's native clipboard but also clipboard data synced from the mobile phone (data synced from the mobile phone's clipboard). These two sets of data are identical. In this application, regarding the aforementioned... Figure 17If it is detected that the data in the computer's native clipboard was written across devices, then the computer's clipboard will not save the data from the computer's native clipboard.
[0309] In this application, the clipboard of terminal 1 is used to save data copied or cut multiple times by the user, which is compatible with the cross-terminal paste function, realizes a logical closed loop, increases the richness of application scenarios, and improves the user experience.
[0310] Figure 18 An exemplary flowchart of a cross-platform interaction method provided in an embodiment of this application.
[0311] In some possible cases, exemplary processes involving the collection and synchronization of clipboard data on electronic devices can be referred to in the following description of S101-S107.
[0312] S101, The first electronic device displays a first interface, which includes first material.
[0313] It is understood that the first interface can be the interface that displays text content as mentioned above, or the first interface can also be the interface that displays images as mentioned above.
[0314] In one possible implementation, the first interface can be as described above. Figure 7 The display interface is shown in Figure A. At this point, the first material is text.
[0315] S102. When the first clipboard operation input by the user for the first material is received, the first electronic device obtains the first clipboard data from the native clipboard, and the first clipboard data corresponds to the first material.
[0316] In one possible implementation, the first clipboard operation could be... Figure 7 The copy operation in diagram C.
[0317] S103. The first electronic device displays a second interface, which includes a first floating window. The first floating window includes a first card and a second card. The first card includes part or all of the first clipboard data, and the second card includes part or all of the second clipboard data. The second clipboard data is obtained by the user performing a second clipboard operation on the second material.
[0318] In one possible implementation, the second interface can be as described above. Figure 7 The display interface is shown in Figure D. The first card is the bottom card in the first floating window.
[0319] S104, The first electronic device sends a first synchronization request to the second electronic device.
[0320] The first synchronization request is used to request the synchronization of data in the first clipboard that has not been synchronized to the second electronic device.
[0321] S105. In response to the first synchronization request, the second electronic device obtains the first clipboard data from the first clipboard of the first electronic device.
[0322] S106. The second electronic device displays a third interface, which includes a second floating window, a third card and a fourth card. The third card includes part or all of the first clipboard data, and the fourth card includes part or all of the second clipboard data.
[0323] In one possible implementation, taking a computer as an example, the third interface can be as described above. Figure 8 The display interface shown in Figure A shows the third card, which is the rightmost card in the second floating window. Taking a tablet as an example, the third interface can be as described above. Figure 8 The third card in the third floating window is the bottommost card in the second floating window, as shown in Figure B.
[0324] S107. In the second electronic device, in response to a drag operation on a third card, a fourth interface is displayed. The fourth interface includes a first editing area, which includes all of the first clipboard data.
[0325] The relevant content in S101-S107 can be found in the above description of how the local end collects clipboard data and synchronizes it with the remote end, and will not be repeated here. The exemplary interfaces involved in S101-S107 can be found in the above description of the remote end. Figures 6-12 The relevant content will not be described in detail here.
[0326] This application, through trust ring capabilities combined with clipboard and instant paste capabilities, provides an end-to-end solution to the technical issues of cross-device pasting incompatibility and cross-application / cross-device clipboard data reuse incompatibility. This improves the efficiency of cross-device clipboard data sharing and enhances the user experience. Users can also open an editing interface on a second electronic device, select any card in the second floating window, and paste all the clipboard data contained in that card into the editing area of the editing interface. The data in this card can originate from either the first or second electronic device, enabling the sharing and immediate access to saved data.
[0327] 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. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are 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, the computer instructions can be transmitted from one website, computer, server, or data center to another 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 accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0328] The above descriptions are optional embodiments provided by this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the technical scope disclosed in this application should be included within the protection scope of this application.
Claims
1. A cross-platform interaction method, characterized in that, Applied to a system including a first electronic device and a second electronic device, the method includes: In the first electronic device, a clipboard listener is registered through a system service process, and clipboard access without notification permission is obtained; In the first electronic device, clipboard events are listened to by the clipboard listener; The first electronic device displays a first interface, which includes first materials; When the first clipboard operation input by the user is received, the first electronic device responds to the first clipboard event triggered by the first clipboard operation by listening to the first clipboard operation and starts the first clipboard. The first clipboard is a storage container for collecting multiple clipboard data from the native clipboard, and the new clipboard data of the first clipboard will not overwrite the previous clipboard data. The first electronic device obtains first clipboard data from the native clipboard and stores the first clipboard data in the first clipboard, and the first clipboard data corresponds to the first material; The first electronic device displays a second interface, which includes a first floating window. The first floating window includes a first card and a second card. The first card includes part or all of the first clipboard data, and the second card includes part or all of the second clipboard data. The second clipboard data is obtained by the user performing a second clipboard operation on the second material. The first electronic device sends a first synchronization request to the second electronic device; In response to the first synchronization request, the second electronic device obtains the first clipboard data from the first clipboard of the first electronic device; The second electronic device displays a third interface, which includes a second floating window. The second floating window includes a third card and a fourth card. The third card includes part or all of the first clipboard data, and the fourth card includes part or all of the second clipboard data. In response to a drag operation on the third card, the second electronic device displays a fourth interface, the fourth interface including a first editing area, the first editing area including all of the first clipboard data; When the target card includes a portion of the corresponding clipboard data, in response to a viewing operation of the target card, the first electronic device displays a magnified version of the target card, which includes all of the corresponding clipboard data. The target card is any card in the first floating window.
2. The method as described in claim 1, characterized in that, After the first electronic device obtains the first clipboard data from the native clipboard, the method further includes: In the first electronic device, within a first preset time period after the first clipboard operation, the user inputs a third clipboard operation on the third material, and the first electronic device obtains the third clipboard data from the original clipboard. The first electronic device displays the first floating window, which includes a first card, a second card, and a fifth card, wherein the fifth card includes part or all of the third clipboard data.
3. The method as described in claim 1, characterized in that, After the first electronic device obtains the first clipboard data from the native clipboard, the method further includes: In the first electronic device, if no clipboard operation input from the user is received within a first preset time period after the first clipboard operation, the first floating window is closed.
4. The method as described in claim 1, characterized in that, In response to the first synchronization request, after the second electronic device obtains the first clipboard data from the first clipboard of the first electronic device, the method further includes: In the second electronic device, if there is fourth clipboard data in the second clipboard of the second electronic device, a second synchronization request is sent to the first electronic device; the fourth clipboard data indicates data that has not been synchronized to the first electronic device and originates from the second electronic device, and the second synchronization request is used to request the synchronization of the fourth clipboard data; In response to the second synchronization request, the first electronic device obtains the fourth clipboard data from the second clipboard; The first electronic device displays the first floating window, which includes the first card, the second card, and the sixth card, wherein the sixth card includes part and all of the fourth clipboard data.
5. The method as described in claim 4, characterized in that, The sixth card includes a first icon and / or a second icon, wherein the first icon is used to indicate that the device source identifier of the fourth clipboard data is the second electronic device, and the second icon is used to indicate the application source identifier of the fourth clipboard data.
6. The method as described in claim 1, characterized in that, The method further includes: When a preset synchronization timing is met, the first electronic device receives a third synchronization request sent by the second electronic device; In response to the third synchronization request, the first electronic device obtains fifth clipboard data from the second clipboard of the second electronic device; the fifth clipboard data is data in the second clipboard that has not been synchronized to the first electronic device.
7. The method as described in claim 6, characterized in that, The preset synchronization timing is any one of the following: within a second preset time period after the second electronic device obtains the fifth clipboard data, the data channel between the first electronic device and the second electronic device is in an idle state, the second electronic device establishes a connection with the first electronic device, the second clipboard is started for the first time, the second clipboard is passively updated, and the first clipboard is opened.
8. The method as described in claim 1, characterized in that, The method further includes: In the first electronic device, in response to a drag operation on a target card, a fifth interface is displayed; the fifth interface includes a second editing area, which displays all the clipboard data included in the target card, and the target card is any card in the first floating window.
9. The method as described in claim 1, characterized in that, When the third card indicates the first image, the method further includes: The second electronic device sends an image data request to the first electronic device; In response to the image data request, the first electronic device sends the first image to the second electronic device, and the first image is displayed in the first editing area.
10. The method as described in claim 9, characterized in that, The method further includes, in response to the first clipboard event triggered by the first clipboard operation: The first electronic device sends the first clipboard event to the second electronic device; In the second electronic device, the first clipboard event and the device identifier of the first electronic device are stored, and the paste event is listened for; In the second electronic device, if a first paste event is detected within a third preset time period after the first clipboard event is saved, a clipboard data request is sent to the first electronic device based on the device identifier; the clipboard data request is used to request the acquisition of the first clipboard data corresponding to the first clipboard event; In the first electronic device, in response to the clipboard data request, the first clipboard data is sent to the second electronic device; After receiving the first clipboard data, the second electronic device pastes the data according to the first clipboard data.
11. The method as described in claim 10, characterized in that, After receiving the first clipboard data, the second electronic device pastes the data according to the first clipboard data, including: After receiving the first clipboard data, the second electronic device adds the first clipboard data to the native clipboard of the second electronic device. The second electronic device obtains the first clipboard data from the native clipboard and pastes it according to the first clipboard data.
12. The method as described in claim 11, characterized in that, The method further includes: In response to a second clipboard event that adds the first clipboard data to the native clipboard of the second electronic device, the second electronic device does not save the first clipboard data corresponding to the second clipboard event in the second clipboard.
13. The method as described in claim 10, characterized in that, After saving the first clipboard event and the device identifier of the first electronic device, and listening for the paste event, the method further includes: In the second electronic device, if the first paste event is not detected within a third preset time period after the first clipboard event is saved, the first clipboard event is deleted. or, In the second electronic device, if the second electronic device is detected to be offline, the first clipboard event is deleted.
14. The method according to any one of claims 1-13, characterized in that, After the second electronic device displays the third interface, the method further includes: In the second electronic device, if the first electronic device is detected to be offline, the data originating from the first electronic device in the second floating window is deleted or hidden; the data originating from the first electronic device includes the first clipboard data.
15. The method according to any one of claims 1-13, characterized in that, The cards displayed in both the first and second floating windows are arranged in the order of their acquisition timestamps.
16. The method according to any one of claims 1-13, characterized in that, In the case where the first clipboard data indicates text, the first card includes all or part of the characters in the text; In the case where the first clipboard data indicates an image, the first card includes the image, or a thumbnail or partial screenshot of the image.
17. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method performed by the first electronic device or the second electronic device as described in any one of claims 1-16.
18. A cross-platform interactive system, characterized in that, The cross-platform interactive system includes a first electronic device and a second electronic device, wherein the first electronic device and the second electronic device perform the method as described in any one of claims 1-16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-16.
20. A computer program product containing instructions, characterized in that, When it is run on a computer, it causes the computer to perform the method as described in any one of claims 1-16.
Citation Information
Patent Citations
Method, terminal and system for managing clipboard
CN105323272A
Instant messaging realization method and device
CN105871690A
Data sharing method and device, electronic equipment and storage medium
CN115499945A
Intelligent clipboard for connecting equipment
CN116954938A
Data copying method and electronic equipment
CN117130525A