Cross-end interaction method, device and system and storage medium
By adding clipboard containers and floating window displays to electronic devices, the complex problem of clipboard data sharing across devices is solved, and convenient data synchronization and sharing between multiple devices is achieved, improving user experience.
Patent Information
- Application Number
- CN202410043011.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-01-10
AI Technical Summary
In the prior art, the process of sharing clipboard data across devices is complicated, resulting in poor user experience and the inability to achieve convenient operation of multiple copying and pasting.
An additional clipboard container is added to electronic devices to collect multiple clipboard data and display it through a floating window, supporting cross-device synchronization and sharing of clipboard data, using trust ring technology to achieve automatic synchronization and convenient access to data between multiple devices.
It improves the efficiency of sharing clipboard data between devices, simplifies the data operation process between multiple devices, and improves the user experience.
Smart Images

Figure CN120335693A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and particularly to a cross-terminal interaction method, device, system and storage medium. Background Art
[0002] With the continuous development of terminal technologies, users often copy multiple pictures, multiple paragraphs of text, etc. separately during daily life and study. Moreover, with the continuous enrichment of terminal types and the wide application of multi-device collaboration, after copying or cutting on the local device, users can also go to other applications or other devices for pasting and using. Moreover, in some scenarios, users need to repeatedly use multiple different data on multiple applications and multiple electronic devices within a certain period of time. For example, in application scenarios such as document making, thesis writing, presentation file making, book review, movie review, etc., users usually first copy some relevant text and pictures, and then paste and use them. In this scenario, the use of copied or cut data by users is not one-time.
[0003] However, the native clipboard of the current terminal provides one-time copy and paste. When users repeatedly use multiple different data, they need to copy the data once, paste the data once, and then repeat the next copy and paste to complete the collection of multiple different data. For sharing multiple different data sequentially between multiple applications and multiple electronic devices, the copy and paste steps also need to be repeatedly executed. For the centralized paste scenario and the cross-device scenario, it often requires very complicated steps to achieve the sharing of clipboard data, and the sharing process of clipboard data is not convenient enough, seriously affecting the user experience.
[0004] Therefore, how to improve the sharing efficiency of cross-terminal processing of clipboard data through electronic devices is an urgent problem to be solved at present. Summary of the Invention
[0005] This application provides a cross-terminal interaction method, device, system and storage medium, which can greatly improve the sharing efficiency of clipboard data and thus improve the user experience. The technical solutions are as follows:
[0006] In a first aspect, a cross-terminal interaction method is provided, which can be applied to a system including a first electronic device and a second electronic device. The first electronic device and the second electronic device are in the same trust ring. The method may include: The first electronic device displays a first interface; in response to a first clipboard operation input by the user on a first material in the first interface, obtain first clipboard data from the native clipboard of the first electronic device; the first clipboard operation is a copy operation or a cut operation; collect the first clipboard data in the first clipboard of the first electronic device and encapsulate it into a card form and display it in a first floating window in the second interface. Other cards may also be displayed in the first floating window. For example, a second card, and the second clipboard data included in the second card is obtained by the user performing a second clipboard operation on a second material. Among them, the first card corresponding to the first clipboard data is the card that is currently displayed. When the preset synchronization timing is met, the first electronic device synchronizes the unsynchronized data to the second electronic device in the ring. The unsynchronized data at least includes the first clipboard data; after the second electronic device obtains the unsynchronized data, it encapsulates it into a card form and displays it in a second floating window in the third interface; the second floating window at least includes 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, the clipboard data is synchronized with each other among the electronic devices in the ring. Therefore, the second floating window also includes a fourth card corresponding to the second clipboard data. The second electronic device responds to a drag operation on any card (for example, the third card) in the second floating window, and drags all the clipboard data included in the card to the first editing area, that is, displays all the first clipboard data corresponding to the third card in the first editing area to achieve data reuse.
[0007] If the second clipboard data is obtained by the first electronic device from the native clipboard, since the second clipboard data included in the second card was collected before the first clipboard data, then the second clipboard data may have been synchronized to the second clipboard of the second electronic device. Of course, the second clipboard data may also be synchronized to the second clipboard of the second electronic device together with the first clipboard data. The second clipboard data may also be collected by the user on the second electronic device, and the second clipboard data does not need to be synchronized to the second electronic device. The second clipboard data may also be collected by the user on other electronic devices (electronic devices other than the first electronic device and the second electronic device), and the second clipboard data is synchronized from the other electronic device to the second electronic device.
[0008] If the user performs a 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 a second clipboard operation on the second material on other electronic devices (which may be the second electronic device), the second clipboard data is obtained by the other electronic device from its native clipboard, and then the clipboard of the other electronic device synchronizes it to the first clipboard of the first electronic device.
[0009] In some embodiments of the present 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 by the present application, when the first electronic device displays the first interface, in response to the first clipboard operation (copy operation or cut operation) input by the user on the first material displayed on the first interface, the first electronic device obtains the first clipboard data corresponding to the first clipboard operation and stores it in the first clipboard of the first electronic device. After the first clipboard data is stored, the first clipboard encapsulates the first clipboard data into a card form and newly displays it in the first floating window. The first clipboard is a storage container used by the first electronic device to store multiple clipboard data, and it can store clipboard data from the native clipboard. Moreover, the newly stored clipboard data in the first clipboard does not overwrite the previous clipboard data. That is, the first electronic device can store the data copied or cut to the native clipboard multiple times 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 (such as the second electronic device), stores 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 the clipboard data in the first clipboard, the data copied or cut to the native clipboard multiple times by the user on the local side can be stored and displayed in other devices in the loop, and then viewed and used, realizing cross-terminal sharing of clipboard data, improving the sharing efficiency of cross-terminal processing of clipboard data, facilitating user reuse, and improving the user experience.
[0011] In addition, when a third electronic device is also included in the same trusted loop, the first electronic device also synchronizes the first clipboard data to the third electronic device. The third electronic device obtains the first clipboard data, stores 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] The user can also reuse the clipboard data collected by the second electronic device or the clipboard data synchronized by other devices. In response to a drag operation on any card in the second floating window, all of the clipboard data included in the card is dragged into the first editing area to achieve data reuse. Thus, operations such as deleting and changing the clipboard data in the editing area can be performed, improving the usage efficiency of the collected clipboard data.
[0013] In some embodiments of the present application, the drag operation may be an action or gesture such as dragging, pulling, dragging, tugging, or towing.
[0014] In some embodiments of the present application, the clipboard data collected in the clipboard is complete data. Due to the limited display area of the interface, the data displayed on the card in the floating window may be all or part of the complete data. When the card is selected, the complete data in the clipboard is called, so that the complete data is displayed in the editing area, and the edited data represents the complete data.
[0015] In some embodiments of the present application, the complete data collected in the clipboard may be text or an image. When synchronizing clipboard data between electronic devices, the original text or the original image may be synchronized, and the complete data is stored in the clipboard, which is convenient for the user to directly access when using shared data, reducing the number of interactions between electronic devices and improving the data sharing efficiency.
[0016] In some embodiments of the present application, the user opens an editing interface in the second electronic device, selects any card in the second floating window, and by calling the second clipboard, pastes all of the clipboard data included in the card onto the editing area in the editing interface. The data in the card may be from the first electronic device or from the second electronic device, realizing the sharing and ready-to-use of the collected data.
[0017] Combined with the first aspect, in a possible implementation manner, 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 a third material. The native clipboard stores disposable data, that is, the first clipboard data is overwritten by the third clipboard data, and only the third clipboard data is in the native clipboard. Obtain the third clipboard data from the native clipboard, collect the third clipboard data in the first clipboard, and encapsulate it in the form of a card and display it in the first floating window. At least one card is displayed in the first floating window, and the fifth card corresponding to the third clipboard data is the latest displayed card among the at least one card.
[0018] In some embodiments of the present application, the third clipboard operation may be a cut operation or a copy operation. The third material may be the same as the first material, that is, the user can perform multiple cut or copy operations on the same content or different contents of the same material, and the user can also perform multiple cut or copy operations on different materials.
[0019] In some embodiments of the present 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 a cut operation or a copy operation, and encapsulate the third clipboard data into a card form and display it in the first floating window. The user can perform copy or cut operations on the local end (such as the first electronic device) multiple times, and the copied or cut data is collected in the first clipboard and updated and displayed in the first floating window, realizing multiple collections of clipboard data, facilitating the user to view and use at any time, and improving the user experience.
[0020] Combined with the first aspect, in a possible implementation manner, 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, close the first clipboard and the first floating window.
[0021] In some embodiments of the present application, after collecting the first clipboard data, if the user does not perform a cut operation or a copy operation within a period of time, and the first clipboard of the first electronic device no longer collects new clipboard data, the first clipboard and the first floating window are closed to reduce power consumption.
[0022] Combined with the first aspect, in a possible implementation manner, after the second electronic device obtains the first clipboard data from the first clipboard of the first electronic device in response to the first synchronization request, the method further includes: if there is data in the second clipboard of the second electronic device in the loop that has not been synchronized to the first electronic device (for example, the fourth clipboard data), synchronize the unsynchronized data to the first electronic device. After the first electronic device obtains the fourth clipboard data, it encapsulates it into a card form (i.e., the sixth card) and displays it in the first floating window.
[0023] In some embodiments of the present application, the local end (such as the first electronic device) synchronizes the first clipboard data to the peer end (such as the second electronic device), indicating that a data channel is established between the local end and the peer end. Therefore, if there is data in the clipboard of the peer end that has not been synchronized to the local end (such as the fourth clipboard data), the clipboard of the peer end encapsulates the data that has not been sent to the local end, and synchronizes the data to the clipboard of the local end through the established data channel. Realize the reuse of the data channel, reduce data transmission conflicts, and improve data transmission efficiency.
[0024] In combination with the first aspect, in a possible implementation, the sixth card includes the first icon and / or the second icon. 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.
[0025] In some embodiments of the present application, the device source identifier may be a general identifier representing the device, and the application source identifier may be a general identifier representing the application.
[0026] The device source identifier of the first clipboard data displayed on the above-mentioned third card is the first electronic device.
[0027] In some embodiments of the present application, by displaying the icon of the device source identifier and the icon of the application source identifier on the card, the user is prompted about the device source and application source of each clipboard data, increasing the diversity and richness of the interface display and improving the fun of human-computer interaction.
[0028] In combination with the first aspect, in a possible implementation, the method further includes: if there is data in the second clipboard of the second electronic device in the ring that has not been synchronized to the first electronic device, then when the preset synchronization timing is met, the second electronic device synchronizes the unsynchronized data to the first electronic device. The unsynchronized data may include the fifth clipboard data. After the first electronic device obtains the fifth clipboard data, it encapsulates it in the form of a card and newly displays it in the 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 the present application, when the preset synchronization timing is met, not only does the first electronic device automatically synchronize clipboard data to other devices in the ring (such as the second electronic device), but the first electronic device can also receive the 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. In this way, in the first floating window of the first electronic device, not only all or part of the first clipboard data collected by itself is displayed, but also all or part of the synchronized fifth clipboard data is displayed. By synchronizing the clipboard data in the second clipboard of the second electronic device, the data copied or cut by the user on the second electronic device can be collected and displayed on the first electronic device in the ring, and the two are synchronized with each other, realizing cross-terminal sharing of clipboard data, improving the sharing efficiency of cross-terminal processing of clipboard data, and improving the user experience.
[0030] In combination with the first aspect, in a possible implementation manner, 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 electronic device and the second electronic device 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 updated passively, and when the second clipboard is opened.
[0031] By setting the preset synchronization timing, the first electronic device synchronizes clipboard data to the second electronic device when the preset synchronization timing is met, and the second electronic device synchronizes clipboard data to the first electronic device when the preset synchronization timing is met. The clipboards of the electronic devices can share the collected clipboard data, realizing cross-device sharing of clipboard data, improving the sharing efficiency of cross-device processing of clipboard data, and improving the user experience.
[0032] In combination with the first aspect, in a possible implementation manner, the method further includes: in response to a dragging operation on any card in the first floating window, the first electronic device drags all the clipboard data included in the card to the second editing area, so as to perform operations such as deleting and changing the second editing data, and improving the usage efficiency of the collected clipboard data.
[0033] The user can open an editing interface on the first electronic device, select any displayed card, and by calling the first clipboard, paste all the clipboard data corresponding to the card onto the editing area in the editing interface. The data in the card can be from the first electronic device or from other electronic devices, realizing the sharing and ready-to-use of the collected data, and improving the user experience.
[0034] In combination with the first aspect, in a possible implementation manner, 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.
[0035] In some embodiments of the present application, the complete data may be text or image. For text, since the space it occupies is small, data synchronization can be directly performed. For an image, it usually occupies a large space. When electronic devices perform data synchronization, only the image information of the image can be synchronized. The image information may include the thumbnail or partial screenshot of the image, the storage location information of the image, the device source identifier of the image, the application source identifier of the image, the acquisition timestamp of the image, etc. The thumbnail or partial screenshot of the image is used for schematic display in the floating window of the synchronized device. The device source identifier of the image indicates the device source of the image data request (for example, the first image is from the first electronic device).
[0036] In some embodiments of the present application, when the user selects a card indicating an image, if the image is synchronized clipboard data, the requesting party needs to send an image data request according to the device source identifier of the image, and the requested party sends the image information to the requesting party. The requesting party reads the original image from the requested party according to the storage location information of the image in the image information, and the requesting party displays the original image in the editing area after obtaining it. For an image that is self-collected clipboard data, the image can be directly read according to the storage location information of the image and displayed in the editing area without sending an image data request. This can reduce unnecessary transmission losses and improve resource utilization.
[0037] In combination with the first aspect, in a possible implementation manner, before the first electronic device displays the second interface, the method includes: The first electronic device starts the first clipboard in response to monitoring a first clipboard event triggered by a first clipboard operation.
[0038] In some embodiments of the present application, the first clipboard is used to collect clipboard data. In practical applications, the user can first enter the first clipboard. At this time, a floating window is displayed on the interface, and 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 collected in the first clipboard. Of course, it can also be that when the first electronic device displays the first interface, the first clipboard is started through a first clipboard operation (copy operation or cut operation), and the embodiments of the present application do not limit this.
[0039] In some embodiments of the present application, the electronic device monitors clipboard events. The copy operation and the cut operation trigger clipboard events, and the clipboard events cause new data to be generated on the native clipboard. The presence of new data indicates that the user intends to collect clipboard data, and the first clipboard is started. The first clipboard is used to collect the clipboard data. Using the first clipboard added in the electronic device as the collection carrier, multiple collections and sharing of different data are realized.
[0040] In combination with the first aspect, in a possible implementation, after detecting a first clipboard event triggered by a first clipboard operation, the method further includes: the first electronic device sending the first clipboard event to the second electronic device; the second electronic device saving the first clipboard event and the device identifier of the first electronic device, and monitoring for a paste event; if a first paste event is detected within a third preset time period after saving the first clipboard event, sending a clipboard data request to the first electronic device based on the device identifier to request the first clipboard data corresponding to the first clipboard event. The first electronic device, in response to the clipboard data request, sends the first clipboard data to the second electronic device; after receiving the first clipboard data, the second electronic device performs a paste operation according to the first clipboard data. When the first clipboard data is text, the text is simply pasted; when the first clipboard data indicates image information, the image is read from the first electronic device according to the image information, and then the image is pasted.
[0041] In some embodiments of the present application, when the local end (e.g., the first electronic device) detects a clipboard event, on the one hand, the local clipboard is started to perform the step of collecting clipboard data. At the same time, the local end also activates the remote end (e.g., the second electronic device) and sends the clipboard event to other devices in the loop (e.g., the second electronic device), and the other devices in the loop can be one or more. The remote end saves the clipboard event and the device identifier. If the user performs a paste operation on the remote end within a certain period of time, triggering a paste event, the remote end sends a clipboard data request to the local end based on the device identifier to request the data corresponding to the clipboard event. The local end, in response to the clipboard data request, sends the data corresponding to the clipboard event to the remote end, enabling the remote end to perform a paste operation according to the data.
[0042] In some embodiments of the present application, the first clipboard data may indicate text or an image. When synchronizing data between the above-mentioned 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 remote end pastes the clipboard data copied or cut by the local end, it is necessary to paste the text or image. Thus, when the first clipboard data is text, the remote end requests the text on the first clipboard of the local end from the local end, and the remote end receives the text and can then paste the text. When the first clipboard data is image information, the remote end requests the image information from the local end, and after receiving the image information, reads the image from the local end according to the image information, and then pastes the image.
[0043] When a copy operation or a cut operation is performed on the local end and a paste operation is performed on the remote end, the clipboard data can be obtained from the local end for pasting, improving the data usage efficiency.
[0044] It should be noted that the local end and the peer end in this application are not absolute. When new data is generated in the clipboard of the peer end, the peer end can be regarded as the local end, and the local end can be regarded as the peer end, so as to perform data collection and data synchronization. This application will not elaborate further here.
[0045] In combination with the first aspect, in a possible implementation manner, after the second electronic device receives the first clipboard data, it performs a paste operation according to the first clipboard data, including: after the second electronic device receives the first clipboard data, it adds the data to the native clipboard of the second electronic device; then it obtains the first clipboard data from the native clipboard and performs a paste operation according to the first clipboard data.
[0046] In some embodiments of this application, after the second electronic device receives the data sent by the first electronic device, it adds the data to the native clipboard of the peer end, and then obtains the data from the clipboard for pasting.
[0047] After the peer end performs a paste operation, it adds the clipboard data obtained from the local end to the native clipboard, and then obtains the clipboard data from the native clipboard for pasting, improving the data usage efficiency.
[0048] In combination with the first aspect, in a possible implementation manner, 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 does not collect the first clipboard data corresponding to the second clipboard event in the second clipboard in response to the second clipboard event.
[0049] In some embodiments of this application, the data on the native clipboard is disposable data, and new data will overwrite the previous data. The new data will trigger the clipboard in the electronic device to collect 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 will trigger a clipboard event. Although the clipboard event is monitored and there is new data on the native clipboard, since the new data comes from the first electronic device and the first clipboard of the first electronic device has already collected this data and will synchronize it to the second electronic device. Therefore, the second clipboard of the second electronic device no longer collects the new data on the native clipboard, reducing duplicate collection, improving the simplicity of the data, and thus improving the resource utilization rate.
[0051] In combination with the first aspect, in a possible implementation manner, after saving the first clipboard event and the device identifier of the first electronic device and listening for paste events, the method further includes: if the second electronic device does not detect the first paste event within a third preset time period after saving the first clipboard event, delete the first clipboard event; or, if it is detected that the second electronic device is offline, delete the first clipboard event.
[0052] In some embodiments of the present application, the peer device (e.g., the second electronic device) saves the clipboard event and the device identifier. In one case, if the user does not perform a paste operation on the peer device within a period of time and the peer device does not detect a paste event, the peer device deletes the saved first clipboard event. In another case, after the peer device saves the clipboard event, if it is detected that the peer device is offline, regardless of time limit, the first clipboard event can be deleted, reducing resource waste and improving resource utilization rate.
[0053] In combination with the first aspect, in a possible implementation manner, before starting the first clipboard in response to the first clipboard event triggered by monitoring the first clipboard operation, the method further includes: the first electronic device registers a clipboard listener through the system service process and obtains the permission of not notifying the clipboard access; monitors the clipboard event through the clipboard listener.
[0054] The system server of the first electronic device starts the system service process, and the system service process registers a clipboard listener, and can obtain the permission of not notifying the clipboard access. When monitoring the clipboard event through the clipboard listener, it is possible not to prompt the user when the user uses a third-party application, avoiding excessive interruption of the clipboard prompt to the user and improving the user experience.
[0055] In combination with the first aspect, in a possible implementation manner, after the second electronic device displays the third interface, the method further includes: if it is detected that the first electronic device is offline, delete or hide the data from the first electronic device in the second floating window; the data from the first electronic device includes the first clipboard data.
[0056] In some embodiments of the present application, after the peer device (e.g., the second electronic device) collects the data synchronized from the first electronic device (e.g., the first clipboard data), if it is detected that the first electronic device is offline, delete or hide the data from the first electronic device in the second clipboard and the second floating window of the peer device. For the case of deleting data, the first electronic device can synchronize the data to the peer device again after the first electronic device goes online. After the electronic device is offline, the synchronized data can be not saved, reducing resource consumption and improving resource utilization rate.
[0057] In combination with the first aspect, in a possible implementation, the cards displayed in the first floating window and the second floating window are arranged in the order of the acquisition timestamps of the cards.
[0058] In some embodiments of the present application, the acquisition timestamp of a card refers to the acquisition timestamp of the clipboard data corresponding to the card on each electronic device. The acquisition timestamps of the same card in the ring of electronic devices are the same. Therefore, the display order of the cards in the floating window of the electronic device is also the same. By standardizing the display order of the cards, the standardization of the display interface is improved.
[0059] In combination with the first aspect, in a 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 the image, or a thumbnail or partial screenshot of the image.
[0060] In some embodiments of the present application, 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.
[0061] When the first clipboard data indicates text, what is synchronized between electronic devices is the text itself. For a short text, for example, the number of characters corresponding to the text is less than or equal to the maximum value of the characters displayed on the card, the cards displayed on each electronic device are all the characters of the text. For a long text, for example, the number of characters corresponding to the text is greater than the maximum value of the characters displayed on the card, the cards displayed on each electronic device are partial characters of the text.
[0062] When the first clipboard data indicates an image, for a small-sized image, for example, the size of the image is less than or equal to the maximum value of the card size, the electronic devices can synchronize the image, and the cards displayed on each electronic device are the image. For a large-sized text, for example, the size of the image is greater than the maximum value of the card size, what is synchronized between the electronic devices is image information, and the image information can include a thumbnail or partial screenshot of the image, the storage location information of the image, the device source identifier of the image, the application source identifier of the image, the acquisition timestamp of the image, etc. The cards displayed on each electronic device are the thumbnail or partial screenshot of the image.
[0063] As much data related to the clipboard data as possible is displayed in the limited area, which is convenient for the user to know the general information of each card and improves the user experience.
[0064] In combination with the first aspect, in a possible implementation, the upper limit of the number of cards displayed in the first floating window is a first preset number; a second interface is displayed, including: if the number of cards already displayed in the first floating window reaches the first preset number, then a first card is displayed in the first floating window, and at the same time, the card with the earliest acquisition timestamp among the already displayed cards is hidden.
[0065] In some embodiments of the present 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, for example, 3, 4, 5, 6, etc. When it is necessary to display a card corresponding to new data, if the number of cards already displayed in the floating window reaches the upper limit, it is necessary to hide the card that was displayed first, and at the same time, display the card corresponding to the new data. The display order of the cards in the floating window can be sorted according to the acquisition timestamp of the cards. Therefore, the card with the earliest acquisition timestamp currently displayed can be hidden here. The acquisition timestamp of the card refers to the acquisition timestamp of the clipboard data corresponding to the card on each electronic device. The acquisition timestamps of the same card in the loop of electronic devices are the same. Therefore, the display order of the cards in the floating window of the electronic device is also the same.
[0066] By displaying the latest card and hiding the card with the earliest acquisition timestamp, the clipboard data collected most recently is presented to the user, improving the user experience.
[0067] When displaying a card corresponding to new data (such as the first card), the card with the earliest acquisition timestamp can also be hidden at the same time. The two can be synchronized to achieve a scenario where one card gradually hides and the other card gradually shows. It can be understood that the two can also be one after the other, and after one card is completely hidden, the other card is displayed.
[0068] It should be noted that for different electronic devices, the same first preset number or different first preset numbers can be set.
[0069] In combination with the first aspect, in a possible implementation, the first floating window includes a card display progress bar, and the card display progress bar is used to indicate and adjust the display progress of the cards in the first floating window; the method further includes: the first electronic device responds to a drag operation on the card display progress bar and displays the hidden cards in the first floating window.
[0070] In some embodiments of the present application, when the number of cards displayed in the floating window reaches the upper limit, the first displayed card is also hidden. There is also a card display progress bar for positioning the cards in the first floating window, and the user can perform a drag operation or a scroll operation on the card display progress bar to display other hidden cards. This facilitates the user to view all the cards and improves the user experience.
[0071] In combination with the first aspect, in a possible implementation manner, the upper limit of the collected clipboard data in the first clipboard is a second preset quantity; before collecting the first clipboard data obtained by the first clipboard operation in the first clipboard, the method further includes: if the number of the collected clipboard data in the first clipboard of the first electronic device reaches the second preset quantity, the earliest collected clipboard data is deleted.
[0072] In some embodiments of the present application, the storage space of the first clipboard is limited, that is, the number of the clipboard collection data is limited, and the second preset quantity can be a positive integer, for example, 10, 20, 30, etc. When new data needs to be collected, if the number of the collected clipboard data in the clipboard reaches the upper limit, the earliest collected clipboard data needs to be deleted and the new data needs to be collected. The earliest collected clipboard data refers to the clipboard data with the earliest acquisition timestamp among the collected clipboard data. This example sets the upper limit of the first clipboard, deletes the old data, and collects the new data to improve the resource utilization rate.
[0073] It should be noted that for different electronic devices, the same second preset quantity or different second preset quantities can be set.
[0074] In a second aspect, a computer device is provided. The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the methods involved in the first aspect or any one of the implementation manners of the first aspect are implemented.
[0075] In a third aspect, the present application provides a cross-terminal interaction system, which includes a first electronic device and a second electronic device. The first electronic device and the second electronic device execute the methods involved in the first aspect or any one of the implementation manners of the first aspect.
[0076] In a fourth aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium, and when they run on a computer, the computer is made to execute the methods involved in the first aspect or any one of the implementation manners of the first aspect.
[0077] Fifth aspect, an embodiment of the present application provides a chip system, which can be applied to an electronic device. The chip system includes one or more processors, and the processor is configured to call computer instructions to cause the electronic device to execute the method described in the first aspect or any implementation manner of the first aspect.
[0078] Sixth aspect, there is provided a computer program product containing instructions, which when running on a computer, causes the computer to execute the method involved in the first aspect or any implementation manner of the first aspect.
[0079] It can be understood that the electronic device in the fourth aspect, the fifth aspect, and the sixth aspect can refer to the electronic device provided in the second aspect, that is, it can refer to the first electronic device or the second electronic device in the first aspect.
[0080] It can be understood that the electronic device provided in the above second aspect, the cross-terminal interaction 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 manner of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of any possible implementation manner in the above first aspect, and will not be elaborated here. Description of the Drawings
[0081] Figure 1 Schematic diagram of multiple devices under the same trust ring provided by the present application;
[0082] Figure 2 Schematic diagram of the structure of a terminal provided by an embodiment of the present application;
[0083] Figure 3 Block diagram of the software system of a terminal provided by an embodiment of the present application;
[0084] Figure 4 Schematic diagram of the clipboard in the collection space application provided by the present application;
[0085] Figure 5 Status and display style of the clipboard provided by the present application;
[0086] Figure 6 Schematic diagram of a floating window provided by the present application;
[0087] Figure 7 Schematic diagram of collecting clipboard data provided by the present application;
[0088] Figure 8 Another schematic diagram of a floating window provided by the present application;
[0089] Figure 9Schematic diagram of a card provided by this application;
[0090] Figure 10 Schematic diagram of another floating window provided by this application;
[0091] Figure 11 Schematic diagram of a pop-up window provided by an embodiment of this application;
[0092] Figure 12 Schematic diagram of a clipboard data provided by this application;
[0093] Figure 13 Schematic diagram of another favorite clipboard data provided by this application;
[0094] Figure 14 Schematic diagram of using clipboard data provided by this application;
[0095] Figure 15 Exemplary flowchart of a cross-terminal interaction method provided by an embodiment of this application;
[0096] Figure 16 Exemplary flowchart of another cross-terminal interaction method provided by an embodiment of this application;
[0097] Figure 17 Schematic diagram of a clipboard provided by an embodiment of this application;
[0098] Figure 18 Exemplary flowchart of another cross-terminal interaction method provided by an embodiment of this application. Detailed implementation
[0099] To make the objectives, technical solutions, and advantages of this application clearer, the following will further describe in detail the implementation manners of this application with reference to the accompanying drawings.
[0100] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can represent A or B; the "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, for the convenience of clearly describing the technical solutions of this application, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words such as "first" and "second" do not limit the quantity and execution order, and the words such as "first" and "second" do not necessarily limit to be different.
[0101] For ease of understanding, first, the nouns involved in the embodiments of this application are described.
[0102] 1. Materials, which may include various types of information such as text, graphics, images, videos, web pages, etc. in this application; among them, the image can be a static image or a dynamic image, and this application does not make any limitations in this regard.
[0103] 2. Native Clipboard. The native clipboard is an area in memory used to temporarily store cut and copied information. After the user performs a cut or copy operation, the cut or copied information is first saved on the native clipboard. Then, if it is detected that the user performs a paste operation, the information saved on the native clipboard is pasted at the corresponding position. Subsequently, if other information is cut or copied again, the content saved on the native clipboard will be updated to the other information, that is, the native clipboard only saves the latest cut or copied information. When the user pastes, only the information saved latest in the native clipboard can be pasted.
[0104] 3. Trust ring and trusted devices. In this application, it means that multiple electronic devices pass a trusted authentication and are connected to the same local area network or directly connected (such as establishing a Wi-Fi direct connection or a Bluetooth connection), and have the ability to communicate with each other, that is, these electronic devices form a trust ring. The electronic devices within this trust ring can be managed collaboratively and share resources. In this application, the electronic devices within this trust ring can implement functions such as cross-device reuse and collection of materials.
[0105] The electronic devices can perform trusted authentication through any one of the following methods to establish a trust relationship and form a trust ring: 1) Log in to the same account on two or more electronic devices. The electronic devices under the same account perform trusted authentication through the account to establish a trust relationship and form a trust ring. 2) Two or more electronic devices perform trusted authentication through a private protocol to establish a trust relationship and form a trust ring; 3) Two or more electronic devices perform trusted authentication by logging in to the cloud to establish a trust relationship and form a trust ring. The above several methods are only examples, and this application does not make any limitations in this regard.
[0106] It is understandable that the electronic device in the present application can be an electronic device such as a mobile phone, a tablet computer, etc., and can also be a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device (such as a smart watch, a smart bracelet, etc.), a vehicle-mounted device, a smart home device (such as a smart TV, a large screen, etc.) and / or a smart city device. The specific type of the electronic device in the embodiments of the present application is not particularly limited.
[0107] Exemplarily, as Figure 1 shown, for example, devices such as mobile phones, tablets, desktop computers, laptop computers, smart TVs, etc. can log in to the same account and access the same local area network to form a trust ring. In the trust ring, the current task of the mobile phone can be continued on the coordinated device, such as continuing to watch the video on the mobile phone on the smart screen, etc., or easily browsing and editing the files on the mobile phone on the computer.
[0108] A certain terminal device in the trust ring can be called a trusted device of other devices. That is to say, through trusted authentication, the terminal devices with a trust relationship are called trusted devices. For example, the mobile phone and the tablet in the same trust ring can be called 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 the present application will be introduced.
[0110] The native clipboard on an electronic device provides one-time copy and paste. That is, after a copy operation is performed on the local device, if another copy operation is executed, the content saved in the native clipboard will be updated to the latest copied data, resulting in the data pasted on the local device or the peer device being only the latest copied data, that is, the last copied data or the most recently copied data. If continuous copying is required on the local device, the data copied each time needs to be pasted in a timely manner before the next copy operation is performed. Otherwise, the previously copied data in the native clipboard will be overwritten. Only the last copied data is provided during pasting. If continuous pasting is performed on the local device or the peer device, the data pasted will be the last copied data. That is to say, the native clipboard can only save the most recently (or last) cut or copied data. If a copy operation is performed and then another copy operation is executed, the data saved last time in the native clipboard will be overwritten by the data copied again. The electronic device cannot use the native clipboard to achieve continuous pasting of multiple pieces of data. In a cross-device scenario, often very complicated steps are required to achieve sharing of clipboard data.
[0111] Aiming at the technical problem that the native clipboard on an electronic device provides one-time copy and paste and cannot achieve multiple collections and sharing of different data, this application can collect the data copied or cut by the user to the native clipboard into a specific clipboard (that is, an additional clipboard in the electronic device), and provide a convenient entry (that is, a floating window displayed on the interface of this device) for the user to view and reuse on the local device, improving the data usage efficiency. At the same time, the clipboard data collected on the local device can be synchronized to other devices. The data copied or cut multiple times by the user to the native clipboard and collected on the local device can be collected and displayed on other devices in the ring, and then viewed and used, realizing cross-device sharing of clipboard data, improving the sharing efficiency of cross-device processing of clipboard data, facilitating user reuse, and improving the user experience. Moreover, if there is a paste event on the local device or other devices, the clipboard data on the local device can be directly reused to achieve instant data pasting and improve the data usage efficiency.
[0112] In this application, the electronic device can listen for clipboard events on the local device through a system service process, such as the Android system signature process. After detecting new data, it saves the data that the user has most recently copied or cut to the native clipboard. At the same time, using the same-account near-field trust ring capability, it broadcasts the clipboard event to other devices, thus realizing synchronization of the clipboard data collected on the local device to other devices. After a certain period of time, other devices can view and use the clipboard data synchronized from the local device through the convenient entry (that is, a floating window displayed on the interface of that device).
[0113] The cross-terminal interaction method provided by the embodiments of this application is applied to scenarios where multiple electronic devices interact with each other. The electronic device can be a terminal such as a mobile phone, a tablet computer, a camera, a smart wearable device, etc., and the embodiments of this application do not make any limitations in this regard. Next, taking the electronic device as an example of a terminal for illustration.
[0114] Figure 2 It is a schematic structural diagram of a terminal provided by the embodiments of this application. Refer to Figure 2 , the 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 interface 170D, a sensor module 180, a key 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] Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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 can be understood that the structure schematically shown in the embodiments of this application does 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 shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0117] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0118] Among them, the controller may be the nerve center and command center of the terminal 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0119] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called 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 the terminal 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.
[0121] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the terminal 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0122] The mobile communication module 150 may provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to 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 may receive electromagnetic waves through the antenna 1, filter, amplify, and perform other processing on the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 may be provided 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 provided in the same device.
[0123] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
[0124] The wireless communication module 160 may provide solutions for wireless communications applied to the terminal 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.
[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 technologies.
[0126] The terminal 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. 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 for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0127] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt 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 MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal 100 may include one or N display screens 194, where N is an integer greater than 1.
[0128] The terminal 100 can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0129] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.
[0130] The internal memory 121 can be used to store computer-executable program codes, and the computer-executable program codes include instructions. The processor 110 executes various functional applications and data processing of the terminal 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the terminal 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0131] The terminal 100 can implement audio functions, such as music playback, recording, etc., through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor, etc.
[0132] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor may include at least two parallel plates having conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the pressure threshold acts on the short message application icon, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
[0133] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The 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 the display screen 194. In some other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal 100, at a different position from the display screen 194.
[0134] It should be noted that the above Figure 2 shown schematic diagram of the structure of the terminal may be the schematic diagram of the structure of any device in the same trust ring.
[0135] Next, the software system of the terminal 100 will be described.
[0136] The software system of the terminal 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, the Android system with a layered architecture is taken as an example to exemplarily describe the software system of the terminal 100.
[0137] Figure 3It is a block diagram of a software system of a terminal 100 provided by an embodiment of the present application. The software system of the terminal may adopt a hierarchical architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Taking the Android system with a hierarchical architecture as an example, the embodiment of the present application exemplarily illustrates the software structure of the terminal.
[0138] See Figure 3 , the hierarchical architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely the application layer, the application framework layer, the Android Runtime and the system layer, and the kernel layer.
[0139] The application layer may include a series of application packages. As Figure 3 shown, the application packages may include a collection space, social applications, shopping applications, news applications, game applications, communication applications, etc. Among them, the collection space also includes a clipboard for collecting clipboard data. The application packages may also include microfilm applications, cameras, galleries, calendars, calls, maps, navigation, WLAN, Bluetooth, music, videos, text messages and other applications.
[0140] The data collected in the collection space can be displayed in a floating window. The floating window only occupies a part of the entire screen of the electronic device. The floating window can float on the side above the page corresponding to the application, without affecting the normal use of the application. For example, when the electronic device displays the interface of a chat application, it can also run the collection space application to complete material collection or pasting.
[0141] Among them, the following operations can be completed in the application layer of the first electronic device: opening a certain application, such as a social application, a shopping application, a news application, a game application, a communication application, etc., and displaying it on the interface, and the user performs a copy operation or a cut operation on the materials in the application; displaying the collected clipboard data for the user to view; and using the clipboard data in the editable area.
[0142] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. As Figure 3As shown in the figure, the application framework layer includes the System Server, clipboard, native clipboard, and switching component. The native clipboard is the native system clipboard in the electronic device and can be regarded as a tool (Clip board Manager) for managing the clipboard. It provides a clipboard interface to other applications, and other applications can call this interface to implement listening for clipboard events. The native clipboard has the function of saving the last copied data, cut data, or pasted data. The clipboard in this application is a container provided in this application for collecting multiple clipboard data. This application reuses the function of the native clipboard and saves the one-time clipboard data stored in the native clipboard in the clipboard in a non-overwriting manner.
[0143] The System Server is used to start the system service process. The system service process registers a clipboard listener to listen for clipboard events. When the system service process detects a clipboard event, it launches the switching component. The switching component is used to obtain clipboard data and establish a connection with other devices through the communication component in the core layer. The operations of the above application layer trigger the system service process to launch the clipboard on the one hand; on the other hand, they trigger the system service process to launch the switching component, and the triggering event is completed in the application framework layer.
[0144] The application framework layer may also include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make this data accessible to application programs. This data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to construct the display interface of an application program. The display interface can be composed of one or more views. For example, it includes a view for displaying a text message notification icon, a view for displaying text, and a view for displaying pictures. The phone manager is used to provide the communication function of the terminal 100, such as the management of call states (including connection, disconnection, etc.). The resource manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables application programs to display notification information in the status bar. It can be used to convey notification-type messages, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that the download is completed, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as the notification of a background-running application program. The notification manager can also be a notification that appears on the screen in the form of a dialogue window, such as prompting text information in the status bar, emitting a prompt tone, vibrating the electronic device, flashing the indicator light, etc.
[0145] Android Runtime includes a core library and a virtual machine. Android Runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the 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: surface manager, Media Libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc. The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media library supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is the drawing engine for 2D drawing.
[0147] The kernel layer is the layer between hardware and software. The kernel layer includes communication components. Communication channels are established between the communication components of the device for data transmission. The application framework layer is connected to the kernel layer through a bottom layer channel. After the switching component in the above application framework layer is pulled up, a communication connection is established with the communication component of the kernel layer of the electronic device on the other side through the communication component of the kernel layer.
[0148] The kernel layer can also include display drivers, camera drivers, audio drivers, and sensor drivers, etc.
[0149] Furthermore, in this application, communication channels can be established between multiple electronic devices through the communication components of the kernel layer, and cross-terminal collection and sharing of clipboard data can be achieved through the established communication channels. For example, a communication channel is established between the first electronic device and the second electronic device through the communication components of the kernel layer. The communication components are in a resident state and can listen for messages in real time, and the communication components communicate with each other. In the second electronic device, the kernel layer is also connected to the application framework layer through a bottom layer channel. On the one hand, the communication component of the kernel layer in the second electronic device pulls up the switching component of the application framework layer to achieve cross-terminal paste of clipboard data; on the other hand, the communication component of the kernel layer also pulls up the clipboard of the application framework layer to achieve cross-terminal synchronization of clipboard data. And the paste operation and synchronization operation trigger the interface display of the collection space in the application layer of the second electronic device.
[0150] It should be noted that the above Figure 3 block diagram of the software system of the terminal shown can be the block diagram of the software system of any device in the same trust ring.
[0151] Next, in combination with Figure 4 the clipboard in the collection space application provided by this application will be described.
[0152] The collection space application is a management application (Application, APP) with functions such as collecting and sharing any type of material. That is, users can meet the needs of collecting and sharing materials through the collection space application. Further, the collection space application can be built into a personal learning space, work space, etc. The data retention rule in the collection space application can be permanent retention.
[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 is different from the native clipboard. The native clipboard is the native system clipboard in an electronic device, which has the function of saving the last copied data, cut data, or pasted data. The clipboard in this application is a container provided in this application for collecting multiple clipboard data. For the sake of distinction, the native system clipboard in the electronic device is called the native clipboard in this application, and the clipboard for collecting multiple clipboard data is called the clipboard.
[0155] The clipboard data collected in the clipboard can be displayed in the floating window corresponding to the clipboard in the form of cards, and all or part of each clipboard data is displayed in each card. Among them, the clipboard is a function in the collection space application for collecting clipboard data, and the clipboard data in the clipboard can indicate text (such as web page links, plain text, etc.), images, etc. The image can be a static image (such as a picture), or a dynamic image (such as an animation or a video, etc.).
[0156] As an example, the process for a user to enter the clipboard can be as Figure 4 shown. As shown in Figure A in Figure 4 , the user opens the collection space APP, or the electronic device starts the collection space APP in response to the user's copy operation or cut operation on the material. The collection space APP is displayed as a floating window, and the upper right corner of the floating window can include three dots for indicating the "more" control. Figure 4 The floating window shown in Figure A in Figure 4 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 Figure A in Figure 4In the display interface shown in Figure C, the electronic device can display options below the "More" control, and the options include, but are not limited to, "Enter Full Screen", "Clipboard", "Add to Desktop", "Settings", and "Close" options. That is, when the user clicks or presses the "More" control at the top of the floating window of the Favorites Space APP, the electronic device responds to this click or touch operation and presents more functions to the user. As Figure 4 As shown in Figure D, the user can select the "Clipboard" option. The clipboard is a functional module in the Favorites Space APP for collecting multiple clipboard data. As Figure 4 As shown in Figure E, the electronic device responds to the selected operation and enters the clipboard, that is, it displays the floating window corresponding to the clipboard. The floating window includes the data collected in the clipboard through copy or cut operations. The selected operation can be a click operation or a touch operation. The above is the process of entering the clipboard through the Favorites Space APP in this application.
[0157] The native clipboard, as the disposable storage space of the electronic device, only retains the last clipboard data, and new data will overwrite the previous clipboard data. The data stored in the native clipboard can include: package name (indicating the application process that writes the data), user identifier (indicating whether it is the primary user or the secondary user), device identifier, and clipboard data. According to the package name and device identifier, it can be known which application process of which electronic device the data comes from.
[0158] The clipboard in this application is a storage container for the electronic device to collect multiple clipboard data, used to collect the clipboard data from the native clipboard, and new data will not overwrite the previous clipboard data. That is, the clipboard can collect the data copied or cut into the native clipboard multiple times.
[0159] The floating window can also include other controls, such as three dots indicating the "More" control and a back control to go back to the previous level of the clipboard. Among them, the previous level of the clipboard is the Favorites Space APP.
[0160] The embodiments of this application only take the clipboard as an example of a functional module of the Favorites Space application. It should be understood that the clipboard can also correspond to an independent application, that is, it can directly enter the clipboard through a click operation, or the clipboard is triggered to start by a clipboard operation, and then the clipboard data is collected through the clipboard. The embodiments of this application do not limit this.
[0161] It can be understood that the clipboard can also be entered through other entrances. For example, the Favorites Space application can display an icon corresponding to the clipboard in the relevant interface, and the user can enter the clipboard by clicking the icon. The embodiments of this application do not limit the entrances to the clipboard.
[0162] During the process of a user using the clipboard of the Favorites Space APP, it can present various forms to distinguish and indicate that the electronic device is in different processing stages or performing different processes. For example, the forms of the clipboard can include a hidden state and a floating state, etc. These are only for illustrative naming purposes. For example, the hidden state can also be called the minimized state, and the floating state can also be called the distribution state. This application does not make any limitations in this regard.
[0163] Among them, the hidden state of the clipboard is used to indicate that the clipboard has been called by the foreground or is running in the background; the floating state is used to display the data collected in the clipboard in a floating window on the current display interface.
[0164] Optionally, the shape of the hidden state of the clipboard can be a vertical bar. For example, when the clipboard is in the hidden state, the hidden window can be presented by adhering to the inner side of the screen edge, as Figure 5 shown by the hidden window a. At this time, when the hidden window a is at the inner side position of the screen edge, it will not affect the user's normal viewing of the displayed content. The hidden window can be a vertical bar, and visually it will not 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 side of the screen edge described in the embodiments of this application can specifically be the upper side, lower side, left side, or right side of the inner side of the edge. This application does not make any limitations in this regard.
[0166] It should be noted that the clipboard can be switched from the hidden state to the floating state, and vice versa, it can also be switched from the floating state to the hidden state. Optionally, this switch can be an animation effect such as scrolling or stretching. For example, the hidden window a of the clipboard can be switched to the floating window b with a gradually stretching animation effect from a vertical bar. This is only an example here, and this application does not make any limitations in this regard. Of course, the clipboard can also be expanded to a full-screen state, and 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 the user needs to view the content displayed on the interface of the electronic device, the user can click or touch other areas on the interface except the floating window to switch the clipboard from the floating state to the hidden state and display it at the position of the inner side of the screen edge of the electronic device. When the user needs to view or use the clipboard data in the clipboard, the user can click or touch the hidden window of the clipboard to switch the clipboard from the hidden state to the floating state.
[0168] Optionally, each piece of clipboard data in the clipboard collection is displayed in the floating window in the form of a card. The floating window of the clipboard can be combined with the size and shape of the electronic device and displayed in different areas of the screen in different styles. The floating window is a small window in the interface, which does not occupy 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 in a long strip or a horizontal strip on the side of the screen without interfering with the normal use of the user. For example, the floating window b of the clipboard can specifically include two display styles. One is a long strip, such as the floating window b1 shown in Figure 5 ; the other is a horizontal strip, such as the floating window b2 shown in Figure 5 . The order of the corresponding display cards in the long-strip floating window b1 and the horizontal-strip floating window b2 is the same. The floating window b1 and the floating window b2 can be presented in the effect of adhering to the inner side of the edge of the display screen when displayed, so as to avoid interfering with the currently displayed content. The floating window b1 and the floating window b2 also include a card display progress bar, and the card display progress bar is used to indicate and adjust the display progress of the card.
[0169] It should be noted that during the use of the clipboard, although it will switch between multiple forms, each form of the clipboard is at the top layer (or called on top) of the multiple display layers included in the display interface and is not covered or affected by the content displayed below.
[0170] The cross-terminal interaction method provided by the present application will be described below in combination with the above clipboard. Multiple electronic devices in the same trust ring can implement the application scenarios shown in Figures 6 - 12 .
[0171] Figure 6 The A diagram in Figure 6 , the B diagram in Figure 6 and the C diagram in
[0172] show the cards currently displayed in the floating windows of a mobile phone, a tablet and a computer in the same trust ring. Each card displays all or part of each piece of clipboard data. Among them, a long-strip floating window is used to display the cards in the mobile phone and the computer, and a horizontal-strip floating window is used to display the cards in the tablet. The order of the cards displayed in the floating windows of the three is the same. Each floating window also includes a card display progress bar.
[0173] The electronic device can support collecting clipboard data through the clipboard on the local side. The electronic device can also support broadcasting the monitored clipboard events to other devices in the same trusted ring, so that when other devices monitor the paste event in a short time, they can directly paste the clipboard data of the local side. After the local side collects the clipboard data, the electronic device can also support synchronizing the clipboard data, the application source identifier of the clipboard data, and the device source identifier across devices to the clipboard of the trusted device for display and use. Among them, the trusted device can be one or more.
[0174] Exemplarily, the user can perform a copy or cut operation on any electronic device in the ring. New data (e.g., copied text) appears on the native clipboard of the electronic device, triggering the clipboard to collect the new data in the native clipboard. Taking the electronic device as a mobile phone as an example, as Figure 7 shown in FIG. A in Figure 7 FIG. A in Figure 7 shows a copy operation on the text of any website in the mobile phone. The user can select all or part of the text in the current interface through a long press operation or a double click operation. Figure 7 The selected text is shown in gray in FIG. A in Figure 7 In response to the long press operation or double click operation, as shown in the display interface in FIG. B in Figure 7 a option window pops up. The option window includes but is not limited to buttons such as copy, cut, search, and cancel. As shown in FIG. C in
[0175] It should be noted that Figure 7 FIG. A in Figure 7 FIG. C in Figure 7 FIG. A in Figure 7 FIG. C in Figure 7 FIG. A in Figure 7 FIG. C in Figure 7 the clipboard is shown as a hidden window. It can be understood that
[0176] Based on the above Figure 7The most recently collected text in the clipboard of the mobile phone in Diagram D is synced by the mobile phone to the clipboards of the tablet and computer within the same trusted ring. When the clipboard data collected in the clipboards of the tablet and computer within the same trusted ring changes, the cards displayed in the floating window change. As shown in Figure 8 Diagram A, on the right side of the floating window of the computer, the most recently collected text in the mobile phone is displayed in the form of a card. As shown in Figure 8 Diagram B, below the floating window of the tablet, the most recently collected text in the mobile phone is displayed in the form of a card.
[0177] Next, based on the above Figures 6 - 9 the display form of the cards in the floating window will be introduced.
[0178] Since the display area in the interface of the electronic device is limited, therefore, in the interface of the electronic device, multiple clipboard data are collected in the clipboard, and a limited number of clipboard data are displayed in the floating window, and other clipboard data are hidden. For the hidden clipboard data, the progress bar of the card display can be realized by dragging or scrolling, so as to realize the rotation display of the cards. Each clipboard data is partially or fully displayed in the floating window in the form of a card.
[0179] Since the display area in the interface of the electronic device is limited, the data displayed in the card is limited. For the case where the clipboard data indicates text, all characters of the text, or the first few characters, keywords, middle few characters, or last few characters in the text can be displayed in the card. As shown in Figure 7 Diagram D, the clipboard data is "The light is yellowish and the clouds are very soft, suitable for shooting sunrise, backlight, and silhouette portraits". What the card corresponding to the clipboard data shows is "The light is yellowish and the clouds are very soft, suitable for shooting sun".
[0180] For the case where the clipboard data indicates an image, the image can be directly displayed, or a thumbnail of the image can be displayed, or a part of the image can be displayed. The part of the image can be a screenshot of the upper left corner, upper right corner, lower left corner, lower right corner, or the middle part of the image. The partial characters and partial images displayed in the floating window are for illustration and may not be the complete data of the clipboard data.
[0181] Each piece of clipboard data in the clipboard also includes one or more pieces of information such as a device source identifier, an application source identifier, and an acquisition timestamp. When synchronizing data, the device source identifier, the application source identifier, the acquisition timestamp, and other information are also synchronized. The device source identifier indicates which electronic device generated this piece of clipboard data, the application source identifier indicates in which application this piece of clipboard data was copied or cut, and the acquisition timestamp indicates the time when this piece of clipboard data was first acquired in the electronic device. The device source identifier and the application source identifier can be displayed on the card. The device source identifier is displayed in the upper left corner of the card, and the application source identifier is displayed in the lower right corner of the card. It should be understood that the device source identifier and the application source identifier can also be displayed at other positions on the card. For the newly added data on this electronic device, the device source identifier may not be added. As Figure 7 shown in Figure D of Figure 7 , the application source identifier of the text corresponding to the latest collection in the floating window of the mobile phone is displayed in the lower right corner of the card. As Figure 8 shown in Figure A of Figure 8 , the application source identifier of the text is displayed in the lower right corner of the card of the latest collection in the floating window of the computer, and the device source identifier of the text is displayed in the upper left corner of the card. This device source identifier indicates the mobile phone. Similarly, as Figure 8 shown in Figure B of Figure 8 , the application source identifier of the text is displayed in the lower right corner of the card of the latest collection in the floating window of the tablet, and the device source identifier of the text is displayed in the upper left corner of the card. This device source identifier indicates the mobile phone. Of course, this is only an example here, and it can also be displayed in other forms. The present application does not limit this.
[0182] Here, the device source identifier and the application source identifier can be set at any two different positions among the upper left corner, the lower left corner, the upper right corner, or the lower right corner of the card. The present application does not limit this.
[0183] When multiple pieces of clipboard data are displayed in the form of cards in the floating windows of different electronic devices, they can be sorted according to the acquisition timestamp of this piece of clipboard data. The acquisition timestamps of the same cards in the ring electronic devices are the same. Therefore, the display order of the cards in the floating windows of each electronic device is also the same, such as the cards in the floating window shown above Figure 6 and the cards in the floating window shown above Figure 7 and Figure D of Figure 7 , Figure 8 and the cards in the floating window shown above
[0184] It should be noted that if the display effect of the card appears from the bottom of the floating window, the clipboard data with the timestamp closest to the current moment (i.e., the newly added data) will be obtained and displayed as a card at the bottommost position. Correspondingly, the other cards located at the topmost position will be hidden. If the display effect of the card appears from the right side of the floating window, the clipboard data with the timestamp closest to the current moment (i.e., the newly added data) will be obtained and displayed as a card at the rightmost position. Correspondingly, the other cards located at the leftmost position will be hidden.
[0185] Due to the limited display area of the interface and the limited number of cards that can be displayed in the floating window, the upper limit of the number of cards displayed in the floating window can be appropriately set by those skilled in the art according to the size of the electronic device. When it is necessary to display the card corresponding to the newly added data, if the number of cards already displayed in the floating window reaches the upper limit, as shown in Figure A of Figure 6 , it is necessary to hide the card that was displayed first and simultaneously display the card corresponding to the newly added data. As shown in Figure A of Figure 6 and Figure D of Figure 7 , as shown in Figure D of Figure 7 , the newly added data of the clipboard collection in Figure D is based on Figure A of Figure 6 . Since the display order of the cards in the floating window can be sorted according to the acquisition timestamp of the cards, therefore, the card with the earliest acquisition timestamp can be hidden here. In the floating window of Figure D of Figure 7 , the topmost card in Figure A of Figure 6 is hidden. The newly added data is displayed as a card at the bottommost position of the floating window in Figure D of Figure 7 .
[0186] Figure 6 From Figure A to Figure 7 The form of hiding and displaying the cards in Figure D can be that the clipboard directly Figure 7The interface presented in Diagram D is shown to the user, without showing the process of hiding and displaying. It is also possible to show the user the process of hiding and displaying. For example, the card at the top of the floating window gradually hides, and at the same time, the card corresponding to the newly added data gradually shows at the bottom of the floating window until the card at the top of the floating window is completely hidden. At this time, the card corresponding to the newly added data is completely shown at the bottom of the floating window. Of course, it can also be that when the upper boundary of the topmost card reaches the upper edge of the floating window, it directly completely hides, and the two middle cards and the card corresponding to the newly added data move upward at the same time, and the card corresponding to the newly added data gradually shows at the bottom of the floating window until it moves to be completely shown. Of course, it can also be that when the upper boundary of the topmost card reaches the upper edge of the floating window, it directly completely hides, and the two middle cards move upward at the same time until they reach the upper edge, and the card corresponding to the newly added data is directly completely shown at the bottom of the floating window. The present application does not limit the form of hiding and displaying the cards.
[0187] Since the display area in the interface of the electronic device is limited, the data displayed in the card is limited. One card in the floating window may display part of the data of a clipboard data. The user can click or touch the card to magnify it, so as to view the complete data of the clipboard data. As Figure 9 shown in Diagram A in Figure 9 response to the user's click or touch operation on the card, the electronic device displays the complete data of the clipboard data as shown in Diagram B in
[0188] When the number of cards already shown in the floating window reaches the upper limit, the card that was shown first will also be hidden. There will be a card display progress bar in the floating window. This card display progress bar is used to indicate and adjust the display progress of the cards. The user can drag or scroll the card display progress bar to display other hidden cards. As Figure 10 shown in Diagram A in Figure 10 response to the user's drag operation, the mobile phone determines the drag displacement according to the drag direction corresponding to the drag operation, and moves the cards in the floating window according to the drag displacement to realize the rotation display of the cards. As Figure 10 shown in Diagram B in
[0189] It should be noted that for the hiding or displaying method of the card, the card can be hidden and displayed as a whole. For example, when the bottommost card reaches the lower edge of the floating window, it skips the gradual hiding process and is directly hidden completely. At the same time, the two middle cards move down until they reach the lower edge, and the hidden card is directly and completely displayed at the topmost of the floating window. Of course, it can also be that when the bottommost card reaches the lower edge of the floating window, it is directly hidden completely, and the two middle cards and the hidden card move down simultaneously. The hidden card is gradually displayed at the topmost of the floating window until it is completely displayed. The form of hiding and displaying the card in this application is not limited.
[0190] Next, the relationship between the clipboard in this application and the native clipboard will be introduced.
[0191] Basic principle of the native clipboard: The native clipboard is actually an application programming interface (API) interface opened to developers in the operating system. The operating system can include the IOS system and the Android system. In the Android system, it is displayed in the form of a clipboard interface, and in the IOS system, it is displayed in the form of a user interface pasteboard interface. Third-party applications in the electronic device can call the interface of the clipboard event to obtain clipboard access permission, register a listener, and monitor the clipboard event. The clipboard event includes cut, copy, and paste. When the clipboard event occurs and the third-party application is open, the third-party application monitors the clipboard event through the listener and triggers a clipboard access notification. The third-party application will display the clipboard access notification to the user. For example, a pop-up window will appear at the top or bottom of the screen, and the clipboard access notification will be displayed in the pop-up window. This clipboard access notification is used to inform the user that the native clipboard has been accessed. For example, this clipboard access notification usually includes the name of the application so that the user can know which application has accessed the native clipboard. For example, Application A is accessing the clipboard (this clipboard refers to the native clipboard), or the content in the clipboard (this clipboard refers to the native clipboard) has been pasted into Application A. As Figure 11 shown, Figure 11After the user copies or cuts data and then opens the micro film application to create a micro film, a pop-up window will appear in the micro film application. A clipboard access notification "The content in the clipboard (the clipboard here refers to the native clipboard) has been pasted into the micro film application" is displayed in this pop-up window. If the user needs to paste the copied or cut data on the native clipboard, the user can click or touch the clipboard access notification to paste the clipboard data. The native clipboard is disposable and only stores the last copied or cut data. Within a period of time after the user copies or cuts data, if the user also performs a paste operation, 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 of the present application is a system process with a relatively high level and can obtain the clipboard access non-notification permission. The clipboard access non-notification permission refers to the permission not to trigger an access notification when accessing the clipboard. The system service process registers a clipboard listener and obtains the clipboard access non-notification permission. In this way, the system service process can monitor clipboard events through the registered clipboard listener. When it is monitored that the data on the native clipboard changes, if the user uses a third-party application, the third-party application will not display a clipboard notification to the user, and thus the monitoring of clipboard events can be achieved without disturbing the user.
[0193] The present application is used to collect clipboard data in the clipboard and synchronize it to other devices, and can be applied to scenarios where the user needs to collect data and share data across devices, and this application scenario does not require a third-party application to notify the user. Based on this, the system server starts the system service process, and the system service process registers a clipboard listener and obtains the clipboard access non-notification permission. Furthermore, when monitoring clipboard events through the clipboard listener, it is possible not to prompt the user when the user uses a third-party application, avoiding excessive prompting to disturb the user and improving the user experience.
[0194] The clipboard in the present application is a storage container for the electronic device to collect multiple clipboard data, used to collect clipboard data from the native clipboard, and the newly added data will not overwrite the previous clipboard data.
[0195] The storage space of the clipboard is limited, that is to say, the number of clipboard data that the clipboard can collect has an upper limit. Before the clipboard collects clipboard data, the clipboard also judges whether the number of currently collected clipboard data has reached the upper limit. If the number of clipboard data has reached the upper limit, it is impossible to continue collecting clipboard data in the clipboard, and it is necessary to delete the earliest collected clipboard data among the currently collected clipboard data. After deleting the earliest collected clipboard data, the clipboard can obtain the current clipboard data (that is, the newly added data) and save it.
[0196] The difference between the native clipboard and the clipboard in this application can be illustrated by Figure 12 Figure A in Figure 7 Figure D in Figure 12 and Figure B in Figure 12 Figure B in Figure 7 refers to the data on the native clipboard after the copy operation is performed on Figure C in Figure 12 In Figure A in Figure 12 at least four cards are displayed in the floating window, and there are also some hidden cards, indicating that the clipboard includes at least four pieces of clipboard data. The bottommost card in the floating window corresponds to the latest clipboard data. After the clipboard collects the latest clipboard data, the clipboard data collected before this is not overwritten and is still displayed in the form of cards. However, the data on the native clipboard in the electronic device is only the latest clipboard data, as shown in Figure 12 Figure B in
[0197] Next, in combination with Figure 13 Figure A in Figure 13 -Figure E in
[0198] this application's clipboard's collection of clipboard data obtained multiple times will be introduced. Figure 7 After the clipboard in Figure D above collects the clipboard data, the user can continue to collect clipboard data on the electronic device through cut or copy operations, and encapsulate the clipboard data into cards and display them in the floating window as the latest, as shown in Figure 13 Figure A in Figure 13 -Figure D in
[0199] When the user performs a copy or cut operation, essentially, the user clicks or touches an area on the interface other than the floating window. In this way, the clipboard can be switched from the floating state to the hidden state and displayed at a position inside the edge of the electronic device's screen. As shown in Figure 13 Figure A in Figure 13 the user performs a copy operation on the page displayed by any application in the mobile phone again. Figure 13 Figure A in Figure 13 shows the copy operation on the text of any file in the mobile phone. The user can select all the text or a part of the text in the current interface through a long press operation or a double click operation, Figure 13 which is shown in gray in Figure A inFigure 13 As shown in Figure D in , in response to the selection operation, the mobile phone stores the copied text in the clipboard, and the latest stored text is displayed in the form of a card at the bottom of the floating window.
[0200] It should be noted that Figure 13 the application shown in Figure A in and Figure 7 the application shown in Figure A in may be the same application or may not be the same application. The user can copy the displayed pages in the same application multiple times, or can perform multiple copies or cuts across applications, to achieve the storage of multiple clipboard data, Figure 7 and Figure 13 This is only an exemplary illustration, and the embodiments of the present application are not limited thereto.
[0201] The above Figure 13 Figure A in - Figure 13 the process of storing clipboard data shown in Figure D in is the same as the storage process of Figure 7 Figure A in - Figure 7 Figure D in .
[0202] In the present application, the user can perform copy or cut operations on the electronic device multiple times, and the copied or cut data is stored in the clipboard and updated and displayed in the form of a card in the floating window, achieving the storage of multiple copied or cut data, facilitating the user to view and use at any time, and improving the user experience.
[0203] The following describes the differences between the native clipboard and the clipboard in the present application with reference to Figure 13 Figure D in and Figure 13 Figure E in . Figure 13 Figure E in refers to Figure 13 the data on the native clipboard after the copy operation is performed in Figure C in . Figure 12 Figure B in refers to Figure 7 the data on the native clipboard after the copy operation is performed in Figure C in . The above Figure 13 Figure A in - Figure 13 Figure D in is to continue storing clipboard data after Figure 7 Figure D in . As can be seen from Figure 13 Figure E in , the native clipboard only retains the data of the most recent copy, Figure 13 Figure E in replaces Figure 12 the data on the native clipboard in Figure B in . Figure 13In the floating window in Figure D, at least four cards are displayed, and there are also some hidden cards, indicating that there are at least four pieces of clipboard data in the clipboard. The bottommost card in the floating window corresponds to the latest clipboard data. After the clipboard collects the latest clipboard data, the clipboard data collected before this is not overwritten. And the data on the native clipboard in the electronic device is only the latest clipboard data, as Figure 13 shown in Figure E in Figure 13 Figure E shows all the data on the native clipboard.
[0204] The following combines Figure 14 to introduce the paste of data in the clipboard.
[0205] For the clipboard of the first electronic device or the clipboard of the second electronic device, the cards in the floating window display all or part of the clipboard data. To facilitate the distinction between the clipboard data in the clipboard and the data displayed in the cards (which may be part of the complete data), here, the clipboard data in the clipboard is called the editing data, and this editing data is the complete data. Taking the user's use of clipboard data on a mobile phone as an example, after the user opens a certain application, an editing cursor can be displayed in the editing area on the interface, as Figure 14 shown in Figure A in Figure 14 For the case where the clipboard data indicates text, the user can drag the card to drag the clipboard data corresponding to the card in the clipboard to the editing area, as Figure 14 shown in Figure B in Figure 14 After dragging to the editing area, the user releases the card, and all the data of the clipboard data is displayed in the editing area, as
[0206] shown in Figure C in
[0207] and the editing cursor moves to the last position of the clipboard data to provide a starting position for the next paste. Further, after all the data of the clipboard data is displayed in the editing area, the clipboard is displayed as a hidden window, and the clipboard switches from the floating window to the hidden window, as
[0206] shown in Figure D in
[0207] to facilitate the user to view the pasted content. Or, after detecting that the user clicks on an area outside the clipboard, the clipboard can be switched from the floating state to the hidden state, and this application does not make any restrictions on this.
[0206] Of course, the user can also perform a selection operation on the card by double-clicking the card, long-pressing the card, etc., and then paste the clipboard data in the editing area. Or, the user can also select multiple cards in the clipboard and paste the clipboard data of multiple cards in the editing area at one time, and this application does not make any limitations on this.
[0207] It should be noted that for the case of the clipboard data indicating an image, the same paste method as that for text can be adopted. The difference between the two is that, usually, an image occupies more memory than text. The image needs to be stored in the device where the image itself comes from in the form of a distributed file, and only the image information of the image is synchronized when the clipboard is synchronized. The image information can include one or more of the thumbnail or partial screenshot of the image, the storage location information of the image, the device source identifier of the image, the application source identifier of the image, the acquisition timestamp of the image, etc. Among them, the distributed file storage method means that file-like data is stored in the source device. When synchronizing the file, only the file information is transmitted. When the user really wants to access this file, the source device where the file is located is used for transmission, access, and viewing.
[0208] For the image displayed in the floating window of the electronic device, if the device source identifier of the image indicates the electronic device itself, the image can be read through the storage location information of the image in the image information, so as to display the image in the editing area. If the device source identifier of the image indicates other electronic devices, when the user triggers the paste of the image, the electronic device needs to read the image from other electronic devices according to the device source identifier of the image, or the electronic device receives the image sent by other electronic devices, and then pastes the image in the editing area.
[0209] Taking the collection of clipboard data by the clipboard in the first electronic device as an example for illustration, the first electronic device is Terminal 1 and the second electronic device is Terminal 2. The following is combined with Figure 15 The process of collecting the data of the clipboard of the electronic device will be introduced.
[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 the system service process is started, it can register a clipboard listener and obtain the clipboard access non-notification permission. The system service process listens for clipboard events through the clipboard listener. When it is detected that the data on the native clipboard has changed, if the user uses a third-party application, the third-party application will not display a clipboard notification to the user, so that the monitoring of clipboard events can be realized without disturbing the user. The process description of the system service process registering the clipboard listener can be referred to above and will not be elaborated here.
[0212] It should be noted that S11 can be completed before executing the cross - terminal interaction method provided in this application. For example, when the electronic device restarts or powers on, the system service process registers a clipboard listener, or when the system server (systemserver) starts running, the system service process is started and the clipboard listener is registered. Of course, after the system service process registers the clipboard listener, the clipboard listener can be in a resident state and only needs to be registered once without re - registration. The embodiments of this application do not limit this.
[0213] S12. The user copies or cuts the material on the interface displayed by terminal 1.
[0214] Taking terminal 1 as a mobile phone for example, as shown in Figure A - Figure 7 in the above - mentioned Figure 7 Figure C, the user can first select some text in the material and then click the "Copy" button to copy the material.
[0215] S13. The system service process monitors that there is new data in the native clipboard through the clipboard listener.
[0216] The system service process monitors whether the clipboard data changes through the clipboard listener. The copy operation or cut operation will trigger a clipboard event, which causes the data in the native clipboard to change. The system service process can monitor that there is new data in the native clipboard, and the new data is the clipboard data.
[0217] S14. The system service process pulls up the clipboard.
[0218] There is new data in the native clipboard, indicating that the user has the intention to collect. The system service process pulls up the clipboard, that is, starts the clipboard in the collection space so that the clipboard can obtain the clipboard data from the native clipboard.
[0219] It should be noted that the clipboard is a container in the collection space application for collecting clipboard data. When the user performs an operation of dragging any data, they can enter the collection space and pull up the panel on the home page of the collection space, that is, display the floating window corresponding to the collection space for the user, that is, Figure A in the above - mentioned Figure 4 When the user performs an operation of copying or cutting any data, they directly enter the clipboard and pull up the panel on the home page of the clipboard, that is, display the floating window corresponding to the clipboard for the user, that is, directly display Figure E in the above - mentioned Figure 4 without first displaying Figure 4 Figure A in the above - mentioned and then displaying Figure 4 Figure E in the above - mentioned.
[0220] It should be noted that if the clipboard has been enabled before executing the cross - terminal interaction method provided in this application, then S14 does not need to be executed.
[0221] S15. The clipboard obtains clipboard data from the native clipboard and collects the clipboard data.
[0222] The system service process binds to the clipboard in the collection space of Terminal 1 by calling the bind service. The system service process listens for clipboard events through the registered clipboard listener. If it detects a change in the clipboard data (i.e., there is new data in the native clipboard), it calls the bind service to start (or launch) the clipboard of Terminal 1 through the bind service, so that the clipboard can obtain the current clipboard data (i.e., the new data) and save it.
[0223] If the clipboard is started for the first time, before collecting the current clipboard data, the clipboard can first perform an initialization process and then collect the clipboard data. If the clipboard has been enabled before executing the cross-terminal interaction method provided in this application, there is no need to perform the initialization process, and the clipboard data can be directly collected.
[0224] S16. The user copies or cuts the material again on the interface displayed on Terminal 1.
[0225] As shown in Figure 13 Figure A - Figure 13 Figure C in the above. The user can select some text in the material and then click the "Copy" button to copy the material again.
[0226] The material in S16 can be the same as the material in S12 or different materials.
[0227] S17. The system service process detects new data in the native clipboard within a preset time period.
[0228] Within a preset time period (e.g., 10s), the user performs a copy operation or a cut operation again, and the system service process detects 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] The notification message is used to indicate that there is new data in the native clipboard. The system service process sends the notification message to the clipboard through the binder to inform the clipboard that there is new data in the native clipboard.
[0231] S19. The clipboard obtains the current clipboard data from the native clipboard.
[0232] After the clipboard receives a notification message, it obtains the current clipboard data (i.e., newly added data) from the native clipboard and saves it.
[0233] Since there is an upper limit on the number of clipboard data collected in the clipboard, if the clipboard data collected in the clipboard exceeds the upper limit after saving the newly added data, the earliest collected clipboard data will be deleted, that is, the data with the earliest timestamp of obtaining the clipboard data will be deleted. It can also be that before saving the newly added data, if the clipboard data collected in the clipboard has reached the upper limit, the earliest collected clipboard data will be deleted to store the newly added data.
[0234] It should be noted that within a preset time period after pulling up the clipboard, if the system service process monitors that there is newly added data in the native clipboard, it will send a notification message to the clipboard. After the clipboard receives the notification message, it obtains the clipboard data from the native clipboard and collects the clipboard data. There can be one or more newly added data within the preset time period. Correspondingly, the collected clipboard data is one or more, that is to say, the execution times of S16 - S19 can be once or multiple times until the system service process does not monitor that there is newly added data in the native clipboard within the preset time period.
[0235] S20: The system service process does not monitor that there is newly added data in the native clipboard within the preset time period.
[0236] S21: The system service process closes the clipboard.
[0237] If the user does not perform copy or cut operations within the preset time period and the system service process does not monitor newly added data through the clipboard listener, at this time, the system service process calls the unbind service to unbind the clipboard in the collection space, thereby closing the clipboard. For example, the floating window corresponding to the clipboard exits and disappears from the sidebar, reducing resource consumption.
[0238] The following introduces the synchronization process of the cross - device clipboard of the electronic device through S22 - S29.
[0239] S22: When the preset synchronization opportunity 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 to synchronize the data in the clipboard of terminal 1 that has not been synchronized to terminal 2 to terminal 2.
[0241] The synchronization opportunities for the clipboards between electronic devices can include the following several types.
[0242] The clipboard of terminal 1 synchronizes data to the clipboard of terminal 2 immediately after collecting clipboard data. That is, when the collected clipboard data changes, it synchronizes data to the clipboard of terminal 2, improving the timeliness of data synchronization.
[0243] The clipboard of terminal 1 synchronizes data to the clipboard of terminal 2 after a period of time (such as 30s, 60s, etc.) of collecting clipboard data. The clipboard of terminal 1 saves the clipboard data. If a clipboard event is detected again within the preset time period, the clipboard of terminal 1 will also save the new data. Therefore, on the one hand, after a period of time of collecting clipboard data, the clipboard can package multiple clipboard data that have not been sent to terminal 2 and send them, improving the data synchronization efficiency. On the other hand, compared with the response and sending of other instant events, the priority of clipboard data synchronization is not that high. Therefore, the clipboard data does not need to be synchronized to terminal 2 immediately and can be synchronized after a period of time, improving the flexibility of data synchronization.
[0244] Terminal 1 and terminal 2 communicate with each other. In some scenarios, the data channel resources will be in a busy state. To avoid conflicts with the data channel resources of other events, the clipboard of terminal 1 can synchronize data to the clipboard of terminal 2 when the channel resources are idle, improving resource utilization and increasing the success rate of data synchronization.
[0245] After the clipboard of terminal 1 collects clipboard data, if terminal 2 is not in the loop or is in an offline state, the clipboard of terminal 1 cannot synchronize data to terminal 2 temporarily. After terminal 2 successfully enters the loop or terminal 2 goes online and establishes a connection with terminal 1, it triggers the clipboard of terminal 1 to synchronize data to the clipboard of terminal 2. In this way, the clipboard of terminal 2 can display the updated data in time, improving the comprehensiveness of data synchronization.
[0246] The clipboard of terminal 2 is not enabled or is in a sleep state, indicating that terminal 2 does not need to use the clipboard temporarily. When the clipboard of terminal 2 is started for the first time, the clipboard of terminal 1 synchronizes data to the clipboard of terminal 2.
[0247] The collection space of terminal 2 is in an open state, but the user has not operated on the collection space, indicating that terminal 2 does not need to use the functions of the collection space temporarily. When the user performs a pull-down update on the collection space, the clipboard of terminal 1 synchronizes data to the clipboard of terminal 2.
[0248] The collection space of terminal 2 is in an open state, but the user has not used the clipboard in the collection space, indicating that terminal 2 does not need to use the clipboard temporarily. When terminal 2 opens the clipboard in the collection space, the clipboard of terminal 1 synchronizes data to the clipboard of terminal 2.
[0249] It is understandable that Figure 15 only taking the data synchronization from the clipboard of terminal 1 to the clipboard of terminal 2 after a period of time (such as 30s, 60s, etc.) of collecting clipboard data as an example for illustration. Terminal 1 and terminal 2 can also perform data synchronization at any of the above synchronization times, and the embodiments of the present application do 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. In response to the synchronization request, the clipboard of terminal 2 obtains the data to be synchronized, parses the data, and collects the data.
[0253] As described above Figure 8 shown, Figure 7 the mobile phone in Figure 8 synchronizes the collected data to the computer in Figure A in Figure 8 and the tablet in Figure B in Figure 7 (that is, the card newly displayed in Figure D in
[0254] The data to be synchronized refers to the data in the clipboard of terminal 1 that has not been synchronized to terminal 2.
[0255] Triggered by the synchronization timing, 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 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. The synchronization request can carry the data to be synchronized (such as text). Terminal 2 responds to the synchronization request and obtains the data to be synchronized from the synchronization request. Or, the synchronization request carries the file information of the data to be synchronized (such as text or image). Terminal 2 responds to the synchronization request and obtains the file information. For example, if the data to be synchronized is an image, the file information can include the thumbnail or partial screenshot of the image and the storage location information of the image. If the user needs to reuse the image, the clipboard of terminal 2 can read the image from the distributed memory of terminal 1 according to 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 the data from terminal 1 to the clipboard of terminal 2, where the database of terminal 2 can be the clipboard of terminal 2.
[0256] The clipboard of Terminal 2 provides a convenient entry for the user (i.e., the card in the floating window displayed on the interface of Terminal 2). The user can access the data in the clipboard of Terminal 2 at any time, including the data synchronized from Terminal 1 and the clipboard data collected by the clipboard events monitored by Terminal 2 itself.
[0257] S26. The clipboard of Terminal 2 sends a synchronization request to the communication component of Terminal 2.
[0258] After synchronizing the data in the clipboard of Terminal 1, Terminal 2 encapsulates the database of Terminal 2 and requests to synchronize the data in the clipboard from Terminal 1. This synchronization request is used to request to synchronize the data in the clipboard of Terminal 2 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. In response to the synchronization request, the clipboard of Terminal 1 obtains the data to be synchronized, parses the data, and collects the data.
[0262] Among them, 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 to synchronize the data in the clipboard from Terminal 1 includes: the clipboard of Terminal 2 sends a synchronization request to the communication component of Terminal 2; the communication component of Terminal 2 sends a synchronization request to the communication component of Terminal 1; the communication component of Terminal 1 sends a synchronization request to the clipboard of Terminal 1; in response to the synchronization request, the clipboard of Terminal 1 obtains the data to be synchronized, parses the data to be synchronized, and inserts it into the database of Terminal 1, completing the process of synchronizing the data in the clipboard of Terminal 2 to the clipboard of Terminal 1. Among them, the database of Terminal 1 can be the clipboard of Terminal 1.
[0264] Since a data channel has been established between Terminal 1 and Terminal 2, if there is data in the clipboard of Terminal 2 that has not been synchronized to the clipboard of Terminal 1, the clipboard of Terminal 2 encapsulates the data in the database of Terminal 2 that has not been sent to Terminal 1, and synchronizes the data to the clipboard of Terminal 1 through the established data channel. It can be regarded as another synchronization opportunity to realize the multiplexing of the data channel, reduce data transmission conflicts, and improve data transmission efficiency.
[0265] The clipboard of Terminal 1 provides a convenient entry for the user (i.e., the card in the floating window displayed on the interface of Terminal 1). The user can access the data in the clipboard of Terminal 1 at any time, including the data synchronized from Terminal 2 and the clipboard data collected by the clipboard events monitored by Terminal 1 itself.
[0266] After the clipboard of terminal 1 synchronizes the data of terminal 2, if terminal 2 goes offline, the clipboard of terminal 1 deletes the synchronized data from terminal 2, and the data synchronized from the clipboard of terminal 2 is not displayed in the floating window of terminal 1. After terminal 2 goes online and joins the loop, the clipboard of terminal 1 can be synchronized to update the data in the clipboard of terminal 1. The clipboard of terminal 1 does not save the synchronized data after terminal 2 goes offline, which can reduce resource consumption. Alternatively, the synchronized data from terminal 2 is hidden or grayed out in the floating window of terminal 1. For example, the user can see the synchronized data from terminal 2, but cannot reuse the data. After terminal 2 goes online and joins the loop, the synchronized data from terminal 2 is displayed.
[0267] Similarly, after the clipboard of terminal 2 synchronizes the data of terminal 1, if terminal 1 goes offline, the clipboards of terminal 2 and other devices delete the synchronized data from terminal 1, that is, the clipboard of terminal 2 deletes the data synchronized from the clipboard of terminal 1. After terminal 1 goes online and joins the loop, the clipboard of terminal 1 can be synchronized to update the data in the clipboard of terminal 2. The clipboard of terminal 2 does not save the synchronized data after terminal 1 goes offline, which can reduce resource consumption. Alternatively, the synchronized data from terminal 1 is hidden in the floating window of terminal 2. For example, the user can see the synchronized data from terminal 1, but cannot reuse the data. After terminal 1 goes online and joins the loop, the synchronized data from terminal 1 is displayed.
[0268] Next, based on Figure 15 we will introduce the paste operation across different terminals of electronic devices in combination with Figure 16
[0269] In some scenarios, after the user copies or cuts materials in terminal 1, they can also go to other devices (such as terminal 2) to paste and use them. When the system service process in terminal 1 monitors the appearance of new data in the native clipboard through the clipboard listener, it will not only trigger terminal 1 to collect clipboard data, but also trigger terminal 1 to send a clipboard event to terminal 2. This example explains the cross-device paste process.
[0270] After the above Figure 15 S11 - S13, the following steps can also be executed.
[0271] S30: The system service process of terminal 1 launches 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 the registered clipboard listener. If it detects a change in the data in the native clipboard (i.e., there is new data in the native clipboard), it calls the bind service to start (or launch) the Handoff component of Terminal 1 through the bind service.
[0273] It should be noted that Figure 16 the system service process launching the Handoff component and the above Figure 15 the system service process launching the clipboard can be steps executed simultaneously. Of course, the system service process launching the Handoff component and launching the clipboard can also be executed sequentially. This application does not make any restrictions on this.
[0274] S31. The Handoff component of Terminal 1 obtains the clipboard data from the native clipboard and saves the clipboard data.
[0275] If the Handoff component of Terminal 1 is launched for the first time, before saving the clipboard data, the Handoff component can first execute the initialization process, and then obtain the current clipboard data and save it.
[0276] S32. The Handoff 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 resident state and can listen for messages in real time. The Handoff component of Terminal 1 sends a clipboard event 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 resident state and can listen for messages in real time. The communication component of Terminal 2 can receive the clipboard event sent by the communication component of Terminal 1.
[0280] S34. The communication component of Terminal 2 launches the Handoff component of Terminal 2.
[0281] The communication component of Terminal 2 starts (or launches) the Handoff component of Terminal 2, and the Handoff component of Terminal 2 receives the clipboard event.
[0282] S35. The Handoff component of Terminal 2 saves the clipboard event and the device identifier.
[0283] The Handoff component of Terminal 2 saves the clipboard event and the device identifier (Identity document, ID) corresponding to the clipboard event.
[0284] If the switching component of terminal 2 is started for the first time, before saving the clipboard event, the switching component can first perform an initialization process, then save the clipboard event, and obtain the device identifier of the corresponding device, that is, the device ID of terminal 1.
[0285] It should be noted that what the switching component of terminal 2 saves here is the clipboard event, not the clipboard data. If the user really needs to paste the clipboard data, terminal 2 can request the switching component of terminal 1 to obtain the clipboard data, without the need for terminal 1 to transmit the clipboard data every time and then transmit it when terminal 2 needs to paste, reducing resource consumption.
[0286] S36. The switching component of terminal 2 registers a paste event.
[0287] The switching component of terminal 2 registers a paste event and starts a timer. The timer can be set to 60s, 90s, 100s, etc. That is, the switching component listens for the paste event.
[0288] S37. If the switching component of terminal 2 does not detect a paste event within a preset time period after saving the clipboard event, the clipboard event is deleted.
[0289] Within the preset time period (for example, 1 minute), the user does not perform a paste operation, the switching component of terminal 2 does not detect a paste event, and the switching component of terminal 2 deletes the clipboard event. S38 - S46 are no longer executed.
[0290] After the switching component of terminal 2 saves the clipboard event, if terminal 2 goes offline, the switching component of terminal 2 deletes 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 displayed interface of 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] Within the preset time period (for example, 1 minute), the user performs a paste operation, the switching component of terminal 2 detects a 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 the clipboard data to the communication component of terminal 1.
[0299] S44. The communication component of terminal 1 sends the clipboard data to the communication component of terminal 2.
[0300] S45. The communication component of terminal 2 sends the clipboard data to the switching component of terminal 2.
[0301] S46. The switching component of terminal 2 copies the clipboard data to the native clipboard and pastes the data from the native clipboard.
[0302] The communication component of terminal 2 sends a clipboard data request to the communication component of terminal 1. The communication component of terminal 1 sends a clipboard data request to the switching component of terminal 1, and the switching component of terminal 1 obtains the saved clipboard data based on the clipboard data request. Then, the switching component of terminal 1 sends the clipboard data to the communication component of terminal 1, and the communication component of terminal 1 sends the clipboard data to the communication component of terminal 2. The communication component of terminal 2 sends the clipboard data to the switching component of terminal 2. The switching component of terminal 2 adds the clipboard data to the native clipboard of terminal 2, so as to paste the clipboard data (i.e., the copied data or cut data of terminal 1) from the native clipboard.
[0303] It should be noted that the native clipboard here refers to the native system clipboard of terminal 2, which has the function of saving the last copied data, cut data or pasted data.
[0304] The clipboard data can be image information or text. When the clipboard data is text, terminal 2 obtains the text and can paste it. When the clipboard data indicates image information, terminal 2 obtains the image information, then reads the image from terminal 1 according to the image information, and then pastes the image. The clipboard data pasted by terminal 2 refers to the complete data. For the case where the clipboard data indicates an image, when synchronizing the clipboard data, the synchronized data is the image information. And in this example, the pasted data is the image. Therefore, the clipboard data request is used to obtain the complete data of the clipboard data. To facilitate the distinction from the image information when synchronizing images, the complete data of the clipboard data can be referred to as editing data here.
[0305] The clipboard of terminal 2 has the same functions as the clipboard of terminal 1. The system service process of terminal 2 listens for clipboard events through the registered clipboard listener. When the user performs a paste operation on terminal 2, it triggers terminal 2 to obtain clipboard data from terminal 1 and add it to the native clipboard of terminal 2, and then obtain the clipboard data from the native clipboard of terminal 2 for pasting. If there is new data in the native clipboard of terminal 2, it triggers the clipboard of terminal 2 to collect the new data. However, since the data pasted by terminal 2 is the data copied or cut by terminal 1, and the data copied or cut by terminal 1 will be synchronized from the clipboard of terminal 1 to the clipboard of terminal 2, this results in duplicate collection of clipboard data.
[0306] Exemplarily, the user copies data A on the interface displayed by terminal 1, triggering terminal 1 to collect data A in the clipboard, and the collected data A comes from the native clipboard of terminal 1. After the user copies data A on the interface displayed by terminal 1, the user performs a paste operation on the interface displayed by terminal 2. In response to this paste operation, terminal 2 first obtains data A from terminal 1 and adds it to the native clipboard of terminal 2. The new data A on the native clipboard of terminal 2 triggers the clipboard of terminal 2 to also collect data A, and the collected data A comes from the clipboard of terminal 2. At the same time, the data A collected in the clipboard of terminal 1 is synchronized to the clipboard of terminal 2, and the data A collected in the clipboard of terminal 2 comes from the clipboard of terminal 1. Thus, it will result in duplicate collection of data A in the clipboard of terminal 2.
[0307] In this application, in order to avoid duplicate collection of data, that is, to avoid duplicate clipboard data collected in the clipboard of terminal 2, before the clipboard of terminal 2 collects the data corresponding to the clipboard event, it also judges the data source. Distinguish whether it is a cross-device paste write. If so, no record is generated. That is, if the data comes from the copy operation or cut operation of terminal 1, the clipboard of terminal 2 filters the data from this source and does not save it in the clipboard of terminal 1, improving the simplicity of data collection and reducing resource consumption.
[0308] Exemplarily, taking terminal 1 as a mobile phone and terminal 2 as a computer, the user Figure 7 after clicking the copy button for data A in Figure C in, performs a paste operation on the computer to paste the data copied or cut on the mobile phone, triggering the clipboard of the computer to collect data A. As Figure 17 shown, Figure 17 shows the content in the clipboard of the computer, which includes not only the data from the native clipboard of the computer, but also the clipboard data synchronized from the mobile phone (the clipboard data synchronized from the mobile phone of the mobile phone), and these two parts of data are the same. In this application, for the above Figure 17, if it is detected that the data in the native clipboard of the computer is written by cross-device pasting, the data from the native clipboard of the computer is not saved in the clipboard of the computer.
[0309] In this application, the clipboard of the terminal 1 is used to save the data copied or cut by the user multiple times, 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 It is an exemplary flowchart of a cross-terminal interaction method provided by an embodiment of this application.
[0311] In some possible situations, the exemplary process involved in the electronic device collecting and synchronizing clipboard data can refer to the following description of S101 - S107.
[0312] S101. The first electronic device displays a first interface, and the first interface includes a first material.
[0313] It can be understood that the first interface can be the interface displaying text content involved in the foregoing content, or the first interface can also be the interface displaying an image involved in the foregoing content.
[0314] In a possible implementation manner, the first interface can be the Figure 7 display interface shown in FIG. A in the above. At this time, the first material is of text type.
[0315] S102. When receiving a first clipboard operation input by the user on the first material, the first electronic device obtains first clipboard data from the native clipboard, and the first clipboard data corresponds to the first material.
[0316] In a possible implementation manner, the first clipboard operation can be Figure 7 the copy operation in FIG. C in the above.
[0317] S103. The first electronic device displays a second interface, the second interface 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, the second card includes part or all of the second clipboard data, and the second clipboard data is obtained by the user performing a second clipboard operation on a second material.
[0318] In a possible implementation manner, the second interface can be the Figure 7 display interface shown in FIG. D in the above. The first card is the bottommost 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 the 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 first clipboard data from the first clipboard of the first electronic device.
[0322] S106. The second electronic device displays a third interface, where the third interface includes a second floating window, and 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.
[0323] In a possible implementation, taking the second electronic device as a computer as an example, the third interface can be the display interface shown in FIG. A above, and the third card is the rightmost card in the second floating window. Taking the second electronic device as a tablet as an example, the third interface can be the display interface shown in FIG. B above, and the third card is the bottommost card in the second floating window. Figure 8 Figure 8
[0324] S107. In the second electronic device, in response to a drag operation on the third card, a fourth interface is displayed, and the fourth interface includes a first editing area, and the first editing area includes all of the first clipboard data.
[0325] The relevant content involved in S101 - S107 can refer to the above description of collecting clipboard data at the local end and synchronizing it to the peer end, which will not be elaborated here. The exemplary interfaces involved in S101 - S107 can refer to the above description of Figures 6 - 12 the relevant content, which will not be elaborated here.
[0326] Through the trusted ring capability, combined with the clipboard and instant paste capabilities, this application can solve the technical problem of unable to paste across devices from end to end, and solve the technical problem of unable to reuse clipboard data across applications and devices from end to end, improving the sharing efficiency of cross - end clipboard data processing and the user experience. The user can also open an editing interface in the second electronic device, select any card in the second floating window, and paste all of the clipboard data included in the card onto the editing area in the editing interface. The data in the card can be from the first electronic device or the second electronic device, realizing the sharing and ready - to - use of the collected data.
[0327] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of 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, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a Digital Versatile Disc (DVD)), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.
[0328] The above are optional embodiments provided by the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the technical scope disclosed in the present application shall be included within the protection scope of the present application.
Claims
1. A cross-terminal interaction method, characterized in that, Applied to a system including a first electronic device and a second electronic device, the method includes: The first electronic device displays a first interface, and the first interface includes a first material. When receiving a first clipboard operation input by a user on the first material, the first electronic device obtains first clipboard data from the native clipboard, and the first clipboard data corresponds to the first material. The first electronic device displays a second interface, and the second interface 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 second clipboard data, and the second clipboard data is obtained by the user performing a second clipboard operation on a 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, and the third interface 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, and the fourth interface includes a first editing area, and the first editing area includes all of the first clipboard data.
2. The method according to claim 1, wherein 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, receiving a third clipboard operation input by the user on a third material, and the first electronic device obtains third clipboard data from the native clipboard. The first electronic device displays the first floating window, and the first floating window includes a first card, a second card, and a fifth card, and the fifth card includes part or all of the third clipboard data.
3. The method according to 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 by the user is received within the first preset time period after the first clipboard operation, the first floating window is closed.
4. The method according to any one of claims 1 to 3, characterized in that After the second electronic device obtains the first clipboard data from the first clipboard of the first electronic device in response to the first synchronization request, the method further includes: In the second electronic device, if there is fourth clipboard data in the second clipboard of the second electronic device, sending a second synchronization request to the first electronic device; the fourth clipboard data indicates data that has not been synchronized to the first electronic device and originated from the second electronic device, and the second synchronization request is used to request 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, and the first floating window includes the first card, the second card, and the sixth card, and the sixth card includes part or all of the fourth clipboard data.
5. The method according to claim 4, wherein The sixth card includes a first icon and / or a second icon. 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 according to any one of claims 1-5, characterized in that, The method further includes: When a preset synchronization opportunity 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 according to claim 6, wherein The preset synchronization opportunity is any one of the following: within a second preset time period after the second electronic device obtains the fifth clipboard data, when the data channel between the first electronic device and the second electronic device 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 updated passively, and when the first clipboard is opened.
8. The method according to any one of claims 1-7, 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, and the second editing area displays all of the clipboard data included in the target card, and the target card is any card in the first floating window.
9. The method according to any one of claims 1-8, characterized in that, When the third card indicates a 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 according to any one of claims 1-9, characterized in that, Before the first electronic device displays the second interface, it further includes: In the first electronic device, in response to a first clipboard event triggered by monitoring the first clipboard operation, the first clipboard is started.
11. The method according to claim 10, wherein After responding to the first clipboard event triggered by monitoring the first clipboard operation, the method further includes: 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 saved, and a paste event is monitored; In the second electronic device, if a first paste event is monitored 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; the clipboard data request is used to request to obtain 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 performs a paste operation based on the first clipboard data.
12. The method according to claim 11, wherein After receiving the first clipboard data, the second electronic device performs a paste operation based on 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 performs a paste operation based on the first clipboard data.
13. The method according to claim 12, wherein The method further includes: In response to a second clipboard event of adding the first clipboard data to the native clipboard of the second electronic device, the second electronic device does not collect the first clipboard data corresponding to the second clipboard event in the second clipboard.
14. The method according to any one of claims 11-13, characterized in that, After saving the first clipboard event and the device identifier of the first electronic device and listening for paste events, the method further includes: In the second electronic device, if the first paste event is not detected within a third preset time period after saving the first clipboard event, the first clipboard event is deleted. Or, In the second electronic device, if it is detected that the second electronic device is offline, the first clipboard event is deleted.
15. The method according to any one of claims 10 to 14, characterized in that Before starting the first clipboard in response to a first clipboard event triggered by monitoring the first clipboard operation, the method further includes: In the first electronic device, a clipboard listener is registered through the system service process, and clipboard access without notification permission is obtained. In the first electronic device, clipboard events are monitored through the clipboard listener.
16. The method according to any one of claims 1-14, characterized in that, After the second electronic device displays the third interface, the method further includes: In the second electronic device, if it is detected that the first electronic device is offline, the data from the first electronic device in the second floating window is deleted or hidden; the data from the first electronic device includes the first clipboard data.
17. The method according to any one of claims 1-16, characterized in that, The cards displayed in the first floating window and the second floating window are arranged in the order of the acquisition timestamps of the cards.
18. The method according to any one of claims 1-17, wherein 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 the image, or a thumbnail or partial screenshot corresponding to the image.
19. 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. When the computer program is executed by the processor, the method executed by the first electronic device or the second electronic device according to any one of claims 1-18 is implemented.
20. A cross-terminal interaction system, characterized in that, The cross-terminal interaction system includes a first electronic device and a second electronic device, and the first electronic device and the second electronic device execute the method according to any one of claims 1-18.
21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute the method according to any one of claims 1-18.
22. A computer program product comprising instructions, characterized in that, When run on a computer, it causes the computer to execute the method according to any one of claims 1-18.
Citation Information
Patent Citations
A method and apparatus for cross-program application of the clipboard
CN102262565A
Method, terminal and system for managing clipboard
CN105323272A
Instant messaging realization method and device
CN105871690A
Clipboard content processing method and mobile terminal
CN106201187A
Data sharing method and device, electronic equipment and storage medium
CN115499945A